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 40925425A5 for ; Fri, 15 Sep 2023 15:02:24 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3A8AE400D5; Fri, 15 Sep 2023 15:02:24 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id C690C40041 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-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-201-Z7ENRaMHNLq1rIA-2ivjMw-1; Fri, 15 Sep 2023 09:02:20 -0400 X-MC-Unique: Z7ENRaMHNLq1rIA-2ivjMw-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2bcc2fd542bso25776921fa.3 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=d8uHohDilgZeBFLhtu/0wXb5JQ4bE1vNu8ZlobialPDXyEbvY8QGaveQ0/utUL9NtM bjsGFOgMp9c8Q0Oz9Rddf6NKYmu568uOHRvkC1b/wZfrmqUb8/brURp333A7I28c7TJx L6oIoyFYsEE3aNIoa07oMjMNuAKj9xfaPeXAGTiOV7ek2x6QIy/clZ79IPVn5nk/PRRG bMzCCaRL/DT9TxFk/AvGmYzFIz3DR1u+p1whDNUIDk/5WkaAT65QXfL18KCLLqaLRuAF eztcBHuLEu17IQswF4d2akv5fM/dgWO2iJnJ0QQhkG0P+wm2TB48saGWz8DvevjeIz0c hAYg== X-Gm-Message-State: AOJu0YxQtwD+PeQ+Yx/39ur9B7ExCo9badW/SAMGec1lXVtNLSeKKlkF KpDZ88xhmWjkds6Byv370Emxrvkq+PB6hVXFaSWKk4XCO1zQ27Oql7wivDlnDJPJSqE0v2XWfRW ZtYXlntBuq0pLabM9d1dlAJc= X-Received: by 2002:a2e:9b4c:0:b0:2bd:1732:c10b with SMTP id o12-20020a2e9b4c000000b002bd1732c10bmr1426873ljj.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: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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