rte_virtio: automatically memmap PCI resources
SPDK env/pci layer does not provide equivalent call to actually map all pci resources. This patch will smooth future transition of rte_virtio to SPDK. Change-Id: I7a67c46a99824be83875385703dd6bbf0ec9645e Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/380001 Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
671da58caf
commit
b697382f65
@ -400,7 +400,7 @@ static struct rte_pci_driver rte_virtio_pmd = {
|
||||
.name = "net_virtio",
|
||||
},
|
||||
.id_table = pci_id_virtio_map,
|
||||
.drv_flags = 0,
|
||||
.drv_flags = RTE_PCI_DRV_NEED_MAPPING,
|
||||
.probe = virtio_pci_probe,
|
||||
.remove = virtio_pci_remove,
|
||||
};
|
||||
|
@ -613,11 +613,6 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)
|
||||
struct virtio_pci_cap cap;
|
||||
int ret;
|
||||
|
||||
if (rte_pci_map_device(dev)) {
|
||||
PMD_INIT_LOG(DEBUG, "failed to map pci device!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = rte_pci_read_config(dev, &pos, 1, PCI_CAPABILITY_LIST);
|
||||
if (ret < 0) {
|
||||
PMD_INIT_LOG(DEBUG, "failed to read pci capability list");
|
||||
|
Loading…
Reference in New Issue
Block a user