DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dekel Peled <dekelp@nvidia.com>
To: wenzhuo.lu@intel.com, beilei.xing@intel.com, bernard.iremonger@intel.com
Cc: matan@nvidia.com, dev@dpdk.org
Subject: [dpdk-dev] [PATCH] app/testpmd: support query of AGE action
Date: Thu,  1 Oct 2020 09:53:11 +0300	[thread overview]
Message-ID: <7e60adb8f3857e7b2bc9bf8d588b280667acd7ca.1601534899.git.dekelp@nvidia.com> (raw)

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(+)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 17a6efe..d8e1ca3 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1767,6 +1767,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;
 
@@ -1789,6 +1790,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",
@@ -1816,6 +1818,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);
-- 
1.8.3.1


             reply	other threads:[~2020-10-01  6:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-01  6:53 Dekel Peled [this message]
2020-10-01 17:04 ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7e60adb8f3857e7b2bc9bf8d588b280667acd7ca.1601534899.git.dekelp@nvidia.com \
    --to=dekelp@nvidia.com \
    --cc=beilei.xing@intel.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=wenzhuo.lu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).