From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by dpdk.org (Postfix) with ESMTP id CCA125A4B for ; Thu, 5 Mar 2015 08:30:19 +0100 (CET) Received: by paceu11 with SMTP id eu11so26481355pac.1 for ; Wed, 04 Mar 2015 23:30:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=L+s9hEMJr99vUzYJq+GSnMNOnazbf4CA9CKKQd0GGPE=; b=BKrvrr4nXc+4M12LomVSh+qK8IuWR6/lFmDFOi60DlPiXkDB6zKJeiusaWTbnZknlE xVJzcpjMme3VH/v6DlYVHnf4zOR9wZMAPsHORjZYubGmyKhJqk2ASfZ7/5q8hwqua1/H fg6Ndi84KTB1KgJ2SLSLXb9asDGJxU8eNuj76RI59BAx/nqeVnqEDazdXn1dhY8zKLx8 ho29uvnpBb2iMMdmi86wdhtIw/eVJbJnPjLwdHq/sg2uy/bwD7chFJN8IZgrF5dVE8cG dMYrJsDm7hJMuhbnGK7geJ0n+3SymkFzORE0m6UwF7q94LdHFwlRabazUBbd2MUiwhod 3r0Q== X-Gm-Message-State: ALoCoQnd2qv83FHcXrYC4JihZadv5pAlh4VBw9uFsGbtajhGfOXuDVt5D8b06svewThGMFelbMAL X-Received: by 10.68.57.168 with SMTP id j8mr13378753pbq.135.1425540618986; Wed, 04 Mar 2015 23:30:18 -0800 (PST) Received: from localhost.localdomain (napt.igel.co.jp. [219.106.231.132]) by mx.google.com with ESMTPSA id s4sm5997941pdc.61.2015.03.04.23.30.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Mar 2015 23:30:18 -0800 (PST) From: Tetsuya Mukawa To: dev@dpdk.org Date: Thu, 5 Mar 2015 16:30:06 +0900 Message-Id: <1425540606-12554-1-git-send-email-mukawa@igel.co.jp> X-Mailer: git-send-email 1.9.1 Subject: [dpdk-dev] [PATCH] testpmd: Fix port validation code of "port stop all" command 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: Thu, 05 Mar 2015 07:30:20 -0000 When "port stop all" is executed, the command doesn't work as it should because of wrong port validation. The patch fixes this issue. Reported-by: Pablo de Lara Signed-off-by: Tetsuya Mukawa --- app/test-pmd/testpmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 61291be..bb65342 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -1484,7 +1484,7 @@ stop_port(portid_t pid) printf("Stopping ports...\n"); FOREACH_PORT(pi, ports) { - if (!port_id_is_invalid(pid, DISABLED_WARN) && pid != pi) + if (pid != pi && pid != (portid_t)RTE_PORT_ALL) continue; port = &ports[pi]; -- 1.9.1