From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D3BC6A0543; Fri, 12 Aug 2022 21:19:05 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3937A42C30; Fri, 12 Aug 2022 21:18:36 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id D4ED040A7F for ; Fri, 12 Aug 2022 21:18:30 +0200 (CEST) Received: from bree.oktetlabs.ru (bree.oktetlabs.ru [192.168.34.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPS id ACB45BD; Fri, 12 Aug 2022 22:18:30 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru ACB45BD Authentication-Results: shelob.oktetlabs.ru/ACB45BD; dkim=none; dkim-atps=neutral From: Ivan Malov To: dev@dpdk.org Cc: Ori Kam , Eli Britstein , Ilya Maximets , Thomas Monjalon , Stephen Hemminger , Jerin Jacob , Andrew Rybchenko , Aman Singh , Yuying Zhang Subject: [PATCH 06/13] app/testpmd: add port steering targets to sample flow action Date: Fri, 12 Aug 2022 22:18:20 +0300 Message-Id: <20220812191827.3187441-7-ivan.malov@oktetlabs.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220812191827.3187441-1-ivan.malov@oktetlabs.ru> References: <20220812191827.3187441-1-ivan.malov@oktetlabs.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Allow the use of actions PORT_REPRESENTOR / REPRESENTED_PORT as targets in "set sample_actions" command. Signed-off-by: Ivan Malov Reviewed-by: Andrew Rybchenko --- 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