]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net/mlx5: Fix matching on inner TTC
authorMark Bloch <mbloch@nvidia.com>
Sun, 10 Apr 2022 11:58:05 +0000 (11:58 +0000)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 4 May 2022 07:00:07 +0000 (00:00 -0700)
The cited commits didn't use proper matching on inner TTC
as a result distribution of encapsulated packets wasn't symmetric
between the physical ports.

Fixes: 258b67acb879 ("net/mlx5: Support partial TTC rules")
Fixes: 3044470c1312 ("net/mlx5: Lag, add support to create TTC tables for LAG port selection")
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Reviewed-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/lag/port_sel.c
drivers/net/ethernet/mellanox/mlx5/core/lib/fs_ttc.c

index a6592f9c3c05fc8d2c38f9ea491e3360e9527e80..5be322528279a3c13ba4255d41538a73aa6f1df2 100644 (file)
@@ -505,7 +505,7 @@ static int mlx5_lag_create_inner_ttc_table(struct mlx5_lag *ldev)
        struct ttc_params ttc_params = {};
 
        mlx5_lag_set_inner_ttc_params(ldev, &ttc_params);
-       port_sel->inner.ttc = mlx5_create_ttc_table(dev, &ttc_params);
+       port_sel->inner.ttc = mlx5_create_inner_ttc_table(dev, &ttc_params);
        if (IS_ERR(port_sel->inner.ttc))
                return PTR_ERR(port_sel->inner.ttc);
 
index b63dec24747ab618ebe2e478bbb0219afc6a5003..b78f2ba25c19bf69821e6708f42ee5b173e04ef3 100644 (file)
@@ -408,6 +408,8 @@ static int mlx5_generate_inner_ttc_table_rules(struct mlx5_core_dev *dev,
        for (tt = 0; tt < MLX5_NUM_TT; tt++) {
                struct mlx5_ttc_rule *rule = &rules[tt];
 
+               if (test_bit(tt, params->ignore_dests))
+                       continue;
                rule->rule = mlx5_generate_inner_ttc_rule(dev, ft,
                                                          &params->dests[tt],
                                                          ttc_rules[tt].etype,