summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-05-18 16:11:32 -0400
committerDavid S. Miller <davem@davemloft.net>2017-05-18 16:11:32 -0400
commitc6cd850d6568872f66fc4a4582f34f9b910066ca (patch)
treee9a6370f7b0ce110e2916a6288a8fb0ee8323e37 /drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c
parent27902f08065ba61514c331b7d6e85635c1655d82 (diff)
parent8b4822de59d5d9919b9b045183a36c673ce20b73 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c
index 096212d6cd65..af2c65a3fd9f 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c
@@ -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);