Use rte_pktmbuf_free_bulk() API instead of looping through the packets
and freeing individually.

Signed-off-by: Anoob Joseph <ano...@marvell.com>
Suggested-by: Stephen Hemminger <step...@networkplumber.org>
---
 examples/ipsec-secgw/ipsec-secgw.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/examples/ipsec-secgw/ipsec-secgw.h 
b/examples/ipsec-secgw/ipsec-secgw.h
index 53665adf03..8baab44ee7 100644
--- a/examples/ipsec-secgw/ipsec-secgw.h
+++ b/examples/ipsec-secgw/ipsec-secgw.h
@@ -232,10 +232,7 @@ free_reassembly_fail_pkt(struct rte_mbuf *mb)
 static inline void
 free_pkts(struct rte_mbuf *mb[], uint32_t n)
 {
-       uint32_t i;
-
-       for (i = 0; i != n; i++)
-               rte_pktmbuf_free(mb[i]);
+       rte_pktmbuf_free_bulk(mb, n);
 
        core_stats_update_drop(n);
 }
-- 
2.25.1

Reply via email to