examples/ipsec-secgw: use bulk free
PATCH 1/1 examples/ipsec-secgw: use bulk free
Use rte_pktmbuf_free_bulk() API instead of looping through the packets and freeing individually.
Signed-off-by Anoob Joseph <[email protected]>
Suggested-by Stephen Hemminger <[email protected]>
--- examples/ipsec-secgw/ipsec-secgw.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
examples/ipsec-secgw/ipsec-secgw.h +1 -4
@@ -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); }
Signature · 1 line
2.25.1
Quoted 17 lines
Use
rte_pktmbuf_free_bulk()API instead of looping through the packets and freeing individually.Signed-off-by Anoob Joseph <[email protected]>Suggested-by Stephen Hemminger <[email protected]>--- examples/ipsec-secgw/ipsec-secgw.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)examples/ipsec-secgw/ipsec-secgw.h +0
-0@@ -232,10 +232,7 @@ free_reassembly_fail_pkt(struct rte_mbuf *mb)static inline void free_pkts (struct rte_mbuf *mb[],uint32_t n)
examples/ipsec-secgw/ipsec-secgw.h free_reassembly_fail_pkt(struct rte_mbuf *mb)
Quoted 10 lines
examples/ipsec-secgw/ipsec-secgw.h +1
-5{ -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); } --
Quoted 1 line
2.25.1
Quoted 7 lines
Subject: [PATCH] examples/ipsec-secgw: use bulk free
Use
rte_pktmbuf_free_bulk()API instead of looping through the packets and freeing individually.Signed-off-by Anoob Joseph <[email protected]>Suggested-by Stephen Hemminger <[email protected]>
Acked-by Akhil Goyal <[email protected]>
Applied to dpdk-next-crypto
Thanks.