]> git.baikalelectronics.ru Git - kernel.git/commit
cxgb4/cxgb4vf: Fixes regression in perf when tx vlan offload is disabled
authorHariprasad Shenai <hariprasad@chelsio.com>
Thu, 28 Jul 2016 07:58:57 +0000 (13:28 +0530)
committerDavid S. Miller <davem@davemloft.net>
Sun, 31 Jul 2016 03:39:59 +0000 (20:39 -0700)
commit9623251b95451cd78c27cc2a5fd6a2e8ad41449a
tree44210434f0677d58165a5259929bb1d3a731db71
parent559aba423614ca28b59402f5c992e6cd299842a8
cxgb4/cxgb4vf: Fixes regression in perf when tx vlan offload is disabled

The commit 0017eae241ee ("cxgb4: Discard the packet if the length is
greater than mtu") introduced a regression in the VLAN interface
performance when Tx VLAN offload is disabled.

Check if skb is tagged, regardless of whether it is hardware accelerated
or not. Presently we were checking only for hardware acclereated one,
which caused performance to drop to ~0.17Mbps on a 10GbE adapter for
VLAN interface, when tx vlan offload is turned off using ethtool.
The ethernet head length calculation was going wrong in this case, and
driver ended up dropping packets.

Fixes: 0017eae241ee ("cxgb4: Discard the packet if the length is greater than mtu")
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/sge.c
drivers/net/ethernet/chelsio/cxgb4vf/sge.c