DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [RFC] pci: force address of mappings in secondary process
@ 2017-07-11  1:12 Stephen Hemminger
  2017-07-11  1:56 ` Tan, Jianfeng
  0 siblings, 1 reply; 11+ messages in thread
From: Stephen Hemminger @ 2017-07-11  1:12 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

The PCI memory resources in the secondary process should be in
the exact same location as the primary process. Otherwise
there is a risk of a stray pointer.

Not sure if this is right, but it looks like a potential
problem.

---
 lib/librte_eal/common/eal_common_pci_uio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/eal_common_pci_uio.c b/lib/librte_eal/common/eal_common_pci_uio.c
index 367a6816dcb8..2156b1a436c4 100644
--- a/lib/librte_eal/common/eal_common_pci_uio.c
+++ b/lib/librte_eal/common/eal_common_pci_uio.c
@@ -77,7 +77,7 @@ pci_uio_map_secondary(struct rte_pci_device *dev)
 
 			void *mapaddr = pci_map_resource(uio_res->maps[i].addr,
 					fd, (off_t)uio_res->maps[i].offset,
-					(size_t)uio_res->maps[i].size, 0);
+					(size_t)uio_res->maps[i].size, MAP_FIXED);
 			/* fd is not needed in slave process, close it */
 			close(fd);
 			if (mapaddr != uio_res->maps[i].addr) {
-- 
2.11.0

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

end of thread, other threads:[~2019-01-28 10:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-11  1:12 [dpdk-dev] [RFC] pci: force address of mappings in secondary process Stephen Hemminger
2017-07-11  1:56 ` Tan, Jianfeng
2017-07-11 11:35   ` Sergio Gonzalez Monroy
2017-07-11 20:00     ` Stephen Hemminger
2017-07-12  7:24       ` Sergio Gonzalez Monroy
2017-07-12  2:45     ` Tan, Jianfeng
2017-07-12  7:31       ` Sergio Gonzalez Monroy
2017-07-12  8:58         ` Tan, Jianfeng
2019-01-23 19:21           ` Ferruh Yigit
2019-01-23 20:37             ` Stephen Hemminger
2019-01-28  9:59               ` 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).