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 4B1E1A0503 for ; Fri, 29 Apr 2022 16:25:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3F5CB42824; Fri, 29 Apr 2022 16:25:22 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id CD90C415D7 for ; Fri, 29 Apr 2022 16:25:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651242320; 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=B05cwiCUuNw+x6CgIptxDCNZ/35T/t0r5o1D4vLKKJ4=; b=hiWHwrSLcdlgysVj8f+HCzpJbdToM6r2Fr/jerMsAFoKapQXyqJGXyN6Nk34fKkIJDSdkI z4vhX7V0pFhFm3B90R8gT6uR0wbLVbFyYEntJK2LvXvPT6XLzk8pOIncBd8l8imrXestNn K4U0UffzLIiGty7lSe/ZyJHAlbPxAfw= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-222-qDHLrsGuMSGAc0W-SDix3g-1; Fri, 29 Apr 2022 10:25:18 -0400 X-MC-Unique: qDHLrsGuMSGAc0W-SDix3g-1 Received: by mail-lf1-f72.google.com with SMTP id g21-20020a056512119500b0047252f5c10cso126364lfr.3 for ; Fri, 29 Apr 2022 07:25:18 -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=B05cwiCUuNw+x6CgIptxDCNZ/35T/t0r5o1D4vLKKJ4=; b=Qqyo0ikMr4ru8Oc63aIj5adIb/D0l8wxW5GZLykCTL21WZsUaVv/3smkHJUQUXw2Be y6UuQBhpZ2jpXhCtQUJz2VJL4OVwKRfYkwGNhJ5FYbs9YBbWK0HhgLr5kxg6iR6YKQ4K /1rMkGYyeZbIqambhY9gfsYadHmdfOxdB2aU9VtpIFMQnhX8DYxQKIyTNQrQCrlbfhi+ q2ICI3S3D06w5N81rVjoCHC7/fOO3azgRxVpdrVnfDnOln6atSO8fGtCzb5Kh6CJ+u0T Ys7GIPIvktj2QwDRiloFVqnQJ3TaZJlbJbQ+6eg1kiX3bapDnGUZwR5slPuGuwfy6Kji My0Q== X-Gm-Message-State: AOAM532yUf993kiQpoH1xxsNNwTnHRgXsplRl24a835bQwzdfQTYmTPZ I72fbA+jFlaxCM1MX0DcxLIESaFUwJgBhBmTpK0yKCMn5rxATD3NNVULhxjgOv5HNWJsIypn81p sWjOeMceYklBYv5Nq/jpd7vM= X-Received: by 2002:a05:651c:179c:b0:247:e1b4:92aa with SMTP id bn28-20020a05651c179c00b00247e1b492aamr25715125ljb.55.1651242317001; Fri, 29 Apr 2022 07:25:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxo9GmvEBSWBbCFXFUaIDhuQT/rPAWj9sQpYfUnyRqyjYpBIoKhYYdV/Gvv8gdu0K4l86WeRRSKzF5ImpFUGIk= X-Received: by 2002:a05:651c:179c:b0:247:e1b4:92aa with SMTP id bn28-20020a05651c179c00b00247e1b492aamr25715108ljb.55.1651242316795; Fri, 29 Apr 2022 07:25:16 -0700 (PDT) MIME-Version: 1.0 References: <20220324150941.26157-1-david.marchand@redhat.com> In-Reply-To: From: David Marchand Date: Fri, 29 Apr 2022 16:25:04 +0200 Message-ID: Subject: Re: [PATCH] net/failsafe: fix interrupt handle leak To: Ferruh Yigit Cc: Gaetan Rivet , dpdk stable , Hyong Youb Kim , Harman Kalra , 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: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hello Ferruh, On Fri, Apr 29, 2022 at 3:56 PM Ferruh Yigit wrote: > > @@ -442,12 +428,16 @@ fs_rx_queue_setup(struct rte_eth_dev *dev, > > rxq->info.nb_desc = nb_rx_desc; > > rxq->priv = PRIV(dev); > > rxq->sdev = PRIV(dev)->subs; > > - ret = rte_intr_efd_enable(intr_handle, 1); > > - if (ret < 0) { > > +#ifdef RTE_EXEC_ENV_LINUX > > + rxq->event_fd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); > > + if (rxq->event_fd < 0) { > > + ERROR("Failed to create an eventfd: %s", strerror(errno)); > > fs_unlock(dev, 0); > > - return ret; > > + return -errno; > > } > > - rxq->event_fd = rte_intr_efds_index_get(intr_handle, 0); > > +#else > > + rxq->event_fd = -1; > > +#endif > > How this impacts the BSD? I don't know if driver used on BSD but > technically it looks supported. Atm, the driver calls rte_intr_efd_enable() which on Linux triggers an eventfd creation and a intr_handle->nb_intr++, but does nothing on FreeBSD. I did not test it with FreeBSD but I expect the previous call to rte_intr_efds_index_get(intr_handle, 0); return -1 (because of a earlier call to rte_intr_efds_index_set(intr_handle, 0, -1)). -- David Marchand