From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Dror Birkman <dror.birkman@lightcyber.com>
Cc: Nicolas Pernas Maradei <nicolas.pernas.maradei@emutex.com>,
ferruh.yigit@intel.com, dev@dpdk.org, stable@dpdk.org
Subject: Re: [dpdk-stable] [PATCH] pcap: fix memory leak in jumbo frames
Date: Tue, 20 Sep 2016 19:57:02 +0800 [thread overview]
Message-ID: <20160920115702.GM10323@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <CAMLkaUvH8UFv9uWihK4na+w61TSGUaGiySGBJAfVFQ_fRm8s4Q@mail.gmail.com>
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: <stable@dpdk.org>" just before your Signed-off-by.
--yliu
>
> Signed-off-by: Dror Birkman <dror.birkman@lightcyber.com>
> ---
> 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 <yuanhan.liu@linux.intel.com>
> 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
> >
prev parent reply other threads:[~2016-09-20 11:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-20 10:39 [PATCH] pcap: fix memory leak in jumbo frames Dror Birkman
2016-09-20 10:58 ` Yuanhan Liu
2016-09-20 11:16 ` Dror Birkman
2016-09-20 11:57 ` Yuanhan Liu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160920115702.GM10323@yliu-dev.sh.intel.com \
--to=yuanhan.liu@linux.intel.com \
--cc=dev@dpdk.org \
--cc=dror.birkman@lightcyber.com \
--cc=ferruh.yigit@intel.com \
--cc=nicolas.pernas.maradei@emutex.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.