From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Alejandro Lucero <alejandro.lucero@netronome.com>
Cc: Jan Viktorin <viktorin@rehivetech.com>, dev@dpdk.org
Subject: Re: [dpdk-dev] [dpdk-dev, 2/3] eth_dev: add support for device dma mask
Date: Fri, 13 May 2016 15:49:23 +0200 [thread overview]
Message-ID: <1564181.pBqibqOBc3@xps13> (raw)
In-Reply-To: <CAD+H993xy7EBE8SyzFNEbp0Eb3L1BZra9cSCZJtSPD79fX3RjA@mail.gmail.com>
2016-05-13 09:38, Alejandro Lucero:
> On Thu, May 12, 2016 at 4:41 PM, Jan Viktorin <viktorin@rehivetech.com>
> > Alejandro Lucero <alejandro.lucero@netronome.com> wrote:
> > > On Thu, May 12, 2016 at 3:52 PM, Jan Viktorin <viktorin@rehivetech.com>
> > > > "Alejandro.Lucero" <alejandro.lucero@netronome.com> wrote:
> > > > > - New dma_mask field in rte_eth_dev_data.
> > > > > - If PMD sets device dma_mask, call to check hugepages within
> > > >
> > > > I think that one of the purposes of DPDK is to support DMA transfers
> > > > in userspace. In other words, I can see no reason to support dma_mask
> > > > at the ethdev level only.
> > > >
> > > > The limitation is a device limitation so I can not see a better place
> > for
> > > adding the device dma mask.
> >
> > That's what I've meant. It is a _device_ limitation. The ethdev is a
> > wrapper
> > around the rte_pci_device. The ethdev just extends semantics of the
> > generic device.
> > However, all DPDK devices are expected to be DMA-capable.
> >
> > If you get a pointer to the ethdev, you get a pointer to the
> > rte_pci_device as well
> > (1 more level of dereference but we are not on the fast path here, so it's
> > unimportant).
> >
> > Consider the cryptodev. If cryptodev has some DMA mask requirements we can
> > support it
> > in the generic place, i.e. rte_pci_device and not rte_ethdev because the
> > cryptodev
> > is not an ethdev.
> >
> Ok. I was wrongly assuming we had just ethdevs, with the ethdev being the
> generic and rte_pci_device being a type of ethdev.
>
> I can add the dma mask to the rte_pci_dev. The extra level of dereference
> is not a problem as long as we do not use that dma mask for a more complex
> allocation API (more about this later).
>
> If I understand it right, work is in progress for adding a rte_device. I
> can not see a problem with adding dma mask to the rte_device struct either.
>
> > > > We should consider adding this to the generic struct rte_device
> > > > (currently rte_pci_device). Thomas?
Yes
This patchset could be split in 2 discussions:
- ability to restrict the physical address range of requested memory,
see the memory allocation rework discussion:
http://dpdk.org/ml/archives/dev/2016-April/037444.html
- DMA range capability in a device, to be done on top of the EAL/device
rework in progress.
This feature is a good candidate for the roadmap of 16.11.
next prev parent reply other threads:[~2016-05-13 13:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-12 14:33 [dpdk-dev] [PATCH 0/3] add support for devices with addressing limitations Alejandro Lucero
2016-05-12 14:33 ` [dpdk-dev] [PATCH 1/3] eal/linux: add function for checking hugepages within device supported address range Alejandro Lucero
2016-05-12 15:11 ` [dpdk-dev] [dpdk-dev, " Jan Viktorin
2016-05-12 14:33 ` [dpdk-dev] [PATCH 2/3] eth_dev: add support for device dma mask Alejandro Lucero
2016-05-12 14:52 ` [dpdk-dev] [dpdk-dev, " Jan Viktorin
2016-05-12 15:03 ` Alejandro Lucero
2016-05-12 15:41 ` Jan Viktorin
2016-05-13 8:38 ` Alejandro Lucero
2016-05-13 13:49 ` Thomas Monjalon [this message]
2016-05-12 14:34 ` [dpdk-dev] [PATCH 3/3] nfp: set " Alejandro Lucero
2016-05-12 15:03 ` [dpdk-dev] [dpdk-dev,3/3] " Jan Viktorin
2016-05-12 15:13 ` Alejandro Lucero
2016-05-12 15:19 ` Jan Viktorin
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=1564181.pBqibqOBc3@xps13 \
--to=thomas.monjalon@6wind.com \
--cc=alejandro.lucero@netronome.com \
--cc=dev@dpdk.org \
--cc=viktorin@rehivetech.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).