DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] bus/pci: resolve multiple NICs address conflicts
       [not found] <1572680245-89705-1-git-send-email-dengxiaofeng@huawei.com>
@ 2019-11-04  6:31 ` Wangyu (Turing Solution Development Dep)
  0 siblings, 0 replies; only message in thread
From: Wangyu (Turing Solution Development Dep) @ 2019-11-04  6:31 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, Linuxarm, humin (Q), Liyuan (Larry), dengxiaofeng

NIC address conflicts on 64K pagesize when using multiple NICs, as system will mmap 64K pagesize for NIC, but dev->mem_resource[i].len is 16K.

Signed-off-by: Beard-627 <dengxiaofeng@huawei.com>
Acked-by: Eric wang <seven.wangyu@huawei.com>
Acked-by: Wei Hu <xavier.huwei@huawei.com>
Acked-by: Min Hu <humin29@huawei.com>
---
 drivers/bus/pci/linux/pci.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c index 43debaa..afaa68d 100644
--- a/drivers/bus/pci/linux/pci.c
+++ b/drivers/bus/pci/linux/pci.c
@@ -201,6 +201,11 @@
 		if (flags & IORESOURCE_MEM) {
 			dev->mem_resource[i].phys_addr = phys_addr;
 			dev->mem_resource[i].len = end_addr - phys_addr + 1;
+			if (dev->mem_resource[i].len <
+				(unsigned int)getpagesize())
+
+				dev->mem_resource[i].len =
+					(unsigned int)getpagesize();
 			/* not mapped for now */
 			dev->mem_resource[i].addr = NULL;
 		}
--
1.8.3.1

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-11-04  6:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1572680245-89705-1-git-send-email-dengxiaofeng@huawei.com>
2019-11-04  6:31 ` [dpdk-dev] [PATCH] bus/pci: resolve multiple NICs address conflicts Wangyu (Turing Solution Development Dep)

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