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 C83EFA04FF; Fri, 29 Apr 2022 16:25:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 71D0D415D7; Fri, 29 Apr 2022 16:25:21 +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 CA88B410E3 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-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-222-hFsJ5bqxM1WcH3RHS5gBAQ-1; Fri, 29 Apr 2022 10:25:18 -0400 X-MC-Unique: hFsJ5bqxM1WcH3RHS5gBAQ-1 Received: by mail-lf1-f70.google.com with SMTP id bp36-20020a05651215a400b004722f090903so3240002lfb.22 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=COPiELsA8DsrS+I1Tbz4FVc+rmNJxoIPzOAbikx/Ju/qBWSVOlhGcFM50SvaWVAnad gY6m8+UvDlNjICNFa16QS5qcnjQ6snufhlb/v27N68PTfcEEMunNlDPRpsRGE4QCGMX9 y3Wi/4noBPyT0ABWlrJ+CHKGQO2jr/gIg/Kp1gOnVWtKY2OMjZ7qrNE7aqB21HSzh/QT K1K7vFriSHG99mClQhdGaXt5phQW0TXjz5l3H2uOH3EDlqCE9jjtZlqGvR0MY5xqXn95 km4r66NcZ6wso3M2ovRDVVFCqPDROXeFVEWz5VmqPvpEUlAY+nbcoBBM1vlzcRpdwH1R WDyQ== X-Gm-Message-State: AOAM531z8F2vYwLdhPrxBISwLIzhaFtMe7qkB34uXuR7Ga9a/UrpzDlJ I4Z76F6QnzT2l2wOSc/MMcqRo0vNbE6EMvMHs3qKu9u4axPW1Qz6ZRqW9Xnbu3yJAv5WqH6+OYb G7W36iK1N+tGI5eZHR0s= X-Received: by 2002:a05:651c:179c:b0:247:e1b4:92aa with SMTP id bn28-20020a05651c179c00b00247e1b492aamr25715134ljb.55.1651242317098; 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: 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 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