From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v3 2/4] net/mrvl: add mrvl net pmd driver Date: Tue, 10 Oct 2017 23:25:38 +0200 Message-ID: <4053752.6hKTFdWHEG@xps> References: <1506594158-15721-2-git-send-email-tdu@semihalf.com> <20171005084333.GA20961@tdu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Ferruh Yigit , mw@semihalf.com, dima@marvell.com, nsamsono@marvell.com, Jianbo.liu@linaro.org, Jacek Siuda To: Tomasz Duszynski Return-path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 473451B239 for ; Tue, 10 Oct 2017 23:25:40 +0200 (CEST) In-Reply-To: <20171005084333.GA20961@tdu> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 05/10/2017 10:43, Tomasz Duszynski: > On Wed, Oct 04, 2017 at 05:59:11PM +0100, Ferruh Yigit wrote: > > On 10/4/2017 9:59 AM, Tomasz Duszynski wrote: > > > On Wed, Oct 04, 2017 at 01:24:27AM +0100, Ferruh Yigit wrote: > > >> On 10/3/2017 12:51 PM, Tomasz Duszynski wrote: > > >>> Add support for the Marvell PPv2 (Packet Processor v2) 1/10 Gbps adapter. > > >>> Driver is based on external, publicly available, light-weight Marvell > > >>> MUSDK library that provides access to network packet processor. [...] > > >>> +static struct rte_vdev_driver pmd_mrvl_drv = { > > >>> + .probe = rte_pmd_mrvl_probe, > > >>> + .remove = rte_pmd_mrvl_remove, > > >>> +}; > > >>> + > > >>> +RTE_PMD_REGISTER_VDEV(net_mrvl, pmd_mrvl_drv); > > >> > > >> Please help me understand. > > >> > > >> This driver implemented as virtual driver, because: > > >> With the help of custom kernel modules, musdk library already provides > > >> userspace datapath support. This PMD is an interface to musdk library. > > >> Is this correct? > > > That is right. Another reason this NIC is not PCI device. > > > > We support more bus now :). Out of curiosity, which bus is device on? > > Bus is called Aurora2. That's proprietary SoC interconnect fabric. So you should provide drivers/bus/aurora2/. It would do a software scan of devices (probably looking in sysfs). Then the probe function is nearly the same as with vdev init. It could provide a better user experience by removing the need of explicit declaration of devices. It will allow to be integrated in a more generic whitelist/blacklist mechanism. And having such well defined bus code and objects will probably help in your future developments.