openwrtv4/target/linux/generic
Felix Fietkau 8eb57d0cd7 kernel: align the skb padding to power of two
The skb is usually started by a padding which allows the protocols in the
network stack to add their headers in front of the payload. The skb can be
reallocated in case the preallocated padding is not large enough. This can for
example happen in the function __skb_cow which will check the requested extra
headroom and allocate more buffer when the requested headroom is bigger than
the available one. The extra buffer is aligned again to the multiple of the
NET_SKB_PAD of the target architecture.

The macro used to create the multiple of the NET_SKB_PAD is written in a way
which allows only values power two as alignment parameter. The currently used
value of 48 bytes can not be written as n ** 2 but as 2 ** 4 + 2 ** 5. The
extra buffer is therefore not always the multiple of 48 but can be 16, 64, 80,
128, 144 and so on. The generated values are also not monotonic (48 requested
bytes are mapped to 80 allocated bytes and 49 requested bytes are mapped to 64
allocated bytes).

These unexpected small values result in more reallocations of the buffer. This
was noticed prominently during tests between two QCA9558 720 MHz devices which
were connected via ethernet to PCs and had a HT40 802.11n 3x3 link between each
other. The throughput PC-to-PC during iperf TCP runs increased reliable from
186 Mibit/s to 214 Mibit/s in one direction and from 195 Mibit/s to 220 Mibit/s
in the other direction. This is a performance increase of ~14% just by reducing
the amount of reallocations.

Signed-off-by: Sven Eckelmann <sven@open-mesh.com>

SVN-Revision: 37948
2013-09-11 14:30:15 +00:00
..
base-files update the /init file to start /sbin/init 2013-03-13 18:11:13 +00:00
files kernel: b53: support phy ids for BCM5365 2013-09-05 20:30:34 +00:00
image rename target/linux/generic-2.6 to generic 2010-06-26 20:42:58 +00:00
patches-3.3 kernel: align the skb padding to power of two 2013-09-11 14:30:15 +00:00
patches-3.6 kernel: align the skb padding to power of two 2013-09-11 14:30:15 +00:00
patches-3.8 kernel: align the skb padding to power of two 2013-09-11 14:30:15 +00:00
patches-3.9 kernel: align the skb padding to power of two 2013-09-11 14:30:15 +00:00
patches-3.10 kernel: align the skb padding to power of two 2013-09-11 14:30:15 +00:00
config-3.3 kernel: add missing config options 2013-08-02 20:13:54 +00:00
config-3.6 generic: refresh kernel configs with kconfig.pl 2013-08-23 17:31:02 +00:00
config-3.8 generic: refresh kernel configs with kconfig.pl 2013-08-23 17:31:02 +00:00
config-3.9 generic: refresh kernel configs with kconfig.pl 2013-08-23 17:31:02 +00:00
config-3.10 Add missing symbol 2013-09-05 10:08:59 +00:00
PATCHES kernel: update PATCHES with a stricter policy 2013-07-09 20:52:07 +00:00