From: Ivan Malov <ivan.malov@oktetlabs.ru>
To: dev@dpdk.org
Cc: Ori Kam <orika@nvidia.com>, Eli Britstein <elibr@nvidia.com>,
Ilya Maximets <i.maximets@ovn.org>,
Thomas Monjalon <thomas@monjalon.net>,
Stephen Hemminger <stephen@networkplumber.org>,
Jerin Jacob <jerinj@marvell.com>,
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
Hemant Agrawal <hemant.agrawal@nxp.com>,
Sachin Saxena <sachin.saxena@oss.nxp.com>
Subject: [PATCH 04/13] net/dpaa2: support represented port flow action
Date: Fri, 12 Aug 2022 22:18:18 +0300 [thread overview]
Message-ID: <20220812191827.3187441-5-ivan.malov@oktetlabs.ru> (raw)
In-Reply-To: <20220812191827.3187441-1-ivan.malov@oktetlabs.ru>
There's been support for similar actions PHY_PORT and PORT_ID
for some time already, but these actions are being deprecated.
Support action REPRESENTED_PORT to prepare for the transition.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
doc/guides/nics/features/dpaa2.ini | 1 +
doc/guides/rel_notes/release_22_11.rst | 4 ++++
drivers/net/dpaa2/dpaa2_flow.c | 12 +++++++++++-
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/doc/guides/nics/features/dpaa2.ini b/doc/guides/nics/features/dpaa2.ini
index 4c06841a87..53148ad467 100644
--- a/doc/guides/nics/features/dpaa2.ini
+++ b/doc/guides/nics/features/dpaa2.ini
@@ -48,4 +48,5 @@ drop = Y
phy_port = Y
port_id = Y
queue = Y
+represented_port = Y
rss = Y
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index b74e90d27f..6ab0cae78b 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -55,6 +55,10 @@ New Features
Also, make sure to start the actual text at the margin.
=======================================================
+* **Updated dpaa2 PMD.**
+
+ * Added support for flow action REPRESENTED_PORT.
+
Removed Items
-------------
diff --git a/drivers/net/dpaa2/dpaa2_flow.c b/drivers/net/dpaa2/dpaa2_flow.c
index bf55eb70a3..25616b0035 100644
--- a/drivers/net/dpaa2/dpaa2_flow.c
+++ b/drivers/net/dpaa2/dpaa2_flow.c
@@ -85,6 +85,7 @@ enum rte_flow_action_type dpaa2_supported_action_type[] = {
RTE_FLOW_ACTION_TYPE_QUEUE,
RTE_FLOW_ACTION_TYPE_PHY_PORT,
RTE_FLOW_ACTION_TYPE_PORT_ID,
+ RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT,
RTE_FLOW_ACTION_TYPE_RSS
};
@@ -92,7 +93,8 @@ static const
enum rte_flow_action_type dpaa2_supported_fs_action_type[] = {
RTE_FLOW_ACTION_TYPE_QUEUE,
RTE_FLOW_ACTION_TYPE_PHY_PORT,
- RTE_FLOW_ACTION_TYPE_PORT_ID
+ RTE_FLOW_ACTION_TYPE_PORT_ID,
+ RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT,
};
/* Max of enum rte_flow_item_type + 1, for both IPv4 and IPv6*/
@@ -3294,6 +3296,11 @@ dpaa2_flow_redirect_dev(struct dpaa2_dev_priv *priv,
action->conf;
if (!port_id->original)
idx = port_id->id;
+ } else if (action->type == RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT) {
+ const struct rte_flow_action_ethdev *ethdev;
+
+ ethdev = (const struct rte_flow_action_ethdev *)action->conf;
+ idx = ethdev->port_id;
} else {
return NULL;
}
@@ -3337,6 +3344,7 @@ dpaa2_flow_verify_action(
return -1;
}
break;
+ case RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT:
case RTE_FLOW_ACTION_TYPE_PHY_PORT:
case RTE_FLOW_ACTION_TYPE_PORT_ID:
if (!dpaa2_flow_redirect_dev(priv, &actions[j])) {
@@ -3514,6 +3522,7 @@ dpaa2_generic_flow_set(struct rte_flow *flow,
while (!end_of_list) {
switch (actions[j].type) {
case RTE_FLOW_ACTION_TYPE_QUEUE:
+ case RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT:
case RTE_FLOW_ACTION_TYPE_PHY_PORT:
case RTE_FLOW_ACTION_TYPE_PORT_ID:
memset(&action, 0, sizeof(struct dpni_fs_action_cfg));
@@ -4088,6 +4097,7 @@ int dpaa2_flow_destroy(struct rte_eth_dev *dev,
switch (flow->action) {
case RTE_FLOW_ACTION_TYPE_QUEUE:
+ case RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT:
case RTE_FLOW_ACTION_TYPE_PHY_PORT:
case RTE_FLOW_ACTION_TYPE_PORT_ID:
if (priv->num_rx_tc > 1) {
--
2.30.2
next prev parent reply other threads:[~2022-08-12 19:19 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-12 19:18 [PATCH 00/13] ethdev: proceed with flow subsystem rework Ivan Malov
2022-08-12 19:18 ` [PATCH 01/13] ethdev: strip experimental tag off Rx metadata negotiate API Ivan Malov
2022-08-12 19:18 ` [PATCH 02/13] ethdev: strip experimental tag off port ID items and actions Ivan Malov
2022-08-15 12:59 ` Ori Kam
2022-08-12 19:18 ` [PATCH 03/13] ethdev: remove experimental tag from flow transfer proxy API Ivan Malov
2022-08-15 12:58 ` Ori Kam
2022-08-12 19:18 ` Ivan Malov [this message]
2022-08-12 19:18 ` [PATCH 05/13] net/cnxk: support represented port flow action Ivan Malov
2022-08-12 19:18 ` [PATCH 06/13] app/testpmd: add port steering targets to sample " Ivan Malov
2022-08-12 19:18 ` [PATCH 07/13] doc: revisit outdated flow rule examples in testpmd tutorial Ivan Malov
2022-08-12 19:18 ` [PATCH 08/13] doc: add new port items and actions to switch representation Ivan Malov
2022-08-12 19:18 ` [PATCH 09/13] doc: rework VF-related explanations in " Ivan Malov
2022-08-12 19:18 ` [PATCH 10/13] ethdev: remove deprecated flow item PF Ivan Malov
2022-08-22 5:32 ` Ori Kam
2022-08-12 19:18 ` [PATCH 11/13] ethdev: remove deprecated flow item VF Ivan Malov
2022-08-22 5:50 ` Ori Kam
2022-08-12 19:18 ` [PATCH 12/13] ethdev: remove deprecated flow item PHY PORT Ivan Malov
2022-08-22 5:33 ` Ori Kam
2022-09-27 7:08 ` Thomas Monjalon
2022-09-27 16:18 ` Ajit Khaparde
2022-08-12 19:18 ` [PATCH 13/13] ethdev: remove deprecated flow action " Ivan Malov
2022-08-22 5:33 ` Ori Kam
2022-09-27 8:32 ` [PATCH 00/13] ethdev: proceed with flow subsystem rework Thomas Monjalon
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=20220812191827.3187441-5-ivan.malov@oktetlabs.ru \
--to=ivan.malov@oktetlabs.ru \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=elibr@nvidia.com \
--cc=hemant.agrawal@nxp.com \
--cc=i.maximets@ovn.org \
--cc=jerinj@marvell.com \
--cc=orika@nvidia.com \
--cc=sachin.saxena@oss.nxp.com \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
/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).