From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <stable-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 1700545E8C
	for <public@inbox.dpdk.org>; Fri, 13 Dec 2024 08:16:02 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id BC1454003C;
	Fri, 13 Dec 2024 08:16:01 +0100 (CET)
Received: from fhigh-b5-smtp.messagingengine.com
 (fhigh-b5-smtp.messagingengine.com [202.12.124.156])
 by mails.dpdk.org (Postfix) with ESMTP id B9A0640647;
 Fri, 13 Dec 2024 08:16:00 +0100 (CET)
Received: from phl-compute-04.internal (phl-compute-04.phl.internal
 [10.202.2.44])
 by mailfhigh.stl.internal (Postfix) with ESMTP id E33B625401EB;
 Fri, 13 Dec 2024 02:15:59 -0500 (EST)
Received: from phl-mailfrontend-01 ([10.202.2.162])
 by phl-compute-04.internal (MEProxy); Fri, 13 Dec 2024 02:16:00 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 cc:cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1734074159;
 x=1734160559; bh=ojhlMxQOLI8o3nzb191AvhYUmiIDsYBOqUjmAQSKHCk=; b=
 lCbXi5xfn2/mss0iN22PFxt/IcMhYltlC3sjw/8doOH5xLuIgCEcLuHBG3s0D2JT
 Gd4aIIXRTCL7syV3m7e9JB95/aSXHESNdDFNpwQXQZbHRN85sDgzMfXxVvDWVN1F
 fdK4gdYFPC/WSSUKb/6ApIjfzOP77VF/Gv51q3tWE9qAj4fM3iRA/ER1GDEQS0OX
 NtzA+jZi3H+pgrkgFo3n7sEGA8tUpYNkgzl0IrEyQwBE+CmyPtXECUMNtBibKU9x
 hDMVzMcFFeOozV5+DC+YHmB52gZl60bzLRPm2AOqRdVBCzyeObD+i2VDL2VDYC5G
 /r7ymy6F7bVnWekZ5fXa4w==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1734074159; x=
 1734160559; bh=ojhlMxQOLI8o3nzb191AvhYUmiIDsYBOqUjmAQSKHCk=; b=l
 ViK71tBTxRzVPVfXc+sKPlEFUJBIx7qw82udXVd49SHxYpFxs6aJ8+wITSpuXm+L
 Of/BC0bmvBeQOyAmI7vInpFGIcTxICKYdTTDnP7Lj7mJS9NQnKAD6s6yFANzNobv
 2X6WP7gVwEKYWvcyWs4DIr6hIc/7NYeClHENrBQ6ObNqmyYTIpaQdfj5C7sK3KcG
 RH8Vc2I1nYOQrxaduu4a7vhYhHh22V64rYLc6f7pkPhgcWrqif/r/3phz5AVke1u
 72V+STgib3Q/Vwjv+br8RYO3OLq3J61Bjg5PB4269MvWORvDETecj/M1/gMT2Yqd
 NtBkPgEgZoxu+1oQtrsqA==
X-ME-Sender: <xms:Lt9bZ67bDSzzZy24JyHXOaMh3iS9tnkm5p2N2D5kXxMiH8t-wU_3uA>
 <xme:Lt9bZz75ouUU35dE4OSvn8WNpQq8RDMWiG0aG95huhN2UFJdo5pgu4Vy8jHWQJ6Yf
 -tgSvsdzfdGQ5pF3A>
X-ME-Received: <xmr:Lt9bZ5cr2rIiwarkTJbv499bl8VYA9CtN934l6qeXnSbWLKMxHvG_qd87JzhFS8tBLx5I9QzAsOPb-cR7Yc0-SlsTg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrkeeigddutdegucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu
 rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh
 htshculddquddttddmnecujfgurhephffvvefufffkjghfggfgtgesthfuredttddtjeen
 ucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrg
 hlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpeeuffevtefftdeutdefhffftdduveet
 ffekgeelfeelgffhheejieettdevjeejveenucffohhmrghinhepghhithhhuhgsrdgtoh
 hmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhh
 ohhmrghssehmohhnjhgrlhhonhdrnhgvthdpnhgspghrtghpthhtohepjedpmhhouggvpe
 hsmhhtphhouhhtpdhrtghpthhtohepshhtvghphhgvnhesnhgvthifohhrkhhplhhumhgs
 vghrrdhorhhgpdhrtghpthhtohepvhhirggthhgvshhlrghvohesnhhvihguihgrrdgtoh
 hmpdhrtghpthhtohepuggvvhesughpughkrdhorhhgpdhrtghpthhtohepshhtrggslhgv
 seguphgukhdrohhrghdprhgtphhtthhopehrrghslhgrnhgusehnvhhiughirgdrtghomh
 dprhgtphhtthhopehmrghtrghnsehnvhhiughirgdrtghomhdprhgtphhtthhopehsuhgr
 nhhmihhnghhmsehnvhhiughirgdrtghomh
X-ME-Proxy: <xmx:Lt9bZ3KlJZAihl-MpUeYD7xafgcT4di3fIB1fVamSamPmLlGrpupyg>
 <xmx:Lt9bZ-KhB9Aj_s8Z6k3hETLbFvc4RVNTWnZAtn82WNncVyYEL6MdDQ>
 <xmx:Lt9bZ4yV7ydr7wFH-Xta7biiBFubPWELNXuEK4lQ7mHhAWe2vAxNUQ>
 <xmx:Lt9bZyIGDPnsuFMWyODhgVtHoaTnex-Y0EBggrTZ5Rnwr2I2c1fPCw>
 <xmx:L99bZ_pO1bZkMZCuY6lWIUcQV-cm96a7yjheiySBqXPJ1I1tnmfgCKYA>
Feedback-ID: i47234305:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri,
 13 Dec 2024 02:15:57 -0500 (EST)
From: Thomas Monjalon <thomas@monjalon.net>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Viacheslav Ovsiienko <viacheslavo@nvidia.com>, 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
Date: Fri, 13 Dec 2024 08:15:55 +0100
Message-ID: <6395551.QJadu78ljV@thomas>
In-Reply-To: <20241212092721.0e4a12a3@hermes.local>
References: <20241203162200.2543986-1-viacheslavo@nvidia.com>
 <4686294.VLH7GnMWUR@thomas> <20241212092721.0e4a12a3@hermes.local>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="utf-8"
X-BeenThere: stable@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: patches for DPDK stable branches <stable.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/stable>,
 <mailto:stable-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/stable/>
List-Post: <mailto:stable@dpdk.org>
List-Help: <mailto:stable-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/stable>,
 <mailto:stable-request@dpdk.org?subject=subscribe>
Errors-To: stable-bounces@dpdk.org

12/12/2024 18:27, Stephen Hemminger:
> On Thu, 12 Dec 2024 11:52:51 +0100
> Thomas Monjalon <thomas@monjalon.net> 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.

I don't think we need to detect all.
Currently we have a very limited implementation, using only CPUID on x86.