From: Vlad Yasevich Date: Tue, 23 May 2017 17:38:42 +0000 (-0400) Subject: be2net: Fix offload features for Q-in-Q packets X-Git-Tag: v4.1.12-106.0.20170710_2300~2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=8df723c2c2043efc259633c499c123f0e24f9a36;p=users%2Fjedix%2Flinux-maple.git be2net: Fix offload features for Q-in-Q packets At least some of the be2net cards do not seem to be capabled of performing checksum offload computions on Q-in-Q packets. In these case, the recevied checksum on the remote is invalid and TCP syn packets are dropped. This patch adds a call to check disbled acceleration features on Q-in-Q tagged traffic. Orabug: 26403655 CC: Sathya Perla CC: Ajit Khaparde CC: Sriharsha Basavapatna CC: Somnath Kotur Signed-off-by: Vladislav Yasevich Signed-off-by: David S. Miller Signed-off-by: Kirtikar Kashyap Reviewed-by: Reviewed-by: Jack Vogel --- diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index c3a2cf035203..c6ec7c2a7880 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -5052,9 +5052,11 @@ static netdev_features_t be_features_check(struct sk_buff *skb, struct be_adapter *adapter = netdev_priv(dev); u8 l4_hdr = 0; - /* The code below restricts offload features for some tunneled packets. + /* The code below restricts offload features for some tunneled and + * Q-in-Q packets. * Offload features for normal (non tunnel) packets are unchanged. */ + features = vlan_features_check(skb, features); if (!skb->encapsulation || !(adapter->flags & BE_FLAGS_VXLAN_OFFLOADS)) return features;