DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Hu, Jiayu" <jiayu.hu@intel.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "Bie, Tiwei" <tiwei.bie@intel.com>,
	"Wang, Zhihong" <zhihong.wang@intel.com>,
	"Richardson, Bruce" <bruce.richardson@intel.com>,
	Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>,
	Hemant Agrawal <hemant.agrawal@nxp.com>,
	"jerinj@marvell.com" <jerinj@marvell.com>,
	"Liang, Cunming" <cunming.liang@intel.com>
Subject: Re: [dpdk-dev] [RFC v2 2/2] net/vhost_dma: add vHost DMA driver
Date: Wed, 18 Dec 2019 02:51:08 +0000	[thread overview]
Message-ID: <ED946F0BEFE0A141B63BABBD629A2A9B3D02984E@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <f37f4e45-5c6b-67a8-5131-cd67a2e612f2@redhat.com>

Hi Maxime,

Thanks for your suggestions. Replies are inline.

> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> Sent: Tuesday, December 17, 2019 6:20 PM
> To: Hu, Jiayu <jiayu.hu@intel.com>; dev@dpdk.org
> Cc: Bie, Tiwei <tiwei.bie@intel.com>; Wang, Zhihong
> <zhihong.wang@intel.com>; Richardson, Bruce
> <bruce.richardson@intel.com>; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>; Hemant Agrawal
> <hemant.agrawal@nxp.com>; jerinj@marvell.com
> Subject: Re: [dpdk-dev] [RFC v2 2/2] net/vhost_dma: add vHost DMA driver
> 
> 
> >> The PMD has 4 parameters.
> >>  - iface: The parameter is used to specify a path to connect to a
> >>  	front end device.
> >>  - queues: The parameter is used to specify the number of the queues
> >>  	front end device has (Default is 1).
> >>  - client: The parameter is used to specify the vhost port working as
> >>  	client mode or server mode (Default is server mode).
> >>  - dmas: This parameter is used to specify the assigned DMA device
> >>  	of a queue.
> >>
> >> Here is an example.
> >> $ ./testpmd -c f -n 4 \
> >> --vdev
> 'dma_vhost0,iface=/tmp/sock0,queues=1,dmas=txq0@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?
> 
> Thinking at it again, wouldn't it be possible that the user doesn't
> specify a specific DMA device ID, but instead allocate one device
> at init time by specifying all the capabilities the DMA device need
> to match?
> 
> If no DMA device available with matching capabilities, then fallback to
> SW mode.

I think it’s a good way to allocate DMAs by capabilities, like NUMA node. But
the problem is how to express the relationship between queues and DMAs.
As RX/TX is per-queue basis, we need to know if a queue needs DMA acceleration
or not. Current vdev parameters explicitly specify which queue uses which
DMA; if we use DMA capability, will the parameters look too complex? Like
dmas={txq0@(numa0, other capabilities);txq1@(numa0, ...)}

Any suggestions?

> 
> Also, I think we don't want to call directly IOAT API directly here, but
> instead introduce a DMA library so that the Vhost DMA stuff isn't vendor
> specific.

As I know, all DMA engines in DPDK are implemented as rawdev and there is no
unified API for them. If it's necessary, we can provide a DMA library for them
in the future, so that more scenarios can benefit from the DMA engines.

IMO, vhost is one of consumers of the DMA engines, so the DMA library doesn't
have to be inside vhost; in addition, we just know IOAT can accelerate vhost, but
don't know about other DMA engines. Therefore, at this point, I think it's OK to
directly call IOAT API. Furthermore, we can replace IOAT specific API in vhost PMD,
if there is a DMA library in the future; as long as current vdev parameters
for DMA are generic enough, internal API replacement will not be visible to users.

How do you think?

Regards,
Jiayu

> 
> Adding a few ARM people in cc, to know whether they have plan/interrest
> in supporting DMA acceleration for Vhost.
> 
> Regards,
> Maxime
> 

  reply	other threads:[~2019-12-18  2:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-26 14:26 [dpdk-dev] [RFC 0/2] Add a PMD for I/OAT accelerated vhost-user Jiayu Hu
2019-09-26 14:26 ` [dpdk-dev] [RFC 1/2] vhost: populate guest memory for DMA-accelerated vhost-user Jiayu Hu
2019-12-17  7:18   ` Maxime Coquelin
2019-09-26 14:26 ` [dpdk-dev] [RFC 2/2] net/vhost_ioat: add vhost I/OAT driver Jiayu Hu
2019-11-01  8:54 ` [dpdk-dev] [RFC v2 0/2] Add a PMD for DMA-accelerated vhost-user Jiayu Hu
2019-11-01  8:54   ` [dpdk-dev] [RFC v2 1/2] vhost: populate guest memory " Jiayu Hu
2019-11-01  8:54   ` [dpdk-dev] [RFC v2 2/2] net/vhost_dma: add vHost DMA driver Jiayu Hu
2019-12-17  8:27     ` Maxime Coquelin
2019-12-17 10:20       ` Maxime Coquelin
2019-12-18  2:51         ` Hu, Jiayu [this message]
2019-12-18  3:11       ` Hu, Jiayu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ED946F0BEFE0A141B63BABBD629A2A9B3D02984E@shsmsx102.ccr.corp.intel.com \
    --to=jiayu.hu@intel.com \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=bruce.richardson@intel.com \
    --cc=cunming.liang@intel.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=jerinj@marvell.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=tiwei.bie@intel.com \
    --cc=zhihong.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).