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 4F1FE42BEF; Wed, 31 May 2023 10:04:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E972B4161A; Wed, 31 May 2023 10:04:05 +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 6C97440F18 for ; Wed, 31 May 2023 10:04:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685520243; 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=Idpcn2XXf+0Avyyk4dQhbj0nBJm5tOQlwDSoY47CKlM=; b=c97ajvqP4hgsAeX8DWjNu89XZXvbHq+ah5bqzYEgx8jzjI2uWKrehSL1dTKZGoj6IpDXb2 pxl+HrpRKswHhqqAZqhoz5MD6XmgUjBmgTAht2ngHpGUTFnh3Zt9keoegEEhyo0LMfzZmY 3E6hRINOSfOSF6g5NJZY3vAh5dCJbmk= Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-590-RIgA81zuNBihVHe2G8Y_QQ-1; Wed, 31 May 2023 04:04:02 -0400 X-MC-Unique: RIgA81zuNBihVHe2G8Y_QQ-1 Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-1b02cd4b829so4505735ad.1 for ; Wed, 31 May 2023 01:04:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685520241; x=1688112241; 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=Idpcn2XXf+0Avyyk4dQhbj0nBJm5tOQlwDSoY47CKlM=; b=CwLjwI3G25LrirufZKdqSYmYwqxmkLme6WtlM2iQH0MeBE9b618n6o+EZnnSUUgmyv tzANP8erUrB5WL73X8B27ITcyyHypO3AG0nw9b9pE+RhHZu5CnXtuyA7LI5laldAr1vC vDGpquC2WAgYHsvV/zaybB0m02IpjDl7SqYiWcvMVgkYnZWCncp42h3Kg4+kwH8Pujz2 6A96uTxFYjmUVAHQinUzYF6p1O0aMAy7mx22nY5tTiLPI/7FcWIJ57Cjfnge83vup1DR PJl397eSPaDuHNYo5D0O++oNJvlnHhH0oSUr3f5FV8Vu3n8mtUVMQkDgqEwxJkdz8QPq O80Q== X-Gm-Message-State: AC+VfDx+iV75JSFvhkCeMWfFap43DKQvIZQLOMv4tE6ucH8zXm2hSciy Gqmj20HDdvI0r2irZrGE/PG1GRSOlc4cIqZby5xWNNevcctLQQTwfgf7YSy/cwNnBxkvSSRjCv0 ctA+OaN7n5GtG/dLKuFY= X-Received: by 2002:a17:903:120b:b0:1af:e10f:ba96 with SMTP id l11-20020a170903120b00b001afe10fba96mr5423436plh.1.1685520241231; Wed, 31 May 2023 01:04:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5urDsP0mgiVyUcBE5shG7vd1ooeElgasNPnDBQoDJDEMAkAqDpVR6IjKEl2oHT4880Z6qwsKorfhxPewuA3a8= X-Received: by 2002:a17:903:120b:b0:1af:e10f:ba96 with SMTP id l11-20020a170903120b00b001afe10fba96mr5423426plh.1.1685520240956; Wed, 31 May 2023 01:04:00 -0700 (PDT) MIME-Version: 1.0 References: <20230530114202.850814-1-eagostini@nvidia.com> In-Reply-To: <20230530114202.850814-1-eagostini@nvidia.com> From: David Marchand Date: Wed, 31 May 2023 10:03:49 +0200 Message-ID: Subject: Re: [PATCH v1] bus/pci: get PCI address from rte_device To: eagostini@nvidia.com Cc: dev@dpdk.org, thomas@monjalon.net, bingz@nvidia.com 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 Tue, May 30, 2023 at 1:48=E2=80=AFPM wrote: > > From: Elena Agostini > > 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 (no need to Cc: stable, I removed it) I would prefer we don't add specific bus API when there is an alternative. 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 consistent: - devarg case https://git.dpdk.org/dpdk/tree/drivers/bus/pci/pci_common.c#n= 112 + 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? --=20 David Marchand