From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EF010A0C48; Wed, 7 Jul 2021 09:23:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BB3E341374; Wed, 7 Jul 2021 09:23:55 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2050.outbound.protection.outlook.com [40.107.223.50]) by mails.dpdk.org (Postfix) with ESMTP id 49D63406FF for ; Wed, 7 Jul 2021 09:23:54 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oANi0yJ8N5bciNHP74CWprN9XCaNZi9MZbXePYchuZxsD1UEFuqboOTB88ZAwacey/UdDdTKo3OLv24SIWx8FzBCAZqc3uKzgCBJp1AZ/x9h45yB+Ck9rOow44UYpdLE1ukyRsliQ4ob80AHACn4ByqYGHd1QvaWgCBIROzlQHtNPqybglNusjAU5W2AoZve54JwJsZ3Ak52S5rFFWJV4bB7yrkWqS+gYqdc9M9/WdQT3XTlpehIGK0turj21nH+4FbGIbiiXd6eNJDwBBxDNdvwvtqf9c3fv6JMCQY6gpijLUXiBSfWAhThMpbEwBmuuAVfD0YSM/xNLLvMC2PIQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zN889sv2gV+1vGnYk0shjWr8trUC3Q5zHen5jZwLupY=; b=W8n9o3ZLuqj/1hfotF/gkCasFVwjjx36h9Ch5a8mcKIqZCDoqGmVRhSiF8tTKSqN/xm1m9cxA7yXmqXSDsKFOuhbtt4XzliWw5isGvtnUEuxyI04yaJ1JAceRa7J9nS55S1Q5pTDP1FdKVo0FTcPW+iaeKH7jj6HH3NaPVUUwcoKqsZNVsirEfqHJbClh/658I1WH41u+ZMTh2wza3AtDpQvfVQpZSvgit9CpTdZY7VoO8r2pT3PI+/9hZRRyOeIWKzdlDHrrTKtX4p6cXyRBfkAuowRbv67dBmxHdSw1n07WAGhLHUCPUiwXJp8S+QY2UCajSEPCJ8G7qk68CL2rg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zN889sv2gV+1vGnYk0shjWr8trUC3Q5zHen5jZwLupY=; b=Dng8MRSjeHGyAOo2lXhX+8A1Doe2E0iR29myiEs7wJFAKtU8782yaWTtjriVoBAP4aT6cCI0znEuO6AFLnRkdFEE/YOqQKFjKodb32s57yRuhFjKwi6nS/cXy38nXH/sxFuPCYBgjbtL5C6OKCx4gziYaITm3SDdRKemKzDW6AKbUI0j3g5WxO36q7ds5rSvr23ESB8p90BRK8IAD1ItekXZ19lL7rD6aDYDsVqnIO3rkiAmtO2vmC/tjCWZPms5NPj2RdzgXwcoRmwcKwRHlpZT1It2nlUKk8L4wOWmwnG4Xcrm7MW/nhMMWG54ikP4Xa3xC4mnY7q6i9dOTz3oWg== Received: from MWHPR1701CA0020.namprd17.prod.outlook.com (2603:10b6:301:14::30) by MN2PR12MB4269.namprd12.prod.outlook.com (2603:10b6:208:1d4::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.27; Wed, 7 Jul 2021 07:23:51 +0000 Received: from CO1NAM11FT019.eop-nam11.prod.protection.outlook.com (2603:10b6:301:14:cafe::2a) by MWHPR1701CA0020.outlook.office365.com (2603:10b6:301:14::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.19 via Frontend Transport; Wed, 7 Jul 2021 07:23:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by CO1NAM11FT019.mail.protection.outlook.com (10.13.175.57) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4308.20 via Frontend Transport; Wed, 7 Jul 2021 07:23:51 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 7 Jul 2021 07:23:45 +0000 From: Rongwei Liu To: , , , , Xiaoyun Li CC: , Date: Wed, 7 Jul 2021 11:09:49 +0300 Message-ID: <20210707080949.1433899-3-rongweil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210707080949.1433899-1-rongweil@nvidia.com> References: <5746076.uJIXkIHoMQ@thomas> <20210707080949.1433899-1-rongweil@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 102865c5-f03a-4b03-abdc-08d941182b84 X-MS-TrafficTypeDiagnostic: MN2PR12MB4269: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mINQEodiVUec2T+9qv5pFrIaoQ3rlpwRlUZv9AiaIMny+1u8lBrIxeQ/8VDprpMxk8+1RgjwQrTkZC2IVxb0jtRueoHZKwKG5tL2A68OIIIevpe09raDJb29NrM9Hh+VsF6bYk9+z/i/2DhOtEovUFHwsuD1OJHeI5LuqD5IkhBQ7S4pYtSKQpS+U9IR1MS6VRFZbIZJpzvJhXY0xI8xDbPo+pQNx7089du3sJD7z9hHIDbSUzoZDWWiDRIBkV9OSqHRT1LKf3tyzbGjfC8NgKALvD4qQRpfJoBoFP6JNDnTQoWTv8M2RnEFeiRBczME5sXPUY7cVQYq8uUFqwj31NVcnEKZQ/Pfgl9Gi1cJtuS4aC9Q3ocSYjTS+cax/G3T6dshuLiTM7rHvYi14GAYkT4UQn95cxULr431Yl10M6sklcKNhuskodN51Z99w31oCAJ6aT7Pf0yUOe1KUmZiU8weAaBYBzXSavee/3tGcKylrAywWXS6APZGap4YpNwn0Ql6qh2r4lVd0i/sPrhTAKWRA+ZVhxWIlKJeczOb6QcvN7VWH+VC+pDYDz7Uz5aLkGPbt+uQGGciGivfV9pHJDzEVLVGpbcbF4Igue4C0Ay57fxwryzGDtm6Q2FPagQU8+rew79byXCMZBaIMk/ADyJcqrunkIbI8TilUDw9HQASs93bldWEpXiDlT0Lz+c3LmzNEzQHgjJpWi3NqVfLoQ== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(346002)(39860400002)(136003)(396003)(376002)(36840700001)(46966006)(478600001)(8936002)(70586007)(4326008)(336012)(54906003)(356005)(6286002)(86362001)(36906005)(316002)(7636003)(82310400003)(55016002)(47076005)(1076003)(186003)(426003)(82740400003)(5660300002)(110136005)(36860700001)(16526019)(70206006)(36756003)(2616005)(7696005)(107886003)(2906002)(83380400001)(26005)(8676002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2021 07:23:51.3861 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 102865c5-f03a-4b03-abdc-08d941182b84 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT019.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4269 Subject: [dpdk-dev] [PATCH v4 2/2] app/testpmd: support VXLAN the last 8-bits field matching X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add a new testpmd pattern field 'last_rsvd' that supports the last 8-bits matching of VXLAN header. The examples for the "last_rsvd" pattern field are as below: 1. ...pattern eth / ipv4 / udp / vxlan last_rsvd is 0x80 / end ... This flow will exactly match the last 8-bits to be 0x80. 2. ...pattern eth / ipv4 / udp / vxlan last_rsvd spec 0x80 vxlan mask 0x80 / end ... This flow will only match the MSB of the last 8-bits to be 1. Signed-off-by: Rongwei Liu Acked-by: Viacheslav Ovsiienko --- app/test-pmd/cmdline_flow.c | 9 +++++++++ app/test-pmd/util.c | 5 +++-- doc/guides/rel_notes/release_21_08.rst | 6 ++++++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 1 + 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 1c587bb7b8..6e76a625ca 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -207,6 +207,7 @@ enum index { ITEM_SCTP_CKSUM, ITEM_VXLAN, ITEM_VXLAN_VNI, + ITEM_VXLAN_LAST_RSVD, ITEM_E_TAG, ITEM_E_TAG_GRP_ECID_B, ITEM_NVGRE, @@ -1129,6 +1130,7 @@ static const enum index item_sctp[] = { static const enum index item_vxlan[] = { ITEM_VXLAN_VNI, + ITEM_VXLAN_LAST_RSVD, ITEM_NEXT, ZERO, }; @@ -2806,6 +2808,13 @@ static const struct token token_list[] = { .next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param), .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)), }, + [ITEM_VXLAN_LAST_RSVD] = { + .name = "last_rsvd", + .help = "VXLAN last reserved bits", + .next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, + rsvd1)), + }, [ITEM_E_TAG] = { .name = "e_tag", .help = "match E-Tag header", diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c index a9e431a8b2..59626518d5 100644 --- a/app/test-pmd/util.c +++ b/app/test-pmd/util.c @@ -266,8 +266,9 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[], vx_vni = rte_be_to_cpu_32(vxlan_hdr->vx_vni); MKDUMPSTR(print_buf, buf_size, cur_len, " - VXLAN packet: packet type =%d, " - "Destination UDP port =%d, VNI = %d", - packet_type, udp_port, vx_vni >> 8); + "Destination UDP port =%d, VNI = %d, " + "last_rsvd = %d", packet_type, + udp_port, vx_vni >> 8, vx_vni & 0xff); } } MKDUMPSTR(print_buf, buf_size, cur_len, diff --git a/doc/guides/rel_notes/release_21_08.rst b/doc/guides/rel_notes/release_21_08.rst index 0a05cb02fa..9166c24995 100644 --- a/doc/guides/rel_notes/release_21_08.rst +++ b/doc/guides/rel_notes/release_21_08.rst @@ -68,6 +68,11 @@ New Features usecases. Configuration happens via standard rawdev enq/deq operations. See the :doc:`../rawdevs/cnxk_bphy` rawdev guide for more details on this driver. +* **Updated Mellanox mlx5 driver.** + + Updated the Mellanox mlx5 driver with new features and improvements, including: + + * Added support for matching on vxlan header last 8-bits reserved field. Removed Items ------------- @@ -152,3 +157,4 @@ Tested Platforms This section is a comment. Do not overwrite or remove it. Also, make sure to start the actual text at the margin. ======================================================= + diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index 33857acf54..4ca3103067 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -3694,6 +3694,7 @@ This section lists supported pattern items and their attributes, if any. - ``vxlan``: match VXLAN header. - ``vni {unsigned}``: VXLAN identifier. + - ``last_rsvd {unsigned}``: VXLAN last reserved 8-bits. - ``e_tag``: match IEEE 802.1BR E-Tag header. -- 2.27.0