mlxsw: spectrum_router: Add helpers for nexthop counters
authorPetr Machata <petrm@nvidia.com>
Fri, 8 Mar 2024 12:59:51 +0000 (13:59 +0100)
committerJakub Kicinski <kuba@kernel.org>
Mon, 11 Mar 2024 21:14:08 +0000 (14:14 -0700)
commit10bf92fd775ec2c6af1127c04e54e5b7ad0d35de
tree3e751dc803e9dca90ea3e63073d6aa7dac7cb2ca
parent79fa52145e19803ed47bd5f2136c19c5e16f512d
mlxsw: spectrum_router: Add helpers for nexthop counters

The next patch will add the ability to share nexthop counters among
mlxsw nexthops backed by the same core nexthop. To have a place to store
reference count, the counter should be kept in a dedicated structure. In
this patch, introduce the structure together with the related helpers, sans
the refcount, which comes in the next patch.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://lore.kernel.org/r/61f23fa4f8c5d7879f68dacd793d8ab7425f33c0.1709901020.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c