[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1408760230-7457-7-git-send-email-vysevich@gmail.com>
Date: Fri, 22 Aug 2014 22:17:08 -0400
From: vyasevich@...il.com
To: netdev@...r.kernel.org
Cc: Vladislav Yasevich <vyasevic@...hat.com>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
Jesse Brandeburg <jesse.brandeburg@...el.com>,
Bruce Allan <bruce.w.allan@...el.com>,
Carolyn Wyborny <carolyn.wyborny@...el.com>,
Don Skidmore <donald.c.skidmore@...el.com>,
Greg Rose <gregory.v.rose@...el.com>,
Alex Duyck <alexander.h.duyck@...el.com>,
John Ronciak <john.ronciak@...el.com>,
Mitch Williams <mitch.a.williams@...el.com>,
Linux NICS <linux.nics@...el.com>,
e1000-devel@...ts.sourceforge.net
Subject: [PATCH 6/8] i40evf: Fix TSO and hw checksums for non-accelerated vlan packets.
From: Vladislav Yasevich <vyasevic@...hat.com>
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@...el.com>
CC: Jesse Brandeburg <jesse.brandeburg@...el.com>
CC: Bruce Allan <bruce.w.allan@...el.com>
CC: Carolyn Wyborny <carolyn.wyborny@...el.com>
CC: Don Skidmore <donald.c.skidmore@...el.com>
CC: Greg Rose <gregory.v.rose@...el.com>
CC: Alex Duyck <alexander.h.duyck@...el.com>
CC: John Ronciak <john.ronciak@...el.com>
CC: Mitch Williams <mitch.a.williams@...el.com>
CC: Linux NICS <linux.nics@...el.com>
CC: e1000-devel@...ts.sourceforge.net
Signed-off-by: Vladislav Yasevich <vyasevic@...hat.com>
---
drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
index 79bf96c..95a3ec2 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
@@ -1597,7 +1597,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];
--
1.9.3
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists