]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: qdiscs: Support stats for PRIO qdisc
authorNogah Frankel <nogahf@mellanox.com>
Sun, 14 Jan 2018 11:33:17 +0000 (12:33 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 14 Jan 2018 17:21:12 +0000 (12:21 -0500)
commit505527a87cb3428812ebd04ae42859b8f79bbcde
treeb5ce274ec5fddee527cc5195f4dba2c6098eb18a
parentd611dd8f6b1b6bc8ea8a5b06cac3bb792dd321eb
mlxsw: spectrum: qdiscs: Support stats for PRIO qdisc

Support basic stats for PRIO qdisc, which includes tx packets and bytes
count, drops count and backlog size. The rest of the stats are irrelevant
for this qdisc offload.
Since backlog is not only incremental but reflecting momentary value, in
case of a qdisc that stops being offloaded but is not destroyed, backlog
value needs to be updated about the un-offloading.
For that reason an unoffload function is being added to the ops struct.

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