DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Xu, Rosen" <rosen.xu@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>,
	"John W. Linville" <linville@tuxdriver.com>,
	"Zhang, Qi Z" <qi.z.zhang@intel.com>,
	"Shepard Siegel" <shepard.siegel@atomicrules.com>,
	Ed Czeck <ed.czeck@atomicrules.com>,
	John Miller <john.miller@atomicrules.com>,
	"Igor Russkikh" <igor.russkikh@aquantia.com>,
	Pavel Belous <pavel.belous@aquantia.com>,
	Matt Peters <matt.peters@windriver.com>,
	Rasesh Mody <rmody@marvell.com>,
	Shahed Shaikh <shshaikh@marvell.com>,
	"Ajit Khaparde" <ajit.khaparde@broadcom.com>,
	Somnath Kotur <somnath.kotur@broadcom.com>,
	Chas Williams <chas3@att.com>,
	Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>,
	Hemant Agrawal <hemant.agrawal@nxp.com>,
	Marcin Wojtas <mw@semihalf.com>,
	Michal Krawczyk <mk@semihalf.com>,
	"Guy Tzalik" <gtzalik@amazon.com>,
	Evgeny Schemeilin <evgenys@amazon.com>,
	Gagandeep Singh <g.singh@nxp.com>,
	John Daley <johndale@cisco.com>,
	"Hyong Youb Kim" <hyonkim@cisco.com>,
	Gaetan Rivet <grive@u256.net>,
	"Wang, Xiao W" <xiao.w.wang@intel.com>,
	"Yang, Qiming" <qiming.yang@intel.com>,
	"Yigit, Ferruh" <ferruh.yigit@intel.com>,
	Shijith Thotton <sthotton@marvell.com>,
	Srisivasubramanian Srinivasan <srinivasan@marvell.com>,
	Matan Azrad <matan@mellanox.com>,
	Shahaf Shuler <shahafs@mellanox.com>,
	Zyta Szpak <zr@semihalf.com>, Liron Himi <lironh@marvell.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	"Haiyang Zhang" <haiyangz@microsoft.com>,
	Jerin Jacob <jerinj@marvell.com>,
	"Richardson, Bruce" <bruce.richardson@intel.com>,
	Andrew Rybchenko <arybchenko@solarflare.com>,
	"Singh, Jasvinder" <jasvinder.singh@intel.com>,
	"Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>,
	"Wiles, Keith" <keith.wiles@intel.com>,
	Maciej Czekaj <mczekaj@marvell.com>,
	Maxime Coquelin <maxime.coquelin@redhat.com>,
	"Wang, Zhihong" <zhihong.wang@intel.com>,
	"Yong Wang" <yongwang@vmware.com>,
	"Burakov, Anatoly" <anatoly.burakov@intel.com>,
	"Xing, Beilei" <beilei.xing@intel.com>,
	"Wu, Jingjing" <jingjing.wu@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Loftus, Ciara" <ciara.loftus@intel.com>,
	Steven Webster <steven.webster@windriver.com>,
	Somalapuram Amaranath <asomalap@amd.com>,
	"xavier.huwei@huawei.com" <xavier.huwei@huawei.com>,
	Sachin Saxena <sachin.saxena@nxp.com>,
	"Zhao1, Wei" <wei.zhao1@intel.com>,
	"Guo, Jia" <jia.guo@intel.com>, Igor Chauskin <igorch@amazon.com>,
	"Ziyang Xuan" <xuanziyang2@huawei.com>,
	Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>,
	Guoyang Zhou <zhouguoyang@huawei.com>,
	"Min Hu (Connor)" <humin29@huawei.com>,
	Yisen Zhuang <yisen.zhuang@huawei.com>,
	"Alfredo Cardigliano" <cardigliano@ntop.org>,
	Jakub Grajciar <jgrajcia@cisco.com>,
	Viacheslav Ovsiienko <viacheslavo@mellanox.com>,
	Long Li <longli@microsoft.com>,
	Martin Spinler <spinler@cesnet.cz>,
	Heinrich Kuhn <heinrich.kuhn@netronome.com>,
	Harman Kalra <hkalra@marvell.com>,
	"Nithin Dabilpuram" <ndabilpuram@marvell.com>,
	Kiran Kumar K <kirankumark@marvell.com>,
	Akhil Goyal <akhil.goyal@nxp.com>,
	"Yigit, Ferruh" <ferruh.yigit@intel.com>
Subject: Re: [dpdk-dev] CALL to eth PMD maintainers: complete closing of port
Date: Tue, 22 Sep 2020 03:04:36 +0000	[thread overview]
Message-ID: <BYAPR11MB2901658312DC777FEDC28C84893B0@BYAPR11MB2901.namprd11.prod.outlook.com> (raw)
In-Reply-To: <80837131.n3tlCtGQ32@thomas>

Hi Thomas,

Ipn3ke is based on ifpga_bus, and all ethdevs created from ipn3ke are representors.
So it's no need to add RTE_ETH_DEV_CLOSE_REMOVE flags into ipn3ke driver.

Thanks,
Rosen

> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Monday, September 14, 2020 6:16
> To: John W. Linville <linville@tuxdriver.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Shepard Siegel <shepard.siegel@atomicrules.com>;
> Ed Czeck <ed.czeck@atomicrules.com>; John Miller
> <john.miller@atomicrules.com>; Igor Russkikh
> <igor.russkikh@aquantia.com>; Pavel Belous <pavel.belous@aquantia.com>;
> Matt Peters <matt.peters@windriver.com>; Rasesh Mody
> <rmody@marvell.com>; Shahed Shaikh <shshaikh@marvell.com>; Ajit
> Khaparde <ajit.khaparde@broadcom.com>; Somnath Kotur
> <somnath.kotur@broadcom.com>; Chas Williams <chas3@att.com>; Rahul
> Lakkireddy <rahul.lakkireddy@chelsio.com>; Hemant Agrawal
> <hemant.agrawal@nxp.com>; Marcin Wojtas <mw@semihalf.com>; Michal
> Krawczyk <mk@semihalf.com>; Guy Tzalik <gtzalik@amazon.com>; Evgeny
> Schemeilin <evgenys@amazon.com>; Gagandeep Singh <g.singh@nxp.com>;
> John Daley <johndale@cisco.com>; Hyong Youb Kim <hyonkim@cisco.com>;
> Gaetan Rivet <grive@u256.net>; Wang, Xiao W <xiao.w.wang@intel.com>;
> Yang, Qiming <qiming.yang@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; Shijith Thotton <sthotton@marvell.com>;
> Srisivasubramanian Srinivasan <srinivasan@marvell.com>; Matan Azrad
> <matan@mellanox.com>; Shahaf Shuler <shahafs@mellanox.com>; Zyta
> Szpak <zr@semihalf.com>; Liron Himi <lironh@marvell.com>; Stephen
> Hemminger <sthemmin@microsoft.com>; K. Y. Srinivasan
> <kys@microsoft.com>; Haiyang Zhang <haiyangz@microsoft.com>; Jerin
> Jacob <jerinj@marvell.com>; Richardson, Bruce
> <bruce.richardson@intel.com>; Andrew Rybchenko
> <arybchenko@solarflare.com>; Singh, Jasvinder
> <jasvinder.singh@intel.com>; Dumitrescu, Cristian
> <cristian.dumitrescu@intel.com>; Wiles, Keith <keith.wiles@intel.com>;
> Maciej Czekaj <mczekaj@marvell.com>; Maxime Coquelin
> <maxime.coquelin@redhat.com>; Wang, Zhihong
> <zhihong.wang@intel.com>; Yong Wang <yongwang@vmware.com>;
> Burakov, Anatoly <anatoly.burakov@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> dev@dpdk.org
> Cc: Xu, Rosen <rosen.xu@intel.com>; dev@dpdk.org; Loftus, Ciara
> <ciara.loftus@intel.com>; Steven Webster <steven.webster@windriver.com>;
> Somalapuram Amaranath <asomalap@amd.com>;
> xavier.huwei@huawei.com; Sachin Saxena <sachin.saxena@nxp.com>;
> Zhao1, Wei <wei.zhao1@intel.com>; Guo, Jia <jia.guo@intel.com>; Igor
> Chauskin <igorch@amazon.com>; Ziyang Xuan <xuanziyang2@huawei.com>;
> Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>; Guoyang Zhou
> <zhouguoyang@huawei.com>; Min Hu (Connor) <humin29@huawei.com>;
> Yisen Zhuang <yisen.zhuang@huawei.com>; Alfredo Cardigliano
> <cardigliano@ntop.org>; Jakub Grajciar <jgrajcia@cisco.com>; Viacheslav
> Ovsiienko <viacheslavo@mellanox.com>; Long Li <longli@microsoft.com>;
> Martin Spinler <spinler@cesnet.cz>; Heinrich Kuhn
> <heinrich.kuhn@netronome.com>; Harman Kalra <hkalra@marvell.com>;
> Nithin Dabilpuram <ndabilpuram@marvell.com>; Kiran Kumar K
> <kirankumark@marvell.com>; Akhil Goyal <akhil.goyal@nxp.com>; Yigit,
> Ferruh <ferruh.yigit@intel.com>; Thomas Monjalon <thomas@monjalon.net>
> Subject: Re: [dpdk-dev] CALL to eth PMD maintainers: complete closing of
> port
> 
> The patches for removing RTE_ETH_DEV_CLOSE_REMOVE are sent:
> 	https://patches.dpdk.org/project/dpdk/list/?series=12173
> 
> 11 drivers are not supporting the new behaviour correctly:
> 	bnx2x, cxgbe, dpaa, dpaa2, enetc, ionic,
> 	ipn3ke, liquidio, nfp, pfe, qede
> 
> If you are the maintainer of one of these drivers, you can still consider fixing
> it in the next days.
> 
> 
> 12/09/2020 13:25, Thomas Monjalon:
> > 03/08/2020 20:50, Thomas Monjalon:
> > > 18/04/2019 12:59, Thomas Monjalon:
> > > > Hi all,
> > > >
> > > > Since DPDK 18.11, the behaviour of the close operation is changed
> > > > if RTE_ETH_DEV_CLOSE_REMOVE is enabled in the driver:
> > > > port is released (i.e. totally freed and data erased) on close.
> > > > This new behaviour is enabled per driver for a migration period.
> > > >
> > > > Looking at the code, you can see these comments:
> > > > /* old behaviour: only free queue arrays */ RTE_ETHDEV_LOG(DEBUG,
> > > > "Port closing is using an old behaviour.\n"
> > > > 	"The driver %s should migrate to the new behaviour.\n",
> > > > /* new behaviour: send event + reset state + free all data */
> > > >
> > > > You can find an advice in the commit:
> > > > 	http://git.dpdk.org/dpdk/commit/?id=23ea57a2a
> > > > "
> > > > When enabling RTE_ETH_DEV_CLOSE_REMOVE, the PMD must free all
> its
> > > > private resources for the port, in its dev_close function.
> > > > It is advised to call the dev_close function in the remove
> > > > function in order to support removing a device without closing its ports.
> > > > "
> > > >
> > > > It would be great to complete this migration for the next LTS
> > > > version, which will be 19.11.
> > >
> > > For the record, it did not happen in 19.11.
> > >
> > > > Following drivers should be migrated:
> > > > ( find drivers/net -mindepth 1 -maxdepth 1 -type d | cut -d/ -f3 ;
> > > > git grep -l RTE_ETH_DEV_CLOSE_REMOVE drivers | cut -d/ -f3 ) |
> > > > sort | uniq -u
> > > [...]
> > >
> > > The progress in April 2019 was 4 of 46 (9%).
> > >
> > > > Please let's progress smoothly on this topic, thanks.
> > >
> > > More than one year later, the progress is 26 of 53 (49%).
> > >
> > > > The concerned maintainers (Cc) can be found with the following
> command:
> > > > devtools/get-maintainer.sh $(( find drivers/net -mindepth 1
> > > > -maxdepth 1 -type d | cut -d/ -f-3 ; git grep -l
> > > > RTE_ETH_DEV_CLOSE_REMOVE drivers ) | sort | uniq -u)
> > >
> > > We cannot wait forever. Temporary cannot be longer than 2 years.
> > > I am going to send a deprecation notice to remove the "temporary"
> > > flag RTE_ETH_DEV_CLOSE_REMOVE.
> >
> > The deprecation notice was merged in 20.08:
> > 	http://mails.dpdk.org/archives/dev/2020-August/177314.html
> >
> > > It will break drivers which are not migrated.
> > > It will probably help to find motivation in new priorities.
> > >
> > > More details on what to do can be found in this mail thread:
> > > 	http://inbox.dpdk.org/dev/1748144.UFpUr2FPnr@xps/
> >
> > Summary:
> >
> > * The freeing of private port resources must be moved in the PMD from
> > the ".remove(device)" function to the ".dev_close(port)" function.
> >
> > * If a generic resource (.mac_addrs or .hash_mac_addrs) cannot be
> > freed, it must be set to NULL in ".dev_close" PMD function to protect
> > from subsequent rte_eth_dev_release_port() freeing.
> >
> > * Note 1:
> > The generic resources are freed in rte_eth_dev_release_port(), after
> > ".dev_close" is called in rte_eth_dev_close(), but not when calling
> > ".dev_close" directly from the ".remove" PMD function.
> > That's why rte_eth_dev_release_port() must still be called explicitly
> > from ".remove(device)" after calling the ".dev_close" PMD function.
> >
> > * Note 2:
> > If a device can have multiple ports, the common resources must be
> > freed only in the ".remove(device)" function.
> >
> > * Note 3:
> > The port is supposed to be in a stopped state when it is closed.
> > If it is not the case, it is free to the PMD implementation how to
> > react when trying to close a non-stopped port:
> > either try to stop it automatically or just return an error.
> 
> 


  parent reply	other threads:[~2020-09-22  3:04 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-18 10:59 Thomas Monjalon
2019-04-18 10:59 ` Thomas Monjalon
2019-04-28  6:57 ` Matan Azrad
2019-04-28  6:57   ` Matan Azrad
2019-04-28 16:17   ` Stephen Hemminger
2019-04-28 16:17     ` Stephen Hemminger
2019-04-29 16:51 ` Ferruh Yigit
2019-04-29 16:51   ` Ferruh Yigit
2019-04-29 20:30   ` Thomas Monjalon
2019-04-29 20:30     ` Thomas Monjalon
2019-04-30 12:45     ` Nithin Dabilpuram
2019-04-30 12:45       ` Nithin Dabilpuram
2019-04-30 14:12       ` Thomas Monjalon
2019-04-30 14:12         ` Thomas Monjalon
2020-08-03 18:50 ` Thomas Monjalon
2020-09-12 11:25   ` Thomas Monjalon
2020-09-13 22:16     ` Thomas Monjalon
2020-09-14  9:20       ` Rahul Lakkireddy
2020-09-22  3:04       ` Xu, Rosen [this message]
2020-09-22  7:28         ` Thomas Monjalon
2020-09-27  5:42           ` Xu, Rosen
2020-09-25  4:22       ` Rasesh Mody

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=BYAPR11MB2901658312DC777FEDC28C84893B0@BYAPR11MB2901.namprd11.prod.outlook.com \
    --to=rosen.xu@intel.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=akhil.goyal@nxp.com \
    --cc=anatoly.burakov@intel.com \
    --cc=arybchenko@solarflare.com \
    --cc=asomalap@amd.com \
    --cc=beilei.xing@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=cardigliano@ntop.org \
    --cc=chas3@att.com \
    --cc=ciara.loftus@intel.com \
    --cc=cloud.wangxiaoyun@huawei.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=ed.czeck@atomicrules.com \
    --cc=evgenys@amazon.com \
    --cc=ferruh.yigit@intel.com \
    --cc=g.singh@nxp.com \
    --cc=grive@u256.net \
    --cc=gtzalik@amazon.com \
    --cc=haiyangz@microsoft.com \
    --cc=heinrich.kuhn@netronome.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=hkalra@marvell.com \
    --cc=humin29@huawei.com \
    --cc=hyonkim@cisco.com \
    --cc=igor.russkikh@aquantia.com \
    --cc=igorch@amazon.com \
    --cc=jasvinder.singh@intel.com \
    --cc=jerinj@marvell.com \
    --cc=jgrajcia@cisco.com \
    --cc=jia.guo@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=john.miller@atomicrules.com \
    --cc=johndale@cisco.com \
    --cc=keith.wiles@intel.com \
    --cc=kirankumark@marvell.com \
    --cc=kys@microsoft.com \
    --cc=linville@tuxdriver.com \
    --cc=lironh@marvell.com \
    --cc=longli@microsoft.com \
    --cc=matan@mellanox.com \
    --cc=matt.peters@windriver.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=mczekaj@marvell.com \
    --cc=mk@semihalf.com \
    --cc=mw@semihalf.com \
    --cc=ndabilpuram@marvell.com \
    --cc=pavel.belous@aquantia.com \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=rahul.lakkireddy@chelsio.com \
    --cc=rmody@marvell.com \
    --cc=sachin.saxena@nxp.com \
    --cc=shahafs@mellanox.com \
    --cc=shepard.siegel@atomicrules.com \
    --cc=shshaikh@marvell.com \
    --cc=somnath.kotur@broadcom.com \
    --cc=spinler@cesnet.cz \
    --cc=srinivasan@marvell.com \
    --cc=steven.webster@windriver.com \
    --cc=sthemmin@microsoft.com \
    --cc=sthotton@marvell.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@mellanox.com \
    --cc=wei.zhao1@intel.com \
    --cc=xavier.huwei@huawei.com \
    --cc=xiao.w.wang@intel.com \
    --cc=xuanziyang2@huawei.com \
    --cc=yisen.zhuang@huawei.com \
    --cc=yongwang@vmware.com \
    --cc=zhihong.wang@intel.com \
    --cc=zhouguoyang@huawei.com \
    --cc=zr@semihalf.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).