get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 122592,
    "url": "http://patches.dpdk.org/api/patches/122592/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230126232802.3960109-5-akozyrev@nvidia.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": "<20230126232802.3960109-5-akozyrev@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230126232802.3960109-5-akozyrev@nvidia.com",
    "date": "2023-01-26T23:28:02",
    "name": "[v2,4/4] app/testpmd: add template table hash calculation function",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "372eb484f4a6683f1d19d94dd9906096278bf1d3",
    "submitter": {
        "id": 1873,
        "url": "http://patches.dpdk.org/api/people/1873/?format=api",
        "name": "Alexander Kozyrev",
        "email": "akozyrev@nvidia.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230126232802.3960109-5-akozyrev@nvidia.com/mbox/",
    "series": [
        {
            "id": 26664,
            "url": "http://patches.dpdk.org/api/series/26664/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=26664",
            "date": "2023-01-26T23:27:58",
            "name": "ethdev: add template table insertion and matching types",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/26664/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/122592/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/122592/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 1C77F42498;\n\tFri, 27 Jan 2023 00:28:53 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9CFAB42D54;\n\tFri, 27 Jan 2023 00:28:44 +0100 (CET)",
            "from NAM11-CO1-obe.outbound.protection.outlook.com\n (mail-co1nam11on2044.outbound.protection.outlook.com [40.107.220.44])\n by mails.dpdk.org (Postfix) with ESMTP id 1D0F242D52\n for <dev@dpdk.org>; Fri, 27 Jan 2023 00:28:43 +0100 (CET)",
            "from BN9PR03CA0249.namprd03.prod.outlook.com (2603:10b6:408:ff::14)\n by PH7PR12MB5654.namprd12.prod.outlook.com (2603:10b6:510:137::21)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.22; Thu, 26 Jan\n 2023 23:28:41 +0000",
            "from BN8NAM11FT049.eop-nam11.prod.protection.outlook.com\n (2603:10b6:408:ff::4) by BN9PR03CA0249.outlook.office365.com\n (2603:10b6:408:ff::14) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.22 via Frontend\n Transport; Thu, 26 Jan 2023 23:28:40 +0000",
            "from mail.nvidia.com (216.228.117.160) by\n BN8NAM11FT049.mail.protection.outlook.com (10.13.177.157) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.6043.21 via Frontend Transport; Thu, 26 Jan 2023 23:28:40 +0000",
            "from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com\n (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Thu, 26 Jan\n 2023 15:28:32 -0800",
            "from pegasus01.mtr.labs.mlnx (10.126.230.37) by\n rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.2.986.36; Thu, 26 Jan 2023 15:28:30 -0800"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=CGGsS6cfoGO+SLLqLUsq0jB8Xgro3h17SIEGPqQu8iYlOqC7x0GmjTQAUJG2DerF1OgziyHX3dDHFmfzrkXoeR0qmlWtY18btuUr/MJw/G1M0zF2tP5xDGneYTFlWImIVwhptlkJ5RnPLlrCMe1I7d8Ffk+h8GzA5uwOS3xGSpprKo2cfdQ26FLTU4Zo1CsWUuvpyzwu4pOunFeCOUcTO2TMYA68jQn7NbqBXOXLvYv2o4z8qkQUWgB2JL6XDVNO4JJZyDh4HGggXzdy4Y02aj/JdttZ13wInOt1yNbHG5mBroXOb5M1qHdbEmCrCDaI31zdeR3XvQoGDh8A+P9/8A==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=iYZMtTDg56l+/XXxXlQ0dmmRZhKgO2DmYs3VJ4Q+6/4=;\n b=RN3NRyCYeT398DWl9sw3BlsL1jew6HoQ5cYQI7MJqxDVI1Ud3pqIQCMI4WVDJ9nalowDpMOVXPwyycgiQIkVgwKLeK6ANhOtSf3G864t0mZGeCcEC0pQjwdsEt3hJNjG2ouocZ/X8aRsRHOzwCdVQUaFEpHa5W4N2qmuZsT01JQvejPlHmpQkbrFUjx1mK5MbawXtN63N8frQy25yW07rf7eYp3gwYrnTdoLNf7ra9HuF8XphvZKtq0NsRlEhN4W726y/JzlvEuvwzQBNuXnspNk2hUsHLBrMQDWUGZQ1UC+b9eDd9piZ5DNJBmlSF5MpjlMGhsGHLhakuT7QuqQyQ==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 216.228.117.160) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com;\n dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com;\n dkim=none (message not signed); arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=iYZMtTDg56l+/XXxXlQ0dmmRZhKgO2DmYs3VJ4Q+6/4=;\n b=YK3jZf2UGzdMwurOujkTdpPC/a535DC3b48+bwGIQcdJKVWiRJbrHloCxoHfZK1xx5gG4GVxj4qpcImjg6ESBxGjM/NIigmmYABShpItvNk5iwDH+JXEUchhxWBxBtiWnYjS1EsaZU2ayksAivElHzVQC6xgXFAjn6I/YMAETiViqbWscmBroIWM/2a/d1VA5t45Fy/mOTGniyQSCSZ/yL1T5kRbUuUwR4UTvZUu6i99ZGQf3I4smQMVTj2xT2k049K5QDSw06BZB6SlGtZtEQ+sd6dg+JYGXFyO1aksll6OuGZHaLQtNT4DwtFkRX/ATq3gQJymn/2owgzIMxfJBA==",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 216.228.117.160)\n smtp.mailfrom=nvidia.com;\n dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=nvidia.com;",
        "Received-SPF": "Pass (protection.outlook.com: domain of nvidia.com designates\n 216.228.117.160 as permitted sender) receiver=protection.outlook.com;\n client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C",
        "From": "Alexander Kozyrev <akozyrev@nvidia.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<thomas@monjalon.net>, <ferruh.yigit@amd.com>,\n <andrew.rybchenko@oktetlabs.ru>, <orika@nvidia.com>",
        "Subject": "[PATCH v2 4/4] app/testpmd: add template table hash calculation\n function",
        "Date": "Fri, 27 Jan 2023 01:28:02 +0200",
        "Message-ID": "<20230126232802.3960109-5-akozyrev@nvidia.com>",
        "X-Mailer": "git-send-email 2.18.2",
        "In-Reply-To": "<20230126232802.3960109-1-akozyrev@nvidia.com>",
        "References": "<20230121052158.2928238-1-akozyrev@nvidia.com>\n <20230126232802.3960109-1-akozyrev@nvidia.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.126.230.37]",
        "X-ClientProxiedBy": "rnnvmail202.nvidia.com (10.129.68.7) To\n rnnvmail201.nvidia.com (10.129.68.8)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "BN8NAM11FT049:EE_|PH7PR12MB5654:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "1a0f1026-b5f8-4184-b193-08dafff50ef0",
        "X-LD-Processed": "43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n 63MQziSqI6qX3snKHClrsxfdSUPjp0wbYGMpb5Lnn5qXYuM9HDZfSxZ78qfNlDyrDfeHM6AQtPBeyRFhhiTE+m5vC6mWjOOwyTq/gWijjyvS71a+ymtc5U7P65y93/gaWlu4aq+S3iwJuWw8IH+Bu5V5XFo11Zx5dc67X/g6rndtQNBNE2RWiJP441hkVGGnB4fQ4GvsP3cf/5lMCac6QJTkysoU9U0TVfIHLPdvWCi2AmuHCRfuBDRmoKWy3oxP+VN9zA8uBFd34TdmwktuLzNUqDX3rl5MC6m1hWNtpEhg7J4UbaZaQsZCv9TjyQ3YHfqvgnmbtsqwe8zecfqAujIOqyVqW+IG9ge77SSzOTP99G46ANbdWpaD6nE836PUFHhLTFGoyG0DnTuZ0ZXcv0IrhSP70COV0V47AYTCZq1sVk2j6nF6PfueIlVy/OBr9TbqGbo555S3R9V1CMAXWSuzjIKeasjOGgfmXu98kayX8fHbTrTs9rPTpdX1CgaKNV/y4czQOdtE4crBowdOjDaprVOoeFgGkVi1+6PwtHW2wVoKmwQhEEr8T1Wi7fdLLUy7823T/MfYTpulRGRNgZAUtg0aONNPXtEWdolYPMqRM0SSsICFDA4kne3fzn5xDCGQ/LEHiLeDBbpD5inK9MmQY4tWOz6elz6xi/r5rA9rTRw1RpKuJwLiixPpYMMfTVp6AoTiDwWCZ9Xfg4ZvGg==",
        "X-Forefront-Antispam-Report": "CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1;\n SRV:;\n IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE;\n SFS:(13230025)(4636009)(396003)(376002)(346002)(136003)(39860400002)(451199018)(40470700004)(46966006)(36840700001)(36756003)(70586007)(4326008)(54906003)(316002)(8676002)(6916009)(8936002)(41300700001)(70206006)(36860700001)(356005)(86362001)(82740400003)(7636003)(6666004)(1076003)(107886003)(16526019)(26005)(186003)(40480700001)(5660300002)(336012)(83380400001)(2906002)(426003)(82310400005)(40460700003)(47076005)(478600001)(2616005);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "26 Jan 2023 23:28:40.7040 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 1a0f1026-b5f8-4184-b193-08dafff50ef0",
        "X-MS-Exchange-CrossTenant-Id": "43083d15-7273-40c1-b7db-39efd9ccc17a",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160];\n Helo=[mail.nvidia.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n BN8NAM11FT049.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "PH7PR12MB5654",
        "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 testpmd CLI interface for a template table hash function.\nAvailable types are: default, linear, crc32 and crc16.\nflow template_table 0 create table_id 0 hash_func linear ...\n\nSigned-off-by: Alexander Kozyrev <akozyrev@nvidia.com>\n---\n app/test-pmd/cmdline_flow.c | 69 ++++++++++++++++++++++++++++++++++++-\n 1 file changed, 68 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c\nindex f1d6813baa..007d31c5cf 100644\n--- a/app/test-pmd/cmdline_flow.c\n+++ b/app/test-pmd/cmdline_flow.c\n@@ -180,6 +180,8 @@ enum index {\n \tTABLE_DESTROY_ID,\n \tTABLE_INSERTION_TYPE,\n \tTABLE_INSERTION_TYPE_NAME,\n+\tTABLE_HASH_FUNC,\n+\tTABLE_HASH_FUNC_NAME,\n \tTABLE_GROUP,\n \tTABLE_PRIORITY,\n \tTABLE_INGRESS,\n@@ -808,7 +810,8 @@ static const char *const modify_field_ids[] = {\n \t\"udp_port_src\", \"udp_port_dst\",\n \t\"vxlan_vni\", \"geneve_vni\", \"gtp_teid\",\n \t\"tag\", \"mark\", \"meta\", \"pointer\", \"value\",\n-\t\"ipv4_ecn\", \"ipv6_ecn\", \"gtp_psc_qfi\", \"meter_color\", NULL\n+\t\"ipv4_ecn\", \"ipv6_ecn\", \"gtp_psc_qfi\", \"meter_color\",\n+\t\"hash_result\", NULL\n };\n \n static const char *const meter_colors[] = {\n@@ -819,6 +822,10 @@ static const char *const table_insertion_types[] = {\n \t\"pattern\", \"index\", NULL\n };\n \n+static const char *const table_hash_funcs[] = {\n+\t\"default\", \"linear\", \"crc32\", \"crc16\", NULL\n+};\n+\n #define RAW_IPSEC_CONFS_MAX_NUM 8\n \n /** Maximum number of subsequent tokens and arguments on the stack. */\n@@ -1163,6 +1170,7 @@ static const enum index next_table_attr[] = {\n \tTABLE_CREATE_ID,\n \tTABLE_GROUP,\n \tTABLE_INSERTION_TYPE,\n+\tTABLE_HASH_FUNC,\n \tTABLE_PRIORITY,\n \tTABLE_INGRESS,\n \tTABLE_EGRESS,\n@@ -2417,6 +2425,9 @@ static int parse_meter_color(struct context *ctx, const struct token *token,\n static int parse_insertion_table_type(struct context *ctx, const struct token *token,\n \t\t\t\t      const char *str, unsigned int len, void *buf,\n \t\t\t\t      unsigned int size);\n+static int parse_hash_table_type(struct context *ctx, const struct token *token,\n+\t\t\t\t const char *str, unsigned int len, void *buf,\n+\t\t\t\t unsigned int size);\n static int comp_none(struct context *, const struct token *,\n \t\t     unsigned int, char *, unsigned int);\n static int comp_boolean(struct context *, const struct token *,\n@@ -2451,6 +2462,8 @@ static int comp_meter_color(struct context *, const struct token *,\n \t\t\t    unsigned int, char *, unsigned int);\n static int comp_insertion_table_type(struct context *, const struct token *,\n \t\t\t\t     unsigned int, char *, unsigned int);\n+static int comp_hash_table_type(struct context *, const struct token *,\n+\t\t\t\tunsigned int, char *, unsigned int);\n \n /** Token definitions. */\n static const struct token token_list[] = {\n@@ -2935,6 +2948,20 @@ static const struct token token_list[] = {\n \t\t.call = parse_insertion_table_type,\n \t\t.comp = comp_insertion_table_type,\n \t},\n+\t[TABLE_HASH_FUNC] = {\n+\t\t.name = \"hash_func\",\n+\t\t.help = \"specify hash calculation function\",\n+\t\t.next = NEXT(next_table_attr,\n+\t\t\t     NEXT_ENTRY(TABLE_HASH_FUNC_NAME)),\n+\t\t.args = ARGS(ARGS_ENTRY(struct buffer,\n+\t\t\t\t\targs.table.attr.hash_func)),\n+\t},\n+\t[TABLE_HASH_FUNC_NAME] = {\n+\t\t.name = \"hash_func_name\",\n+\t\t.help = \"hash calculation function name\",\n+\t\t.call = parse_hash_table_type,\n+\t\t.comp = comp_hash_table_type,\n+\t},\n \t[TABLE_GROUP] = {\n \t\t.name = \"group\",\n \t\t.help = \"specify a group\",\n@@ -10123,6 +10150,32 @@ parse_insertion_table_type(struct context *ctx, const struct token *token,\n \treturn ret > 0 ? (int)len : ret;\n }\n \n+/** Parse Hash Calculation Table Type name */\n+static int\n+parse_hash_table_type(struct context *ctx, const struct token *token,\n+\t\t      const char *str, unsigned int len, void *buf,\n+\t\t      unsigned int size)\n+{\n+\tconst struct arg *arg = pop_args(ctx);\n+\tunsigned int i;\n+\tchar tmp[2];\n+\tint ret;\n+\n+\t(void)size;\n+\t/* Argument is expected. */\n+\tif (!arg)\n+\t\treturn -1;\n+\tfor (i = 0; table_hash_funcs[i]; ++i)\n+\t\tif (!strcmp_partial(table_hash_funcs[i], str, len))\n+\t\t\tbreak;\n+\tif (!table_hash_funcs[i])\n+\t\treturn -1;\n+\tpush_args(ctx, arg);\n+\tsnprintf(tmp, sizeof(tmp), \"%u\", i);\n+\tret = parse_int(ctx, token, tmp, strlen(tmp), buf, sizeof(i));\n+\treturn ret > 0 ? (int)len : ret;\n+}\n+\n /** No completion. */\n static int\n comp_none(struct context *ctx, const struct token *token,\n@@ -10442,6 +10495,20 @@ comp_insertion_table_type(struct context *ctx, const struct token *token,\n \treturn -1;\n }\n \n+/** Complete available Hash Calculation Table types. */\n+static int\n+comp_hash_table_type(struct context *ctx, const struct token *token,\n+\t\t     unsigned int ent, char *buf, unsigned int size)\n+{\n+\tRTE_SET_USED(ctx);\n+\tRTE_SET_USED(token);\n+\tif (!buf)\n+\t\treturn RTE_DIM(table_hash_funcs);\n+\tif (ent < RTE_DIM(table_hash_funcs) - 1)\n+\t\treturn rte_strscpy(buf, table_hash_funcs[ent], size);\n+\treturn -1;\n+}\n+\n /** Internal context. */\n static struct context cmd_flow_context;\n \n",
    "prefixes": [
        "v2",
        "4/4"
    ]
}