Message ID | 1443159425-32502-5-git-send-email-shaopeng.he@intel.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 1B84E8E6E; Fri, 25 Sep 2015 07:37:52 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id A48DC5A89 for <dev@dpdk.org>; Fri, 25 Sep 2015 07:37:49 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP; 24 Sep 2015 22:37:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,585,1437462000"; d="scan'208";a="651976773" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga003.jf.intel.com with ESMTP; 24 Sep 2015 22:37:27 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t8P5bP0E019410; Fri, 25 Sep 2015 13:37: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 t8P5bL2s032565; Fri, 25 Sep 2015 13:37:23 +0800 Received: (from heshaope@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t8P5bLHt032561; Fri, 25 Sep 2015 13:37:21 +0800 From: Shaopeng He <shaopeng.he@intel.com> To: dev@dpdk.org Date: Fri, 25 Sep 2015 13:37:04 +0800 Message-Id: <1443159425-32502-5-git-send-email-shaopeng.he@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1443159425-32502-1-git-send-email-shaopeng.he@intel.com> References: <1443159425-32502-1-git-send-email-shaopeng.he@intel.com> Subject: [dpdk-dev] [PATCH 4/5] 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 <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
He, Shaopeng
Sept. 25, 2015, 5:37 a.m. UTC
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.
Signed-off-by: Shaopeng He <shaopeng.he@intel.com>
---
examples/l3fwd-power/main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Comments
Hi Shaopeng, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shaopeng He > Sent: Friday, September 25, 2015 6:37 AM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH 4/5] l3fwd-power: fix a memory leak for non-ip > packet > > 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. Is this patch related to the rest of the patchset? Something where fm10k is involved? Because it does not look like. Thanks, Pablo > > Signed-off-by: Shaopeng He <shaopeng.he@intel.com> > --- > examples/l3fwd-power/main.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c > index 8bb88ce..ecdff73 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
Hi, Pablo > -----Original Message----- > From: De Lara Guarch, Pablo > Sent: Friday, September 25, 2015 3:19 PM > To: He, Shaopeng; dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH 4/5] l3fwd-power: fix a memory leak for > non-ip packet > > Hi Shaopeng, > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shaopeng He > > Sent: Friday, September 25, 2015 6:37 AM > > To: dev@dpdk.org > > Subject: [dpdk-dev] [PATCH 4/5] l3fwd-power: fix a memory leak for > > non-ip packet > > > > 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. > > Is this patch related to the rest of the patchset? Something where fm10k is > involved? > Because it does not look like. Thanks for the comments. This bug almost happens every time with fm10k when testing this interrupt mode. But for other NIC cards, it rarely occurs. It is because of that right now only fm10k has the switch core, by that, other types of packets sneak into the testing. I include this bug-fixing in the patch set, hope that people can test this feature more easily. Thanks, --Shaopeng > > Thanks, > Pablo > > > > > Signed-off-by: Shaopeng He <shaopeng.he@intel.com> > > --- > > examples/l3fwd-power/main.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd- > power/main.c > > index 8bb88ce..ecdff73 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
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index 8bb88ce..ecdff73 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); }