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 1C4D1A0C4A; Tue, 13 Jul 2021 11:55:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EB38141218; Tue, 13 Jul 2021 11:55:41 +0200 (CEST) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2078.outbound.protection.outlook.com [40.107.96.78]) by mails.dpdk.org (Postfix) with ESMTP id 52AD04069E for ; Tue, 13 Jul 2021 11:55:40 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P+Md0Wb3gNylfplnCaGfmLIjWkL5XIFDtn02BMrN2wHwS0Ds0q2i20t3yRclcEbtj6t+lV/YmPqCzpjpHT02EF7PAFhW//eCBiD6XqUsIJunjRJF1yfhOK+tdGCsncvzxDYDDNv7T2SlI7pPkQUrywuoexqCXySyvrO+HEMZGFjiRDOziOAWi+Lqr9Q3qXStqtMtBloz7aAcfCG3W77rtiDmy92j82onIgaNyW6eVtHbsfrQ561PmaJJBhZGUvLPtr/1tq8ievZaNudNSXOOUL7JdBi+E1Km+P0IcbBwXAwhTEgDxttJBLdNd3PIT9HUyGbXy5A0Om4jxmhiJTmtMw== 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=ivo9gC+rXq1+XAC66KMrTM71GKJ9Yv55GOQBV26jVWU=; b=oFJE6vxmGnusa0FaSP6GB2FKHHaEb4MS+gMxVhBP0XDyW+X0b4X6u3w7OT25Q28A17u7gxpi70fEukvqSTGEegkqAuH6+YC6SF+HLaga3egwhpYmJQ79d1MLpdAiKRuB1+xXR5uI4a84XFbj7HIOuBC55xUDbumeIyZwtDjcy4noxD2V+1NYnLm++jQILfoil3gcW1oOpIBZQcJ/fuKzJIrKQwma/isLnp+dtRFp5kdaUn72KI0V7sLjreXKkPi9NdSizRss99jZ+McIl/T0o5W6OcvULKBc2kJoSf0NRrrnAbyo7kamjJwbWLk6sMVDbIAXesgTRUGx5WKPtTjsKg== 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=ivo9gC+rXq1+XAC66KMrTM71GKJ9Yv55GOQBV26jVWU=; b=nyVdIcB/w/EoWdDQLOGsaY3y0exM2L3J+RTH8kI0NvOaToUsSzQslvnwPTmfLUGvb1kaSMuIrni7UoflUDCDfIiuLwcHTEJwD/s3/zrp+tEjgTvtCUnTRea5qtygGM8fDBGrPCbOvZ96AdY6u5IV+fax0ZMiPAyGnwr58MMdMjWGfQ3aepj0LFdxwe+OhEfWupur2rA+O7xqA9fkQxq5jI68Eh/DrzWwQtyvNx8IL4ZgjBw46WThbsWYhyTISjwIuRxGz+4Rj43jO2KQWAMedG30vc2e/A0HmlFdfbGd7UowI2ioiQrnib8KESa4DZ1pj8ZteN48IHtun+8XLcruzA== Received: from BN9PR03CA0368.namprd03.prod.outlook.com (2603:10b6:408:f7::13) by BN8PR12MB3361.namprd12.prod.outlook.com (2603:10b6:408:67::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.22; Tue, 13 Jul 2021 09:55:38 +0000 Received: from BN8NAM11FT027.eop-nam11.prod.protection.outlook.com (2603:10b6:408:f7:cafe::42) by BN9PR03CA0368.outlook.office365.com (2603:10b6:408:f7::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.21 via Frontend Transport; Tue, 13 Jul 2021 09:55:38 +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 BN8NAM11FT027.mail.protection.outlook.com (10.13.177.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4308.20 via Frontend Transport; Tue, 13 Jul 2021 09:55:38 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 13 Jul 2021 09:55:36 +0000 From: Rongwei Liu To: , , , , Xiaoyun Li CC: , Date: Tue, 13 Jul 2021 12:55:17 +0300 Message-ID: <20210713095517.54259-3-rongweil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210713095517.54259-1-rongweil@nvidia.com> References: <19edbe9a-bdbe-3c4c-17fa-de70f312927f@oktetlabs.ru> <20210713095517.54259-1-rongweil@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] 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: 8bfd2cb7-b629-46a5-1da0-08d945e45e7c X-MS-TrafficTypeDiagnostic: BN8PR12MB3361: 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: S/PyClpl9JbZ2nbjHIVmpkkMIZg4BQJdmqk3bXqRTJhk2iNZaIjg144FYHvTn4YPPaMxTxN5kuiXW3bGyvNScr6VLnosmJIaPXUBFAiNyTQ7tzYd5E2Jg8Ne7Ouoi0r/xCqXs+4/3Gv/47b5fUYPlQISCvfXxKCANzVvBClj8doIwgPNSEBimlQIxcpBXfLIAuTL+ipi/Lqr4ZVBGTXsKV/CUyTMS1Y4kNYW+RwcqveBN6GfPcG84xq75hGTXUCitXIYtSkk6eIcv2kp50XxHpTpDNtLm3mPnXHt/BEIHjTtYj8mXrz1If0e7ySqU5BY0Y2k30HAsm9jn2Jrny2v2W/ZJHGH19KbGillm0eA204ZjWmZRlN+8P+SWWBgEdHSeWD39hx0ReCGyPKLUFWCoHnkTBfbOXLmI++LX+WuFn8kHpzWA5e2/XO3Bu9/1pawDCTpo2rGgmCQsFK+kUFv4vqOnrvjYI8ymL/hjBIhhTg+Tuwi64+KSY2u+nKsWlf+ODbyCFh1k+2T3ZOwWvE9jb9TNVDjU2abCQzhD5L1RbY1dO8u3o3jtY+zB4DeiyDUMHyhiInB4WtLQmuHUZ0ruuGEU7aIeU5R7APHXRXFvi8uESxvbKbn+ViFYEwKwatNyeHMhhTOxH65SAxQ0G2BbRPv/phUYVrShrA8iwljyCNz6KpNnubktaBn5+w6hD+72jr1nRzGRaMEP7QbaaJdX6HdrxMT/t7npxCpRgerG/8= 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)(39860400002)(376002)(346002)(136003)(396003)(46966006)(36840700001)(70206006)(5660300002)(70586007)(86362001)(6666004)(1076003)(16526019)(2906002)(186003)(36860700001)(26005)(7696005)(83380400001)(82740400003)(55016002)(34020700004)(82310400003)(2616005)(336012)(426003)(8936002)(8676002)(107886003)(6286002)(54906003)(7636003)(478600001)(36756003)(47076005)(356005)(36906005)(4326008)(110136005)(316002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2021 09:55:38.7629 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8bfd2cb7-b629-46a5-1da0-08d945e45e7c 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: BN8NAM11FT027.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR12MB3361 Subject: [dpdk-dev] [PATCH v5 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 8fc0e1469d..3d5ab806c3 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -205,6 +205,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, @@ -1127,6 +1128,7 @@ static const enum index item_sctp[] = { static const enum index item_vxlan[] = { ITEM_VXLAN_VNI, + ITEM_VXLAN_LAST_RSVD, ITEM_NEXT, ZERO, }; @@ -2839,6 +2841,13 @@ static const struct token token_list[] = { 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 6a902ef9ac..3fb17bbf77 100644 --- a/doc/guides/rel_notes/release_21_08.rst +++ b/doc/guides/rel_notes/release_21_08.rst @@ -117,6 +117,11 @@ New Features The experimental PMD power management API now supports managing multiple Ethernet Rx queues per lcore. +* **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 ------------- @@ -208,3 +213,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