netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: herbert@gondor.apana.org.au
Cc: john.r.fastabend@intel.com, netdev@vger.kernel.org
Subject: Re: [RFC PATCH] net: consolidate netif_needs_gso() checks
Date: Fri, 08 Jan 2010 01:00:49 -0800 (PST)	[thread overview]
Message-ID: <20100108.010049.218930041.davem@davemloft.net> (raw)
In-Reply-To: <20100107050721.GA2282@gondor.apana.org.au>

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Thu, 7 Jan 2010 16:07:21 +1100

> On Wed, Jan 06, 2010 at 08:34:23PM -0800, David Miller wrote:
>> From: John Fastabend <john.r.fastabend@intel.com>
>> Date: Mon, 04 Jan 2010 10:21:53 +0000
>> 
>> > netif_needs_gso() is checked twice in the TX path once,
>> > before submitting the skb to the qdisc and once after
>> > it is dequeued from the qdisc just before calling
>> > ndo_hard_start().  This opens a window for a user to
>> > change the gso/tso or tx checksum settings that can
>> > cause netif_needs_gso to be true in one check and false
>> > in the other.
>> > 
>> > Specifically, changing TX checksum setting may cause
>> > the warning in skb_gso_segment() to be triggered if
>> > the checksum is calculated earlier.
>> > 
>> > This consolidates the netif_needs_gso() calls so that
>> > the stack only checks if gso is needed after the skb
>> > is dequeued from the qdisc.  Or if the device has no
>> > queue then before dev_hard_start_xmit() in dev_queue_xmit().
>> > 
>> > Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
>> 
>> Herbert, please review.
> 
> Looks fine to me.  I have just one suggestion.  The queueless
> case also calls dev_hard_start_xmit so we should be able to
> remove the existing !need_gso code from dev_queue_xmit completely.

John, please make these changes.

Thanks.

      reply	other threads:[~2010-01-08  9:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-04 10:21 [RFC PATCH] net: consolidate netif_needs_gso() checks John Fastabend
2010-01-07  4:34 ` David Miller
2010-01-07  5:07   ` Herbert Xu
2010-01-08  9:00     ` David Miller [this message]

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=20100108.010049.218930041.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=john.r.fastabend@intel.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).