Skip to contentSkip to conversation

net/iavf: fix cannot release mbufs issue

PATCH Applied Ting Xu 3 participants 3 messages Nov 11, 2020 Network drivers

lore
Share & tools
lore

Ting Xu

author
#0 lore raw

PATCH 1/1 net/iavf: fix cannot release mbufs issue

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")
---
 drivers/net/iavf/iavf_rxtx.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/iavf/iavf_rxtx.c +1 -0
index baac5d65c8..8f43208c80 100644
@@ -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
Signature · 1 line
2.17.1
Acked-by on v1 1/1
#1 lore raw
Quoted 18 lines

-----Original Message-----
From: Xu, Ting <[email protected]>
Sent: Wednesday, November 11, 2020 11:07 AM
To: [email protected]
Cc: Zhang, Qi Z <[email protected]>; Xing, Beilei <[email protected]>; Wu, Jingjing <[email protected]>; Xu, Ting <[email protected]>; [email protected]
Subject: [PATCH v1] net/iavf: fix cannot release mbufs issue

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.

Quoted 4 lines
Fixes 319c421f3890 ("net/avf: enable SSE Rx Tx")
Applied
#2 lore raw
Quoted 28 lines

-----Original Message-----
From: Wu, Jingjing <[email protected]>
Sent: Wednesday, November 11, 2020 1:16 PM
To: Xu, Ting <[email protected]>; [email protected]
Cc: Zhang, Qi Z <[email protected]>; Xing, Beilei <[email protected]>; [email protected]
Subject: RE: [PATCH v1] net/iavf: fix cannot release mbufs issue

Quoted 16 lines

-----Original Message-----
From: Xu, Ting <[email protected]>
Sent: Wednesday, November 11, 2020 11:07 AM
To: [email protected]
Cc: Zhang, Qi Z <[email protected]>; Xing, Beilei <[email protected]>; Wu, Jingjing <[email protected]>; Xu, Ting <[email protected]>; [email protected]
Subject: [PATCH v1] net/iavf: fix cannot release mbufs issue

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.

Quoted 6 lines
Quoted 4 lines
Fixes 319c421f3890 ("net/avf: enable SSE Rx Tx")

Applied to dpdk-next-net-intel.

Thanks
Qi

Quoted 1 line