]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Query global pause state before setting prio2buffer
authorHuy Nguyen <huyn@mellanox.com>
Fri, 6 Sep 2019 14:28:46 +0000 (09:28 -0500)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 5 Dec 2019 21:02:11 +0000 (13:02 -0800)
commit53d0d3107aa5afc86111c44c31d5f17d537b161f
tree3999b0c342d781d9b77fd2fb18d1ac8d353670ad
parent56a04c9ad5ebfa93b0cd9dad190671ba41a0a6f3
net/mlx5e: Query global pause state before setting prio2buffer

When the user changes prio2buffer mapping while global pause is
enabled, mlx5 driver incorrectly sets all active buffers
(buffer that has at least one priority mapped) to lossy.

Solution:
If global pause is enabled, set all the active buffers to lossless
in prio2buffer command.
Also, add error message when buffer size is not enough to meet
xoff threshold.

Fixes: 5fc5d852de2e ("net/mlx5e: Receive buffer configuration")
Signed-off-by: Huy Nguyen <huyn@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.c