patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [RFC] Add support for device dma mask
@ 2018-06-26 17:37 Alejandro Lucero
  2018-06-26 17:37 ` [dpdk-stable] [PATCH 1/6] eal: add internal " Alejandro Lucero
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Alejandro Lucero @ 2018-06-26 17:37 UTC (permalink / raw)
  To: dev; +Cc: stable, anatoly.burakov

This RFC tries to handle devices with addressing limitations. NFP devices
4000/6000 can just handle addresses with 40 bits implying problems for handling
physical address when machines have more than 1TB of memory. But because how
iovas are configured, which can be equivalent to physical addresses or based on
virtual addresses, this can be a more likely problem.

I tried to solve this some time ago:

https://www.mail-archive.com/dev@dpdk.org/msg45214.html

It was delayed because there was some changes in progress with EAL device
handling, and, being honest, I completely forgot about this until now, when
I have had to work on supporting NFP devices with DPDK and non-root users.

I was working on a patch for being applied on main DPDK branch upstream, but
because changes to memory initialization during the last months, this can not
be backported to stable versions, at least the part where the hugepages iovas
are checked.

I realize stable versions only allow bug fixing, and this patchset could
arguably not be considered as so. But without this, it could be, although
unlikely, a DPDK used in a machine with more than 1TB, and then NFP using
the wrong DMA host addresses.

Although virtual addresses used as iovas are more dangerous, for DPDK versions
before 18.05 this is not worse than with physical addresses, because iovas,
when physical addresses are not available, are based on a starting address set
to 0x0. Since 18.05, those iovas can, and usually are, higher than 1TB, as they
are based on 64 bits address space addresses, and by default the kernel uses a
starting point far higher than 1TB.

This patchset applies to stable 17.11.3 but I will be happy to submit patches, if
required, for other DPDK stable versions.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-06-28 10:30 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-26 17:37 [dpdk-stable] [RFC] Add support for device dma mask Alejandro Lucero
2018-06-26 17:37 ` [dpdk-stable] [PATCH 1/6] eal: add internal " Alejandro Lucero
2018-06-26 17:37 ` [dpdk-stable] [PATCH 2/6] mem: add hugepages check Alejandro Lucero
2018-06-26 17:37 ` [dpdk-stable] [PATCH 3/6] eal: check hugepages within dma mask range Alejandro Lucero
2018-06-26 17:37 ` [dpdk-stable] [PATCH 4/6] mem: add function for setting internal dma mask Alejandro Lucero
2018-06-26 17:37 ` [dpdk-stable] [PATCH 5/6] ethdev: add function for " Alejandro Lucero
2018-06-26 17:37 ` [dpdk-stable] [PATCH 6/6] net/nfp: set " Alejandro Lucero
2018-06-27  8:17 ` [dpdk-stable] [RFC] Add support for device " Burakov, Anatoly
2018-06-27 10:13   ` Alejandro Lucero
2018-06-27 13:24     ` Burakov, Anatoly
2018-06-27 16:52       ` Alejandro Lucero
2018-06-28  8:54         ` Burakov, Anatoly
2018-06-28  9:56           ` Alejandro Lucero
2018-06-28 10:03             ` Burakov, Anatoly
2018-06-28 10:27               ` Alejandro Lucero
2018-06-28 10:30                 ` Burakov, Anatoly

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).