DPDK patches and discussions
 help / color / mirror / Atom feed
From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
To: Anoob Joseph <anoobj@marvell.com>,
	Radu Nicolau <radu.nicolau@intel.com>,
	 Akhil Goyal <gakhil@marvell.com>,
	Stephen Hemminger <stephen@networkplumber.org>
Cc: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>,
	Jerin Jacob <jerinj@marvell.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [PATCH] examples/ipsec-secgw: use bulk free
Date: Tue, 2 Jan 2024 18:14:16 +0000	[thread overview]
Message-ID: <beb068d82eac42cfb0ce77694c5dcbf9@huawei.com> (raw)
In-Reply-To: <20231221044033.432-1-anoobj@marvell.com>


> 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


  reply	other threads:[~2024-01-02 18:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-21  4:40 Anoob Joseph
2024-01-02 18:14 ` Konstantin Ananyev [this message]
2024-01-09 17:39 ` Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=beb068d82eac42cfb0ce77694c5dcbf9@huawei.com \
    --to=konstantin.ananyev@huawei.com \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=konstantin.v.ananyev@yandex.ru \
    --cc=radu.nicolau@intel.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).