Skip to content

Commit

Permalink
net/mlx5e: Fix q counters on uplink representors
Browse files Browse the repository at this point in the history
Need to allocate the q counters before init_rx which needs them
when creating the rq.

Fixes: 8520fa5 ("net/mlx5e: Create q counters on uplink representors")
Signed-off-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Vlad Buslov <vladbu@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
  • Loading branch information
Roi Dayan authored and Saeed Mahameed committed Apr 30, 2020
1 parent cece6f4 commit 67b38de
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
Original file line number Diff line number Diff line change
Expand Up @@ -1773,19 +1773,14 @@ static void mlx5e_cleanup_rep_rx(struct mlx5e_priv *priv)

static int mlx5e_init_ul_rep_rx(struct mlx5e_priv *priv)
{
int err = mlx5e_init_rep_rx(priv);

if (err)
return err;

mlx5e_create_q_counters(priv);
return 0;
return mlx5e_init_rep_rx(priv);
}

static void mlx5e_cleanup_ul_rep_rx(struct mlx5e_priv *priv)
{
mlx5e_destroy_q_counters(priv);
mlx5e_cleanup_rep_rx(priv);
mlx5e_destroy_q_counters(priv);
}

static int mlx5e_init_uplink_rep_tx(struct mlx5e_rep_priv *rpriv)
Expand Down

0 comments on commit 67b38de

Please sign in to comment.