DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: Fix not set need_reconfig flag when port id is RTE_PORT_ALL
@ 2015-03-13  2:38 Yong Liu
  2015-03-17  1:18 ` Ouyang, Changchun
  0 siblings, 1 reply; 3+ messages in thread
From: Yong Liu @ 2015-03-13  2:38 UTC (permalink / raw)
  To: dev

When port id is RTE_PORT_ALL, port_id_is_invalid will also return zero.
So this function will only set ports[255] need_reconfig flag, other ports will
be skipped.

Signed-off-by: Marvin liu <yong.liu@intel.com>

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 5b16a69..077d7a4 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -8874,14 +8874,7 @@ prompt(void)
 static void
 cmd_reconfig_device_queue(portid_t id, uint8_t dev, uint8_t queue)
 {
-	if (!port_id_is_invalid(id, DISABLED_WARN)) {
-		/* check if need_reconfig has been set to 1 */
-		if (ports[id].need_reconfig == 0)
-			ports[id].need_reconfig = dev;
-		/* check if need_reconfig_queues has been set to 1 */
-		if (ports[id].need_reconfig_queues == 0)
-			ports[id].need_reconfig_queues = queue;
-	} else {
+	if (id == (portid_t)RTE_PORT_ALL) {
 		portid_t pid;
 
 		FOREACH_PORT(pid, ports) {
@@ -8892,6 +8885,13 @@ cmd_reconfig_device_queue(portid_t id, uint8_t dev, uint8_t queue)
 			if (ports[pid].need_reconfig_queues == 0)
 				ports[pid].need_reconfig_queues = queue;
 		}
+	} else if (!port_id_is_invalid(id, DISABLED_WARN)) {
+		/* check if need_reconfig has been set to 1 */
+		if (ports[id].need_reconfig == 0)
+			ports[id].need_reconfig = dev;
+		/* check if need_reconfig_queues has been set to 1 */
+		if (ports[id].need_reconfig_queues == 0)
+			ports[id].need_reconfig_queues = queue;
 	}
 }
 
-- 
1.9.3

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-20 23:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-13  2:38 [dpdk-dev] [PATCH] app/testpmd: Fix not set need_reconfig flag when port id is RTE_PORT_ALL Yong Liu
2015-03-17  1:18 ` Ouyang, Changchun
2015-03-20 23:26   ` Thomas Monjalon

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git