e1000: Fix TSO for non-accelerated vlan traffic
authorVlad Yasevich <[email protected]>
Mon, 25 Aug 2014 14:34:49 +0000 (10:34 -0400)
committerDavid S. Miller <[email protected]>
Tue, 26 Aug 2014 00:27:09 +0000 (17:27 -0700)
commit06f4d0333e86e302da3ac8386f873d5e353baf2e
treeba2c9af6a8ecf707a961b1ea45740b6cc695d98d
parent47ccd1edc57ddabb81f6ba07e1e30201a8f578d6
e1000: Fix TSO for non-accelerated vlan traffic

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.

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 will results in corrupted frames sent on the wire.

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

CC: Jeff Kirsher <[email protected]>
CC: Jesse Brandeburg <[email protected]>
CC: Bruce Allan <[email protected]>
CC: Carolyn Wyborny <[email protected]>
CC: Don Skidmore <[email protected]>
CC: Greg Rose <[email protected]>
CC: Alex Duyck <[email protected]>
CC: John Ronciak <[email protected]>
CC: Mitch Williams <[email protected]>
CC: Linux NICS <[email protected]>
CC: [email protected]
Signed-off-by: Vladislav Yasevich <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/ethernet/intel/e1000/e1000_main.c