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 2ECFEA0542; Mon, 29 Aug 2022 11:20:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0FFC24069D; Mon, 29 Aug 2022 11:20:51 +0200 (CEST) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mails.dpdk.org (Postfix) with ESMTP id 1A72B40694 for ; Mon, 29 Aug 2022 11:20:49 +0200 (CEST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id CDD435C00D2; Mon, 29 Aug 2022 05:20:47 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 29 Aug 2022 05:20:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1661764847; x= 1661851247; bh=EKCq6y6eZPDZkmhl7vCq0dtKJUpa4b7F8BOFF7p4mW4=; b=n mH1R9VCeoeKIYvy5++FGv3ze80ErG8lyscxefHU64kBRi9mx+CPQsq5FzQnuz5HJ kzGRrOXqN3PQHozUVBZCI3pckroZ4hDCz66+CtiM1AYYymBsRrFgR/Uv4BPxqAoc FNKdHgEXq/S7EIH0LNf28wxD+QGRKxqdomD6CBtcHGmhAejQ9VVHnp1hAXoPrdsW M4o9qNe4X2kq4MtTdvYKpynQgmhj+41+7LO1VVbtSa0xl5CY0XLTgRDiTUbtb9rq BgrX9dgv4uF2za4s0I195/RA4bu2FniPoIm856xK/B7oXqjCqysotQTxGiGI1lpS /D6JOPPJ9cAm0ZYJghgnA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1661764847; x= 1661851247; bh=EKCq6y6eZPDZkmhl7vCq0dtKJUpa4b7F8BOFF7p4mW4=; b=h v90aXO2RoqpYhpPL7OYTzCFcEFrkJKWbxwHNR6pEZ+DxHCnM4w6+LNiC1GIlrjF9 1UtROpRfZL1XhKM49p7+LsQGveugv9wkyX0P6jSLQ+A5pSDoB1+g/IGieGWwFXqo /IlxOlWdf/oBRdSDBr+NKE36WUbyfnmCpeyp0ALo2s9TXrOv0iuWeRK3k2NRUuu7 VrKIhV4MhWZwggbt7t20zrt2GSzkPwh1pYvx3QXUa1LAXsq7DNkN2Kfb25OuJwid UJNyfMxPxeYGs3E2yG1Xvt7TB0SwZEQNHU5vuySz68EJj2ihclsSosQotIcdjUre 67fyKHFmfAa5L8fwE4KlQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdekuddgudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedtjeeiieefhedtfffgvdelteeufeefheeujefgueetfedttdei kefgkeduhedtgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 29 Aug 2022 05:20:46 -0400 (EDT) From: Thomas Monjalon To: Long Li , Ferruh Yigit , Viacheslav Ovsiienko , Matan Azrad Cc: David Marchand , "dev@dpdk.org" , Ajay Sharma , Stephen Hemminger Subject: Re: [Patch v4 01/17] net/mana: add basic driver, build environment and doc Date: Mon, 29 Aug 2022 11:20:45 +0200 Message-ID: <2197730.3ZeAukHxDK@thomas> In-Reply-To: <5e010c8f-2bb9-51a3-7e99-5eee27236228@xilinx.com> References: <1657324171-31369-1-git-send-email-longli@linuxonhyperv.com> <1857175.eGJsNajkDb@thomas> <5e010c8f-2bb9-51a3-7e99-5eee27236228@xilinx.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 Slava, Matan, what do you think? 29/08/2022 10:51, Ferruh Yigit: > On 8/29/2022 8:58 AM, Thomas Monjalon wrote: > > 22/08/2022 20:27, Long Li: > >>> On 8/22/2022 4:03 PM, Ferruh Yigit wrote: > >>>>> + ibv_list = ibv_get_device_list(&num_devices); > >>>>> + for (ibv_idx = 0; ibv_idx < num_devices; ibv_idx++) { > >>>>> + struct ibv_device *ibdev = ibv_list[ibv_idx]; > >>>>> + struct rte_pci_addr pci_addr; > >>>>> + > >>>>> + DRV_LOG(INFO, "Probe device name %s dev_name %s > >>>>> ibdev_path %s", > >>>>> + ibdev->name, ibdev->dev_name, > >>>>> +ibdev->ibdev_path); > >>>> > >>>> As far as I understand, intention of this loop is to find 'ibdev' > >>>> matching this device, code gooes through all "ibv device list" for > >>>> this, I wonder if there is a easy way for doing this, like a sysfs > >>>> entry to help getting this information? > >>>> And how mlx4/5 does this? > >>> > >>> Since there are multiple RDMA devices now, does it make sense to have > >>> RDMA bus driver, which can hide some PCIe details under bus, and driver can > >>> get PCI and ibdev information during probe? > >> > >> Mellanox drivers use a similar way to go through the list of IB devices. > >> > >> Matan, Viacheslav, what are your thoughts on implementing a bus for RDMA devices? > > > > These are PCI devices first. > > Is it a good idea to have a bus driver on top of another one? > > What would be the responsibility of such a bus driver? > > > > As far as I can see a 'ibdev' device struct is required to be able to > configure the device, so rdma bus can be on top of PCI and find matching > 'ibdev' device for it, and driver probe can get pci and ibdev > information directly, instead of each rdma device driver walking through > all ibdev devices (ibv_get_device_list()).