]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: tag_8021q: replace dsa_8021q_remove_header with __skb_vlan_pop
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 24 Mar 2020 09:45:34 +0000 (11:45 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Mar 2020 23:19:01 +0000 (16:19 -0700)
commit5dbc078b7d83be5a7ca9b4dbc89659b120e049b3
tree5872b1405182b8c0df709455dda06a2c115c7b97
parent53e2126a242f4ff6505e3442ebe784a0ebfc61cf
net: dsa: tag_8021q: replace dsa_8021q_remove_header with __skb_vlan_pop

Not only did this wheel did not need reinventing, but there is also
an issue with it: It doesn't remove the VLAN header in a way that
preserves the L2 payload checksum when that is being provided by the DSA
master hw.  It should recalculate checksum both for the push, before
removing the header, and for the pull afterwards. But the current
implementation is quite dizzying, with pulls followed immediately
afterwards by pushes, the memmove is done before the push, etc.  This
makes a DSA master with RX checksumming offload to print stack traces
with the infamous 'hw csum failure' message.

So remove the dsa_8021q_remove_header function and replace it with
something that actually works with inet checksumming.

Fixes: 12a1c7661082 ("net: dsa: tag_8021q: Create helper function for removing VLAN header")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/dsa/8021q.h
net/dsa/tag_8021q.c
net/dsa/tag_sja1105.c