netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] net: introduce IFF_NO_QUEUE as successor of zero tx_queue_len
@ 2015-08-13 17:01 Phil Sutter
  2015-08-13 17:01 ` [PATCH 1/2] net: declare new net_device priv_flag IFF_NO_QUEUE Phil Sutter
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Phil Sutter @ 2015-08-13 17:01 UTC (permalink / raw)
  To: netdev; +Cc: brouer, alexei.starovoitov, davem, fw, cwang, eric.dumazet

This series adds a new private net_device flag indicating that a device may
(and probably should) be used without a queueing discipline attached to it.
This is already common practice for many virtual device types like e.g.
loopback, VLAN (802.1Q) or bridges (802.1D). The reason for this is that these
devices lack an underlying layer which could impose back pressure and therefore
making a TX queue necessary to not slow down senders.

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,
limiting the queue to zero packets and thus prevents any TX from happening. To
overcome this, practically all qdisc implementations intercept and sanitize the
malicious value.

With this series applied, drivers may signal the lack of need for a qdisc
without having to tamper with tx_queue_len, making fallbacks in qdiscs and
caveats in userspace unnecessary.

Upon upstream acceptance, this series will be followed up by a set of patches
converting device drivers, adding a warning so out-of-tree driver authors get
aware of this change and dropping all special handling of tx_queue_len in
net/sched/.

Phil Sutter (2):
  net: declare new net_device priv_flag IFF_NO_QUEUE
  net: sch_generic: react upon IFF_NO_QUEUE flag

 include/linux/netdevice.h | 3 +++
 net/sched/sch_generic.c   | 6 ++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

-- 
2.1.2

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-08-17 18:51 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).