]> git.baikalelectronics.ru Git - kernel.git/commit
ax88179_178a: avoid copy of tx tcp packets
authorEric Dumazet <edumazet@google.com>
Thu, 1 Aug 2013 13:49:52 +0000 (06:49 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 4 Aug 2013 04:55:52 +0000 (21:55 -0700)
commit5f953d78b5eb636f24b0bd0a1b0b91a258786ce1
treee203a11394a14d0a4659933e6210e7bfe0f50661
parent4bde3c1dbb9434e9928126f01b7260cc539260ac
ax88179_178a: avoid copy of tx tcp packets

ax88179_tx_fixup() has quite complex code trying to push 8 bytes
of control data (len/mss), but fails to do it properly for TCP packets,
incurring an extra copy and point of memory allocation failure.

Lets use the simple and approved way.

dev->needed_headroom being 8, all frames should have 8 bytes of
headroom, so the extra copy should be unlikely anyway.

This patch should improve performance for TCP xmits.

Reported-by: Ming Lei <ming.lei@canonical.com>
Tested-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/ax88179_178a.c