get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 115238,
    "url": "https://patches.dpdk.org/api/patches/115238/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220818114449.1408226-3-cristian.dumitrescu@intel.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": "<20220818114449.1408226-3-cristian.dumitrescu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220818114449.1408226-3-cristian.dumitrescu@intel.com",
    "date": "2022-08-18T11:44:45",
    "name": "[2/6] table: add key comparison functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "256521b53d2e1c9aad2f33600e2146fbd29be60b",
    "submitter": {
        "id": 19,
        "url": "https://patches.dpdk.org/api/people/19/?format=api",
        "name": "Cristian Dumitrescu",
        "email": "cristian.dumitrescu@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220818114449.1408226-3-cristian.dumitrescu@intel.com/mbox/",
    "series": [
        {
            "id": 24356,
            "url": "https://patches.dpdk.org/api/series/24356/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=24356",
            "date": "2022-08-18T11:44:43",
            "name": "pipeline: make the hash function configurable per table",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/24356/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/115238/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/115238/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 38915A034C;\n\tThu, 18 Aug 2022 13:45:23 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 35BBD4280B;\n\tThu, 18 Aug 2022 13:45:07 +0200 (CEST)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n by mails.dpdk.org (Postfix) with ESMTP id 82B1E40156\n for <dev@dpdk.org>; Thu, 18 Aug 2022 13:45:03 +0200 (CEST)",
            "from fmsmga008.fm.intel.com ([10.253.24.58])\n by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 18 Aug 2022 04:44:52 -0700",
            "from silpixa00400573.ir.intel.com (HELO\n silpixa00400573.ger.corp.intel.com.) ([10.237.223.157])\n by fmsmga008.fm.intel.com with ESMTP; 18 Aug 2022 04:44:51 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1660823103; x=1692359103;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=JImFg1pj8CbyTJKD9nQP6/R4kN5yz0YnqiUeN+C3MeI=;\n b=HAcL9wgWKmdnKs50qbSbfpQ2PRBGyly+wYirum2IaccX/FBWWsnRFvvA\n G7AAaLXMBGZUpgU2TGSmhvEGdlXcBboy15xGou8k5D4ZDn6sO0ZurjRtr\n mJxeeQqqnVjkFuV96odYZ0crImeoz0g1mOB8praNMJci/6ucIWv7MhXSz\n KLY8+7k1eTuokVu5GviQaF2BtilitZo01xvRyg8cF0hwKn6PrOjlEAgO1\n izkeWWfY+vktHeJqrXwHBCu8S65TBn0Qerjgb7ZCkviEDJLXPCK6M6I6T\n +fS6bfYwRU12V3nVgVGnE1GWkZh3xhgD7jMXorqhwdbQofqvyVARjjZp1 w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6500,9779,10442\"; a=\"292735208\"",
            "E=Sophos;i=\"5.93,246,1654585200\"; d=\"scan'208\";a=\"292735208\"",
            "E=Sophos;i=\"5.93,246,1654585200\"; d=\"scan'208\";a=\"668069701\""
        ],
        "X-ExtLoop1": "1",
        "From": "Cristian Dumitrescu <cristian.dumitrescu@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "\"Kamalakannan R .\" <kamalakannan.r@intel.com>",
        "Subject": "[PATCH 2/6] table: add key comparison functions",
        "Date": "Thu, 18 Aug 2022 11:44:45 +0000",
        "Message-Id": "<20220818114449.1408226-3-cristian.dumitrescu@intel.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20220818114449.1408226-1-cristian.dumitrescu@intel.com>",
        "References": "<20220818114449.1408226-1-cristian.dumitrescu@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "Add key comparison functions to be used by the exact match and the\nlearner table types as part of the performance critical lookup\noperation. Since the key size is fixed, it is possible to select a\nspecialized memory copy function as opposed to using the variable size\nversion, resulting in a performance improvement of around 5%.\n\nSigned-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\nSigned-off-by: Kamalakannan R. <kamalakannan.r@intel.com>\n---\n lib/table/meson.build      |   1 +\n lib/table/rte_swx_keycmp.c | 166 +++++++++++++++++++++++++++++++++++++\n lib/table/rte_swx_keycmp.h |  49 +++++++++++\n 3 files changed, 216 insertions(+)\n create mode 100644 lib/table/rte_swx_keycmp.c\n create mode 100644 lib/table/rte_swx_keycmp.h",
    "diff": "diff --git a/lib/table/meson.build b/lib/table/meson.build\nindex 6d4272c4ef..af749e4007 100644\n--- a/lib/table/meson.build\n+++ b/lib/table/meson.build\n@@ -8,6 +8,7 @@ if is_windows\n endif\n \n sources = files(\n+\t'rte_swx_keycmp.c',\n         'rte_swx_table_em.c',\n         'rte_swx_table_learner.c',\n         'rte_swx_table_selector.c',\ndiff --git a/lib/table/rte_swx_keycmp.c b/lib/table/rte_swx_keycmp.c\nnew file mode 100644\nindex 0000000000..ec65f5c822\n--- /dev/null\n+++ b/lib/table/rte_swx_keycmp.c\n@@ -0,0 +1,166 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2022 Intel Corporation\n+ */\n+#include <rte_common.h>\n+\n+#include \"rte_swx_keycmp.h\"\n+\n+static uint32_t\n+keycmp_generic(void *key1, void *key2, uint32_t key_size)\n+{\n+\treturn memcmp(key1, key2, key_size) ? 0 : 1;\n+}\n+\n+#define KEYCMP(N)                                                 \\\n+static uint32_t                                                   \\\n+keycmp##N(void *key1, void *key2, uint32_t key_size __rte_unused) \\\n+{                                                                 \\\n+\treturn memcmp(key1, key2, N) ? 0 : 1;                     \\\n+}\n+\n+KEYCMP(1)\n+KEYCMP(2)\n+KEYCMP(3)\n+KEYCMP(4)\n+KEYCMP(5)\n+KEYCMP(6)\n+KEYCMP(7)\n+KEYCMP(8)\n+KEYCMP(9)\n+\n+KEYCMP(10)\n+KEYCMP(11)\n+KEYCMP(12)\n+KEYCMP(13)\n+KEYCMP(14)\n+KEYCMP(15)\n+KEYCMP(16)\n+KEYCMP(17)\n+KEYCMP(18)\n+KEYCMP(19)\n+\n+KEYCMP(20)\n+KEYCMP(21)\n+KEYCMP(22)\n+KEYCMP(23)\n+KEYCMP(24)\n+KEYCMP(25)\n+KEYCMP(26)\n+KEYCMP(27)\n+KEYCMP(28)\n+KEYCMP(29)\n+\n+KEYCMP(30)\n+KEYCMP(31)\n+KEYCMP(32)\n+KEYCMP(33)\n+KEYCMP(34)\n+KEYCMP(35)\n+KEYCMP(36)\n+KEYCMP(37)\n+KEYCMP(38)\n+KEYCMP(39)\n+\n+KEYCMP(40)\n+KEYCMP(41)\n+KEYCMP(42)\n+KEYCMP(43)\n+KEYCMP(44)\n+KEYCMP(45)\n+KEYCMP(46)\n+KEYCMP(47)\n+KEYCMP(48)\n+KEYCMP(49)\n+\n+KEYCMP(50)\n+KEYCMP(51)\n+KEYCMP(52)\n+KEYCMP(53)\n+KEYCMP(54)\n+KEYCMP(55)\n+KEYCMP(56)\n+KEYCMP(57)\n+KEYCMP(58)\n+KEYCMP(59)\n+\n+KEYCMP(60)\n+KEYCMP(61)\n+KEYCMP(62)\n+KEYCMP(63)\n+KEYCMP(64)\n+\n+static rte_swx_keycmp_func_t keycmp_funcs[] = {\n+\tkeycmp1,\n+\tkeycmp2,\n+\tkeycmp3,\n+\tkeycmp4,\n+\tkeycmp5,\n+\tkeycmp6,\n+\tkeycmp7,\n+\tkeycmp8,\n+\tkeycmp9,\n+\tkeycmp10,\n+\tkeycmp11,\n+\tkeycmp12,\n+\tkeycmp13,\n+\tkeycmp14,\n+\tkeycmp15,\n+\tkeycmp16,\n+\tkeycmp17,\n+\tkeycmp18,\n+\tkeycmp19,\n+\tkeycmp20,\n+\tkeycmp21,\n+\tkeycmp22,\n+\tkeycmp23,\n+\tkeycmp24,\n+\tkeycmp25,\n+\tkeycmp26,\n+\tkeycmp27,\n+\tkeycmp28,\n+\tkeycmp29,\n+\tkeycmp30,\n+\tkeycmp31,\n+\tkeycmp32,\n+\tkeycmp33,\n+\tkeycmp34,\n+\tkeycmp35,\n+\tkeycmp36,\n+\tkeycmp37,\n+\tkeycmp38,\n+\tkeycmp39,\n+\tkeycmp40,\n+\tkeycmp41,\n+\tkeycmp42,\n+\tkeycmp43,\n+\tkeycmp44,\n+\tkeycmp45,\n+\tkeycmp46,\n+\tkeycmp47,\n+\tkeycmp48,\n+\tkeycmp49,\n+\tkeycmp50,\n+\tkeycmp51,\n+\tkeycmp52,\n+\tkeycmp53,\n+\tkeycmp54,\n+\tkeycmp55,\n+\tkeycmp56,\n+\tkeycmp57,\n+\tkeycmp58,\n+\tkeycmp59,\n+\tkeycmp60,\n+\tkeycmp61,\n+\tkeycmp62,\n+\tkeycmp63,\n+\tkeycmp64,\n+};\n+\n+rte_swx_keycmp_func_t\n+rte_swx_keycmp_func_get(uint32_t key_size)\n+{\n+\tif (key_size && key_size <= 64)\n+\t\treturn keycmp_funcs[key_size - 1];\n+\n+\treturn keycmp_generic;\n+}\ndiff --git a/lib/table/rte_swx_keycmp.h b/lib/table/rte_swx_keycmp.h\nnew file mode 100644\nindex 0000000000..09fb1be869\n--- /dev/null\n+++ b/lib/table/rte_swx_keycmp.h\n@@ -0,0 +1,49 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2022 Intel Corporation\n+ */\n+#ifndef __INCLUDE_RTE_SWX_KEYCMP_H__\n+#define __INCLUDE_RTE_SWX_KEYCMP_H__\n+\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+/**\n+ * @file\n+ * RTE SWX Key Comparison Functions\n+ */\n+\n+#include <stdint.h>\n+#include <string.h>\n+\n+/**\n+ * Key comparison function prototype\n+ *\n+ * @param[in] key1\n+ *   First key to compare. Must be non-NULL.\n+ * @param[in] key2\n+ *   Second key to compare. Must be non-NULL.\n+ * @param[in] key_size\n+ *   Key size in bytes.\n+ * @return\n+ *   0 when keys are different, 1 when keys are equal.\n+ */\n+typedef uint32_t\n+(*rte_swx_keycmp_func_t)(void *key1, void *key2, uint32_t key_size);\n+\n+/**\n+ * Key comparison function get\n+ *\n+ * @param[in] key_size\n+ *   Key size in bytes.\n+ * @return\n+ *   Key comparison function for the given key size\n+ */\n+rte_swx_keycmp_func_t\n+rte_swx_keycmp_func_get(uint32_t key_size);\n+\n+#ifdef __cplusplus\n+}\n+#endif\n+\n+#endif\n",
    "prefixes": [
        "2/6"
    ]
}