Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/100495/?format=api
https://patches.dpdk.org/api/patches/100495/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20211005121502.66964-4-hkalra@marvell.com/", "project": { "id": 1, "url": "https://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": "<20211005121502.66964-4-hkalra@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20211005121502.66964-4-hkalra@marvell.com", "date": "2021-10-05T12:14:59", "name": "[v2,3/6] test/interrupt: apply get set interrupt handle APIs", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "c385179ca6d547709089238087ef22776e64f176", "submitter": { "id": 1182, "url": "https://patches.dpdk.org/api/people/1182/?format=api", "name": "Harman Kalra", "email": "hkalra@marvell.com" }, "delegate": { "id": 24651, "url": "https://patches.dpdk.org/api/users/24651/?format=api", "username": "dmarchand", "first_name": "David", "last_name": "Marchand", "email": "david.marchand@redhat.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20211005121502.66964-4-hkalra@marvell.com/mbox/", "series": [ { "id": 19386, "url": "https://patches.dpdk.org/api/series/19386/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=19386", "date": "2021-10-05T12:14:56", "name": "make rte_intr_handle internal", "version": 2, "mbox": "https://patches.dpdk.org/series/19386/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/100495/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/100495/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 0BA70A0C47;\n\tTue, 5 Oct 2021 14:17:12 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id CDFD041393;\n\tTue, 5 Oct 2021 14:16:55 +0200 (CEST)", "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id BF09A41343\n for <dev@dpdk.org>; Tue, 5 Oct 2021 14:16:51 +0200 (CEST)", "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id\n 195CEXg5028469;\n Tue, 5 Oct 2021 05:16:49 -0700", "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0a-0016f401.pphosted.com with ESMTP id 3bgmv5rara-13\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Tue, 05 Oct 2021 05:16:48 -0700", "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Tue, 5 Oct 2021 05:15:47 -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.18 via Frontend\n Transport; Tue, 5 Oct 2021 05:15:47 -0700", "from localhost.localdomain (unknown [10.29.52.211])\n by maili.marvell.com (Postfix) with ESMTP id C79F43F7052;\n Tue, 5 Oct 2021 05:15:45 -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-type; s=pfpt0220; bh=4IMSUPvhIld/yiqAdpqVBamgI7asW92WlFAmhRER2Lk=;\n b=OBC9h7oklDwUsBA/u1UbYW7tAjD2oh1ypvBRf9qFa7dWcS5lI9d4ImK7Fq+vGhmKYABT\n JxJgDYITymnl/sHWQoHfKIVCU59rV3KRWqvWxRj1v5nScYUKIcm0PAPltgoZGhUuNdzP\n gW8Cog7stvOJ6iyKLzHfGh1WsQGXTgV9psG5r8oXKQoCt76snDkDp9v+4WMv1SsBdLOJ\n 7/2J7i4qlDbdwlSjbt3cBGaMmtN+/PR5oWAh5kOrmmUHQQrxB5v6ZH8Gj5TSHPhM5r9I\n LNUGZ/KnwxMTe54BrY8Q7F/eMBwKVVqAdJdwW7++kjXM5/tpwjCwRRIanYoNR7O0wcYE DQ==", "From": "Harman Kalra <hkalra@marvell.com>", "To": "<dev@dpdk.org>, Harman Kalra <hkalra@marvell.com>", "CC": "<david.marchand@redhat.com>, <dmitry.kozliuk@gmail.com>, <mdr@ashroe.eu>", "Date": "Tue, 5 Oct 2021 17:44:59 +0530", "Message-ID": "<20211005121502.66964-4-hkalra@marvell.com>", "X-Mailer": "git-send-email 2.18.0", "In-Reply-To": "<20211005121502.66964-1-hkalra@marvell.com>", "References": "<20210826145726.102081-1-hkalra@marvell.com>\n <20211005121502.66964-1-hkalra@marvell.com>", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-Proofpoint-GUID": "HRxx6rPkuxi04GwwnXM56ziaUPvh5MT-", "X-Proofpoint-ORIG-GUID": "HRxx6rPkuxi04GwwnXM56ziaUPvh5MT-", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475\n definitions=2021-10-05_01,2021-10-04_01,2020-04-07_01", "Subject": "[dpdk-dev] [PATCH v2 3/6] test/interrupt: apply get set interrupt\n handle APIs", "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", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Updating the interrupt testsuite to make use of interrupt\nhandle get set APIs.\n\nSigned-off-by: Harman Kalra <hkalra@marvell.com>\n---\n app/test/test_interrupts.c | 163 ++++++++++++++++++++++---------------\n 1 file changed, 98 insertions(+), 65 deletions(-)", "diff": "diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c\nindex 233b14a70b..b8d3a768dc 100644\n--- a/app/test/test_interrupts.c\n+++ b/app/test/test_interrupts.c\n@@ -16,7 +16,7 @@\n \n /* predefined interrupt handle types */\n enum test_interrupt_handle_type {\n-\tTEST_INTERRUPT_HANDLE_INVALID,\n+\tTEST_INTERRUPT_HANDLE_INVALID = 0,\n \tTEST_INTERRUPT_HANDLE_VALID,\n \tTEST_INTERRUPT_HANDLE_VALID_UIO,\n \tTEST_INTERRUPT_HANDLE_VALID_ALARM,\n@@ -27,7 +27,7 @@ enum test_interrupt_handle_type {\n \n /* flag of if callback is called */\n static volatile int flag;\n-static struct rte_intr_handle intr_handles[TEST_INTERRUPT_HANDLE_MAX];\n+static struct rte_intr_handle *intr_handles[TEST_INTERRUPT_HANDLE_MAX];\n static enum test_interrupt_handle_type test_intr_type =\n \t\t\t\tTEST_INTERRUPT_HANDLE_MAX;\n \n@@ -50,7 +50,7 @@ static union intr_pipefds pfds;\n static inline int\n test_interrupt_handle_sanity_check(struct rte_intr_handle *intr_handle)\n {\n-\tif (!intr_handle || intr_handle->fd < 0)\n+\tif (!intr_handle || rte_intr_fd_get(intr_handle) < 0)\n \t\treturn -1;\n \n \treturn 0;\n@@ -62,31 +62,55 @@ test_interrupt_handle_sanity_check(struct rte_intr_handle *intr_handle)\n static int\n test_interrupt_init(void)\n {\n+\tstruct rte_intr_handle *test_intr_handle;\n+\tint i;\n+\n \tif (pipe(pfds.pipefd) < 0)\n \t\treturn -1;\n \n-\tintr_handles[TEST_INTERRUPT_HANDLE_INVALID].fd = -1;\n-\tintr_handles[TEST_INTERRUPT_HANDLE_INVALID].type =\n-\t\t\t\t\tRTE_INTR_HANDLE_UNKNOWN;\n+\tfor (i = 0; i < TEST_INTERRUPT_HANDLE_MAX; i++) {\n+\t\tintr_handles[i] =\n+\t\t\trte_intr_instance_alloc(RTE_INTR_ALLOC_TRAD_HEAP);\n+\t\tif (!intr_handles[i])\n+\t\t\treturn -1;\n+\t}\n+\n+\ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_INVALID];\n+\tif (rte_intr_fd_set(test_intr_handle, -1))\n+\t\treturn -1;\n+\tif (rte_intr_type_set(test_intr_handle, RTE_INTR_HANDLE_UNKNOWN))\n+\t\treturn -1;\n \n-\tintr_handles[TEST_INTERRUPT_HANDLE_VALID].fd = pfds.readfd;\n-\tintr_handles[TEST_INTERRUPT_HANDLE_VALID].type =\n-\t\t\t\t\tRTE_INTR_HANDLE_UNKNOWN;\n+\ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_VALID];\n+\tif (rte_intr_fd_set(test_intr_handle, pfds.readfd))\n+\t\treturn -1;\n+\tif (rte_intr_type_set(test_intr_handle, RTE_INTR_HANDLE_UNKNOWN))\n+\t\treturn -1;\n \n-\tintr_handles[TEST_INTERRUPT_HANDLE_VALID_UIO].fd = pfds.readfd;\n-\tintr_handles[TEST_INTERRUPT_HANDLE_VALID_UIO].type =\n-\t\t\t\t\tRTE_INTR_HANDLE_UIO;\n+\ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_VALID_UIO];\n+\tif (rte_intr_fd_set(test_intr_handle, pfds.readfd))\n+\t\treturn -1;\n+\tif (rte_intr_type_set(test_intr_handle, RTE_INTR_HANDLE_UIO))\n+\t\treturn -1;\n \n-\tintr_handles[TEST_INTERRUPT_HANDLE_VALID_ALARM].fd = pfds.readfd;\n-\tintr_handles[TEST_INTERRUPT_HANDLE_VALID_ALARM].type =\n-\t\t\t\t\tRTE_INTR_HANDLE_ALARM;\n+\ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_VALID_ALARM];\n+\tif (rte_intr_fd_set(test_intr_handle, pfds.readfd))\n+\t\treturn -1;\n+\tif (rte_intr_type_set(test_intr_handle, RTE_INTR_HANDLE_ALARM))\n+\t\treturn -1;\n \n-\tintr_handles[TEST_INTERRUPT_HANDLE_VALID_DEV_EVENT].fd = pfds.readfd;\n-\tintr_handles[TEST_INTERRUPT_HANDLE_VALID_DEV_EVENT].type =\n-\t\t\t\t\tRTE_INTR_HANDLE_DEV_EVENT;\n+\ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_VALID_DEV_EVENT];\n+\tif (rte_intr_fd_set(test_intr_handle, pfds.readfd))\n+\t\treturn -1;\n+\tif (rte_intr_type_set(test_intr_handle,\n+\t\t\t\t RTE_INTR_HANDLE_DEV_EVENT))\n+\t\treturn -1;\n \n-\tintr_handles[TEST_INTERRUPT_HANDLE_CASE1].fd = pfds.writefd;\n-\tintr_handles[TEST_INTERRUPT_HANDLE_CASE1].type = RTE_INTR_HANDLE_UIO;\n+\ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_CASE1];\n+\tif (rte_intr_fd_set(test_intr_handle, pfds.writefd))\n+\t\treturn -1;\n+\tif (rte_intr_type_set(test_intr_handle, RTE_INTR_HANDLE_UIO))\n+\t\treturn -1;\n \n \treturn 0;\n }\n@@ -97,6 +121,10 @@ test_interrupt_init(void)\n static int\n test_interrupt_deinit(void)\n {\n+\tint i;\n+\n+\tfor (i = 0; i < TEST_INTERRUPT_HANDLE_MAX; i++)\n+\t\trte_intr_instance_free(intr_handles[i]);\n \tclose(pfds.pipefd[0]);\n \tclose(pfds.pipefd[1]);\n \n@@ -125,8 +153,10 @@ test_interrupt_handle_compare(struct rte_intr_handle *intr_handle_l,\n \tif (!intr_handle_l || !intr_handle_r)\n \t\treturn -1;\n \n-\tif (intr_handle_l->fd != intr_handle_r->fd ||\n-\t\tintr_handle_l->type != intr_handle_r->type)\n+\tif (rte_intr_fd_get(intr_handle_l) !=\n+\t rte_intr_fd_get(intr_handle_r) ||\n+\t\trte_intr_type_get(intr_handle_l) !=\n+\t\trte_intr_type_get(intr_handle_r))\n \t\treturn -1;\n \n \treturn 0;\n@@ -178,6 +208,8 @@ static void\n test_interrupt_callback(void *arg)\n {\n \tstruct rte_intr_handle *intr_handle = arg;\n+\tstruct rte_intr_handle *test_intr_handle;\n+\n \tif (test_intr_type >= TEST_INTERRUPT_HANDLE_MAX) {\n \t\tprintf(\"invalid interrupt type\\n\");\n \t\tflag = -1;\n@@ -198,8 +230,8 @@ test_interrupt_callback(void *arg)\n \t\treturn;\n \t}\n \n-\tif (test_interrupt_handle_compare(intr_handle,\n-\t\t\t&(intr_handles[test_intr_type])) == 0)\n+\ttest_intr_handle = intr_handles[test_intr_type];\n+\tif (test_interrupt_handle_compare(intr_handle, test_intr_handle) == 0)\n \t\tflag = 1;\n }\n \n@@ -223,7 +255,7 @@ test_interrupt_callback_1(void *arg)\n static int\n test_interrupt_enable(void)\n {\n-\tstruct rte_intr_handle test_intr_handle;\n+\tstruct rte_intr_handle *test_intr_handle;\n \n \t/* check with null intr_handle */\n \tif (rte_intr_enable(NULL) == 0) {\n@@ -233,7 +265,7 @@ test_interrupt_enable(void)\n \n \t/* check with invalid intr_handle */\n \ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_INVALID];\n-\tif (rte_intr_enable(&test_intr_handle) == 0) {\n+\tif (rte_intr_enable(test_intr_handle) == 0) {\n \t\tprintf(\"unexpectedly enable invalid intr_handle \"\n \t\t\t\"successfully\\n\");\n \t\treturn -1;\n@@ -241,7 +273,7 @@ test_interrupt_enable(void)\n \n \t/* check with valid intr_handle */\n \ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_VALID];\n-\tif (rte_intr_enable(&test_intr_handle) == 0) {\n+\tif (rte_intr_enable(test_intr_handle) == 0) {\n \t\tprintf(\"unexpectedly enable a specific intr_handle \"\n \t\t\t\"successfully\\n\");\n \t\treturn -1;\n@@ -249,7 +281,7 @@ test_interrupt_enable(void)\n \n \t/* check with specific valid intr_handle */\n \ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_VALID_ALARM];\n-\tif (rte_intr_enable(&test_intr_handle) == 0) {\n+\tif (rte_intr_enable(test_intr_handle) == 0) {\n \t\tprintf(\"unexpectedly enable a specific intr_handle \"\n \t\t\t\"successfully\\n\");\n \t\treturn -1;\n@@ -257,7 +289,7 @@ test_interrupt_enable(void)\n \n \t/* check with specific valid intr_handle */\n \ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_VALID_DEV_EVENT];\n-\tif (rte_intr_enable(&test_intr_handle) == 0) {\n+\tif (rte_intr_enable(test_intr_handle) == 0) {\n \t\tprintf(\"unexpectedly enable a specific intr_handle \"\n \t\t\t\"successfully\\n\");\n \t\treturn -1;\n@@ -265,13 +297,13 @@ test_interrupt_enable(void)\n \n \t/* check with valid handler and its type */\n \ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_CASE1];\n-\tif (rte_intr_enable(&test_intr_handle) < 0) {\n+\tif (rte_intr_enable(test_intr_handle) < 0) {\n \t\tprintf(\"fail to enable interrupt on a simulated handler\\n\");\n \t\treturn -1;\n \t}\n \n \ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_VALID_UIO];\n-\tif (rte_intr_enable(&test_intr_handle) == 0) {\n+\tif (rte_intr_enable(test_intr_handle) == 0) {\n \t\tprintf(\"unexpectedly enable a specific intr_handle \"\n \t\t\t\"successfully\\n\");\n \t\treturn -1;\n@@ -286,7 +318,7 @@ test_interrupt_enable(void)\n static int\n test_interrupt_disable(void)\n {\n-\tstruct rte_intr_handle test_intr_handle;\n+\tstruct rte_intr_handle *test_intr_handle;\n \n \t/* check with null intr_handle */\n \tif (rte_intr_disable(NULL) == 0) {\n@@ -297,7 +329,7 @@ test_interrupt_disable(void)\n \n \t/* check with invalid intr_handle */\n \ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_INVALID];\n-\tif (rte_intr_disable(&test_intr_handle) == 0) {\n+\tif (rte_intr_disable(test_intr_handle) == 0) {\n \t\tprintf(\"unexpectedly disable invalid intr_handle \"\n \t\t\t\"successfully\\n\");\n \t\treturn -1;\n@@ -305,7 +337,7 @@ test_interrupt_disable(void)\n \n \t/* check with valid intr_handle */\n \ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_VALID];\n-\tif (rte_intr_disable(&test_intr_handle) == 0) {\n+\tif (rte_intr_disable(test_intr_handle) == 0) {\n \t\tprintf(\"unexpectedly disable a specific intr_handle \"\n \t\t\t\"successfully\\n\");\n \t\treturn -1;\n@@ -313,7 +345,7 @@ test_interrupt_disable(void)\n \n \t/* check with specific valid intr_handle */\n \ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_VALID_ALARM];\n-\tif (rte_intr_disable(&test_intr_handle) == 0) {\n+\tif (rte_intr_disable(test_intr_handle) == 0) {\n \t\tprintf(\"unexpectedly disable a specific intr_handle \"\n \t\t\t\"successfully\\n\");\n \t\treturn -1;\n@@ -321,7 +353,7 @@ test_interrupt_disable(void)\n \n \t/* check with specific valid intr_handle */\n \ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_VALID_DEV_EVENT];\n-\tif (rte_intr_disable(&test_intr_handle) == 0) {\n+\tif (rte_intr_disable(test_intr_handle) == 0) {\n \t\tprintf(\"unexpectedly disable a specific intr_handle \"\n \t\t\t\"successfully\\n\");\n \t\treturn -1;\n@@ -329,13 +361,13 @@ test_interrupt_disable(void)\n \n \t/* check with valid handler and its type */\n \ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_CASE1];\n-\tif (rte_intr_disable(&test_intr_handle) < 0) {\n+\tif (rte_intr_disable(test_intr_handle) < 0) {\n \t\tprintf(\"fail to disable interrupt on a simulated handler\\n\");\n \t\treturn -1;\n \t}\n \n \ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_VALID_UIO];\n-\tif (rte_intr_disable(&test_intr_handle) == 0) {\n+\tif (rte_intr_disable(test_intr_handle) == 0) {\n \t\tprintf(\"unexpectedly disable a specific intr_handle \"\n \t\t\t\"successfully\\n\");\n \t\treturn -1;\n@@ -351,13 +383,13 @@ static int\n test_interrupt_full_path_check(enum test_interrupt_handle_type intr_type)\n {\n \tint count;\n-\tstruct rte_intr_handle test_intr_handle;\n+\tstruct rte_intr_handle *test_intr_handle;\n \n \tflag = 0;\n \ttest_intr_handle = intr_handles[intr_type];\n \ttest_intr_type = intr_type;\n-\tif (rte_intr_callback_register(&test_intr_handle,\n-\t\t\ttest_interrupt_callback, &test_intr_handle) < 0) {\n+\tif (rte_intr_callback_register(test_intr_handle,\n+\t\t\ttest_interrupt_callback, test_intr_handle) < 0) {\n \t\tprintf(\"fail to register callback\\n\");\n \t\treturn -1;\n \t}\n@@ -371,9 +403,9 @@ test_interrupt_full_path_check(enum test_interrupt_handle_type intr_type)\n \n \trte_delay_ms(TEST_INTERRUPT_CHECK_INTERVAL);\n \twhile ((count =\n-\t\trte_intr_callback_unregister(&test_intr_handle,\n+\t\trte_intr_callback_unregister(test_intr_handle,\n \t\t\t\t\t test_interrupt_callback,\n-\t\t\t\t\t &test_intr_handle)) < 0) {\n+\t\t\t\t\t test_intr_handle)) < 0) {\n \t\tif (count != -EAGAIN)\n \t\t\treturn -1;\n \t}\n@@ -396,7 +428,7 @@ static int\n test_interrupt(void)\n {\n \tint ret = -1;\n-\tstruct rte_intr_handle test_intr_handle;\n+\tstruct rte_intr_handle *test_intr_handle;\n \n \tif (test_interrupt_init() < 0) {\n \t\tprintf(\"fail to initialize for testing interrupt\\n\");\n@@ -445,8 +477,8 @@ test_interrupt(void)\n \n \t/* check if it will fail to register cb with invalid intr_handle */\n \ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_INVALID];\n-\tif (rte_intr_callback_register(&test_intr_handle,\n-\t\t\ttest_interrupt_callback, &test_intr_handle) == 0) {\n+\tif (rte_intr_callback_register(test_intr_handle,\n+\t\t\ttest_interrupt_callback, test_intr_handle) == 0) {\n \t\tprintf(\"unexpectedly register successfully with invalid \"\n \t\t\t\"intr_handle\\n\");\n \t\tgoto out;\n@@ -454,7 +486,8 @@ test_interrupt(void)\n \n \t/* check if it will fail to register without callback */\n \ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_VALID];\n-\tif (rte_intr_callback_register(&test_intr_handle, NULL, &test_intr_handle) == 0) {\n+\tif (rte_intr_callback_register(test_intr_handle, NULL,\n+\t\t\t\t test_intr_handle) == 0) {\n \t\tprintf(\"unexpectedly register successfully with \"\n \t\t\t\"null callback\\n\");\n \t\tgoto out;\n@@ -470,8 +503,8 @@ test_interrupt(void)\n \n \t/* check if it will fail to unregister cb with invalid intr_handle */\n \ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_INVALID];\n-\tif (rte_intr_callback_unregister(&test_intr_handle,\n-\t\t\ttest_interrupt_callback, &test_intr_handle) > 0) {\n+\tif (rte_intr_callback_unregister(test_intr_handle,\n+\t\t\ttest_interrupt_callback, test_intr_handle) > 0) {\n \t\tprintf(\"unexpectedly unregister successfully with \"\n \t\t\t\"invalid intr_handle\\n\");\n \t\tgoto out;\n@@ -479,29 +512,29 @@ test_interrupt(void)\n \n \t/* check if it is ok to register the same intr_handle twice */\n \ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_VALID];\n-\tif (rte_intr_callback_register(&test_intr_handle,\n-\t\t\ttest_interrupt_callback, &test_intr_handle) < 0) {\n+\tif (rte_intr_callback_register(test_intr_handle,\n+\t\t\ttest_interrupt_callback, test_intr_handle) < 0) {\n \t\tprintf(\"it fails to register test_interrupt_callback\\n\");\n \t\tgoto out;\n \t}\n-\tif (rte_intr_callback_register(&test_intr_handle,\n-\t\t\ttest_interrupt_callback_1, &test_intr_handle) < 0) {\n+\tif (rte_intr_callback_register(test_intr_handle,\n+\t\t\ttest_interrupt_callback_1, test_intr_handle) < 0) {\n \t\tprintf(\"it fails to register test_interrupt_callback_1\\n\");\n \t\tgoto out;\n \t}\n \t/* check if it will fail to unregister with invalid parameter */\n-\tif (rte_intr_callback_unregister(&test_intr_handle,\n+\tif (rte_intr_callback_unregister(test_intr_handle,\n \t\t\ttest_interrupt_callback, (void *)0xff) != 0) {\n \t\tprintf(\"unexpectedly unregisters successfully with \"\n \t\t\t\t\t\t\t\"invalid arg\\n\");\n \t\tgoto out;\n \t}\n-\tif (rte_intr_callback_unregister(&test_intr_handle,\n-\t\t\ttest_interrupt_callback, &test_intr_handle) <= 0) {\n+\tif (rte_intr_callback_unregister(test_intr_handle,\n+\t\t\ttest_interrupt_callback, test_intr_handle) <= 0) {\n \t\tprintf(\"it fails to unregister test_interrupt_callback\\n\");\n \t\tgoto out;\n \t}\n-\tif (rte_intr_callback_unregister(&test_intr_handle,\n+\tif (rte_intr_callback_unregister(test_intr_handle,\n \t\t\ttest_interrupt_callback_1, (void *)-1) <= 0) {\n \t\tprintf(\"it fails to unregister test_interrupt_callback_1 \"\n \t\t\t\"for all\\n\");\n@@ -529,27 +562,27 @@ test_interrupt(void)\n \tprintf(\"Clearing for interrupt tests\\n\");\n \t/* clear registered callbacks */\n \ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_VALID];\n-\trte_intr_callback_unregister(&test_intr_handle,\n+\trte_intr_callback_unregister(test_intr_handle,\n \t\t\ttest_interrupt_callback, (void *)-1);\n-\trte_intr_callback_unregister(&test_intr_handle,\n+\trte_intr_callback_unregister(test_intr_handle,\n \t\t\ttest_interrupt_callback_1, (void *)-1);\n \n \ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_VALID_UIO];\n-\trte_intr_callback_unregister(&test_intr_handle,\n+\trte_intr_callback_unregister(test_intr_handle,\n \t\t\ttest_interrupt_callback, (void *)-1);\n-\trte_intr_callback_unregister(&test_intr_handle,\n+\trte_intr_callback_unregister(test_intr_handle,\n \t\t\ttest_interrupt_callback_1, (void *)-1);\n \n \ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_VALID_ALARM];\n-\trte_intr_callback_unregister(&test_intr_handle,\n+\trte_intr_callback_unregister(test_intr_handle,\n \t\t\ttest_interrupt_callback, (void *)-1);\n-\trte_intr_callback_unregister(&test_intr_handle,\n+\trte_intr_callback_unregister(test_intr_handle,\n \t\t\ttest_interrupt_callback_1, (void *)-1);\n \n \ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_VALID_DEV_EVENT];\n-\trte_intr_callback_unregister(&test_intr_handle,\n+\trte_intr_callback_unregister(test_intr_handle,\n \t\t\ttest_interrupt_callback, (void *)-1);\n-\trte_intr_callback_unregister(&test_intr_handle,\n+\trte_intr_callback_unregister(test_intr_handle,\n \t\t\ttest_interrupt_callback_1, (void *)-1);\n \n \trte_delay_ms(2 * TEST_INTERRUPT_CHECK_INTERVAL);\n", "prefixes": [ "v2", "3/6" ] }{ "id": 100495, "url": "