]> git.ipfire.org Git - people/arne_f/kernel.git/commit
net: sch_prio: When ungrafting, replace with FIFO
authorPetr Machata <petrm@mellanox.com>
Mon, 6 Jan 2020 18:01:56 +0000 (18:01 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 12 Jan 2020 11:17:29 +0000 (12:17 +0100)
commit672d3ca2f395c8e1b92b79c03ef38953dfe79caa
treee0a9f7c00f21e0ead8905abf0cbc810d9beca6cc
parent741cf884069e8260c6ec9a1e7dcc5fe516867a60
net: sch_prio: When ungrafting, replace with FIFO

[ Upstream commit 240ce7f6428ff5188b9eedc066e1e4d645b8635f ]

When a child Qdisc is removed from one of the PRIO Qdisc's bands, it is
replaced unconditionally by a NOOP qdisc. As a result, any traffic hitting
that band gets dropped. That is incorrect--no Qdisc was explicitly added
when PRIO was created, and after removal, none should have to be added
either.

Fix PRIO by first attempting to create a default Qdisc and only falling
back to noop when that fails. This pattern of attempting to create an
invisible FIFO, using NOOP only as a fallback, is also seen in other
Qdiscs.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Petr Machata <petrm@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sched/sch_prio.c