From 2f622174bf863563ed17aa9d298978bf88af75ce Mon Sep 17 00:00:00 2001 From: Dekel Peled Date: Wed, 7 Oct 2020 16:28:43 +0300 Subject: [PATCH] app/testpmd: support query of age action Following ethdev update in the previous patch of this series, this patch adds CLI support to query information related to AGE action. Signed-off-by: Dekel Peled Acked-by: Matan Azrad --- app/test-pmd/config.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index d4be6948b2..fe31a9d52f 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -1835,6 +1835,7 @@ port_flow_query(portid_t port_id, uint32_t rule, union { struct rte_flow_query_count count; struct rte_flow_action_rss rss_conf; + struct rte_flow_query_age age; } query; int ret; @@ -1857,6 +1858,7 @@ port_flow_query(portid_t port_id, uint32_t rule, switch (action->type) { case RTE_FLOW_ACTION_TYPE_COUNT: case RTE_FLOW_ACTION_TYPE_RSS: + case RTE_FLOW_ACTION_TYPE_AGE: break; default: printf("Cannot query action type %d (%s)\n", @@ -1884,6 +1886,16 @@ port_flow_query(portid_t port_id, uint32_t rule, case RTE_FLOW_ACTION_TYPE_RSS: rss_config_display(&query.rss_conf); break; + case RTE_FLOW_ACTION_TYPE_AGE: + printf("%s:\n" + " aged: %u\n" + " sec_since_last_hit_valid: %u\n" + " sec_since_last_hit: %" PRIu32 "\n", + name, + query.age.aged, + query.age.sec_since_last_hit_valid, + query.age.sec_since_last_hit); + break; default: printf("Cannot display result for action type %d (%s)\n", action->type, name); -- 2.20.1