All of lore.kernel.org
 help / color / mirror / Atom feed
* noqueue qdisc and non-virtual interfaces
@ 2019-03-01 12:19 Ignat Korchagin
  0 siblings, 0 replies; only message in thread
From: Ignat Korchagin @ 2019-03-01 12:19 UTC (permalink / raw)
  To: netdev; +Cc: Daniel Dao, Ivan Babrou, Frank Hofmann, Nicolae Vartolomei

Good day,

According to this link:
http://linux-tc-notes.sourceforge.net/tc/doc/sch_noqueue.txt it should
not be possible to assign noqueue qdisc to physical devices or
classes. Yet, I can clearly do it even on the latest 5.0-rc series
kernels:

$ sudo tc qdisc add dev eth0 root noqueue
$ sudo tc qdisc show dev eth0
qdisc noqueue 8005: root refcnt 385

If I understand the source correctly, noqueue qdisc was designed only
for network interfaces, which have IFF_NO_QUEUE in priv_flags in
net_device structure. However, I see no checks in the code, which
enforce it when attaching this qdisc to an interface.

I believe, it was not possible before, but commit
d66d6c3152e8d5a6db42a56bf7ae1c6cae87ba48 changed that.

Regardless, if it is intentional or not, the change is incomplete as
it introduces a potential NULL ptr dereference bug, which can be
triggered by doing something like:

dev="eth0"
sudo tc qdisc replace dev $dev root noqueue
sudo tc qdisc delete dev $dev root
sudo tc qdisc replace dev $dev root handle 1: htb default 1
sudo tc class add dev $dev parent 1: classid 1:1 htb rate 1000Gbps
sudo tc qdisc add dev $dev parent 1:1 handle 10: noqueue

I believe it should not be possible to have noqueue qdisc on physical
nics, but, please, let me know if I'm wrong.

Regards,
Ignat

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-03-01 12:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-01 12:19 noqueue qdisc and non-virtual interfaces Ignat Korchagin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.