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 C1368A0562; Mon, 3 May 2021 23:32:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 373F240150; Mon, 3 May 2021 23:32:09 +0200 (CEST) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by mails.dpdk.org (Postfix) with ESMTP id DBCB94014E for ; Mon, 3 May 2021 23:32:07 +0200 (CEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 9799F1826; Mon, 3 May 2021 17:32:06 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 03 May 2021 17:32:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm1; bh= CGXevhooXpn3ZSS7urJO2dfFmiF2TTqOQSkRcqW1Pjw=; b=IEN0HtQME4LwQ7sE SF3WS9sbtXZ8UUBv+e5Q30TuJlFAQA7CrmRDg2sGzPASx+T3YNSHV5JRmuYg52V7 hJaqi1/TKzndvoEo5uUYzSdgUH7eKmPJCJFbMGtD/HEqSOXZ1ZUflRHv6clCk1YC KcFcQmIZFkXyp2W1jeUYHq8vQf0gGqCeop/IUqNmnuyFWOsacwc2TKSZHuAyX3yu LeTalwxzp8Rdx4cCzBCugKsibuzPEQDbjS19Bl1P3yOEdBwD03VrblJ9HttGRVxH ph4Z6F39rT/S7PcwMgAj+JbWT92y1S45uI1rTS39oCgJAAn2p+LmdQDP8dmth2IP st5DfA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=CGXevhooXpn3ZSS7urJO2dfFmiF2TTqOQSkRcqW1P jw=; b=HqaZ6lV0WqFVT3tkKnYOnEAZlXbpqXR4360UyRy0Gw6ga8zIaPlINp5kq KSoIpul6quhKR1Cpzr8lDXWH2mdQ0ZUnJG6vg/y7c7aroJAYmfz3k/ZeGvyNPgHG KCSSrDfhUsjZ6NoYPbirqBOFAPpaaV2FggUMuRE1QnV7+JVEu2gqtRMJ7Xf4JzI2 SVuDO8AYGLYleiXbP/QODNeix+EPEPLbGS5bgsocAhBXRNMVWPE9DI4dP/Y4CXrL NI5X3wX3MVePNff3SwsxlY0ZKCMoR11NwuEaPvm0SdLIfo+IAAPvz1J4AmHHP1wL +qqPFFdCBJcrv35s3uRKR1mE9YZMw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdefgedgudeigecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdej ueeiiedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgr lhhonhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 3 May 2021 17:32:05 -0400 (EDT) From: Thomas Monjalon To: Bruce Richardson Cc: dev@dpdk.org, kevin.laatz@intel.com, sunil.pai.g@intel.com, jiayu.hu@intel.com Date: Mon, 03 May 2021 23:32:04 +0200 Message-ID: <3569712.0Jme0LqbK9@thomas> In-Reply-To: <20210430150637.362610-9-bruce.richardson@intel.com> References: <20210318182042.43658-1-bruce.richardson@intel.com> <20210430150637.362610-1-bruce.richardson@intel.com> <20210430150637.362610-9-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v4 08/12] raw/ioat: add bus driver for device scanning automatically 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" 30/04/2021 17:06, Bruce Richardson: > Rather than using a vdev with args, DPDK can scan and initialize the > devices automatically using a bus-type driver. This bus does not need to > worry about registering device drivers, rather it can initialize the > devices directly on probe. > > The device instances (queues) to use are detected from /dev with the > additional info about them got from /sys. > > Signed-off-by: Bruce Richardson > --- > --- a/doc/guides/rawdevs/ioat.rst > +++ b/doc/guides/rawdevs/ioat.rst > @@ -78,7 +78,7 @@ Example configuration for a work queue:: > > $ accel-config config-wq dsa0/wq0.0 --group-id=0 \ > --mode=dedicated --priority=10 --wq-size=8 \ > - --type=user --name=app1 > + --type=user --name=dpdk_app1 It looks to belong to commit "make workqueue name configurable in script". > Once the devices have been configured, they need to be enabled:: > > @@ -114,15 +114,18 @@ the device driver on the EAL commandline, via the ``allowlist`` or ``-a`` flag e > > $ dpdk-test -a ,max_queues=4 > > -If the device is bound to the IDXD kernel driver (and previously configured with sysfs), > -then a specific work queue needs to be passed to the application via a vdev parameter. > -This vdev parameter take the driver name and work queue name as parameters. > -For example, to use work queue 0 on Intel\ |reg| DSA instance 0:: > - > - $ dpdk-test --no-pci --vdev=rawdev_idxd,wq=0.0 > - > -Once probed successfully, the device will appear as a ``rawdev``, that is a > -"raw device type" inside DPDK, and can be accessed using APIs from the > +For devices bound to the IDXD kernel driver, > +the DPDK ioat driver will automatically perform a scan for available workqueues to use. > +Any workqueues found listed in ``/dev/dsa`` on the system will be checked in ``/sys``, > +and any which have ``dpdk_`` prefix in their name will be automatically probed by the > +driver to make them available to the application. > +Alternatively, to support use by multiple DPDK processes simultaneously, > +the value used as the DPDK ``--file-prefix`` parameter may be used as a workqueue name prefix, > +instead of ``dpdk_``, > +allowing each DPDK application instance to only use a subset of configured queues. > + > +Once probed successfully, irrespective of kernel driver, the device will appear as a ``rawdev``, > +that is a "raw device type" inside DPDK, and can be accessed using APIs from the > ``rte_rawdev`` library. [...] > --- a/drivers/raw/ioat/meson.build > +++ b/drivers/raw/ioat/meson.build > @@ -4,13 +4,13 @@ > build = dpdk_conf.has('RTE_ARCH_X86') > reason = 'only supported on x86' > sources = files( > + 'idxd_bus.c', > 'idxd_pci.c', > - 'idxd_vdev.c', > 'ioat_common.c', > 'ioat_rawdev.c', > 'ioat_rawdev_test.c', > ) > -deps += ['bus_pci', 'bus_vdev', 'mbuf', 'rawdev'] > +deps += ['bus_pci', 'mbuf', 'rawdev'] OK to remove the vdev dependency by creating a bus singleton. You may want to allow iterating devices of the bus by implementing .dev_iterate callback.