patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] net/mlx5: fix hypervisor detection in VLAN workaround
@ 2024-12-03 16:22 Viacheslav Ovsiienko
  2024-12-03 17:00 ` Stephen Hemminger
  2024-12-06 14:26 ` [PATCH v2] " Viacheslav Ovsiienko
  0 siblings, 2 replies; 6+ messages in thread
From: Viacheslav Ovsiienko @ 2024-12-03 16:22 UTC (permalink / raw)
  To: dev; +Cc: rasland, matan, suanmingm, stable

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 <viacheslavo@nvidia.com>
---
 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-12-13  7:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-03 16:22 [PATCH] net/mlx5: fix hypervisor detection in VLAN workaround Viacheslav Ovsiienko
2024-12-03 17:00 ` Stephen Hemminger
2024-12-06 14:26 ` [PATCH v2] " Viacheslav Ovsiienko
2024-12-12 10:52   ` Thomas Monjalon
2024-12-12 17:27     ` Stephen Hemminger
2024-12-13  7:15       ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).