netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next PATCH 1/7] ixgbe: fix header len when unsplit packet overflows to data buffer
@ 2010-05-19  2:00 Jeff Kirsher
  2010-05-19  2:00 ` [net-next PATCH 2/7] ixgbe: fix wrong offset to fc_frame_header in ixgbe_fcoe_ddp Jeff Kirsher
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Jeff Kirsher @ 2010-05-19  2:00 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, Shannon Nelson, Jeff Kirsher

From: Shannon Nelson <shannon.nelson@intel.com>

When in packet split mode, packet type is not recognized, and the packet is
larger than the header size, the 82599 overflows the packet into the data
area, but doesn't set the HDR_LEN field.  We can safely assume the length
is the current header size.  This fixes an obscure corner case that can be
triggered by non-ip packet headers or (more likely) by disabling the L2
packet recognition.

Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/ixgbe/ixgbe_main.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 926ad8c..a9e091c 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -1201,9 +1201,10 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
 			hdr_info = le16_to_cpu(ixgbe_get_hdr_info(rx_desc));
 			len = (hdr_info & IXGBE_RXDADV_HDRBUFLEN_MASK) >>
 			       IXGBE_RXDADV_HDRBUFLEN_SHIFT;
-			if (len > IXGBE_RX_HDR_SIZE)
-				len = IXGBE_RX_HDR_SIZE;
 			upper_len = le16_to_cpu(rx_desc->wb.upper.length);
+			if ((len > IXGBE_RX_HDR_SIZE) ||
+			    (upper_len && !(hdr_info & IXGBE_RXDADV_SPH)))
+				len = IXGBE_RX_HDR_SIZE;
 		} else {
 			len = le16_to_cpu(rx_desc->wb.upper.length);
 		}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-05-19  2:44 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-19  2:00 [net-next PATCH 1/7] ixgbe: fix header len when unsplit packet overflows to data buffer Jeff Kirsher
2010-05-19  2:00 ` [net-next PATCH 2/7] ixgbe: fix wrong offset to fc_frame_header in ixgbe_fcoe_ddp Jeff Kirsher
2010-05-19  2:44   ` David Miller
2010-05-19  2:00 ` [net-next PATCH 3/7] ixgbe: remove some redundant code in setting FCoE FIP filter Jeff Kirsher
2010-05-19  2:44   ` David Miller
2010-05-19  2:00 ` [net-next PATCH 4/7] ixgbe: always enable vlan strip/insert when DCB is enabled Jeff Kirsher
2010-05-19  2:44   ` David Miller
2010-05-19  2:00 ` [net-next PATCH 5/7] ixgbe: fix ixgbe_tx_is_paused logic Jeff Kirsher
2010-05-19  2:44   ` David Miller
2010-05-19  2:00 ` [net-next PATCH 6/7] ixgbe: dcb, do not tag tc_prio_control frames Jeff Kirsher
2010-05-19  2:44   ` David Miller
2010-05-19  2:00 ` [net-next PATCH 7/7] ixgbe: add support for active DA cables Jeff Kirsher
2010-05-19  2:45   ` David Miller
2010-05-19  2:44 ` [net-next PATCH 1/7] ixgbe: fix header len when unsplit packet overflows to data buffer David Miller

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).