net/mlx5e: Update and set Xon/Xoff upon MTU set
authorAlexei Lazar <alazar@nvidia.com>
Mon, 25 Aug 2025 14:34:32 +0000 (17:34 +0300)
committerJakub Kicinski <kuba@kernel.org>
Wed, 27 Aug 2025 01:00:27 +0000 (18:00 -0700)
commitceddedc969f0532b7c62ca971ee50d519d2bc0cb
treead3b599f87eeebbe21588bc232af792ba62501bb
parentcf9a8627b9a369ba01d37be6f71b297beb688faa
net/mlx5e: Update and set Xon/Xoff upon MTU set

Xon/Xoff sizes are derived from calculation that include the MTU size.
Set Xon/Xoff when MTU is set.
If Xon/Xoff fails, set the previous MTU.

Fixes: 0696d60853d5 ("net/mlx5e: Receive buffer configuration")
Signed-off-by: Alexei Lazar <alazar@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Link: https://patch.msgid.link/20250825143435.598584-10-mbloch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.h
drivers/net/ethernet/mellanox/mlx5/core/en_main.c