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 0296F43719; Thu, 21 Dec 2023 05:40:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 88062402F1; Thu, 21 Dec 2023 05:40:41 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 0F342402EA for ; Thu, 21 Dec 2023 05:40:39 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BL12SZ6028364; Wed, 20 Dec 2023 20:40:39 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=pfpt0220; bh=L46aD9Zk Kfu//rkmGqF3XOEyZA4CEWD65UK7UAMc684=; b=aeyrBXIL/1AhqrcqRtUfTc18 zJtIeSONvs6odI04Ktv4QqCsE4qDKYwwR7gUxATh5sU1iFZkfb4+XaLYeuThMO5A zfHYav4xTEv+zVF5xTsw4pTfnpi3vxOp77LMEu/OVTw6ol0atIbMrwrk1JWF2QGm G3/euAV513krbWe2g4Pr0ItyOi83KsSDEDG0iHk6u3ZIVNwTtPFDB736MqN/3Q4k YhhW60QDbgwg66edJhfKs/oPauhk/9i9HCzB/JF0N5wUUhIlBduEadpATo7ITW4V lKc0MSo9+o+tCFeiegOZI5SmMSXD2+kt1KZmv3r9VLVUxQ5Oyq/K7WhIYdyDNw== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3v3ntrp2gb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 20 Dec 2023 20:40:39 -0800 (PST) Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 20 Dec 2023 20:40:36 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Wed, 20 Dec 2023 20:40:36 -0800 Received: from BG-LT92004.corp.innovium.com (unknown [10.193.71.152]) by maili.marvell.com (Postfix) with ESMTP id 1CDF35C68E3; Wed, 20 Dec 2023 20:40:33 -0800 (PST) From: Anoob Joseph To: Radu Nicolau , Akhil Goyal , Stephen Hemminger CC: Konstantin Ananyev , Jerin Jacob , Subject: [PATCH] examples/ipsec-secgw: use bulk free Date: Thu, 21 Dec 2023 10:10:33 +0530 Message-ID: <20231221044033.432-1-anoobj@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: QfedtT1i_c9OrlH8R81XOXrhVcunSxls X-Proofpoint-ORIG-GUID: QfedtT1i_c9OrlH8R81XOXrhVcunSxls X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 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. Signed-off-by: Anoob Joseph Suggested-by: Stephen Hemminger --- 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