X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fvirtio%2Fvirtio_pci.h;h=11e25a0142fed909861176ad08969e595d9a87ab;hb=6ceb7ab83f168fa6b8e90e4bd5a1392de1a48c70;hp=7d2f8aa495053bcd3df0d2b575fe28eae92c4b5b;hpb=6a504290a7838a40223f8da3ab8144ff8f78c731;p=dpdk.git diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h index 7d2f8aa495..11e25a0142 100644 --- a/drivers/net/virtio/virtio_pci.h +++ b/drivers/net/virtio/virtio_pci.h @@ -104,7 +104,6 @@ enum virtio_msix_status { struct virtio_pci_dev { struct virtio_hw hw; - struct rte_pci_device *pci_dev; struct virtio_pci_common_cfg *common_cfg; struct virtio_net_config *dev_cfg; enum virtio_msix_status msix_status; @@ -116,15 +115,23 @@ struct virtio_pci_dev { #define virtio_pci_get_dev(hwp) container_of(hwp, struct virtio_pci_dev, hw) +struct virtio_pci_internal { + struct rte_pci_ioport io; + struct rte_pci_device *dev; +}; + +extern struct virtio_pci_internal virtio_pci_internal[RTE_MAX_ETHPORTS]; + +#define VTPCI_IO(hw) (&virtio_pci_internal[(hw)->port_id].io) +#define VTPCI_DEV(hw) (virtio_pci_internal[(hw)->port_id].dev) + + /* * How many bits to shift physical queue address written to QUEUE_PFN. * 12 is historical, and due to x86 page size. */ #define VIRTIO_PCI_QUEUE_ADDR_SHIFT 12 -/* The alignment to use between consumer and producer parts of vring. */ -#define VIRTIO_PCI_VRING_ALIGN 4096 - /* * Function declaration from virtio_pci.c */