get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 135852,
    "url": "http://patchwork.dpdk.org/api/patches/135852/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20240112080210.1288356-4-gavinl@nvidia.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20240112080210.1288356-4-gavinl@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240112080210.1288356-4-gavinl@nvidia.com",
    "date": "2024-01-12T08:02:08",
    "name": "[V1,3/5] net/mlx5: support VXLAN-GPE reserved fields matching",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "d9d3c95a7633d538d0d4f61eb32946879dd2df98",
    "submitter": {
        "id": 3217,
        "url": "http://patchwork.dpdk.org/api/people/3217/?format=api",
        "name": "Gavin Li",
        "email": "gavinl@nvidia.com"
    },
    "delegate": {
        "id": 3268,
        "url": "http://patchwork.dpdk.org/api/users/3268/?format=api",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@nvidia.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20240112080210.1288356-4-gavinl@nvidia.com/mbox/",
    "series": [
        {
            "id": 30788,
            "url": "http://patchwork.dpdk.org/api/series/30788/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=30788",
            "date": "2024-01-12T08:02:06",
            "name": "support VXLAN-GPE header fields(flags, rsvd0 and rsvd1) matching",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/30788/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/135852/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/135852/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 E8C684389F;\n\tFri, 12 Jan 2024 09:03:36 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id A9B4040A77;\n\tFri, 12 Jan 2024 09:03:15 +0100 (CET)",
            "from NAM12-BN8-obe.outbound.protection.outlook.com\n (mail-bn8nam12on2042.outbound.protection.outlook.com [40.107.237.42])\n by mails.dpdk.org (Postfix) with ESMTP id 4A28A40A6D\n for <dev@dpdk.org>; Fri, 12 Jan 2024 09:03:13 +0100 (CET)",
            "from SA1P222CA0135.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:3c2::13)\n by PH7PR12MB6907.namprd12.prod.outlook.com (2603:10b6:510:1b9::18)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.18; Fri, 12 Jan\n 2024 08:03:11 +0000",
            "from SN1PEPF000252A3.namprd05.prod.outlook.com\n (2603:10b6:806:3c2:cafe::36) by SA1P222CA0135.outlook.office365.com\n (2603:10b6:806:3c2::13) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.21 via Frontend\n Transport; Fri, 12 Jan 2024 08:03:11 +0000",
            "from mail.nvidia.com (216.228.117.161) by\n SN1PEPF000252A3.mail.protection.outlook.com (10.167.242.10) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.7181.14 via Frontend Transport; Fri, 12 Jan 2024 08:03:10 +0000",
            "from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com\n (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Fri, 12 Jan\n 2024 00:02:50 -0800",
            "from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com\n (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Fri, 12 Jan\n 2024 00:02:47 -0800"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=U4nUlGU3kWd67O+mMqDNvoYMI5lR5XzTW/4EvyB9f1ZsoWWuYPuAtjsMPN3wadCoBXVG8y2e+5bryfOCWhEL7VG95wH3xqtw5+zSp46wlQoIDoTZmK8JuIPfNW9FIG2oj5aVNtrLHzgXWeTarndSayXOmpxBuQn4ctBEzwsHaOHPUT97G/lgXJttA21PaK301hqmRtRb89idDth4u97KZ3e2zwsiYhz/vIndGZmUkUwz3J2/JB5VbMVOdVYDd2WeC8w8njPRfBz6Rnph+u+ox5HHeg9c1IlWxgwVoHP5Ni85InxJMSzMy4v+wr4FHDO6zBOl1xbrajaiNYrZ7Y0JMA==",
        "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=ke7q19HUSGiml1LDDyQ910KJ7KVsdhiEiCO1uJMhHmQ=;\n b=R2M1eO9gd5mpXdsEeGCMl5+fPysYwug2F3ATWReGoqf9XD6K65DmIaEgFM8DojJhDtBfqCgbVpgsR7o/RbpmiGc1w3jhTVHT5kSABlQn+Me5kIEL3sHIh9LCa0wh72pCdGFhlczS7hf9oJfyiJvjHX6OWXGN1oNkY/bRwHHqRHOjjEuiQv+oi3S1lcO8/CszDSz+eddhqtSR72Bly5rfEDJc4HEJBp0TTiHL0Gs7mAo1M6geCGX88QMWDOepJAV6D8/TYSA6B/nroDJP9QzeiCKlo0l0oADoGBjjWK4a2Shdj2HqisHXkFVLyIZ9q3n2SA80+hBIvde9M3xIKgQQTQ==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 216.228.117.161) 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 (0)",
        "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=ke7q19HUSGiml1LDDyQ910KJ7KVsdhiEiCO1uJMhHmQ=;\n b=Q3WnoICoBLdIDov8C4PHytDKkBqu8eIuh2ehUWWXBFuaI6ba2w51swLLGt3INvSQZbVdcULtKjeJXp/LWEqIvBS/zXgsSE6y4ZbUfXvdbsN5Z8EWgbw2UZpjTPpADmeHhvkGjl8xYlU9rPnDX+I1tzfq+aCfE8pfDP2lJ7zdwAvqPZMtScm7t7LvjgSKOLDd7j6f9jh69aSo45T9Ha+X1VnSpxOZH+mAChU5TOSbLyr+kv4vbmxv0s+Yi4B3W2JPvpEzzD3V65DrBHpodR/74y5v5KC6YTxjRirOxUGWUVI13JtQT9w66s1W/HgwMhJRUOcYMyM7sPuPWFmHFIZIGQ==",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 216.228.117.161)\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.161 as permitted sender) receiver=protection.outlook.com;\n client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C",
        "From": "Gavin Li <gavinl@nvidia.com>",
        "To": "<dev@dpdk.org>, <thomas@monjalon.net>, <orika@nvidia.com>,\n <aman.deep.singh@intel.com>, <yuying.zhang@intel.com>,\n <dsosnowski@nvidia.com>, <viacheslavo@nvidia.com>, <suanmingm@nvidia.com>,\n <matan@nvidia.com>",
        "CC": "<jiaweiw@nvidia.com>, <rasland@nvidia.com>",
        "Subject": "[V1 3/5] net/mlx5: support VXLAN-GPE reserved fields matching",
        "Date": "Fri, 12 Jan 2024 10:02:08 +0200",
        "Message-ID": "<20240112080210.1288356-4-gavinl@nvidia.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20240112080210.1288356-1-gavinl@nvidia.com>",
        "References": "<20240112080210.1288356-1-gavinl@nvidia.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.126.230.35]",
        "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": "SN1PEPF000252A3:EE_|PH7PR12MB6907:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "ebdfea4a-045b-43d6-7887-08dc1344eb8b",
        "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 hPB17uk5pdSPF9QdDUbdLN1g9hbhFpM8cm5kU7BXqCyuE7/her9To8lfVGsWD4kXY+LfyqrWKMvnyei4chYiUyYa+KFM8ud0P1p9azbgxodNCDolc96Lds7Sle7f2fIfKukvS+2nVRthC+ezBOfoSKaHot2pPYwxK40gnrF6vARHpDZc2zT/vyuCCtrffDZGkyjoYGb+ictf5RP2D6oIVv9VNvUHPL0BWOI8qHtm+Xn34NQHSNfl4OAm7YA8NC33as0ZMizYROnrhNP4IAXNIrAhwGU+CX7KLkTLb6M3U99MxLtwKs8M7nhUHTzCfThOhV4jXeUChGx9/kUFeehBcPyTwR0JZ6PX/traZXStf/Pd6sing7ZFiFUxb3GYOxF4YNPClSB7soygzrput067oQAss7rP+EuvIXAccivPhHsTFXV11a8GIK2sTeYdmB21pE1wZU7yUpxx4+/8SC4lwHlbMEPDpX5a9eyg8fBQUpRkYj6+Wh9Y5/o/qqcdQzFlVKeTf3IbTq8hNiRbebws7JGtUmAGUdZ3/CtH1WvDnlVdycN6nqOvw9/PfJDYh2payDG+bYOt16VoKAdP5mFJFXnGzzVWsDGtGFJabm3sROmEF8x3jMFstYYpOuURLpaI7NzWvVi+QNXYRDAoglZM6gnTg62vNYz4+U+B/HC59+dvpImo0uxAFeWI7O+6bsvmeEY5IcINsmOEgXrJ6wJ+B5Ew6IiuPwEDOZxKB19sNX+6pFnPLLh+OehrEZOoe+Xs",
        "X-Forefront-Antispam-Report": "CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1;\n SRV:;\n IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE;\n SFS:(13230031)(4636009)(39860400002)(396003)(376002)(346002)(136003)(230922051799003)(1800799012)(82310400011)(186009)(64100799003)(451199024)(36840700001)(46966006)(40470700004)(70206006)(70586007)(40460700003)(7696005)(40480700001)(26005)(2616005)(110136005)(6286002)(316002)(6636002)(54906003)(8676002)(107886003)(1076003)(8936002)(4326008)(16526019)(83380400001)(55016003)(336012)(426003)(6666004)(2906002)(5660300002)(478600001)(47076005)(36860700001)(82740400003)(41300700001)(356005)(86362001)(7636003)(36756003);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "12 Jan 2024 08:03:10.9007 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n ebdfea4a-045b-43d6-7887-08dc1344eb8b",
        "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.161];\n Helo=[mail.nvidia.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n SN1PEPF000252A3.namprd05.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "PH7PR12MB6907",
        "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": "This adds matching on the reserved fields of VXLAN-GPE header (the 16-bits\nbefore Next Protocol and the last 8-bits).\n\nTo support all the header fields, tunnel_header_0_1 should be supported by\nFW and misc5_cap is set.\n\nIf one of the reserved fields is matched on, misc5 is used for matching.\nOtherwise, keep using misc3\n\nSigned-off-by: Gavin Li <gavinl@nvidia.com>\nAcked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>\n---\n doc/guides/nics/mlx5.rst        |  5 +++++\n drivers/net/mlx5/mlx5_flow.c    |  5 +++++\n drivers/net/mlx5/mlx5_flow_dv.c | 32 ++++++++++++++++++++++++++------\n 3 files changed, 36 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst\nindex 7bfd6c6aeb..27384d5a86 100644\n--- a/doc/guides/nics/mlx5.rst\n+++ b/doc/guides/nics/mlx5.rst\n@@ -311,6 +311,11 @@ Limitations\n   Group zero's behavior may differ which depends on FW.\n   Matching value equals 0 (value & mask) is not supported.\n \n+- Matching on VXLAN-GPE header fields:\n+\n+     - ``rsvd0``/``rsvd1`` matching support depends on FW version when using DV flow\n+       engine (``dv_flow_en`` = 1).\n+\n - L3 VXLAN and VXLAN-GPE tunnels cannot be supported together with MPLSoGRE and MPLSoUDP.\n \n - MPLSoGRE is not supported in HW steering (``dv_flow_en`` = 2).\ndiff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c\nindex ffa183dc1b..9b6f483d3f 100644\n--- a/drivers/net/mlx5/mlx5_flow.c\n+++ b/drivers/net/mlx5/mlx5_flow.c\n@@ -3316,6 +3316,11 @@ mlx5_flow_validate_item_vxlan_gpe(const struct rte_flow_item *item,\n \t\t\t\t\t  \"no outer UDP layer found\");\n \tif (!mask)\n \t\tmask = &rte_flow_item_vxlan_gpe_mask;\n+\tif (priv->sh->misc5_cap && priv->sh->tunnel_header_0_1) {\n+\t\tnic_mask.rsvd0[0] = 0xff;\n+\t\tnic_mask.rsvd0[1] = 0xff;\n+\t\tnic_mask.rsvd1 = 0xff;\n+\t}\n \tret = mlx5_flow_item_acceptable\n \t\t(item, (const uint8_t *)mask,\n \t\t (const uint8_t *)&nic_mask,\ndiff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c\nindex 97f55003c3..f3589da654 100644\n--- a/drivers/net/mlx5/mlx5_flow_dv.c\n+++ b/drivers/net/mlx5/mlx5_flow_dv.c\n@@ -9813,14 +9813,10 @@ flow_dv_translate_item_vxlan_gpe(void *key, const struct rte_flow_item *item,\n \t\tvxlan_v = vxlan_m;\n \telse if (key_type == MLX5_SET_MATCHER_HS_V)\n \t\tvxlan_m = vxlan_v;\n-\tfor (i = 0; i < size; ++i)\n-\t\tvni_v[i] = vxlan_m->hdr.vni[i] & vxlan_v->hdr.vni[i];\n \tif (vxlan_m->hdr.flags) {\n \t\tflags_m = vxlan_m->hdr.flags;\n \t\tflags_v = vxlan_v->hdr.flags;\n \t}\n-\tMLX5_SET(fte_match_set_misc3, misc_v, outer_vxlan_gpe_flags,\n-\t\t flags_m & flags_v);\n \tm_protocol = vxlan_m->hdr.protocol;\n \tv_protocol = vxlan_v->hdr.protocol;\n \tif (!m_protocol) {\n@@ -9839,8 +9835,32 @@ flow_dv_translate_item_vxlan_gpe(void *key, const struct rte_flow_item *item,\n \t\tif (key_type & MLX5_SET_MATCHER_M)\n \t\t\tv_protocol = m_protocol;\n \t}\n-\tMLX5_SET(fte_match_set_misc3, misc_v,\n-\t\t outer_vxlan_gpe_next_protocol, m_protocol & v_protocol);\n+\t/*\n+\t * If only match flags/protocol/vni field, keep using misc3 for matching.\n+\t * If need to match rsvd0 or rsvd1, using misc5 and do not need using misc3.\n+\t */\n+\tif (!(vxlan_m->hdr.rsvd0[0] || vxlan_m->hdr.rsvd0[1] || vxlan_m->hdr.rsvd1)) {\n+\t\tfor (i = 0; i < size; ++i)\n+\t\t\tvni_v[i] = vxlan_m->hdr.vni[i] & vxlan_v->hdr.vni[i];\n+\t\tMLX5_SET(fte_match_set_misc3, misc_v, outer_vxlan_gpe_flags,\n+\t\t\t flags_m & flags_v);\n+\t\tMLX5_SET(fte_match_set_misc3, misc_v,\n+\t\t\t outer_vxlan_gpe_next_protocol, m_protocol & v_protocol);\n+\t} else {\n+\t\tuint32_t tunnel_v;\n+\t\tvoid *misc5_v = MLX5_ADDR_OF(fte_match_param, key, misc_parameters_5);\n+\n+\t\ttunnel_v = (flags_m & flags_v) << 24 |\n+\t\t\t   (vxlan_v->hdr.rsvd0[0] & vxlan_m->hdr.rsvd0[0]) << 16 |\n+\t\t\t   (vxlan_v->hdr.rsvd0[1] & vxlan_m->hdr.rsvd0[1]) << 8 |\n+\t\t\t   (m_protocol & v_protocol);\n+\t\tMLX5_SET(fte_match_set_misc5, misc5_v, tunnel_header_0, tunnel_v);\n+\t\ttunnel_v = (vxlan_v->hdr.vni[0] & vxlan_m->hdr.vni[0]) << 24 |\n+\t\t\t   (vxlan_v->hdr.vni[1] & vxlan_m->hdr.vni[1]) << 16 |\n+\t\t\t   (vxlan_v->hdr.vni[2] & vxlan_m->hdr.vni[2]) << 8 |\n+\t\t\t   (vxlan_v->hdr.rsvd1 & vxlan_m->hdr.rsvd1);\n+\t\tMLX5_SET(fte_match_set_misc5, misc5_v, tunnel_header_1, tunnel_v);\n+\t}\n }\n \n /**\n",
    "prefixes": [
        "V1",
        "3/5"
    ]
}