[RFC,1/5] pci/windows: add stubs for port IO
diff mbox series

Message ID 20200228060727.192491-2-dmitry.kozliuk@gmail.com
State New
Delegated to: Thomas Monjalon
Headers show
Series
  • virtio-net support for Windows draft
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Dmitry Kozlyuk Feb. 28, 2020, 6:07 a.m. UTC
NetUIO does not currently implement port I/O, which is used by some
drivers, notable virtio-net in legacy mode.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 drivers/bus/pci/windows/pci.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

Patch
diff mbox series

diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c
index 75168c542..387ed4f02 100644
--- a/drivers/bus/pci/windows/pci.c
+++ b/drivers/bus/pci/windows/pci.c
@@ -143,6 +143,38 @@  int rte_pci_write_config(const struct rte_pci_device *dev,
 	return pci_config_io(dev, (void *)buf, len, offset, PCI_IO_WRITE);
 }
 
+int
+rte_pci_ioport_map(struct rte_pci_device *dev, int bar,
+		struct rte_pci_ioport *p)
+{
+	RTE_SET_USED(dev);
+	RTE_SET_USED(bar);
+	RTE_SET_USED(p);
+	RTE_LOG(ERR, EAL, "I/O port mapping not supported for Windows\n");
+	return -1;
+}
+
+void
+rte_pci_ioport_read(struct rte_pci_ioport *p,
+		void *data, size_t len, off_t offset)
+{
+	RTE_SET_USED(p);
+	RTE_SET_USED(data);
+	RTE_SET_USED(len);
+	RTE_SET_USED(offset);
+	RTE_LOG(ERR, EAL, "I/O port read not implemented for Windows\n");
+}
+
+void
+rte_pci_ioport_write(struct rte_pci_ioport *p,
+		const void *data, size_t len, off_t offset)
+{
+	RTE_SET_USED(p);
+	RTE_SET_USED(data);
+	RTE_SET_USED(len);
+	RTE_SET_USED(offset);
+	RTE_LOG(ERR, EAL, "I/O port write not implemented for Windows\n");
+}
 
 static
 int send_ioctl(HANDLE f, DWORD ioctl,