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")
Cc: sta...@dpdk.org

Signed-off-by: Gavin Li <gav...@nvidia.com>
Acked-by: Suanming Mou <suanmi...@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 6dd12f0f68..de3df17108 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -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
-- 
2.34.1

Reply via email to