Skip to content

Commit

Permalink
net/mlx4_en: Fix UP limit in ieee_ets->prio_tc
Browse files Browse the repository at this point in the history
User priority limit has to be less than MLX4_EN_NUM_UP.

Signed-off-by: Amir Vadai <[email protected]>
Signed-off-by: Eugenia Emantayev <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
amirv authored and davem330 committed Mar 3, 2014
1 parent 80cbfd3 commit fd8daa4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static int mlx4_en_ets_validate(struct mlx4_en_priv *priv, struct ieee_ets *ets)
int has_ets_tc = 0;

for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
if (ets->prio_tc[i] > MLX4_EN_NUM_UP) {
if (ets->prio_tc[i] >= MLX4_EN_NUM_UP) {
en_err(priv, "Bad priority in UP <=> TC mapping. TC: %d, UP: %d\n",
i, ets->prio_tc[i]);
return -EINVAL;
Expand Down

0 comments on commit fd8daa4

Please sign in to comment.