]> git.openfabrics.org - ~emulex/infiniband.git/commit
Merge branch 'vlan_get_protocol'
authorDavid S. Miller <davem@davemloft.net>
Sat, 31 Jan 2015 02:03:58 +0000 (18:03 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 31 Jan 2015 02:03:58 +0000 (18:03 -0800)
commit08178e5ac45b1a8f6bbaebb30109a304aa6cd151
tree90e90c74520964e5beedbb35b3cb304f3f5005eb
parentcfbf654efc6d78dc9812e030673b86f235bf677d
parent10e4fb333c9ad72491f80bed018f8007e17060d1
Merge branch 'vlan_get_protocol'

Toshiaki Makita says:

====================
Fix checksum error when using stacked vlan

When I was testing 802.1ad, I found several drivers don't take into
account 802.1ad or multiple vlans when retrieving L3 (IP/IPv6) or
L4 (TCP/UDP) protocol for checksum offload.

It is mainly due to vlan_get_protocol(), which extracts ether type only
when it is tagged with single 802.1Q. When 802.1ad is used or there are
multiple vlans, it extracts vlan protocol and drivers cannot determine
which L3/L4 protocol is used.

Those drivers, most of which have IP_CSUM/IPV6_CSUM features, get L3/L4
header-offset by software, so it seems that their checksum offload works
with multiple vlans if we can parse protocols correctly.
(They know mac header length, and probably don't care about what is in it.)

And another thing, some of Intel's drivers seem to use skb->protocol where
vlan_get_protocol() is more suitable.

I tested that at least igb/igbvf on I350 works with this patch set.

Note:
We can hand a double tagged packet with CHECKSUM_PARTIAL to a HW driver
by creating a vlan device on a bridge device and enabling vlan_filtering
of the bridge with 802.1ad protocol.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>