All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen: netfront: Drop GSO SKBs which do not have csum_blank.
@ 2011-01-05 13:23 Ian Campbell
  2011-01-11 11:46 ` Ian Campbell
  2011-01-22  0:58 ` Jeremy Fitzhardinge
  0 siblings, 2 replies; 15+ messages in thread
From: Ian Campbell @ 2011-01-05 13:23 UTC (permalink / raw)
  To: netdev; +Cc: Ian Campbell, Jeremy Fitzhardinge, xen-devel

The Linux network stack expects all GSO SKBs to have ip_summed ==
CHECKSUM_PARTIAL (which implies that the frame contains a partial
checksum) and the Xen network ring protocol similarly expects an SKB
which has GSO set to also have NETRX_csum_blank (which also implies a
partial checksum). Therefore drop such frames on receive otherwise
they will trigger the warning in skb_gso_segment.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: xen-devel@lists.xensource.com
Cc: netdev@vger.kernel.org
---
 drivers/net/xen-netfront.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index cdbeec9..8b8c480 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -836,6 +836,11 @@ static int handle_incoming_queue(struct net_device *dev,
 				dev->stats.rx_errors++;
 				continue;
 			}
+		} else if (skb_is_gso(skb)) {
+			kfree_skb(skb);
+			packets_dropped++;
+			dev->stats.rx_errors++;
+			continue;
 		}
 
 		dev->stats.rx_packets++;
-- 
1.5.6.5


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

end of thread, other threads:[~2011-01-27 22:23 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-05 13:23 [PATCH] xen: netfront: Drop GSO SKBs which do not have csum_blank Ian Campbell
2011-01-11 11:46 ` Ian Campbell
2011-01-22  0:58 ` Jeremy Fitzhardinge
2011-01-22  9:43   ` Ian Campbell
2011-01-24 17:55     ` Jeremy Fitzhardinge
2011-01-25 17:09       ` Ian Campbell
2011-01-25 17:09         ` [PATCH 1/2] xen: netfront: refactor code for checking validity of incoming skbs Ian Campbell
2011-01-25 17:09           ` Ian Campbell
2011-01-25 17:10         ` [PATCH 2/2] xen: netfront: Drop GSO SKBs which do not have csum_blank Ian Campbell
2011-01-25 17:10           ` Ian Campbell
2011-01-26  3:44           ` David Miller
2011-01-26 11:56             ` Ian Campbell
2011-01-27 14:14               ` [PATCH] xen: netfront: handle incoming GSO SKBs which are not CHECKSUM_PARTIAL Ian Campbell
2011-01-27 14:14                 ` Ian Campbell
2011-01-27 22:23                 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.