From: David Miller <davem@davemloft.net>
To: bhutchings@solarflare.com
Cc: netdev@vger.kernel.org, herbert@gondor.apana.org.au
Subject: Re: [PATCH] net: Fix GRO for multiple page fragments
Date: Fri, 17 Apr 2009 01:27:59 -0700 (PDT) [thread overview]
Message-ID: <20090417.012759.184081814.davem@davemloft.net> (raw)
In-Reply-To: <1239905060.3203.28.camel@achroite>
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Thu, 16 Apr 2009 19:04:20 +0100
> This loop over fragments in napi_fraginfo_skb() was "interesting".
>
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
> ---
> This is not tested, as only cxgb3 will currently pass in multiple
> fragments at the same time. skb_shinfo(skb)->nr_frags would already be
> 0 but it makes no sense to rely on that. I hope I'm not missing some
> subtlety...
I think the code still isn't right after your changes.
The intent seems to be to append frags from 'info' into the SKB,
so that it works even if the SKB already has some frags.
And being that cxgb3 is pretty well tested with GRO I'm suspicious
even moreso :-)
Herbert?
> diff --git a/net/core/dev.c b/net/core/dev.c
> index ea8eb22..15ecc51 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -2539,9 +2539,9 @@ struct sk_buff *napi_fraginfo_skb(struct napi_struct *napi,
> }
>
> BUG_ON(info->nr_frags > MAX_SKB_FRAGS);
> - frag = &info->frags[info->nr_frags - 1];
> + frag = info->frags;
>
> - for (i = skb_shinfo(skb)->nr_frags; i < info->nr_frags; i++) {
> + for (i = 0; i < info->nr_frags; i++) {
> skb_fill_page_desc(skb, i, frag->page, frag->page_offset,
> frag->size);
> frag++;
>
> --
> Ben Hutchings, Senior Software Engineer, Solarflare Communications
> Not speaking for my employer; that's the marketing department's job.
> They asked us to note that Solarflare product names are trademarked.
>
next prev parent reply other threads:[~2009-04-17 8:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-16 18:04 [PATCH] net: Fix GRO for multiple page fragments Ben Hutchings
2009-04-17 8:27 ` David Miller [this message]
2009-04-17 9:14 ` Herbert Xu
2009-04-17 14:03 ` Ben Hutchings
2009-04-17 14:48 ` Herbert Xu
2009-04-20 9:24 ` David Miller
2009-04-17 14:01 ` Ben Hutchings
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=20090417.012759.184081814.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=bhutchings@solarflare.com \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
/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).