From: Michal Kubiak <michal.kubiak@intel.com>
To: Tariq Toukan <tariqt@nvidia.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
Gal Pressman <gal@nvidia.com>,
Leon Romanovsky <leonro@nvidia.com>,
Saeed Mahameed <saeedm@nvidia.com>,
Leon Romanovsky <leon@kernel.org>, <netdev@vger.kernel.org>,
<linux-rdma@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Moshe Shemesh <moshe@nvidia.com>, Mark Bloch <mbloch@nvidia.com>,
Vlad Dogaru <vdogaru@nvidia.com>,
Yevgeny Kliteynik <kliteyn@nvidia.com>
Subject: Re: [PATCH net-next 08/12] net/mlx5: HWS, Implement action STE pool
Date: Thu, 10 Apr 2025 17:09:25 +0200 [thread overview]
Message-ID: <Z/ffJUkWbS15sPAs@localhost.localdomain> (raw)
In-Reply-To: <1744120856-341328-9-git-send-email-tariqt@nvidia.com>
On Tue, Apr 08, 2025 at 05:00:52PM +0300, Tariq Toukan wrote:
> From: Vlad Dogaru <vdogaru@nvidia.com>
>
> Implement a per-queue pool of action STEs that match STEs can link to,
> regardless of matcher.
>
> The code relies on hints to optimize whether a given rule is added to
> rx-only, tx-only or both. Correspondingly, action STEs need to be added
> to different RTC for ingress or egress paths. For rx-and-tx rules, the
> current rule implementation dictates that the offsets for a given rule
> must be the same in both RTCs.
>
> To avoid wasting STEs, each action STE pool element holds 3 pools:
> rx-only, tx-only, and rx-and-tx, corresponding to the possible values of
> the pool optimization enum. The implementation then chooses at rule
> creation / update which of these elements to allocate from.
>
> Each element holds multiple action STE tables, which wrap an RTC, an STE
> range, the logic to buddy-allocate offsets from the range, and an STC
> that allows match STEs to point to this table. When allocating offsets
> from an element, we iterate through available action STE tables and, if
> needed, create a new table.
>
> Similar to the previous implementation, this iteration does not free any
> resources. This is implemented in a subsequent patch.
>
> Signed-off-by: Vlad Dogaru <vdogaru@nvidia.com>
> Reviewed-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
> Reviewed-by: Mark Bloch <mbloch@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
> ---
The patch looks OK to me. It corresponds with the idea described in the
cover letter and commit message.
No new issues found.
> +static int hws_action_ste_table_create_single_rtc(
> + struct mlx5hws_context *ctx,
> + struct mlx5hws_action_ste_table *action_tbl,
> + enum mlx5hws_pool_optimize opt, size_t log_sz, bool tx)
> +{
> + struct mlx5hws_cmd_rtc_create_attr rtc_attr = { 0 };
> + u32 *rtc_id;
> +
> + rtc_attr.log_depth = 0;
> + rtc_attr.update_index_mode = MLX5_IFC_RTC_STE_UPDATE_MODE_BY_OFFSET;
> + /* Action STEs use the default always hit definer. */
> + rtc_attr.match_definer_0 = ctx->caps->trivial_match_definer;
> + rtc_attr.is_frst_jumbo = false;
> + rtc_attr.miss_ft_id = 0;
> + rtc_attr.pd = ctx->pd_num;
> + rtc_attr.ste_offset = 0;
As I mentioned in my review for patch #5, it's always zero.
Anyway, you've already said you're going to remove it in v2.
Thanks,
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
next prev parent reply other threads:[~2025-04-10 15:09 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-08 14:00 [PATCH net-next 00/12] net/mlx5: HWS, Refactor action STE handling Tariq Toukan
2025-04-08 14:00 ` [PATCH net-next 01/12] net/mlx5: HWS, Fix matcher action template attach Tariq Toukan
2025-04-09 15:21 ` Michal Kubiak
2025-04-09 15:56 ` Vlad Dogaru
2025-04-09 16:00 ` Michal Kubiak
2025-04-08 14:00 ` [PATCH net-next 02/12] net/mlx5: HWS, Remove unused element array Tariq Toukan
2025-04-09 15:50 ` Michal Kubiak
2025-04-08 14:00 ` [PATCH net-next 03/12] net/mlx5: HWS, Make pool single resource Tariq Toukan
2025-04-09 20:04 ` Michal Kubiak
2025-04-08 14:00 ` [PATCH net-next 04/12] net/mlx5: HWS, Refactor pool implementation Tariq Toukan
2025-04-09 21:24 ` Michal Kubiak
2025-04-08 14:00 ` [PATCH net-next 05/12] net/mlx5: HWS, Cleanup after pool refactoring Tariq Toukan
2025-04-09 21:23 ` Michal Kubiak
2025-04-10 9:39 ` Vlad Dogaru
2025-04-08 14:00 ` [PATCH net-next 06/12] net/mlx5: HWS, Add fullness tracking to pool Tariq Toukan
2025-04-10 11:38 ` Michal Kubiak
2025-04-08 14:00 ` [PATCH net-next 07/12] net/mlx5: HWS, Fix pool size optimization Tariq Toukan
2025-04-10 12:21 ` Michal Kubiak
2025-04-10 15:45 ` Vlad Dogaru
2025-04-08 14:00 ` [PATCH net-next 08/12] net/mlx5: HWS, Implement action STE pool Tariq Toukan
2025-04-10 15:09 ` Michal Kubiak [this message]
2025-04-08 14:00 ` [PATCH net-next 09/12] net/mlx5: HWS, Use the new " Tariq Toukan
2025-04-10 16:48 ` Michal Kubiak
2025-04-08 14:00 ` [PATCH net-next 10/12] net/mlx5: HWS, Cleanup matcher action STE table Tariq Toukan
2025-04-10 17:01 ` Michal Kubiak
2025-04-10 18:45 ` Vlad Dogaru
2025-04-08 14:00 ` [PATCH net-next 11/12] net/mlx5: HWS, Free unused action STE tables Tariq Toukan
2025-04-10 17:28 ` Michal Kubiak
2025-04-10 18:20 ` Vlad Dogaru
2025-04-11 11:22 ` Michal Kubiak
2025-04-08 14:00 ` [PATCH net-next 12/12] net/mlx5: HWS, Export action STE tables to debugfs Tariq Toukan
2025-04-10 17:06 ` Michal Kubiak
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=Z/ffJUkWbS15sPAs@localhost.localdomain \
--to=michal.kubiak@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=kliteyn@nvidia.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=leonro@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=moshe@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=tariqt@nvidia.com \
--cc=vdogaru@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).