From: Rongwei Liu <rongweil@nvidia.com>
To: <dev@dpdk.org>, <matan@nvidia.com>, <viacheslavo@nvidia.com>,
<orika@nvidia.com>, <thomas@monjalon.net>
Cc: <rasland@nvidia.com>
Subject: [PATCH v3 1/7] net/mlx5: enable hws flex item create
Date: Thu, 23 Feb 2023 09:06:27 +0200 [thread overview]
Message-ID: <20230223070633.946328-2-rongweil@nvidia.com> (raw)
In-Reply-To: <20230223070633.946328-1-rongweil@nvidia.com>
Enable flex item create and destroy with dv_flow_en=2
Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/linux/mlx5_os.c | 27 +++++++++++++++------------
drivers/net/mlx5/mlx5_flow_hw.c | 2 ++
2 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index a71474c90a..f5b3edea99 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -474,10 +474,20 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
err = mlx5_alloc_table_hash_list(priv);
if (err)
goto error;
- if (priv->sh->config.dv_flow_en == 2)
- return 0;
/* The resources below are only valid with DV support. */
#ifdef HAVE_IBV_FLOW_DV_SUPPORT
+ /* Init shared flex parsers list, no need lcore_share */
+ snprintf(s, sizeof(s), "%s_flex_parsers_list", sh->ibdev_name);
+ sh->flex_parsers_dv = mlx5_list_create(s, sh, false,
+ mlx5_flex_parser_create_cb,
+ mlx5_flex_parser_match_cb,
+ mlx5_flex_parser_remove_cb,
+ mlx5_flex_parser_clone_cb,
+ mlx5_flex_parser_clone_free_cb);
+ if (!sh->flex_parsers_dv)
+ goto error;
+ if (priv->sh->config.dv_flow_en == 2)
+ return 0;
/* Init port id action list. */
snprintf(s, sizeof(s), "%s_port_id_action_list", sh->ibdev_name);
sh->port_id_action_list = mlx5_list_create(s, sh, true,
@@ -518,16 +528,9 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
flow_dv_dest_array_clone_free_cb);
if (!sh->dest_array_list)
goto error;
- /* Init shared flex parsers list, no need lcore_share */
- snprintf(s, sizeof(s), "%s_flex_parsers_list", sh->ibdev_name);
- sh->flex_parsers_dv = mlx5_list_create(s, sh, false,
- mlx5_flex_parser_create_cb,
- mlx5_flex_parser_match_cb,
- mlx5_flex_parser_remove_cb,
- mlx5_flex_parser_clone_cb,
- mlx5_flex_parser_clone_free_cb);
- if (!sh->flex_parsers_dv)
- goto error;
+#else
+ if (priv->sh->config.dv_flow_en == 2)
+ return 0;
#endif
#ifdef HAVE_MLX5DV_DR
void *domain;
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 7457187b19..9e1912ec69 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -8436,6 +8436,8 @@ const struct mlx5_flow_driver_ops mlx5_flow_hw_drv_ops = {
.query = flow_hw_query,
.get_aged_flows = flow_hw_get_aged_flows,
.get_q_aged_flows = flow_hw_get_q_aged_flows,
+ .item_create = flow_dv_item_create,
+ .item_release = flow_dv_item_release,
};
/**
--
2.27.0
next prev parent reply other threads:[~2023-02-23 7:07 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-15 11:52 [PATCH v1 0/6] add flex item implementation Rongwei Liu
2023-02-15 11:52 ` [PATCH v1 1/6] net/mlx5: enable hws flex item create Rongwei Liu
2023-02-15 11:52 ` [PATCH v1 2/6] net/mlx5: add IPv6 protocol as flex item input Rongwei Liu
2023-02-15 11:52 ` [PATCH v1 3/6] net/mlx5/hws: add hws flex item matching support Rongwei Liu
2023-02-15 11:52 ` [PATCH v1 4/6] net/mlx5: add flex item modify field implementation Rongwei Liu
2023-02-15 11:52 ` [PATCH v1 5/6] net/mlx5: return error for sws modify field Rongwei Liu
2023-02-15 11:52 ` [PATCH v1 6/6] doc/mlx5: update mlx5 doc Rongwei Liu
2023-02-22 9:37 ` [PATCH v2 0/6] add flex item implementation Rongwei Liu
2023-02-22 9:37 ` [PATCH v2 1/6] net/mlx5: enable hws flex item create Rongwei Liu
2023-02-22 9:37 ` [PATCH v2 2/6] net/mlx5: add IPv6 protocol as flex item input Rongwei Liu
2023-02-22 9:37 ` [PATCH v2 3/6] net/mlx5/hws: add hws flex item matching support Rongwei Liu
2023-02-22 9:37 ` [PATCH v2 4/6] net/mlx5: add flex item modify field implementation Rongwei Liu
2023-02-22 9:37 ` [PATCH v2 5/6] net/mlx5: return error for sws modify field Rongwei Liu
2023-02-22 9:37 ` [PATCH v2 6/6] doc/mlx5: update mlx5 doc Rongwei Liu
2023-02-23 7:06 ` [PATCH v3 0/7] add flex item implementation Rongwei Liu
2023-02-23 7:06 ` Rongwei Liu [this message]
2023-02-23 7:06 ` [PATCH v3 2/7] net/mlx5: add IPv6 protocol as flex item input Rongwei Liu
2023-02-23 7:06 ` [PATCH v3 3/7] net/mlx5/hws: add hws flex item matching support Rongwei Liu
2023-02-23 7:06 ` [PATCH v3 4/7] net/mlx5: add flex item modify field implementation Rongwei Liu
2023-02-23 7:06 ` [PATCH v3 5/7] net/mlx5: return error for sws modify field Rongwei Liu
2023-02-23 7:06 ` [PATCH v3 6/7] doc/mlx5: update mlx5 doc Rongwei Liu
2023-02-23 12:37 ` Thomas Monjalon
2023-02-23 12:48 ` [PATCH v4 0/6] add flex item implementation Rongwei Liu
2023-02-23 12:48 ` [PATCH v4 1/6] net/mlx5: enable hws flex item create Rongwei Liu
2023-02-23 12:48 ` [PATCH v4 2/6] net/mlx5: add IPv6 protocol as flex item input Rongwei Liu
2023-02-23 12:48 ` [PATCH v4 3/6] net/mlx5/hws: add hws flex item matching support Rongwei Liu
2023-02-23 12:48 ` [PATCH v4 4/6] net/mlx5: add flex item modify field implementation Rongwei Liu
2023-02-23 12:48 ` [PATCH v4 5/6] net/mlx5: return error for sws modify field Rongwei Liu
2023-02-23 12:48 ` [PATCH v4 6/6] net/mlx5: add error message Rongwei Liu
2023-02-27 10:27 ` [PATCH v4 0/6] add flex item implementation Raslan Darawsheh
2023-02-23 7:06 ` [PATCH v3 7/7] net/mlx5: add error message Rongwei Liu
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=20230223070633.946328-2-rongweil@nvidia.com \
--to=rongweil@nvidia.com \
--cc=dev@dpdk.org \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=rasland@nvidia.com \
--cc=thomas@monjalon.net \
--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).