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)
commit93d8a4c1b5f55855ae3ef7063ce79af13212f96f
treeb5ce274ec5fddee527cc5195f4dba2c6098eb18a
parent46a3615be43631fc804b179cbfeabded8c3a7a5d
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