From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 0F9FBA0093;
	Mon,  7 Mar 2022 18:05:00 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 96FEC40688;
	Mon,  7 Mar 2022 18:04:59 +0100 (CET)
Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com
 [66.111.4.29]) by mails.dpdk.org (Postfix) with ESMTP id 0711B4014E
 for <dev@dpdk.org>; Mon,  7 Mar 2022 18:04:58 +0100 (CET)
Received: from compute2.internal (compute2.nyi.internal [10.202.2.46])
 by mailout.nyi.internal (Postfix) with ESMTP id 8F1085C03A4;
 Mon,  7 Mar 2022 12:04:57 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute2.internal (MEProxy); Mon, 07 Mar 2022 12:04:57 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 cc:cc:content-transfer-encoding:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:sender:subject:subject:to:to; s=fm1; bh=vm1QlaftwOpg0e
 OUVuh1d/eLdIUhv7NeBb0TFSmGDNo=; b=rrM8JjE09NJRd3/BikWUW7BRXNsA8x
 rg1cPw2mgBGVsmpPwlR8la0GXj/2WTPsG9OSKxVcAhr96TpiNnzaFFRQ3j04yBDF
 GJVasSimusUOCUDBjfcSu7NTgFTkcrMVBYHz87xXo0OVN4Hf6BWrqR4hbLPqXJ0j
 MXGTdrVNnYcEAtoYp5axSowK9ImbGmQmVCq9FMdQHjne0/hPyDW2FS/XsdlffcNS
 31Fr8hHGYcQAc4imok9d7cNF5Sev7faCr3iUVksh+8Gxqg95zTVd6QSS1y6AOG7w
 CcVNqlzNQT32GwH9pG1d0W55o/2qx4KYoaPEO9KEidii/r2LYNenI3bA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:date:date:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:sender:subject
 :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
 :x-sasl-enc; s=fm2; bh=vm1QlaftwOpg0eOUVuh1d/eLdIUhv7NeBb0TFSmGD
 No=; b=XnDfB9fUvobFGJsXb+ZyPfLWE5gjmPvg/bxwvsWtK4pZV0N8ZiGf708iu
 v5V4ICh0ZY4nv//CtcV8PZlWEVUTELyyk60dDXxLH0HSSAKACVjHZYXq0PjbB25G
 6PBy2k67YYysk0YFWcLg4hkdhMEK5JOxAlswwk1m5PWm/ymaA3D2IIjWG++Vx/y8
 emEgoReBl7jyDLenO1yl0dAGM8wxMDfFnjlJj6bphuaK/EQxR17SL2juXvDQsZEE
 aelWEAPijvH2hV0SHLIVRB6/ZUsd8HU2gHpBlX4hK3eMDHOl4WLfIASAvm6KbFsB
 98BygIPg4DzSWdqX7PWwy7AYbgTcQ==
X-ME-Sender: <xms:OTsmYo5sDVzFZ_PN912exh9nKT87toyaxtQ9vt1zXWWCt63f6ZIOfw>
 <xme:OTsmYp7oHMCuYGGmVb_ALNjHw4FQj2-cnvpTCipgEABVjtV2uT-sJ10haIEyEosOx
 4oIAdDDcMstXWFXvA>
X-ME-Received: <xmr:OTsmYndXVTIwcp-0OkMMmKveYKHMVyTDbBZZ8lIs819XrW3vfecJQUeaA7NKN9jcBqpHeG5_hzerOsshKm4f1_hR1A>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddruddugedgleehucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucdnkfhovfculdeitddmnecujfgurhephffvufffkf
 gjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhn
 uceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecuggftrfgrthhtvghrnhepud
 eggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeuieeivdffgeehnecuvehl
 uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghsse
 hmohhnjhgrlhhonhdrnhgvth
X-ME-Proxy: <xmx:OTsmYtKTgjP4cyD8L5FpJiaGHPX2XK_vEEq7pBdw7vOi7MnOHieMSw>
 <xmx:OTsmYsJgQ92D_LQaAIKZ2JmvW7PyNB8gULFlWkQnnJxxUZKa5KcyfA>
 <xmx:OTsmYuwaXa4GHFTD18OqMDvs9cqxtqQKZvkUXCDscQZrMpsBCX2vfZhNdA>
 <xmx:OTsmYk8RB5awbcbMrKy060Xs76KQJwNbxbE2WnT-9kWnYBmj_pHDZQ>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 7 Mar 2022 12:04:56 -0500 (EST)
From: Thomas Monjalon <thomas@monjalon.net>
To: "wenxuanx.wu@intel.com" <wenxuanx.wu@intel.com>, dev@dpdk.org
Cc: David Marchand <david.marchand@redhat.com>,
 Harman Kalra <hkalra@marvell.com>, Qiming Yang <qiming.yang@intel.com>,
 Qi Zhang <qi.z.zhang@intel.com>, dev <dev@dpdk.org>,
 Long Li <longli@microsoft.com>
Subject: Re: [DPDK] /lib/eal: fix failed to stop device monitor error
Date: Mon, 07 Mar 2022 18:04:55 +0100
Message-ID: <7429383.29KlJPOoH8@thomas>
In-Reply-To: <BY5PR21MB150648E7E56B8D89296827B2CE039@BY5PR21MB1506.namprd21.prod.outlook.com>
References: <20220211084131.72606-1-wenxuanx.wu@intel.com>
 <CAJFAV8wTCJ+xL5FftgAebrgULT9D=V-qrBr0dUA4P5hfJ6dfUg@mail.gmail.com>
 <BY5PR21MB150648E7E56B8D89296827B2CE039@BY5PR21MB1506.namprd21.prod.outlook.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

02/03/2022 11:53, Long Li:
> > Subject: Re: [DPDK] /lib/eal: fix failed to stop device monitor error
> > 
> > Hello,
> > 
> > 
> > The title should start with eal/linux:
> > 
> > On Fri, Feb 11, 2022 at 10:01 AM <wenxuanx.wu@intel.com> wrote:
> > >
> > > From: Wenxuan Wu <wenxuanx.wu@intel.com>
> > >
> > > The ret value in rte_dev_event_monitor_stop stands for whether the
> > > monitor has been successfully closed ,and should not bind with
> > > rte_intr_callback_unregister,so once it goes to the right exit point
> > > of rte_dev_event_monitor, the ret value should be set to 0.
> > >
> > > Also ,the refmonitor count has been carefully evaluated ,the value
> > > change from 1 to 0 ,so there is no potential memory leak failure.
> > 
> > Please, fix formatting around ',': a space should be after.
> > 
> > 
> > Is it a real issue you noticed? Or a theoretical issue based on code review,
> > reported by a static code analysis tool?
> > 
> > 
> > >
> > > Fixes: 1fef6ced07f3 ("eal/linux: allow multiple starts of event
> > > monitor") Cc:stable@intel.com
> > 
> > stable@dpdk.org
> > 
> > >
> > > Signed-off-by: Wenxuan Wu <wenxuanx.wu@intel.com>
> > 
> > 
> > 
> > > ---
> > >  lib/eal/linux/eal_dev.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c index
> > > bde55a3d92..4646e8a550 100644
> > > --- a/lib/eal/linux/eal_dev.c
> > > +++ b/lib/eal/linux/eal_dev.c
> > > @@ -384,6 +384,7 @@ rte_dev_event_monitor_stop(void)
> > >         close(rte_intr_fd_get(intr_handle));
> > >         rte_intr_instance_free(intr_handle);
> > >         intr_handle = NULL;
> > > +       ret = 0;
> > >
> > >         monitor_refcount--;
> > >
> > 
> > This change looks ok to me.
> > Harman, Long, wdyt?
> 
> The change looks good to me.

Applied, thanks.