From: Rongwei Liu <rongweil@nvidia.com>
To: <matan@nvidia.com>, <viacheslavo@nvidia.com>, <orika@nvidia.com>,
<thomas@monjalon.net>
Cc: <dev@dpdk.org>, <rasland@nvidia.com>
Subject: [RFC 4/9] net/mlx5: enable hws flex item create
Date: Wed, 21 Dec 2022 10:39:55 +0200 [thread overview]
Message-ID: <20221221084000.3680015-5-rongweil@nvidia.com> (raw)
In-Reply-To: <20221221084000.3680015-1-rongweil@nvidia.com>
Enable flex item create and destroy with dv_flow_en=2
Signed-off-by: Rongwei Liu <rongweil@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 20c71ff7f0..44953451d5 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -8336,6 +8336,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:[~2022-12-21 8:40 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-21 8:39 [RFC 0/9] support flex item matching and modify field Rongwei Liu
2022-12-21 8:39 ` [RFC 1/9] ethdev: add flex item modify field support Rongwei Liu
2023-01-11 16:34 ` Ori Kam
2023-01-19 4:58 ` [PATCH v2 00/11] add flex item support Rongwei Liu
2023-01-19 4:58 ` [PATCH v2 01/11] ethdev: add flex item modify field support Rongwei Liu
2023-01-20 9:07 ` Andrew Rybchenko
2023-01-30 4:29 ` Rongwei Liu
2023-01-30 4:35 ` Rongwei Liu
2023-01-30 4:52 ` [PATCH v3 00/11] add flex item support Rongwei Liu
2023-01-30 4:52 ` [PATCH v3 01/11] ethdev: add flex item modify field support Rongwei Liu
2023-01-30 4:52 ` [PATCH v3 02/11] app/testpmd: pass flex handle into matching mask Rongwei Liu
2023-01-30 4:52 ` [PATCH v3 03/11] net/mlx5: enable hws flex item create Rongwei Liu
2023-01-30 4:52 ` [PATCH v3 04/11] net/mlx5: add IPv6 protocol as flex item input Rongwei Liu
2023-01-30 4:52 ` [PATCH v3 05/11] net/mlx5: adopt new flex item prm definition Rongwei Liu
2023-01-30 4:52 ` [PATCH v3 06/11] net/mlx5/hws: add hws flex item matching support Rongwei Liu
2023-01-30 4:52 ` [PATCH v3 07/11] net/mlx5: add flex item modify field implementation Rongwei Liu
2023-01-30 4:52 ` [PATCH v3 08/11] net/mlx5: return error for sws modify field Rongwei Liu
2023-01-30 4:53 ` [PATCH v3 09/11] app/testpmd: raw encap with flex item support Rongwei Liu
2023-01-30 4:53 ` [PATCH v3 10/11] doc/mlx5: update mlx5 doc Rongwei Liu
2023-01-30 4:53 ` [PATCH v3 11/11] app/testpmd: adjust cleanup sequence when quitting Rongwei Liu
2023-01-30 13:19 ` [PATCH v3 00/11] add flex item support Rongwei Liu
2023-01-30 13:19 ` [PATCH v3 01/11] ethdev: add flex item modify field support Rongwei Liu
2023-02-02 2:59 ` Rongwei Liu
2023-02-06 3:39 ` [PATCH v4 0/4] add flex item support Rongwei Liu
2023-02-06 3:39 ` [PATCH v4 1/4] ethdev: add flex item modify field support Rongwei Liu
2023-02-09 15:55 ` Ferruh Yigit
2023-02-06 3:39 ` [PATCH v4 2/4] app/testpmd: pass flex handle into matching mask Rongwei Liu
2023-02-06 3:39 ` [PATCH v4 3/4] app/testpmd: raw encap with flex item support Rongwei Liu
2023-02-06 3:39 ` [PATCH v4 4/4] app/testpmd: adjust cleanup sequence when quitting Rongwei Liu
2023-02-09 14:49 ` [PATCH v4 0/4] add flex item support Ferruh Yigit
2023-01-30 13:19 ` [PATCH v3 02/11] app/testpmd: pass flex handle into matching mask Rongwei Liu
2023-01-30 13:19 ` [PATCH v3 03/11] net/mlx5: enable hws flex item create Rongwei Liu
2023-01-30 13:19 ` [PATCH v3 04/11] net/mlx5: add IPv6 protocol as flex item input Rongwei Liu
2023-01-30 13:19 ` [PATCH v3 05/11] net/mlx5: adopt new flex item prm definition Rongwei Liu
2023-01-30 13:19 ` [PATCH v3 06/11] net/mlx5/hws: add hws flex item matching support Rongwei Liu
2023-01-30 13:19 ` [PATCH v3 07/11] net/mlx5: add flex item modify field implementation Rongwei Liu
2023-01-30 13:19 ` [PATCH v3 08/11] net/mlx5: return error for sws modify field Rongwei Liu
2023-01-30 13:19 ` [PATCH v3 09/11] app/testpmd: raw encap with flex item support Rongwei Liu
2023-01-30 13:19 ` [PATCH v3 10/11] doc/mlx5: update mlx5 doc Rongwei Liu
2023-01-30 13:20 ` [PATCH v3 11/11] app/testpmd: adjust cleanup sequence when quitting Rongwei Liu
2023-02-03 11:00 ` Singh, Aman Deep
2023-01-19 4:58 ` [PATCH v2 02/11] app/testpmd: pass flex handle into matching mask Rongwei Liu
2023-01-19 4:58 ` [PATCH v2 03/11] net/mlx5: enable hws flex item create Rongwei Liu
2023-01-19 4:58 ` [PATCH v2 04/11] net/mlx5: add IPv6 protocol as flex item input Rongwei Liu
2023-01-19 4:58 ` [PATCH v2 05/11] net/mlx5: adopt new flex item prm definition Rongwei Liu
2023-01-19 4:58 ` [PATCH v2 06/11] net/mlx5/hws: add hws flex item matching support Rongwei Liu
2023-01-19 4:58 ` [PATCH v2 07/11] net/mlx5: add flex item modify field implementation Rongwei Liu
2023-01-19 4:58 ` [PATCH v2 08/11] net/mlx5: return error for sws modify field Rongwei Liu
2023-01-19 4:58 ` [PATCH v2 09/11] app/testpmd: raw encap with flex item support Rongwei Liu
2023-01-19 4:58 ` [PATCH v2 10/11] doc/mlx5: update mlx5 doc Rongwei Liu
2023-01-19 4:58 ` [PATCH v2 11/11] app/testpmd: adjust cleanup sequence when quitting Rongwei Liu
2022-12-21 8:39 ` [RFC 2/9] app/testpmd: add flex item modify field cmdline support Rongwei Liu
2022-12-21 8:39 ` [RFC 3/9] app/testpmd: pass flex handle into matching mask Rongwei Liu
2022-12-21 8:39 ` Rongwei Liu [this message]
2022-12-21 8:39 ` [RFC 5/9] net/mlx5: add IPv6 protocol as flex item input Rongwei Liu
2022-12-21 8:39 ` [RFC 6/9] net/mlx5/hws: add hws flex item matching support Rongwei Liu
2022-12-21 8:39 ` [RFC 7/9] net/mlx5/hws: add flex item modify field implementation Rongwei Liu
2022-12-21 8:39 ` [RFC 8/9] net/mlx5: return error for sws modify field Rongwei Liu
2022-12-21 8:40 ` [RFC 9/9] app/testpmd: raw encap with flex item support Rongwei Liu
-- strict thread matches above, loose matches on Subject: below --
2022-12-21 7:39 [RFC 0/9] add hws flex item matching and modify field Rongwei Liu
2022-12-21 7:39 ` [RFC 4/9] net/mlx5: enable hws flex item create 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=20221221084000.3680015-5-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).