[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1231860655-13182-1-git-send-email-Ian.Campbell@citrix.com>
Date: Tue, 13 Jan 2009 15:30:55 +0000
From: Ian Campbell <Ian.Campbell@...rix.com>
To: Jeremy Fitzhardinge <jeremy@...p.org>
Cc: Ian Campbell <Ian.Campbell@...rix.com>,
Ian Campbell <ian.campbell@...rix.com>,
Jeremy Fitzhardinge <jeremy@...p.org>, jgarzik@...ox.com,
netdev@...r.kernel.org
Subject: [PATCH] xen/netfront: do not mark packets of length < MSS as GSO
Linux assumes that skbs marked for GSO are longer than MSS. In
particular tcp_tso_segment assumes that skb_segment will return a
chain of at least 2 skbs.
Therefore netfront should not pass such a packet up the stack.
Signed-off-by: Ian Campbell <ian.campbell@...rix.com>
Cc: Jeremy Fitzhardinge <jeremy@...p.org>
Cc: jgarzik@...ox.com
Cc: netdev@...r.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 cd6184e..3777c09 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -953,6 +953,11 @@ err:
else if (rx->flags & NETRXF_data_validated)
skb->ip_summed = CHECKSUM_UNNECESSARY;
+ if (skb->data_len < skb_shinfo(skb)->gso_size) {
+ skb_shinfo(skb)->gso_size = 0;
+ skb_shinfo(skb)->gso_type = 0;
+ }
+
__skb_queue_tail(&rxq, skb);
np->rx.rsp_cons = ++i;
--
1.5.6.5
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists