xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@novell.com>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>, xen-devel@lists.xensource.com
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	[thread overview]
Message-ID: <4B84F1370200007800030EC0@vpn.id2.novell.com> (raw)
In-Reply-To: <1266943630-17002-4-git-send-email-ian.campbell@citrix.com>

Could you point out what problem this addresses?

Thanks, Jan

>>> Ian Campbell <ian.campbell@citrix.com> 23.02.10 17:47 >>>
Previously PKT_PROT_LEN would only have an effect on the first fragment.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 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)
 
 		netbk_fill_frags(skb);
 
+		/*
+		 * 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 = min_t(int, skb->len, PKT_PROT_LEN);
+			__pskb_pull_tail(skb, target - skb_headlen(skb));
+		}
+
 		skb->dev      = netif->dev;
 		skb->protocol = eth_type_trans(skb, skb->dev);
 
-- 
1.5.6.5


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com 
http://lists.xensource.com/xen-devel

  reply	other threads:[~2010-02-24  8:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-23 16:46 [GIT] netback fixes from XCP kernel tree Ian Campbell
2010-02-23 16:47 ` [PATCH 1/6] xen: netback: remove unused xen_network_done code Ian Campbell
2010-02-23 16:47 ` [PATCH 2/6] xen: netback: factor disconnect from backend into new function Ian Campbell
2010-02-23 16:47 ` [PATCH 3/6] xen: netback: wait for hotplug scripts to complete before signalling connected to frontend Ian Campbell
2010-02-23 16:47 ` [PATCH 4/6] xen/netback: Always pull through PKT_PROT_LEN bytes into the linear part of an skb Ian Campbell
2010-02-24  8:28   ` Jan Beulich [this message]
2010-02-24  8:55     ` Ian Campbell
2010-02-24  9:23       ` [PATCH 4/6] xen/netback: Always pull throughPKT_PROT_LEN " James Harper
2010-02-24  9:56         ` Ian Campbell
2010-02-23 16:47 ` [PATCH 5/6] xen/netback: try to pull a minimum of 72 bytes into the skb data area Ian Campbell
2010-02-23 17:04   ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B84F1370200007800030EC0@vpn.id2.novell.com \
    --to=jbeulich@novell.com \
    --cc=ian.campbell@citrix.com \
    --cc=jeremy@goop.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).