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 300EBA0A0C; Mon, 5 Jul 2021 11:43:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DE375411AB; Mon, 5 Jul 2021 11:43:37 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2040.outbound.protection.outlook.com [40.107.237.40]) by mails.dpdk.org (Postfix) with ESMTP id A5521411AA for ; Mon, 5 Jul 2021 11:43:36 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eqUt8mwBVP9w1NaHzIlLl5IbA7BwD3643gRqwumTqvZw8P0BvLDvK+fNJeHhtjH4iStqqOn1cmpynZ7F1EnPLPDeNvw8uv+w7/87v9a8rW2FeEUdp/7tWvzylHuLOToKTS15AMHO5K/pFT+ZnX/Sb3BbSLfVkniS4wj+PF8qYwtLc8pw6or0sBI1grd+6h3ma9vArzsZtkh+KD4IM6pfBqosjq1TfwGc1yAd+y7RXrXxHhw1MwwfIR86CKewr8GjNb8oC2FHFCjVLKmm4DxifQ/yIqCuiZ/2qjWgH99W4vL5gGpBJjyijxe1BM4nxQcRYsBZzZuQQEVNykWlsXYAyg== 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=uFtTQI/ElpFuNfMLA+0yrwr8kqI115nmvwHSvM6jg1I=; b=Xu8qR7Rd0sns27Kl1kkosFcEZS/fx5MY333BaWdWAR2Oe5TwSxIQaXmZlDFolFU1ePXGN12BaIBLqBI11IW6vipi2tPUV1KxX3nOknF2XpGEh9qfutw07sxawW96Ee7NdDx9Qd1J7h0KdSuDMYG0P4Sym0laJpT6Cr7K3Nwh+j7XCRmrg0tYQKTedNfQZRHk4l0whXJIwID4Jb82xuNgd5gGvx2MIBB2j1u6ux6vFDSJBfSFGyOyaoMw33KmfdSr+L+7zbqrpCLieKgEGQv2uoyOX2mRWGSFcRWzTfZkH/gLRRXzG2f3Y2rH1TFTQGA/uUdmDOAICcILn8G1ZWmkag== 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=uFtTQI/ElpFuNfMLA+0yrwr8kqI115nmvwHSvM6jg1I=; b=aTSCcoTxcYsoINp1P4DdO575FM8DXSHJXenPK1aqNe3KegdKUXo1uPvAQ/fyQmZp7SMQKuA3Icez8rlN8OkLKaqaQBXV0bCKJj/drgfANM4yGHJQKYDqeHRM//wNt9fnNNJyMpVDnjJTxx8iJVEoKb9Ob8w/HecKxlrmlgufuj5xt19mZ2ohZJ0o1KUNytWwMl4cs1spTqzXGlMlqCTR4B8eUaVaM9U+uuny1zAcw8BLel9dnRNpyDXUvIDW94g0xcMDB5YjEec4EdJi0h+CsQGePiM0tmA/Za0WJcYEZtdBs2p6yKd38rD4HFRrG7mhhqKQyuGpnH8RBm9CVRCHtQ== Received: from DM3PR08CA0023.namprd08.prod.outlook.com (2603:10b6:0:52::33) by MWHPR12MB1840.namprd12.prod.outlook.com (2603:10b6:300:114::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.21; Mon, 5 Jul 2021 09:43:35 +0000 Received: from DM6NAM11FT015.eop-nam11.prod.protection.outlook.com (2603:10b6:0:52:cafe::ad) by DM3PR08CA0023.outlook.office365.com (2603:10b6:0:52::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22 via Frontend Transport; Mon, 5 Jul 2021 09:43:35 +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 DM6NAM11FT015.mail.protection.outlook.com (10.13.172.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4287.22 via Frontend Transport; Mon, 5 Jul 2021 09:43:35 +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; Mon, 5 Jul 2021 09:43:32 +0000 From: rongwei liu To: , , , , Xiaoyun Li CC: , Date: Mon, 5 Jul 2021 12:50:20 +0300 Message-ID: <20210705095020.1120216-3-rongweil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210705095020.1120216-1-rongweil@nvidia.com> References: <20210705095020.1120216-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: 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: 93a72277-74ae-4313-c9dd-08d93f995bbb X-MS-TrafficTypeDiagnostic: MWHPR12MB1840: 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: FQ/phcdfiY9vsWosP+wMZ+KQKM5J3lWzvUXLKM/kJEWO7naM6lzeYI4gz7ELgP80ttFvGNw2vOHcE4Rz/Q+0cQwZb6uouqogJcy2ZXZIJ4JkNhbrqkNyIOBlqBI2vczV/bzzJEuOu53k1jafZSpLfnx8JuZ6WP3aj0viS61TNhECaeFcdgdvqiIV6CglzMy3gybX+hQD5g4EUD+hDGn1YtqTgRq4Gb+DEF2G2yq6QtErUDSC/tgWJgteJ1OL0ab4bmrKeH1BN3v//MQ5oHkmb4aF6O8N0VECzzt9BIzSo3ljuN12Qrgohpf8TZ4Iv1uTMeJLndn+og0jlu0SV5fbiUBA+SHSYCHKIYhZMbr41FUejtG98dSlVTw8yxI1sXcT4tqmjro0NR8old4Z7Y80Klc+9APCrXjLvNm6DZhSU47zI8c6bAXMz92LTgraBDSzwvp4AiqKRhONXVsIfQsnJ1LcEiEg/4FPcexyieJgrgZvxVR22kMimcv494nAObGP+6+IGqy8tlspgMSnspI7KQxd6Lz6LUxx/Yd+sXCNtG5ADh+v7NA+RzhSrgrTTRt+7+IYA88kXHeuIXuo6hV7A1uwAHiN0FUbSrYzEdruqC3EWsJlILuYU7DZlINGxdH1kRjab/4AdG1Lha9LEzHJjljZsZzpqMzO+/pLNuERJNpdOZuqRYksMOwiilCyZFbZWSUeEnjJXQjbbq86d5Lmlw== 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)(136003)(396003)(39860400002)(376002)(346002)(36840700001)(46966006)(2616005)(426003)(1076003)(55016002)(336012)(316002)(8676002)(8936002)(7696005)(186003)(356005)(16526019)(7636003)(26005)(36906005)(110136005)(478600001)(6666004)(70586007)(70206006)(54906003)(36756003)(6286002)(5660300002)(83380400001)(82740400003)(86362001)(4326008)(2906002)(47076005)(107886003)(36860700001)(82310400003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2021 09:43:35.0066 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 93a72277-74ae-4313-c9dd-08d93f995bbb 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: DM6NAM11FT015.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1840 Subject: [dpdk-dev] [PATCH v2 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 | 7 +++++++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 1 + 4 files changed, 20 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 a6ecfdf3ce..ad89af8466 100644 --- a/doc/guides/rel_notes/release_21_08.rst +++ b/doc/guides/rel_notes/release_21_08.rst @@ -55,6 +55,12 @@ New Features Also, make sure to start the actual text at the margin. ======================================================= +* **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 ------------- @@ -136,3 +142,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