On Fri, Dec 06, 2019 at 11:04:43AM +0100, Maxime Coquelin wrote: > On 12/6/19 10:05 AM, Andrew Rybchenko wrote: > > On 12/6/19 8:32 AM, Liang, Cunming wrote: > >>> -----Original Message----- > >>> From: Bie, Tiwei <tiwei....@intel.com> > >>> Sent: Friday, December 6, 2019 12:28 PM > >>> To: Matan Azrad <ma...@mellanox.com> > >>> Cc: Wang, Xiao W <xiao.w.w...@intel.com>; Thomas Monjalon > >>> <tho...@monjalon.net>; maxime.coque...@redhat.com; Wang, Zhihong > >>> <zhihong.w...@intel.com>; Yigit, Ferruh <ferruh.yi...@intel.com>; Shahaf > >>> Shuler > >>> <shah...@mellanox.com>; Ori Kam <or...@mellanox.com>; dev@dpdk.org; Slava > >>> Ovsiienko <viachesl...@mellanox.com>; Asaf Penso <as...@mellanox.com>; > >>> Olga > >>> Shern <ol...@mellanox.com>; Liang, Cunming <cunming.li...@intel.com> > >>> Subject: Re: discussion: creating a new class for vdpa > >>> driversxiao.w.w...@intel.com > >>> > >>> On Thu, Dec 05, 2019 at 01:26:36PM +0000, Matan Azrad wrote: > >>>> Hi all > >>>> > >>>> As described in RFC “[RFC] net: new vdpa PMD for Mellanox devices”, a > >>>> new vdpa drivers is going to be added for Mellanox devices – mlx5_vdpa > >>>> > >>>> The only vdpa driver now is the IFC driver that is located in net > >>>> directory. > >>>> > >>>> The IFC driver and the new mlx5_vdpa driver provide the vdpa ops and > >>>> not the eth_dev ops. > >>>> > >>>> All the others drivers in net provide the eth-dev ops. > >>>> > >>>> I suggest to create a new class for vdpa drivers, to move IFC to this > >>>> class and to add the mlx5_vdpa to this class too. > >>>> > >>>> Later, all the new drivers that implements the vdpa ops will be added > >>>> to the vdpa class. > >>> > >>> +1. Sounds like a good idea to me. > >> +1 > > > > vDPA drivers are vendor-specific and expected to talk to vendor > > NIC. I.e. there are significant chances to share code with > > network drivers (e.g. base driver). Should base driver be moved > > to drivers/common in this case or is it still allows to have > > vdpa driver in drivers/net together with ethdev driver? > > > > That's a good point. > > For example, for the Virtio vDPA driver, I placed it in th Virtio PMD > directory, so that we can re-use the Virtio-pci layer. > On the other hand, for the specific Virtio case, it may be preferable > to have a common directory. Doing that, the Virtio-pci layer could be > reused by Virtio PMD, Virtio vDPA, but also Virtio Crypto drivers.
For the virtio case, I also prefer to have a common directory to allow different virtio drivers to share the virtio-pci layer. Thanks, Tiwei > > I plan to submit again my Virtio vDPA next week as it didn't make it in > v19.11. I'll wait for an agreement on this topic before proceeding. > > Thanks, > Maxime >