]> 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)
commit3d32ac05ddf4f9ba7b53432d4246a59e220db56d
tree3999b0c342d781d9b77fd2fb18d1ac8d353670ad
parent2681089084a59ace7a528bad1c09ffb770ca89b4
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: e66b2248cb64 ("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