From: Satheesh Paul Date: Mon, 21 Dec 2020 05:46:36 +0000 (+0530) Subject: app/testpmd: add PF and VF targets to sample flow action X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=5f94de1b3a89d58c70d26c6cec9b8a4fb4584eda;p=dpdk.git app/testpmd: add PF and VF targets to sample flow action Add support to specify PF or VF as targets in "set sample_actions" command. Signed-off-by: Satheesh Paul Acked-by: Ori Kam --- diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 1d962785b3..49d9f9c043 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -583,6 +583,7 @@ struct rte_flow_action_count sample_count[RAW_SAMPLE_CONFS_MAX_NUM]; struct rte_flow_action_port_id sample_port_id[RAW_SAMPLE_CONFS_MAX_NUM]; struct rte_flow_action_raw_encap sample_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]; static const char *const modify_field_ops[] = { "set", "add", "sub", NULL @@ -7918,6 +7919,14 @@ cmd_set_raw_parsed_sample(const struct buffer *in) (const void *)action->conf, size); action->conf = &sample_port_id[idx]; break; + case RTE_FLOW_ACTION_TYPE_PF: + break; + case RTE_FLOW_ACTION_TYPE_VF: + size = sizeof(struct rte_flow_action_vf); + rte_memcpy(&sample_vf[idx], + (const void *)action->conf, size); + action->conf = &sample_vf[idx]; + break; default: printf("Error - Not supported action\n"); return;