[PATCH v2] net/axgbe: use CPUID to identify cpu

Sebastian, Selwin Selwin.Sebastian at amd.com
Wed Oct 4 11:49:29 CEST 2023


[AMD Official Use Only - General]

Hi David,
Thank you, I will push the updated patch soon.

-----Original Message-----
From: David Marchand <david.marchand at redhat.com>
Sent: Wednesday, October 4, 2023 2:27 PM
To: Sebastian, Selwin <Selwin.Sebastian at amd.com>
Cc: dev at dpdk.org; Yigit, Ferruh <Ferruh.Yigit at amd.com>; stable at dpdk.org
Subject: Re: [PATCH v2] net/axgbe: use CPUID to identify cpu

Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.


Hello Selwin,

On Tue, Oct 3, 2023 at 1:40 PM Selwin Sebastian <selwin.sebastian at amd.com> wrote:
>
> Using root complex to identify cpu will not work for vm passthrough.
> CPUID is used to get family and modelid to identify cpu
>
> Fixes: b0db927b5eba ("net/axgbe: use PCI root complex device to
> distinguish device")
> Cc: stable at dpdk.org
>
> Signed-off-by: Selwin Sebastian <selwin.sebastian at amd.com>
> ---
>  drivers/net/axgbe/axgbe_ethdev.c | 106
> ++++++++++++++++++-------------
>  1 file changed, 63 insertions(+), 43 deletions(-)
>
> diff --git a/drivers/net/axgbe/axgbe_ethdev.c
> b/drivers/net/axgbe/axgbe_ethdev.c
> index 48714eebe6..4fdb0ae168 100644
> --- a/drivers/net/axgbe/axgbe_ethdev.c
> +++ b/drivers/net/axgbe/axgbe_ethdev.c
> @@ -12,6 +12,12 @@
>
>  #include "eal_filesystem.h"
>
> +#ifdef RTE_ARCH_X86
> +#include <cpuid.h>
> +#else
> +#define __cpuid (n, a, b, c, d)

With a space in this macro definition, the precompiler will think that it must replace the __cpuid token as literally (n, a, b, c, d).


--
David Marchand



More information about the stable mailing list