diff options
author | Hariprasad Shenai <hariprasad@chelsio.com> | 2016-07-28 09:58:57 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-07-31 05:39:59 +0200 |
commit | 8d09e6b8b9c9969ac59496dc21e10b67fe727e7e (patch) | |
tree | 44210434f0677d58165a5259929bb1d3a731db71 /drivers/net/ethernet/chelsio/cxgb4 | |
parent | drivers: net: phy: xgene: Remove redundant dev_err call in xgene_mdio_probe() (diff) | |
download | linux-8d09e6b8b9c9969ac59496dc21e10b67fe727e7e.tar.xz linux-8d09e6b8b9c9969ac59496dc21e10b67fe727e7e.zip |
cxgb4/cxgb4vf: Fixes regression in perf when tx vlan offload is disabled
The commit 637d3e997351 ("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: 637d3e997351 ("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>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/sge.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/sge.c b/drivers/net/ethernet/chelsio/cxgb4/sge.c index bad253beb8c8..ad3552df0545 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/sge.c +++ b/drivers/net/ethernet/chelsio/cxgb4/sge.c @@ -1192,7 +1192,7 @@ out_free: dev_kfree_skb_any(skb); /* Discard the packet if the length is greater than mtu */ max_pkt_len = ETH_HLEN + dev->mtu; - if (skb_vlan_tag_present(skb)) + if (skb_vlan_tagged(skb)) max_pkt_len += VLAN_HLEN; if (!skb_shinfo(skb)->gso_size && (unlikely(skb->len > max_pkt_len))) goto out_free; |