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)
commitcc6e5c13af8b592cfed49f4854eddddbb58c6949
tree875c6581cb786de732cdffb5e0c41a1643c33f3c
parent04cc0bf5d6ceb0ff19e8636fb39695620e587b06
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