]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: qdiscs: Add an ops struct
authorNogah Frankel <nogahf@mellanox.com>
Wed, 10 Jan 2018 14:00:04 +0000 (15:00 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Jan 2018 21:07:41 +0000 (16:07 -0500)
commitc99db8e52de225dda1c8ffc617c74d1cb232471f
tree977edafe8aa4a3c66151e422bdcea332e5c4c0d8
parentb111edf9deceb20e0bea2da478d03e21d53e8d93
mlxsw: spectrum: qdiscs: Add an ops struct

Qdisc struct have the Qdisc_class_ops struct.
This patch introduces the similar ops struct for the mlxsw_sp_qdisc_ops
struct. It allows better readability as well as code reusability for the
common parts of some functions like destroy.
The first operations to be added are the statistics getters.

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