From: Tiwei Bie Date: Tue, 19 Feb 2019 10:59:47 +0000 (+0800) Subject: net/virtio: fix Tx desc cleanup for packed ring X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=91397bdc768befd57628e22b99d9eeb7e0ca7085;p=dpdk.git net/virtio: fix Tx desc cleanup for packed ring We should try to cleanup at least the 'need' number of descs. Fixes: 892dc798fa9c ("net/virtio: implement Tx path for packed queues") Cc: stable@dpdk.org Signed-off-by: Tiwei Bie Reviewed-by: Maxime Coquelin --- diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 4c701c5147..b07ceac6de 100644 --- a/drivers/net/virtio/virtio_rxtx.c +++ b/drivers/net/virtio/virtio_rxtx.c @@ -1943,7 +1943,6 @@ virtio_xmit_pkts_packed(void *tx_queue, struct rte_mbuf **tx_pkts, /* Positive value indicates it need free vring descriptors */ if (unlikely(need > 0)) { - need = RTE_MIN(need, (int)nb_pkts); virtio_xmit_cleanup_packed(vq, need); need = slots - vq->vq_free_cnt; if (unlikely(need > 0)) {