* [net-2.6 PATCH] ixgbe: fix for 82599 errata marking UDP checksum errors
@ 2009-07-24 4:00 Jeff Kirsher
2009-07-27 3:21 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Kirsher @ 2009-07-24 4:00 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, Don Skidmore, Jeff Kirsher
From: Don Skidmore <donald.c.skidmore@intel.com>
There is an 82599 errata that UDP frames with a zero checksum are
incorrectly marked as checksum invalid by the hardware. This was
leading to misleading hw_csum_rx_error counts. This patch adds a
test around this counter increase for this condition.
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ixgbe/ixgbe_main.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 6887759..200454f 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -511,8 +511,11 @@ static void ixgbe_receive_skb(struct ixgbe_q_vector *q_vector,
* @skb: skb currently being received and modified
**/
static inline void ixgbe_rx_checksum(struct ixgbe_adapter *adapter,
- u32 status_err, struct sk_buff *skb)
+ union ixgbe_adv_rx_desc *rx_desc,
+ struct sk_buff *skb)
{
+ u32 status_err = le32_to_cpu(rx_desc->wb.upper.status_error);
+
skb->ip_summed = CHECKSUM_NONE;
/* Rx csum disabled */
@@ -530,6 +533,16 @@ static inline void ixgbe_rx_checksum(struct ixgbe_adapter *adapter,
return;
if (status_err & IXGBE_RXDADV_ERR_TCPE) {
+ u16 pkt_info = rx_desc->wb.lower.lo_dword.hs_rss.pkt_info;
+
+ /*
+ * 82599 errata, UDP frames with a 0 checksum can be marked as
+ * checksum errors.
+ */
+ if ((pkt_info & IXGBE_RXDADV_PKTTYPE_UDP) &&
+ (adapter->hw.mac.type == ixgbe_mac_82599EB))
+ return;
+
adapter->hw_csum_rx_error++;
return;
}
@@ -803,7 +816,7 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
goto next_desc;
}
- ixgbe_rx_checksum(adapter, staterr, skb);
+ ixgbe_rx_checksum(adapter, rx_desc, skb);
/* probably a little skewed due to removing CRC */
total_rx_bytes += skb->len;
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [net-2.6 PATCH] ixgbe: fix for 82599 errata marking UDP checksum errors
2009-07-24 4:00 [net-2.6 PATCH] ixgbe: fix for 82599 errata marking UDP checksum errors Jeff Kirsher
@ 2009-07-27 3:21 ` David Miller
2009-07-27 6:11 ` Waskiewicz Jr, Peter P
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2009-07-27 3:21 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, donald.c.skidmore
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu, 23 Jul 2009 21:00:39 -0700
> From: Don Skidmore <donald.c.skidmore@intel.com>
>
> There is an 82599 errata that UDP frames with a zero checksum are
> incorrectly marked as checksum invalid by the hardware. This was
> leading to misleading hw_csum_rx_error counts. This patch adds a
> test around this counter increase for this condition.
>
> Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied, thanks.
But I wonder. When you compute a checksum, and it's zero,
you have to use the complement as the checksum value. How
does that relate to the problem being tackled here?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [net-2.6 PATCH] ixgbe: fix for 82599 errata marking UDP checksum errors
2009-07-27 3:21 ` David Miller
@ 2009-07-27 6:11 ` Waskiewicz Jr, Peter P
0 siblings, 0 replies; 3+ messages in thread
From: Waskiewicz Jr, Peter P @ 2009-07-27 6:11 UTC (permalink / raw)
To: David Miller
Cc: Kirsher, Jeffrey T, netdev@vger.kernel.org, gospo@redhat.com,
Skidmore, Donald C
On Sun, 26 Jul 2009, David Miller wrote:
> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Date: Thu, 23 Jul 2009 21:00:39 -0700
>
> > From: Don Skidmore <donald.c.skidmore@intel.com>
> >
> > There is an 82599 errata that UDP frames with a zero checksum are
> > incorrectly marked as checksum invalid by the hardware. This was
> > leading to misleading hw_csum_rx_error counts. This patch adds a
> > test around this counter increase for this condition.
> >
> > Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
> > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>
> Applied, thanks.
>
> But I wonder. When you compute a checksum, and it's zero,
> you have to use the complement as the checksum value. How
> does that relate to the problem being tackled here?
The problem is our hardware has an errata. If the packet data contains no
checksum, or no checksum computed, our hardware doesn't recognize it. So
when it tries to compute the checksum on Rx, it doesn't just figure out
that it needs to use the one's complement. So it's not recognizing the
fact the checksum is either not computed, or computes to zero.
The only place we've seen this show up is receiving from pktgen, where no
checksum is computed. It is a really stupid HW errata, and is just an
annoyance really (our bad checksum counter soars when doing pktgen stress
testing).
Cheers,
-PJ Waskiewicz
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-07-27 6:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-24 4:00 [net-2.6 PATCH] ixgbe: fix for 82599 errata marking UDP checksum errors Jeff Kirsher
2009-07-27 3:21 ` David Miller
2009-07-27 6:11 ` Waskiewicz Jr, Peter P
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).