From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Shannon Nelson <shannon.nelson@intel.com>,
netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next v2 10/17] i40e: check for possible incorrect ipv6 checksum
Date: Fri, 10 Jan 2014 12:30:32 -0800 [thread overview]
Message-ID: <1389385839-11996-11-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1389385839-11996-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Shannon Nelson <shannon.nelson@intel.com>
If the IPV6EXADD bit is set in the Rx descriptor status, there
was an optional extension header with an alternate IP address
detected. The HW checksum offload doesn't handle the alternate
IP address correctly so likely comes up with the wrong answer.
Thus, if the bit is set we ignore the checksum offload value.
Change-ID: I70ff8d38cdcddccf44107691cae13d0c07c284c8
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_txrx.c | 4 ++++
drivers/net/ethernet/intel/i40e/i40e_type.h | 4 +++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 43d88dd..946d8b1 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -892,6 +892,10 @@ static inline void i40e_rx_checksum(struct i40e_vsi *vsi,
rx_status & (1 << I40E_RX_DESC_STATUS_L3L4P_SHIFT)))
return;
+ /* likely incorrect csum if alternate IP extention headers found */
+ if (rx_status & (1 << I40E_RX_DESC_STATUS_IPV6EXADD_SHIFT))
+ return;
+
/* IP or L4 or outmost IP checksum error */
if (rx_error & ((1 << I40E_RX_DESC_ERROR_IPE_SHIFT) |
(1 << I40E_RX_DESC_ERROR_L4E_SHIFT) |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h
index 072c850..80cf240 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_type.h
@@ -499,7 +499,9 @@ enum i40e_rx_desc_status_bits {
I40E_RX_DESC_STATUS_FLM_SHIFT = 11,
I40E_RX_DESC_STATUS_FLTSTAT_SHIFT = 12, /* 2 BITS */
I40E_RX_DESC_STATUS_LPBK_SHIFT = 14,
- I40E_RX_DESC_STATUS_UDP_0_SHIFT = 16
+ I40E_RX_DESC_STATUS_IPV6EXADD_SHIFT = 15,
+ I40E_RX_DESC_STATUS_RESERVED_SHIFT = 16, /* 2 BITS */
+ I40E_RX_DESC_STATUS_UDP_0_SHIFT = 18
};
#define I40E_RXD_QW1_STATUS_TSYNINDX_SHIFT I40E_RX_DESC_STATUS_TSYNINDX_SHIFT
--
1.8.3.1
next prev parent reply other threads:[~2014-01-10 20:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-10 20:30 [net-next v2 00/17][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2014-01-10 20:30 ` [net-next v2 01/17] i40e: use assignment instead of memcpy Jeff Kirsher
2014-01-10 20:30 ` [net-next v2 02/17] i40e: drop unused macros Jeff Kirsher
2014-01-10 20:30 ` [net-next v2 03/17] i40e: Update the Current NVM version Low value Jeff Kirsher
2014-01-10 20:30 ` [net-next v2 04/17] i40e: Bump version Jeff Kirsher
2014-01-10 20:30 ` [net-next v2 05/17] i40e: fix long lines Jeff Kirsher
2014-01-10 20:30 ` [net-next v2 06/17] i40e: Cleanup Doxygen warnings Jeff Kirsher
2014-01-10 20:30 ` [net-next v2 07/17] i40e: Setting queue count to 1 using ethtool is valid Jeff Kirsher
2014-01-10 20:30 ` [net-next v2 08/17] i40e: do not bail when disabling if Tx queue disable fails Jeff Kirsher
2014-01-10 20:30 ` [net-next v2 09/17] i40e: allow VF to remove any MAC filter Jeff Kirsher
2014-01-10 20:30 ` Jeff Kirsher [this message]
2014-01-10 20:30 ` [net-next v2 11/17] i40e: adjust ITR max and min values Jeff Kirsher
2014-01-10 20:30 ` [net-next v2 12/17] i40e: clear qtx_head before enabling Tx queue Jeff Kirsher
2014-01-10 20:30 ` [net-next v2 13/17] i40e: call clear_pxe after adminq is initialized Jeff Kirsher
2014-01-10 20:30 ` [net-next v2 14/17] i40e: enable PTP Jeff Kirsher
2014-01-10 20:37 ` Ben Hutchings
2014-01-10 21:42 ` Keller, Jacob E
2014-01-10 22:08 ` Ben Hutchings
2014-01-10 20:30 ` [net-next v2 15/17] i40e: fix log message wording Jeff Kirsher
2014-01-10 20:30 ` [net-next v2 16/17] i40e: Bump version Jeff Kirsher
2014-01-10 20:30 ` [net-next v2 17/17] i40evf: fix s390 build failure due to implicit prefetch.h Jeff Kirsher
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=1389385839-11996-11-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=jesse.brandeburg@intel.com \
--cc=netdev@vger.kernel.org \
--cc=sassmann@redhat.com \
--cc=shannon.nelson@intel.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