diff options
author | Vlad Yasevich <[email protected]> | 2014-08-25 10:34:52 -0400 |
---|---|---|
committer | David S. Miller <[email protected]> | 2014-08-25 17:27:09 -0700 |
commit | 3d34dd03d55c3fa6c332e43e545ec18feb79ee85 (patch) | |
tree | 62c40776c8e1a680d4f45ade96c765f4eb3c6a2a | |
parent | be1d1486122092f5a323539ee4cc328d06083f63 (diff) |
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 <[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]>
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c index a51aa37b7b5a..369848e107f8 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c @@ -2295,7 +2295,7 @@ static netdev_tx_t i40e_xmit_frame_ring(struct sk_buff *skb, goto out_drop; /* obtain protocol of skb */ - protocol = skb->protocol; + protocol = vlan_get_protocol(skb); /* record the location of the first descriptor for this packet */ first = &tx_ring->tx_bi[tx_ring->next_to_use]; |