OSDN Git Service

mlxsw: spectrum_qdisc: Ignore grafting of invisible FIFO
authorPetr Machata <petrm@mellanox.com>
Mon, 6 Jan 2020 18:01:55 +0000 (18:01 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 12 Jan 2020 11:17:28 +0000 (12:17 +0100)
commit741cf884069e8260c6ec9a1e7dcc5fe516867a60
treea4493fef4a985232bc24d7eac58f670aaddd5f9c
parenta98672dd8f79028e19554186658d2dc9010118c5
mlxsw: spectrum_qdisc: Ignore grafting of invisible FIFO

[ Upstream commit 3971a535b839489e4ea31796cc086e6ce616318c ]

The following patch will change PRIO to replace a removed Qdisc with an
invisible FIFO, instead of NOOP. mlxsw will see this replacement due to the
graft message that is generated. But because FIFO does not issue its own
REPLACE message, when the graft operation takes place, the Qdisc that mlxsw
tracks under the indicated band is still the old one. The child
handle (0:0) therefore does not match, and mlxsw rejects the graft
operation, which leads to an extack message:

    Warning: Offloading graft operation failed.

Fix by ignoring the invisible children in the PRIO graft handler. The
DESTROY message of the removed Qdisc is going to follow shortly and handle
the removal.

Fixes: 32dc5efc6cb4 ("mlxsw: spectrum: qdiscs: prio: Handle graft command")
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>
drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c