From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AA0B1425A5; Fri, 15 Sep 2023 15:02:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6A45340A72; Fri, 15 Sep 2023 15:02:25 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 0B63C400D5 for ; Fri, 15 Sep 2023 15:02:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694782942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=omYgEd8cY2BWwe9HQ7xNyIga+TMbuZjxk8s3rXMd8jI=; b=OI7K65+D9KC6aOo2GxZpIyPjqfrIuyxXviDiTwSwuAq04pPK63zW3ANzzML1gUJSvKbynK 7qF4MIC3UJSxZO5bOROGNffopeCevcdNzS2xIcal2EeYxijQipug72lyp4bGfkBNTj7zo/ LvsKPI4V7A9YUXh1ZcRt981sQF88itQ= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-216-w9sx8gxMOlCNwb3zyDmoug-1; Fri, 15 Sep 2023 09:02:21 -0400 X-MC-Unique: w9sx8gxMOlCNwb3zyDmoug-1 Received: by mail-lj1-f199.google.com with SMTP id 38308e7fff4ca-2bce36a1628so25872721fa.1 for ; Fri, 15 Sep 2023 06:02:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694782939; x=1695387739; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=omYgEd8cY2BWwe9HQ7xNyIga+TMbuZjxk8s3rXMd8jI=; b=n8gtUOUDc4Y131mjnCQd3uVAL0HoVGTe3sSJUuwdz3m7niubS48e9UNtWiSOG6ygCg NvE7OHLwfF2Ts104OynkXe2Scs768qCitrtmaIDIATucYyyGaPAik2D/SgOZnI7N1qNC Vp0a6Jv7eLXVPAUkbXlyRp0VCiWXi7TeL99XjUrXO8FZfLjEJktXfWZrO0ihC9iit5ea OI/fqtY54Js68/ckOWb9/Ie7IgBLOGE8mMqcllpbI29RB1uBm+2sr7c8u9JDOQ09Ehy7 kE2zZhYDtQChFkIw5nTOC/0cDCwrfdNQbjXbl5hfUXQswiZxDseh01bVm7pvaX/6L+jk f+Ig== X-Gm-Message-State: AOJu0YzL/+ieaXV2gc5qiqUJvoqnbpAvv/4MYeBz6uyAqNagpJm6fLTp 9Qx1GaJODkIOF/606RA9nkBDRoDTR+SX6mY1pVqTUL/F1iEx4n1PiB+/Uh3eeblPFaerdMvtQl+ BYP7BDHvgnqDTW0RUTfU= X-Received: by 2002:a2e:9b4c:0:b0:2bd:1732:c10b with SMTP id o12-20020a2e9b4c000000b002bd1732c10bmr1426870ljj.34.1694782939496; Fri, 15 Sep 2023 06:02:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGG8br11Bv2pLMjsn4YP6nJ6FAxlJxnhhoBDBgQpBa55cMcVM3mebtCEIzAB/34sV2Wu/syQ9YlV3jAEc+0Tuw= X-Received: by 2002:a2e:9b4c:0:b0:2bd:1732:c10b with SMTP id o12-20020a2e9b4c000000b002bd1732c10bmr1426850ljj.34.1694782939164; Fri, 15 Sep 2023 06:02:19 -0700 (PDT) MIME-Version: 1.0 References: <20230831123131.4787-1-selwin.sebastian@amd.com> <1e1f06fd-c004-4612-90ba-c6322df27941@amd.com> In-Reply-To: <1e1f06fd-c004-4612-90ba-c6322df27941@amd.com> From: David Marchand Date: Fri, 15 Sep 2023 15:02:07 +0200 Message-ID: Subject: Re: [PATCH v1] net/axgbe: use CPUID to identify cpu To: Ferruh Yigit , Selwin Sebastian Cc: stable@dpdk.org, dev@dpdk.org, Bruce Richardson , Tyler Retzlaff , =?UTF-8?Q?Morten_Br=C3=B8rup?= X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, Sep 15, 2023 at 12:54=E2=80=AFPM Ferruh Yigit 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 disting= uish device") > > Cc: stable@dpdk.org > > > > Signed-off-by: Selwin Sebastian > > --- > > 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 > > + > > > > 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? --=20 David Marchand