patches for DPDK stable branches
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Ferruh Yigit <ferruh.yigit@amd.com>,
	Selwin Sebastian <selwin.sebastian@amd.com>
Cc: stable@dpdk.org, dev@dpdk.org,
	"Bruce Richardson" <bruce.richardson@intel.com>,
	"Tyler Retzlaff" <roretzla@linux.microsoft.com>,
	"Morten Brørup" <mb@smartsharesystems.com>
Subject: Re: [PATCH v1] net/axgbe: use CPUID to identify cpu
Date: Fri, 15 Sep 2023 15:02:07 +0200	[thread overview]
Message-ID: <CAJFAV8z+-ygFKpzmRBQPui8Uws+XxO_sxq7HrBC_B0Pt1=FmEA@mail.gmail.com> (raw)
In-Reply-To: <1e1f06fd-c004-4612-90ba-c6322df27941@amd.com>

On Fri, Sep 15, 2023 at 12:54 PM Ferruh Yigit <ferruh.yigit@amd.com> wrote:
>
> On 8/31/2023 1:31 PM, Selwin Sebastian 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@dpdk.org
> >
> > Signed-off-by: Selwin Sebastian <selwin.sebastian@amd.com>
> > ---
> >  drivers/net/axgbe/axgbe_ethdev.c | 102 ++++++++++++++++++-------------
> >  1 file changed, 59 insertions(+), 43 deletions(-)
> >
> > diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
> > index 48714eebe6..59f5d713d0 100644
> > --- a/drivers/net/axgbe/axgbe_ethdev.c
> > +++ b/drivers/net/axgbe/axgbe_ethdev.c
> > @@ -12,6 +12,8 @@
> >
> >  #include "eal_filesystem.h"
> >
> > +#include <cpuid.h>
> > +
> >
>
> This patch cause build errors for some non x86 architecture, because of
> 'cpuid.h'.
>
> There is already a 'rte_cpuid.h' file that includes 'cpuid.h' and it is
> x86 only file.
>
> @Selwin, does it makes sense to implement the feature you are trying to
> get in eal/x86 level and use that API in the driver?

This driver was expected to compile on all arches.
The meson.build seems to show an intention of compiling/working on non
x86 arch...

On the other hand (and if I understand correctly the runtime check),
it was never expected to work with anything but a AMD PCI root
complex.


>
>
> For those eal/x86 APIs, they will be missing in other architectures,
>
> @David which one is better, to implement APIs for other architectures
> but those just return error, or restrict driver build to x86?

We gain compilation coverage, but if the vendor itself refuses runtime
on anything but its platform... I don't think we should bother with
this.
Did I miss something?



-- 
David Marchand


  reply	other threads:[~2023-09-15 13:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-31 12:31 Selwin Sebastian
2023-09-15 10:54 ` Ferruh Yigit
2023-09-15 13:02   ` David Marchand [this message]
2023-09-15 14:35     ` Ferruh Yigit
2023-09-22  9:43       ` David Marchand
2023-09-27 10:10         ` Bruce Richardson

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='CAJFAV8z+-ygFKpzmRBQPui8Uws+XxO_sxq7HrBC_B0Pt1=FmEA@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=mb@smartsharesystems.com \
    --cc=roretzla@linux.microsoft.com \
    --cc=selwin.sebastian@amd.com \
    --cc=stable@dpdk.org \
    /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).