Thread (49 messages) 49 messages, 6 authors, 2017-10-20

Re: [PATCH v2 2/2] app/testpmd: add CLI for tm mode

From: De Lara Guarch, Pablo <hidden>
Date: 2017-09-18 14:06:35

-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jasvinder Singh
Sent: Thursday, September 14, 2017 12:53 PM
To: dev@dpdk.org
Cc: Dumitrescu, Cristian <redacted>; Wu, Jingjing
[off-list ref]
Subject: [dpdk-dev] [PATCH v2 2/2] app/testpmd: add CLI for tm mode

Add following CLIs in testpmd application;
- commands to build hierarchical tree for the QoS Scheduler.
- commands for runtime update of the hierarchical tree.
- commands to display TM capability information.
  (per port, per hierarchy level and per hierarchy node)
- command to set the packet field mask and offset value for
  classification.
- command to set traffic class translation table entry
- stats collection
This patch should be split into multiple patches, as it is quite big
and it is adding multiple commands that can be arranged in different
categories, in different patches.

Also, as you are adding several commands about traffic management,
you could separate these in a different file (i.e. cmdline_tm.c).

quoted hunk ↗ jump to hunk
Signed-off-by: Jasvinder Singh <redacted>
---
 app/test-pmd/cmdline.c | 2975
++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 2785 insertions(+), 190 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index cd8c358..cb837ce 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
...
+
+	/* Command type: add */
+	if (strcmp(res->cmd_type, "add") == 0) {
+		/* Port link status */
+		rte_eth_link_get_nowait(port_id, &link);
+		if (link.link_status == ETH_LINK_UP) {
+			printf(" Port %u link up (error)\n", port_id);
+			return;
+		}
If you are checking if the device is started or stopped,
you should probably use "is_port_started" function.
+
+		/* TM hierarchy status */
+		if (port->softport.tm.hierarchy_frozen == 1)
+			port->softport.tm.hierarchy_frozen = 0;
+	}
+
+	/* Command type: set (update) */
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help