From fc547a92cf945abd9b4878aebe8392089804e279 Mon Sep 17 00:00:00 2001 From: Gregory Etelson Date: Thu, 10 Mar 2022 07:59:53 +0200 Subject: [PATCH] app/testpmd: fix flow rule with flex input link Testpmd reads flex item configuration from a JSON file. Flex item input link description is stored in testpmd flow item format. For example, `eth type is 0x0800`. The item description is placed into a general testpmd CLI flow rule command template and parsed to convert string into flow item object. The patch adds the `actions` section to the flow rule template. Fixes: 59f3a8acbcdb ("app/testpmd: add flex item commands") Cc: stable@dpdk.org Signed-off-by: Gregory Etelson Acked-by: Viacheslav Ovsiienko --- app/test-pmd/cmd_flex_item.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/cmd_flex_item.c b/app/test-pmd/cmd_flex_item.c index 9050825a81..78a89c0f8a 100644 --- a/app/test-pmd/cmd_flex_item.c +++ b/app/test-pmd/cmd_flex_item.c @@ -133,7 +133,8 @@ flex_link_item_parse(const char *src, struct rte_flow_item *item) struct rte_flow_item *pattern; struct rte_flow_action *actions; - sprintf(flow_rule, "flow create 0 pattern %s / end", src); + sprintf(flow_rule, + "flow create 0 pattern %s / end actions drop / end", src); src = flow_rule; ret = flow_parse(src, (void *)data, sizeof(data), &attr, &pattern, &actions); -- 2.20.1