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
pci: remove eal prefix
[dpdk.git]
/
drivers
/
net
/
virtio
/
virtio_ethdev.c
diff --git
a/drivers/net/virtio/virtio_ethdev.c
b/drivers/net/virtio/virtio_ethdev.c
index
cd87c0e
..
19235a9
100644
(file)
--- a/
drivers/net/virtio/virtio_ethdev.c
+++ b/
drivers/net/virtio/virtio_ethdev.c
@@
-546,6
+546,9
@@
virtio_free_queues(struct virtio_hw *hw)
int queue_type;
uint16_t i;
int queue_type;
uint16_t i;
+ if (hw->vqs == NULL)
+ return;
+
for (i = 0; i < nr_vq; i++) {
vq = hw->vqs[i];
if (!vq)
for (i = 0; i < nr_vq; i++) {
vq = hw->vqs[i];
if (!vq)
@@
-564,9
+567,11
@@
virtio_free_queues(struct virtio_hw *hw)
}
rte_free(vq);
}
rte_free(vq);
+ hw->vqs[i] = NULL;
}
rte_free(hw->vqs);
}
rte_free(hw->vqs);
+ hw->vqs = NULL;
}
static int
}
static int
@@
-1348,7
+1353,7
@@
virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
if (virtio_negotiate_features(hw, req_features) < 0)
return -1;
if (virtio_negotiate_features(hw, req_features) < 0)
return -1;
- if (
eth_dev->device
) {
+ if (
!hw->virtio_user_dev
) {
pci_dev = RTE_DEV_TO_PCI(eth_dev->device);
rte_eth_copy_pci_info(eth_dev, pci_dev);
}
pci_dev = RTE_DEV_TO_PCI(eth_dev->device);
rte_eth_copy_pci_info(eth_dev, pci_dev);
}
@@
-1479,7
+1484,7
@@
virtio_remap_pci(struct rte_pci_device *pci_dev, struct virtio_hw *hw)
if (hw->modern) {
/*
* We don't have to re-parse the PCI config space, since
if (hw->modern) {
/*
* We don't have to re-parse the PCI config space, since
- * rte_
eal_
pci_map_device() makes sure the mapped address
+ * rte_pci_map_device() makes sure the mapped address
* in secondary process would equal to the one mapped in
* the primary process: error will be returned if that
* requirement is not met.
* in secondary process would equal to the one mapped in
* the primary process: error will be returned if that
* requirement is not met.
@@
-1488,12
+1493,12
@@
virtio_remap_pci(struct rte_pci_device *pci_dev, struct virtio_hw *hw)
* (such as dev_cfg, common_cfg, etc.) parsed from the
* primary process, which is stored in shared memory.
*/
* (such as dev_cfg, common_cfg, etc.) parsed from the
* primary process, which is stored in shared memory.
*/
- if (rte_
eal_
pci_map_device(pci_dev)) {
+ if (rte_pci_map_device(pci_dev)) {
PMD_INIT_LOG(DEBUG, "failed to map pci device!");
return -1;
}
} else {
PMD_INIT_LOG(DEBUG, "failed to map pci device!");
return -1;
}
} else {
- if (rte_
eal_
pci_ioport_map(pci_dev, 0, VTPCI_IO(hw)) < 0)
+ if (rte_pci_ioport_map(pci_dev, 0, VTPCI_IO(hw)) < 0)
return -1;
}
return -1;
}
@@
-1603,7
+1608,7
@@
eth_virtio_dev_uninit(struct rte_eth_dev *eth_dev)
virtio_interrupt_handler,
eth_dev);
if (eth_dev->device)
virtio_interrupt_handler,
eth_dev);
if (eth_dev->device)
- rte_
eal_
pci_unmap_device(RTE_DEV_TO_PCI(eth_dev->device));
+ rte_pci_unmap_device(RTE_DEV_TO_PCI(eth_dev->device));
PMD_INIT_LOG(DEBUG, "dev_uninit completed");
PMD_INIT_LOG(DEBUG, "dev_uninit completed");
@@
-1641,7
+1646,7
@@
rte_virtio_pmd_init(void)
return;
}
return;
}
- rte_
eal_
pci_register(&rte_virtio_pmd);
+ rte_pci_register(&rte_virtio_pmd);
}
/*
}
/*