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 EAB25A034F; Tue, 1 Mar 2022 10:58:14 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D863940DF6; Tue, 1 Mar 2022 10:58:14 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id DAA85407FF for ; Tue, 1 Mar 2022 10:58:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646128692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5ZfUQr/+IZ3nk11oksC4Kiaw9KjlkMLFvJZti94clck=; b=Kf36xnwfowDryjvAQRNDCSYCI4Lvz/tz3paMf/cv2lpOdxk3I/SpUEnCCjv8IDWSWB/Ep4 RTl459ZunjtEHYrDUGR/QDWrKYUeJLKSWdAWCxiyvpSAcTrBzYAnm0n1tXkK78VckW8Wb0 Q1O+MtzYMuaCyDqIfBXswzYIYYc9RYM= Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-659-vAVBFMHNNdmb3GcaRu4Bog-1; Tue, 01 Mar 2022 04:58:11 -0500 X-MC-Unique: vAVBFMHNNdmb3GcaRu4Bog-1 Received: by mail-lj1-f198.google.com with SMTP id x7-20020a2e9c87000000b002463977afe4so7070976lji.21 for ; Tue, 01 Mar 2022 01:58:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5ZfUQr/+IZ3nk11oksC4Kiaw9KjlkMLFvJZti94clck=; b=ayFE7FJOq/w8aIUDx3vzuuGExb3E2YbIpOIEnqEzPWBMcgCzfY3BlYUwGB3sLHVcYx jxxOnSyBcALyGEuTaLfuOSirfswouDyweVWHw+JcpnmoFmvG2uIx2zW//NgmE2R6nJi/ KTWowr4aTAxNHul5q2nKPRGW52533o2dJZwtei0XBw9yfFN/bWXMZW4M1Oj81ighPdH3 sTpALBgRJgv73ZWOr8tkPo4yySDq+1UDLJQUwCHl9GzOznL8/FLxWMjt2hAIlUya7FWS RlYPWo+dyLL/yRiPQrqCgNv2IHipB2BkJJUF8WDJaQUfqDCMgtUe5dzz3jEpxB+NWb9Y sgIQ== X-Gm-Message-State: AOAM530t+hQQ0z/5qYzHSKQDZfb0PzfzaoPkewMY9zTUEsiIrZl52hyJ pWfe8igZ7sN8x/jITv4aVbJHbuKRnlmeJfTwb48oJezjnPL7aLbMRb88ENoR3rsmDWSAv12EfO1 kjYBvEegVslu7GlltY7o= X-Received: by 2002:a19:a414:0:b0:443:13e0:45dd with SMTP id q20-20020a19a414000000b0044313e045ddmr14660580lfc.560.1646128689817; Tue, 01 Mar 2022 01:58:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJwQX+ZG4ibr1u7xUFGhrldmMpfnMyFYEaKZ/XuMFMGALEwsgjqYCkSJYDFc/JP2uKTi1QoGXKrwZ0wtpCEYQBk= X-Received: by 2002:a19:a414:0:b0:443:13e0:45dd with SMTP id q20-20020a19a414000000b0044313e045ddmr14660572lfc.560.1646128689601; Tue, 01 Mar 2022 01:58:09 -0800 (PST) MIME-Version: 1.0 References: <20220211084131.72606-1-wenxuanx.wu@intel.com> In-Reply-To: <20220211084131.72606-1-wenxuanx.wu@intel.com> From: David Marchand Date: Tue, 1 Mar 2022 10:57:58 +0100 Message-ID: Subject: Re: [DPDK] /lib/eal: fix failed to stop device monitor error To: wenxuanx.wu@intel.com, Harman Kalra , Long Li Cc: Qiming Yang , Qi Zhang , dev Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 Hello, The title should start with eal/linux: On Fri, Feb 11, 2022 at 10:01 AM wrote: > > From: Wenxuan Wu > > 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 > --- > 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? -- David Marchand