DPDK patches and discussions
 help / color / mirror / Atom feed
From: wangyunjian <wangyunjian@huawei.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "thomas@monjalon.net" <thomas@monjalon.net>,
	"Lilijun (Jerry)" <jerry.lilijun@huawei.com>,
	xudingke <xudingke@huawei.com>
Subject: Re: [dpdk-dev] [PATCH] net/tap: release port upon close
Date: Wed, 16 Sep 2020 07:20:14 +0000	[thread overview]
Message-ID: <34EFBCA9F01B0748BEB6B629CE643AE60DA4D4A1@DGGEMM533-MBX.china.huawei.com> (raw)
In-Reply-To: <daa3327b-1559-c80c-dee4-d6833928af1c@intel.com>

> -----Original Message-----
> From: Ferruh Yigit [mailto:ferruh.yigit@intel.com]
> Sent: Tuesday, September 15, 2020 10:53 PM
> To: wangyunjian <wangyunjian@huawei.com>; dev@dpdk.org
> Cc: thomas@monjalon.net; Lilijun (Jerry) <jerry.lilijun@huawei.com>; xudingke
> <xudingke@huawei.com>
> Subject: Re: [dpdk-dev] [PATCH] net/tap: release port upon close
> 
> On 8/28/2020 1:37 PM, wangyunjian wrote:
> > From: Yunjian Wang <wangyunjian@huawei.com>
> >
> > Set RTE_ETH_DEV_CLOSE_REMOVE upon probe so all the private resources
> > for the port can be freed by rte_eth_dev_close().
> >
> > Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> 
> <...>
> 
> > @@ -1040,6 +1044,9 @@ tap_dev_close(struct rte_eth_dev *dev)
> >  	struct pmd_process_private *process_private = dev->process_private;
> >  	struct rx_queue *rxq;
> >
> > +	if (process_private == NULL)
> > +		return;
> 
> Why this check is required?

When user first call 'close()' and later call 'remove()' the tap PMD, in this case,
the tap_dev_close() will be called twice. The second call of tap_dev_close()
shouldn't do any process, we can use this check to return immediately.

Thanks,
Yunjian

  reply	other threads:[~2020-09-16  7:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-28 12:37 wangyunjian
2020-09-01 10:59 ` Thomas Monjalon
2020-09-13  9:16 ` Thomas Monjalon
2020-09-13 22:27   ` Thomas Monjalon
2020-09-17 12:35   ` wangyunjian
2020-09-15 14:52 ` Ferruh Yigit
2020-09-16  7:20   ` wangyunjian [this message]
2020-09-16 15:48     ` Ferruh Yigit
2020-09-17  9:18       ` wangyunjian
2020-09-17 11:47 ` [dpdk-dev] [PATCH v2] " wangyunjian
2020-09-29 16:56   ` Ferruh Yigit
2020-09-30  0:58     ` wangyunjian

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=34EFBCA9F01B0748BEB6B629CE643AE60DA4D4A1@DGGEMM533-MBX.china.huawei.com \
    --to=wangyunjian@huawei.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jerry.lilijun@huawei.com \
    --cc=thomas@monjalon.net \
    --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).