From: Ting Xu Date: Wed, 11 Nov 2020 03:06:51 +0000 (+0800) Subject: net/iavf: fix releasing mbufs X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=36b8b062885f2b6576818a1c18ffaacb4dccefa5;p=dpdk.git net/iavf: fix releasing mbufs In the function _iavf_rx_queue_release_mbufs_vec to release rx mbufs, rxq->rxrearm_nb is given the value of rx descriptor number at last. However, since the process to release and allocate mbufs lacks the initialization of rxrearm_nb, if we try to release mbufs next time, it will return without releasing directly. In this patch, rxrearm_nb is initialized to be zero in rx queue reset. Fixes: 319c421f3890 ("net/avf: enable SSE Rx Tx") Cc: stable@dpdk.org Signed-off-by: Ting Xu Acked-by: Jingjing Wu --- diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index baac5d65c8..8f43208c80 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -194,6 +194,7 @@ reset_rx_queue(struct iavf_rx_queue *rxq) rxq->nb_rx_hold = 0; rxq->pkt_first_seg = NULL; rxq->pkt_last_seg = NULL; + rxq->rxrearm_nb = 0; } static inline void