get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 127979,
    "url": "http://patches.dpdk.org/api/patches/127979/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230602170147.4828-1-pbhagavatula@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": "<20230602170147.4828-1-pbhagavatula@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230602170147.4828-1-pbhagavatula@marvell.com",
    "date": "2023-06-02T17:01:46",
    "name": "[v5,1/2] ip_frag: optimize key compare and hash generation",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "73b05fccb21c2ddc0b8737ce424094ad356afe62",
    "submitter": {
        "id": 1183,
        "url": "http://patches.dpdk.org/api/people/1183/?format=api",
        "name": "Pavan Nikhilesh Bhagavatula",
        "email": "pbhagavatula@marvell.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/20230602170147.4828-1-pbhagavatula@marvell.com/mbox/",
    "series": [
        {
            "id": 28331,
            "url": "http://patches.dpdk.org/api/series/28331/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=28331",
            "date": "2023-06-02T17:01:46",
            "name": "[v5,1/2] ip_frag: optimize key compare and hash generation",
            "version": 5,
            "mbox": "http://patches.dpdk.org/series/28331/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/127979/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/127979/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 4CE7E42C11;\n\tFri,  2 Jun 2023 19:02:02 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C39D840ED8;\n\tFri,  2 Jun 2023 19:02:01 +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 770E9406B8\n for <dev@dpdk.org>; Fri,  2 Jun 2023 19:01:59 +0200 (CEST)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 3529oZ7Z027573; Fri, 2 Jun 2023 10:01:55 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3qy3uykp5s-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Fri, 02 Jun 2023 10:01:55 -0700",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Fri, 2 Jun 2023 10:01:53 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend\n Transport; Fri, 2 Jun 2023 10:01:53 -0700",
            "from MININT-80QBFE8.corp.innovium.com (unknown [10.28.164.122])\n by maili.marvell.com (Postfix) with ESMTP id EC6433F7041;\n Fri,  2 Jun 2023 10:01:49 -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=pfpt0220;\n bh=MdMa0n9x9yuVLpw9pPtfbBeYUefBH3bo51Lqe1VC5r8=;\n b=e/Mhegz97D/ITNArfoPpxDbh+0KEdviUvcisKuTY4eLX3v+mW6wScpyL4YxRsSr91N1U\n co9e7f9JJtFW222GeBYOakTg7/iIaa6PCkRWtph/5uh000ixa9IzODCzoco4c1/g838E\n H3+ux/CCFqsJlmIJhsBVR9kHxLlskEUwKjT2DDmvdnz1eO59WsfLs5R9XbxeRNTA5dgM\n v7GuevcFtqE2CbiIr1yWOgSIYUq9iPCpzGsRC6f6yVCgo8LgqOi5GAZmSnZGGcTMB2/R\n xwFpUEQmkOISx2VONRx7+8ATtZ15fE5ffk0ieadvB0c5ZfIfh7e/DUyEPB3mNdiy23Ls uw==",
        "From": "<pbhagavatula@marvell.com>",
        "To": "<jerinj@marvell.com>, <Honnappa.Nagarahalli@arm.com>, <nd@arm.com>,\n Ruifeng Wang <ruifeng.wang@arm.com>, Yipeng Wang <yipeng1.wang@intel.com>,\n Sameh Gobriel <sameh.gobriel@intel.com>, Bruce Richardson\n <bruce.richardson@intel.com>, Vladimir Medvedkin\n <vladimir.medvedkin@intel.com>, Konstantin Ananyev\n <konstantin.v.ananyev@yandex.ru>",
        "CC": "<dev@dpdk.org>, Pavan Nikhilesh <pbhagavatula@marvell.com>",
        "Subject": "[PATCH v5 1/2] ip_frag: optimize key compare and hash generation",
        "Date": "Fri, 2 Jun 2023 22:31:46 +0530",
        "Message-ID": "<20230602170147.4828-1-pbhagavatula@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230531042617.13282-1-pbhagavatula@marvell.com>",
        "References": "<20230531042617.13282-1-pbhagavatula@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "YyViclb8b5SESETp93EgXqLjugqGGK-M",
        "X-Proofpoint-ORIG-GUID": "YyViclb8b5SESETp93EgXqLjugqGGK-M",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26\n definitions=2023-06-02_12,2023-06-02_02,2023-05-22_02",
        "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": "From: Pavan Nikhilesh <pbhagavatula@marvell.com>\n\nUse optimized rte_hash_k32_cmp_eq routine for key comparison for\nx86 and ARM64.\nUse CRC instructions for hash generation on ARM64.\n\nSigned-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>\nReviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>\n---\nOn Neoverse-N2, performance improved by 10% when measured with\nexamples/ip_reassembly.\n\n v5 Changes:\n - Fix spellcheck.\n v4 Changes:\n - Fix compilation failures (sys/queue)\n - Update test case to use proper macros.\n v3 Changes:\n - Drop NEON patch.\n v2 Changes:\n - Fix compilation failure with non ARM64/x86 targets\n\n lib/hash/rte_cmp_arm64.h       | 16 ++++++++--------\n lib/hash/rte_cmp_x86.h         | 16 ++++++++--------\n lib/ip_frag/ip_frag_common.h   | 14 ++++++++++++++\n lib/ip_frag/ip_frag_internal.c |  4 ++--\n 4 files changed, 32 insertions(+), 18 deletions(-)\n\n--\n2.25.1",
    "diff": "diff --git a/lib/hash/rte_cmp_arm64.h b/lib/hash/rte_cmp_arm64.h\nindex e9e26f9abd..a3e85635eb 100644\n--- a/lib/hash/rte_cmp_arm64.h\n+++ b/lib/hash/rte_cmp_arm64.h\n@@ -3,7 +3,7 @@\n  */\n\n /* Functions to compare multiple of 16 byte keys (up to 128 bytes) */\n-static int\n+static inline int\n rte_hash_k16_cmp_eq(const void *key1, const void *key2,\n \t\t    size_t key_len __rte_unused)\n {\n@@ -24,7 +24,7 @@ rte_hash_k16_cmp_eq(const void *key1, const void *key2,\n \treturn !(x0 == 0 && x1 == 0);\n }\n\n-static int\n+static inline int\n rte_hash_k32_cmp_eq(const void *key1, const void *key2, size_t key_len)\n {\n \treturn rte_hash_k16_cmp_eq(key1, key2, key_len) ||\n@@ -32,7 +32,7 @@ rte_hash_k32_cmp_eq(const void *key1, const void *key2, size_t key_len)\n \t\t\t\t(const char *) key2 + 16, key_len);\n }\n\n-static int\n+static inline int\n rte_hash_k48_cmp_eq(const void *key1, const void *key2, size_t key_len)\n {\n \treturn rte_hash_k16_cmp_eq(key1, key2, key_len) ||\n@@ -42,7 +42,7 @@ rte_hash_k48_cmp_eq(const void *key1, const void *key2, size_t key_len)\n \t\t\t\t(const char *) key2 + 32, key_len);\n }\n\n-static int\n+static inline int\n rte_hash_k64_cmp_eq(const void *key1, const void *key2, size_t key_len)\n {\n \treturn rte_hash_k32_cmp_eq(key1, key2, key_len) ||\n@@ -50,7 +50,7 @@ rte_hash_k64_cmp_eq(const void *key1, const void *key2, size_t key_len)\n \t\t\t\t(const char *) key2 + 32, key_len);\n }\n\n-static int\n+static inline int\n rte_hash_k80_cmp_eq(const void *key1, const void *key2, size_t key_len)\n {\n \treturn rte_hash_k64_cmp_eq(key1, key2, key_len) ||\n@@ -58,7 +58,7 @@ rte_hash_k80_cmp_eq(const void *key1, const void *key2, size_t key_len)\n \t\t\t\t(const char *) key2 + 64, key_len);\n }\n\n-static int\n+static inline int\n rte_hash_k96_cmp_eq(const void *key1, const void *key2, size_t key_len)\n {\n \treturn rte_hash_k64_cmp_eq(key1, key2, key_len) ||\n@@ -66,7 +66,7 @@ rte_hash_k96_cmp_eq(const void *key1, const void *key2, size_t key_len)\n \t\t\t\t(const char *) key2 + 64, key_len);\n }\n\n-static int\n+static inline int\n rte_hash_k112_cmp_eq(const void *key1, const void *key2, size_t key_len)\n {\n \treturn rte_hash_k64_cmp_eq(key1, key2, key_len) ||\n@@ -76,7 +76,7 @@ rte_hash_k112_cmp_eq(const void *key1, const void *key2, size_t key_len)\n \t\t\t\t(const char *) key2 + 96, key_len);\n }\n\n-static int\n+static inline int\n rte_hash_k128_cmp_eq(const void *key1, const void *key2, size_t key_len)\n {\n \treturn rte_hash_k64_cmp_eq(key1, key2, key_len) ||\ndiff --git a/lib/hash/rte_cmp_x86.h b/lib/hash/rte_cmp_x86.h\nindex 13a5836351..ddfbef462f 100644\n--- a/lib/hash/rte_cmp_x86.h\n+++ b/lib/hash/rte_cmp_x86.h\n@@ -5,7 +5,7 @@\n #include <rte_vect.h>\n\n /* Functions to compare multiple of 16 byte keys (up to 128 bytes) */\n-static int\n+static inline int\n rte_hash_k16_cmp_eq(const void *key1, const void *key2, size_t key_len __rte_unused)\n {\n \tconst __m128i k1 = _mm_loadu_si128((const __m128i *) key1);\n@@ -15,7 +15,7 @@ rte_hash_k16_cmp_eq(const void *key1, const void *key2, size_t key_len __rte_unu\n \treturn !_mm_test_all_zeros(x, x);\n }\n\n-static int\n+static inline int\n rte_hash_k32_cmp_eq(const void *key1, const void *key2, size_t key_len)\n {\n \treturn rte_hash_k16_cmp_eq(key1, key2, key_len) ||\n@@ -23,7 +23,7 @@ rte_hash_k32_cmp_eq(const void *key1, const void *key2, size_t key_len)\n \t\t\t\t(const char *) key2 + 16, key_len);\n }\n\n-static int\n+static inline int\n rte_hash_k48_cmp_eq(const void *key1, const void *key2, size_t key_len)\n {\n \treturn rte_hash_k16_cmp_eq(key1, key2, key_len) ||\n@@ -33,7 +33,7 @@ rte_hash_k48_cmp_eq(const void *key1, const void *key2, size_t key_len)\n \t\t\t\t(const char *) key2 + 32, key_len);\n }\n\n-static int\n+static inline int\n rte_hash_k64_cmp_eq(const void *key1, const void *key2, size_t key_len)\n {\n \treturn rte_hash_k32_cmp_eq(key1, key2, key_len) ||\n@@ -41,7 +41,7 @@ rte_hash_k64_cmp_eq(const void *key1, const void *key2, size_t key_len)\n \t\t\t\t(const char *) key2 + 32, key_len);\n }\n\n-static int\n+static inline int\n rte_hash_k80_cmp_eq(const void *key1, const void *key2, size_t key_len)\n {\n \treturn rte_hash_k64_cmp_eq(key1, key2, key_len) ||\n@@ -49,7 +49,7 @@ rte_hash_k80_cmp_eq(const void *key1, const void *key2, size_t key_len)\n \t\t\t\t(const char *) key2 + 64, key_len);\n }\n\n-static int\n+static inline int\n rte_hash_k96_cmp_eq(const void *key1, const void *key2, size_t key_len)\n {\n \treturn rte_hash_k64_cmp_eq(key1, key2, key_len) ||\n@@ -57,7 +57,7 @@ rte_hash_k96_cmp_eq(const void *key1, const void *key2, size_t key_len)\n \t\t\t\t(const char *) key2 + 64, key_len);\n }\n\n-static int\n+static inline int\n rte_hash_k112_cmp_eq(const void *key1, const void *key2, size_t key_len)\n {\n \treturn rte_hash_k64_cmp_eq(key1, key2, key_len) ||\n@@ -67,7 +67,7 @@ rte_hash_k112_cmp_eq(const void *key1, const void *key2, size_t key_len)\n \t\t\t\t(const char *) key2 + 96, key_len);\n }\n\n-static int\n+static inline int\n rte_hash_k128_cmp_eq(const void *key1, const void *key2, size_t key_len)\n {\n \treturn rte_hash_k64_cmp_eq(key1, key2, key_len) ||\ndiff --git a/lib/ip_frag/ip_frag_common.h b/lib/ip_frag/ip_frag_common.h\nindex 0d8ce6a1e1..7d6c1aa98d 100644\n--- a/lib/ip_frag/ip_frag_common.h\n+++ b/lib/ip_frag/ip_frag_common.h\n@@ -7,6 +7,14 @@\n\n #include <sys/queue.h>\n\n+#include <rte_common.h>\n+\n+#if defined(RTE_ARCH_ARM64)\n+#include <rte_cmp_arm64.h>\n+#elif defined(RTE_ARCH_X86)\n+#include <rte_cmp_x86.h>\n+#endif\n+\n #include \"rte_ip_frag.h\"\n #include \"ip_reassembly.h\"\n\n@@ -75,12 +83,18 @@ ip_frag_key_invalidate(struct ip_frag_key * key)\n static inline uint64_t\n ip_frag_key_cmp(const struct ip_frag_key * k1, const struct ip_frag_key * k2)\n {\n+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)\n+\treturn (k1->id_key_len != k2->id_key_len) ||\n+\t       (k1->key_len == IPV4_KEYLEN ? k1->src_dst[0] != k2->src_dst[0] :\n+\t\t\t\t\t     rte_hash_k32_cmp_eq(k1, k2, 32));\n+#else\n \tuint32_t i;\n \tuint64_t val;\n \tval = k1->id_key_len ^ k2->id_key_len;\n \tfor (i = 0; i < k1->key_len; i++)\n \t\tval |= k1->src_dst[i] ^ k2->src_dst[i];\n \treturn val;\n+#endif\n }\n\n /*\ndiff --git a/lib/ip_frag/ip_frag_internal.c b/lib/ip_frag/ip_frag_internal.c\nindex b436a4c931..7cbef647df 100644\n--- a/lib/ip_frag/ip_frag_internal.c\n+++ b/lib/ip_frag/ip_frag_internal.c\n@@ -45,7 +45,7 @@ ipv4_frag_hash(const struct ip_frag_key *key, uint32_t *v1, uint32_t *v2)\n\n \tp = (const uint32_t *)&key->src_dst;\n\n-#ifdef RTE_ARCH_X86\n+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)\n \tv = rte_hash_crc_4byte(p[0], PRIME_VALUE);\n \tv = rte_hash_crc_4byte(p[1], v);\n \tv = rte_hash_crc_4byte(key->id, v);\n@@ -66,7 +66,7 @@ ipv6_frag_hash(const struct ip_frag_key *key, uint32_t *v1, uint32_t *v2)\n\n \tp = (const uint32_t *) &key->src_dst;\n\n-#ifdef RTE_ARCH_X86\n+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)\n \tv = rte_hash_crc_4byte(p[0], PRIME_VALUE);\n \tv = rte_hash_crc_4byte(p[1], v);\n \tv = rte_hash_crc_4byte(p[2], v);\n",
    "prefixes": [
        "v5",
        "1/2"
    ]
}