Commit 8520fa57 authored by Vlad Buslov's avatar Vlad Buslov Committed by Saeed Mahameed

net/mlx5e: Create q counters on uplink representors

Q counters were disabled for all types of representors to prevent an issue
where there is not enough resources to init q counters for 127 representor
instances. Enable q counters only for uplink representors to support
"rx_out_of_buffer", "rx_if_down_packets" counters in ethtool.
Signed-off-by: default avatarVlad Buslov <vladbu@mellanox.com>
Reviewed-by: default avatarRoi Dayan <roid@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent 8a236b15
...@@ -1716,6 +1716,23 @@ static void mlx5e_cleanup_rep_rx(struct mlx5e_priv *priv) ...@@ -1716,6 +1716,23 @@ static void mlx5e_cleanup_rep_rx(struct mlx5e_priv *priv)
mlx5e_close_drop_rq(&priv->drop_rq); mlx5e_close_drop_rq(&priv->drop_rq);
} }
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;
}
static void mlx5e_cleanup_ul_rep_rx(struct mlx5e_priv *priv)
{
mlx5e_destroy_q_counters(priv);
mlx5e_cleanup_rep_rx(priv);
}
static int mlx5e_init_uplink_rep_tx(struct mlx5e_rep_priv *rpriv) static int mlx5e_init_uplink_rep_tx(struct mlx5e_rep_priv *rpriv)
{ {
struct mlx5_rep_uplink_priv *uplink_priv; struct mlx5_rep_uplink_priv *uplink_priv;
...@@ -1921,8 +1938,8 @@ static const struct mlx5e_profile mlx5e_rep_profile = { ...@@ -1921,8 +1938,8 @@ static const struct mlx5e_profile mlx5e_rep_profile = {
static const struct mlx5e_profile mlx5e_uplink_rep_profile = { static const struct mlx5e_profile mlx5e_uplink_rep_profile = {
.init = mlx5e_init_rep, .init = mlx5e_init_rep,
.cleanup = mlx5e_cleanup_rep, .cleanup = mlx5e_cleanup_rep,
.init_rx = mlx5e_init_rep_rx, .init_rx = mlx5e_init_ul_rep_rx,
.cleanup_rx = mlx5e_cleanup_rep_rx, .cleanup_rx = mlx5e_cleanup_ul_rep_rx,
.init_tx = mlx5e_init_rep_tx, .init_tx = mlx5e_init_rep_tx,
.cleanup_tx = mlx5e_cleanup_rep_tx, .cleanup_tx = mlx5e_cleanup_rep_tx,
.enable = mlx5e_uplink_rep_enable, .enable = mlx5e_uplink_rep_enable,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment