net/virtio: add helper to get interrrupt handle
[dpdk.git] / drivers / net / virtio / virtio_pci.h
index f63f76c..5373e39 100644 (file)
@@ -252,7 +252,6 @@ struct virtio_hw {
        uint16_t    vtnet_hdr_size;
        uint8_t     vlan_strip;
        uint8_t     use_msix;
-       uint8_t     started;
        uint8_t     modern;
        uint8_t     use_simple_rxtx;
        uint8_t     mac_addr[ETHER_ADDR_LEN];
@@ -318,4 +317,10 @@ uint8_t vtpci_isr(struct virtio_hw *);
 
 uint16_t vtpci_irq_config(struct virtio_hw *, uint16_t);
 
+static inline struct rte_intr_handle *
+vtpci_intr_handle(struct virtio_hw *hw)
+{
+       return hw->dev ? &hw->dev->intr_handle : NULL;
+}
+
 #endif /* _VIRTIO_PCI_H_ */