From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 539A411A4 for ; Wed, 14 Nov 2018 04:10:32 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id CD2AA22F5B; Tue, 13 Nov 2018 22:10:31 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 13 Nov 2018 22:10:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=bWMgGCcETquw25NTqUekUHmAweiiAPXci6xUT58c+lA=; b=SquA0kJJuTfF ZkgtUYCNOA2X3LiO74m5yumsuJ0Hf7p3vSs9MKTJxLoPUYXlXHclYIJaZi8YiJeY 9Qh3HAu+m0f/nIDPdCATqgmi/e+Rw0o/rWZqUvVI7NQDrtHU3xRxYQfYDhRUAJMi 4M9NMCCbKm7RC5Wl/btiCAr8tm+rR5M= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=bWMgGCcETquw25NTqUekUHmAweiiAPXci6xUT58c+ lA=; b=SAvanrpJP1MJG2PNhKYAsZ+WAJLkwLPpOodefgNeIJ469WCQvPTv/J/4o m2u1q2TFgvkZKm/2hUP+GsJLSqZ6rv2zayPF4lVMfGits1MNqao/7VZnLgi2Gh0r Wo0zQAKuox+XxVVWxPO8yslbk3wR7xOc67n/BN4GQRYvxph1J5+G/XcENOHu4Cd2 vP/8mNo00wTY1np7yV/QOHcP4yd0c2E9WLgEUOdKHWsNkgxiyW8l8nzVOR0+LuK8 sCqAC1Q6Yo2DVayDx/vyc2Ab7rIM5DuXx578oZ4aBoBo0In0zlAS6hlwBvlwYmmm dJtxjJsmpu2vYRZ+3JOSjNmDag5+A== X-ME-Sender: X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id F1BBF102A0; Tue, 13 Nov 2018 22:10:29 -0500 (EST) From: Thomas Monjalon To: Li Han Cc: dev@dpdk.org, reshma.pattan@intel.com Date: Wed, 14 Nov 2018 04:10:28 +0100 Message-ID: <3847235.2WWUCME0sW@xps> In-Reply-To: <1541571009-12396-1-git-send-email-han.li1@zte.com.cn> References: <1541571009-12396-1-git-send-email-han.li1@zte.com.cn> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3] app/proc-info: fix port mask parse issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2018 03:10:32 -0000 Hi, 07/11/2018 07:10, Li Han: > parse_portmask return type is int,but global variable > "enabled_port_mask" type is uint32_t.so in proc_info_parse_args > function,when parse_portmask return -1,"enabled_port_mask" will > get a huge value and "if (enabled_port_mask == 0)" will never happen. > > Fixes: 22561383ea17 ("app: replace dump_cfg by proc_info") > Signed-off-by: Li Han [...] > -static uint32_t enabled_port_mask; > +static uint64_t enabled_port_mask; [...] > -static int > +static unsigned long > parse_portmask(const char *portmask) On one side, you use uint64_t, on the other side, you use unsigned long. I don't understand the logic behind.