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

David Marchand david.marchand at redhat.com
Wed Oct 4 10:56:48 CEST 2023


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