From: Ian Campbell Subject: RE: [PATCH 4/6] xen/netback: Always pull throughPKT_PROT_LEN bytes into the linear part of an skb. Date: Wed, 24 Feb 2010 09:56:55 +0000 Message-ID: <1267005415.11737.7541.camel@zakaz.uk.xensource.com> References: <1266943615.11737.6467.camel@zakaz.uk.xensource.com> <1266943630-17002-4-git-send-email-ian.campbell@citrix.com> <4B84F1370200007800030EC0@vpn.id2.novell.com> <1267001738.24360.283.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: James Harper Cc: Jeremy Fitzhardinge , "xen-devel@lists.xensource.com" , Jan Beulich List-Id: xen-devel@lists.xenproject.org On Wed, 2010-02-24 at 09:23 +0000, James Harper wrote: > > > > On Wed, 2010-02-24 at 08:28 +0000, Jan Beulich wrote: > > > Could you point out what problem this addresses? > > > > It ensures that at least the TCP/IP headers will be pulled into the > > linear part of the SKB. At least skb_checksum_setup relies on this and > I > > think it is a more generic assumption in at least some parts of the > > network stack as well. The next patch increases PKT_PROT_LEN to > include > > the TCP options as well since we have observed cases where Windows > > guests with PV drivers can generate a frame with a split at the point. > > > > My PV drivers couldn't always be relied on to do this, because Windows > couldn't be relied on to do it either. I just coalesced the first buffer > to some minimum value depending on the header type. If you are doing TCP > checksum offload then you have to tell Windows that you support IP > checksum offload too - Linux doesn't support that so you have to lie to > Windows about it and calculate the IP checksum in the PV drivers, and if > you are doing that you have to have your own copy of the header anyway > so it turns out not to be a big deal. Yes, it's best if the guest takes care of this in the common case but domain 0 can't trust the guest so we need a backstop in netback too. If the guest is doing the sane thing the backstop shouldn't trigger. Ian.