netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@gmail.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: James Huang <jamesclhuang@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org
Subject: Re: [PATCH] Re: skb_segment() questions
Date: Wed, 1 Apr 2009 09:50:50 +0000	[thread overview]
Message-ID: <20090401095049.GB5970@ff.dom.local> (raw)
In-Reply-To: <20090401092457.GB19847@gondor.apana.org.au>

On Wed, Apr 01, 2009 at 05:24:57PM +0800, Herbert Xu wrote:
> On Wed, Apr 01, 2009 at 09:18:01AM +0000, Jarek Poplawski wrote:
> >
> > gso: Fix support for linear packets 2
> > 
> > The previous fix removed a check, which should be useful, only a bit
> > later, by skipping at least two similar checks and three useless
> > assignments in case a header is (still) copied.
> > 
> > Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
> > ---
> > 
> >  net/core/skbuff.c |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> > 
> > diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> > index ce6356c..2123a92 100644
> > --- a/net/core/skbuff.c
> > +++ b/net/core/skbuff.c
> > @@ -2594,6 +2594,8 @@ struct sk_buff *skb_segment(struct sk_buff *skb, int features)
> >  
> >  		skb_copy_from_linear_data_offset(skb, offset,
> >  						 skb_put(nskb, hsize), hsize);
> > +		if (pos >= offset + len)
> > +			continue;
> >  
> >  		while (pos < offset + len && i < nfrags) {
> >  			*frag = skb_shinfo(skb)->frags[i];
> 
> The common case (non-linear skb) is going to fail that check so 
> I'm no sure if it's warranted.

I guess you mean non-linear skb with a header smaller than mtu? Well,
if it's the most common case now, I agree.

Thanks,
Jarek P.

  reply	other threads:[~2009-04-01  9:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <f0ed9b110903041912v6fba381fm4da792d49b1cbb91@mail.gmail.com>
2009-03-29  2:07 ` skb_segment() questions Herbert Xu
2009-03-29  6:39   ` David Miller
2009-03-30  8:50     ` Mark McLoughlin
2009-03-30 20:57       ` David Miller
2009-04-20 11:12         ` Mark McLoughlin
2009-04-20 11:57           ` David Miller
2009-04-01  9:18   ` [PATCH] " Jarek Poplawski
2009-04-01  9:24     ` Herbert Xu
2009-04-01  9:50       ` Jarek Poplawski [this message]
2009-04-01  9:53         ` Herbert Xu
2009-04-01 10:02           ` Jarek Poplawski

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=20090401095049.GB5970@ff.dom.local \
    --to=jarkao2@gmail.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=jamesclhuang@gmail.com \
    --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).