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 8748E45DF1 for ; Fri, 6 Dec 2024 15:26:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 605D54027D; Fri, 6 Dec 2024 15:26:44 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2068.outbound.protection.outlook.com [40.107.220.68]) by mails.dpdk.org (Postfix) with ESMTP id DCA234027D; Fri, 6 Dec 2024 15:26:42 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ljSszWf0SyAfMFuhHaKZ/Y/KBkjWJX4KmJ9BCx8SQG/VyTmO0xBqzEImxQt0Pybpnae56mlyEoUPMTAazLwDxQmdgb/+Rav8EqKP5xcWfOoxZqF87f+Q0QOLIWFNLxdcvebDs+hsOFkTy3YKchHorf2nTMg35JmR1fngcAjHgFWjXbJkGtMeoNVPXAy//AHRzLpJNrKSF7LBEaVq1aeR1muuCa92en3nMm2Ks4xLyeVjY5uMjxx5oVaZgYm4tI+KBFRVbZ79Gvv9w0uVCWFqHSOOXbwLZVbhx7z5p0OHKEvSlP83PEJdINHhJvo3l+RFMSqiOlU3y2E8mHcVpLOZ4g== 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=ZhIVFH82xKGZwduAQuthQwflgTAy+Clq7Ad53t9j/ME=; b=GOtnz+ELV1aq2S+q6ikpfbPUM3+uQvsTVnhx9qJtb7N/7zZkXMn8IzYUHODc22+2+37lSAKOf9wF4jQMiNetBy1L62Od/TCljqoEufI4A1CAat10qGXe6hB1k48SYyI+tEJh0BIxFSdFm6IUfpGIOFbDv6UYJ5vTUmxUkprcz4yxYGYz7lhLYeVRYXSY5vNZzvuNLWVTXBQ/gSV1Ypl2HQD6BOlM0HYcVjPCDmaaN0vG9U/VhhuPZZuk7Eah+9pW7yo5Bya/YP9UE/u5zwUN1Ddzp/zb5FEvODDXrpQiaQl1T4QiAl/9vP/gS9fCCl2cEjRMl5yA2nxwyoavw+zTIw== 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=ZhIVFH82xKGZwduAQuthQwflgTAy+Clq7Ad53t9j/ME=; b=f+IWB2iDhTQieIYaXSyGq5M2nV8t8wqmWvOpEy0v/LGXFwf4S0mVVndAEHtsR+3MFna3C1A05vvwT5v+0p6yePLsWz/eZRvp+1ETUQsKOxEMju9hmOTX7Y7tLo2xGhYtsgHBfVEwXca42fVYpkzEuwbWSKeOVngZ+gV6/9BYVj10v3ghrPp3mrrgv76KHcnIHvdZVe9O75d3xLSV4a5sXgKgmtAE75hESSZmgG1Uo+JQLHdMPcv4VuzPxS6hN3lkN9/ib/hyLPIvNufuJrY7xPYOoDHAqriXgaO7ALRj/Y6sxzQlD3Y2P+41eYBOo2Hx8KPIeMOF+707i7ZM6NhGxw== Received: from MW4PR03CA0207.namprd03.prod.outlook.com (2603:10b6:303:b8::32) by SJ2PR12MB9210.namprd12.prod.outlook.com (2603:10b6:a03:561::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.12; Fri, 6 Dec 2024 14:26:35 +0000 Received: from SJ5PEPF000001CF.namprd05.prod.outlook.com (2603:10b6:303:b8:cafe::f8) by MW4PR03CA0207.outlook.office365.com (2603:10b6:303:b8::32) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8230.10 via Frontend Transport; Fri, 6 Dec 2024 14:26:35 +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 SJ5PEPF000001CF.mail.protection.outlook.com (10.167.242.43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.7 via Frontend Transport; Fri, 6 Dec 2024 14:26:35 +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; Fri, 6 Dec 2024 06:26:22 -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; Fri, 6 Dec 2024 06:26:20 -0800 From: Viacheslav Ovsiienko To: CC: , , , Subject: [PATCH v2] net/mlx5: fix hypervisor detection in VLAN workaround Date: Fri, 6 Dec 2024 16:26:05 +0200 Message-ID: <20241206142605.2582139-1-viacheslavo@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241203162200.2543986-1-viacheslavo@nvidia.com> References: <20241203162200.2543986-1-viacheslavo@nvidia.com> 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: SJ5PEPF000001CF:EE_|SJ2PR12MB9210:EE_ X-MS-Office365-Filtering-Correlation-Id: 7b3b3ec1-be71-41dd-4308-08dd1601fd22 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|376014|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?0PlKLMepuIre5HZaX+JBMwpAd0w6cS4rTLYuCOMGsIHvfzcdYArVB8bccmNC?= =?us-ascii?Q?nUJApJV96XN19SrzQWwx0BmBMhSgJEy8IJcpaSo+eSSEKeLL8X7AxZz4T4J9?= =?us-ascii?Q?vFpSN9Se/xb67ZG33VhVWx1MFMsWZaWSRnRnCiDrBSITNjaE0att5GXxJ1Ul?= =?us-ascii?Q?JQ8a23ccXTVtL/M49II1nX4z+aX3nLzi8Eg/ouDtwwOa3QUZzFsw9SFgjjTV?= =?us-ascii?Q?P8Wh6YHl2+++bgX/TV2keKT2Oydtn/hu1pzxrrTMa1aT4iKIPcoiX4IhFXKW?= =?us-ascii?Q?BvD+0R7dKKDmFAqieMu8IH2m5SFNI/dt6n5iPjfz9+CJLg0wxtpeQ19YgpDY?= =?us-ascii?Q?FJHUAEtaeAfbqpGKEiOkw8Gv14WOjCaKJWLMB9SBoGrgFy10rNJ5uD1ZHwv+?= =?us-ascii?Q?po624Gceg8PAQXVxHZ6hfhRZ42FTwhrLFNlkWLW24mjBdtdYvlJAhCN6ObGG?= =?us-ascii?Q?hZVJHb6hOSTP1q3e+osEg1VOaG2aSdgCadTZgnNdw+yhYyCVZc9gvUp0TkMF?= =?us-ascii?Q?1ikXdeE252vX3n3LZW0slfmle+JXB05yR9hMwga7z5qUtAjrRi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4elB5h5tWIYGuk6D4FcUjsa?= 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)(1800799024)(36860700013)(376014)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Dec 2024 14:26:35.2887 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7b3b3ec1-be71-41dd-4308-08dd1601fd22 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: SJ5PEPF000001CF.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB9210 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 -- v2: updated cooments to remove "white list" --- drivers/net/mlx5/linux/mlx5_vlan_os.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/mlx5/linux/mlx5_vlan_os.c b/drivers/net/mlx5/linux/mlx5_vlan_os.c index 81611a8d3f..353484de3f 100644 --- a/drivers/net/mlx5/linux/mlx5_vlan_os.c +++ b/drivers/net/mlx5/linux/mlx5_vlan_os.c @@ -112,16 +112,16 @@ 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) + /* Always misdetected on ARM archs, let's ignore this */ case RTE_HYPERVISOR_UNKNOWN: +#endif case RTE_HYPERVISOR_VMWARE: - /* - * The "white list" of configurations - * to engage the workaround. - */ + /* The list of configurations to engage the workaround. */ break; default: /* - * The configuration is not found in the "white list". + * The configuration is not found in the list. * We should not engage the VLAN workaround. */ return NULL; -- 2.34.1