get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 127681,
    "url": "https://patches.dpdk.org/api/patches/127681/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230530030620.2935042-1-dongzhou@nvidia.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": "<20230530030620.2935042-1-dongzhou@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230530030620.2935042-1-dongzhou@nvidia.com",
    "date": "2023-05-30T03:06:19",
    "name": "[v4] ethdev: add flow item for RoCE infiniband BTH",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "528cc1e791e8ed45e7881e2a5a969f969d223bde",
    "submitter": {
        "id": 2011,
        "url": "https://patches.dpdk.org/api/people/2011/?format=api",
        "name": "Dong Zhou",
        "email": "dongzhou@nvidia.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20230530030620.2935042-1-dongzhou@nvidia.com/mbox/",
    "series": [
        {
            "id": 28240,
            "url": "https://patches.dpdk.org/api/series/28240/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=28240",
            "date": "2023-05-30T03:06:19",
            "name": "[v4] ethdev: add flow item for RoCE infiniband BTH",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/28240/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/127681/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/127681/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 A0B6F42BDA;\n\tTue, 30 May 2023 05:06:56 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 29B8F40F18;\n\tTue, 30 May 2023 05:06:56 +0200 (CEST)",
            "from NAM12-DM6-obe.outbound.protection.outlook.com\n (mail-dm6nam12on2057.outbound.protection.outlook.com [40.107.243.57])\n by mails.dpdk.org (Postfix) with ESMTP id CB432406BC\n for <dev@dpdk.org>; Tue, 30 May 2023 05:06:54 +0200 (CEST)",
            "from SJ0PR13CA0067.namprd13.prod.outlook.com (2603:10b6:a03:2c4::12)\n by CYYPR12MB8750.namprd12.prod.outlook.com (2603:10b6:930:be::18)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.22; Tue, 30 May\n 2023 03:06:52 +0000",
            "from CO1NAM11FT115.eop-nam11.prod.protection.outlook.com\n (2603:10b6:a03:2c4:cafe::1d) by SJ0PR13CA0067.outlook.office365.com\n (2603:10b6:a03:2c4::12) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.20 via Frontend\n Transport; Tue, 30 May 2023 03:06:52 +0000",
            "from mail.nvidia.com (216.228.117.161) by\n CO1NAM11FT115.mail.protection.outlook.com (10.13.174.211) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.6455.22 via Frontend Transport; Tue, 30 May 2023 03:06:52 +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.5; Mon, 29 May 2023\n 20:06:34 -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.37; Mon, 29 May\n 2023 20:06:31 -0700"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=lM+vlEYsQfwHm24ZP1P0l8m4HvnTKDtwuTHVU5EYIIyIJRHdWZdauBqJDfXV8vdC/LV8NaUdeEa0n6lsjnC5fgaiLyP7NfVua7688XVcuq3ParPCFY+UH9mSXmyv7b3cEEO+SZ6ros3Fe5VViIuolyk2UB6AO8kQsatc62apfnNryz1nB/EMEJUaU2i8xufAEt7WP7Ot3TBHzEntqh2mcYVRRi0fz4RG9BHK4VyO6bQyGOAr5viLgeQif1HtZ1cdP/JeHoACz2Rwm15ikeDZnlrFeaKuURJ2/ClFeq3ylZenV8atwPS6lt2ooiVZHBqJ71IvIsRp1aQopJs8nHW0gg==",
        "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=tnxnizUkLVvlpatobU8HKJ3Z6Vsv11DWaGg7ySHC6yE=;\n b=eVfoh5pHNShu05D+PeeVPxpuZAQbMfd1C7zleaZtjsUS9hd6pog9YU6DlkHMHBlAUnSk28gF6SDV4ESF7nlMwt1bSHozocaRLiJBMH+X/pgD3zlCqbCSgpA609e8+wSmHIfbAoTJ88C5PLwDeMtXovvlepJfwZGYX2qfQY7Y2Yc018mZQ4fo6yZNctNbKO0GEI+rTRSdPzHCpiyMI5ummBDcNURvDfHdd0nj8up6h143xgV2Y7FeKjBx2ZuaZN6uwEO6UnEV3pCP+BHLi28ZoSlOhWQ5W7JJZYBHeQSPa7BPiIp/PgvYvTzcw3vyoNrNASohaYg0a82Vl+0f0aYbrg==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 216.228.117.161) smtp.rcpttodomain=monjalon.net 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=tnxnizUkLVvlpatobU8HKJ3Z6Vsv11DWaGg7ySHC6yE=;\n b=lmreNIUlhJ3ZR9dd5gKXvtbtIMWS0lkB7EFGWynago5YlfvOtEQTEoQ7MSEmeQbb4cA+L4Xs9e60+SppRjYx8tUC3dJZt1E8BYkwfu3GeKt9CteRxRKbQ3ScZBzZSeGXUMdJv6g8KS21czymdZGYisNoGBoNnUOH2NX6xvgGBiA/Cg/ibGzX2CJf4GX6QSum0c3iaNEA3WC6OlnqXywTpGi+esU6Pqcj8qlnLaA7Gb/WMhpdlWGjYSNLARWpvyNVnG6n5iymQLjtCx9exwGJhrOETlVV4fq+UFLZ7w873WdEWZrYGus0lSy1GHkMMkkTwTk9IdB0EDro/Jxn3Z8sVA==",
        "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": "Dong Zhou <dongzhou@nvidia.com>",
        "To": "<orika@nvidia.com>, <thomas@monjalon.net>, Aman Singh\n <aman.deep.singh@intel.com>, Yuying Zhang <yuying.zhang@intel.com>, \"Ferruh\n Yigit\" <ferruh.yigit@amd.com>, Andrew Rybchenko\n <andrew.rybchenko@oktetlabs.ru>, Olivier Matz <olivier.matz@6wind.com>",
        "CC": "<dev@dpdk.org>",
        "Subject": "[PATCH v4] ethdev: add flow item for RoCE infiniband BTH",
        "Date": "Tue, 30 May 2023 06:06:19 +0300",
        "Message-ID": "<20230530030620.2935042-1-dongzhou@nvidia.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20230525074041.2370704-1-dongzhou@nvidia.com>",
        "References": "<20230525074041.2370704-1-dongzhou@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": "CO1NAM11FT115:EE_|CYYPR12MB8750:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "f65f5c8a-67d3-4a24-56af-08db60baeac9",
        "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 BLZPr65JpI+HW+neGAGWLeRvXROVrXdv9nXyHW2eDLlmPMkdfI6RDkeTYq6Zd835jxM2XyGp4x4DxUh4mlg46iTeAGh9FBx950wHtgHgyC5mgmGvKjGGyRDcGJGvArLeX6JKRjOz2oSx+/tUS9juRW+JkhyePzk74+RBPl73vu+NrTWVdmyzqIsDT90jX+YvzWmDv86YZ9uG75b8of7JJoT6rxvyAigIK1k8qTCQGNAg6jKtmS5+t/0vBm1BJJzbi8OpvTIL0zC0RkGHhHU+CVTPGKbtSM9Es+E+0jEwIt4rvrFiPSYRzLSn0YgVIjissCI09idV/+3hfNMCEfJ8UgF2uEtbGTFOX3j4IcKu1o4XR7xJn8rZKED2+yiSm60N0k7j1h9c7Pw7pZ4TD7GuzS9Jt3S+tKeaEIXVZBH/KpOYyTc4ay2t6OCJoxDHWqAolMZZcOMEQFuxrhQ4d9Cor89Qtm648iOg/e+NDs+iQ7jZm5jv9IGdVZzadLsW8APps0Jy0/IgjZv6YNdaD0+b+EqzqjE/gqJ49fwpzrHWofNueT22ea+La073zMpS1LqTp3WA2JktK7I99lvA43WyhT4sNBrH5P5LX2P/8kqnAcNjO42gCT8Irm72x48LO+8yaY8tJUq7cJFNSalHN6sfN9gCaD6PRvhTYL/uA99bYYReR6qVqubpAf0+WDA+HYjkAb1eGoZnG64comG30wlvW879lkkpqShXsB5rbYTA2R5M0HO5xfmEBXBhR/6qF1bU",
        "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:(13230028)(4636009)(39860400002)(136003)(376002)(396003)(346002)(451199021)(40470700004)(46966006)(36840700001)(478600001)(110136005)(40460700003)(5660300002)(8676002)(8936002)(30864003)(2906002)(86362001)(36756003)(82310400005)(70206006)(70586007)(4326008)(356005)(82740400003)(7636003)(316002)(40480700001)(55016003)(41300700001)(16526019)(6286002)(186003)(26005)(1076003)(36860700001)(47076005)(66574015)(6666004)(83380400001)(336012)(426003)(7696005)(2616005);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "30 May 2023 03:06:52.0898 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n f65f5c8a-67d3-4a24-56af-08db60baeac9",
        "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 CO1NAM11FT115.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "CYYPR12MB8750",
        "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": "IB(InfiniBand) is one type of networking used in high-performance\ncomputing with high throughput and low latency. Like Ethernet,\nIB defines a layered protocol (Physical, Link, Network, Transport\nLayers). IB provides native support for RDMA(Remote DMA), an\nextension of the DMA that allows direct access to remote host\nmemory without CPU intervention. IB network requires NICs and\nswitches to support the IB protocol.\n\nRoCE(RDMA over Converged Ethernet) is a network protocol that\nallows RDMA to run on Ethernet. RoCE encapsulates IB packets on\nEthernet and has two versions, RoCEv1 and RoCEv2. RoCEv1 is an\nEthernet link layer protocol, IB packets are encapsulated in the\nEthernet layer and use Ethernet type 0x8915. RoCEv2 is an internet\nlayer protocol, IB packets are encapsulated in UDP payload and\nuse a destination port 4791, The format of the RoCEv2 packet is\nas follows:\n  ETH + IP + UDP(dport 4791) + IB(BTH + ExtHDR + PAYLOAD + CRC)\n\nBTH(Base Transport Header) is the IB transport layer header, RoCEv1\nand RoCEv2 both contain this header. This patch introduces a new\nRTE item to match the IB BTH in RoCE packets. One use of this match\nis that the user can monitor RoCEv2's CNP(Congestion Notification\nPacket) by matching BTH opcode 0x81.\n\nThis patch also adds the testpmd command line to match the RoCEv2\nBTH. Usage example:\n\n  testpmd> flow create 0 group 1 ingress pattern\n           eth / ipv4 / udp dst is 4791 / ib_bth opcode is 0x81\n           dst_qp is 0xd3 / end actions queue index 0 / end\n\nSigned-off-by: Dong Zhou <dongzhou@nvidia.com>\nAcked-by: Ori Kam <orika@nvidia.com>\nAcked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>\n\nv2:\n - Change \"ethernet\" name to \"Ethernet\" in the commit log.\n - Add \"RoCE\" and \"IB\" 2 words to words-case.txt.\n - Add \"rte_byteorder.h\" header file in \"rte_ib.h\" to fix compile errors.\n - Add \"Acked-by\" labels in the first ethdev patch.\n\nv3:\n - Do rebase to fix the patch apply failure.\n - Add \"Acked-by\" label in the second net/mlx5 patch.\n\nv4:\n - Split this series of patches, only keep the first ethdev patch.\n---\n app/test-pmd/cmdline_flow.c                 | 58 +++++++++++++++++\n devtools/words-case.txt                     |  2 +\n doc/guides/nics/features/default.ini        |  1 +\n doc/guides/prog_guide/rte_flow.rst          |  7 +++\n doc/guides/testpmd_app_ug/testpmd_funcs.rst |  7 +++\n lib/ethdev/rte_flow.c                       |  1 +\n lib/ethdev/rte_flow.h                       | 27 ++++++++\n lib/net/meson.build                         |  1 +\n lib/net/rte_ib.h                            | 70 +++++++++++++++++++++\n 9 files changed, 174 insertions(+)\n create mode 100644 lib/net/rte_ib.h",
    "diff": "diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c\nindex 58939ec321..3ade229ffc 100644\n--- a/app/test-pmd/cmdline_flow.c\n+++ b/app/test-pmd/cmdline_flow.c\n@@ -496,6 +496,11 @@ enum index {\n \tITEM_QUOTA_STATE_NAME,\n \tITEM_AGGR_AFFINITY,\n \tITEM_AGGR_AFFINITY_VALUE,\n+\tITEM_IB_BTH,\n+\tITEM_IB_BTH_OPCODE,\n+\tITEM_IB_BTH_PKEY,\n+\tITEM_IB_BTH_DST_QPN,\n+\tITEM_IB_BTH_PSN,\n \n \t/* Validate/create actions. */\n \tACTIONS,\n@@ -1452,6 +1457,7 @@ static const enum index next_item[] = {\n \tITEM_METER,\n \tITEM_QUOTA,\n \tITEM_AGGR_AFFINITY,\n+\tITEM_IB_BTH,\n \tEND_SET,\n \tZERO,\n };\n@@ -1953,6 +1959,15 @@ static const enum index item_aggr_affinity[] = {\n \tZERO,\n };\n \n+static const enum index item_ib_bth[] = {\n+\tITEM_IB_BTH_OPCODE,\n+\tITEM_IB_BTH_PKEY,\n+\tITEM_IB_BTH_DST_QPN,\n+\tITEM_IB_BTH_PSN,\n+\tITEM_NEXT,\n+\tZERO,\n+};\n+\n static const enum index next_action[] = {\n \tACTION_END,\n \tACTION_VOID,\n@@ -5523,6 +5538,46 @@ static const struct token token_list[] = {\n \t\t.call = parse_quota_state_name,\n \t\t.comp = comp_quota_state_name\n \t},\n+\t[ITEM_IB_BTH] = {\n+\t\t.name = \"ib_bth\",\n+\t\t.help = \"match ib bth fields\",\n+\t\t.priv = PRIV_ITEM(IB_BTH,\n+\t\t\t\t  sizeof(struct rte_flow_item_ib_bth)),\n+\t\t.next = NEXT(item_ib_bth),\n+\t\t.call = parse_vc,\n+\t},\n+\t[ITEM_IB_BTH_OPCODE] = {\n+\t\t.name = \"opcode\",\n+\t\t.help = \"match ib bth opcode\",\n+\t\t.next = NEXT(item_ib_bth, NEXT_ENTRY(COMMON_UNSIGNED),\n+\t\t\t\t item_param),\n+\t\t.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ib_bth,\n+\t\t\t\t\t\t hdr.opcode)),\n+\t},\n+\t[ITEM_IB_BTH_PKEY] = {\n+\t\t.name = \"pkey\",\n+\t\t.help = \"partition key\",\n+\t\t.next = NEXT(item_ib_bth, NEXT_ENTRY(COMMON_UNSIGNED),\n+\t\t\t\t item_param),\n+\t\t.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ib_bth,\n+\t\t\t\t\t\t hdr.pkey)),\n+\t},\n+\t[ITEM_IB_BTH_DST_QPN] = {\n+\t\t.name = \"dst_qp\",\n+\t\t.help = \"destination qp\",\n+\t\t.next = NEXT(item_ib_bth, NEXT_ENTRY(COMMON_UNSIGNED),\n+\t\t\t\t item_param),\n+\t\t.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ib_bth,\n+\t\t\t\t\t\t hdr.dst_qp)),\n+\t},\n+\t[ITEM_IB_BTH_PSN] = {\n+\t\t.name = \"psn\",\n+\t\t.help = \"packet sequence number\",\n+\t\t.next = NEXT(item_ib_bth, NEXT_ENTRY(COMMON_UNSIGNED),\n+\t\t\t\t item_param),\n+\t\t.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ib_bth,\n+\t\t\t\t\t\t hdr.psn)),\n+\t},\n \t/* Validate/create actions. */\n \t[ACTIONS] = {\n \t\t.name = \"actions\",\n@@ -11849,6 +11904,9 @@ flow_item_default_mask(const struct rte_flow_item *item)\n \tcase RTE_FLOW_ITEM_TYPE_AGGR_AFFINITY:\n \t\tmask = &rte_flow_item_aggr_affinity_mask;\n \t\tbreak;\n+\tcase RTE_FLOW_ITEM_TYPE_IB_BTH:\n+\t\tmask = &rte_flow_item_ib_bth_mask;\n+\t\tbreak;\n \tdefault:\n \t\tbreak;\n \t}\ndiff --git a/devtools/words-case.txt b/devtools/words-case.txt\nindex 42c7861b68..5bd34e8b88 100644\n--- a/devtools/words-case.txt\n+++ b/devtools/words-case.txt\n@@ -27,6 +27,7 @@ GENEVE\n GTPU\n GUID\n HW\n+IB\n ICMP\n ID\n IO\n@@ -74,6 +75,7 @@ QinQ\n RDMA\n RETA\n ROC\n+RoCE\n RQ\n RSS\n RVU\ndiff --git a/doc/guides/nics/features/default.ini b/doc/guides/nics/features/default.ini\nindex 1a5087abad..1738715e26 100644\n--- a/doc/guides/nics/features/default.ini\n+++ b/doc/guides/nics/features/default.ini\n@@ -104,6 +104,7 @@ gtpc                 =\n gtpu                 =\n gtp_psc              =\n higig2               =\n+ib_bth               =\n icmp                 =\n icmp6                =\n icmp6_echo_request   =\ndiff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst\nindex 32fc45516a..e2957df71c 100644\n--- a/doc/guides/prog_guide/rte_flow.rst\n+++ b/doc/guides/prog_guide/rte_flow.rst\n@@ -1551,6 +1551,13 @@ Matches flow quota state set by quota action.\n \n - ``state``: Flow quota state\n \n+Item: ``IB_BTH``\n+^^^^^^^^^^^^^^^^\n+\n+Matches an InfiniBand base transport header in RoCE packet.\n+\n+- ``hdr``: InfiniBand base transport header definition (``rte_ib.h``).\n+\n Actions\n ~~~~~~~\n \ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex 8f23847859..4bad244029 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -3781,6 +3781,13 @@ This section lists supported pattern items and their attributes, if any.\n \n - ``send_to_kernel``: send packets to kernel.\n \n+- ``ib_bth``: match InfiniBand BTH(base transport header).\n+\n+  - ``opcode {unsigned}``: Opcode.\n+  - ``pkey {unsigned}``: Partition key.\n+  - ``dst_qp {unsigned}``: Destination Queue Pair.\n+  - ``psn {unsigned}``: Packet Sequence Number.\n+\n \n Actions list\n ^^^^^^^^^^^^\ndiff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c\nindex 69e6e749f7..6e099deca3 100644\n--- a/lib/ethdev/rte_flow.c\n+++ b/lib/ethdev/rte_flow.c\n@@ -164,6 +164,7 @@ static const struct rte_flow_desc_data rte_flow_desc_item[] = {\n \tMK_FLOW_ITEM(IPV6_ROUTING_EXT, sizeof(struct rte_flow_item_ipv6_routing_ext)),\n \tMK_FLOW_ITEM(QUOTA, sizeof(struct rte_flow_item_quota)),\n \tMK_FLOW_ITEM(AGGR_AFFINITY, sizeof(struct rte_flow_item_aggr_affinity)),\n+\tMK_FLOW_ITEM(IB_BTH, sizeof(struct rte_flow_item_ib_bth)),\n };\n \n /** Generate flow_action[] entry. */\ndiff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h\nindex 713ba8b65c..2b7f144c27 100644\n--- a/lib/ethdev/rte_flow.h\n+++ b/lib/ethdev/rte_flow.h\n@@ -38,6 +38,7 @@\n #include <rte_ppp.h>\n #include <rte_gre.h>\n #include <rte_macsec.h>\n+#include <rte_ib.h>\n \n #ifdef __cplusplus\n extern \"C\" {\n@@ -672,6 +673,13 @@ enum rte_flow_item_type {\n \t * @see struct rte_flow_item_aggr_affinity.\n \t */\n \tRTE_FLOW_ITEM_TYPE_AGGR_AFFINITY,\n+\n+\t/**\n+\t * Matches an InfiniBand base transport header in RoCE packet.\n+\t *\n+\t * See struct rte_flow_item_ib_bth.\n+\t */\n+\tRTE_FLOW_ITEM_TYPE_IB_BTH,\n };\n \n /**\n@@ -2260,6 +2268,25 @@ rte_flow_item_aggr_affinity_mask = {\n };\n #endif\n \n+/**\n+ * RTE_FLOW_ITEM_TYPE_IB_BTH.\n+ *\n+ * Matches an InfiniBand base transport header in RoCE packet.\n+ */\n+struct rte_flow_item_ib_bth {\n+\tstruct rte_ib_bth hdr; /**< InfiniBand base transport header definition. */\n+};\n+\n+/** Default mask for RTE_FLOW_ITEM_TYPE_IB_BTH. */\n+#ifndef __cplusplus\n+static const struct rte_flow_item_ib_bth rte_flow_item_ib_bth_mask = {\n+\t.hdr = {\n+\t\t.opcode = 0xff,\n+\t\t.dst_qp = \"\\xff\\xff\\xff\",\n+\t},\n+};\n+#endif\n+\n /**\n  * Action types.\n  *\ndiff --git a/lib/net/meson.build b/lib/net/meson.build\nindex 379d161ee0..b7a0684101 100644\n--- a/lib/net/meson.build\n+++ b/lib/net/meson.build\n@@ -22,6 +22,7 @@ headers = files(\n         'rte_geneve.h',\n         'rte_l2tpv2.h',\n         'rte_ppp.h',\n+        'rte_ib.h',\n )\n \n sources = files(\ndiff --git a/lib/net/rte_ib.h b/lib/net/rte_ib.h\nnew file mode 100644\nindex 0000000000..9eab5f9e15\n--- /dev/null\n+++ b/lib/net/rte_ib.h\n@@ -0,0 +1,70 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright (c) 2023 NVIDIA Corporation & Affiliates\n+ */\n+\n+#ifndef RTE_IB_H\n+#define RTE_IB_H\n+\n+/**\n+ * @file\n+ *\n+ * InfiniBand headers definitions\n+ *\n+ * The infiniBand headers are used by RoCE (RDMA over Converged Ethernet).\n+ */\n+\n+#include <stdint.h>\n+\n+#include <rte_byteorder.h>\n+\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+/**\n+ * InfiniBand Base Transport Header according to\n+ * IB Specification Vol 1-Release-1.4.\n+ */\n+__extension__\n+struct rte_ib_bth {\n+\tuint8_t\topcode;\t\t/**< Opcode. */\n+#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN\n+\tuint8_t\ttver:4;\t\t/**< Transport Header Version. */\n+\tuint8_t\tpadcnt:2;\t/**< Pad Count. */\n+\tuint8_t\tm:1;\t\t/**< MigReq. */\n+\tuint8_t\tse:1;\t\t/**< Solicited Event. */\n+#elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN\n+\tuint8_t\tse:1;\t\t/**< Solicited Event. */\n+\tuint8_t\tm:1;\t\t/**< MigReq. */\n+\tuint8_t\tpadcnt:2;\t/**< Pad Count. */\n+\tuint8_t\ttver:4;\t\t/**< Transport Header Version. */\n+#endif\n+\trte_be16_t pkey;\t/**< Partition key. */\n+#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN\n+\tuint8_t\trsvd0:6;\t/**< Reserved. */\n+\tuint8_t\tb:1;\t\t/**< BECN. */\n+\tuint8_t\tf:1;\t\t/**< FECN. */\n+#elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN\n+\tuint8_t\tf:1;\t\t/**< FECN. */\n+\tuint8_t\tb:1;\t\t/**< BECN. */\n+\tuint8_t\trsvd0:6;\t/**< Reserved. */\n+#endif\n+\tuint8_t\tdst_qp[3];\t/**< Destination QP */\n+#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN\n+\tuint8_t\trsvd1:7;\t/**< Reserved. */\n+\tuint8_t\ta:1;\t\t/**< Acknowledge Request. */\n+#elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN\n+\tuint8_t\ta:1;\t\t/**< Acknowledge Request. */\n+\tuint8_t\trsvd1:7;\t/**< Reserved. */\n+#endif\n+\tuint8_t\tpsn[3];\t\t/**< Packet Sequence Number */\n+} __rte_packed;\n+\n+/** RoCEv2 default port. */\n+#define RTE_ROCEV2_DEFAULT_PORT 4791\n+\n+#ifdef __cplusplus\n+}\n+#endif\n+\n+#endif /* RTE_IB_H */\n",
    "prefixes": [
        "v4"
    ]
}