From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 1D08DADA2 for ; Fri, 5 Feb 2016 05:58:53 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 04 Feb 2016 20:58:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,398,1449561600"; d="scan'208";a="908977266" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga002.fm.intel.com with ESMTP; 04 Feb 2016 20:58:27 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id u154wPxM011194; Fri, 5 Feb 2016 12:58:25 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u154wLqL026838; Fri, 5 Feb 2016 12:58:23 +0800 Received: (from heshaope@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u154wL2W026834; Fri, 5 Feb 2016 12:58:21 +0800 From: Shaopeng He To: dev@dpdk.org Date: Fri, 5 Feb 2016 12:57:50 +0800 Message-Id: <1454648270-26760-7-git-send-email-shaopeng.he@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1454648270-26760-1-git-send-email-shaopeng.he@intel.com> References: <1450856233-11825-1-git-send-email-shaopeng.he@intel.com> <1454648270-26760-1-git-send-email-shaopeng.he@intel.com> Subject: [dpdk-dev] [PATCH v6 6/6] l3fwd-power: fix a memory leak for non-ip packet X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 04:58:54 -0000 Previous l3fwd-power only processes IP and IPv6 packet, other packet's mbuf is not released, and causes a memory leak. This patch fixes this issue. Fixes: 3c0184cc ("examples: replace some offload flags with packet type") Signed-off-by: Shaopeng He Acked-by: Jing Chen Acked-by: Michael Qiu --- v6 change: - add fixes line v4 change: - update release note inside the patch --- doc/guides/rel_notes/release_2_3.rst | 6 ++++++ examples/l3fwd-power/main.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/guides/rel_notes/release_2_3.rst b/doc/guides/rel_notes/release_2_3.rst index 2cb5ebd..fc871ab 100644 --- a/doc/guides/rel_notes/release_2_3.rst +++ b/doc/guides/rel_notes/release_2_3.rst @@ -25,6 +25,12 @@ Libraries Examples ~~~~~~~~ +* **l3fwd-power: Fixed memory leak for non-ip packet.** + + Fixed issue in l3fwd-power where, recieving other packet than + types of IP and IPv6, the mbuf was not released, and caused + a memory leak. + Other ~~~~~ diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index 828c18a..d9cd848 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -714,7 +714,8 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, /* We don't currently handle IPv6 packets in LPM mode. */ rte_pktmbuf_free(m); #endif - } + } else + rte_pktmbuf_free(m); } -- 1.9.3