From: Somnath Kotur <somnath.kotur@broadcom.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: Ajit Khaparde <ajit.khaparde@broadcom.com>, dev <dev@dpdk.org>,
Kalesh Anakkur Purayil <kalesh-anakkur.purayil@broadcom.com>
Subject: Re: [dpdk-dev] [PATCH v3 09/10] net/bnxt: release port upon close
Date: Thu, 16 Jan 2020 17:00:24 +0530 [thread overview]
Message-ID: <CAOBf=muZBzUuyBeUyDaRs-Jxjb97DArDs-TNkGcpT5cA5qr90A@mail.gmail.com> (raw)
In-Reply-To: <e72b4c93-7e79-633f-a390-614d0e90fbe7@intel.com>
Ferruh,
On Thu, 16 Jan 2020, 16:50 Ferruh Yigit, <ferruh.yigit@intel.com> wrote:
> On 1/14/2020 2:49 PM, Somnath Kotur wrote:
> > Ferruh,
> > Will recheck and revert on
>
> Hi Ajit,
>
> this is blocking the next-net-brcm tree to be pulled. Would you want to
> drop
> this patch from your tree and continue with merge and deal with this patch
> later?
> Or if this patch is the critical for the series I can keep waiting.
>
Kalesh will be sending v4 of the this patch set addressing this patch as
well shortly ..few hours full now
Thanks
Som
>
> Thanks,
> ferruh
>
> >
> > Thanks
> > Som
> >
> > On Tue, 14 Jan 2020, 18:26 Ferruh Yigit, <ferruh.yigit@intel.com
> > <mailto:ferruh.yigit@intel.com>> wrote:
> >
> > On 1/14/2020 5:14 AM, Ajit Khaparde wrote:
> > > From: Somnath Kotur <somnath.kotur@broadcom.com
> > <mailto:somnath.kotur@broadcom.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: Somnath Kotur <somnath.kotur@broadcom.com
> > <mailto:somnath.kotur@broadcom.com>>
> > > Reviewed-by: Kalesh Anakkur Purayil <
> kalesh-anakkur.purayil@broadcom.com
> > <mailto:kalesh-anakkur.purayil@broadcom.com>>
> > > Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com
> > <mailto:ajit.khaparde@broadcom.com>>
> > > ---
> > > drivers/net/bnxt/bnxt_ethdev.c | 5 +++++
> > > 1 file changed, 5 insertions(+)
> > >
> > > diff --git a/drivers/net/bnxt/bnxt_ethdev.c
> b/drivers/net/bnxt/bnxt_ethdev.c
> > > index ba3f0a7d9..8acfade5f 100644
> > > --- a/drivers/net/bnxt/bnxt_ethdev.c
> > > +++ b/drivers/net/bnxt/bnxt_ethdev.c
> > > @@ -4856,6 +4856,11 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev)
> > > if (rc)
> > > goto error_free;
> > >
> > > + /* Pass the information to the rte_eth_dev_close() that it
> should also
> > > + * release the private port resources.
> > > + */
> > > + eth_dev->data->dev_flags |= RTE_ETH_DEV_CLOSE_REMOVE;
> > > +
> >
> > When you give this flag, 'rte_eth_dev_close()' will release port
> resources, it
> > will memset the 'eth_dev->data'.
> >
> > In case user first closed the port, later removed it, remove path
> should be safe
> > for it. I can see 'bnxt_dev_uninit()' operates on the values of
> 'eth_dev->data'
> > which should crash in this case.
> >
> > Can you please double check the return path, all following should be
> safe:
> > - close the port
> > - remove the port
> > - close and remove the port
> >
>
>
next prev parent reply other threads:[~2020-01-16 11:30 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-13 5:01 [dpdk-dev] [PATCH V2 00/10] bnxt patchset with bug fixes Kalesh A P
2020-01-13 5:01 ` [dpdk-dev] [PATCH V2 01/10] net/bnxt: handle flow create failure Kalesh A P
2020-01-13 5:01 ` [dpdk-dev] [PATCH V2 02/10] net/bnxt: fix probe failure in FreeBSD Kalesh A P
2020-01-13 5:01 ` [dpdk-dev] [PATCH V2 03/10] net/bnxt: fix to use correct IOVA mapping Kalesh A P
2020-01-13 5:01 ` [dpdk-dev] [PATCH V2 04/10] net/bnxt: fix enable/disable VLAN filtering Kalesh A P
2020-01-13 5:01 ` [dpdk-dev] [PATCH V2 05/10] net/bnxt: fix enable/disable vlan strip Kalesh A P
2020-01-13 5:01 ` [dpdk-dev] [PATCH V2 06/10] net/bnxt: handle hw filter setting when port is stopped Kalesh A P
2020-01-13 5:01 ` [dpdk-dev] [PATCH V2 07/10] net/bnxt: fix a memory leak in port stop Kalesh A P
2020-01-13 5:01 ` [dpdk-dev] [PATCH V2 08/10] net/bnxt: use macro for PCI log format Kalesh A P
2020-01-13 5:01 ` [dpdk-dev] [PATCH V2 09/10] net/bnxt: release port upon close Kalesh A P
2020-01-13 5:01 ` [dpdk-dev] [PATCH V2 10/10] net/bnxt: fix to cap max rings to minimum of compl rings and stat contexts Kalesh A P
2020-01-14 5:14 ` [dpdk-dev] [PATCH v3 00/10] bnxt patchset with bug fixes Ajit Khaparde
2020-01-14 5:14 ` [dpdk-dev] [PATCH v3 01/10] net/bnxt: handle flow create failure Ajit Khaparde
2020-01-14 12:59 ` Ferruh Yigit
2020-01-14 5:14 ` [dpdk-dev] [PATCH v3 02/10] net/bnxt: fix probe failure in FreeBSD Ajit Khaparde
2020-01-14 5:14 ` [dpdk-dev] [PATCH v3 03/10] net/bnxt: fix to use correct IOVA mapping Ajit Khaparde
2020-01-14 5:14 ` [dpdk-dev] [PATCH v3 04/10] net/bnxt: fix enable/disable VLAN filtering Ajit Khaparde
2020-01-14 5:14 ` [dpdk-dev] [PATCH v3 05/10] net/bnxt: fix VLAN strip support Ajit Khaparde
2020-01-14 5:14 ` [dpdk-dev] [PATCH v3 06/10] net/bnxt: handle HW filter setting when port is stopped Ajit Khaparde
2020-01-14 5:14 ` [dpdk-dev] [PATCH v3 07/10] net/bnxt: fix a memory leak in port stop Ajit Khaparde
2020-01-14 5:14 ` [dpdk-dev] [PATCH v3 08/10] net/bnxt: use macro for PCI log format Ajit Khaparde
2020-01-14 5:14 ` [dpdk-dev] [PATCH v3 09/10] net/bnxt: release port upon close Ajit Khaparde
2020-01-14 12:56 ` Ferruh Yigit
2020-01-14 14:49 ` Somnath Kotur
2020-01-16 11:20 ` Ferruh Yigit
2020-01-16 11:30 ` Somnath Kotur [this message]
2020-01-14 5:14 ` [dpdk-dev] [PATCH v3 10/10] net/bnxt: fix calculation of max rings Ajit Khaparde
2020-01-14 5:27 ` [dpdk-dev] [PATCH v3 00/10] bnxt patchset with bug fixes Ajit Khaparde
2020-01-14 13:02 ` Ferruh Yigit
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='CAOBf=muZBzUuyBeUyDaRs-Jxjb97DArDs-TNkGcpT5cA5qr90A@mail.gmail.com' \
--to=somnath.kotur@broadcom.com \
--cc=ajit.khaparde@broadcom.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=kalesh-anakkur.purayil@broadcom.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).