All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: netdev@vger.kernel.org, Sander Eikelenboom <linux@eikelenboom.it>,
	annie li <annie.li@oracle.com>,
	xen-devel@lists.xensource.com
Subject: Re: [PATCH] xen/netfront: improve truesize tracking
Date: Tue, 18 Dec 2012 09:10:48 -0500	[thread overview]
Message-ID: <20121218141048.GC4518@phenom.dumpdata.com> (raw)
In-Reply-To: <1355838711-5473-1-git-send-email-ian.campbell@citrix.com>

On Tue, Dec 18, 2012 at 01:51:51PM +0000, Ian Campbell wrote:
> Using RX_COPY_THRESHOLD is incorrect if the SKB is actually smaller
> than that. We have already accounted for this in
> NETFRONT_SKB_CB(skb)->pull_to so use that instead.
> 
> Fixes WARN_ON from skb_try_coalesce.

This should probably be also on the stable tree for 3.7 at least?

> 
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> Cc: Sander Eikelenboom <linux@eikelenboom.it>
  ^^ - Reported-by: 

> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
  ^^ - Acked-by:

> Cc: annie li <annie.li@oracle.com>
> Cc: xen-devel@lists.xensource.com
> Cc: netdev@vger.kernel.org
> Cc: stable@kernel.org # 3.7.x only
> ---
>  drivers/net/xen-netfront.c |   15 +++++----------
>  1 files changed, 5 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
> index caa0110..b06ef81 100644
> --- a/drivers/net/xen-netfront.c
> +++ b/drivers/net/xen-netfront.c
> @@ -971,17 +971,12 @@ err:
>  		 * overheads. Here, we add the size of the data pulled
>  		 * in xennet_fill_frags().
>  		 *
> -		 * We also adjust for any unused space in the main
> -		 * data area by subtracting (RX_COPY_THRESHOLD -
> -		 * len). This is especially important with drivers
> -		 * which split incoming packets into header and data,
> -		 * using only 66 bytes of the main data area (see the
> -		 * e1000 driver for example.)  On such systems,
> -		 * without this last adjustement, our achievable
> -		 * receive throughout using the standard receive
> -		 * buffer size was cut by 25%(!!!).
> +		 * We also adjust for the __pskb_pull_tail done in
> +		 * handle_incoming_queue which pulls data from the
> +		 * frags into the head area, which is already
> +		 * accounted in RX_COPY_THRESHOLD.
>  		 */
> -		skb->truesize += skb->data_len - RX_COPY_THRESHOLD;
> +		skb->truesize += skb->data_len - NETFRONT_SKB_CB(skb)->pull_to;
>  		skb->len += skb->data_len;
>  
>  		if (rx->flags & XEN_NETRXF_csum_blank)
> -- 
> 1.7.2.5
> 

  reply	other threads:[~2012-12-18 14:10 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-18 13:51 [PATCH] xen/netfront: improve truesize tracking Ian Campbell
2012-12-18 13:51 ` Ian Campbell
2012-12-18 14:10 ` Konrad Rzeszutek Wilk [this message]
2012-12-18 14:15   ` Ian Campbell
2012-12-18 15:12 ` Eric Dumazet
2012-12-18 15:26   ` Ian Campbell
2012-12-18 16:13     ` Eric Dumazet
2012-12-18 16:22       ` Ian Campbell
2012-12-18 16:35         ` Eric Dumazet
2012-12-19 11:34     ` Sander Eikelenboom
2012-12-19 16:17       ` Eric Dumazet
2012-12-20 12:51         ` Sander Eikelenboom
2012-12-20 14:23           ` [Xen-devel] " Sander Eikelenboom
2012-12-20 14:58             ` Sander Eikelenboom
2012-12-20 15:39           ` Eric Dumazet
2012-12-21 11:21             ` Sander Eikelenboom
2012-12-21 18:33               ` Rick Jones
2013-01-03 20:40                 ` Sander Eikelenboom
2013-01-07 13:41                   ` Ian Campbell
2013-01-07 14:11                     ` Sander Eikelenboom
2013-01-07 14:22                       ` Ian Campbell
2013-01-07 15:26                         ` Eric Dumazet
2013-01-07 16:17                     ` Eric Dumazet

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=20121218141048.GC4518@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=annie.li@oracle.com \
    --cc=ian.campbell@citrix.com \
    --cc=linux@eikelenboom.it \
    --cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.