Skip to content

Commit

Permalink
net/mlx5e: Add error print in ETS init
Browse files Browse the repository at this point in the history
ETS initialization might fail, add a print to indicate
such failures.

Fixes: 08fb1da ("net/mlx5e: Support DCBNL IEEE ETS")
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
  • Loading branch information
Tariq Toukan authored and Saeed Mahameed committed Jan 12, 2018
1 parent e556f6d commit 97c8c3a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
Original file line number Diff line number Diff line change
Expand Up @@ -922,8 +922,9 @@ static void mlx5e_dcbnl_query_dcbx_mode(struct mlx5e_priv *priv,

static void mlx5e_ets_init(struct mlx5e_priv *priv)
{
int i;
struct ieee_ets ets;
int err;
int i;

if (!MLX5_CAP_GEN(priv->mdev, ets))
return;
Expand All @@ -940,7 +941,10 @@ static void mlx5e_ets_init(struct mlx5e_priv *priv)
ets.prio_tc[0] = 1;
ets.prio_tc[1] = 0;

mlx5e_dcbnl_ieee_setets_core(priv, &ets);
err = mlx5e_dcbnl_ieee_setets_core(priv, &ets);
if (err)
netdev_err(priv->netdev,
"%s, Failed to init ETS: %d\n", __func__, err);
}

enum {
Expand Down

0 comments on commit 97c8c3a

Please sign in to comment.