[PATCH 05/20] pipeline: use rte_pktmbuf_free_bulk
Stephen Hemminger
stephen at networkplumber.org
Fri May 8 22:33:26 CEST 2026
Replace open-coded loop with rte_pktmbuf_free_bulk().
Generated by devtools/cocci/free_bulk.cocci.
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
lib/pipeline/rte_pipeline.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/lib/pipeline/rte_pipeline.c b/lib/pipeline/rte_pipeline.c
index fa3c8b77ee..1fadae01d8 100644
--- a/lib/pipeline/rte_pipeline.c
+++ b/lib/pipeline/rte_pipeline.c
@@ -1305,10 +1305,8 @@ rte_pipeline_action_handler_drop(struct rte_pipeline *p, uint64_t pkts_mask)
{
if ((pkts_mask & (pkts_mask + 1)) == 0) {
uint64_t n_pkts = rte_popcount64(pkts_mask);
- uint32_t i;
- for (i = 0; i < n_pkts; i++)
- rte_pktmbuf_free(p->pkts[i]);
+ rte_pktmbuf_free_bulk(p->pkts, n_pkts);
} else {
uint32_t i;
--
2.53.0
More information about the dev
mailing list