netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, kuba@kernel.org,
	Paul Blakey <paulb@mellanox.com>, Oz Shlomo <ozsh@mellanox.com>,
	Saeed Mahameed <saeedm@mellanox.com>
Subject: [net-next 03/14] net/mlx5: E-Switch, Skip restore modify header between prios of same chain
Date: Tue, 17 Mar 2020 19:47:11 -0700	[thread overview]
Message-ID: <20200318024722.26580-4-saeedm@mellanox.com> (raw)
In-Reply-To: <20200318024722.26580-1-saeedm@mellanox.com>

From: Paul Blakey <paulb@mellanox.com>

Restore modify header writes the chain mapping on the packet.
This modify header and action is added on all prios connections,
and gets overwritten with the same value consecutively in prios
of the same chain.

Use the chain's modify header only for the last prio of a given tc
chain.

Signed-off-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Oz Shlomo <ozsh@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 .../net/ethernet/mellanox/mlx5/core/eswitch_offloads_chains.c   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads_chains.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads_chains.c
index e1d3dc31311a..1e275a8441de 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads_chains.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads_chains.c
@@ -422,7 +422,7 @@ mlx5_esw_chains_add_miss_rule(struct fdb_chain *fdb_chain,
 	dest.type  = MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE;
 	dest.ft = next_fdb;
 
-	if (fdb_chain->chain != mlx5_esw_chains_get_ft_chain(esw) &&
+	if (next_fdb == tc_end_fdb(esw) &&
 	    fdb_modify_header_fwd_to_table_supported(esw)) {
 		act.modify_hdr = fdb_chain->miss_modify_hdr;
 		act.action |= MLX5_FLOW_CONTEXT_ACTION_MOD_HDR;
-- 
2.24.1


  parent reply	other threads:[~2020-03-18  2:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-18  2:47 [pull request][net-next 00/14] Mellanox, mlx5 updates 2020-03-17 Saeed Mahameed
2020-03-18  2:47 ` [net-next 01/14] net/mlx5: Add missing inline to stub esw_add_restore_rule Saeed Mahameed
2020-03-18  2:47 ` [net-next 02/14] net/mlx5: E-Switch: Fix using fwd and modify when firmware doesn't support it Saeed Mahameed
2020-03-18  2:47 ` Saeed Mahameed [this message]
2020-03-18  2:47 ` [net-next 04/14] net/mlx5e: CT: remove set but not used variable 'unnew' Saeed Mahameed
2020-03-18  2:47 ` [net-next 05/14] net/mlx5e: CT: Fix insert rules when TC_CT config isn't enabled Saeed Mahameed
2020-03-18  2:47 ` [net-next 06/14] net/mlx5e: CT: Fix stack usage compiler warning Saeed Mahameed
2020-03-18  2:47 ` [net-next 07/14] net/mlx5e: en_tc: Rely just on register loopback for tunnel restoration Saeed Mahameed
2020-03-18  2:47 ` [net-next 08/14] net/mlx5e: Fix rejecting all egress rules not on vlan Saeed Mahameed
2020-03-18  2:47 ` [net-next 09/14] net/mlx5e: Fix devlink port register sequence Saeed Mahameed
2020-03-18  2:47 ` [net-next 10/14] net/mlx5: Avoid configuring eswitch QoS if not supported Saeed Mahameed
2020-03-18  2:47 ` [net-next 11/14] net/mlx5: Don't use termination tables in slow path Saeed Mahameed
2020-03-18  2:47 ` [net-next 12/14] net/mlx5e: Add support for offloading traffic from uplink to uplink Saeed Mahameed
2020-03-18  2:47 ` [net-next 13/14] net/mlx5: Eswitch, enable forwarding back to uplink port Saeed Mahameed
2020-03-18  2:47 ` [net-next 14/14] net/mlx5: Avoid forwarding to other eswitch uplink Saeed Mahameed
2020-03-19  2:14 ` [pull request][net-next 00/14] Mellanox, mlx5 updates 2020-03-17 David Miller

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=20200318024722.26580-4-saeedm@mellanox.com \
    --to=saeedm@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ozsh@mellanox.com \
    --cc=paulb@mellanox.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).