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 66B5F45DD5; Thu, 12 Dec 2024 18:27:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2CC564027D; Thu, 12 Dec 2024 18:27:26 +0100 (CET) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mails.dpdk.org (Postfix) with ESMTP id DF0A640269 for ; Thu, 12 Dec 2024 18:27:24 +0100 (CET) Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-2156e078563so7111975ad.2 for ; Thu, 12 Dec 2024 09:27:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1734024444; x=1734629244; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=ivbtI4iJfDwvSBwYjAM8d8+6nVholFag/sRMromW0ec=; b=ah8GIzwy48prJb/KYCd6jwncX4ik7zHdIBXS+Zu5dyXoZVvmZ64l+QnX/q5mKmUsSo Lx0fsr/sxVoXmLYpAjkJLNuuwqJMm57CkWHDMMFQLrZLIx3o9lhb9W358ms3sLoPybVz NymN4Uz1zvRKXnvYk48HDOirgg/C48AVEhh4LwxyVU72d9OZJCGHm4KeCgKr6TICS1UZ Rr/UqKHLlh7DTjWipeMw5/ei/l9WDLyjUD2PflpZROg8tRKrC8kS7ZroS91xtqEYoz9z 5jVBKpP22H4/sZ+wwvLAHafoPMlxzRpKneoIMDrXoX2lELSIi9vms7WbSRdgeyUDFFy1 pumA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734024444; x=1734629244; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ivbtI4iJfDwvSBwYjAM8d8+6nVholFag/sRMromW0ec=; b=T2EbQaJV1qn57/V+TE7rrDLV096IXDbuHU758AfrwayHtOLLIKql5HBHQu0zEWQsRa M8mL/N3D0K+SDYRpZZse6jOOmuOZHHQ8+NYXa81QL02i+/L7m+AIRkAiO5svLDFcpQR6 D/6mniTFd9gyf7jULIiTuCBLSNoDv0UDrptFZ431nkQ/+XJ+AWUPbcdEhq5eQbZyNoLC 29T/3vH228XPVF2bwBXfUBwcPG0NaSWkajMpPJelghX+yU1ox60TJBi47ifcgCjvyIPx TxCepu4opY/VDz8AuZCq6btXp2KOvd9prVIJPR3z+pg2sU89qXmMIyHhzjBZBwCnSMm1 lrHA== X-Forwarded-Encrypted: i=1; AJvYcCWZNF4xemg+dtziBTSWtTE5EJGCseOvTYMUWCktOWplu8LK8vs0qBCqp9V6kzjE7tEQG+0=@dpdk.org X-Gm-Message-State: AOJu0YxxSAlklfHGC9q/SzSqiAWBE1+WiAQYimVSjbsl5c/Lmw5E9uie 345JeGqMSawuQpaBC7vjNawjgwOeEarO59GBNoVjZ4a4rngLIZNvYN14EH40qeY= X-Gm-Gg: ASbGncuomE+evHKEdj/nlFz4Pp0XX2V/yNSGapMyGdWhfiwtei0XZlGgfoO5Sqd7ydO 81t8OglKOIQUS2gplVqFW4RhqkzZAvzwEfL9JQ9dtYBOTsPyzGtlcCkcTRFGT7v7BpzYHlMJlCn D+JXhVSwoJcE7QrgXfGJP5SWNMiq+Gw1N2VMwI3MGCm447gjJ305vqTfpTHZtEzMgI6Qn8eLBmw UN21mRjBKwFk0zaSbCOVv7lA9NJGjU8gTyWKOLbUFbaT8tZS3rg5xfVktZlnBAHKIrrXAqDXC+I 5lVzmmta98DfViMyz8yU/M3V/iG7Jorbyg== X-Google-Smtp-Source: AGHT+IHn1MAWQzw8VqaANJ1GhHKqbUweYgyjKdpbzlc+AVEbOCq5byLkjSB7SqsjWGdhsDxVCOjzXA== X-Received: by 2002:a17:902:e550:b0:215:9379:4650 with SMTP id d9443c01a7336-2178aeed4b9mr70020855ad.42.1734024443837; Thu, 12 Dec 2024 09:27:23 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-215f8f29635sm125959355ad.241.2024.12.12.09.27.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2024 09:27:23 -0800 (PST) Date: Thu, 12 Dec 2024 09:27:21 -0800 From: Stephen Hemminger To: Thomas Monjalon Cc: Viacheslav Ovsiienko , dev@dpdk.org, stable@dpdk.org, rasland@nvidia.com, matan@nvidia.com, suanmingm@nvidia.com Subject: Re: [PATCH v2] net/mlx5: fix hypervisor detection in VLAN workaround Message-ID: <20241212092721.0e4a12a3@hermes.local> In-Reply-To: <4686294.VLH7GnMWUR@thomas> References: <20241203162200.2543986-1-viacheslavo@nvidia.com> <20241206142605.2582139-1-viacheslavo@nvidia.com> <4686294.VLH7GnMWUR@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Thu, 12 Dec 2024 11:52:51 +0100 Thomas Monjalon wrote: > 06/12/2024 15:26, Viacheslav Ovsiienko: > > 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. > > It would be a lot better to fix rte_hypervisor_get(). > I suggest starting with the read of /sys/class/dmi/id/ The common heuristic is what is in the lscpu utility. https://github.com/util-linux/util-linux/sys-utils/lscpu-virt.c Doing all this right is complex. PS: it should also detect Xen and others even though DPDK doesn' support it.