get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 52439,
    "url": "http://patches.dpdk.org/api/patches/52439/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190408182420.4398-4-aconole@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": "<20190408182420.4398-4-aconole@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190408182420.4398-4-aconole@redhat.com",
    "date": "2019-04-08T18:24:20",
    "name": "[3/3] acl: adjust the tests",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "a5839923810b2379bd9debe94bdec9df4ed5ee5a",
    "submitter": {
        "id": 332,
        "url": "http://patches.dpdk.org/api/people/332/?format=api",
        "name": "Aaron Conole",
        "email": "aconole@redhat.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190408182420.4398-4-aconole@redhat.com/mbox/",
    "series": [
        {
            "id": 4189,
            "url": "http://patches.dpdk.org/api/series/4189/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4189",
            "date": "2019-04-08T18:24:17",
            "name": "librte_acl: fixes related to testing with the meson build",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/4189/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/52439/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/52439/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 2B9815323;\n\tMon,  8 Apr 2019 20:24:34 +0200 (CEST)",
            "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby dpdk.org (Postfix) with ESMTP id 1A93E2BCE\n\tfor <dev@dpdk.org>; Mon,  8 Apr 2019 20:24:25 +0200 (CEST)",
            "from smtp.corp.redhat.com\n\t(int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 7C3584DB00;\n\tMon,  8 Apr 2019 18:24:24 +0000 (UTC)",
            "from dhcp-25.97.bos.redhat.com (unknown [10.18.25.61])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id F387364051;\n\tMon,  8 Apr 2019 18:24:23 +0000 (UTC)"
        ],
        "From": "Aaron Conole <aconole@redhat.com>",
        "To": "dev@dpdk.org",
        "Cc": "Konstantin Ananyev <konstantin.ananyev@intel.com>,\n\tJerin Jacob <jerinj@marvell.com>, Gavin Hu <gavin.hu@arm.com>",
        "Date": "Mon,  8 Apr 2019 14:24:20 -0400",
        "Message-Id": "<20190408182420.4398-4-aconole@redhat.com>",
        "In-Reply-To": "<20190408182420.4398-1-aconole@redhat.com>",
        "References": "<20190408182420.4398-1-aconole@redhat.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.13",
        "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.29]); Mon, 08 Apr 2019 18:24:24 +0000 (UTC)",
        "Subject": "[dpdk-dev] [PATCH 3/3] acl: adjust the tests",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "This makes the tests pass, and also ensures that on platforms where the\ntesting is supported, we can properly test the implementation specific\ncode.  One edge case is when we run on x86_64 systems that don't support\nAVX2, but where the compiler can generate such instructions.  That could\nbe an enhancement in the future, but for now at least the tests will\npass.\n\nSigned-off-by: Aaron Conole <aconole@redhat.com>\n---\n app/test/test_acl.c             | 62 +++++++++++++--------------------\n lib/librte_acl/Makefile         |  1 +\n lib/librte_acl/acl_run_notsup.c | 46 ++++++++++++++++++++++++\n lib/librte_acl/meson.build      |  4 +--\n 4 files changed, 73 insertions(+), 40 deletions(-)\n create mode 100644 lib/librte_acl/acl_run_notsup.c",
    "diff": "diff --git a/app/test/test_acl.c b/app/test/test_acl.c\nindex b1f75d1bc..c44faa251 100644\n--- a/app/test/test_acl.c\n+++ b/app/test/test_acl.c\n@@ -408,6 +408,9 @@ test_classify(void)\n \t\treturn -1;\n \t}\n \n+\t/* Always use the scalar testing for now. */\n+\trte_acl_set_ctx_classify(acx, RTE_ACL_CLASSIFY_SCALAR);\n+\n \tret = 0;\n \tfor (i = 0; i != TEST_CLASSIFY_ITER; i++) {\n \n@@ -547,6 +550,7 @@ test_build_ports_range(void)\n \tfor (i = 0; i != RTE_DIM(test_data); i++)\n \t\tdata[i] = (uint8_t *)&test_data[i];\n \n+\trte_acl_set_ctx_classify(acx, RTE_ACL_CLASSIFY_SCALAR);\n \tfor (i = 0; i != RTE_DIM(test_rules); i++) {\n \t\trte_acl_reset(acx);\n \t\tret = test_classify_buid(acx, test_rules, i + 1);\n@@ -911,6 +915,8 @@ test_convert_rules(const char *desc,\n \t\treturn -1;\n \t}\n \n+\trte_acl_set_ctx_classify(acx, RTE_ACL_CLASSIFY_SCALAR);\n+\n \trc = convert_rules(acx, convert, acl_test_rules,\n \t\tRTE_DIM(acl_test_rules));\n \tif (rc != 0)\n@@ -1352,7 +1358,7 @@ test_invalid_parameters(void)\n \tstruct rte_acl_param param;\n \tstruct rte_acl_ctx *acx;\n \tstruct rte_acl_ipv4vlan_rule rule;\n-\tint result;\n+\tint i, result;\n \n \tuint32_t layout[RTE_ACL_IPV4VLAN_NUM] = {0};\n \n@@ -1513,45 +1519,25 @@ test_invalid_parameters(void)\n \t\treturn -1;\n \t}\n \n-\t/* SSE classify test */\n-\n-\t/* cover zero categories in classify (should not fail) */\n-\tresult = rte_acl_classify(acx, NULL, NULL, 0, 0);\n-\tif (result != 0) {\n-\t\tprintf(\"Line %i: SSE classify with zero categories \"\n-\t\t\t\t\"failed!\\n\", __LINE__);\n-\t\trte_acl_free(acx);\n-\t\treturn -1;\n-\t}\n-\n-\t/* cover invalid but positive categories in classify */\n-\tresult = rte_acl_classify(acx, NULL, NULL, 0, 3);\n-\tif (result == 0) {\n-\t\tprintf(\"Line %i: SSE classify with 3 categories \"\n-\t\t\t\t\"should have failed!\\n\", __LINE__);\n-\t\trte_acl_free(acx);\n-\t\treturn -1;\n-\t}\n-\n-\t/* scalar classify test */\n+\tfor (i = RTE_ACL_CLASSIFY_DEFAULT; i < RTE_ACL_CLASSIFY_NUM; ++i) {\n+\t\trte_acl_set_ctx_classify(acx, i); /* set up the classify code */\n \n-\t/* cover zero categories in classify (should not fail) */\n-\tresult = rte_acl_classify_alg(acx, NULL, NULL, 0, 0,\n-\t\tRTE_ACL_CLASSIFY_SCALAR);\n-\tif (result != 0) {\n-\t\tprintf(\"Line %i: Scalar classify with zero categories \"\n-\t\t\t\t\"failed!\\n\", __LINE__);\n-\t\trte_acl_free(acx);\n-\t\treturn -1;\n-\t}\n+\t\t/* cover zero categories in classify (should not fail) */\n+\t\tresult = rte_acl_classify(acx, NULL, NULL, 0, 0);\n+\t\tif (result != 0 && result != -ENOTSUP) {\n+\t\t\tprintf(\"AGL: %d, ACL classify with zero categories failed: %d!\\n\",\n+\t\t\t       i, result);\n+\t\t\treturn -1;\n+\t\t}\n \n-\t/* cover invalid but positive categories in classify */\n-\tresult = rte_acl_classify(acx, NULL, NULL, 0, 3);\n-\tif (result == 0) {\n-\t\tprintf(\"Line %i: Scalar classify with 3 categories \"\n-\t\t\t\t\"should have failed!\\n\", __LINE__);\n-\t\trte_acl_free(acx);\n-\t\treturn -1;\n+\t\t/* cover invalid but positive categories in classify */\n+\t\tresult = rte_acl_classify(acx, NULL, NULL, 0, 3);\n+\t\t/* we don't check for -ENOTSUP here, since it is a failure */\n+\t\tif (result == 0) {\n+\t\t\tprintf(\"AGL: %d, ACL classify with 3 categories should fail!\\n\",\n+\t\t\t       i);\n+\t\t\treturn -1;\n+\t\t}\n \t}\n \n \t/* free ACL context */\ndiff --git a/lib/librte_acl/Makefile b/lib/librte_acl/Makefile\nindex ea5edf00a..c5dfdb832 100644\n--- a/lib/librte_acl/Makefile\n+++ b/lib/librte_acl/Makefile\n@@ -21,6 +21,7 @@ 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+SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_run_notsup.c\n \n ifneq ($(filter y,$(CONFIG_RTE_ARCH_ARM) $(CONFIG_RTE_ARCH_ARM64)),)\n SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_run_neon.c\ndiff --git a/lib/librte_acl/acl_run_notsup.c b/lib/librte_acl/acl_run_notsup.c\nnew file mode 100644\nindex 000000000..2bcc6e67f\n--- /dev/null\n+++ b/lib/librte_acl/acl_run_notsup.c\n@@ -0,0 +1,46 @@\n+#include <rte_acl.h>\n+#include \"acl.h\"\n+\n+/*\n+ * If the compiler doesn't support AVX2 instructions,\n+ * then the dummy one would be used instead for AVX2 classify method.\n+ */\n+int __rte_weak\n+rte_acl_classify_avx2(__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 __rte_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 __rte_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+int __rte_weak\n+rte_acl_classify_altivec(__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+}\ndiff --git a/lib/librte_acl/meson.build b/lib/librte_acl/meson.build\nindex 03c19e4e5..fc8689aa9 100644\n--- a/lib/librte_acl/meson.build\n+++ b/lib/librte_acl/meson.build\n@@ -2,8 +2,8 @@\n # Copyright(c) 2017 Intel Corporation\n \n version = 2\n-sources = files('acl_bld.c', 'acl_gen.c', 'acl_run_scalar.c',\n-\t\t'rte_acl.c', 'tb_mem.c')\n+sources = files('acl_bld.c', 'acl_gen.c', 'acl_run_notsup.c',\n+\t\t'acl_run_scalar.c', 'rte_acl.c', 'tb_mem.c')\n headers = files('rte_acl.h', 'rte_acl_osdep.h')\n \n if arch_subdir == 'x86'\n",
    "prefixes": [
        "3/3"
    ]
}