get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 133639,
    "url": "http://patches.dpdk.org/api/patches/133639/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231031094244.381557-2-rongweil@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": "<20231031094244.381557-2-rongweil@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231031094244.381557-2-rongweil@nvidia.com",
    "date": "2023-10-31T09:42:39",
    "name": "[v2,1/6] net/mlx5: sample the srv6 last segment",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "a7f858d7e64aeb1cabc81736b8491c39604290cd",
    "submitter": {
        "id": 2223,
        "url": "http://patches.dpdk.org/api/people/2223/?format=api",
        "name": "rongwei liu",
        "email": "rongweil@nvidia.com"
    },
    "delegate": {
        "id": 3268,
        "url": "http://patches.dpdk.org/api/users/3268/?format=api",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@nvidia.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20231031094244.381557-2-rongweil@nvidia.com/mbox/",
    "series": [
        {
            "id": 30070,
            "url": "http://patches.dpdk.org/api/series/30070/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30070",
            "date": "2023-10-31T09:42:39",
            "name": "support IPv6 extension push remove",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/30070/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/133639/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/133639/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 AEA2243251;\n\tTue, 31 Oct 2023 10:43:18 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9A303402E6;\n\tTue, 31 Oct 2023 10:43:18 +0100 (CET)",
            "from NAM11-BN8-obe.outbound.protection.outlook.com\n (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41])\n by mails.dpdk.org (Postfix) with ESMTP id 48342402D4\n for <dev@dpdk.org>; Tue, 31 Oct 2023 10:43:17 +0100 (CET)",
            "from CH2PR08CA0030.namprd08.prod.outlook.com (2603:10b6:610:5a::40)\n by BL0PR12MB4897.namprd12.prod.outlook.com (2603:10b6:208:17e::19)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.29; Tue, 31 Oct\n 2023 09:43:15 +0000",
            "from DS2PEPF00003444.namprd04.prod.outlook.com\n (2603:10b6:610:5a:cafe::1f) by CH2PR08CA0030.outlook.office365.com\n (2603:10b6:610:5a::40) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.29 via Frontend\n Transport; Tue, 31 Oct 2023 09:43:15 +0000",
            "from mail.nvidia.com (216.228.117.160) by\n DS2PEPF00003444.mail.protection.outlook.com (10.167.17.71) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.6954.19 via Frontend Transport; Tue, 31 Oct 2023 09:43:14 +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.41; Tue, 31 Oct\n 2023 02:43:01 -0700",
            "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; Tue, 31 Oct\n 2023 02:42:59 -0700"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=PUh6D48JXMzdUaMZXwxeeaRaOblnkpjtUk8bS2ItH8sXNzlikrbxq1yALcc+0jUdX9n0AIi2W5HPuTZL3S8GkkIHbuL4WKz5MlgDhp0CXQ1tWX1pl/FXL/6diGXiR+11LgLiZSnw6bkUKLBRdICVMRcir0xVf9uUcTt9vTZu1dHITNWdhYM5api+cKqXWvzVjg9423RHNK7LieH4AKB5orADhypGbCZZtSTL2aM4mKy4sL9vy2JtN0QYRkMJf19ERvGs/soSPu2WCjqMyQdtjIapu9p/0r6dpCNNZoLSWW5Fhsate65AaJiC1nya6/fC1Nbf4iG9yrUoTzVIwYzoMg==",
        "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=YimV24x4sTgeMpzEouBqon6r0PC68ZuMyg/tQxo6JCg=;\n b=J/20aA2beEYowPkkshkWsjh9vCbLkMnqKaejba5WZHaGqMS7JZiEeLapUavbN8wR6xoV3siCaTwlcCuDj9NfilxifvYhhjQmZ4XXMGNPGzWYZ2+Nzj3Qe5rwT296EXHVr5M4aX93ypsYj7X69Lz8Hpk9UFuSXa6ijyVDwYsWRcij+aVfLLxGLInthNwqwMD/DLj4VOepOBrjtcSeevrM7wiyCel3Ere2TiNXjOrHn+nMTOBwWGcYFYVZSyM55yZMSWFJmnQPu0JYoWCII6wOpCvkn1fcwX7OSAqF+X5s+wOHp5BSFE8rtWyZxrgNxgRjJ4Oa716mc54AZQlzRdQT6A==",
        "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 (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=YimV24x4sTgeMpzEouBqon6r0PC68ZuMyg/tQxo6JCg=;\n b=IwOkOE3rw9joH/VkGdxjIzm8XW8rJjZUyI06BicSwRB36rOZ1+I8wUANor2Z5STIjsepSHusNg+56PztSYS3YablIBeBEx3ILYV5ASahVPg6je6CmhbvWjQf8eFpTB1A4EJjkL4QPvp6U8tNtBjytg1NgYrD9ag3Se499hh6rqzhxV4OOS6WDw1jyhQ3Vyd58ltbh5UF1ptp6Qx1rOt4u5daj/z9A+iZLlqaPjDsm2Lm74YMbbCHXe4aCbnRijuFIOPqCnZenuWVCqWKLXgMQJnYvAhJVaUBrRtn+CtCJHU6F6VROL28Je/1ppaOWSKHWWXhRDi3NZmu+m60PAEYbw==",
        "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": "Rongwei Liu <rongweil@nvidia.com>",
        "To": "<dev@dpdk.org>, <matan@nvidia.com>, <viacheslavo@nvidia.com>,\n <orika@nvidia.com>, <suanmingm@nvidia.com>, <thomas@monjalon.net>",
        "Subject": "[PATCH v2 1/6] net/mlx5: sample the srv6 last segment",
        "Date": "Tue, 31 Oct 2023 11:42:39 +0200",
        "Message-ID": "<20231031094244.381557-2-rongweil@nvidia.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20231031094244.381557-1-rongweil@nvidia.com>",
        "References": "<20230417092540.2617450-5-rongweil@nvidia.com>\n <20231031094244.381557-1-rongweil@nvidia.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.126.230.35]",
        "X-ClientProxiedBy": "rnnvmail203.nvidia.com (10.129.68.9) To\n rnnvmail201.nvidia.com (10.129.68.8)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "DS2PEPF00003444:EE_|BL0PR12MB4897:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "6fa9c3bf-9c99-4355-0059-08dbd9f5ce14",
        "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 R7euKRSYVJhkyLatwwZ5SzufpY5Poz2kEzl+5rb46trMcwWijFkLMkTTnVFKnFga1rIU4IBuZ9dTLX5870GTp4HpY/MpsBt6ly7Yu12F6ITWwTVxg4/zkgG9+huGRi5pUTPGAzAFTWTFc1MfZpMuWWLCIEiZDznu3V51PPbr1qV3uFZLibBNIpt8m+jsvOZ7dIA2/yTBfuwIomY4/QG+vZe46+TVLz/aWb8r/6Uw6YIXbSAxpMmfe+hesNT6io9R4L93TqMYkZjLCJvEc+kc9040h2HhWyIDDHYenpTlFZZofY7v6XsPrL8ErjWNEPe91Il01ee/n2eKYImS3wyyBy6rq4NgTAoX9LRXXJcRgAfoagA2vc3r1Wadd/uiY6L46Q4hn/d9oKzdPvq6FcdjmFiLKgx2dXOmU2FeTvU8LZLu5XISDSJR//pMp73v347CPamsyydZXWdTZ9KG6dpn5ikl2e13feZnWacivp3MNC/bfPCmHrXGI5acoA43kY4Pk+lIGOh003UawQXuzYS80DXDNyPvK2PVebLkrvlzRK26v1zO6W8MlPE7Y6dkpugW5QT4i9MI+92tEKAtaOkyGXZ7HeCeFNmfovCDDt+COHxlkVJBpyzSZHP22STmPNw0sUF8Q7VBMhgW11MzwWSIqNthd6sLIiwKNGhhRraNWXbQfHkx78MD+JauM12BjrurfZB4TUXg4pKLjuruJW+qOWNXiMpb1ubu7GWeBzVUOWGD3rOJdhqN3TLjYFIBMsoQ",
        "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:(13230031)(4636009)(39860400002)(346002)(396003)(376002)(136003)(230922051799003)(451199024)(1800799009)(82310400011)(64100799003)(186009)(40470700004)(46966006)(36840700001)(55016003)(40460700003)(26005)(1076003)(6286002)(16526019)(478600001)(7696005)(47076005)(6666004)(36860700001)(336012)(426003)(83380400001)(2906002)(41300700001)(70206006)(70586007)(110136005)(5660300002)(2616005)(8676002)(8936002)(316002)(82740400003)(7636003)(356005)(86362001)(40480700001)(36756003);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "31 Oct 2023 09:43:14.9126 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 6fa9c3bf-9c99-4355-0059-08dbd9f5ce14",
        "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 DS2PEPF00003444.namprd04.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "BL0PR12MB4897",
        "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": "When removing the IPv6 routing extension header from the\npackets, the destination address should be updated to the\nlast one in the segment list.\n\nEnlarge the hardware sample scope to cover the last segment.\n\nSigned-off-by: Rongwei Liu <rongweil@nvidia.com>\nAcked-by: Ori Kam <orika@nvidia.com>\nAcked-by: Suanming Mou <suanmingm@nvidia.com>\n---\n drivers/net/mlx5/mlx5.c | 41 ++++++++++++++++++++++++++++++-----------\n drivers/net/mlx5/mlx5.h |  6 ++++++\n 2 files changed, 36 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c\nindex f929d6547c..92d66e8f23 100644\n--- a/drivers/net/mlx5/mlx5.c\n+++ b/drivers/net/mlx5/mlx5.c\n@@ -1067,6 +1067,7 @@ mlx5_alloc_srh_flex_parser(struct rte_eth_dev *dev)\n \tstruct mlx5_devx_graph_node_attr node = {\n \t\t.modify_field_select = 0,\n \t};\n+\tuint32_t i;\n \tuint32_t ids[MLX5_GRAPH_NODE_SAMPLE_NUM];\n \tstruct mlx5_priv *priv = dev->data->dev_private;\n \tstruct mlx5_common_dev_config *config = &priv->sh->cdev->config;\n@@ -1100,10 +1101,18 @@ mlx5_alloc_srh_flex_parser(struct rte_eth_dev *dev)\n \tnode.next_header_field_size = 0x8;\n \tnode.in[0].arc_parse_graph_node = MLX5_GRAPH_ARC_NODE_IP;\n \tnode.in[0].compare_condition_value = IPPROTO_ROUTING;\n-\tnode.sample[0].flow_match_sample_en = 1;\n-\t/* First come first serve no matter inner or outer. */\n-\tnode.sample[0].flow_match_sample_tunnel_mode = MLX5_GRAPH_SAMPLE_TUNNEL_FIRST;\n-\tnode.sample[0].flow_match_sample_offset_mode = MLX5_GRAPH_SAMPLE_OFFSET_FIXED;\n+\t/* Final IPv6 address. */\n+\tfor (i = 0; i <= MLX5_SRV6_SAMPLE_NUM - 1 && i < MLX5_GRAPH_NODE_SAMPLE_NUM; i++) {\n+\t\tnode.sample[i].flow_match_sample_en = 1;\n+\t\tnode.sample[i].flow_match_sample_offset_mode =\n+\t\t\t\t\tMLX5_GRAPH_SAMPLE_OFFSET_FIXED;\n+\t\t/* First come first serve no matter inner or outer. */\n+\t\tnode.sample[i].flow_match_sample_tunnel_mode =\n+\t\t\t\t\tMLX5_GRAPH_SAMPLE_TUNNEL_FIRST;\n+\t\tnode.sample[i].flow_match_sample_field_base_offset =\n+\t\t\t\t\t(i + 1) * sizeof(uint32_t); /* in bytes */\n+\t}\n+\tnode.sample[0].flow_match_sample_field_base_offset = 0;\n \tnode.out[0].arc_parse_graph_node = MLX5_GRAPH_ARC_NODE_TCP;\n \tnode.out[0].compare_condition_value = IPPROTO_TCP;\n \tnode.out[1].arc_parse_graph_node = MLX5_GRAPH_ARC_NODE_UDP;\n@@ -1116,8 +1125,8 @@ mlx5_alloc_srh_flex_parser(struct rte_eth_dev *dev)\n \t\tgoto error;\n \t}\n \tpriv->sh->srh_flex_parser.flex.devx_fp->devx_obj = fp;\n-\tpriv->sh->srh_flex_parser.flex.mapnum = 1;\n-\tpriv->sh->srh_flex_parser.flex.devx_fp->num_samples = 1;\n+\tpriv->sh->srh_flex_parser.flex.mapnum = MLX5_SRV6_SAMPLE_NUM;\n+\tpriv->sh->srh_flex_parser.flex.devx_fp->num_samples = MLX5_SRV6_SAMPLE_NUM;\n \n \tret = mlx5_devx_cmd_query_parse_samples(fp, ids, priv->sh->srh_flex_parser.flex.mapnum,\n \t\t\t\t\t\t&priv->sh->srh_flex_parser.flex.devx_fp->anchor_id);\n@@ -1125,12 +1134,22 @@ mlx5_alloc_srh_flex_parser(struct rte_eth_dev *dev)\n \t\tDRV_LOG(ERR, \"Failed to query sample IDs.\");\n \t\tgoto error;\n \t}\n-\tret = mlx5_devx_cmd_match_sample_info_query(ibv_ctx, ids[0],\n-\t\t\t\t&priv->sh->srh_flex_parser.flex.devx_fp->sample_info[0]);\n-\tif (ret) {\n-\t\tDRV_LOG(ERR, \"Failed to query sample id information.\");\n-\t\tgoto error;\n+\tfor (i = 0; i <= MLX5_SRV6_SAMPLE_NUM - 1 && i < MLX5_GRAPH_NODE_SAMPLE_NUM; i++) {\n+\t\tret = mlx5_devx_cmd_match_sample_info_query(ibv_ctx, ids[i],\n+\t\t\t\t\t&priv->sh->srh_flex_parser.flex.devx_fp->sample_info[i]);\n+\t\tif (ret) {\n+\t\t\tDRV_LOG(ERR, \"Failed to query sample id %u information.\", ids[i]);\n+\t\t\tgoto error;\n+\t\t}\n+\t}\n+\tfor (i = 0; i <= MLX5_SRV6_SAMPLE_NUM - 1 && i < MLX5_GRAPH_NODE_SAMPLE_NUM; i++) {\n+\t\tpriv->sh->srh_flex_parser.flex.devx_fp->sample_ids[i] = ids[i];\n+\t\tpriv->sh->srh_flex_parser.flex.map[i].width = sizeof(uint32_t) * CHAR_BIT;\n+\t\tpriv->sh->srh_flex_parser.flex.map[i].reg_id = i;\n+\t\tpriv->sh->srh_flex_parser.flex.map[i].shift =\n+\t\t\t\t\t\t(i + 1) * sizeof(uint32_t) * CHAR_BIT;\n \t}\n+\tpriv->sh->srh_flex_parser.flex.map[0].shift = 0;\n \treturn 0;\n error:\n \tif (fp)\ndiff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h\nindex a20acb6ca8..f13a56ee9e 100644\n--- a/drivers/net/mlx5/mlx5.h\n+++ b/drivers/net/mlx5/mlx5.h\n@@ -1335,6 +1335,7 @@ struct mlx5_flex_pattern_field {\n \tuint16_t shift:5;\n \tuint16_t reg_id:5;\n };\n+\n #define MLX5_INVALID_SAMPLE_REG_ID 0x1F\n \n /* Port flex item context. */\n@@ -1346,6 +1347,11 @@ struct mlx5_flex_item {\n \tstruct mlx5_flex_pattern_field map[MLX5_FLEX_ITEM_MAPPING_NUM];\n };\n \n+/*\n+ * Sample an IPv6 address and the first dword of SRv6 header.\n+ * Then it is 16 + 4 = 20 bytes which is 5 dwords.\n+ */\n+#define MLX5_SRV6_SAMPLE_NUM 5\n /* Mlx5 internal flex parser profile structure. */\n struct mlx5_internal_flex_parser_profile {\n \tuint32_t refcnt;\n",
    "prefixes": [
        "v2",
        "1/6"
    ]
}