Skip to content

Commit

Permalink
app/testpmd: fix flow rule with flex input link
Browse files Browse the repository at this point in the history
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: 59f3a8a ("app/testpmd: add flex item commands")
Cc: stable@dpdk.org

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
  • Loading branch information
getelson-at-mellanox authored and tmonjalo committed Mar 14, 2022
1 parent a058de2 commit fc547a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/test-pmd/cmd_flex_item.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fc547a9

Please sign in to comment.