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 8331843913; Tue, 13 Feb 2024 10:51:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 07AD8410FC; Tue, 13 Feb 2024 10:51:10 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2043.outbound.protection.outlook.com [40.107.237.43]) by mails.dpdk.org (Postfix) with ESMTP id 26889410F6 for ; Tue, 13 Feb 2024 10:51:09 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FpjVyZ/5ohVlLCHMz4k2f5iRiMD1vo6KfTB73V5wN598e5etgYZEIMkJ7OsU0kcwD6jBuiFBrzyIGyvconoqgyagVDcLZUmId74AKNeXnVOHks1guuZo9ln8dnXL+Bij5f4Li7Jw22bquUoGvs0xrahupjVRqUhWP9p8Z9cT+f3IVVSsvyrsyJYVjKhrmen4+BqcMpYkXIpXI8EDSsdwZVBge4Ht6NDfvqJwKzCtCDVs5/Wqn/TgU3L+WuzPkZp+jd2uQTKnnS8tFnln9N16JmDFE250azmnx4KDg8XBm+IOc7M+606zEMMhpkQLm4a7Ttu/l26gZ5rh4QSUHOfJuQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3XfOfbrJ2y7mMdIAGlhsFHDkTTECLLpb5Q1wE4mz/jM=; b=EPd0qw05isPHwotNjOPTz5mKKPwwoc3DkY1Preqz11I5zVQsZ3JShzRKBabkyWjMsSyTvDkzv8zpy591Nv/4swGqcfhdXeVpinVvj5PDuP/kNuAFSei/WhTRO94QVPBt/qGFliQPR1vLQM5B4tXSLAZoXoxvDln/91rBUrYoNq6FgjI9nb3GWCBTbLGQWTn426v6biPX79patwnbApoQ6O1qSyRiNjvic3ANLifgyUa9OMKZEzZ3zjZgSuIxt8V6foA6rWd2Y3by3QU+HeQNAgVFwhZ69BSxe9C29RzGSYCuNRHmgmFGdk95CbvlQC2TYhVawbpMEJ5EZj1hns2pTQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=monjalon.net smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) 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=3XfOfbrJ2y7mMdIAGlhsFHDkTTECLLpb5Q1wE4mz/jM=; b=p/l84KBaAutUQDXRbQm3mPd6PoYks3nUo/i+tTlqlvk8SToORKTFrU6IDAiKlX75WA36vj7Y+nPq6MOYR348D8YcSXh1IIlhPj/qT+mMPT0qGVtjv76v49/pcAvUL8GySzGYCm9CbRiSzcRtVvvoSQulQlA07AHVVgtmZPqyX8uUaMt9G+zCaMB4NqRFthiO4F54F7fmo9WrsQxE1b6h4072fGMohQxuHf/IEK6ORV88iUvs4QXoU3pCGf9oq5IZ0zxk7xKco0uiX5e4gIdDff6OnwUvUgmJaXlSx+Xg4/wXCa1wxM0j6gclYK10dSnUA5OWllZS1HLd7dVL0PRTdQ== Received: from BN6PR17CA0051.namprd17.prod.outlook.com (2603:10b6:405:75::40) by CH3PR12MB8904.namprd12.prod.outlook.com (2603:10b6:610:167::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.21; Tue, 13 Feb 2024 09:51:07 +0000 Received: from BN2PEPF000044A3.namprd02.prod.outlook.com (2603:10b6:405:75:cafe::8f) by BN6PR17CA0051.outlook.office365.com (2603:10b6:405:75::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.39 via Frontend Transport; Tue, 13 Feb 2024 09:51:07 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by BN2PEPF000044A3.mail.protection.outlook.com (10.167.243.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.25 via Frontend Transport; Tue, 13 Feb 2024 09:51:06 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 13 Feb 2024 01:50:53 -0800 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Tue, 13 Feb 2024 01:50:53 -0800 Received: from nvidia.com (10.127.8.12) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41 via Frontend Transport; Tue, 13 Feb 2024 01:50:50 -0800 From: Itamar Gozlan To: , , , , , , , Dariusz Sosnowski , Ori Kam , Matan Azrad , Alex Vesker CC: Subject: [PATCH 2/9] net/mlx5/hws: add check for not supported fields in VXLAN Date: Tue, 13 Feb 2024 11:50:30 +0200 Message-ID: <20240213095038.451299-2-igozlan@nvidia.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240213095038.451299-1-igozlan@nvidia.com> References: <20240213095038.451299-1-igozlan@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000044A3:EE_|CH3PR12MB8904:EE_ X-MS-Office365-Filtering-Correlation-Id: 9b213166-43cd-4c47-455b-08dc2c794cbb 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: TQkGVKq71qYMjt7bANB2R6Tc90YMzuXasTvssAGV3uQSik7RhJpbpdyFkIP+GAWuAVS848XjANAEStPqt0Cb0PGDFWbPv3cP+l8//MRkLKskgrzqGgkPgv33Yv94ER2tN1Zlw7tLnkmnoqRjtErqFmP2tQSuyTBTcwtsfmSDE3UVEACPm4zu0k5zrrI9f1b8/9YRMDH5Q3/OTVK9omY4kgvuzGFou3B3wqEm1kctUYl+XlzyhKO6lRaZDPu44gMogs0Uv/qJfBcTBmaR3m95WIczO/VCLKoHyfFj9tg/EXIBeo0Koac2rlGn+YmWRovgn1Es0dyPFniM7eD1YmXcg7MmE7vmPpWUFkg5AqtMDUvWuwMeL0yWTQIlu1NgV5PiYa2dYc4Ih9G99u1b2PDaRRRkjpz/Kl2ZeUPQdoe4uNgeeNubwzGOzNrK8lOy5g4bDtWiRWZ8GYCGW7vBsl2ORQbaI3/9RI3tGihOYCJBp+vYLRjA8qIIeNTX7N+JjQmQGMOe9B88r3T6hdXeZk2Y9WYbvIzWZdINMsgY94qEcsSe1fKU1r5GdJek2NgBHlLBiMKmP1llkoChJZPzpSaOXWx4O2gUEfQfLXsyKhVczb/slDZuBpBUHKTJSfSrrZAc0V4Qy+4+8I214NY1t5ODBQ== X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(346002)(136003)(396003)(39860400002)(376002)(230922051799003)(82310400011)(1800799012)(451199024)(186009)(64100799003)(40470700004)(46966006)(36840700001)(86362001)(110136005)(316002)(70206006)(6636002)(2616005)(6666004)(7696005)(70586007)(82740400003)(478600001)(5660300002)(336012)(7636003)(4744005)(2906002)(426003)(1076003)(8676002)(8936002)(921011)(4326008)(6286002)(26005)(55016003)(36756003)(356005)(41300700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Feb 2024 09:51:06.7742 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9b213166-43cd-4c47-455b-08dc2c794cbb X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN2PEPF000044A3.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8904 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 Don't allow the user to mask over rsvd1 / rsvd2 fields which are not supported. Fixes: dbff89ef806f ("net/mlx5/hws: fix tunnel protocol checks") Signed-off-by: Erez Shitrit Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_definer.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/net/mlx5/hws/mlx5dr_definer.c index 79d98bbf78..8b8757ecac 100644 --- a/drivers/net/mlx5/hws/mlx5dr_definer.c +++ b/drivers/net/mlx5/hws/mlx5dr_definer.c @@ -1414,6 +1414,13 @@ mlx5dr_definer_conv_item_vxlan(struct mlx5dr_definer_conv_data *cd, struct mlx5dr_definer_fc *fc; bool inner = cd->tunnel; + if (m && (m->rsvd0[0] != 0 || m->rsvd0[1] != 0 || m->rsvd0[2] != 0 || + m->rsvd1 != 0)) { + DR_LOG(ERR, "reserved fields are not supported"); + rte_errno = ENOTSUP; + return rte_errno; + } + if (inner) { DR_LOG(ERR, "Inner VXLAN item not supported"); rte_errno = ENOTSUP; -- 2.39.3