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 ED23942BEF; Wed, 31 May 2023 10:47:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CB1CA4282D; Wed, 31 May 2023 10:47:45 +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 D7FBA427F2 for ; Wed, 31 May 2023 10:47:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685522863; 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=ASi4S/WdH8c/1IvxxJnbZV8nF97QPHsinmFC6HuU+e4=; b=OnSOjEAf1+F8XDMd/FhNUikHIMxOP7e/uZZq5/BRDBeAou2X7CtveXUSTXN85PKKkihrLc 9RH3u21iaa3xnG8JyUj2LPUUoVp9HpNKOhOqFO7jEyHKCO491Gycc9baRiyW3R718vQ6O4 +qV9QGrWqkPyLu4iQoCF3pKv9Ze4WX0= Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-271-NyMGSp7dO267sb18Qg1DGQ-1; Wed, 31 May 2023 04:47:42 -0400 X-MC-Unique: NyMGSp7dO267sb18Qg1DGQ-1 Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-2566a1a11d0so3704440a91.3 for ; Wed, 31 May 2023 01:47:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685522861; x=1688114861; 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=ASi4S/WdH8c/1IvxxJnbZV8nF97QPHsinmFC6HuU+e4=; b=XN2IC1GzTYBRW2NDTjFq6ShV9vwZ9PixQPWhB8enbDEO6mpcBI/dgmp1e0sPmEZv1e 9OdOoNphWzCz2PEY+b1Vxjj+OLJJMzqJH3fAyQmH7+mhJlYDLgL59ovFia75dxEasDZM Sp0odq1woPlmW+6LxsnSPLARND+mCsMJpXfwO4bAjG+rq0kCMX7Pw/1G98RSnfqO2RPx XAplCw6PG7ZPS+ff853cuK2JfUb02wIkYiVDX6wW9rrzzF+FMayejR0t60THg8CwC+pb UE+eVT6JhWjPhBpvzcY+YGooRDgNjuWx1yr7QsSFy26Y8Xv/XgDVyjNFB4gMxjKc0QcK gxKA== X-Gm-Message-State: AC+VfDyZkGvS68wjUInUi2G97/s5JR3E9gk+U3Ihdbpc6rZxpx/5mSfU KxAZMQhI2OLYPblGMECO1OQAyAToLd+9uyiiU0NGbsWvr634idtSyuJL8/3uMdHE1bVWQ8YBH7l LKrEWn+6LVcQpfd3QgnI= X-Received: by 2002:a17:90a:4590:b0:247:26da:5de2 with SMTP id v16-20020a17090a459000b0024726da5de2mr4887374pjg.20.1685522861200; Wed, 31 May 2023 01:47:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6zNKC+HnYrFO9oH2WhIg2Q3nj2oj3ZuI/O3UHlgbvJlOrf40/DB3NX/tO4BMEOX0QXwC7ABOXsJW2iFzvtGHY= X-Received: by 2002:a17:90a:4590:b0:247:26da:5de2 with SMTP id v16-20020a17090a459000b0024726da5de2mr4887364pjg.20.1685522860937; Wed, 31 May 2023 01:47:40 -0700 (PDT) MIME-Version: 1.0 References: <20230530114202.850814-1-eagostini@nvidia.com> In-Reply-To: From: David Marchand Date: Wed, 31 May 2023 10:47:29 +0200 Message-ID: Subject: Re: [PATCH v1] bus/pci: get PCI address from rte_device To: Elena Agostini Cc: "dev@dpdk.org" , "NBU-Contact-Thomas Monjalon (EXTERNAL)" , Bing Zhao 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 Wed, May 31, 2023 at 10:44=E2=80=AFAM Elena Agostini wrote: > > > On Tue, May 30, 2023 at 1:48=E2=80=AFPM eagostini@nvidia.com wrote: > > > > > > > > From: Elena Agostini eagostini@nvidia.com > > > > > > > > In DPDK 22.11 pci bus related structure have been hidden internally > > > > so the application doesn't have a direct access to those info anymore= . > > > > > > > > This patch introduces a get function to retrieve a PCI address > > > > from an rte_device handler. > > > > > > > > Signed-off-by: Elena Agostini eagostini@nvidia.com > > > > > > (no need to Cc: stable, I removed it) > > > > > > I would prefer we don't add specific bus API when there is an alternati= ve. > > > > > > The PCI address is already reported as a string in the generic device > > > object name. > > > I checked the different ways this name is set and afaics, it is consist= ent: > > > - devarg case https://git.dpdk.org/dpdk/tree/drivers/bus/pci/pci_common= .c#n112 > > > + https://git.dpdk.org/dpdk/tree/drivers/bus/pci/pci_params.c#n117 > > > - no devarg case > > > https://git.dpdk.org/dpdk/tree/drivers/bus/pci/pci_common.c#n115 + > > > https://git.dpdk.org/dpdk/tree/drivers/bus/pci/pci_common.c#n100 > > > > > > Would that be enough for your usecase? > > > > No as I need to parse anyway the PCI address string in the form of domain= /bus/devid/function. I am curious. Can you explain why you would need such information? > > Also, the device name can be changed as it=E2=80=99s exposed to applicati= on level. ? If you mean the application can bust the device name, well, it's the application problem. --=20 David Marchand