patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Bing Zhao <bingz@nvidia.com>
To: Slava Ovsiienko <viacheslavo@nvidia.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: Raslan Darawsheh <rasland@nvidia.com>,
	Matan Azrad <matan@nvidia.com>,
	Suanming Mou <suanmingm@nvidia.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: RE: [PATCH v2] net/mlx5: fix hypervisor detection in VLAN workaround
Date: Thu, 5 Jun 2025 03:06:32 +0000	[thread overview]
Message-ID: <PH7PR12MB6905E224F086AFEB211336A6D06FA@PH7PR12MB6905.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20241206142605.2582139-1-viacheslavo@nvidia.com>

Hi,

Since it is only a WA and no need to consider all archs or CPU types, LGTM so far.

> -----Original Message-----
> From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
> Sent: Friday, December 6, 2024 10:26 PM
> To: dev@dpdk.org
> Cc: Raslan Darawsheh <rasland@nvidia.com>; Matan Azrad <matan@nvidia.com>;
> Suanming Mou <suanmingm@nvidia.com>; stable@dpdk.org
> Subject: [PATCH v2] net/mlx5: fix hypervisor detection in VLAN workaround
> 
> External email: Use caution opening links or attachments
> 
> 
> 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>
> 
> --
> 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

Acked-by: Bing Zhao <bingz@nvidia.com>


      parent reply	other threads:[~2025-06-05  3:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-03 16:22 [PATCH] " 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
2025-06-05  3:06   ` Bing Zhao [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PH7PR12MB6905E224F086AFEB211336A6D06FA@PH7PR12MB6905.namprd12.prod.outlook.com \
    --to=bingz@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=stable@dpdk.org \
    --cc=suanmingm@nvidia.com \
    --cc=viacheslavo@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).