net/mlx5e: Update and set Xon/Xoff upon port speed set

Xon/Xoff sizes are derived from calculations that include
the port speed.
These settings need to be updated and applied whenever the
port speed is changed.
The port speed is typically set after the physical link goes down
and is negotiated as part of the link-up process between the two
connected interfaces.
Xon/Xoff parameters being updated at the point where the new
negotiated speed is established.

Fixes: 0696d60853 ("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-11-mbloch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Alexei Lazar 2025-08-25 17:34:33 +03:00 committed by Jakub Kicinski
parent ceddedc969
commit d24341740f
1 changed files with 2 additions and 0 deletions

View File

@ -139,6 +139,8 @@ void mlx5e_update_carrier(struct mlx5e_priv *priv)
if (up) { if (up) {
netdev_info(priv->netdev, "Link up\n"); netdev_info(priv->netdev, "Link up\n");
netif_carrier_on(priv->netdev); netif_carrier_on(priv->netdev);
mlx5e_port_manual_buffer_config(priv, 0, priv->netdev->mtu,
NULL, NULL, NULL);
} else { } else {
netdev_info(priv->netdev, "Link down\n"); netdev_info(priv->netdev, "Link down\n");
netif_carrier_off(priv->netdev); netif_carrier_off(priv->netdev);