From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 919C7A0546; Tue, 6 Apr 2021 17:40:44 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 681E214120D; Tue, 6 Apr 2021 17:40:44 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mails.dpdk.org (Postfix) with ESMTP id 7AFD914120A for ; Tue, 6 Apr 2021 17:40:42 +0200 (CEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 182515C019D; Tue, 6 Apr 2021 11:40:42 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 06 Apr 2021 11:40:42 -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=fm3; bh= PHpE4y1CLSGg5vJfZD4sQgXNpqXFjBurZZN4oGyf8EE=; b=a5HRtxqesjgyqDcA Q7kjNwb3RYn3v/FmEiCWuhILJBF6sLhCwk0gzHvrPG+BmLqIt7vivaZHbF+S3vEi rcB0plULIvNnx1XgawKppr3E7EUzY8Dl8jp6HkGmMIgl6nYAijRAx5IKGwmYwMLc okL3mw72qy8fjrjtDvXnYPc6fj7GtOAjTMbEGadEOifS45W+nQyDj0rTy06CUPVa 0ykhm5K2Z4MeFfLrnqCLNC8L56flVcBZF0vgqe19mij8ZZa79YvK0yjCwuJNHKs1 2WIk1rLAgSGGM43vA5vdRnrnFyJPsUWiKOc5C+Anls/wPtu1pRm9a2AvGs0TcM7L 4fFdIA== 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=fm2; bh=PHpE4y1CLSGg5vJfZD4sQgXNpqXFjBurZZN4oGyf8 EE=; b=hng9TFVtp4ARVFYy/++C+iqcVqvBRKu718YVvsuDSpwnhuQq+GydE5b47 4RDXgPnnViFTuP3onvM6atZLUEIgyx96mYbVmsZOHw9JfMHdwDsQp9eWvgB+TpY2 ttGhYAWq5Wmy+MzzsBsErtR4XooOS7ZAaKiNt9+Pfv7hnJ7AeBP/iXPGR2viwCb+ hpD5471HSGmvmR9+s6okdfcJMM9s6IyolEd95CKdXEkCCEbgzQy9RhAoBdhKKDIn h5uTOImPgv6FVC8LMi8Qk4u3dLWXB3czowwP9BeHUDU5deh/34BrNSFNbq5BHGoT hWcijyxZAWvha3PLXzTTZWXZEbfCw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudejhedgfeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtqhertddttdejnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepkeethedtieevhfeigeejleegudefjeehkeekteeuveeiuedvveeu tdejveehveetnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf 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 15F29240066; Tue, 6 Apr 2021 11:40:41 -0400 (EDT) From: Thomas Monjalon To: =?utf-8?B?U3RhbmlzxYJhdw==?= Kardach Cc: dev@dpdk.org, Michal Krawczyk , erik.g.carrillo@intel.com Date: Tue, 06 Apr 2021 17:40:38 +0200 Message-ID: <1669035.bN16AnX8SA@thomas> In-Reply-To: References: <20210326104759.280175-1-mk@semihalf.com> <3282663.DU2RlWCeFW@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH 2/2] test: proceed if timer subsystem was initialized X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" 06/04/2021 17:31, Stanis=C5=82aw Kardach: > Hi Thomas, >=20 > Thanks for the review. >=20 > On Tue, Apr 6, 2021 at 5:24 PM Thomas Monjalon wrot= e: >=20 > > 26/03/2021 11:47, Michal Krawczyk: > > > From: Stanislaw Kardach > > > > > > rte_timer_subsystem_init() may return -EALREADY if the timer subsystem > > > was already initialized. This can happen i.e. in PMD code (see > > > eth_ena_dev_init). This is not an error, rather a notification as the > > > initialization function simply returns without any action taken. > > > > Missing these lines: > > > > Fixes: 50247fe03fe0 ("test/timer: exercise new APIs in secondary proces= s") > > Cc: stable@dpdk.org >=20 > Will add in V2. >=20 > > > > > > > Signed-off-by: Stanislaw Kardach > > > Reviewed-by: Michal Krawczyk > > > --- > > > app/test/test.c | 11 ++++++----- > > > 1 file changed, 6 insertions(+), 5 deletions(-) > > > > > > diff --git a/app/test/test.c b/app/test/test.c > > > index 624dd48042..864523ed61 100644 > > > --- a/app/test/test.c > > > +++ b/app/test/test.c > > > @@ -134,8 +134,13 @@ main(int argc, char **argv) > > > goto out; > > > } > > > > > > + argv +=3D ret; > > > + > > > + prgname =3D argv[0]; > > > + > > > #ifdef RTE_LIB_TIMER > > > - if (rte_timer_subsystem_init() < 0) { > > > + ret =3D rte_timer_subsystem_init(); > > > + if (ret < 0 && ret !=3D -EALREADY) { > > > ret =3D -1; > > > goto out; > > > } > > > @@ -146,10 +151,6 @@ main(int argc, char **argv) > > > goto out; > > > } > > > > > > - argv +=3D ret; > > > - > > > - prgname =3D argv[0]; > > > - > > > > How this change for argv/prgname is related to the fix? > > > This patch saves the return value of rte_timer_subsystem_init() in ret > which overwrites the previous ret that held the number of arguments > consumed by rte_eal_init(). Similarly because rte_eal_init() reshuffles > argv, the prgname is effectively at argv[ret]. So I need to move this log= ic > before the timer subsystem check. OK I didn't see the consequence on ret variable. In this case I can merge with the added lines. No need of v2.