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 0B2DB43AFD; Sun, 18 Feb 2024 06:11:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9C7894028A; Sun, 18 Feb 2024 06:11:51 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2059.outbound.protection.outlook.com [40.107.237.59]) by mails.dpdk.org (Postfix) with ESMTP id A954940262 for ; Sun, 18 Feb 2024 06:11:49 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ajYCC0HUjghUN5aOgZmitXT5TIbj5lOO81mDduatOmY2tAUmW+r+AbBWuECjhu+Z8HT2Le+QDUNgNSIn1hmhqpH0fVAfgd7ot1BlDucirJqWEqx5CawXgKRpXTm6BbQoW8/1DLbHvw2x0dPk0sE4+ZBz8etmTJSiMjUYhFYsGaumTyOWxYLe/jmy5HDMr8LB5At3qLwolnU954GqTh7q5YsIb/7esSpPxQRcq+YKXiub6ROeQAYzY66NU8SVjbSoSRc5xz/7UdhC6PRg947NPd5DFQnLiKeAnYP0IWLgmfOxpWKtW+aVS0CzgzFkzDooxnVOV3ED3NXAUBjM1NowNg== 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=4mZjwAIhDZG5FAhSju57aU7Qw8c15CaK7JCIDvGp0sQ=; b=Az33Iq+S0IASVb8PX8HNzytL8hvJ7lYKemWTdFHtVO06viTBMMAGPiWsSlip9y/Kz30rhNxi/8UVA38DjNkEx3MvkkDP39zdAT8cuf74wXkYBib02k8+Jkq67giXXqRf8szdL6ywVrmsqBYJ5f1PDbtcstHaMQEcOU21gAEljR1XckOwWBzKBD9YghoCri30hChZzrEa0UUqDa8fi13zbFGVi0NyVeLUz/pYAHCQzyptnx7Xc/z0J9qo8JTcVk5/SlpxHVw6SEMlQhZSzqq6JHgVLrf6bKGg6vsuAOMdy5jSrJRZBLF4aCNRGNupR3ewdZA0IAJvEG4ziuigsmO64A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) 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=4mZjwAIhDZG5FAhSju57aU7Qw8c15CaK7JCIDvGp0sQ=; b=htGFB6URsEU7S85xZvwtcYQDnUambqssCez/0DYrgfjKp6QNsbt+8Gsxt5HjXBfjcm9acC/xrHN5Nd3cwDxnLwuYRdNOsG8raZ46Wiur8CPs8UtV9Xct7oRGu6BaOizZkHDzlBs+0hznVPsGN0zg8q0tbIpyBzBnm5uWiDkcCyoYMa1wHf1ehmyJEpdzY5hb5MHT9HjzRS8gaW+RKIm0VVFDcTR+Rs5w1RPCzOUt/xxhplbAGhAHZDE6stdBzdNIEfwa7C4OMDtIwNH0JbrKFAo0PjTFqRJh+DLWXF1B2sUp5pk6Fzforsj8nRSpXyScBLy2htY99RdgfEx68ASkrA== Received: from DM6PR13CA0026.namprd13.prod.outlook.com (2603:10b6:5:bc::39) by IA0PR12MB8328.namprd12.prod.outlook.com (2603:10b6:208:3dd::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.17; Sun, 18 Feb 2024 05:11:46 +0000 Received: from DS2PEPF00003445.namprd04.prod.outlook.com (2603:10b6:5:bc:cafe::ab) by DM6PR13CA0026.outlook.office365.com (2603:10b6:5:bc::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.24 via Frontend Transport; Sun, 18 Feb 2024 05:11:45 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) 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.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by DS2PEPF00003445.mail.protection.outlook.com (10.167.17.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.25 via Frontend Transport; Sun, 18 Feb 2024 05:11:45 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sat, 17 Feb 2024 21:11:45 -0800 Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail203.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Sat, 17 Feb 2024 21:11:44 -0800 Received: from nvidia.com (10.127.8.12) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12 via Frontend Transport; Sat, 17 Feb 2024 21:11:42 -0800 From: Itamar Gozlan To: , , , , , , , Dariusz Sosnowski , Ori Kam , Matan Azrad , Alex Vesker CC: Subject: [v2 02/10] net/mlx5/hws: add check for not supported fields in VXLAN Date: Sun, 18 Feb 2024 07:11:16 +0200 Message-ID: <20240218051125.717011-2-igozlan@nvidia.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240218051125.717011-1-igozlan@nvidia.com> References: <20240213095038.451299-9-igozlan@nvidia.com> <20240218051125.717011-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: DS2PEPF00003445:EE_|IA0PR12MB8328:EE_ X-MS-Office365-Filtering-Correlation-Id: 7b0f8e04-4884-480b-c62d-08dc30401a50 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: ZbeByL0wcSmIDY0iBh7NJ+B51LhdlIk32mVReYjEWpnXrPJ+SQyPOtclawoZYpaR0pE5GaOzepHcy7yTFh/jnZCamKbkWOcClbRPf8kQ878wNP9hYk16wUYDHPlu0yj7PEyLpsesorZatZfIf1FR+/BWD93yO4V5O2134ULyM9NlOxWt3MS5cNSNxj2lHpB05L4s2u3oZyVPSNeg8k+9TXWiUa54VWjtn1hMGcoZzRpscRzh9pyNmvmN9xwPkBEOquRKxFBOMD4OqdY/sLmm1ckntzZCbDbnZLdRzERemc7dMX82pftm17Uc5vX9mz3ONi92r8cnjkpWIgU9S2aXGRaAaWZleh5eHVdb8zBrLv/M5J/LVSP3QWIjnCboS6xU2sGI5Lcl4JixNimCayLjOGJTSsNNpk0j0dqY4Yva4rRkf3biWKsI4JmwQj1YfcG351uaT1ovNSN+2ywX+5/vL+bFhyy4vM9rRTHEDfusHqaB5ENEJmCxtcpXPhd6EiSHhZQpgElUKREd1abReArU3sr4y9KXfYssd5mFVTxVOkLFKlh0N7YhI00GGSzbDSwj/3Px9FiAGA40UcYE2uE2lPZhy1xRYJdcUOZ0YvoecHaEkpwcH5xy4g26mnEVoMu5/YbsG+bT3mown/jREaz/6BxZdTRm6i/P1dlZzuWeQgs= X-Forefront-Antispam-Report: CIP:216.228.118.232; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge1.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(136003)(376002)(39860400002)(346002)(396003)(230922051799003)(36860700004)(451199024)(1800799012)(82310400011)(64100799003)(186009)(40470700004)(46966006)(82740400003)(86362001)(36756003)(356005)(7636003)(7696005)(316002)(6666004)(6636002)(110136005)(478600001)(6286002)(41300700001)(26005)(336012)(2616005)(426003)(1076003)(921011)(4326008)(8936002)(8676002)(55016003)(70586007)(70206006)(2906002)(5660300002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Feb 2024 05:11:45.5902 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7b0f8e04-4884-480b-c62d-08dc30401a50 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.232]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS2PEPF00003445.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB8328 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 From: Erez Shitrit 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