On Thu, Dec 29, 2016 at 07:30:41AM +0000, Jianfeng Tan wrote: > When closing virtio devices, close eventfds, free the struct to > store queue/irq mapping. > > Signed-off-by: Jianfeng Tan <jianfeng....@intel.com> > --- > drivers/net/virtio/virtio_ethdev.c | 27 ++++++++++++++++++++++++++- > 1 file changed, 26 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/virtio/virtio_ethdev.c > b/drivers/net/virtio/virtio_ethdev.c > index 0754ba0..d1a0afb 100644 > --- a/drivers/net/virtio/virtio_ethdev.c > +++ b/drivers/net/virtio/virtio_ethdev.c > @@ -591,16 +591,30 @@ virtio_alloc_queues(struct rte_eth_dev *dev) > return 0; > } > > +static void virtio_queues_unbind_intr(struct rte_eth_dev *dev); > + > static void > virtio_dev_close(struct rte_eth_dev *dev) > { > struct virtio_hw *hw = dev->data->dev_private; > + struct rte_intr_conf *intr_conf = &dev->data->dev_conf.intr_conf; > + struct rte_intr_handle *intr_handle = &dev->pci_dev->intr_handle;
I saw quite many occurrence of the two, maybe you could define few macros for that, say VIRTIO_INTR_ENABLED, VIRTIO_RX_INTR_ENABLED, VIRTIO_LSC_INTR_ENABLED? --yliu