mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 18:09:57 +00:00
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
2 changed files with 5 additions and 1 deletions
|
@ -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 a new issue