[AMD Official Use Only - General] Hi David, Thank you, I will push the updated patch soon.
-----Original Message----- From: David Marchand <david.march...@redhat.com> Sent: Wednesday, October 4, 2023 2:27 PM To: Sebastian, Selwin <selwin.sebast...@amd.com> Cc: dev@dpdk.org; Yigit, Ferruh <ferruh.yi...@amd.com>; sta...@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.sebast...@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: sta...@dpdk.org > > Signed-off-by: Selwin Sebastian <selwin.sebast...@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