get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 8589,
    "url": "https://patches.dpdk.org/api/patches/8589/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1446556153-18845-9-git-send-email-jerin.jacob@caviumnetworks.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": "<1446556153-18845-9-git-send-email-jerin.jacob@caviumnetworks.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1446556153-18845-9-git-send-email-jerin.jacob@caviumnetworks.com",
    "date": "2015-11-03T13:09:09",
    "name": "[dpdk-dev,08/12] acl: arm64: acl implementation using NEON gcc intrinsic",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "dde8f4a116fa5493bb14e206904e71b92a75fb5d",
    "submitter": {
        "id": 305,
        "url": "https://patches.dpdk.org/api/people/305/?format=api",
        "name": "Jerin Jacob",
        "email": "jerin.jacob@caviumnetworks.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1446556153-18845-9-git-send-email-jerin.jacob@caviumnetworks.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/8589/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/8589/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 5F51091D6;\n\tTue,  3 Nov 2015 14:10:34 +0100 (CET)",
            "from na01-bn1-obe.outbound.protection.outlook.com\n\t(mail-bn1bon0067.outbound.protection.outlook.com [157.56.111.67])\n\tby dpdk.org (Postfix) with ESMTP id 6383A8F9D\n\tfor <dev@dpdk.org>; Tue,  3 Nov 2015 14:10:32 +0100 (CET)",
            "from localhost.caveonetworks.com (111.93.218.67) by\n\tBY2PR0701MB1974.namprd07.prod.outlook.com (10.163.155.20) with\n\tMicrosoft SMTP\n\tServer (TLS) id 15.1.312.18; Tue, 3 Nov 2015 13:10:29 +0000"
        ],
        "Authentication-Results": "spf=none (sender IP is )\n\tsmtp.mailfrom=Jerin.Jacob@caviumnetworks.com; ",
        "From": "Jerin Jacob <jerin.jacob@caviumnetworks.com>",
        "To": "<dev@dpdk.org>",
        "Date": "Tue, 3 Nov 2015 18:39:09 +0530",
        "Message-ID": "<1446556153-18845-9-git-send-email-jerin.jacob@caviumnetworks.com>",
        "X-Mailer": "git-send-email 2.1.0",
        "In-Reply-To": "<1446556153-18845-8-git-send-email-jerin.jacob@caviumnetworks.com>",
        "References": "<1446556153-18845-1-git-send-email-jerin.jacob@caviumnetworks.com>\n\t<1446556153-18845-2-git-send-email-jerin.jacob@caviumnetworks.com>\n\t<1446556153-18845-3-git-send-email-jerin.jacob@caviumnetworks.com>\n\t<1446556153-18845-4-git-send-email-jerin.jacob@caviumnetworks.com>\n\t<1446556153-18845-5-git-send-email-jerin.jacob@caviumnetworks.com>\n\t<1446556153-18845-6-git-send-email-jerin.jacob@caviumnetworks.com>\n\t<1446556153-18845-7-git-send-email-jerin.jacob@caviumnetworks.com>\n\t<1446556153-18845-8-git-send-email-jerin.jacob@caviumnetworks.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[111.93.218.67]",
        "X-ClientProxiedBy": "MAXPR01CA0048.INDPRD01.PROD.OUTLOOK.COM (25.164.146.148)\n\tTo\n\tBY2PR0701MB1974.namprd07.prod.outlook.com (25.163.155.20)",
        "X-Microsoft-Exchange-Diagnostics": [
            "1; BY2PR0701MB1974;\n\t2:A+rzhi6vt0Y7GaAo2L73Mi7dlOIOfRH+r+N2+kWY0xkIzzWk1bp4vIyiJYj9wafYNjPnrdSwnHwZQCZoimntFw0pg7AXcHwkilYxgRAsVJ/TlHAykEuoDuFt5RJVuEJuHx+S9hWZqDOijjnlSKeeMIkx3h0EBn9tXz5nmVJ1kHk=;\n\t3:LuUFMHNaj274VYEBuu4rVsJMi7NMelfLw9jY8zaZuIq0YaSOZnhWoK3hc7WCIYyPKs6QIrGlSlT/tgNVmZFrJ7bnLDikuH6nY0SG1HviClVXinQfBLVH9lp/UBQWs9CW3FUMpl9RAucKnbtk8/FTWQ==;\n\t25:j+bMhdPKw/izRbFAcbRqp5uB2MtmDScz9XXS/YUFVQXxCyVpD5id7HRBEacwZ0eLieCb074A2jjtYAT2LbngrkEBsCyuUYHVhGB/EAlNxzUemNEbZMtCUqBobnEIjiTGNyxAUWjXWi/ho18v2Z+qKivRT+NWWeqjWnNZKbKYxyG2b0m1gaHfXKYwNvrvfeGo4KjMWSB4ro+iT7VmXilqRrI2tnwlSRSTGB0aYaSAbkXbVsujtNwptNZxE2kpTm4usjZjgRO8c44f7sG0ibY31g==",
            "1; BY2PR0701MB1974;\n\t20:tSd1j9wDbDNTEE6OV4HG8goVpJ3VH6OoqXTGw6Jh7LNiBEbA2eLCiuXNT4AT9S9wpH1jLe/N4jBnG0LeCsPx906BifBbdhaWACnCFybur6bGDIYVL3PeYMRfBY1ia/+L+vnteEN/4ePuoRuidRBe9/U1YsExZhtizyQY6aUoMzlezh5pn0L3RUyGUVp1Lh2oV9M8EZhHRETkS4fFokZiUvfodCyqOoDRLLS8x80DTFG+ZHiayhQiY90xOuFNX1+mk5d5XC7fEe4uflaYFRx46Qq9AVRuZBUzQsaKayekM7RAaew0WXqQB36C5skVN+xPzbFR8JvByouX7HECt3HJe/zhjtJdtGwOJ4nw87EUGpTDOioB2MlirPu0uuuNDFEdB3UXYhCGrplmOUxTe1hkjbxDtWGIcT5mqmBRJPzlB+lNT+CSVAG8zCZAj3pwlySiP/FLlvy6WOLnkRW0dlfiYzRHjXPbG57UShgXTOyekmknHS19NOHucxGrVR1KTSgaFjtnLBMJHpFoCbRtFHTX2jSIq11tWLowQrju79NCf+d8o9Vh/IFGjzc1ehZLo2qPW3Lzko6Q+8bAN8X6r4oLtnVA4Qo3c3sfr62xNq3R/kY=",
            "1; BY2PR0701MB1974;\n\t4:Uw2sBAk4WdwEcU0X2MyUre0r4gsbawB0xJAHesdokLVUrgHkyufHAmNXr7eP69L94a/a12da/5CYKqCVK+lsZhBs3XHLmBIxGMvf3vlHBcvr816Q6/TsNaD6cOy0J6Hk8xQxS6euqEXoZeBfMQNssTkrN0ZiypUsVg3B4ZgquwXKHrrkjycwLOwda1Oe9s7yCLBaC2VOLAq/DwER7Ss1W4F6/sqMHV4MSSB2GHiMEhPxyM9Vy+yQszS3I6fo1uTuW2LuF0pB111K0uogLj5Ehf/24Joe8al/cKUiycZTJ5z41KkzebWAMmkIMFfp8jlLwYna0rek9rpNvyaRLKBALHYJnjcVfPLSo4tRFagu5p8dJXh64pSPOjpjuHOZWgu7",
            "=?us-ascii?Q?1; BY2PR0701MB1974;\n\t23:sUwRdFf4TsDBSfpsu5e04r9bQTuSuZfb/IiagMb?=\n\t=?us-ascii?Q?xzXgErcf/MVBINrwlKqdorguEqoLBo1sPmciSoNnxQqKIxypFN2WXjDn662J?=\n\t=?us-ascii?Q?pGiOg8lbalJkfS81GpEbfektOhgRSX7yfuaon44b7SeW00tFW3l0zrls3tkB?=\n\t=?us-ascii?Q?78Gg50iqL6KmzCie6K+Jjwbzj69LW+ma8G/TrE7YC0avGbqYAFU9WDVmzGx/?=\n\t=?us-ascii?Q?i5cfW7jXWbU9IueTVIpY6rFMd1o+wAlNTK3aTz+fLVjKx4U/DcfMXIGcMEmI?=\n\t=?us-ascii?Q?s5Rlfq1ZCNtWQC9bUBQammslumfNV4ahkWdmsXFG2lQxrjkikLxEg/grCdLt?=\n\t=?us-ascii?Q?BgH3/9TX7g6hTj1a8AQMT+0cGewdPVKjLluMKwUepEjrAZYCIVx7zD+nGk3V?=\n\t=?us-ascii?Q?oao37LfQ5DAwdzwQ0CE3vaaYc8M5zabH++ld2TXBW/kXQz7BZGTdAGeQnTiq?=\n\t=?us-ascii?Q?WMlMkmx0tHoA8zBcqeJQGFeQhlMEXXuZuGe3FT7YAoCHKW+g8bO5o/iWCw8b?=\n\t=?us-ascii?Q?Tl7472vH7JgkFoObe4pnd88Z4kDLAQUHHq0W+CYswEx+bn8xzl40cRWhp+2V?=\n\t=?us-ascii?Q?Vhfk7zkTmbLDTJ0HJ3Wch4frRwa5G1ThnS0OhRRjnCyTXquqhN3tw0OWNDPA?=\n\t=?us-ascii?Q?AoxLbfyP/SmP6yDzAb/GQsjbXT9hfhJj17KsjzXRREM+fHuipHr03cDBfean?=\n\t=?us-ascii?Q?fvopNnAcnNBUvZlOwTxgVZhR45qlHKS+swtUzr1h/KP0geR3X6L04ZajJlU0?=\n\t=?us-ascii?Q?akrP9WXgkLib1uUu+q2CDauiSuHLKs69jV5Y3kbQMrXZUp6JjtmOxUlvSgPm?=\n\t=?us-ascii?Q?D1kddC555lseDhAuq9lZ8xk/TPoTf1I3kogsxQW1Kg0b+XFMd4vw57pNzwmy?=\n\t=?us-ascii?Q?uxq89ua4v1+rQUElPTDZqBXL3ipU7Ju6/stkz3lrA+n9k0WKHqF881nCSNtZ?=\n\t=?us-ascii?Q?Jkf1gwLh6zpuEB5QDOxDTc4ZN0JKpiznZ13p9dyLrBvwA1fiUIRYjFvWn7Gs?=\n\t=?us-ascii?Q?HKBcddO0mzz4mEDfNEPXxhya74JH2lXcmbYAZ/iLhKmx3ChdanzAEzCBKY2N?=\n\t=?us-ascii?Q?cjmqQ4EEu2h6BuUqDvvD//RHI4ln6YQPK8iUBk1PLmIAvoSLCqGP0/cc6O2w?=\n\t=?us-ascii?Q?K9Tj+i87SpEqdNmngtBsog8zWIjLfAAxvslzpD3EPTFYXv3158rgDv4wS+D5?=\n\t=?us-ascii?Q?T6Jgvr/OlCshJ8hEKDVYQXUIWGRqR4UG6e5sA+eoYRtquk81RWf5sYJcZww?=\n\t=?us-ascii?Q?=3D=3D?=",
            "1; BY2PR0701MB1974;\n\t5:US33DhLuEGks0OTn7DeRF5Z0ydc/rZbtkWXa2PhlfjLnIThGGO9glfRW4slMChgZ6riTY5rzRQ+Oc/tdreoy/8TTOIze4W7DLlo7wWneNjH5Feba7fwNBiOvbMa2aj1x0M9pa9bdBmvE4rx54188hg==;\n\t24:EgteGPWBW59RdjQAah7LQfK8tHI47Ad+KloPzWpY8817mBa943Gg16VP82+uqsWPNcCgqqZNLPE1IXxv6bxVV7iXuDltlxX2fWVV+TgF+WI=;\n\t20:geblNKDQKt0BMc7iyOXjwTEMbR9r3mMSW9/zsOQ1QIyXuGZFyYzYI+81s0T3VOiQ4B//Nc/Q5KZTDXnG3SAn3A=="
        ],
        "X-Microsoft-Antispam": "UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0701MB1974;",
        "X-Microsoft-Antispam-PRVS": "<BY2PR0701MB19741E03E78FB8E896C6B1EC8C2B0@BY2PR0701MB1974.namprd07.prod.outlook.com>",
        "X-Exchange-Antispam-Report-Test": "UriScan:(236414709691187);",
        "X-Exchange-Antispam-Report-CFA-Test": "BCL:0; PCL:0;\n\tRULEID:(601004)(2401047)(8121501046)(5005006)(520078)(10201501046)(3002001);\n\tSRVR:BY2PR0701MB1974; BCL:0; PCL:0; RULEID:; SRVR:BY2PR0701MB1974; ",
        "X-Forefront-PRVS": "0749DC2CE6",
        "X-Forefront-Antispam-Report": "SFV:NSPM;\n\tSFS:(10009020)(6009001)(6069001)(189002)(199003)(81156007)(5001960100002)(50226001)(50986999)(5004730100002)(2950100001)(110136002)(77096005)(107886002)(66066001)(47776003)(189998001)(5007970100001)(42186005)(19580395003)(86362001)(76506005)(87976001)(69596002)(97736004)(50466002)(101416001)(53416004)(48376002)(106356001)(105586002)(19580405001)(36756003)(5008740100001)(76176999)(40100003)(92566002)(4001430100002)(575784001)(5009440100003)(93886004)(33646002)(122386002)(5003940100001)(229853001)(2351001)(7099028);\n\tDIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0701MB1974;\n\tH:localhost.caveonetworks.com; \n\tFPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; ",
        "Received-SPF": "None (protection.outlook.com: caviumnetworks.com does not\n\tdesignate permitted sender hosts)",
        "SpamDiagnosticOutput": "1:23",
        "SpamDiagnosticMetadata": "NSPM",
        "X-OriginatorOrg": "caviumnetworks.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "03 Nov 2015 13:10:29.0339\n\t(UTC)",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "Hosted",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "BY2PR0701MB1974",
        "Subject": "[dpdk-dev] [PATCH 08/12] acl: arm64: acl implementation using NEON\n\tgcc intrinsic",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "verified with testacl and acl_autotest applications on arm64 architecture.\n\nSigned-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>\n---\n app/test-acl/main.c           |   4 +\n lib/librte_acl/Makefile       |   5 +\n lib/librte_acl/acl.h          |   4 +\n lib/librte_acl/acl_run_neon.c |  46 +++++++\n lib/librte_acl/acl_run_neon.h | 290 ++++++++++++++++++++++++++++++++++++++++++\n lib/librte_acl/rte_acl.c      |  25 ++++\n lib/librte_acl/rte_acl.h      |   1 +\n 7 files changed, 375 insertions(+)\n create mode 100644 lib/librte_acl/acl_run_neon.c\n create mode 100644 lib/librte_acl/acl_run_neon.h",
    "diff": "diff --git a/app/test-acl/main.c b/app/test-acl/main.c\nindex 72ce83c..0b0c093 100644\n--- a/app/test-acl/main.c\n+++ b/app/test-acl/main.c\n@@ -101,6 +101,10 @@ static const struct acl_alg acl_alg[] = {\n \t\t.name = \"avx2\",\n \t\t.alg = RTE_ACL_CLASSIFY_AVX2,\n \t},\n+\t{\n+\t\t.name = \"neon\",\n+\t\t.alg = RTE_ACL_CLASSIFY_NEON,\n+\t},\n };\n \n static struct {\ndiff --git a/lib/librte_acl/Makefile b/lib/librte_acl/Makefile\nindex 7a1cf8a..27f91d5 100644\n--- a/lib/librte_acl/Makefile\n+++ b/lib/librte_acl/Makefile\n@@ -48,9 +48,14 @@ SRCS-$(CONFIG_RTE_LIBRTE_ACL) += rte_acl.c\n SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_bld.c\n SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_gen.c\n SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_run_scalar.c\n+ifeq ($(CONFIG_RTE_ARCH_ARM64),y)\n+SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_run_neon.c\n+else\n SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_run_sse.c\n+endif\n \n CFLAGS_acl_run_sse.o += -msse4.1\n+CFLAGS_acl_run_neon.o += -flax-vector-conversions -Wno-maybe-uninitialized\n \n #\n # If the compiler supports AVX2 instructions,\ndiff --git a/lib/librte_acl/acl.h b/lib/librte_acl/acl.h\nindex eb4930c..09d6784 100644\n--- a/lib/librte_acl/acl.h\n+++ b/lib/librte_acl/acl.h\n@@ -230,6 +230,10 @@ int\n rte_acl_classify_avx2(const struct rte_acl_ctx *ctx, const uint8_t **data,\n \tuint32_t *results, uint32_t num, uint32_t categories);\n \n+int\n+rte_acl_classify_neon(const struct rte_acl_ctx *ctx, const uint8_t **data,\n+\tuint32_t *results, uint32_t num, uint32_t categories);\n+\n #ifdef __cplusplus\n }\n #endif /* __cplusplus */\ndiff --git a/lib/librte_acl/acl_run_neon.c b/lib/librte_acl/acl_run_neon.c\nnew file mode 100644\nindex 0000000..b014451\n--- /dev/null\n+++ b/lib/librte_acl/acl_run_neon.c\n@@ -0,0 +1,46 @@\n+/*\n+ *   BSD LICENSE\n+ *\n+ *   Copyright (C) Cavium networks Ltd. 2015.\n+ *\n+ *   Redistribution and use in source and binary forms, with or without\n+ *   modification, are permitted provided that the following conditions\n+ *   are met:\n+ *\n+ *     * Redistributions of source code must retain the above copyright\n+ *       notice, this list of conditions and the following disclaimer.\n+ *     * Redistributions in binary form must reproduce the above copyright\n+ *       notice, this list of conditions and the following disclaimer in\n+ *       the documentation and/or other materials provided with the\n+ *       distribution.\n+ *     * Neither the name of Cavium networks nor the names of its\n+ *       contributors may be used to endorse or promote products derived\n+ *       from this software without specific prior written permission.\n+ *\n+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ *   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+*/\n+\n+#include \"acl_run_neon.h\"\n+\n+int\n+rte_acl_classify_neon(const struct rte_acl_ctx *ctx, const uint8_t **data,\n+\t\t      uint32_t *results, uint32_t num, uint32_t categories)\n+{\n+\tif (likely(num >= 8))\n+\t\treturn search_neon_8(ctx, data, results, num, categories);\n+\telse if (num >= 4)\n+\t\treturn search_neon_4(ctx, data, results, num, categories);\n+\telse\n+\t\treturn rte_acl_classify_scalar(ctx, data, results, num,\n+\t\t\tcategories);\n+}\ndiff --git a/lib/librte_acl/acl_run_neon.h b/lib/librte_acl/acl_run_neon.h\nnew file mode 100644\nindex 0000000..4579476\n--- /dev/null\n+++ b/lib/librte_acl/acl_run_neon.h\n@@ -0,0 +1,290 @@\n+/*\n+ *   BSD LICENSE\n+ *\n+ *   Copyright (C) Cavium networks Ltd. 2015.\n+ *\n+ *   Redistribution and use in source and binary forms, with or without\n+ *   modification, are permitted provided that the following conditions\n+ *   are met:\n+ *\n+ *     * Redistributions of source code must retain the above copyright\n+ *       notice, this list of conditions and the following disclaimer.\n+ *     * Redistributions in binary form must reproduce the above copyright\n+ *       notice, this list of conditions and the following disclaimer in\n+ *       the documentation and/or other materials provided with the\n+ *       distribution.\n+ *     * Neither the name of Cavium networks nor the names of its\n+ *       contributors may be used to endorse or promote products derived\n+ *       from this software without specific prior written permission.\n+ *\n+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ *   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+*/\n+\n+#include \"acl_run.h\"\n+#include \"acl_vect.h\"\n+\n+struct _neon_acl_const {\n+\trte_xmm_t xmm_shuffle_input;\n+\trte_xmm_t xmm_index_mask;\n+\trte_xmm_t range_base;\n+} neon_acl_const  __attribute__((aligned(RTE_CACHE_LINE_SIZE))) = {\n+\t{\n+\t\t.u32 = {0x00000000, 0x04040404, 0x08080808, 0x0c0c0c0c}\n+\t},\n+\t{\n+\t\t.u32 = {RTE_ACL_NODE_INDEX, RTE_ACL_NODE_INDEX,\n+\t\tRTE_ACL_NODE_INDEX, RTE_ACL_NODE_INDEX}\n+\t},\n+\t{\n+\t\t.u32 = {0xffffff00, 0xffffff04, 0xffffff08, 0xffffff0c}\n+\t},\n+};\n+\n+/*\n+ * Resolve priority for multiple results (neon version).\n+ * This consists comparing the priority of the current traversal with the\n+ * running set of results for the packet.\n+ * For each result, keep a running array of the result (rule number) and\n+ * its priority for each category.\n+ */\n+static inline void\n+resolve_priority_neon(uint64_t transition, int n, const struct rte_acl_ctx *ctx,\n+\t\t      struct parms *parms,\n+\t\t      const struct rte_acl_match_results *p,\n+\t\t      uint32_t categories)\n+{\n+\tuint32_t x;\n+\tint32x4_t results, priority, results1, priority1;\n+\tuint32x4_t selector;\n+\tint32_t *saved_results, *saved_priority;\n+\n+\tfor (x = 0; x < categories; x += RTE_ACL_RESULTS_MULTIPLIER) {\n+\t\tsaved_results = (int32_t *)(&parms[n].cmplt->results[x]);\n+\t\tsaved_priority = (int32_t *)(&parms[n].cmplt->priority[x]);\n+\n+\t\t/* get results and priorities for completed trie */\n+\t\tresults = vld1q_s32(\n+\t\t\t(const int32_t *)&p[transition].results[x]);\n+\t\tpriority = vld1q_s32(\n+\t\t\t(const int32_t *)&p[transition].priority[x]);\n+\n+\t\t/* if this is not the first completed trie */\n+\t\tif (parms[n].cmplt->count != ctx->num_tries) {\n+\t\t\t/* get running best results and their priorities */\n+\t\t\tresults1 = vld1q_s32(saved_results);\n+\t\t\tpriority1 = vld1q_s32(saved_priority);\n+\n+\t\t\t/* select results that are highest priority */\n+\t\t\tselector = vcgtq_s32(priority1, priority);\n+\t\t\tresults = vbslq_s32(selector, results1, results);\n+\t\t\tpriority = vbslq_s32(selector, priority1, priority);\n+\t\t}\n+\n+\t\t/* save running best results and their priorities */\n+\t\tvst1q_s32(saved_results, results);\n+\t\tvst1q_s32(saved_priority, priority);\n+\t}\n+}\n+\n+/*\n+ * Check for any match in 4 transitions\n+ */\n+static inline __attribute__((always_inline)) uint32_t\n+check_any_match_x4(uint64_t val[])\n+{\n+\treturn ((val[0] | val[1] | val[2] | val[3]) & RTE_ACL_NODE_MATCH);\n+}\n+\n+static inline __attribute__((always_inline)) void\n+acl_match_check_x4(int slot, const struct rte_acl_ctx *ctx, struct parms *parms,\n+\t\t   struct acl_flow_data *flows, uint64_t transitions[])\n+{\n+\twhile (check_any_match_x4(transitions)) {\n+\t\ttransitions[0] = acl_match_check(transitions[0], slot, ctx,\n+\t\t\tparms, flows, resolve_priority_neon);\n+\t\ttransitions[1] = acl_match_check(transitions[1], slot + 1, ctx,\n+\t\t\tparms, flows, resolve_priority_neon);\n+\t\ttransitions[2] = acl_match_check(transitions[2], slot + 2, ctx,\n+\t\t\tparms, flows, resolve_priority_neon);\n+\t\ttransitions[3] = acl_match_check(transitions[3], slot + 3, ctx,\n+\t\t\tparms, flows, resolve_priority_neon);\n+\t}\n+}\n+\n+/*\n+ * Process 4 transitions (in 2 NEON Q registers) in parallel\n+ */\n+static inline __attribute__((always_inline)) int32x4_t\n+transition4(int32x4_t next_input, const uint64_t *trans, uint64_t transitions[])\n+{\n+\tint32x4x2_t tr_hi_lo;\n+\tint32x4_t t, in, r;\n+\tuint32x4_t index_msk, node_type, addr;\n+\tuint32x4_t dfa_msk, mask, quad_ofs, dfa_ofs;\n+\n+\t/* Move low 32 into tr_hi_lo.val[0] and high 32 into tr_hi_lo.val[1] */\n+\ttr_hi_lo = vld2q_s32((const int32_t *)transitions);\n+\n+\t/* Calculate the address (array index) for all 4 transitions. */\n+\n+\tindex_msk = vld1q_u32((const uint32_t *)&neon_acl_const.xmm_index_mask);\n+\n+\t/* Calc node type and node addr */\n+\tnode_type = vbicq_s32(tr_hi_lo.val[0], index_msk);\n+\taddr = vandq_s32(tr_hi_lo.val[0], index_msk);\n+\n+\t/* t = 0 */\n+\tt = veorq_s32(node_type, node_type);\n+\n+\t/* mask for DFA type(0) nodes */\n+\tdfa_msk = vceqq_u32(node_type, t);\n+\n+\tmask = vld1q_s32((const int32_t *)&neon_acl_const.xmm_shuffle_input);\n+\tin = vqtbl1q_u8((uint8x16_t)next_input, (uint8x16_t)mask);\n+\n+\t/* DFA calculations. */\n+\tr = vshrq_n_u32(in, 30); /* div by 64 */\n+\tmask = vld1q_s32((const int32_t *)&neon_acl_const.range_base);\n+\tr = vaddq_u8(r, mask);\n+\tt = vshrq_n_u32(in, 24);\n+\tr = vqtbl1q_u8((uint8x16_t)tr_hi_lo.val[1], (uint8x16_t)r);\n+\tdfa_ofs = vsubq_s32(t, r);\n+\n+\t/* QUAD/SINGLE calculations. */\n+\tt = vcgtq_s8(in, tr_hi_lo.val[1]);\n+\tt = vabsq_s8(t);\n+\tt = vpaddlq_u8(t);\n+\tquad_ofs = vpaddlq_u16(t);\n+\n+\t/* blend DFA and QUAD/SINGLE. */\n+\tt = vbslq_u8(dfa_msk, dfa_ofs, quad_ofs);\n+\n+\t/* calculate address for next transitions */\n+\taddr = vaddq_u32(addr, t);\n+\n+\t/* Fill next transitions */\n+\ttransitions[0] = trans[vgetq_lane_u32(addr, 0)];\n+\ttransitions[1] = trans[vgetq_lane_u32(addr, 1)];\n+\ttransitions[2] = trans[vgetq_lane_u32(addr, 2)];\n+\ttransitions[3] = trans[vgetq_lane_u32(addr, 3)];\n+\n+\treturn vshrq_n_u32(next_input, CHAR_BIT);\n+}\n+\n+/*\n+ * Execute trie traversal with 8 traversals in parallel\n+ */\n+static inline int\n+search_neon_8(const struct rte_acl_ctx *ctx, const uint8_t **data,\n+\t      uint32_t *results, uint32_t total_packets, uint32_t categories)\n+{\n+\tint n;\n+\tstruct acl_flow_data flows;\n+\tuint64_t index_array[8];\n+\tstruct completion cmplt[8];\n+\tstruct parms parms[8];\n+\tint32x4_t input0, input1;\n+\n+\tacl_set_flow(&flows, cmplt, RTE_DIM(cmplt), data, results,\n+\t\t     total_packets, categories, ctx->trans_table);\n+\n+\tfor (n = 0; n < 8; n++) {\n+\t\tcmplt[n].count = 0;\n+\t\tindex_array[n] = acl_start_next_trie(&flows, parms, n, ctx);\n+\t}\n+\n+\t /* Check for any matches. */\n+\tacl_match_check_x4(0, ctx, parms, &flows, &index_array[0]);\n+\tacl_match_check_x4(4, ctx, parms, &flows, &index_array[4]);\n+\n+\twhile (flows.started > 0) {\n+\t\t/* Gather 4 bytes of input data for each stream. */\n+\t\tinput0 = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 0), input0, 0);\n+\t\tinput1 = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 4), input1, 0);\n+\n+\t\tinput0 = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 1), input0, 1);\n+\t\tinput1 = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 5), input1, 1);\n+\n+\t\tinput0 = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 2), input0, 2);\n+\t\tinput1 = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 6), input1, 2);\n+\n+\t\tinput0 = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 3), input0, 3);\n+\t\tinput1 = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 7), input1, 3);\n+\n+\t\t/* Process the 4 bytes of input on each stream. */\n+\n+\t\tinput0 = transition4(input0, flows.trans, &index_array[0]);\n+\t\tinput1 = transition4(input1, flows.trans, &index_array[4]);\n+\n+\t\tinput0 = transition4(input0, flows.trans, &index_array[0]);\n+\t\tinput1 = transition4(input1, flows.trans, &index_array[4]);\n+\n+\t\tinput0 = transition4(input0, flows.trans, &index_array[0]);\n+\t\tinput1 = transition4(input1, flows.trans, &index_array[4]);\n+\n+\t\tinput0 = transition4(input0, flows.trans, &index_array[0]);\n+\t\tinput1 = transition4(input1, flows.trans, &index_array[4]);\n+\n+\t\t /* Check for any matches. */\n+\t\tacl_match_check_x4(0, ctx, parms, &flows, &index_array[0]);\n+\t\tacl_match_check_x4(4, ctx, parms, &flows, &index_array[4]);\n+\t}\n+\n+\treturn 0;\n+}\n+\n+/*\n+ * Execute trie traversal with 4 traversals in parallel\n+ */\n+static inline int\n+search_neon_4(const struct rte_acl_ctx *ctx, const uint8_t **data,\n+\t      uint32_t *results, int total_packets, uint32_t categories)\n+{\n+\tint n;\n+\tstruct acl_flow_data flows;\n+\tuint64_t index_array[4];\n+\tstruct completion cmplt[4];\n+\tstruct parms parms[4];\n+\tint32x4_t input;\n+\n+\tacl_set_flow(&flows, cmplt, RTE_DIM(cmplt), data, results,\n+\t\t     total_packets, categories, ctx->trans_table);\n+\n+\tfor (n = 0; n < 4; n++) {\n+\t\tcmplt[n].count = 0;\n+\t\tindex_array[n] = acl_start_next_trie(&flows, parms, n, ctx);\n+\t}\n+\n+\t/* Check for any matches. */\n+\tacl_match_check_x4(0, ctx, parms, &flows, index_array);\n+\n+\twhile (flows.started > 0) {\n+\t\t/* Gather 4 bytes of input data for each stream. */\n+\t\tinput = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 0), input, 0);\n+\t\tinput = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 1), input, 1);\n+\t\tinput = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 2), input, 2);\n+\t\tinput = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 3), input, 3);\n+\n+\t\t/* Process the 4 bytes of input on each stream. */\n+\t\tinput = transition4(input, flows.trans, index_array);\n+\t\tinput = transition4(input, flows.trans, index_array);\n+\t\tinput = transition4(input, flows.trans, index_array);\n+\t\tinput = transition4(input, flows.trans, index_array);\n+\n+\t\t/* Check for any matches. */\n+\t\tacl_match_check_x4(0, ctx, parms, &flows, index_array);\n+\t}\n+\n+\treturn 0;\n+}\n+\ndiff --git a/lib/librte_acl/rte_acl.c b/lib/librte_acl/rte_acl.c\nindex d60219f..e2fdebd 100644\n--- a/lib/librte_acl/rte_acl.c\n+++ b/lib/librte_acl/rte_acl.c\n@@ -55,11 +55,32 @@ rte_acl_classify_avx2(__rte_unused const struct rte_acl_ctx *ctx,\n \treturn -ENOTSUP;\n }\n \n+int __attribute__ ((weak))\n+rte_acl_classify_sse(__rte_unused const struct rte_acl_ctx *ctx,\n+\t__rte_unused const uint8_t **data,\n+\t__rte_unused uint32_t *results,\n+\t__rte_unused uint32_t num,\n+\t__rte_unused uint32_t categories)\n+{\n+\treturn -ENOTSUP;\n+}\n+\n+int __attribute__ ((weak))\n+rte_acl_classify_neon(__rte_unused const struct rte_acl_ctx *ctx,\n+\t__rte_unused const uint8_t **data,\n+\t__rte_unused uint32_t *results,\n+\t__rte_unused uint32_t num,\n+\t__rte_unused uint32_t categories)\n+{\n+\treturn -ENOTSUP;\n+}\n+\n static const rte_acl_classify_t classify_fns[] = {\n \t[RTE_ACL_CLASSIFY_DEFAULT] = rte_acl_classify_scalar,\n \t[RTE_ACL_CLASSIFY_SCALAR] = rte_acl_classify_scalar,\n \t[RTE_ACL_CLASSIFY_SSE] = rte_acl_classify_sse,\n \t[RTE_ACL_CLASSIFY_AVX2] = rte_acl_classify_avx2,\n+\t[RTE_ACL_CLASSIFY_NEON] = rte_acl_classify_neon,\n };\n \n /* by default, use always available scalar code path. */\n@@ -93,6 +114,9 @@ rte_acl_init(void)\n {\n \tenum rte_acl_classify_alg alg = RTE_ACL_CLASSIFY_DEFAULT;\n \n+#ifdef RTE_ARCH_ARM64\n+\talg =  RTE_ACL_CLASSIFY_NEON;\n+#else\n #ifdef CC_AVX2_SUPPORT\n \tif (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2))\n \t\talg = RTE_ACL_CLASSIFY_AVX2;\n@@ -102,6 +126,7 @@ rte_acl_init(void)\n #endif\n \t\talg = RTE_ACL_CLASSIFY_SSE;\n \n+#endif\n \trte_acl_set_default_classify(alg);\n }\n \ndiff --git a/lib/librte_acl/rte_acl.h b/lib/librte_acl/rte_acl.h\nindex 98ef2fc..0979a09 100644\n--- a/lib/librte_acl/rte_acl.h\n+++ b/lib/librte_acl/rte_acl.h\n@@ -270,6 +270,7 @@ enum rte_acl_classify_alg {\n \tRTE_ACL_CLASSIFY_SCALAR = 1,  /**< generic implementation. */\n \tRTE_ACL_CLASSIFY_SSE = 2,     /**< requires SSE4.1 support. */\n \tRTE_ACL_CLASSIFY_AVX2 = 3,    /**< requires AVX2 support. */\n+\tRTE_ACL_CLASSIFY_NEON = 4,    /**< requires NEON support. */\n \tRTE_ACL_CLASSIFY_NUM          /* should always be the last one. */\n };\n \n",
    "prefixes": [
        "dpdk-dev",
        "08/12"
    ]
}