From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DFFA9A052B; Thu, 30 Jul 2020 23:09:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C35891C00F; Thu, 30 Jul 2020 23:09:05 +0200 (CEST) Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) by dpdk.org (Postfix) with ESMTP id E72672BB8; Thu, 30 Jul 2020 23:09:04 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailnew.nyi.internal (Postfix) with ESMTP id 64DCD58066E; Thu, 30 Jul 2020 17:09:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Thu, 30 Jul 2020 17:09:03 -0400 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=fm1; bh= B2AQfYNDo9whpAz03IWa45q9iYnDLWKgYEwjVgmjRcg=; b=s9G5exk9p6TsO+rS tka0A8zJKHDAELrxYX1T2HWg7jipwViVOzi94JPYvwM0SWPuyjLFexS3/i3L+MVb KjZqtczMFlpz88QrPBMyYGHt3LZhEuyJ738lFfARniI9zxmG5DkpOvA0pUHCuTJi fD550MZkfcUnT6R8T01HJhSDjH5qyBjc1/yJIkgf+tRn5Q+q8luF6dmG/sFXWi9v ocfGqr9zgYW1lij5P8Ajs2C1Lzeuz/JIzEY70jeQUA8gm5b417q8uarA8w1R1mv7 StPmCmxyD22WnhrzBBuLmu2ufT8awihP/VrWjAnaumtdkobzVokh/oHPzrFqRgyl q1VdjQ== 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=fm3; bh=B2AQfYNDo9whpAz03IWa45q9iYnDLWKgYEwjVgmjR cg=; b=e8Fyny3NBOQlUQzjf6KiEYUYVSyBsXQCm4xiRS9EZpnT8nEuBk3KfGR9V k0pVpx1ZcdqAg+BYcUNNsZ4vW3nDxHkKj2k02KFlROZjw0dUpfXgXef5aFQWML81 tXeX7x6Mitwkmkn6c08AZCDn/hw99d8l36TiK3GQP8KyrY0FDbpBQo0avIb2fgNq orZv95SjaUzp+FvpTdQZnmts4qo6r/80MumvW3EdSc1wo8uo+o7lmNCRArl0uzRn /eN7QFDjfjojMVkTfS5fOebJ+E2lUz9T8mcsQcOB8B+X7ww7eMkhu92xZN1QTLXY GL1i0pWQq+AA9EQ+HuvZrhFjGJA6Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrieeigdduheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght 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 7E8933280066; Thu, 30 Jul 2020 17:09:00 -0400 (EDT) From: Thomas Monjalon To: Sarosh Arif Cc: dev@dpdk.org, drc@linux.vnet.ibm.com, maxime.coquelin@redhat.com, zhihong.wang@intel.com, xiaolong.ye@intel.com, konstantin.ananyev@intel.com, david.hunt@intel.com, jerinj@marvell.com, skori@marvell.com, john.mcnamara@intel.com, kirill.rybalchenko@intel.com, stable@dpdk.org, Bruce Richardson Date: Thu, 30 Jul 2020 23:08:58 +0200 Message-ID: <4092408.OuC6MW89ze@thomas> In-Reply-To: <20200721160727.GI735@bricha3-MOBL.ger.corp.intel.com> References: <20200611123624.25319-1-sarosh.arif@emumba.com> <20200721160727.GI735@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] examples: fix return value of function that parses portmask 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 21/07/2020 18:07, Bruce Richardson: > On Thu, Jun 11, 2020 at 05:36:24PM +0500, Sarosh Arif wrote: > > Giving invalid or zero portmask as command line option to > > these applications will have an unexpected response. > > The reason behind this is that the return value of function > > that parses portmask is stored in a variable whose datatype is > > unsigned int, hence returning -1 in case of zero or > > invalid portmask causes an unexpected behaviour. > > If we return 0 instead of -1 this issue can be resolved. > > The program already contains the functionality to print > > "invalid portmask" and program usage if zero is returned. > > > > Signed-off-by: Sarosh Arif > > --- > > Checked a number of the examples and all seem to behave similarly to > described. This looks a good fix. > > Acked-by: Bruce Richardson Applied, thanks