COUNT action has been modified and has several fields not addressable
though testpmd. In addition, as those fields are not definable testpmd
is providing an empty configuration which is undefined.
Fixes:
fb8fd96d4251 ("ethdev: add shared counter to flow API")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
ACTION_QUEUE_INDEX,
ACTION_DROP,
ACTION_COUNT,
ACTION_QUEUE_INDEX,
ACTION_DROP,
ACTION_COUNT,
+ ACTION_COUNT_SHARED,
+ ACTION_COUNT_ID,
ACTION_RSS,
ACTION_RSS_FUNC,
ACTION_RSS_LEVEL,
ACTION_RSS,
ACTION_RSS_FUNC,
ACTION_RSS_LEVEL,
+static const enum index action_count[] = {
+ ACTION_COUNT_ID,
+ ACTION_COUNT_SHARED,
+ ACTION_NEXT,
+ ZERO,
+};
+
static const enum index action_rss[] = {
ACTION_RSS_FUNC,
ACTION_RSS_LEVEL,
static const enum index action_rss[] = {
ACTION_RSS_FUNC,
ACTION_RSS_LEVEL,
[ACTION_COUNT] = {
.name = "count",
.help = "enable counters for this rule",
[ACTION_COUNT] = {
.name = "count",
.help = "enable counters for this rule",
- .priv = PRIV_ACTION(COUNT, 0),
- .next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
+ .priv = PRIV_ACTION(COUNT,
+ sizeof(struct rte_flow_action_count)),
+ .next = NEXT(action_count),
+ [ACTION_COUNT_ID] = {
+ .name = "identifier",
+ .help = "counter identifier to use",
+ .next = NEXT(action_count, NEXT_ENTRY(UNSIGNED)),
+ .args = ARGS(ARGS_ENTRY(struct rte_flow_action_count, id)),
+ .call = parse_vc_conf,
+ },
+ [ACTION_COUNT_SHARED] = {
+ .name = "shared",
+ .help = "shared counter",
+ .next = NEXT(action_count, NEXT_ENTRY(BOOLEAN)),
+ .args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_count,
+ shared, 1)),
+ .call = parse_vc_conf,
+ },
[ACTION_RSS] = {
.name = "rss",
.help = "spread packets among several queues",
[ACTION_RSS] = {
.name = "rss",
.help = "spread packets among several queues",
MK_FLOW_ACTION(FLAG, 0),
MK_FLOW_ACTION(QUEUE, sizeof(struct rte_flow_action_queue)),
MK_FLOW_ACTION(DROP, 0),
MK_FLOW_ACTION(FLAG, 0),
MK_FLOW_ACTION(QUEUE, sizeof(struct rte_flow_action_queue)),
MK_FLOW_ACTION(DROP, 0),
- MK_FLOW_ACTION(COUNT, 0),
+ MK_FLOW_ACTION(COUNT, sizeof(struct rte_flow_action_count)),
MK_FLOW_ACTION(RSS, sizeof(struct rte_flow_action_rss)),
MK_FLOW_ACTION(PF, 0),
MK_FLOW_ACTION(VF, sizeof(struct rte_flow_action_vf)),
MK_FLOW_ACTION(RSS, sizeof(struct rte_flow_action_rss)),
MK_FLOW_ACTION(PF, 0),
MK_FLOW_ACTION(VF, sizeof(struct rte_flow_action_vf)),