mlxsw: spectrum: qdiscs: Update backlog handling of a child qdiscs
authorNogah Frankel <nogahf@mellanox.com>
Wed, 28 Feb 2018 09:45:02 +0000 (10:45 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Feb 2018 17:06:00 +0000 (12:06 -0500)
commit89218b469867f80e503262839f5b35ebcdbb2f83
tree875c6581cb786de732cdffb5e0c41a1643c33f3c
parent3f5e9ea8a78f4fe1eb01eacc409eb54c2607df43
mlxsw: spectrum: qdiscs: Update backlog handling of a child qdiscs

When removing a child qdisc its backlog will be decreased from the parent
backlog. The driver backlog count should do the same.
When the parent changes its configuration, the child might need to clean
its stats. However, the backlog can't be cleaned with the rest of the
stats, because it reflects a momentary value that needs to be synced with
the core, not the history of the qdisc.

Signed-off-by: Nogah Frankel <nogahf@mellanox.com>
Reviewed-by: Yuval Mintz <yuvalm@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c