mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-11 11:30:57 -04:00
mlxsw: spectrum_router: Track NH ID's of group members
The core interfaces for collecting per-NH statistics are built around nexthops even for resilient groups. Because mlxsw models each bucket as a nexthop, the core next hop that a given bucket contributes to needs to be looked up. In order to be able to match the two up, we need to track nexthop ID for members of group nexthop objects. For simplicity, do it for all nexthop objects, not just group members. Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://lore.kernel.org/r/184ceb6b154e08f5bcf116a705b0fcb01c31895c.1709901020.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
10bf92fd77
commit
41acb5549e
@@ -3083,6 +3083,7 @@ struct mlxsw_sp_nexthop {
|
||||
struct mlxsw_sp_ipip_entry *ipip_entry;
|
||||
};
|
||||
struct mlxsw_sp_nexthop_counter *counter;
|
||||
u32 id; /* NH ID for members of a NH object group. */
|
||||
};
|
||||
|
||||
static struct net_device *
|
||||
@@ -5054,6 +5055,7 @@ mlxsw_sp_nexthop_obj_init(struct mlxsw_sp *mlxsw_sp,
|
||||
mlxsw_sp_nexthop_counter_enable(mlxsw_sp, nh);
|
||||
list_add_tail(&nh->router_list_node, &mlxsw_sp->router->nexthop_list);
|
||||
nh->ifindex = dev->ifindex;
|
||||
nh->id = nh_obj->id;
|
||||
|
||||
err = mlxsw_sp_nexthop_type_init(mlxsw_sp, nh, dev);
|
||||
if (err)
|
||||
|
||||
Reference in New Issue
Block a user