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 38E8545E1F for ; Tue, 3 Dec 2024 17:22:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 35A97402E5; Tue, 3 Dec 2024 17:22:47 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2050.outbound.protection.outlook.com [40.107.243.50]) by mails.dpdk.org (Postfix) with ESMTP id 1180140264; Tue, 3 Dec 2024 17:22:44 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KqQhE4bf6R7LxNVWtzE3RkQMu/FsqcpZMSbML475olY8DH/j1ko7aPYNxvSckb6dtJT3kvJST2z9Wk0BhdVWyTQxUY3GErwMlNW72N1ChMJsaNOLNUnlJQ7Fb4nOrj332HvJz7L2snYMVbxssLOBeq70vkFMxCjgAm59m9nosRJQXqJLrtva8MqzFIuDTQpYF8//eEusxIVJtWk/Bl+aFU0jaMGRADZkQ+FYx2RRNV0CdfmBHGfHLSUZhbLd5wTADXaIH20sLkTN8eJ5GexFiGdwto1pr4OVAUgGBCAZhw/1vn1MJ2KsxvqQqGFVE2KS1wAumP7uLymGV4hhC0Zomw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=y+clH6wvNAIjisuxuFj6vs+FDYfpFvhbkWTHtXVzMik=; b=JScjtYK+irSo2AE2G0QpTOURnNsAuJSGlwc5RRduZhtfHaoslr0a163tIxrQQv9+v4+1mvYEOxZbHmxJKR9W+ohpn7YyaHqw8lF5QPm2xbKUaEgqtUUEBr1oeS62YnEgD5PPS414lvoLRnNed6lHK8VXJvMFqJ9FDKjmqDwPzkcAkgYVKPLSexr7fdCL3E7KzAz+W8+OhQRRAm7Te+oZy0GFYVoIpIM07LedNWnwPB9Z1k66D1KxArtW2pzgqdFGLIZ+65dzhyVSAu7O3rfycgQVMIBfOvuxYThsAv9KsLz8FQzsKKBHPuYCH5lsV05POahE6baIFGazimZtToYZ/w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=dpdk.org 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=y+clH6wvNAIjisuxuFj6vs+FDYfpFvhbkWTHtXVzMik=; b=ghMvAHilQmPDKLstRDk+YJezsjHDRHPVU++PyC1huFEK8GcCX2kUhDYe5gVqTOFgHIimJAyvkFUeLn/MrxgdTyMmuDZQtf6XxUmR8j0PFInkYV3zy+oooaHDJIyyWvhG/nBSOfgc2IfM1GCNqsbztgXQKNvRn8p9M52hzO5z+/hxmwyquhXGDXwN7bEJPzBDh0zOzwTsrrZPMOeVfMvV8izsAGFt5Uu8PnLvlxBRRf0+s0mAHK5suEcn8pVVj16uckIzrFjxmZ9zljZIUtgLq4BFV/9rkBbalmMAH/dtb0F/7Rzm4vf6t2yWE1qWahBvrz721GnD4BwAGOZyXX2K0A== Received: from CH0PR03CA0254.namprd03.prod.outlook.com (2603:10b6:610:e5::19) by MN0PR12MB5980.namprd12.prod.outlook.com (2603:10b6:208:37f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.19; Tue, 3 Dec 2024 16:22:37 +0000 Received: from DS2PEPF00003445.namprd04.prod.outlook.com (2603:10b6:610:e5:cafe::82) by CH0PR03CA0254.outlook.office365.com (2603:10b6:610:e5::19) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.19 via Frontend Transport; Tue, 3 Dec 2024 16:22:37 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) 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.8230.7 via Frontend Transport; Tue, 3 Dec 2024 16:22:37 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Tue, 3 Dec 2024 08:22:21 -0800 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Tue, 3 Dec 2024 08:22:18 -0800 From: Viacheslav Ovsiienko To: CC: , , , Subject: [PATCH] net/mlx5: fix hypervisor detection in VLAN workaround Date: Tue, 3 Dec 2024 18:22:00 +0200 Message-ID: <20241203162200.2543986-1-viacheslavo@nvidia.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS2PEPF00003445:EE_|MN0PR12MB5980:EE_ X-MS-Office365-Filtering-Correlation-Id: 73bb6a30-8b8a-4669-385d-08dd13b6b3b6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?VcdL1ab+g648cc0fj1zuc7G3Vk3rYUKGNYTnaey1zDsXdOZE9+LefyNkDn+1?= =?us-ascii?Q?HKdWz2VytLAnJla6wv+l2uUyfpQtQer13V6L6q1MxF+qQr49Akx0UG6F5d0r?= =?us-ascii?Q?mTjzIoouY4jbl+mwrmsGBaF42AioZwkvELtkf38Cm93kObyu5wHg8yeA4ZHn?= =?us-ascii?Q?iuY+sEx7zaAiNF4sRY2jJ6WO1EHLAX5Dw44Et674Vb76zRJdh6Jt7a4yxPyF?= =?us-ascii?Q?zPaaHgV+lUbD9tdaf7ToXDx/95jeHkeXxmecbMGGbuw+IHDCJaF1gp5rhnhc?= =?us-ascii?Q?Evwsgo/ohFzYN5ZdO66ecpOYs5dnzZqeyerEtNOLpiqRQjmvyWXL5wy3VixS?= =?us-ascii?Q?LIqlTlzGrbALc1uUWDjdhgvOSKvxsja6iP/nUruYuW08iod5ARY7kJHyshHk?= =?us-ascii?Q?E8TDwhlAXJY9F4wdqwJAABCMWR1kdp6gOxY4yaFtbHhAYX1oZyhLmAQ1BObR?= =?us-ascii?Q?mWWK0v0xOXZJCW3obfzGcK0CK0UuHuZAmdT/mD6+XiCi8gUpkEJ+bN7f3vms?= =?us-ascii?Q?sTUXHkGsLoqKsJXP5Y6ZHtCI2yWqAUP1ZljEuGKVw4zRicSqGcLW4AM5RFTR?= =?us-ascii?Q?WXdNvOoDoB2Xt1g9hnFnqpf5Vfs5SSBB3RJZ+wkDXv2v1no4PZQViRXwSikk?= =?us-ascii?Q?cwWShsUSE9FyM+CsKKx2WzozYe8VW8keSd/lSmiLgig6IpUBSDEgBEjwRCNX?= =?us-ascii?Q?BnvHjPMA1sloA1JHmMH28/hfCqPDdDirhMdz7k05Jpg3aAHQYBeVTCV7NfYK?= =?us-ascii?Q?7lk4ZkgrQwqJt9JFnhtbNeulRx45Trqx9BugULucg+2hTeC/3Mz9Rmvo8Jih?= =?us-ascii?Q?zuMNPaXSvPIjpU8nR3KXGsmCIf3cxfCGDb18h6ZU3O3DX5LuArZOjpseSJ8V?= =?us-ascii?Q?cECdkSJQryw5HNdomYWsTUuuJLAakqxaZz7cO0jT798PRAv34p9/OilFSKgR?= =?us-ascii?Q?Hk00mdV9kIf85ClmK11hR061lOVskvU/cT8KwRcFmIehFTxIXhd/XcQy+nI3?= =?us-ascii?Q?OkEQ4d4d0hdDnEFD2rF8tWo9klopZat/O655GQIRdfewlgcnE7MWO4wqNcAW?= =?us-ascii?Q?c1cB15723Uvpk7wSfV6X38vSi9LW1B7mo0IDeVNBJqdp0OBddmjSsTsKFOEC?= =?us-ascii?Q?iicwOFXFLZ8zOAM3qMGrWBnjZjuMGVbZDwrEvZdQkCpqrIGknsksoC159pfu?= =?us-ascii?Q?kuVwWKAvc63C01efxMP2B2Dwv4v7zlHFUx7qN0PMuV7I0OILPYMsVkJYsgG0?= =?us-ascii?Q?nQb5tfcYt0touXpt2gC0UWDI4BPlDso3QOVFKQ8zychgBR8d0eN0izQA75kh?= =?us-ascii?Q?czeDMfS34JO2Yd5YqXfGG+ZboLE3cNIjk1r9KrhxWG601OuTr/IFd2uIlefO?= =?us-ascii?Q?kjeK/cuc34jE1H8CQrzSot1OZ/3QcHWDZwPYZFLP14Rxtbnl4xtnlD5Ga06T?= =?us-ascii?Q?aK7Ec8YyTm6HwIXIvVWw79L/hFoQP3Vt?= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230040)(36860700013)(376014)(1800799024)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2024 16:22:37.4330 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 73bb6a30-8b8a-4669-385d-08dd13b6b3b6 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.160]; 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: MN0PR12MB5980 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org The mlx5 PMD provides a specific workaround for the VMware ESXi hypervisor, enabling on-demand routing configuration to virtual machines. This workaround activates when the device type is a Virtual Function and either an ESXi hypervisor is detected or the hypervisor type is unknown. For non-x86 architectures the function rte_hypervisor_get() consistently returns an unknown type, which triggers the workaround automatically without any actual needs. If there are VLAN support requirements, this can lead to failures in inserting default control flows. Do not trigger the workaround for unknown hypervisor type in non-x86 environments. Fixes: dfedf3e3f9d2 ("net/mlx5: add workaround for VLAN in virtual machine") Cc: stable@dpdk.org Signed-off-by: Viacheslav Ovsiienko --- drivers/net/mlx5/linux/mlx5_vlan_os.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/mlx5/linux/mlx5_vlan_os.c b/drivers/net/mlx5/linux/mlx5_vlan_os.c index 81611a8d3f..017953d5cc 100644 --- a/drivers/net/mlx5/linux/mlx5_vlan_os.c +++ b/drivers/net/mlx5/linux/mlx5_vlan_os.c @@ -112,7 +112,9 @@ mlx5_vlan_vmwa_init(struct rte_eth_dev *dev, uint32_t ifindex) /* Check whether there is desired virtual environment */ hv_type = rte_hypervisor_get(); switch (hv_type) { +#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_X86_64) case RTE_HYPERVISOR_UNKNOWN: +#endif case RTE_HYPERVISOR_VMWARE: /* * The "white list" of configurations -- 2.34.1