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 01A6CA0C41; Wed, 15 Sep 2021 13:06:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DF08D4003F; Wed, 15 Sep 2021 13:06:08 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id F3CEA4003C for ; Wed, 15 Sep 2021 13:06:07 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10107"; a="283286855" X-IronPort-AV: E=Sophos;i="5.85,295,1624345200"; d="scan'208";a="283286855" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2021 04:06:07 -0700 X-IronPort-AV: E=Sophos;i="5.85,295,1624345200"; d="scan'208";a="544795410" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.4.180]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 15 Sep 2021 04:06:04 -0700 Date: Wed, 15 Sep 2021 12:06:00 +0100 From: Bruce Richardson To: Maxime Coquelin Cc: Kevin Laatz , dev@dpdk.org, fengchengwen@huawei.com, jerinj@marvell.com, conor.walsh@intel.com Message-ID: References: <20210903105001.1179328-1-kevin.laatz@intel.com> <20210908103016.1661914-1-kevin.laatz@intel.com> <20210908103016.1661914-5-kevin.laatz@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [dpdk-dev] [PATCH v3 04/17] dma/idxd: add bus device probing 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 Sender: "dev" On Wed, Sep 15, 2021 at 12:12:34PM +0200, Maxime Coquelin wrote: > Hi Kevin, > > On 9/8/21 12:30 PM, Kevin Laatz wrote: > > Add the basic device probing for DSA devices bound to the IDXD kernel > > driver. These devices can be configured via sysfs and made available to > > DPDK if they are found during bus scan. Relevant documentation is included. > > > > Signed-off-by: Bruce Richardson > > Signed-off-by: Kevin Laatz > > --- > > doc/guides/dmadevs/idxd.rst | 64 +++++++ > > drivers/dma/idxd/idxd_bus.c | 352 +++++++++++++++++++++++++++++++++++ > > drivers/dma/idxd/meson.build | 1 + > > 3 files changed, 417 insertions(+) > > create mode 100644 drivers/dma/idxd/idxd_bus.c > > > > Sorry if it has been asked before, but what is the reason this DSA bus > driver is not in drivers/bus/? > This bus-driver solution came out of discussion previously when we were looking to add DSA support to the ioat driver. Individual device drivers of any class cannot themselves do any probing to discover devices, but only bus drivers can do that. Therefore, to enable discovery of DSA devices used by the kernel driver, a custom bus driver is necessary. Since this bus driver only supports discovery of DSA devices using a single driver type behind the scenes (referred to in previous discussions as a "singleton" bus driver), it's kept in with the rest of the DSA driver code. It's not a full bus driver, more a minimal driver whose job it is to scan /dev/dsa and initialise the proper DSA/idxd driver. So we could move it to /dev/bus, but I think it would lead to overall higher maintenance and I fail to see any real benefits. /Bruce