netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeed@kernel.org>
To: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Eric Dumazet <edumazet@google.com>
Cc: Saeed Mahameed <saeedm@nvidia.com>,
	netdev@vger.kernel.org, Tariq Toukan <tariqt@nvidia.com>,
	Chris Mi <cmi@nvidia.com>, Roi Dayan <roid@nvidia.com>,
	Maor Dickman <maord@nvidia.com>
Subject: [net V2 04/10] net/mlx5: E-switch, Don't destroy indirect table in split rule
Date: Thu, 20 Apr 2023 18:50:51 -0700	[thread overview]
Message-ID: <20230421015057.355468-5-saeed@kernel.org> (raw)
In-Reply-To: <20230421015057.355468-1-saeed@kernel.org>

From: Chris Mi <cmi@nvidia.com>

Source port rewrite (forward to ovs internal port or statck device) isn't
supported in the rule of split action. So there is no indirect table in
split rule. The cited commit destroyes indirect table in split rule. The
indirect table for other rules will be destroyed wrongly. It will cause
traffic loss.

Fix it by removing the destroy function in split rule. And also remove
the destroy function in error flow.

Fixes: 10742efc20a4 ("net/mlx5e: VF tunnel TX traffic offloading")
Signed-off-by: Chris Mi <cmi@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
index 706746cd10af..c99d208722f5 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -760,7 +760,6 @@ mlx5_eswitch_add_fwd_rule(struct mlx5_eswitch *esw,
 	kfree(dest);
 	return rule;
 err_chain_src_rewrite:
-	esw_put_dest_tables_loop(esw, attr, 0, i);
 	mlx5_esw_vporttbl_put(esw, &fwd_attr);
 err_get_fwd:
 	mlx5_chains_put_table(chains, attr->chain, attr->prio, 0);
@@ -803,7 +802,6 @@ __mlx5_eswitch_del_rule(struct mlx5_eswitch *esw,
 	if (fwd_rule)  {
 		mlx5_esw_vporttbl_put(esw, &fwd_attr);
 		mlx5_chains_put_table(chains, attr->chain, attr->prio, 0);
-		esw_put_dest_tables_loop(esw, attr, 0, esw_attr->split_count);
 	} else {
 		if (split)
 			mlx5_esw_vporttbl_put(esw, &fwd_attr);
-- 
2.39.2


  parent reply	other threads:[~2023-04-21  1:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-21  1:50 [pull request][net V2 00/10] mlx5 fixes 2023-04-19 Saeed Mahameed
2023-04-21  1:50 ` [net V2 01/10] net/mlx5e: Don't clone flow post action attributes second time Saeed Mahameed
2023-04-22  3:50   ` patchwork-bot+netdevbpf
2023-04-21  1:50 ` [net V2 02/10] net/mlx5e: Release the label when replacing existing ct entry Saeed Mahameed
2023-04-21  1:50 ` [net V2 03/10] net/mlx5: E-switch, Create per vport table based on devlink encap mode Saeed Mahameed
2023-04-21  1:50 ` Saeed Mahameed [this message]
2023-04-21  1:50 ` [net V2 05/10] net/mlx5: Release tunnel device after tc update skb Saeed Mahameed
2023-04-21  1:50 ` [net V2 06/10] net/mlx5e: Fix error flow in representor failing to add vport rx rule Saeed Mahameed
2023-04-21  1:50 ` [net V2 07/10] Revert "net/mlx5: Remove "recovery" arg from mlx5_load_one() function" Saeed Mahameed
2023-04-21  1:50 ` [net V2 08/10] net/mlx5: Use recovery timeout on sync reset flow Saeed Mahameed
2023-04-21  1:50 ` [net V2 09/10] net/mlx5e: Nullify table pointer when failing to create Saeed Mahameed
2023-04-21  1:50 ` [net V2 10/10] Revert "net/mlx5e: Don't use termination table when redundant" Saeed Mahameed

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=20230421015057.355468-5-saeed@kernel.org \
    --to=saeed@kernel.org \
    --cc=cmi@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=maord@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=roid@nvidia.com \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).