From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id CDE165938 for ; Fri, 13 Mar 2015 03:38:31 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 12 Mar 2015 19:38:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,392,1422950400"; d="scan'208";a="679461866" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga001.fm.intel.com with ESMTP; 12 Mar 2015 19:38:29 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t2D2cRuJ002163; Fri, 13 Mar 2015 10:38:27 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t2D2cOZ2012244; Fri, 13 Mar 2015 10:38:26 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t2D2cOxG012240; Fri, 13 Mar 2015 10:38:24 +0800 From: Yong Liu To: dev@dpdk.org Date: Fri, 13 Mar 2015 10:38:23 +0800 Message-Id: <1426214303-12207-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] app/testpmd: Fix not set need_reconfig flag when port id is RTE_PORT_ALL X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Mar 2015 02:38:33 -0000 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 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