]> git.openfabrics.org - ~emulex/infiniband.git/commit
i40e: Fix TSO and hw checksums for non-accelerated vlan packets.
authorVlad Yasevich <vyasevich@gmail.com>
Mon, 25 Aug 2014 14:34:52 +0000 (10:34 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Aug 2014 00:27:09 +0000 (17:27 -0700)
commit3d34dd03d55c3fa6c332e43e545ec18feb79ee85
tree62c40776c8e1a680d4f45ade96c765f4eb3c6a2a
parentbe1d1486122092f5a323539ee4cc328d06083f63
i40e: Fix TSO and hw checksums for non-accelerated vlan packets.

This device claims TSO and checksum support for vlans.  It also
allows a user to control vlan acceleration offloading.  As such,
it is possible to turn off vlan acceleration and configure a vlan
which will continue to support TSO and hw checksums.

In such situation the packet passed down the the device will contain
a vlan header and skb->protocol will be set to ETH_P_8021Q.
The device assumes that skb->protocol contains network protocol
value and uses that value to set up TSO and checksum information.
This results in corrupted frames sent on the wire.

This patch extract the protocol value correctly and corrects TSO
and checksums for non-accelerated traffic.

Fix this by using vlan_get_protocol() helper.

CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
CC: Jesse Brandeburg <jesse.brandeburg@intel.com>
CC: Bruce Allan <bruce.w.allan@intel.com>
CC: Carolyn Wyborny <carolyn.wyborny@intel.com>
CC: Don Skidmore <donald.c.skidmore@intel.com>
CC: Greg Rose <gregory.v.rose@intel.com>
CC: Alex Duyck <alexander.h.duyck@intel.com>
CC: John Ronciak <john.ronciak@intel.com>
CC: Mitch Williams <mitch.a.williams@intel.com>
CC: Linux NICS <linux.nics@intel.com>
CC: e1000-devel@lists.sourceforge.net
Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/i40e/i40e_txrx.c