netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladislav Yasevich <vyasevich@gmail.com>
To: netdev@vger.kernel.org
Cc: Vladislav Yasevich <vyasevic@redhat.com>,
	Linux NICS <linux.nics@intel.com>,
	e1000-devel@lists.sourceforge.net,
	Bruce Allan <bruce.w.allan@intel.com>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	John Ronciak <john.ronciak@intel.com>
Subject: [PATCH v2 5/8] i40e: Fix TSO and hw checksums for non-accelerated vlan packets.
Date: Mon, 25 Aug 2014 10:34:52 -0400	[thread overview]
Message-ID: <1408977295-9162-6-git-send-email-vyasevic@redhat.com> (raw)
In-Reply-To: <1408977295-9162-1-git-send-email-vyasevic@redhat.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@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>
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index a51aa37..369848e 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];
-- 
1.9.3


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

  parent reply	other threads:[~2014-08-25 14:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-25 14:34 [PATCH v2 0/8] Fix TSO and checksum issues with non-accelerated vlan traffic Vladislav Yasevich
2014-08-25 14:34 ` [PATCH v2 1/8] e1000e: Fix TSO with non-accelerated vlans Vladislav Yasevich
2014-08-25 14:34 ` [PATCH v2 2/8] e1000: Fix TSO for non-accelerated vlan traffic Vladislav Yasevich
2014-08-25 14:34 ` [PATCH v2 3/8] bna: Support TSO and partial checksum with non-accelerated vlans Vladislav Yasevich
2014-08-25 14:34 ` [PATCH v2 4/8] ehea: Fix TSO and hw checksums with non-accelerated vlan packets Vladislav Yasevich
2014-08-25 14:34 ` Vladislav Yasevich [this message]
2014-08-25 14:34 ` [PATCH v2 6/8] i40evf: Fix TSO and hw checksums for " Vladislav Yasevich
2014-08-25 14:34 ` [PATCH v2 7/8] mvneta: Fix TSO and checksum for non-acceleration vlan traffic Vladislav Yasevich
2014-08-25 14:34 ` [PATCH v2 8/8] qlge: Fix TSO for non-accelerated " Vladislav Yasevich
2014-08-25 14:52   ` Shahed Shaikh
2014-08-26  0:28 ` [PATCH v2 0/8] Fix TSO and checksum issues with " David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1408977295-9162-6-git-send-email-vyasevic@redhat.com \
    --to=vyasevich@gmail.com \
    --cc=bruce.w.allan@intel.com \
    --cc=e1000-devel@lists.sourceforge.net \
    --cc=jesse.brandeburg@intel.com \
    --cc=john.ronciak@intel.com \
    --cc=linux.nics@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=vyasevic@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).