Thread (58 messages) 58 messages, 6 authors, 2021-01-28

Re: [dpdk-dev] [PATCH v5 2/3] PCI: support MMIO in rte_pci_ioport_map/unap/read/write

From: 谢华伟(此时此刻) <hidden>
Date: 2021-01-25 03:08:19

On 2021/1/24 23:22, Xueming(Steven) Li wrote:
quoted
+	} else if (flags & IORESOURCE_MEM) {
+		iobar = 0;
+		base = (unsigned long)dev->mem_resource[bar].addr;
+		RTE_LOG(INFO, EAL, "%s(): MMIO BAR %08lx detected\n",
__func__, base);
Same here, INFO level seems chatty.
makes sense. would remove it.
quoted
+	} else {
+		RTE_LOG(ERR, EAL, "%s(): unknown BAR type\n", __func__);
+		goto error;
+	}
+
+
+	if (iobar && rte_eal_iopl_init() != 0) {
+		RTE_LOG(ERR, EAL, "%s(): insufficient ioport permissions for
PCI device %s\n",
+			__func__, dev->name);
		goto error;
	}
Same as Maxime's suggestion, please move this block as well.
Thanks. It is already moved in v6 patch.
quoted
-	base = (unsigned long)phys_addr;
-	RTE_LOG(INFO, EAL, "%s(): PIO BAR %08lx detected\n", __func__,
base);

-	if (base > UINT16_MAX)
+	if (iobar && (base > UINT16_MAX)) {
PIO_MAX defined below, please use it here. UNI16_MAX used in patch 1/3 as well.
ok.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help