From: Thomas Monjalon <thomas@monjalon.net>
To: Ferruh Yigit <ferruh.yigit@intel.com>,
"Yang, Zhiyong" <zhiyong.yang@intel.com>
Cc: dev@dpdk.org, Matan Azrad <matan@mellanox.com>,
"Iremonger, Bernard" <bernard.iremonger@intel.com>,
"Yao, Lei A" <lei.a.yao@intel.com>,
"maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>,
"Bie, Tiwei" <tiwei.bie@intel.com>,
"stable@dpdk.org" <stable@dpdk.org>,
Harry Van Haaren <harry.van.haaren@intel.com>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v2] app/testpmd: fix pmd_test_exit function for vdevs
Date: Tue, 22 May 2018 15:12:28 +0200 [thread overview]
Message-ID: <9489790.cv73CZovxU@xps> (raw)
In-Reply-To: <1865181.OGjELPnye7@xps>
Any update to improve this workaround?
21/05/2018 18:38, Thomas Monjalon:
> 21/05/2018 18:32, Ferruh Yigit:
> > On 5/21/2018 11:54 AM, Thomas Monjalon wrote:
> > > 19/05/2018 16:19, Thomas Monjalon:
> > >> 18/05/2018 18:29, Ferruh Yigit:
> > >>> On 5/18/2018 4:55 PM, Matan Azrad wrote:
> > >>>> Hi all
> > >>>>
> > >>>> While this patch also applied I don't understand it.
> > >>>> Is it mandatory for each PMD to free all its resources in dev_close()?
> > >>>> Or it should be done by the rte_device remove function?
> > >>>>
> > >>>> If the resource cleanup should be done by the remove function I think it
> > >>>> should be called for all the devices (pci, vdev, etc).
> > >>>>
> > >>>> Is there an exit function for EAL to clean rte_eal_init()? If no, looks like we need it...
> > >>>
> > >>> Hi Matan,
> > >>>
> > >>> I believe there is a gap in resource cleanup.
> > >>> dev_close() it not for resource cleanup, it should be in PMD remove() functions,
> > >>> and PMDs have it. The problem is remove path is not called in application exit.
> > >>>
> > >>> As far as I know there is no simple API to clean the resources, having it may
> > >>> help application to do the cleanup.
> > >>>
> > >>> I have seen the rte_eal_cleanup() API by Harry, that can be extended to cover
> > >>> PMD resource cleanup if there is enough motivation for it.
> > >>
> > >> Yes, EAL resources should be removed by the function rte_eal_cleanup().
> > >> And ethdev ports must be removed by rte_eth_dev_close().
> > >
> > > This patch is relying on rte_eth_dev_detach() to remove the EAL device.
> > > It should be done in rte_eal_cleanup().
> > >
> > > I am concerned that this patch is workarounding a miss in rte_eal_cleanup,
> > > and takes a different action only for vdev. It is a bad example.
> >
> > Indeed it does workaround, but it is needed to fix a defect in virtio-user.
>
> The defect is still in virtio-user after this patch.
> To make this workaround acceptable, you need:
> 1/ add the virtio-user known issue in release notes
> 2/ add a FIXME comment in testpmd code explaining the workaround
> 3/ commit to work on rte_eal_cleanup() in 18.08
>
> > And currently rte_eal_cleanup() is not complete, it is not doing any device
> > related cleanup.
>
> Yes, we need to add more code in rte_eal_cleanup().
>
> > > And the function rte_eth_dev_detach() is fundamentally wrong and should be deprecated:
> > > http://dpdk.org/commit/b05b444d22
> > > http://dpdk.org/commit/b0fb266855
> > > http://dpdk.org/commit/df3e8ad73f
> > >
> > > One more concern: it seems this patch is breaking failsafe use case.
> > > Note: bonding is managed as an exception in rte_eth_dev_detach().
>
> I have sent a fix in vdev code for the failsafe issue.
>
> No matter the vdev fix is applied or not, this workaround could target only virtio-user.
next prev parent reply other threads:[~2018-05-22 13:12 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-18 9:59 [dpdk-stable] " zhiyong.yang
2018-05-18 4:52 ` Yao, Lei A
2018-05-18 10:18 ` Iremonger, Bernard
2018-05-18 10:21 ` Ferruh Yigit
2018-05-18 10:48 ` Ferruh Yigit
2018-05-18 15:55 ` [dpdk-stable] [dpdk-dev] " Matan Azrad
2018-05-18 16:29 ` Ferruh Yigit
2018-05-19 14:19 ` Thomas Monjalon
2018-05-21 10:54 ` Thomas Monjalon
2018-05-21 16:32 ` Ferruh Yigit
2018-05-21 16:38 ` Thomas Monjalon
2018-05-22 13:12 ` Thomas Monjalon [this message]
2018-05-22 18:38 ` Ferruh Yigit
2018-05-22 19:48 ` Thomas Monjalon
2018-05-23 1:52 ` Yang, Zhiyong
2018-05-23 11:37 ` Yang, Zhiyong
2018-05-23 11:58 ` Thomas Monjalon
2018-05-21 16:37 ` Ferruh Yigit
2018-05-21 16:40 ` Thomas Monjalon
2018-05-21 16:44 ` Ferruh Yigit
2018-05-21 19:12 ` Thomas Monjalon
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=9489790.cv73CZovxU@xps \
--to=thomas@monjalon.net \
--cc=bernard.iremonger@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=harry.van.haaren@intel.com \
--cc=lei.a.yao@intel.com \
--cc=matan@mellanox.com \
--cc=maxime.coquelin@redhat.com \
--cc=stable@dpdk.org \
--cc=tiwei.bie@intel.com \
--cc=zhiyong.yang@intel.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).