Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/104791/?format=api
http://patchwork.dpdk.org/api/patches/104791/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20211201122119.77423-1-cristian.dumitrescu@intel.com/", "project": { "id": 1, "url": "http://patchwork.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": "<20211201122119.77423-1-cristian.dumitrescu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20211201122119.77423-1-cristian.dumitrescu@intel.com", "date": "2021-12-01T12:21:19", "name": "pipeline: add check against loops", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "e15fce8669456ca726d3f1dcb00a70f7c116c395", "submitter": { "id": 19, "url": "http://patchwork.dpdk.org/api/people/19/?format=api", "name": "Cristian Dumitrescu", "email": "cristian.dumitrescu@intel.com" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20211201122119.77423-1-cristian.dumitrescu@intel.com/mbox/", "series": [ { "id": 20824, "url": "http://patchwork.dpdk.org/api/series/20824/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=20824", "date": "2021-12-01T12:21:19", "name": "pipeline: add check against loops", "version": 1, "mbox": "http://patchwork.dpdk.org/series/20824/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/104791/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/104791/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 412CFA0C41;\n\tWed, 1 Dec 2021 13:21:36 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B64E04067B;\n\tWed, 1 Dec 2021 13:21:35 +0100 (CET)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n by mails.dpdk.org (Postfix) with ESMTP id B164D40140\n for <dev@dpdk.org>; Wed, 1 Dec 2021 13:21:29 +0100 (CET)", "from orsmga007.jf.intel.com ([10.7.209.58])\n by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 01 Dec 2021 04:21:24 -0800", "from silpixa00400573.ir.intel.com (HELO\n silpixa00400573.ger.corp.intel.com) ([10.237.223.107])\n by orsmga007.jf.intel.com with ESMTP; 01 Dec 2021 04:21:19 -0800" ], "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10184\"; a=\"236390686\"", "E=Sophos;i=\"5.87,278,1631602800\"; d=\"scan'208\";a=\"236390686\"", "E=Sophos;i=\"5.87,278,1631602800\"; d=\"scan'208\";a=\"500230300\"" ], "X-ExtLoop1": "1", "From": "Cristian Dumitrescu <cristian.dumitrescu@intel.com>", "To": "dev@dpdk.org", "Cc": "Harshad Narayane <harshad.suresh.narayane@intel.com>", "Subject": "[PATCH] pipeline: add check against loops", "Date": "Wed, 1 Dec 2021 12:21:19 +0000", "Message-Id": "<20211201122119.77423-1-cristian.dumitrescu@intel.com>", "X-Mailer": "git-send-email 2.17.1", "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": "Detect when a jump instruction, either conditional or unconditional,\nis jumping to itself, thus creating a loop, which is not allowed in\ndata plane code.\n\nSigned-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\nSigned-off-by: Harshad Narayane <harshad.suresh.narayane@intel.com>\n---\n lib/pipeline/rte_swx_pipeline.c | 13 +++++++++++++\n 1 file changed, 13 insertions(+)", "diff": "diff --git a/lib/pipeline/rte_swx_pipeline.c b/lib/pipeline/rte_swx_pipeline.c\nindex c332d44bd1..1a50c4bb72 100644\n--- a/lib/pipeline/rte_swx_pipeline.c\n+++ b/lib/pipeline/rte_swx_pipeline.c\n@@ -6000,6 +6000,19 @@ instr_label_check(struct instruction_data *instruction_data,\n \t\t\tCHECK(strcmp(label, instruction_data[j].label), EINVAL);\n \t}\n \n+\t/* Check that no jump instruction (either conditional or not) can jump to itself (loop). */\n+\tfor (i = 0; i < n_instructions; i++) {\n+\t\tstruct instruction_data *data = &instruction_data[i];\n+\t\tchar *label = data->label;\n+\t\tchar *jmp_label = data->jmp_label;\n+\n+\t\t/* Continue if this instruction does not have a label or it is not a jump. */\n+\t\tif (!label[0] || !jmp_label[0])\n+\t\t\tcontinue;\n+\n+\t\tCHECK(strcmp(label, jmp_label), EINVAL);\n+\t}\n+\n \t/* Get users for each instruction label. */\n \tfor (i = 0; i < n_instructions; i++) {\n \t\tstruct instruction_data *data = &instruction_data[i];\n", "prefixes": [] }{ "id": 104791, "url": "