> When rte_pktmbuf_free_bulk is faster because it does single > mempool operation rather than per-packet. > > Signed-off-by: Stephen Hemminger <[email protected]> > --- > lib/bpf/bpf_pkt.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/lib/bpf/bpf_pkt.c b/lib/bpf/bpf_pkt.c > index 01f813c56b..087ac0f244 100644 > --- a/lib/bpf/bpf_pkt.c > +++ b/lib/bpf/bpf_pkt.c > @@ -177,8 +177,7 @@ apply_filter(struct rte_mbuf *mb[], const uint64_t rc[], > uint32_t num, > > if (drop != 0) { > /* free filtered out mbufs */ > - for (i = 0; i != k; i++) > - rte_pktmbuf_free(dr[i]); > + rte_pktmbuf_free_bulk(dr, k); > } else { > /* copy filtered out mbufs beyond good ones */ > for (i = 0; i != k; i++) > -- Acked-by: Konstantin Ananyev <[email protected]> > 2.51.0
- RE: [PATCH v3 1/5] bpf: add allocation annotat... Konstantin Ananyev
- [PATCH v3 2/5] bpf: use bulk free on filtered pack... Stephen Hemminger
- [PATCH v3 3/5] bpf: add a test for BPF ELF load Stephen Hemminger
- [PATCH v3 4/5] bpf: add test for Rx and Tx filteri... Stephen Hemminger
- [PATCH v3 5/5] bpf: remove use of VLA Stephen Hemminger
- RE: [PATCH v3 5/5] bpf: remove use of VLA Konstantin Ananyev
- [PATCH v4 0/5] BPF enhancements Stephen Hemminger
- [PATCH v4 1/5] bpf: add allocation annotations to ... Stephen Hemminger
- RE: [PATCH v4 1/5] bpf: add allocation annotat... Marat Khalili
- [PATCH v4 2/5] bpf: use bulk free on filtered pack... Stephen Hemminger
- RE: [PATCH v4 2/5] bpf: use bulk free on filte... Konstantin Ananyev
- RE: [PATCH v4 2/5] bpf: use bulk free on filte... Marat Khalili
- [PATCH v4 3/5] bpf: add a test for BPF ELF load Stephen Hemminger
- RE: [PATCH v4 3/5] bpf: add a test for BPF ELF... Marat Khalili
- RE: [PATCH v4 3/5] bpf: add a test for BPF... Marat Khalili
- Re: [PATCH v4 3/5] bpf: add a test for... Stephen Hemminger
- RE: [PATCH v4 3/5] bpf: add a tes... Marat Khalili
- Re: [PATCH v4 3/5] bpf: add a test for BPF... Stephen Hemminger
- [PATCH v4 4/5] bpf: add test for Rx and Tx filteri... Stephen Hemminger
- RE: [PATCH v4 4/5] bpf: add test for Rx and Tx... Marat Khalili
- Re: [PATCH v4 4/5] bpf: add test for Rx an... Stephen Hemminger

