]> git.karo-electronics.de Git - karo-tx-linux.git/commit
vlan: Fix tcp checksum offloads in Q-in-Q vlans
authorVlad Yasevich <vyasevich@gmail.com>
Tue, 23 May 2017 17:38:41 +0000 (13:38 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 May 2017 20:27:14 +0000 (16:27 -0400)
commit35d2f80b07bbe03fb358afb0bdeff7437a7d67ff
treebc2dc13dc4416dae8b0a57460f5d13aa65e6ffec
parentf2899788353c13891412b273fdff5f02d49aa40f
vlan: Fix tcp checksum offloads in Q-in-Q vlans

It appears that TCP checksum offloading has been broken for
Q-in-Q vlans.  The behavior was execerbated by the
series
    commit afb0bc972b52 ("Merge branch 'stacked_vlan_tso'")
that that enabled accleleration features on stacked vlans.

However, event without that series, it is possible to trigger
this issue.  It just requires a lot more specialized configuration.

The root cause is the interaction between how
netdev_intersect_features() works, the features actually set on
the vlan devices and HW having the ability to run checksum with
longer headers.

The issue starts when netdev_interesect_features() replaces
NETIF_F_HW_CSUM with a combination of NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM,
if the HW advertises IP|IPV6 specific checksums.  This happens
for tagged and multi-tagged packets.   However, HW that enables
IP|IPV6 checksum offloading doesn't gurantee that packets with
arbitrarily long headers can be checksummed.

This patch disables IP|IPV6 checksums on the packet for multi-tagged
packets.

CC: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
CC: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
Acked-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/if_vlan.h