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 697024266A; Wed, 4 Oct 2023 10:57:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 403534029A; Wed, 4 Oct 2023 10:57:04 +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 E0FF440289 for ; Wed, 4 Oct 2023 10:57:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696409822; 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=JdrNywU+QcRg7McY2J540eCOElVz71tisb/SA+57yhg=; b=FS2OtN1VvWMTSQekQcevBa6gfdI+/mgm9Aaxo5PKU46bK4tDv5rXJKV975s/7vbTx/n1Fq PzqvfnOOVKMKgpN6geOkj7HZwbIHXavGiNqKL6ceLPhhFzYW9pocbXpo0M68HWB/omHJec zV8m6bmnF36N1uZ/NEKyWLtL+BrOSIY= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-1-TC8HBIpIPS-bCcCvT-z7GQ-1; Wed, 04 Oct 2023 04:57:01 -0400 X-MC-Unique: TC8HBIpIPS-bCcCvT-z7GQ-1 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-5041ae34ce4so1674944e87.0 for ; Wed, 04 Oct 2023 01:57:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696409820; x=1697014620; 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=JdrNywU+QcRg7McY2J540eCOElVz71tisb/SA+57yhg=; b=civKqt87qJHP9YLOdzD3lSJU1wSjMD3WzoXfy8RyFcU8wOoWjmN14S5BWO2gCQ2PE+ cTjd1za/bxD75c/ZfOqHuJN+sAU22Fba6O7MTNNKcYnOUjYnNlfdLjusNhmDZdKE7ZpB QAYSCcFC39NwP3skYxzmHVaetrfh+XAoWz18KDfjAVZNsBzJ+7w4ih77ZtqaV9DkJf48 QK0QVpzC0A5ODyH3+TVHXDhdTNR3jmpwqa4l471tx/Gkrtx1rkpmTJ7CHh+kHDYJs+mf r8KqIxhFLQbz0G6fuNdr0/0qm9rmHZ76EyiMQSm+fHW4dkQJ1QgzvR4YWK2sEPgGH1Se 5ZrA== X-Gm-Message-State: AOJu0YyUV0jlInlELVnFrCV2AvAZF8RJqDKVQM2csTPJ4zEJMPNCQ5w6 Mh9389FIxOmmGExaFhqYKSle7rXQCCnyO2l1AkS/Pcg7+kmZYG+3aaTqJz7PHhzGIGtq1G9761z fizuq8TYEmhDqKGLpIw8= X-Received: by 2002:a05:6512:3f0e:b0:502:f7a4:c31f with SMTP id y14-20020a0565123f0e00b00502f7a4c31fmr1969091lfa.45.1696409819951; Wed, 04 Oct 2023 01:56:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGYvBa4dO5mGLZpDFlfj4pDB8wTWNkC8pKRXb8xpSvMfvJgCifB4QZU/aeHqfzI9NizG3GCi7Zcn4dQO70WljQ= X-Received: by 2002:a05:6512:3f0e:b0:502:f7a4:c31f with SMTP id y14-20020a0565123f0e00b00502f7a4c31fmr1969079lfa.45.1696409819571; Wed, 04 Oct 2023 01:56:59 -0700 (PDT) MIME-Version: 1.0 References: <20231003113938.42959-1-selwin.sebastian@amd.com> In-Reply-To: <20231003113938.42959-1-selwin.sebastian@amd.com> From: David Marchand Date: Wed, 4 Oct 2023 10:56:48 +0200 Message-ID: Subject: Re: [PATCH v2] net/axgbe: use CPUID to identify cpu To: Selwin Sebastian Cc: dev@dpdk.org, Ferruh.Yigit@amd.com, stable@dpdk.org 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 Hello Selwin, On Tue, Oct 3, 2023 at 1:40=E2=80=AFPM 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 distingui= sh device") > Cc: stable@dpdk.org > > Signed-off-by: Selwin Sebastian > --- > 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_e= thdev.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 > +#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). --=20 David Marchand