From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 3C9496CA8; Tue, 20 Sep 2016 13:56:45 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 20 Sep 2016 04:56:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,367,1470726000"; d="scan'208";a="763693024" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by FMSMGA003.fm.intel.com with ESMTP; 20 Sep 2016 04:56:31 -0700 Date: Tue, 20 Sep 2016 19:57:02 +0800 From: Yuanhan Liu To: Dror Birkman Cc: Nicolas Pernas Maradei , ferruh.yigit@intel.com, dev@dpdk.org, stable@dpdk.org Message-ID: <20160920115702.GM10323@yliu-dev.sh.intel.com> References: <1474367963-83879-1-git-send-email-dror.birkman@lightcyber.com> <20160920105829.GU23158@yliu-dev.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] pcap: fix memory leak in jumbo frames X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 11:56:45 -0000 On Tue, Sep 20, 2016 at 02:16:48PM +0300, Dror Birkman wrote: > Cool! > Adding fixline: You might want to send a v2: the following diff is malformed. > > If rte_pktmbuf_alloc() fails on any segment that is not the initial > segment, previously allocated mbufs are not freed. > > Fixes: 6db141c91e1f ("pcap: support jumbo frames") And put a line "Cc: " just before your Signed-off-by. --yliu > > Signed-off-by: Dror Birkman > --- > drivers/net/pcap/rte_eth_pcap.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_ > pcap.c > index b7a3b03..db19a66 100644 > --- a/drivers/net/pcap/rte_eth_pcap.c > +++ b/drivers/net/pcap/rte_eth_pcap.c > @@ -229,8 +229,10 @@ eth_pcap_rx(void *queue, > if (unlikely(eth_pcap_rx_jumbo(pcap_q->mb_pool, > mbuf, > packet, > - header.caplen) == -1)) > + header.caplen) == -1)) { > + rte_pktmbuf_free(mbuf); > break; > + } > } > > mbuf->pkt_len = (uint16_t)header.caplen; > -- > 2.3.0 > > > > On Tue, Sep 20, 2016 at 1:58 PM, Yuanhan Liu > wrote: > > > On Tue, Sep 20, 2016 at 01:39:23PM +0300, Dror Birkman wrote: > > > If rte_pktmbuf_alloc() fails on any segment that is not the initial > > > segment, previously allocated mbufs are not freed. > > > > You should put a "fixline" here. > > > > Besides that, I think it's a good candidate for stable branch. Thus, > > stable@dpdk.org cc'ed. > > > > --yliu > >