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 655FC45B7C for ; 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 43FBB402EB; Thu, 12 Dec 2024 18:27:27 +0100 (CET) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mails.dpdk.org (Postfix) with ESMTP id E1B164027D for ; Thu, 12 Dec 2024 18:27:24 +0100 (CET) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-21628b3fe7dso8054555ad.3 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=EXUWg/ob9I7+beHdetXqff94Lc65+VNPGbqMo2iwveJDQIvM0NInjlBH0nT6aWA95f S/3mfCwfhXRIqGAbRHf0w5GFMI3wndr91aqTLPG4gKjTX5HI0O71Z/NIrjSJ4aG/ZbxJ Tik5vdm32ykXthYNUeekhXLf4CYIGK/k7b520Q0tfSBJJysX3cVoIBibMHHHSPTo8J2m Kvq2raLwbJrAyIrg+pTisJGGZs/NOUqtoUvd0+MVt0ZFO20Tr8AZF0suOpJXiPPpnZ0C qhqIubdKGo0N5wOQ+uCoEipiZsENdq3igIZWnrEWLDAPwSq93JDJ7FqpQGsnYmsTgUOH SYWQ== X-Forwarded-Encrypted: i=1; AJvYcCUU+HwyT3XWEle0vYg1QnefvjUQRk8Nwpa16fWyBbUjqJ4FTa1p+o7LBU2aM9AT0C9MXgF4wLY=@dpdk.org X-Gm-Message-State: AOJu0YxMvacfbuEyOErkuu5XaenZH0fcCEVxWBDhrfxuj1ADDhKYfk/r +uT184VCKr65A173aNQuUDbXxpihMzokU8Ks9ZVXB2XvxSjG4r4AbAf8L1My1XE= X-Gm-Gg: ASbGncvXQ6MydWuZ3yw038/5BA1CuQkfVGfknlct7R9BnHm09np5hmrHauLbypwnNy7 FniBVZH71GIra+GRA8Q4xau9sNk+QmC3GrEu9S4SySPd5nO/BKgzakKJu4rZ5LoTJEH1g31byd3 5YwOMY0x1dJB4Hof0RAAELCcgd1hTEZNkbCecXyOSBH2Myirn6ngJSefLzAsnUgUchQ7WlcF3oz EFnAMzQa7/IOnidmTS/W+glZrC5KMad2C/iCOaYzFFGGy9Wzr0hou8/nsKeOid4cRsiAWfLgZ/o M5DnSKGXCwxy3qV/3liSFsKB9NiPwdwsmA== 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: 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 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.