Merge branch 'mlxsw-fixes'
Jiri Pirko says: ==================== mlxsw: couple of fixes Couple of fixes from Arkadi ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
b16c4c4839
@ -199,10 +199,11 @@ static int mlxsw_sp_erif_entry_get(struct mlxsw_sp *mlxsw_sp,
|
||||
|
||||
entry->counter_valid = false;
|
||||
entry->counter = 0;
|
||||
entry->index = mlxsw_sp_rif_index(rif);
|
||||
|
||||
if (!counters_enabled)
|
||||
return 0;
|
||||
|
||||
entry->index = mlxsw_sp_rif_index(rif);
|
||||
err = mlxsw_sp_rif_counter_value_get(mlxsw_sp, rif,
|
||||
MLXSW_SP_RIF_COUNTER_EGRESS,
|
||||
&cnt);
|
||||
|
@ -206,6 +206,9 @@ void mlxsw_sp_rif_counter_free(struct mlxsw_sp *mlxsw_sp,
|
||||
{
|
||||
unsigned int *p_counter_index;
|
||||
|
||||
if (!mlxsw_sp_rif_counter_valid_get(rif, dir))
|
||||
return;
|
||||
|
||||
p_counter_index = mlxsw_sp_rif_p_counter_get(rif, dir);
|
||||
if (WARN_ON(!p_counter_index))
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user