get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/68301/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 68301,
    "url": "http://patches.dpdk.org/api/patches/68301/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200413150116.734047-23-jerinj@marvell.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": "<20200413150116.734047-23-jerinj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200413150116.734047-23-jerinj@marvell.com",
    "date": "2020-04-13T15:01:05",
    "name": "[v5,22/33] eal/trace: add interrupt tracepoints",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "0a9ae2f896cebdf58f48b0205ed01e091cc0b1df",
    "submitter": {
        "id": 1188,
        "url": "http://patches.dpdk.org/api/people/1188/?format=api",
        "name": "Jerin Jacob Kollanukkaran",
        "email": "jerinj@marvell.com"
    },
    "delegate": {
        "id": 24651,
        "url": "http://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200413150116.734047-23-jerinj@marvell.com/mbox/",
    "series": [
        {
            "id": 9344,
            "url": "http://patches.dpdk.org/api/series/9344/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=9344",
            "date": "2020-04-13T15:00:43",
            "name": "DPDK Trace support",
            "version": 5,
            "mbox": "http://patches.dpdk.org/series/9344/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/68301/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/68301/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id B5F0AA0577;\n\tMon, 13 Apr 2020 17:07:50 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 534F31C0D5;\n\tMon, 13 Apr 2020 17:03:07 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id B99F31C0CC\n for <dev@dpdk.org>; Mon, 13 Apr 2020 17:03:05 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id\n 03DF1LxF023074; Mon, 13 Apr 2020 08:03:05 -0700",
            "from sc-exch03.marvell.com ([199.233.58.183])\n by mx0b-0016f401.pphosted.com with ESMTP id 30bddkpfat-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Mon, 13 Apr 2020 08:03:04 -0700",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH03.marvell.com\n (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Mon, 13 Apr 2020 08:03:02 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Mon, 13 Apr 2020 08:03:03 -0700",
            "from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14])\n by maili.marvell.com (Postfix) with ESMTP id ED70F3F703F;\n Mon, 13 Apr 2020 08:02:58 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0818;\n bh=q8pafWKpDk3iccHQXOBYLn+GHoIQb0rexQLWnYI2RWM=;\n b=DNS2FIaRoLay/DZ8xS0YoJRAZGI7HIMsQm7Q06/AjJ+MXNpAnEBbTVKdTgYgwyxTYylC\n Taewo9kLY7aRHCkL+SmPu29HMb1TxLgDEJTLbCjkkbiiojssDKgYt7DQA0Cj9byx4q/h\n 91lI189IrKb7axwC6dGuA10BbZbnOtcFcZAgxabO6NvRi5xFV9G2au90FadBjP1eliRD\n Bmkri+Rrg+fID5OFqp1G3XmXg0688kRi90zMADrJ3dkgJKVbqKmnQrXjOAcpIUXsHUyP\n H/GLPOQJsEywwtKhACwEMYV2Fm4ZJVr+n55ZQPefH079uv3tFDYFvijjNd6oJciYQFnJ Sw==",
        "From": "<jerinj@marvell.com>",
        "To": "Jerin Jacob <jerinj@marvell.com>, Sunil Kumar Kori <skori@marvell.com>,\n Bruce Richardson <bruce.richardson@intel.com>",
        "CC": "<dev@dpdk.org>, <thomas@monjalon.net>, <david.marchand@redhat.com>,\n <mattias.ronnblom@ericsson.com>",
        "Date": "Mon, 13 Apr 2020 20:31:05 +0530",
        "Message-ID": "<20200413150116.734047-23-jerinj@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20200413150116.734047-1-jerinj@marvell.com>",
        "References": "<20200403153709.3703448-1-jerinj@marvell.com>\n <20200413150116.734047-1-jerinj@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676\n definitions=2020-04-13_07:2020-04-13,\n 2020-04-13 signatures=0",
        "Subject": "[dpdk-dev]  [PATCH v5 22/33] eal/trace: add interrupt tracepoints",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Jerin Jacob <jerinj@marvell.com>\n\nAdd the following interrupt related tracepoints.\n\nrte_trace_lib_eal_intr_callback_register;\nrte_trace_lib_eal_intr_callback_unregister;\nrte_trace_lib_eal_intr_enable;\nrte_trace_lib_eal_intr_disable;\n\nSigned-off-by: Jerin Jacob <jerinj@marvell.com>\n---\n .../common/eal_common_trace_points.c          | 14 ++++\n lib/librte_eal/freebsd/eal_interrupts.c       | 52 ++++++++----\n lib/librte_eal/include/rte_trace_eal.h        | 34 ++++++++\n lib/librte_eal/linux/eal_interrupts.c         | 84 ++++++++++++-------\n lib/librte_eal/rte_eal_version.map            |  4 +\n 5 files changed, 140 insertions(+), 48 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_trace_points.c b/lib/librte_eal/common/eal_common_trace_points.c\nindex 9cecd8206..4c1dd699b 100644\n--- a/lib/librte_eal/common/eal_common_trace_points.c\n+++ b/lib/librte_eal/common/eal_common_trace_points.c\n@@ -38,6 +38,11 @@ RTE_TRACE_POINT_DEFINE(rte_trace_lib_eal_memzone_free);\n RTE_TRACE_POINT_DEFINE(rte_trace_lib_eal_thread_remote_launch);\n RTE_TRACE_POINT_DEFINE(rte_trace_lib_eal_thread_lcore_ready);\n \n+RTE_TRACE_POINT_DEFINE(rte_trace_lib_eal_intr_callback_register);\n+RTE_TRACE_POINT_DEFINE(rte_trace_lib_eal_intr_callback_unregister);\n+RTE_TRACE_POINT_DEFINE(rte_trace_lib_eal_intr_enable);\n+RTE_TRACE_POINT_DEFINE(rte_trace_lib_eal_intr_disable);\n+\n RTE_INIT(eal_trace_init)\n {\n \tRTE_TRACE_POINT_REGISTER(rte_trace_lib_eal_generic_void,\n@@ -98,4 +103,13 @@ RTE_INIT(eal_trace_init)\n \t\t\t\t lib.eal.thread.remote.launch);\n \tRTE_TRACE_POINT_REGISTER(rte_trace_lib_eal_thread_lcore_ready,\n \t\t\t\t lib.eal.thread.lcore.ready);\n+\n+\tRTE_TRACE_POINT_REGISTER(rte_trace_lib_eal_intr_callback_register,\n+\t\t\t\t lib.eal.intr.register);\n+\tRTE_TRACE_POINT_REGISTER(rte_trace_lib_eal_intr_callback_unregister,\n+\t\t\t\t lib.eal.intr.unregister);\n+\tRTE_TRACE_POINT_REGISTER(rte_trace_lib_eal_intr_enable,\n+\t\t\t\t lib.eal.intr.enable);\n+\tRTE_TRACE_POINT_REGISTER(rte_trace_lib_eal_intr_disable,\n+\t\t\t\t lib.eal.intr.disable);\n }\ndiff --git a/lib/librte_eal/freebsd/eal_interrupts.c b/lib/librte_eal/freebsd/eal_interrupts.c\nindex 7def3189b..71f3189ff 100644\n--- a/lib/librte_eal/freebsd/eal_interrupts.c\n+++ b/lib/librte_eal/freebsd/eal_interrupts.c\n@@ -13,6 +13,7 @@\n #include <rte_spinlock.h>\n #include <rte_common.h>\n #include <rte_interrupts.h>\n+#include <rte_trace_eal.h>\n \n #include \"eal_private.h\"\n #include \"eal_alarm_private.h\"\n@@ -182,6 +183,7 @@ rte_intr_callback_register(const struct rte_intr_handle *intr_handle,\n \t\t\tgoto fail;\n \t\t}\n \t}\n+\trte_trace_lib_eal_intr_callback_register(intr_handle, cb, cb_arg, ret);\n \trte_spinlock_unlock(&intr_lock);\n \n \treturn 0;\n@@ -196,6 +198,7 @@ rte_intr_callback_register(const struct rte_intr_handle *intr_handle,\n \t\t}\n \t}\n \tfree(callback);\n+\trte_trace_lib_eal_intr_callback_register(intr_handle, cb, cb_arg, ret);\n \trte_spinlock_unlock(&intr_lock);\n \treturn ret;\n }\n@@ -335,6 +338,8 @@ rte_intr_callback_unregister(const struct rte_intr_handle *intr_handle,\n \t\t}\n \t}\n out:\n+\trte_trace_lib_eal_intr_callback_unregister(intr_handle, cb_fn,\n+\t\t\t\t\t\t   cb_arg, ret);\n \trte_spinlock_unlock(&intr_lock);\n \n \treturn ret;\n@@ -343,55 +348,68 @@ rte_intr_callback_unregister(const struct rte_intr_handle *intr_handle,\n int\n rte_intr_enable(const struct rte_intr_handle *intr_handle)\n {\n-\tif (intr_handle && intr_handle->type == RTE_INTR_HANDLE_VDEV)\n-\t\treturn 0;\n+\tint rc = 0;\n \n-\tif (!intr_handle || intr_handle->fd < 0 || intr_handle->uio_cfg_fd < 0)\n-\t\treturn -1;\n+\tif (intr_handle && intr_handle->type == RTE_INTR_HANDLE_VDEV) {\n+\t\trc = 0; goto out;\n+\t}\n+\n+\tif (!intr_handle || intr_handle->fd < 0 ||\n+\t\t\t\tintr_handle->uio_cfg_fd < 0) {\n+\t\trc = -1; goto out;\n+\t}\n \n \tswitch (intr_handle->type) {\n \t/* not used at this moment */\n \tcase RTE_INTR_HANDLE_ALARM:\n-\t\treturn -1;\n+\t\trc = -1; break;\n \t/* not used at this moment */\n \tcase RTE_INTR_HANDLE_DEV_EVENT:\n-\t\treturn -1;\n+\t\trc = -1; break;\n \t/* unknown handle type */\n \tdefault:\n \t\tRTE_LOG(ERR, EAL,\n \t\t\t\"Unknown handle type of fd %d\\n\",\n \t\t\t\t\tintr_handle->fd);\n-\t\treturn -1;\n+\t\trc = -1; break;\n \t}\n \n-\treturn 0;\n+out:\n+\trte_trace_lib_eal_intr_enable(intr_handle, rc);\n+\treturn rc;\n }\n \n int\n rte_intr_disable(const struct rte_intr_handle *intr_handle)\n {\n-\tif (intr_handle && intr_handle->type == RTE_INTR_HANDLE_VDEV)\n-\t\treturn 0;\n+\tint rc = 0;\n \n-\tif (!intr_handle || intr_handle->fd < 0 || intr_handle->uio_cfg_fd < 0)\n-\t\treturn -1;\n+\tif (intr_handle && intr_handle->type == RTE_INTR_HANDLE_VDEV) {\n+\t\trc = 0; goto out;\n+\t}\n+\n+\tif (!intr_handle || intr_handle->fd < 0 ||\n+\t\t\t\tintr_handle->uio_cfg_fd < 0) {\n+\t\trc = -1; goto out;\n+\t}\n \n \tswitch (intr_handle->type) {\n \t/* not used at this moment */\n \tcase RTE_INTR_HANDLE_ALARM:\n-\t\treturn -1;\n+\t\trc = -1; break;\n \t/* not used at this moment */\n \tcase RTE_INTR_HANDLE_DEV_EVENT:\n-\t\treturn -1;\n+\t\trc = -1; break;\n \t/* unknown handle type */\n \tdefault:\n \t\tRTE_LOG(ERR, EAL,\n \t\t\t\"Unknown handle type of fd %d\\n\",\n \t\t\t\t\tintr_handle->fd);\n-\t\treturn -1;\n+\t\trc = -1; break;\n \t}\n-\n-\treturn 0;\n+out:\n+\trte_trace_lib_eal_intr_disable(intr_handle, rc);\n+\treturn rc;\n }\n \n int\ndiff --git a/lib/librte_eal/include/rte_trace_eal.h b/lib/librte_eal/include/rte_trace_eal.h\nindex 8197e198a..7ab7b9659 100644\n--- a/lib/librte_eal/include/rte_trace_eal.h\n+++ b/lib/librte_eal/include/rte_trace_eal.h\n@@ -16,6 +16,7 @@ extern \"C\" {\n #endif\n \n #include <rte_alarm.h>\n+#include <rte_interrupts.h>\n #include <rte_trace.h>\n \n /* Generic */\n@@ -205,6 +206,39 @@ RTE_TRACE_POINT(\n \trte_trace_ctf_u32(lcore_id); rte_trace_ctf_string(cpuset);\n )\n \n+/* Interrupt */\n+RTE_TRACE_POINT(\n+\trte_trace_lib_eal_intr_callback_register,\n+\tRTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle,\n+\t\t\t     rte_intr_callback_fn cb, void *cb_arg, int rc),\n+\trte_trace_ctf_int(rc); rte_trace_ctf_int(handle->vfio_dev_fd);\n+\trte_trace_ctf_int(handle->fd); rte_trace_ctf_int(handle->type);\n+\trte_trace_ctf_u32(handle->max_intr); rte_trace_ctf_u32(handle->nb_efd);\n+\trte_trace_ctf_ptr(cb); rte_trace_ctf_ptr(cb_arg);\n+)\n+RTE_TRACE_POINT(\n+\trte_trace_lib_eal_intr_callback_unregister,\n+\tRTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle,\n+\t\t\t     rte_intr_callback_fn cb, void *cb_arg, int rc),\n+\trte_trace_ctf_int(rc); rte_trace_ctf_int(handle->vfio_dev_fd);\n+\trte_trace_ctf_int(handle->fd); rte_trace_ctf_int(handle->type);\n+\trte_trace_ctf_u32(handle->max_intr); rte_trace_ctf_u32(handle->nb_efd);\n+\trte_trace_ctf_ptr(cb); rte_trace_ctf_ptr(cb_arg);\n+)\n+RTE_TRACE_POINT(\n+\trte_trace_lib_eal_intr_enable,\n+\tRTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle, int rc),\n+\trte_trace_ctf_int(rc); rte_trace_ctf_int(handle->vfio_dev_fd);\n+\trte_trace_ctf_int(handle->fd); rte_trace_ctf_int(handle->type);\n+\trte_trace_ctf_u32(handle->max_intr); rte_trace_ctf_u32(handle->nb_efd);\n+)\n+RTE_TRACE_POINT(\n+\trte_trace_lib_eal_intr_disable,\n+\tRTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle, int rc),\n+\trte_trace_ctf_int(rc); rte_trace_ctf_int(handle->vfio_dev_fd);\n+\trte_trace_ctf_int(handle->fd); rte_trace_ctf_int(handle->type);\n+\trte_trace_ctf_u32(handle->max_intr); rte_trace_ctf_u32(handle->nb_efd);\n+)\n \n #ifdef __cplusplus\n }\ndiff --git a/lib/librte_eal/linux/eal_interrupts.c b/lib/librte_eal/linux/eal_interrupts.c\nindex cb8e10709..20e9cb35e 100644\n--- a/lib/librte_eal/linux/eal_interrupts.c\n+++ b/lib/librte_eal/linux/eal_interrupts.c\n@@ -34,6 +34,7 @@\n #include <rte_spinlock.h>\n #include <rte_pause.h>\n #include <rte_vfio.h>\n+#include <rte_trace_eal.h>\n \n #include \"eal_private.h\"\n #include \"eal_vfio.h\"\n@@ -539,8 +540,9 @@ rte_intr_callback_register(const struct rte_intr_handle *intr_handle,\n \t */\n \tif (wake_thread)\n \t\tif (write(intr_pipe.writefd, \"1\", 1) < 0)\n-\t\t\treturn -EPIPE;\n+\t\t\tret = -EPIPE;\n \n+\trte_trace_lib_eal_intr_callback_register(intr_handle, cb, cb_arg, ret);\n \treturn ret;\n }\n \n@@ -656,63 +658,74 @@ rte_intr_callback_unregister(const struct rte_intr_handle *intr_handle,\n \t\tret = -EPIPE;\n \t}\n \n+\trte_trace_lib_eal_intr_callback_unregister(intr_handle, cb_fn,\n+\t\t\t\t\t\t   cb_arg, ret);\n \treturn ret;\n }\n \n int\n rte_intr_enable(const struct rte_intr_handle *intr_handle)\n {\n-\tif (intr_handle && intr_handle->type == RTE_INTR_HANDLE_VDEV)\n-\t\treturn 0;\n+\tint rc = 0;\n \n-\tif (!intr_handle || intr_handle->fd < 0 || intr_handle->uio_cfg_fd < 0)\n-\t\treturn -1;\n+\tif (intr_handle && intr_handle->type == RTE_INTR_HANDLE_VDEV) {\n+\t\trc = 0; goto out;\n+\t}\n+\n+\tif (!intr_handle || intr_handle->fd < 0 ||\n+\t\t\t\t\t\tintr_handle->uio_cfg_fd < 0) {\n+\t\trc = -1; goto out;\n+\t}\n \n \tswitch (intr_handle->type){\n \t/* write to the uio fd to enable the interrupt */\n \tcase RTE_INTR_HANDLE_UIO:\n \t\tif (uio_intr_enable(intr_handle))\n-\t\t\treturn -1;\n+\t\t\trc = -1;\n \t\tbreak;\n \tcase RTE_INTR_HANDLE_UIO_INTX:\n \t\tif (uio_intx_intr_enable(intr_handle))\n-\t\t\treturn -1;\n+\t\t\trc = -1;\n \t\tbreak;\n \t/* not used at this moment */\n \tcase RTE_INTR_HANDLE_ALARM:\n-\t\treturn -1;\n+\t\trc = -1;\n+\t\tbreak;\n #ifdef VFIO_PRESENT\n \tcase RTE_INTR_HANDLE_VFIO_MSIX:\n \t\tif (vfio_enable_msix(intr_handle))\n-\t\t\treturn -1;\n+\t\t\trc = -1;\n \t\tbreak;\n \tcase RTE_INTR_HANDLE_VFIO_MSI:\n \t\tif (vfio_enable_msi(intr_handle))\n-\t\t\treturn -1;\n+\t\t\trc = -1;\n \t\tbreak;\n \tcase RTE_INTR_HANDLE_VFIO_LEGACY:\n \t\tif (vfio_enable_intx(intr_handle))\n-\t\t\treturn -1;\n+\t\t\trc = -1;\n \t\tbreak;\n #ifdef HAVE_VFIO_DEV_REQ_INTERFACE\n \tcase RTE_INTR_HANDLE_VFIO_REQ:\n \t\tif (vfio_enable_req(intr_handle))\n-\t\t\treturn -1;\n+\t\t\trc = -1;\n \t\tbreak;\n #endif\n #endif\n \t/* not used at this moment */\n \tcase RTE_INTR_HANDLE_DEV_EVENT:\n-\t\treturn -1;\n+\t\trc = -1;\n+\t\tbreak;\n \t/* unknown handle type */\n \tdefault:\n \t\tRTE_LOG(ERR, EAL,\n \t\t\t\"Unknown handle type of fd %d\\n\",\n \t\t\t\t\tintr_handle->fd);\n-\t\treturn -1;\n+\t\trc = -1;\n+\t\tbreak;\n \t}\n-\n-\treturn 0;\n+out:\n+\trte_trace_lib_eal_intr_enable(intr_handle, rc);\n+\treturn rc;\n }\n \n /**\n@@ -778,57 +791,66 @@ rte_intr_ack(const struct rte_intr_handle *intr_handle)\n int\n rte_intr_disable(const struct rte_intr_handle *intr_handle)\n {\n-\tif (intr_handle && intr_handle->type == RTE_INTR_HANDLE_VDEV)\n-\t\treturn 0;\n+\tint rc = 0;\n \n-\tif (!intr_handle || intr_handle->fd < 0 || intr_handle->uio_cfg_fd < 0)\n-\t\treturn -1;\n+\tif (intr_handle && intr_handle->type == RTE_INTR_HANDLE_VDEV) {\n+\t\trc = 0; goto out;\n+\t}\n+\n+\tif (!intr_handle || intr_handle->fd < 0 ||\n+\t\t\t\t\tintr_handle->uio_cfg_fd < 0) {\n+\t\trc = -1; goto out;\n+\t}\n \n \tswitch (intr_handle->type){\n \t/* write to the uio fd to disable the interrupt */\n \tcase RTE_INTR_HANDLE_UIO:\n \t\tif (uio_intr_disable(intr_handle))\n-\t\t\treturn -1;\n+\t\t\trc = -1;\n \t\tbreak;\n \tcase RTE_INTR_HANDLE_UIO_INTX:\n \t\tif (uio_intx_intr_disable(intr_handle))\n-\t\t\treturn -1;\n+\t\t\trc = -1;\n \t\tbreak;\n \t/* not used at this moment */\n \tcase RTE_INTR_HANDLE_ALARM:\n-\t\treturn -1;\n+\t\trc = -1;\n+\t\tbreak;\n #ifdef VFIO_PRESENT\n \tcase RTE_INTR_HANDLE_VFIO_MSIX:\n \t\tif (vfio_disable_msix(intr_handle))\n-\t\t\treturn -1;\n+\t\t\trc = -1;\n \t\tbreak;\n \tcase RTE_INTR_HANDLE_VFIO_MSI:\n \t\tif (vfio_disable_msi(intr_handle))\n-\t\t\treturn -1;\n+\t\t\trc = -1;\n \t\tbreak;\n \tcase RTE_INTR_HANDLE_VFIO_LEGACY:\n \t\tif (vfio_disable_intx(intr_handle))\n-\t\t\treturn -1;\n+\t\t\trc = -1;\n \t\tbreak;\n #ifdef HAVE_VFIO_DEV_REQ_INTERFACE\n \tcase RTE_INTR_HANDLE_VFIO_REQ:\n \t\tif (vfio_disable_req(intr_handle))\n-\t\t\treturn -1;\n+\t\t\trc = -1;\n \t\tbreak;\n #endif\n #endif\n \t/* not used at this moment */\n \tcase RTE_INTR_HANDLE_DEV_EVENT:\n-\t\treturn -1;\n+\t\trc = -1;\n+\t\tbreak;\n \t/* unknown handle type */\n \tdefault:\n \t\tRTE_LOG(ERR, EAL,\n \t\t\t\"Unknown handle type of fd %d\\n\",\n \t\t\t\t\tintr_handle->fd);\n-\t\treturn -1;\n+\t\trc = -1;\n+\t\tbreak;\n \t}\n-\n-\treturn 0;\n+out:\n+\trte_trace_lib_eal_intr_disable(intr_handle, rc);\n+\treturn rc;\n }\n \n static int\ndiff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map\nindex 0ee4f29b2..0c0039780 100644\n--- a/lib/librte_eal/rte_eal_version.map\n+++ b/lib/librte_eal/rte_eal_version.map\n@@ -387,4 +387,8 @@ EXPERIMENTAL {\n \t__rte_trace_lib_eal_memzone_free;\n \t__rte_trace_lib_eal_thread_remote_launch;\n \t__rte_trace_lib_eal_thread_lcore_ready;\n+\t__rte_trace_lib_eal_intr_callback_register;\n+\t__rte_trace_lib_eal_intr_callback_unregister;\n+\t__rte_trace_lib_eal_intr_enable;\n+\t__rte_trace_lib_eal_intr_disable;\n };\n",
    "prefixes": [
        "v5",
        "22/33"
    ]
}