[v2,2/2] app/testpmd: support query of AGE action

Message ID a98fe9bd8be2c05dfb3cc32c942d069b4cadf163.1601580235.git.dekelp@nvidia.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series support query of AGE action |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing warning Testing issues

Commit Message

Dekel Peled Oct. 1, 2020, 7:32 p.m. UTC
Following ethdev update [1], this patch adds CLI support to query
information related to AGE action.

[1] https://mails.dpdk.org/archives/dev/2020-September/183699.html

Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 app/test-pmd/config.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
  

Patch

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 418ea6d..cb268d0 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"
+		       " last_hit_time_valid: %u\n"
+		       " last_hit_time: %" PRIu32 "\n",
+		       name,
+		       query.age.aged,
+		       query.age.last_hit_time_valid,
+		       query.age.last_hit_time);
+		break;
 	default:
 		printf("Cannot display result for action type %d (%s)\n",
 		       action->type, name);