netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Phil Sutter <phil@nwl.cc>,
	netdev@vger.kernel.org, alexei.starovoitov@gmail.com,
	davem@davemloft.net, fw@strlen.de, cwang@twopensource.com,
	eric.dumazet@gmail.com, brouer@redhat.com
Subject: Re: [PATCH 0/2] net: introduce IFF_NO_QUEUE as successor of zero tx_queue_len
Date: Thu, 13 Aug 2015 20:40:37 +0200	[thread overview]
Message-ID: <20150813204037.3c4e68a4@redhat.com> (raw)
In-Reply-To: <20150813104950.1b8346f2@urahara>

On Thu, 13 Aug 2015 10:49:50 -0700
Stephen Hemminger <stephen@networkplumber.org> wrote:

> On Thu, 13 Aug 2015 19:01:05 +0200
> Phil Sutter <phil@nwl.cc> wrote:
> 
> > Up to now, drivers being aware of the above applying to them set
> > dev->tx_queue_len to zero to indicate no qdisc should be attached to the
> > interface they drive and the kernel reacts upon this by assigning the noop
> > qdisc instead of the default pfifo_fast. This implicit agreement though leads
> > to an inconvenient situation once a user tries to attach a real qdisc to these
> > devices, as the formerly special tx_queue_len value becomes a regular one,
> 
> So this is a workaround for user ignorance by introducing kernel API complexity.
> Before user sets qdisc, why don't they set tx queue length?

Please don't insist on keeping this broke interface... how should users
know that BEFORE adding a qdisc they MUST change the _device_ tx queue
length (not zero).  Getting "back" to the original state, they MUST
change the device tx queue len back to zero BEFORE deleting the qdisc,
such that when assigning the default queue qdisc the system detects
this device can work without a qdisc.  Changing the tx queue len to
zero after the qdisc is deleted will have not effect. 

Listen to the description, that interface is broken. The kernel really
needs to hide these details from userspace.

It even allows you to misconfigure the kernel, by tricking the kernel
into assigning noqueue to physical devices that really need it.

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Sr. Network Kernel Developer at Red Hat
  Author of http://www.iptv-analyzer.org
  LinkedIn: http://www.linkedin.com/in/brouer

  reply	other threads:[~2015-08-13 18:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-13 17:01 [PATCH 0/2] net: introduce IFF_NO_QUEUE as successor of zero tx_queue_len Phil Sutter
2015-08-13 17:01 ` [PATCH 1/2] net: declare new net_device priv_flag IFF_NO_QUEUE Phil Sutter
2015-08-13 17:01   ` [PATCH 2/2] net: sch_generic: react upon IFF_NO_QUEUE flag Phil Sutter
2015-08-17  6:53     ` Jesper Dangaard Brouer
2015-08-17  6:52   ` [PATCH 1/2] net: declare new net_device priv_flag IFF_NO_QUEUE Jesper Dangaard Brouer
2015-08-13 17:49 ` [PATCH 0/2] net: introduce IFF_NO_QUEUE as successor of zero tx_queue_len Stephen Hemminger
2015-08-13 18:40   ` Jesper Dangaard Brouer [this message]
2015-08-13 19:11     ` Stephen Hemminger
2015-08-14  8:41       ` Phil Sutter
2015-08-17  6:51         ` Jesper Dangaard Brouer
2015-08-17 13:44           ` Eric Dumazet
2015-08-17 15:16             ` Jesper Dangaard Brouer
2015-08-17 18:51 ` 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=20150813204037.3c4e68a4@redhat.com \
    --to=brouer@redhat.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=cwang@twopensource.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=fw@strlen.de \
    --cc=netdev@vger.kernel.org \
    --cc=phil@nwl.cc \
    --cc=stephen@networkplumber.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).