[dpdk-dev] [RFC v2 2/2] net/vhost_dma: add vHost DMA driver
Hu, Jiayu
jiayu.hu at intel.com
Wed Dec 18 04:11:24 CET 2019
Hi Maxime,
Replies are inline.
> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin at redhat.com>
> Sent: Tuesday, December 17, 2019 4:27 PM
> To: Hu, Jiayu <jiayu.hu at intel.com>; dev at dpdk.org
> Cc: Bie, Tiwei <tiwei.bie at intel.com>; Wang, Zhihong
> <zhihong.wang at intel.com>; Richardson, Bruce
> <bruce.richardson at intel.com>
> Subject: Re: [RFC v2 2/2] net/vhost_dma: add vHost DMA driver
>
> Hi Jiayu,
> > Here is an example.
> > $ ./testpmd -c f -n 4 \
> > --vdev
> 'dma_vhost0,iface=/tmp/sock0,queues=1,dmas=txq0 at 00:04.0,client=0'
>
> dma_vhost0 is not a good name, you have to mention it is net specific.
>
> Is there a tool to list available DMA engines?
Yes, you can use dpdk-devbind.py to list available DMA engines.
>
> >
> > Signed-off-by: Jiayu Hu <jiayu.hu at intel.com>
> > ---
> > config/common_base | 2 +
> > config/common_linux | 1 +
> > drivers/Makefile | 2 +-
> > drivers/net/Makefile | 1 +
> > drivers/net/vhost_dma/Makefile | 31 +
> > drivers/net/vhost_dma/eth_vhost.c | 1495
> ++++++++++++++++++++
> > drivers/net/vhost_dma/eth_vhost.h | 264 ++++
> > drivers/net/vhost_dma/internal.h | 225 +++
> > .../net/vhost_dma/rte_pmd_vhost_dma_version.map | 4 +
> > drivers/net/vhost_dma/virtio_net.c | 1234 ++++++++++++++++
> > mk/rte.app.mk | 1 +
> > 11 files changed, 3259 insertions(+), 1 deletion(-)
> > create mode 100644 drivers/net/vhost_dma/Makefile
> > create mode 100644 drivers/net/vhost_dma/eth_vhost.c
> > create mode 100644 drivers/net/vhost_dma/eth_vhost.h
> > create mode 100644 drivers/net/vhost_dma/internal.h
> > create mode 100644
> drivers/net/vhost_dma/rte_pmd_vhost_dma_version.map
> > create mode 100644 drivers/net/vhost_dma/virtio_net.c
>
> You need to add Meson support.
Will add meson build later.
>
>
> More generally, I have been through the series and I'm not sure having a
> dedicated PMD driver for this is a good idea due to all the code
> duplication it implies.
>
> I understand it has been done this way to avoid impacting the pure SW
> datapath implementation. But I'm sure the series could be reduced to a
> few hundred of lines if it was integrated in vhost-user library.
> Moreover, your series does not support packed ring, so it means even
> more code would need to be duplicated in the end.
Yes, providing a new PMD is to avoid impacting vhost library. To avoid
too much duplicated code, we can just provide a separate DMA accelerated
data-path in vhost-user PMD, rather than introducing a new PMD. How
do you think?
Thanks,
Jiayu
>
> What do you think?
>
> Thanks,
> Maxime
More information about the dev
mailing list