From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Wu, Jingjing" Subject: Re: [PATCH v10 3/3] iFPGA: Add Intel FPGA BUS Rawdev Driver Date: Thu, 10 May 2018 09:21:07 +0000 Message-ID: <9BB6961774997848B5B42BEC655768F81108ED12@SHSMSX103.ccr.corp.intel.com> References: <1521553556-62982-1-git-send-email-rosen.xu@intel.com> <1525851801-16101-1-git-send-email-rosen.xu@intel.com> <1525851801-16101-4-git-send-email-rosen.xu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "Xu, Rosen" , "Zhang, Roy Fan" , "Doherty, Declan" , "Richardson, Bruce" , "shreyansh.jain@nxp.com" , "Yigit, Ferruh" , "Ananyev, Konstantin" , "Zhang, Tianfei" , "Liu, Song" , "Wu, Hao" , "gaetan.rivet@6wind.com" , "Wu, Yanglong" To: "Xu, Rosen" , "dev@dpdk.org" , "thomas@monjalon.net" Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id B10CCD5C0 for ; Thu, 10 May 2018 11:21:13 +0200 (CEST) In-Reply-To: <1525851801-16101-4-git-send-email-rosen.xu@intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, Rosen Few comments below. Thanks Jingjing [...] > +static int > +ifpga_rawdev_start(struct rte_rawdev *dev) > +{ > + int ret =3D 0; > + struct opae_adapter *adapter; > + > + IFPGA_RAWDEV_PMD_FUNC_TRACE(); > + > + RTE_FUNC_PTR_OR_ERR_RET(dev, -EINVAL); > + > + adapter =3D ifpga_rawdev_get_priv(dev); > + if (!adapter) > + return -ENODEV; > + Set dev->started? > + return ret; > +} [...] > + > +static const struct rte_rawdev_ops ifpga_rawdev_ops =3D { > + .dev_info_get =3D ifpga_rawdev_info_get, > + .dev_configure =3D NULL, If go the declaration of rte_rawdev_configure, you will see "This function = must be invoked first before any other function in the API." So I think we need to function for it, even it does nothing. [...] > +static struct rte_pci_driver rte_ifpga_rawdev_pmd =3D { > + .id_table =3D pci_ifpga_map, > + .drv_flags =3D RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC, Is RTE_PCI_DRV_INTR_LSC supported? [...] > +static struct rte_vdev_driver ifpga_cfg_driver =3D { > + .probe =3D ifpga_cfg_probe, > + .remove =3D ifpga_cfg_remove, > +}; > + > +RTE_PMD_REGISTER_VDEV(net_ifpga_cfg, ifpga_cfg_driver); I think prefix net_ would mean the device is net device (eth_dev)? How abou= t to change the prefix to raw_? > +RTE_PMD_REGISTER_ALIAS(net_ifpga_cfg, ifpga_cfg); > +RTE_PMD_REGISTER_PARAM_STRING(net_ifpga_cfg, > + "bdf=3D " ifpga=3D? > + "port=3D " > + "afu_bts=3D"); > +