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 355AE42BF3; Wed, 31 May 2023 11:53:10 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1701F40ED7; Wed, 31 May 2023 11:53:10 +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 1E20640A82 for ; Wed, 31 May 2023 11:53:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685526787; 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=X45Gm0oTCPQDcvDD+P80WxNwI8OwC7HOKQa/VUjPo10=; b=LDcjNB1AAFbiR/6Y7OnzduUKs3r3+FwVZsJqYSopz8UR39sVs4bw/tVPRBoXKVV14JvACg vH/umXRad8ZqyC+9AV0FQDZJ4jhZCpF1PaVEPyUGn9VaXXK6/xlhLiEAFe8avXFX3reS7p ONZQfxQV3zVPYYFRH8cKDSP1e3WDxlk= Received: from mail-oi1-f199.google.com (mail-oi1-f199.google.com [209.85.167.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-586-rkPcvXPEOPC2JXO9OFzxiw-1; Wed, 31 May 2023 05:53:05 -0400 X-MC-Unique: rkPcvXPEOPC2JXO9OFzxiw-1 Received: by mail-oi1-f199.google.com with SMTP id 5614622812f47-39436d8cb6eso3800876b6e.2 for ; Wed, 31 May 2023 02:53:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685526785; x=1688118785; 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=X45Gm0oTCPQDcvDD+P80WxNwI8OwC7HOKQa/VUjPo10=; b=YcWLUmKTLQi7MqLgFLoAO/aqKcqrAvI9oRHp9+Vl5b/7muWrPur9i1N3xRQm0HBMjB p2DCCeNN3ylDPiYmA3z5xO0VDzS45CPvTJHU5ImF2yi7//PK59hIlFV1Qqxh8w1awsav gv5ahV5NAjhN13zIsIyQuoKW3PCcStTBSTj3Ww5GEf5FCMbZB8ab6ot3c528NbRrNNpN KDAmbJ4PKzqjTOfWVrOU6HoC7MoNobKviHRnEyVOgHmKs4D5R66aUcBFYvjRRWUQEIod Mh0GzM6A8vJRH/vd9QJpv8fSYM7BvWK12Npjgr6L+0UQRMRsEDVgqYLB0z+9ZkeB30QA 53EA== X-Gm-Message-State: AC+VfDy04ewzWEW48PBZltDYPsH1HTvdZHOc0sZWUmAKddaiTNKE+VA/ 5ftMvWurlkyxGQ6B5G5Ly1YA3CoPsp0uWeTVj9uY0wy9q2tiyEA9URbttJPT50Z7BUN5T7oTJEp ZI4tk2RGvoFLk4jSBfpk= X-Received: by 2002:a05:6808:1b09:b0:383:ca99:c70e with SMTP id bx9-20020a0568081b0900b00383ca99c70emr4371242oib.59.1685526785296; Wed, 31 May 2023 02:53:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5/gItovew14DsUkZ/SbrXgDs3tnxjhTXVeXXtwCN+4nkJ76Jwlcu8VFbokO1Y918by6B+PY7TIvVMPYJFpl4s= X-Received: by 2002:a05:6808:1b09:b0:383:ca99:c70e with SMTP id bx9-20020a0568081b0900b00383ca99c70emr4371223oib.59.1685526785071; Wed, 31 May 2023 02:53:05 -0700 (PDT) MIME-Version: 1.0 References: <20230530114202.850814-1-eagostini@nvidia.com> In-Reply-To: From: David Marchand Date: Wed, 31 May 2023 11:52:53 +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 (I reformatted the mail a bit) On Wed, May 31, 2023 at 10:51=E2=80=AFAM Elena Agostini wrote: > > On Wed, May 31, 2023 at 10:44=E2=80=AFAM Elena Agostini eagostini@nvidi= a.com 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 internal= ly > > > > > so the application doesn't have a direct access to those info any= more. > > > > > This patch introduces a get function to retrieve a PCI address > > > > > from an rte_device handler. > > > > > Signed-off-by: Elena Agostini eagostini@nvidia.com > > > > I would prefer we don't add specific bus API when there is an alter= native. > > > > The PCI address is already reported as a string in the generic devi= ce > > > > object name. > > > > Would that be enough for your usecase? > > > No as I need to parse anyway the PCI address string in the form of do= main/bus/devid/function. > > I am curious. Can you explain why you would need such information? > Use-case is the Aerial 5G where two processes have to exchange info > about PCI devices sending messages according to some specific format. It seems strange that different processes need to exchange this bus level information. For dataplane, having a simpler metadata (like a portid maybe?) is better than a domain/bus/devid/function quartet. For controlplane, having an abstraction or a human readable string is probably better too. In any case, for what you request here, the application can parse the generic device name into a rte_pci_addr via rte_pci_addr_parse(). Is it not enough? --=20 David Marchand