Message ID | 0cc9050e196366c1387ab5ee47f1cee8ecde9c86.1709901020.git.petrm@nvidia.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 79fa52145e19803ed47bd5f2136c19c5e16f512d |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | mlxsw: Support for nexthop group statistics | expand |
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c index 2df95b5a444f..a724484614ab 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c @@ -3157,6 +3157,9 @@ int mlxsw_sp_nexthop_counter_enable(struct mlxsw_sp *mlxsw_sp, struct devlink *devlink; int err; + if (nh->counter_valid) + return 0; + devlink = priv_to_devlink(mlxsw_sp->core); if (!devlink_dpipe_table_counter_enabled(devlink, MLXSW_SP_DPIPE_TABLE_NAME_ADJ))