Skip to contentSkip to conversation

net/mlx5: fix flow discover IPv6 traffic class support issue

PATCH In review Gavin Li 2 participants 2 messages May 30, 2024 – Jun 3, 2024 Network drivers

lore
Share & tools
lore

Gavin Li

author
#0 lore raw

PATCH 1/1 net/mlx5: fix flow discover IPv6 traffic class support issue

ipv6_tc_fallback will be checked in calling mlx5_flow_discover_ipv6_tc_support. It should be set "supported" before checking so that the workaround to use old value would not be used. The corrected result could be gotten only in this case.

Fixes edc80bbfcf54 ("net/mlx5: store IPv6 TC detection result per physical device")
---
 drivers/net/mlx5/linux/mlx5_os.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/mlx5/linux/mlx5_os.c +1 -2
index 6dd12f0f68..de3df17108 100644
@@ -1603,11 +1603,10 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 	}
 	rte_rwlock_init(&priv->ind_tbls_lock);
 	if (sh->phdev->config.ipv6_tc_fallback == MLX5_IPV6_TC_UNKNOWN) {
+		sh->phdev->config.ipv6_tc_fallback = MLX5_IPV6_TC_OK;
 		if (!sh->cdev->config.hca_attr.modify_outer_ipv6_traffic_class ||
 		    (sh->config.dv_flow_en == 1 && mlx5_flow_discover_ipv6_tc_support(eth_dev)))
 			sh->phdev->config.ipv6_tc_fallback = MLX5_IPV6_TC_FALLBACK;
-		else
-			sh->phdev->config.ipv6_tc_fallback = MLX5_IPV6_TC_OK;
 	}
 	if (priv->sh->config.dv_flow_en == 2) {
 #ifdef HAVE_MLX5_HWS_SUPPORT
Signature · 1 line
2.34.1
Acked-by Suanming Mou on v1 1/1
#1 lore raw

Hi,

From: Minggang(Gavin) Li <[email protected]>
Sent: Thursday, May 30, 2024 6:42 AM
To: Matan Azrad; Slava Ovsiienko; Ori Kam; NBU-Contact-Thomas Monjalon (EXTERNAL); Dariusz Sosnowski; Suanming Mou
Cc: [email protected]; Raslan Darawsheh; [email protected]
Subject: [PATCH] net/mlx5: fix flow discover IPv6 traffic class support issue

ipv6_tc_fallback will be checked in calling mlx5_flow_discover_ipv6_tc_support. It should be set "supported" before checking so that the workaround to use old value would not be used. The corrected result could be gotten only in this case.

Fixes edc80bbfcf54 ("net/mlx5: store IPv6 TC detection result per physical device")

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh