DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Zhang, Qi Z" <qi.z.zhang@intel.com>
To: "Wang, Xiao W" <xiao.w.wang@intel.com>,
	wangyunjian <wangyunjian@huawei.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "jerry.lilijun@huawei.com" <jerry.lilijun@huawei.com>,
	"xudingke@huawei.com" <xudingke@huawei.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/fm10k: fix memory leak when Tx thresh check fails
Date: Thu, 8 Oct 2020 04:46:58 +0000	[thread overview]
Message-ID: <9e07a2d5dcf44a978f15ef21ef0231a8@intel.com> (raw)
In-Reply-To: <BN8PR11MB3795697580B4268DBBB513EDB80B0@BN8PR11MB3795.namprd11.prod.outlook.com>



> -----Original Message-----
> From: Wang, Xiao W <xiao.w.wang@intel.com>
> Sent: Thursday, October 8, 2020 9:39 AM
> To: wangyunjian <wangyunjian@huawei.com>; dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; jerry.lilijun@huawei.com;
> xudingke@huawei.com; stable@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH] net/fm10k: fix memory leak when Tx thresh
> check fails
> 
> Hi,
> 
> Thanks for the patch.
> 
> > -----Original Message-----
> > From: wangyunjian <wangyunjian@huawei.com>
> > Sent: Wednesday, October 7, 2020 3:37 PM
> > To: dev@dpdk.org
> > Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Wang, Xiao W
> > <xiao.w.wang@intel.com>; jerry.lilijun@huawei.com;
> > xudingke@huawei.com; Yunjian Wang <wangyunjian@huawei.com>;
> > stable@dpdk.org
> > Subject: [dpdk-dev] [PATCH] net/fm10k: fix memory leak when Tx thresh
> > check fails
> >
> > From: Yunjian Wang <wangyunjian@huawei.com>
> >
> > In fm10k_tx_queue_setup(), we allocate memory for the queue structure
> > but not released when Tx thresh check fails.
> >
> > Fixes: 98068e0e044e ("fm10k: add Tx queue setup/release")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> > ---
> >  drivers/net/fm10k/fm10k_ethdev.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/fm10k/fm10k_ethdev.c
> > b/drivers/net/fm10k/fm10k_ethdev.c
> > index 309637071..c4a6fdf7f 100644
> > --- a/drivers/net/fm10k/fm10k_ethdev.c
> > +++ b/drivers/net/fm10k/fm10k_ethdev.c
> > @@ -2024,8 +2024,10 @@ fm10k_tx_queue_setup(struct rte_eth_dev *dev,
> > uint16_t queue_id,  q->ops = &def_txq_ops;  q->tail_ptr = (volatile
> > uint32_t *)  &((uint32_t *)hw->hw_addr)[FM10K_TDT(queue_id)];
> > -if (handle_txconf(q, conf))
> > +if (handle_txconf(q, conf)) {
> > +rte_free(q);
> >  return -EINVAL;
> > +}
> >
> >  /* allocate memory for the software ring */  q->sw_ring =
> > rte_zmalloc_socket("fm10k sw ring",
> > --
> > 2.23.0
> 
> Acked-by: Xiao Wang <xiao.w.wang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
> 


      reply	other threads:[~2020-10-08  4:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-07  7:36 wangyunjian
2020-10-08  1:39 ` Wang, Xiao W
2020-10-08  4:46   ` Zhang, Qi Z [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=9e07a2d5dcf44a978f15ef21ef0231a8@intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=dev@dpdk.org \
    --cc=jerry.lilijun@huawei.com \
    --cc=stable@dpdk.org \
    --cc=wangyunjian@huawei.com \
    --cc=xiao.w.wang@intel.com \
    --cc=xudingke@huawei.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).