git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ethdev: remove legacy Rx descriptor done API
[dpdk.git]
/
drivers
/
net
/
virtio
/
virtio_pci_ethdev.c
diff --git
a/drivers/net/virtio/virtio_pci_ethdev.c
b/drivers/net/virtio/virtio_pci_ethdev.c
index
7b6df83
..
54645dc
100644
(file)
--- a/
drivers/net/virtio/virtio_pci_ethdev.c
+++ b/
drivers/net/virtio/virtio_pci_ethdev.c
@@
-19,6
+19,7
@@
#include <rte_dev.h>
#include <rte_kvargs.h>
#include <rte_dev.h>
#include <rte_kvargs.h>
+#include "virtio.h"
#include "virtio_ethdev.h"
#include "virtio_pci.h"
#include "virtio_logs.h"
#include "virtio_ethdev.h"
#include "virtio_pci.h"
#include "virtio_logs.h"
@@
-60,7
+61,7
@@
virtio_remap_pci(struct rte_pci_device *pci_dev, struct virtio_pci_dev *dev)
return -1;
}
} else {
return -1;
}
} else {
- if (
rte_pci_ioport_map(pci_dev, 0, VTPCI_IO(hw)
) < 0)
+ if (
vtpci_legacy_ioport_map(hw
) < 0)
return -1;
}
return -1;
}
@@
-75,30
+76,31
@@
eth_virtio_pci_init(struct rte_eth_dev *eth_dev)
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
int ret;
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
int ret;
- VTPCI_DEV(hw) = pci_dev;
-
if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+ hw->port_id = eth_dev->data->port_id;
+ VTPCI_DEV(hw) = pci_dev;
ret = vtpci_init(RTE_ETH_DEV_TO_PCI(eth_dev), dev);
if (ret) {
ret = vtpci_init(RTE_ETH_DEV_TO_PCI(eth_dev), dev);
if (ret) {
- PMD_INIT_LOG(ERR, "Failed to init PCI device
\n
");
+ PMD_INIT_LOG(ERR, "Failed to init PCI device");
return -1;
}
} else {
return -1;
}
} else {
+ VTPCI_DEV(hw) = pci_dev;
if (dev->modern)
if (dev->modern)
- V
TPCI
_OPS(hw) = &modern_ops;
+ V
IRTIO
_OPS(hw) = &modern_ops;
else
else
- V
TPCI
_OPS(hw) = &legacy_ops;
+ V
IRTIO
_OPS(hw) = &legacy_ops;
ret = virtio_remap_pci(RTE_ETH_DEV_TO_PCI(eth_dev), dev);
if (ret < 0) {
ret = virtio_remap_pci(RTE_ETH_DEV_TO_PCI(eth_dev), dev);
if (ret < 0) {
- PMD_INIT_LOG(ERR, "Failed to remap PCI device
\n
");
+ PMD_INIT_LOG(ERR, "Failed to remap PCI device");
return -1;
}
}
ret = eth_virtio_dev_init(eth_dev);
if (ret < 0) {
return -1;
}
}
ret = eth_virtio_dev_init(eth_dev);
if (ret < 0) {
- PMD_INIT_LOG(ERR, "Failed to init virtio device
\n
");
+ PMD_INIT_LOG(ERR, "Failed to init virtio device");
goto err_unmap;
}
goto err_unmap;
}
@@
-111,7
+113,7
@@
eth_virtio_pci_init(struct rte_eth_dev *eth_dev)
err_unmap:
rte_pci_unmap_device(RTE_ETH_DEV_TO_PCI(eth_dev));
if (!dev->modern)
err_unmap:
rte_pci_unmap_device(RTE_ETH_DEV_TO_PCI(eth_dev));
if (!dev->modern)
-
rte_pci_ioport_unmap(VTPCI_IO(hw)
);
+
vtpci_legacy_ioport_unmap(hw
);
return ret;
}
return ret;
}