[dpdk-dev] [PATCH v4 2/2] app/testpmd: support query of AGE action

Dekel Peled dekelp at nvidia.com
Wed Oct 7 15:28:43 CEST 2020


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 <dekelp at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
 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 418ea6d..7c50980 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1770,6 +1770,7 @@ void print_valid_ports(void)
 	union {
 		struct rte_flow_query_count count;
 		struct rte_flow_action_rss rss_conf;
+		struct rte_flow_query_age age;
 	} query;
 	int ret;
 
@@ -1792,6 +1793,7 @@ void print_valid_ports(void)
 	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",
@@ -1819,6 +1821,16 @@ void print_valid_ports(void)
 	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);
-- 
1.8.3.1



More information about the dev mailing list