From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH 4/6] xen/netback: Always pull through PKT_PROT_LEN bytes into the linear part of an skb. Date: Wed, 24 Feb 2010 08:28:23 +0000 Message-ID: <4B84F1370200007800030EC0@vpn.id2.novell.com> References: <1266943615.11737.6467.camel@zakaz.uk.xensource.com> <1266943630-17002-4-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1266943630-17002-4-git-send-email-ian.campbell@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Campbell Cc: Jeremy Fitzhardinge , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Could you point out what problem this addresses? Thanks, Jan >>> Ian Campbell 23.02.10 17:47 >>> Previously PKT_PROT_LEN would only have an effect on the first fragment. Signed-off-by: Ian Campbell --- drivers/xen/netback/netback.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/drivers/xen/netback/netback.c b/drivers/xen/netback/netback.c index 7e1dfd1..e668704 100644 --- a/drivers/xen/netback/netback.c +++ b/drivers/xen/netback/netback.c @@ -1346,6 +1346,16 @@ static void net_tx_submit(void) =20 netbk_fill_frags(skb); =20 + /* + * If the initial fragment was < PKT_PROT_LEN then + * pull through some bytes from the other fragments to + * increase the linear region to PKT_PROT_LEN bytes. + */ + if (skb_headlen(skb) < PKT_PROT_LEN && skb_is_nonlinear(skb= )) { + int target =3D min_t(int, skb->len, PKT_PROT_LEN); + __pskb_pull_tail(skb, target - skb_headlen(skb)); + } + skb->dev =3D netif->dev; skb->protocol =3D eth_type_trans(skb, skb->dev); =20 --=20 1.5.6.5 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com=20 http://lists.xensource.com/xen-devel