[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#608144: linux-image-2.6.32-5-xen-amd64: Kernel oops: net/core/dev.c:1582 skb_gso_segment+0x109/0x263() (Bug #596802 reappeared)



On Tue, 2011-01-04 at 23:14 +0000, Ben Hutchings wrote:
> On Tue, Jan 04, 2011 at 10:08:32PM +0000, Ian Campbell wrote:
> > On Tue, 2011-01-04 at 21:44 +0100, Stephan Austermühle wrote: 
> > > So the problem was already present in -23 and it just seems to have the
> > > same symptoms like #596802.
> > 
> > OK, thanks for testing that.
> > 
> > I wonder if you could play with ethtool to enable/disable various
> > features on the physical NIC. In particular I think it might be worth
> > fiddling with the LRO and GRO settings, via the -k/-K options.
> 
> I don't think this has anything to do with the physical NIC.  LRO is
> automatically turned off for interfaces that are connected to a bridge,
> and GRO is safe with bridging.

OK, thanks for confirming, I've always been a bit confused by the
relationships between [GL]RO and bridging etc. Furthermore I failed to
notice that the warning in question is during a send via the physical
NIC in any case.

> netback needs to fix up the checksum information for packets that the
> guest sent with TSO and no checksum:
> 1. Calculate the IPv4 header checksum and write it to the packet buffer
>    (not for IPv6, obviously).

The Xen PV network protocol only supports v4 segmentation offload at the
moment anyway.

> 2. Calculate the TCP/UDP pseudo-header checksum and store it in skb->csum.
> 3. Set skb->csum_start and skb->csum_offset per kernel-doc.
> 4. Set skb->ip_summed = CHECKSUM_PARTIAL.

For a GSO frame 1 and 2 must already be set correctly by the frontend as
part of the PV protocol. netback does 3 (in skb_checksum_setup()) and 4
(based on the csum_blank and data_validated flags received from the
frontend).

There was a bug in older versions of the Citrix drivers where it failed
to set the correct metadata flags for GSO frames (csum_blank must be 1
for a GSO frame, the drivers were setting it to zero, even though the
partial checksum was correct, which is invalid) which caused netback to
set the wrong ip_summed.

I thought this was fixed long enough ago that this wouldn't be an issue
today but perhaps I'm wrong.

Stephan, which Citrix WHQL drivers are you using? Some XCP version or
something else? Where did you download them from? I presume that if you
dig around in the Windows properties pages that there is a version or
build number or something.

XenServer carries a temporary netback workaround for this issue, which
is below, in order to support smoother upgrades. The intention was that
it would be dropped in some future release and I don't really want to
propagate it further (since it could also paper over a guest which
hasn't obeyed #2 above) unless there is no other choice.

> > GRO is a generalisation of LRO, I'm not sure if it is supposed to fix
> > this forwarding issue or not.
>  
> GRO is a specific software implementation of LRO that preserves enough
> information that it is safe to bridge/forward the resulting skb.  The
> original packets can be reconstructed on transmit (usually through TSO,
> otherwise through GSO).

Thanks I'd been wondering if that was the case.

Out of interest, does it reconstruct the exact original packets or just
one of the possible valid segmentations of the LRO SKB?

Ian.

That patch:
diff -r 52e594b04f24 drivers/xen/netback/netback.c
--- a/drivers/xen/netback/netback.c	Fri Aug 07 11:44:54 2009 +0100
+++ b/drivers/xen/netback/netback.c	Fri Aug 07 11:46:57 2009 +0100
@@ -1413,6 +1413,13 @@
 		else if (txp->flags & NETTXF_data_validated)
 			skb->ip_summed = CHECKSUM_UNNECESSARY;
 
+		/*
+                 * Workaround Windows frontends which do not set
+                 * NETTXF_csum_blank for GSO packets. (CA-31409)
+                 */
+		if (skb_shinfo(skb)->gso_type)
+			skb->ip_summed = CHECKSUM_PARTIAL;
+
 		netbk_fill_frags(netbk, skb);
 
 		skb->dev      = netif->dev;
diff -r 52e594b04f24 drivers/xen/netfront/netfront.c
--- a/drivers/xen/netfront/netfront.c	Fri Aug 07 11:44:54 2009 +0100
+++ b/drivers/xen/netfront/netfront.c	Fri Aug 07 11:46:57 2009 +0100
@@ -1436,6 +1436,13 @@
 		else if (rx->flags & NETRXF_data_validated)
 			skb->ip_summed = CHECKSUM_UNNECESSARY;
 
+		/*
+                 * Workaround Windows frontends which do not set
+                 * NETTXF_csum_blank for GSO packets. (CA-31409)
+                 */
+		if (skb_shinfo(skb)->gso_type)
+			skb->ip_summed = CHECKSUM_PARTIAL;
+
 		np->stats.rx_packets++;
 		np->stats.rx_bytes += skb->len;
 


-- 
Ian Campbell
Current Noise: Turbonegro - Babylon Forever

Conversation enriches the understanding, but solitude is the school of genius.




Reply to: