DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2] bus/pci: resolve multiple NICs address conflicts
@ 2019-11-05  7:26 Wangyu (Turing Solution Development Dep)
  2019-11-05 14:33 ` David Marchand
  0 siblings, 1 reply; 13+ messages in thread
From: Wangyu (Turing Solution Development Dep) @ 2019-11-05  7:26 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>
Signed-off-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] 13+ messages in thread

end of thread, other threads:[~2019-11-12  6:37 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-05  7:26 [dpdk-dev] [PATCH v2] bus/pci: resolve multiple NICs address conflicts Wangyu (Turing Solution Development Dep)
2019-11-05 14:33 ` David Marchand
     [not found]   ` <D3165BB52137B64493C4E18DC69F10D62C8E7CDC@DGGEMM501-MBX.china.huawei.com>
2019-11-06  6:15     ` [dpdk-dev] 答复: " Wangyu (Eric)
2019-11-06  7:37       ` [dpdk-dev] " David Marchand
2019-11-06 10:35         ` Burakov, Anatoly
     [not found]           ` <D3165BB52137B64493C4E18DC69F10D62C8E903A@DGGEMM501-MBX.china.huawei.com>
2019-11-07  3:17             ` [dpdk-dev] 答复: " Wangyu (Eric)
2019-11-06 11:14         ` [dpdk-dev] " Burakov, Anatoly
     [not found]           ` <D3165BB52137B64493C4E18DC69F10D62C8E9085@DGGEMM501-MBX.china.huawei.com>
2019-11-07  5:44             ` [dpdk-dev] 答复: " Wangyu (Eric)
2019-11-07 12:24               ` Burakov, Anatoly
     [not found]                 ` <D3165BB52137B64493C4E18DC69F10D62C8F159A@dggemm521-mbx.china.huawei.com>
2019-11-11  9:37                   ` [dpdk-dev] 答复: " Wangyu (Eric)
2019-11-11 13:07                     ` Burakov, Anatoly
2019-11-12  6:37                     ` Gavin Hu (Arm Technology China)
2019-11-06 10:29       ` [dpdk-dev] " 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).