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 80215A0C41; Thu, 4 Nov 2021 15:16:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 67C9B42767; Thu, 4 Nov 2021 15:16:17 +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 7FCC242765 for ; Thu, 4 Nov 2021 15:16:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636035375; 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=/ekiH2Fi2blruavHIl9F1o0h2XN7OCjhTCL651f/V/4=; b=TACOYY0MVEf89++0udmRYk2WqHn1iltiLtPEOQy6YeO5xFypCgAQqhOd8WvP1DupJt0yxk XQ7OrMmmulxa8cdhfUg88Ao/loSSoLhcqMwAmPwKPMYsnC2kPuduHbDP9KhiQFIo+YPTf9 H4ZfgqgDk63kEWqIKc/OM7grUxOawGk= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-273-i0hae3m3OmWmB9EvcsRD4A-1; Thu, 04 Nov 2021 10:16:11 -0400 X-MC-Unique: i0hae3m3OmWmB9EvcsRD4A-1 Received: by mail-lf1-f69.google.com with SMTP id y40-20020a0565123f2800b003fded085638so2030251lfa.0 for ; Thu, 04 Nov 2021 07:16:11 -0700 (PDT) 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=/ekiH2Fi2blruavHIl9F1o0h2XN7OCjhTCL651f/V/4=; b=r0vtiEDVuUdlC7Jo5vEdK1pTfwmQFaDZLN2mjWLQvxsUyQ4n3pprcIk25tKf/IG7BS oYArnxHJU+yDbd+KDVJyIcOuRYMagO32JisEaoWWN1nxa40D5Q0zHtA+8TbfZS1GxuBM KallgGn489jRRDGP88VoDSdozmePexYTa1A4JlTIq1B2gTgzwLQFFsbw9eRN19Ct0H7w trLTfNmCJ6zAkvLWJ9Ap60LO3c8keR7PtjP92Iyc5GH00qCiHdhDpcZ6zlWnuhaPtwgw z1v3KL4LWQFryxgBy2Kvi93VgI2oUlb7sShqGkPtl3gzmjgOiBjQMpfGSl1l5Beb1lpJ 828A== X-Gm-Message-State: AOAM531I+4Xs2KfcZy48ElydVrMRQCnZ3wvZYvmyATRfJUM4Pnx+zZp5 DkrHZ8Ifl7nmj20gOdL70C9uQvXZDG+rXfYuE8Ep5XHDzLB9xESDRmUtwRSBa4bsSUPcE98o5Yb CEvpDscmr+A7JUZJemOE= X-Received: by 2002:a2e:b6d3:: with SMTP id m19mr18557080ljo.297.1636035370311; Thu, 04 Nov 2021 07:16:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyct5t1hiZ/gmvatWmcMmXuRy1XCoZHajGbrLlOQ4yARbeG6b79p6iNgfliQKFH0SN8WP4xlnxZHM/mrlyxn2Y= X-Received: by 2002:a2e:b6d3:: with SMTP id m19mr18557051ljo.297.1636035370085; Thu, 04 Nov 2021 07:16:10 -0700 (PDT) MIME-Version: 1.0 References: <20211102075259.3392-1-david.marchand@redhat.com> In-Reply-To: From: David Marchand Date: Thu, 4 Nov 2021 15:15:58 +0100 Message-ID: To: "Jiang, YuX" Cc: "dev@dpdk.org" , Harman Kalra 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" Subject: Re: [dpdk-dev] [PATCH] eal: fix device hotplug 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" On Tue, Nov 2, 2021 at 10:35 AM Jiang, YuX wrote: > > -----Original Message----- > > From: David Marchand > > Sent: Tuesday, November 2, 2021 3:53 PM > > To: dev@dpdk.org > > Cc: Jiang, YuX ; Harman Kalra > > Subject: [PATCH] eal: fix device hotplug > > > > The device event interrupt handler was always freed. > > > > Bugzilla ID: 845 > > Fixes: c2bd9367e18f ("lib: remove direct access to interrupt handle") > > > > Signed-off-by: David Marchand > > --- > > lib/eal/linux/eal_dev.c | 12 +++++++++--- > > 1 file changed, 9 insertions(+), 3 deletions(-) > > > > diff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c index > > 06820a3666..925cdba553 100644 > > --- a/lib/eal/linux/eal_dev.c > > +++ b/lib/eal/linux/eal_dev.c > > @@ -317,10 +317,12 @@ rte_dev_event_monitor_start(void) > > goto exit; > > } > > > > - if (rte_intr_type_set(intr_handle, RTE_INTR_HANDLE_DEV_EVENT)) > > + ret = rte_intr_type_set(intr_handle, > > RTE_INTR_HANDLE_DEV_EVENT); > > + if (ret) > > goto exit; > > > > - if (rte_intr_fd_set(intr_handle, -1)) > > + ret = rte_intr_fd_set(intr_handle, -1); > > + if (ret) > > goto exit; > > > > ret = dev_uev_socket_fd_create(); > > @@ -339,7 +341,10 @@ rte_dev_event_monitor_start(void) > > monitor_refcount++; > > > > exit: > > - rte_intr_instance_free(intr_handle); > > + if (ret) { > > + rte_intr_instance_free(intr_handle); > > + intr_handle = NULL; > > + } > > rte_rwlock_write_unlock(&monitor_lock); > > return ret; > > } > > @@ -370,6 +375,7 @@ rte_dev_event_monitor_stop(void) > > > > close(rte_intr_fd_get(intr_handle)); > > rte_intr_instance_free(intr_handle); > > + intr_handle = NULL; > > > > monitor_refcount--; > > > > -- > > 2.23.0 > Hi David, > > The patch https://patchwork.dpdk.org/project/dpdk/patch/20211102075259.3392-1-david.marchand@redhat.com/ > failed to verify. > > after executing "device_del dev1" in the qemu window, the testpmd window hangs to death and output as following: > EAL: Cannot find bus for device (0000:00:05.0) > EAL: Cannot find bus for device (0000:00:05.0) > EAL: Cannot find bus for device (0000:00:05.0) > EAL: Cannot find bus for device (0000:00:05.0) > EAL: Cannot find bus for device (0000:00:05.0) > EAL: Cannot find bus for device (0000:00:05.0) > EAL: Cannot find bus for device (0000:00:05.0) > EAL: Cannot find bus for device (0000:00:05.0) > EAL: Cannot find bus for device (0000:00:05.0) > EAL: Cannot find bus for device (0000:00:05.0) > EAL: Cannot find bus for device (0000:00:05.0) > EAL: Cannot find bus for device (0000:00:05.0) > EAL: Cannot find bus for device (0000:00:05.0) > EAL: Cannot find bus for device (0000:00:05.0) > EAL: Cannot find bus for device (0000:00:05.0) Replying on the ml, since the discussion mainly happened in bugzilla. This first patch was not enough, another issue was caught in the pci bus hotplug code. -- David Marchand