All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@nvidia.com>
To: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, Mark Bloch <mbloch@nvidia.com>,
	Maor Gottlieb <maorg@nvidia.com>,
	Saeed Mahameed <saeedm@nvidia.com>
Subject: [net 15/15] net/mlx5: Fix matching on inner TTC
Date: Wed,  4 May 2022 00:02:56 -0700	[thread overview]
Message-ID: <20220504070256.694458-16-saeedm@nvidia.com> (raw)
In-Reply-To: <20220504070256.694458-1-saeedm@nvidia.com>

From: Mark Bloch <mbloch@nvidia.com>

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: 4c71ce50d2fe ("net/mlx5: Support partial TTC rules")
Fixes: 8e25a2bc6687 ("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 | 2 +-
 drivers/net/ethernet/mellanox/mlx5/core/lib/fs_ttc.c   | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag/port_sel.c b/drivers/net/ethernet/mellanox/mlx5/core/lag/port_sel.c
index a6592f9c3c05..5be322528279 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lag/port_sel.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lag/port_sel.c
@@ -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);
 
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/fs_ttc.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/fs_ttc.c
index b63dec24747a..b78f2ba25c19 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lib/fs_ttc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/fs_ttc.c
@@ -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,
-- 
2.35.1


      parent reply	other threads:[~2022-05-04  7:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-04  7:02 [pull request][net 00/15] mlx5 fixes 2022-05-03 Saeed Mahameed
2022-05-04  7:02 ` [net 01/15] net/mlx5e: Fix wrong source vport matching on tunnel rule Saeed Mahameed
2022-05-04 10:10   ` patchwork-bot+netdevbpf
2022-05-04  7:02 ` [net 02/15] net/mlx5: Fix slab-out-of-bounds while reading resource dump menu Saeed Mahameed
2022-05-04  7:02 ` [net 03/15] net/mlx5e: Don't match double-vlan packets if cvlan is not set Saeed Mahameed
2022-05-04  7:02 ` [net 04/15] net/mlx5e: Fix the calling of update_buffer_lossy() API Saeed Mahameed
2022-05-04  7:02 ` [net 05/15] net/mlx5e: Lag, Fix use-after-free in fib event handler Saeed Mahameed
2022-05-04  7:02 ` [net 06/15] net/mlx5e: Lag, Fix fib_info pointer assignment Saeed Mahameed
2022-05-04  7:02 ` [net 07/15] net/mlx5e: Lag, Don't skip fib events on current dst Saeed Mahameed
2022-05-04  7:02 ` [net 08/15] net/mlx5e: TC, Fix ct_clear overwriting ct action metadata Saeed Mahameed
2022-05-04  7:02 ` [net 09/15] net/mlx5e: TC, fix decap fallback to uplink when int port not supported Saeed Mahameed
2022-05-04  7:02 ` [net 10/15] net/mlx5e: CT: Fix queued up restore put() executing after relevant ft release Saeed Mahameed
2022-05-04  7:02 ` [net 11/15] net/mlx5e: Avoid checking offload capability in post_parse action Saeed Mahameed
2022-05-04  7:02 ` [net 12/15] net/mlx5e: Fix trust state reset in reload Saeed Mahameed
2022-05-04  7:02 ` [net 13/15] net/mlx5: Fix deadlock in sync reset flow Saeed Mahameed
2022-05-04  7:02 ` [net 14/15] net/mlx5: Avoid double clear or set of sync reset requested Saeed Mahameed
2022-05-04  7:02 ` Saeed Mahameed [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220504070256.694458-16-saeedm@nvidia.com \
    --to=saeedm@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=maorg@nvidia.com \
    --cc=mbloch@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.