OSDN Git Service

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)
commit562ffbc4b3eb2fa8cd8eac1f22bc264dbbeb9a16
tree977edafe8aa4a3c66151e422bdcea332e5c4c0d8
parentcba7158ff1600f4ca8d752f41046d97800d9508e
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