summaryrefslogtreecommitdiff
path: root/drivers/net/virtio/virtio_pci.c
diff options
context:
space:
mode:
authorYuanhan Liu <yuanhan.liu@linux.intel.com>2017-01-12 13:37:00 +0800
committerYuanhan Liu <yuanhan.liu@linux.intel.com>2017-01-17 09:23:27 +0100
commit9470427c88e1545931236a352b613e5785d18648 (patch)
tree6c84e7f6f90ad6e28790bbcdb06de521af0d6691 /drivers/net/virtio/virtio_pci.c
parent61e3ee17568ab046243424cbec43526db932a2e3 (diff)
downloaddpdk-next-eventdev-9470427c88e1545931236a352b613e5785d18648.zip
dpdk-next-eventdev-9470427c88e1545931236a352b613e5785d18648.tar.gz
dpdk-next-eventdev-9470427c88e1545931236a352b613e5785d18648.tar.xz
net/virtio: do not store PCI device pointer at shared memory
hw->dev, a pointer to pci_dev, was actually not used, until the refactor of decouping from PCI device. This would somehow break the multiple process again, since "hw" is stored at shared memory, while "pci_dev" is not: the primary and secondary process could have different address for it, while just one value is allowed. Thus we should not store it to "hw", instead, we could retrieve it from the "eth_dev->device" field. Fixes: ae34410a8a8a ("ethdev: move info filling of PCI into drivers") Fixes: eac901ce29be ("ethdev: decouple from PCI device") Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Diffstat (limited to 'drivers/net/virtio/virtio_pci.c')
-rw-r--r--drivers/net/virtio/virtio_pci.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
index 8d5355c..34ca01b 100644
--- a/drivers/net/virtio/virtio_pci.c
+++ b/drivers/net/virtio/virtio_pci.c
@@ -731,8 +731,6 @@ int
vtpci_init(struct rte_pci_device *dev, struct virtio_hw *hw,
uint32_t *dev_flags)
{
- hw->dev = dev;
-
/*
* Try if we can succeed reading virtio pci caps, which exists
* only on modern pci device. If failed, we fallback to legacy