DPDK patches and discussions
 help / color / mirror / Atom feed
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>,
	Aman Singh <aman.deep.singh@intel.com>,
	Yuying Zhang <yuying.zhang@intel.com>
Subject: [PATCH 06/13] app/testpmd: add port steering targets to sample flow action
Date: Fri, 12 Aug 2022 22:18:20 +0300	[thread overview]
Message-ID: <20220812191827.3187441-7-ivan.malov@oktetlabs.ru> (raw)
In-Reply-To: <20220812191827.3187441-1-ivan.malov@oktetlabs.ru>

Allow the use of actions PORT_REPRESENTOR / REPRESENTED_PORT
as targets in "set sample_actions" command.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 app/test-pmd/cmdline_flow.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 7f50028eb7..23889f7ab1 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -781,6 +781,8 @@ struct action_vxlan_encap_data sample_vxlan_encap[RAW_SAMPLE_CONFS_MAX_NUM];
 struct action_nvgre_encap_data sample_nvgre_encap[RAW_SAMPLE_CONFS_MAX_NUM];
 struct action_rss_data sample_rss_data[RAW_SAMPLE_CONFS_MAX_NUM];
 struct rte_flow_action_vf sample_vf[RAW_SAMPLE_CONFS_MAX_NUM];
+struct rte_flow_action_ethdev sample_port_representor[RAW_SAMPLE_CONFS_MAX_NUM];
+struct rte_flow_action_ethdev sample_represented_port[RAW_SAMPLE_CONFS_MAX_NUM];
 
 static const char *const modify_field_ops[] = {
 	"set", "add", "sub", NULL
@@ -10872,6 +10874,18 @@ cmd_set_raw_parsed_sample(const struct buffer *in)
 			parse_setup_nvgre_encap_data(&sample_nvgre_encap[idx]);
 			action->conf = &sample_nvgre_encap[idx];
 			break;
+		case RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR:
+			size = sizeof(struct rte_flow_action_ethdev);
+			rte_memcpy(&sample_port_representor[idx],
+					(const void *)action->conf, size);
+			action->conf = &sample_port_representor[idx];
+			break;
+		case RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT:
+			size = sizeof(struct rte_flow_action_ethdev);
+			rte_memcpy(&sample_represented_port[idx],
+					(const void *)action->conf, size);
+			action->conf = &sample_represented_port[idx];
+			break;
 		default:
 			fprintf(stderr, "Error - Not supported action\n");
 			return;
-- 
2.30.2


  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 ` [PATCH 04/13] net/dpaa2: support represented port flow action Ivan Malov
2022-08-12 19:18 ` [PATCH 05/13] net/cnxk: " Ivan Malov
2022-08-12 19:18 ` Ivan Malov [this message]
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-7-ivan.malov@oktetlabs.ru \
    --to=ivan.malov@oktetlabs.ru \
    --cc=aman.deep.singh@intel.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=elibr@nvidia.com \
    --cc=i.maximets@ovn.org \
    --cc=jerinj@marvell.com \
    --cc=orika@nvidia.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    --cc=yuying.zhang@intel.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).