netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	linux-kernel@vger.kernel.org, Jamal Hadi Salim <jhs@mojatatu.com>,
	netdev@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] Revert "net: sched: drop all special handling of tx_queue_len == 0"
Date: Wed, 17 Feb 2016 14:58:47 +0100	[thread overview]
Message-ID: <20160217135847.GB23205@orbyte.nwl.cc> (raw)
In-Reply-To: <1027362736.325.1455717462229.JavaMail.zimbra@efficios.com>

On Wed, Feb 17, 2016 at 01:57:42PM +0000, Mathieu Desnoyers wrote:
> ----- On Feb 17, 2016, at 7:47 AM, Phil Sutter phil@nwl.cc wrote:
> 
> > Hi,
> > 
> > On Tue, Feb 16, 2016 at 07:56:23PM -0500, Mathieu Desnoyers wrote:
> >> This reverts commit 348e3435cbefa815bd56a5205c1412b5afe7b92e.
> >> It breaks HTB classful qdiscs on the loopback interface.
> >> 
> >> It has been broken since kernel v4.2. The offending commit has
> >> been identified by bissection of the issue with the following
> >> test-case. It appears that the loopback interface does indeed
> >> still have tx_queue_len == 0.
> >> 
> >> Reverting the commit on a v4.4.1 kernel fixes the issue.
> > 
> > Indeed, this is ugly. Affected are all drivers not calling ether_setup()
> > in their setup callback, and therefore not initializing tx_queue_len.
> > 
> > As the commit to be reverted shows, there is no common fallback value
> > for tx_queue_len - most qdisc implementations used 1, but HTB fell back
> > to 2 and PLUG to 100. But as the removed comment in sch_plug.c stated:
> > 
> >| /* We will set a default limit of 100 pkts (~150kB)
> >|  * in case tx_queue_len is not available. The
> >|  * default value is completely arbitrary.
> >|  */
> > 
> > It seems not to be overly important to fallback to the exact value each
> > qdisc had before. Therefore I guess the following change should
> > appropriately fix the issue at hand:
> > 
> > --- a/net/core/dev.c
> > +++ b/net/core/dev.c
> > @@ -7440,8 +7440,10 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv,
> > const char *name,
> >        dev->priv_flags = IFF_XMIT_DST_RELEASE | IFF_XMIT_DST_RELEASE_PERM;
> >        setup(dev);
> > 
> > -       if (!dev->tx_queue_len)
> > +       if (!dev->tx_queue_len) {
> >                dev->priv_flags |= IFF_NO_QUEUE;
> > +               dev->tx_queue_len = 1;
> > +       }
> > 
> >        dev->num_tx_queues = txqs;
> >        dev->real_num_tx_queues = txqs;
> > 
> > Unless there is concern, I will formally submit this later.
> 
> Works for me!
> 
> Tested-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

Cool, thanks for testing!

Cheers, Phil

  reply	other threads:[~2016-02-17 13:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-17  0:56 [PATCH] Revert "net: sched: drop all special handling of tx_queue_len == 0" Mathieu Desnoyers
2016-02-17 12:47 ` Phil Sutter
2016-02-17 13:57   ` Mathieu Desnoyers
2016-02-17 13:58     ` Phil Sutter [this message]
2016-02-17 14:37     ` [net PATCH] IFF_NO_QUEUE: Fix for drivers not calling ether_setup() Phil Sutter
2016-02-18 19:57       ` David Miller

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=20160217135847.GB23205@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --cc=davem@davemloft.net \
    --cc=jhs@mojatatu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=netdev@vger.kernel.org \
    --cc=stable@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).