[TEST] dpdk/app/test/test_mbuf.c test_refcnt_mbuf instability + fix proposal
Julien Hascoet
jhascoet at kalrayinc.com
Mon Aug 7 08:18:43 CEST 2023
Hello,
from my understanding after debugging, in test_refcnt_iter the return value of rte_ring_enqueue is not checked; leading to lack of expected mbufs at the end checks.
Here is some fix proposal that seems to work after running endurance tests for several days:
diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index b4f436b5e2..8a5d26e4f6 100644
--- a/app/test/test_mbuf.c
+++ b/app/test/test_mbuf.c
@@ -1033,12 +1033,17 @@ test_refcnt_iter(unsigned int lcore, unsigned int iter,
tref += ref;
if ((ref & 1) != 0) {
rte_pktmbuf_refcnt_update(m, ref);
- while (ref-- != 0)
- rte_ring_enqueue(refcnt_mbuf_ring, m);
+ while (ref-- != 0) {
+ /* retry in case of failure */
+ while (rte_ring_enqueue(refcnt_mbuf_ring, m) != 0)
+ ;
+ }
} else {
while (ref-- != 0) {
rte_pktmbuf_refcnt_update(m, 1);
- rte_ring_enqueue(refcnt_mbuf_ring, m);
+ /* retry in case of failure */
+ while (rte_ring_enqueue(refcnt_mbuf_ring, m) != 0)
+ ;
}
}
rte_pktmbuf_free(m);
Can you confirm ?
Thank,
Julien Hascoet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20230807/881b4f05/attachment.htm>
More information about the dev
mailing list