• Vladimir Oltean's avatar
    net: dsa: tag_8021q: replace dsa_8021q_remove_header with __skb_vlan_pop · e80f40cb
    Vladimir Oltean authored
    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: d4619336 ("net: dsa: tag_8021q: Create helper function for removing VLAN header")
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    e80f40cb
tag_8021q.c 10.7 KB