DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] examples/ipsec-secgw: use bulk free
@ 2023-12-21  4:40 Anoob Joseph
  2024-01-02 18:14 ` Konstantin Ananyev
  2024-01-09 17:39 ` Akhil Goyal
  0 siblings, 2 replies; 3+ messages in thread
From: Anoob Joseph @ 2023-12-21  4:40 UTC (permalink / raw)
  To: Radu Nicolau, Akhil Goyal, Stephen Hemminger
  Cc: Konstantin Ananyev, Jerin Jacob, dev

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

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Suggested-by: Stephen Hemminger <stephen@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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] examples/ipsec-secgw: use bulk free
  2023-12-21  4:40 [PATCH] examples/ipsec-secgw: use bulk free Anoob Joseph
@ 2024-01-02 18:14 ` Konstantin Ananyev
  2024-01-09 17:39 ` Akhil Goyal
  1 sibling, 0 replies; 3+ messages in thread
From: Konstantin Ananyev @ 2024-01-02 18:14 UTC (permalink / raw)
  To: Anoob Joseph, Radu Nicolau, Akhil Goyal, Stephen Hemminger
  Cc: Konstantin Ananyev, Jerin Jacob, dev


> Use rte_pktmbuf_free_bulk() API instead of looping through the packets
> and freeing individually.
> 
> Signed-off-by: Anoob Joseph <anoobj@marvell.com>
> Suggested-by: Stephen Hemminger <stephen@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);
>  }
> --

Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
 

> 2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] examples/ipsec-secgw: use bulk free
  2023-12-21  4:40 [PATCH] examples/ipsec-secgw: use bulk free Anoob Joseph
  2024-01-02 18:14 ` Konstantin Ananyev
@ 2024-01-09 17:39 ` Akhil Goyal
  1 sibling, 0 replies; 3+ messages in thread
From: Akhil Goyal @ 2024-01-09 17:39 UTC (permalink / raw)
  To: Anoob Joseph, Radu Nicolau, Stephen Hemminger
  Cc: Konstantin Ananyev, Jerin Jacob Kollanukkaran, dev

> 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 <anoobj@marvell.com>
> Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Applied to dpdk-next-crypto
Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-09 17:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-21  4:40 [PATCH] examples/ipsec-secgw: use bulk free Anoob Joseph
2024-01-02 18:14 ` Konstantin Ananyev
2024-01-09 17:39 ` Akhil Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).