Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/108845/?format=api
http://patches.dpdk.org/api/patches/108845/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220324150941.26157-1-david.marchand@redhat.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20220324150941.26157-1-david.marchand@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220324150941.26157-1-david.marchand@redhat.com", "date": "2022-03-24T15:09:41", "name": "net/failsafe: fix interrupt handle leak", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "277581db654c09bda0aba02c38d36e21fb4bea66", "submitter": { "id": 1173, "url": "http://patches.dpdk.org/api/people/1173/?format=api", "name": "David Marchand", "email": "david.marchand@redhat.com" }, "delegate": { "id": 319, "url": "http://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20220324150941.26157-1-david.marchand@redhat.com/mbox/", "series": [ { "id": 22229, "url": "http://patches.dpdk.org/api/series/22229/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=22229", "date": "2022-03-24T15:09:41", "name": "net/failsafe: fix interrupt handle leak", "version": 1, "mbox": "http://patches.dpdk.org/series/22229/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/108845/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/108845/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 306E1A04FF;\n\tThu, 24 Mar 2022 16:09:55 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 232534282B;\n\tThu, 24 Mar 2022 16:09:55 +0100 (CET)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by mails.dpdk.org (Postfix) with ESMTP id EAE5B40683\n for <dev@dpdk.org>; Thu, 24 Mar 2022 16:09:53 +0100 (CET)", "from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com\n [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n us-mta-368-tWE28L4gMTi9nG2oQR92cA-1; Thu, 24 Mar 2022 11:09:50 -0400", "from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com\n [10.11.54.4])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C0B1E1044560;\n Thu, 24 Mar 2022 15:09:49 +0000 (UTC)", "from dmarchan.remote.csb (unknown [10.40.195.27])\n by smtp.corp.redhat.com (Postfix) with ESMTP id A1FDD2024CCA;\n Thu, 24 Mar 2022 15:09:48 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1648134593;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=e8hX/rT/Ucrg/728zWcLWGPOlN8pDlfVOd4Dt+UCk7s=;\n b=CAl60cgQGvSKHgh5AFvjbYkL4jn5635PafNVhsaen0BY6W4xo5aSml7FkOpgf7SwdApqni\n R0jnsxUt+CoXUibvwi17/6Sh0XLp3D8OSf9MGT67F7qgM37HNw7aMReA6XkdWNgsvTQoIb\n zvR00864kNEFJCZcM8RXNaaSOkh7K5o=", "X-MC-Unique": "tWE28L4gMTi9nG2oQR92cA-1", "From": "David Marchand <david.marchand@redhat.com>", "To": "dev@dpdk.org", "Cc": "stable@dpdk.org, Gaetan Rivet <grive@u256.net>,\n Hyong Youb Kim <hyonkim@cisco.com>, Harman Kalra <hkalra@marvell.com>", "Subject": "[PATCH] net/failsafe: fix interrupt handle leak", "Date": "Thu, 24 Mar 2022 16:09:41 +0100", "Message-Id": "<20220324150941.26157-1-david.marchand@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 2.78 on 10.11.54.4", "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com", "X-Mimecast-Spam-Score": "0", "X-Mimecast-Originator": "redhat.com", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain; charset=\"US-ASCII\"; x-default=true", "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>,\n <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>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "A intr_handle is being allocated as a hack to get a (proxy) eventfd from\nthe Linux interrupt implementation.\nBut this handle is never freed.\n\nRemove this convoluted hack and create an eventfd in Linux case.\n\nFixes: d61138d4f0e2 (\"drivers: remove direct access to interrupt handle\")\nCc: stable@dpdk.org\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\n---\n drivers/net/failsafe/failsafe_ops.c | 32 ++++++++++-------------------\n 1 file changed, 11 insertions(+), 21 deletions(-)", "diff": "diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c\nindex 55e21d635c..2c23d0e70a 100644\n--- a/drivers/net/failsafe/failsafe_ops.c\n+++ b/drivers/net/failsafe/failsafe_ops.c\n@@ -6,6 +6,9 @@\n #include <stdbool.h>\n #include <stdint.h>\n #include <unistd.h>\n+#ifdef RTE_EXEC_ENV_LINUX\n+#include <sys/eventfd.h>\n+#endif\n \n #include <rte_debug.h>\n #include <rte_atomic.h>\n@@ -387,28 +390,11 @@ fs_rx_queue_setup(struct rte_eth_dev *dev,\n \t\tconst struct rte_eth_rxconf *rx_conf,\n \t\tstruct rte_mempool *mb_pool)\n {\n-\t/*\n-\t * FIXME: Add a proper interface in rte_eal_interrupts for\n-\t * allocating eventfd as an interrupt vector.\n-\t * For the time being, fake as if we are using MSIX interrupts,\n-\t * this will cause rte_intr_efd_enable to allocate an eventfd for us.\n-\t */\n-\tstruct rte_intr_handle *intr_handle;\n \tstruct sub_device *sdev;\n \tstruct rxq *rxq;\n \tuint8_t i;\n \tint ret;\n \n-\tintr_handle = rte_intr_instance_alloc(RTE_INTR_INSTANCE_F_PRIVATE);\n-\tif (intr_handle == NULL)\n-\t\treturn -ENOMEM;\n-\n-\tif (rte_intr_type_set(intr_handle, RTE_INTR_HANDLE_VFIO_MSIX))\n-\t\treturn -rte_errno;\n-\n-\tif (rte_intr_efds_index_set(intr_handle, 0, -1))\n-\t\treturn -rte_errno;\n-\n \tfs_lock(dev, 0);\n \tif (rx_conf->rx_deferred_start) {\n \t\tFOREACH_SUBDEV_STATE(sdev, i, dev, DEV_PROBED) {\n@@ -442,12 +428,16 @@ fs_rx_queue_setup(struct rte_eth_dev *dev,\n \trxq->info.nb_desc = nb_rx_desc;\n \trxq->priv = PRIV(dev);\n \trxq->sdev = PRIV(dev)->subs;\n-\tret = rte_intr_efd_enable(intr_handle, 1);\n-\tif (ret < 0) {\n+#ifdef RTE_EXEC_ENV_LINUX\n+\trxq->event_fd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC);\n+\tif (rxq->event_fd < 0) {\n+\t\tERROR(\"Failed to create an eventfd: %s\", strerror(errno));\n \t\tfs_unlock(dev, 0);\n-\t\treturn ret;\n+\t\treturn -errno;\n \t}\n-\trxq->event_fd = rte_intr_efds_index_get(intr_handle, 0);\n+#else\n+\trxq->event_fd = -1;\n+#endif\n \tdev->data->rx_queues[rx_queue_id] = rxq;\n \tFOREACH_SUBDEV_STATE(sdev, i, dev, DEV_ACTIVE) {\n \t\tret = rte_eth_rx_queue_setup(PORT_ID(sdev),\n", "prefixes": [] }{ "id": 108845, "url": "