From: Alexander Kozyrev <akozyrev@nvidia.com>
To: <dev@dpdk.org>
Cc: <rasland@nvidia.com>, <viacheslavo@nvidia.com>,
<matan@nvidia.com>, <hamdani@nvidia.com>, <valex@nvidia.com>,
<dsosnowski@nvidia.com>, <orika@nvidia.com>, <bingz@nvidia.com>,
<suanmingm@nvidia.com>
Subject: [PATCH v2 3/5] net/mlx5: create array ste matcher
Date: Tue, 15 Oct 2024 19:47:16 +0300 [thread overview]
Message-ID: <20241015164718.607858-3-akozyrev@nvidia.com> (raw)
In-Reply-To: <20241015164718.607858-1-akozyrev@nvidia.com>
Create an array STE matcher for a template table
in case of insertion by index with pattern is selected.
Packets will be matched on a pattern at the index.
This table is isolated from any other tables in a group.
That means packets missed the rule won't go to a lower
priority tables, but proceed with the default miss instead.
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_hw.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index b9807f347d..6434937562 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -5157,8 +5157,15 @@ flow_hw_table_create(struct rte_eth_dev *dev,
matcher_attr.optimize_using_rule_idx = true;
matcher_attr.mode = MLX5DR_MATCHER_RESOURCE_MODE_RULE;
matcher_attr.insert_mode = flow_hw_matcher_insert_mode_get(attr->insertion_type);
- if (matcher_attr.insert_mode == MLX5DR_MATCHER_INSERT_BY_INDEX)
- matcher_attr.match_mode = MLX5DR_MATCHER_MATCH_MODE_ALWAYS_HIT;
+ if (matcher_attr.insert_mode == MLX5DR_MATCHER_INSERT_BY_INDEX) {
+ if (attr->insertion_type == RTE_FLOW_TABLE_INSERTION_TYPE_INDEX_WITH_PATTERN) {
+ matcher_attr.isolated = true;
+ matcher_attr.match_mode = MLX5DR_MATCHER_MATCH_MODE_DEFAULT;
+ } else {
+ matcher_attr.isolated = false;
+ matcher_attr.match_mode = MLX5DR_MATCHER_MATCH_MODE_ALWAYS_HIT;
+ }
+ }
if (attr->hash_func == RTE_FLOW_TABLE_HASH_FUNC_CRC16) {
DRV_LOG(ERR, "16-bit checksum hash type is not supported");
rte_errno = ENOTSUP;
--
2.18.2
next prev parent reply other threads:[~2024-10-15 16:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-15 16:47 [PATCH v2 1/5] net/mlx5/hws: introduce new matcher type Alexander Kozyrev
2024-10-15 16:47 ` [PATCH v2 2/5] net/mlx5/hws: introduce jump to matcher action Alexander Kozyrev
2024-10-22 15:01 ` Dariusz Sosnowski
2024-10-15 16:47 ` Alexander Kozyrev [this message]
2024-10-22 15:01 ` [PATCH v2 3/5] net/mlx5: create array ste matcher Dariusz Sosnowski
2024-10-15 16:47 ` [PATCH v2 4/5] net/mlx5: add flow rule insertion by index with pattern Alexander Kozyrev
2024-10-22 15:02 ` Dariusz Sosnowski
2024-10-15 16:47 ` [PATCH v2 5/5] net/mlx5: implement jump to table index action Alexander Kozyrev
2024-10-22 15:02 ` Dariusz Sosnowski
2024-10-22 15:00 ` [PATCH v2 1/5] net/mlx5/hws: introduce new matcher type Dariusz Sosnowski
2024-10-22 15:01 ` Dariusz Sosnowski
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=20241015164718.607858-3-akozyrev@nvidia.com \
--to=akozyrev@nvidia.com \
--cc=bingz@nvidia.com \
--cc=dev@dpdk.org \
--cc=dsosnowski@nvidia.com \
--cc=hamdani@nvidia.com \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=rasland@nvidia.com \
--cc=suanmingm@nvidia.com \
--cc=valex@nvidia.com \
--cc=viacheslavo@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).