On Fri, Mar 16, 2018 at 04:21:10PM +0100, Jens Freimann wrote: [...] > diff --git a/drivers/net/virtio/Makefile b/drivers/net/virtio/Makefile > index 6c2c996..aa1e600 100644 > --- a/drivers/net/virtio/Makefile > +++ b/drivers/net/virtio/Makefile > @@ -28,6 +28,7 @@ LIBABIVER := 1 > SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtqueue.c > SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_pci.c > SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_rxtx.c > +SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_rxtx_1.1.c
There is no need to introduce this file just for Tx. > SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_ethdev.c > SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_rxtx_simple.c [...] > @@ -603,7 +605,8 @@ struct rte_virtio_xstats_name_off { > } > > vtpci_reset(hw); > - virtio_dev_free_mbufs(dev); > + if (!vtpci_packed_queue(hw)) > + virtio_dev_free_mbufs(dev); I think we also need to free mbufs for packed ring. > virtio_free_queues(hw); > } [...] > +/* Cleanup from completed transmits. */ > +static void > +virtio_xmit_cleanup(struct virtqueue *vq) > +{ > + uint16_t idx; > + uint16_t size = vq->vq_nentries; > + struct vring_desc_packed *desc = vq->vq_ring.desc_packed; > + > + idx = vq->vq_used_cons_idx & (size - 1); > + while (desc_is_used(&desc[idx]) && > + vq->vq_free_cnt < size) { > + while (desc[idx].flags & VRING_DESC_F_NEXT) { We can't use VRING_DESC_F_NEXT when handling used descriptors. Thanks