From patchwork Wed Jul 7 03:56:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rongwei Liu X-Patchwork-Id: 95438 X-Patchwork-Delegate: rasland@nvidia.com Return-Path: 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]) by inbox.dpdk.org (Postfix) with ESMTP id EEB72A0C48; Wed, 7 Jul 2021 04:47:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B63FA4143B; Wed, 7 Jul 2021 04:47:27 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2041.outbound.protection.outlook.com [40.107.93.41]) by mails.dpdk.org (Postfix) with ESMTP id 5DE4D41303 for ; Wed, 7 Jul 2021 04:47:25 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WZIiKJ8E7tAC+wwckY8XNWECQg+nrnn+cii5cbxNOotxmmzpTODBzbG+itsA5WKNZAaCogVzdHkb0oN8aBCrZwXGr8yMZJ+EnL2z8xnDAbmUjTC9lVtXk/9Pbcl3Cj6R2Ta0Q8e+ECV5pwERALTucBZNuHQ+oYG2DrGtkA/EBfeaEZ1S9GEP2SzSVvVGKYuA9XLh9fDrQfvqFVovPf4qsuEJbuHgZhihkwgdfiDzzJBRHTXc+Jp6aQH8YxR+04F3nzhgucyIBAY2oVtdLpveF5igNKKAPADIuDRXwCE7DBuBmtrZVlzGt29DXogOrBLsdDHSqRC9N6Mklz/hNXANxg== 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=sO2XIRDzFWPM0J37Hk6IV8Ih//ZNEL/IvA5y8oFutSs=; b=BRugFVB8PqLJC5wtW5ainNPbGS2jRQ721Xh4TV3454Sy4sGyiepaqF03ZF3zGwK9+ApQsI8Lef5maPummCri9RKsZGxb8e3TnLTFJ1O7HlaNoe2wz9uT/sI2ShspHIi+FRbWgZPo04fkwhFei+fo38EzSD52ALELZYkJLSzXvDK+ytS0veTopS0k+Hw48QN3UCYz2+66Ye7RM64YyzFdeEIZbJYhWDwb6Ji6jZqc+I2H++Vs4Ivt/YDK/+G5mbNHQBjvHEFhRBIogPZQfwPqTjIfRCVuVg0U7zuua89ZfNJH7fu/AMZcn8vLPT2gZxupEgY1nTSrXOi0JEChwSkHEg== 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=sO2XIRDzFWPM0J37Hk6IV8Ih//ZNEL/IvA5y8oFutSs=; b=QgbMN3eFdI+2MWghuens/OpiBhK6E9qiI0vXdpJ4YIQSnLQqS3i2VXaJ/15/VipzATYCJ2sLFm+DiEeZvlAzH3loQCEVVhfrT/WLd0LBp+Bdi+D0tm4+Pra0iUlWhGDN7DIH74MgKUtD2vDMctgBaOXOXzhv6oeCiBBklsMu2+u8B/B/MTUV5cIUuzum5F6odv1qNnU65fkMu1Ukjdrn8wy8Mdzfzohro5wc0bL7KV9yPBaW78HOWWsPabCl3003SgCWIgfjxdmAYAw2PX3Mdk1O9cwz8m1MuRGxwNW63NShx+GDITbs6ykWv/1Qw6YUH7YWS+eC2MzOgz0OHwVpPg== Received: from MW4PR04CA0073.namprd04.prod.outlook.com (2603:10b6:303:6b::18) by BL1PR12MB5192.namprd12.prod.outlook.com (2603:10b6:208:311::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22; Wed, 7 Jul 2021 02:47:24 +0000 Received: from CO1NAM11FT035.eop-nam11.prod.protection.outlook.com (2603:10b6:303:6b:cafe::54) by MW4PR04CA0073.outlook.office365.com (2603:10b6:303:6b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.20 via Frontend Transport; Wed, 7 Jul 2021 02:47:23 +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 CO1NAM11FT035.mail.protection.outlook.com (10.13.175.36) 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 02:47:23 +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 02:47:21 +0000 From: rongwei liu To: , , , , Xiaoyun Li CC: , Date: Wed, 7 Jul 2021 06:56:28 +0300 Message-ID: <20210707035628.1413394-3-rongweil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210707035628.1413394-1-rongweil@nvidia.com> References: <20210707035628.1413394-1-rongweil@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7c1ded09-f425-40de-47fa-08d940f18c56 X-MS-TrafficTypeDiagnostic: BL1PR12MB5192: 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: OdKWUGv0bq7vIfSoJ6eo+8o4nI5gov5gcFQ2U/vGQe2gUFqAMIFK24mqizExEFSe9rfWabQlt5fmWxCtVL2NM75TeeVpru9Jd+5ROu25zL0SDXE+Bs0WJssfHXM6BWY+Y6Tub5xKxnM7jRwSrfTVhKdnsGUaW2ugKrb3HXlHvNBRWcQjkdWSP2C4TdcAgoXIqVTPeYRauLuiX4Ej81Z+YASPwIrKuJE+lM3vkzWJu/u8UN2PVDx0JTUMXYJqcILdTVmBSxQqroCpOPG5/RMB4XF3CxL7wraZ1X+Cb2rNRry4trdOfNO7u3of8ZZNzNUTBXaSZmbvu8DbK5zYzIiFANikX4zgedzzdO8JQ2yoAULw+34atIiokfppBLUihTsy+kd+zGpIWQR32gdFwtXrYoFWfX8dk9rPh9MrzgKvZyZxzH8G4zWwuwIgdCUfReLKaoeIp7BqB3jCracju57PHNd4Ta+nsxaCuBxeqUzr7pdjo2b2xvtYogMZAi5ZJGgY5mSEIog5ElXngrawIKnqwRtTfctCiCQP/ioy1mKV2o/1slVIJww+8ol01ysvYpHOgrloE61lEmwwrnTamm4EN8N3tf58Vrxc5LPe12uLdkyfdJ+eCt5I5LxBdn2AVhOedVPTg0xclf02rxWfHF0CqKWPFHJ6hF82Xis9QNv7I0nzpRChMdHSSMxA2raKzC6ULblREeZfiMNgm7KS0az1pA== 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)(136003)(346002)(376002)(396003)(36840700001)(46966006)(426003)(5660300002)(2906002)(478600001)(86362001)(7696005)(36860700001)(186003)(55016002)(6286002)(16526019)(107886003)(316002)(36906005)(70586007)(8936002)(26005)(336012)(110136005)(36756003)(70206006)(7636003)(356005)(83380400001)(54906003)(4326008)(2616005)(1076003)(82740400003)(82310400003)(47076005)(8676002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2021 02:47:23.4167 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7c1ded09-f425-40de-47fa-08d940f18c56 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: CO1NAM11FT035.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5192 Subject: [dpdk-dev] [PATCH v3 2/2] app/testpmd: support VXLAN 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.