From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CF066437FF; Tue, 2 Jan 2024 19:14:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4F7E7402CE; Tue, 2 Jan 2024 19:14:19 +0100 (CET) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by mails.dpdk.org (Postfix) with ESMTP id 34AE64026A for ; Tue, 2 Jan 2024 19:14:17 +0100 (CET) Received: from mail.maildlp.com (unknown [172.18.186.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4T4LXS26sBz67nbq; Wed, 3 Jan 2024 02:11:52 +0800 (CST) Received: from frapeml100005.china.huawei.com (unknown [7.182.85.132]) by mail.maildlp.com (Postfix) with ESMTPS id BE2841400DB; Wed, 3 Jan 2024 02:14:16 +0800 (CST) Received: from frapeml500007.china.huawei.com (7.182.85.172) by frapeml100005.china.huawei.com (7.182.85.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 2 Jan 2024 19:14:16 +0100 Received: from frapeml500007.china.huawei.com ([7.182.85.172]) by frapeml500007.china.huawei.com ([7.182.85.172]) with mapi id 15.01.2507.035; Tue, 2 Jan 2024 19:14:16 +0100 From: Konstantin Ananyev To: Anoob Joseph , Radu Nicolau , Akhil Goyal , Stephen Hemminger CC: Konstantin Ananyev , Jerin Jacob , "dev@dpdk.org" Subject: RE: [PATCH] examples/ipsec-secgw: use bulk free Thread-Topic: [PATCH] examples/ipsec-secgw: use bulk free Thread-Index: AQHaM8f5evsAqY5hCUuBA5GrqXi0ZLDG5ziQ Date: Tue, 2 Jan 2024 18:14:16 +0000 Message-ID: References: <20231221044033.432-1-anoobj@marvell.com> In-Reply-To: <20231221044033.432-1-anoobj@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.206.138.42] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > Use rte_pktmbuf_free_bulk() API instead of looping through the packets > and freeing individually. >=20 > Signed-off-by: Anoob Joseph > Suggested-by: Stephen Hemminger > --- > examples/ipsec-secgw/ipsec-secgw.h | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) >=20 > diff --git a/examples/ipsec-secgw/ipsec-secgw.h b/examples/ipsec-secgw/ip= sec-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 =3D 0; i !=3D n; i++) > - rte_pktmbuf_free(mb[i]); > + rte_pktmbuf_free_bulk(mb, n); >=20 > core_stats_update_drop(n); > } > -- Acked-by: Konstantin Ananyev =20 > 2.25.1