mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-03 15:51:40 -04:00
net/mlx4_en: Fix UP limit in ieee_ets->prio_tc
User priority limit has to be less than MLX4_EN_NUM_UP. Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
80cbfd3695
commit
fd8daa45f2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user