From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 090F4C433DF for ; Sat, 11 Jul 2020 10:01:05 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 92C0E20720 for ; Sat, 11 Jul 2020 10:01:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=monjalon.net header.i=@monjalon.net header.b="AGCR0aGj"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="cHZu34BO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 92C0E20720 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=monjalon.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D5A221D93F; Sat, 11 Jul 2020 12:01:03 +0200 (CEST) Received: from new1-smtp.messagingengine.com (new1-smtp.messagingengine.com [66.111.4.221]) by dpdk.org (Postfix) with ESMTP id 37E1F1D93D; Sat, 11 Jul 2020 12:01:02 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailnew.nyi.internal (Postfix) with ESMTP id D960958172F; Sat, 11 Jul 2020 06:01:01 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Sat, 11 Jul 2020 06:01:01 -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= 2YL9DUyjHI1VUwn2lY+wIZu4Nu2lFAJ9Sb6jURkp3Q8=; b=AGCR0aGjHc7VTndU rV6BWzqJalY9bvZxc0BvON7yT/E1KhE6OU6jAQALk7tUexuLFyN5DKTd9aqjRMOI bZNNuhRKXD+ZRee9IGaL1vzgBm0bevSnHgqlcygzWr9bvOtDqHhqIJ585Y4LrTeS pfgp973Hx+lZfQYj22mK0n7b3rEBV60rRkGIc9VpzI0WUQFdd9ed9I5vSCcUtItt uGyMQtBdWAQFCpGHpcgVMbyMqF3mEt2wZtPZXIJSqQJoSwDvXDfzKpWf9IeF8Irg +AWepU1UWACzxLZst5OPQR/gOzZanDdUpiKIsQRwLeTWhV6cOhpU7skniRUhIW26 NAwZ0g== 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=2YL9DUyjHI1VUwn2lY+wIZu4Nu2lFAJ9Sb6jURkp3 Q8=; b=cHZu34BOHmxRQLcuFVdVLkSftsqDOJM+NcXr7tKWNCCu2pwip3JmZL6az 9dT6eKHPH7Mmi3wIpl/gg9a0uT6cj4DRdUDMS/6B6lN01Soe/P5gU4i6tFO5l9N3 2dhIfP55FC+7jTY89CyGT0hoOygzpm6mYjeeQhCdBJxLB6kDKy4/h9jIAgId5XeV AjVvAiTfuNWDGG9Uwl5x08iyheu5C42nUVSJ5IAfoj9Xm2ljJs/RV4/tVyKPQVhQ kkhfj1p/HZeb8dnq2rZsllsBHgRTYxSuh0Vs/OiRyNLnA+S7CJC8Yqo0ix1z34Jo JjJE55DxVGFYE10qONyV98JegfWKw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrvdefgddvgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho nhdrnhgvth 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 9B2AB306005F; Sat, 11 Jul 2020 06:00:59 -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, bruce.richardson@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, david.marchand@redhat.com Date: Sat, 11 Jul 2020 12:00:58 +0200 Message-ID: <2105820.9fF9r4LGxE@thomas> In-Reply-To: <20200611123624.25319-1-sarosh.arif@emumba.com> References: <20200611123624.25319-1-sarosh.arif@emumba.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [dpdk-stable] [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" Why nobody reviewed? Isn't there some maintainers of example apps? 11/06/2020 14:36, Sarosh Arif: > 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. After looking at few examples, the function returns a signed int. > If we return 0 instead of -1 this issue can be resolved. Yes, the caller of the function seems to expect 0 as error value. > The program already contains the functionality to print > "invalid portmask" and program usage if zero is returned. > > Signed-off-by: Sarosh Arif