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 04BB8A052B; Thu, 30 Jul 2020 23:18:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 96A092BB9; Thu, 30 Jul 2020 23:18:33 +0200 (CEST) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 907D92BB8 for ; Thu, 30 Jul 2020 23:18:31 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id EDCBA5C0041; Thu, 30 Jul 2020 17:18:30 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Thu, 30 Jul 2020 17:18:30 -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= CE+R5+sjIp5a1q9iHh5jMKSu5EXG85awe8HIwA4jubQ=; b=Wc8S/gCNeTyftQIV 2Gre2GaKHRz6i1FGskhJTPeN1IEDf5snaOdlGihzePW1y+Kk4N8IimjMAP93VJJZ jMuLe3jhqCg8iXsHbmi3YGl76X11tPZgcGvrTbeyK8VZtzGynmA64wFwF4YxwF9H vpRBYoUhuJGbYjUoQjzK484CjRHVN7A6Bt8yUWpVfLMAnE3TYZhIp5yqGvNZdayX Jxjz5Wg1TWRFLtFG7l9tzGC9kLvbCsIvDaWHV6cVuRk/nNXOdgIeS2c+Fgafc2nn 6/ZQyfEMzlt8PjuIgI/p+yFXDE9Zgl/iMzWBJXsQY6h+xehb2v8SLP9ebOvk1TrQ E1R5KA== 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=CE+R5+sjIp5a1q9iHh5jMKSu5EXG85awe8HIwA4ju bQ=; b=pK/uxGJgdVsYlNCGj/32S0tOgkcE/erU3KsInmF5+K2sq6bkmA3Hkej+8 /sNo8ljCuqWXP2BIsbJ35J+pBQi986kgvtCq0IgOEKnANec9L+M6qT6VRTUaDKGL J7GxYZANZGmavgnBajjRVxpXDWrFXtDQmnK7MAwbeAyBMND0/Z7BFLmMzk3k7fxg xpPpHcIzxFMyPThNDWGIZ3TXV7kJ3Q8j0XCHd1dbxM8QuZMTjB2uMhCt0g736ggr erYOfMl+0tnHTQ6I9XQJj+9fJXAB3/87/QmXJpLk1n1vUbhLUWhsTC/IGSGdmREO ydtvM3c6z17dQmchuKeiSBj6gllRg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrieeigdduiedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl 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 1114130607B0; Thu, 30 Jul 2020 17:18:29 -0400 (EDT) From: Thomas Monjalon To: Sarosh Arif Cc: dev@dpdk.org, reshma.pattan@intel.com, bruce.richardson@intel.com Date: Thu, 30 Jul 2020 23:18:28 +0200 Message-ID: <799298755.pgPqx7ZCVa@thomas> In-Reply-To: <20200605134114.23149-1-sarosh.arif@emumba.com> References: <20200605134114.23149-1-sarosh.arif@emumba.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] examples/packet_ordering: fix return value of parse_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" 05/06/2020 15:41, Sarosh Arif: > Giving invalid or zero portmask as command line option to > packet_ordering application will have an unexpected response. > The reason behind this is that parse_portmask's return value is > stored in a variable called portmask.The data type of portmask > 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 portmask is zero. > > Fixes: 850f3733f840 ("examples/packet_ordering: new sample app") > > Signed-off-by: Sarosh Arif Merged with same fix for other examples, thanks.