diff mbox series

[net,1/5] net/mlx5: Fix HW spec violation configuring uplink

Message ID 20210407040620.96841-2-saeed@kernel.org
State New
Headers show
Series mlx5 fixes 2021-04-06 | expand

Commit Message

Saeed Mahameed April 7, 2021, 4:06 a.m. UTC
From: Eli Cohen <elic@nvidia.com>

Make sure to modify uplink port to follow only if the uplink_follow
capability is set as required by the HW spec. Failure to do so causes
traffic to the uplink representor net device to cease after switching to
switchdev mode.

Fixes: 7d0314b11cdd ("net/mlx5e: Modify uplink state on interface up/down")
Signed-off-by: Eli Cohen <elic@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org April 7, 2021, 10 p.m. UTC | #1
Hello:

This series was applied to netdev/net.git (refs/heads/master):

On Tue,  6 Apr 2021 21:06:16 -0700 you wrote:
> From: Eli Cohen <elic@nvidia.com>
> 
> Make sure to modify uplink port to follow only if the uplink_follow
> capability is set as required by the HW spec. Failure to do so causes
> traffic to the uplink representor net device to cease after switching to
> switchdev mode.
> 
> [...]

Here is the summary with links:
  - [net,1/5] net/mlx5: Fix HW spec violation configuring uplink
    https://git.kernel.org/netdev/net/c/1a73704c82ed
  - [net,2/5] net/mlx5: Fix placement of log_max_flow_counter
    https://git.kernel.org/netdev/net/c/a14587dfc5ad
  - [net,3/5] net/mlx5: Fix PPLM register mapping
    https://git.kernel.org/netdev/net/c/ce28f0fd670d
  - [net,4/5] net/mlx5: Fix PBMC register mapping
    https://git.kernel.org/netdev/net/c/534b1204ca46
  - [net,5/5] net/mlx5: fix kfree mismatch in indir_table.c
    https://git.kernel.org/netdev/net/c/d5f9b005c306

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
index a132fff7a980..8d39bfee84a9 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
@@ -1107,8 +1107,9 @@  static void mlx5e_uplink_rep_enable(struct mlx5e_priv *priv)
 
 	mlx5e_rep_tc_enable(priv);
 
-	mlx5_modify_vport_admin_state(mdev, MLX5_VPORT_STATE_OP_MOD_UPLINK,
-				      0, 0, MLX5_VPORT_ADMIN_STATE_AUTO);
+	if (MLX5_CAP_GEN(mdev, uplink_follow))
+		mlx5_modify_vport_admin_state(mdev, MLX5_VPORT_STATE_OP_MOD_UPLINK,
+					      0, 0, MLX5_VPORT_ADMIN_STATE_AUTO);
 	mlx5_lag_add(mdev, netdev);
 	priv->events_nb.notifier_call = uplink_rep_async_event;
 	mlx5_notifier_register(mdev, &priv->events_nb);