All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Paul Blakey <paulb@nvidia.com>
Cc: netdev@vger.kernel.org, Saeed Mahameed <saeedm@nvidia.com>,
	Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Oz Shlomo <ozsh@nvidia.com>, Jiri Pirko <jiri@nvidia.com>,
	Roi Dayan <roid@nvidia.com>, Vlad Buslov <vladbu@nvidia.com>
Subject: Re: [PATCH net-next v7 6/6] net/mlx5e: TC, Set CT miss to the specific ct action instance
Date: Thu, 2 Feb 2023 13:11:57 +0200	[thread overview]
Message-ID: <Y9uafQ+6gyZFS8Wl@unreal> (raw)
In-Reply-To: <20230131091027.8093-7-paulb@nvidia.com>

On Tue, Jan 31, 2023 at 11:10:27AM +0200, Paul Blakey wrote:
> Currently, CT misses restore the missed chain on the tc skb extension so
> tc will continue from the relevant chain. Instead, restore the CT action's
> miss cookie on the extension, which will instruct tc to continue from the
> this specific CT action instance on the relevant filter's action list.
> 
> Map the CT action's miss_cookie to a new miss object (ACT_MISS), and use
> this miss mapping instead of the current chain miss object (CHAIN_MISS)
> for CT action misses.
> 
> To restore this new miss mapping value, add a RX restore rule for each
> such mapping value.
> 
> Signed-off-by: Paul Blakey <paulb@nvidia.com>
> Reviewed-by: Roi Dayan <roid@nvidia.com>
> Reviewed-by: Oz Sholmo <ozsh@nvidia.com>
> ---
>  .../ethernet/mellanox/mlx5/core/en/tc_ct.c    | 32 +++++-----
>  .../ethernet/mellanox/mlx5/core/en/tc_ct.h    |  2 +
>  .../net/ethernet/mellanox/mlx5/core/en_tc.c   | 61 ++++++++++++++++---
>  .../net/ethernet/mellanox/mlx5/core/en_tc.h   |  6 ++
>  .../net/ethernet/mellanox/mlx5/core/eswitch.h |  2 +
>  5 files changed, 79 insertions(+), 24 deletions(-)

<...>

> -static bool mlx5e_tc_restore_skb_chain(struct sk_buff *skb, struct mlx5_tc_ct_priv *ct_priv,
> -				       u32 chain, u32 zone_restore_id,
> -				       u32 tunnel_id,  struct mlx5e_tc_update_priv *tc_priv)
> +static bool mlx5e_tc_restore_skb_tc_meta(struct sk_buff *skb, struct mlx5_tc_ct_priv *ct_priv,
> +					 struct mlx5_mapped_obj *mapped_obj, u32 zone_restore_id,
> +					 u32 tunnel_id,  struct mlx5e_tc_update_priv *tc_priv)
>  {
> +	u32 chain = mapped_obj->type == MLX5_MAPPED_OBJ_CHAIN ? mapped_obj->chain : 0;
> +	u64 act_miss_cookie = mapped_obj->type == MLX5_MAPPED_OBJ_ACT_MISS ?
> +			      mapped_obj->act_miss_cookie : 0;

It will be easier for reader if such assignment is separated from
variables declarations.

>  	struct mlx5e_priv *priv = netdev_priv(skb->dev);
>  	struct tc_skb_ext *tc_skb_ext;

<...>

> +void mlx5e_tc_action_miss_mapping_put(struct mlx5e_priv *priv, struct mlx5_flow_attr *attr,
> +				      u32 act_miss_mapping)
> +{
> +	struct mlx5_eswitch *esw = priv->mdev->priv.eswitch;
> +	struct mapping_ctx *ctx = esw->offloads.reg_c0_obj_pool;

Reversed Christmas tree, please.

Thanks

      reply	other threads:[~2023-02-02 11:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-31  9:10 [PATCH net-next v7 0/6] net/sched: cls_api: Support hardware miss to tc action Paul Blakey
2023-01-31  9:10 ` [PATCH net-next v7 1/6] " Paul Blakey
2023-01-31  9:10 ` [PATCH net-next v7 2/6] net/sched: flower: Move filter handle initialization earlier Paul Blakey
2023-01-31  9:10 ` [PATCH net-next v7 3/6] net/sched: flower: Support hardware miss to tc action Paul Blakey
2023-01-31  9:10 ` [PATCH net-next v7 4/6] net/mlx5: Refactor tc miss handling to a single function Paul Blakey
2023-02-02 11:07   ` Leon Romanovsky
2023-01-31  9:10 ` [PATCH net-next v7 5/6] net/mlx5e: Rename CHAIN_TO_REG to MAPPED_OBJ_TO_REG Paul Blakey
2023-02-02 10:49   ` Leon Romanovsky
2023-01-31  9:10 ` [PATCH net-next v7 6/6] net/mlx5e: TC, Set CT miss to the specific ct action instance Paul Blakey
2023-02-02 11:11   ` Leon Romanovsky [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=Y9uafQ+6gyZFS8Wl@unreal \
    --to=leon@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ozsh@nvidia.com \
    --cc=pabeni@redhat.com \
    --cc=paulb@nvidia.com \
    --cc=roid@nvidia.com \
    --cc=saeedm@nvidia.com \
    --cc=vladbu@nvidia.com \
    --cc=xiyou.wangcong@gmail.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.