From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E2910A04DE; Tue, 22 Sep 2020 05:04:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A6E801D58E; Tue, 22 Sep 2020 05:04:53 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 578D21D441 for ; Tue, 22 Sep 2020 05:04:52 +0200 (CEST) IronPort-SDR: f7Ap+kcldOH5/EXEk46ukJdWZt0mHmcHkDcCZnPL0JTbZPldV+fNg6NHOk838FOcJPVl08hkVB 11o0OqGLCV+A== X-IronPort-AV: E=McAfee;i="6000,8403,9751"; a="161445076" X-IronPort-AV: E=Sophos;i="5.77,289,1596524400"; d="scan'208";a="161445076" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2020 20:04:51 -0700 IronPort-SDR: DYJz+/wDoIaEiGgd6u25C/QToyviQiwbjD0JrY0JwW8XL2Xv9htHUlJ0oPzyy/4KXs/4/pJAv/ BSkW+Kk5S6OQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,289,1596524400"; d="scan'208";a="412513406" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga001.fm.intel.com with ESMTP; 21 Sep 2020 20:04:50 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 21 Sep 2020 20:04:50 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 21 Sep 2020 20:04:50 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.173) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Mon, 21 Sep 2020 20:04:45 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OvcUzt3GFBo4ySANrM5PQboIIFFe+b/QWFU1cH8QMpUBmlrnk0bHbfOOyeJ+fHW/u1FcMU7pHLLqTxJfCfH4Ky4HFIPo/ujlycVGVAk1BYK5wPPiqjIIVzbkG00I9NOS51P9o3pwoJywHjR05wb/GtgsN19k0/IWIxPoY3H5yqByMp39DT3DTdBhXIQ7Se6h/mtFmlTweLtcgbLhTjVUEJJe7DeHBr0Qe0mjrGp7sAdsJBF4sKKQx1MIByg/aFXGn1T1/zv7cFGBMgKx6ZUasNE3li6jvPNKVZzP35JicpdxAdY4G5oupyRVtBR2hZTg1vcGsCJxFJyFlOqwv0bKXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=87GQnLKqQptRbGDnDIZWSO+hK34I3nscPxqgEl78pAM=; b=K373/j5PuyPugJB0RbkbWqSIsJr0nUNvaKcopRChTKZmKzWdIKOHmhO1bQpQX4Ur7QWanoL/TiZPDWyXVML6eiFgglBkVBdffwkpaZtY1V3TzqQs0/lEQzJDik3uxgOOtQmMJ3xLxHF28oFpR3cf9dsr4Xfm5q3tqXNlH4/NsAlwRsNhjB8eW/g43OFm7HCmuZxNZY6w+xRUt8ap64oDdctiWK5itPO1t4u4aDEFgkRtZzkOgpGA2rONVEsmKWecPTUXVd2VBCB+153RmSj/wjH87eJYq5/fICZNKWNrq+RW6MXEiwVfCPB0fOJAL/epuXIjwlZJlcNdunlwLstNQQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=87GQnLKqQptRbGDnDIZWSO+hK34I3nscPxqgEl78pAM=; b=cgJIKNhLzudztbHvvMyzm7Jb3rBswABHFQkgcEJa1SycfjqCLlrvkeQ87YIO3hXgSWEGnCkEX3IOd4nccuXOoCaaeA97Ujj73DnjchVAW90TYEsW5Od3NicWcY2tCJgHRARlDifNzvhZTBmOjY2YTe+xLbF4GtfPhN2BBfHEWhY= Received: from BYAPR11MB2901.namprd11.prod.outlook.com (2603:10b6:a03:91::23) by BYAPR11MB3767.namprd11.prod.outlook.com (2603:10b6:a03:fd::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.11; Tue, 22 Sep 2020 03:04:36 +0000 Received: from BYAPR11MB2901.namprd11.prod.outlook.com ([fe80::515:a970:3fec:fb73]) by BYAPR11MB2901.namprd11.prod.outlook.com ([fe80::515:a970:3fec:fb73%6]) with mapi id 15.20.3391.024; Tue, 22 Sep 2020 03:04:36 +0000 From: "Xu, Rosen" To: Thomas Monjalon , "John W. Linville" , "Zhang, Qi Z" , "Shepard Siegel" , Ed Czeck , John Miller , "Igor Russkikh" , Pavel Belous , Matt Peters , Rasesh Mody , Shahed Shaikh , "Ajit Khaparde" , Somnath Kotur , Chas Williams , Rahul Lakkireddy , Hemant Agrawal , Marcin Wojtas , Michal Krawczyk , "Guy Tzalik" , Evgeny Schemeilin , Gagandeep Singh , John Daley , "Hyong Youb Kim" , Gaetan Rivet , "Wang, Xiao W" , "Yang, Qiming" , "Yigit, Ferruh" , Shijith Thotton , Srisivasubramanian Srinivasan , Matan Azrad , Shahaf Shuler , Zyta Szpak , Liron Himi , Stephen Hemminger , "K. Y. Srinivasan" , "Haiyang Zhang" , Jerin Jacob , "Richardson, Bruce" , Andrew Rybchenko , "Singh, Jasvinder" , "Dumitrescu, Cristian" , "Wiles, Keith" , Maciej Czekaj , Maxime Coquelin , "Wang, Zhihong" , "Yong Wang" , "Burakov, Anatoly" , "Xing, Beilei" , "Wu, Jingjing" , "dev@dpdk.org" CC: "dev@dpdk.org" , "Loftus, Ciara" , Steven Webster , Somalapuram Amaranath , "xavier.huwei@huawei.com" , Sachin Saxena , "Zhao1, Wei" , "Guo, Jia" , Igor Chauskin , "Ziyang Xuan" , Xiaoyun Wang , Guoyang Zhou , "Min Hu (Connor)" , Yisen Zhuang , "Alfredo Cardigliano" , Jakub Grajciar , Viacheslav Ovsiienko , Long Li , Martin Spinler , Heinrich Kuhn , Harman Kalra , "Nithin Dabilpuram" , Kiran Kumar K , Akhil Goyal , "Yigit, Ferruh" Thread-Topic: [dpdk-dev] CALL to eth PMD maintainers: complete closing of port Thread-Index: AQHWaccp7bSo0LLdjU+/uEWiptyupqllG1IAgAJIH4CADOKAEA== Date: Tue, 22 Sep 2020 03:04:36 +0000 Message-ID: References: <30528485.5cHeq7CNxZ@xps> <5248162.j6AOsuQRmx@thomas> <7235002.MNFtMmeBO2@thomas> <80837131.n3tlCtGQ32@thomas> In-Reply-To: <80837131.n3tlCtGQ32@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.5.1.3 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNWJmNGJhZjgtZjMyNS00MzFlLTlhYTItNTI5NzJkODY1ZTgzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoicm5lSFVhV1EwXC8yNjJCbDFNdklXeFwvcUNZUG52XC9ZWTR5QVNieE94SmI1VUZrVkhlSzhnXC9OQjNiQWMrcTY0NjQifQ== x-ctpclassification: CTP_NT authentication-results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.218] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 15c352cd-f668-4c86-b6b1-08d85ea43d0d x-ms-traffictypediagnostic: BYAPR11MB3767: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: thcAiBWdG6ky9K1s8ldTykdrOv+P40YEK8mywg6nTEknPqR/KVPoBUldfHHDVTtVAGGqqAjkJFa3rxiEVjk9Sqv+8RBzqWoNkRJ6TYI7+pXSUY1GBRfCxwpbKYcHadVZigFWDFCQqzfewPkJFaGO/KBex0rZHMkbjW2ijvrE7BaYvlD6LH6cUsBnZkjaqX4+sAwk8lI4ATMZ6Zr169LBhaBr85cWHu3Y3j399p3WAxVa6ZSNjsM/nrYM4B1RkXZZVx8ADXMsnQJs0HNE1Fj5ZQmQZn8UE9mIih6pPRDgVpdALhf70WUZ8Di1t92Xxjnd7SZpa27deoo2LhRviu9az3OcLtwmh1cy7lgU17IJ5kxOTdpcKdl1R1ZgHpYRx/JfozjWr8X3xuzl1iKmoZyNPoDdjx1nfL+Jc/QiABpPKQAn0G5LKsM9I6Ig6oBzwLLpl0zdPkDeFy+PO64t7JQfMH/XZ6qNiJW2ltApLCww9E4= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2901.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(136003)(346002)(376002)(396003)(366004)(2906002)(66446008)(66946007)(64756008)(26005)(110136005)(66476007)(6506007)(478600001)(966005)(66556008)(186003)(71200400001)(316002)(76116006)(5660300002)(7696005)(54906003)(52536014)(53546011)(4326008)(1191002)(7416002)(7366002)(33656002)(7406005)(107886003)(8936002)(8676002)(86362001)(55016002)(83380400001)(9686003)(156664002)(921003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: GQ+9XCP1L2bnqAv57rxc+08XTrfEIm4zP3wc7ftvrnUVd9bw5Dv2vXyMPz8HumoU1M6lpy1k6VnNuV7DOVYG1HJJeMuEOOIv8aMX3ApR+OA88w8mXpFoA/39SfcmEWL2bxJ5Cr3YZ9l/ooIXiS9/s/2TUoe+ZgC/aThdqU5hsxw4TyHQ1k6p29yHvg7A9s2ENSKiq+grE5ZRQGwAFY7sGWCe3WLChsU/5cqyfwR5sP+sXw7N1iPTzPrv7zwBmRnEIV+hptbj/EIHTrz7iOwcuoyy5hrf6/EiJpxxtg4u9SOzEzq4rjXHwrWV7d9JSsYSjzvyhBpcymcjWJY2QM+UPQHH8aesZoA/79g1CCXvU7x3SZUfCyHUh3umhaNKmEDib7ZwNO/Odu7Jb+gqLv7rEHQHwxcYgGf4J2TPCD+eSE2HudydQBTniWmvKuD34FykTts6oYHm3645S3sPwsvpas8SENSz0La6lEIvIAKOty7ywlVvfzZuV2guBtJ+RvtOVETOG6qJbuy5AP38LF1QyWjz+ypAkTmrqwr2TSQkpou+HcTpRx/zdGM6XL+QKoenExt/QMf86KCpirepuKzhAOr3QcBtf3CCBgtO7FT48aNnX4RC3p9DNNatii/7POS64cdZcAxHMn341znz6YaD/Q== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2901.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 15c352cd-f668-4c86-b6b1-08d85ea43d0d X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Sep 2020 03:04:36.1833 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Q+JgxYHBQM5Z8oiVlj6PFyLX7E2T9KbjCJ7BfgPbUCeVVOOuy2s66xa+NNM2YJFDhw8FmeU3nItXSg6jXyecxw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3767 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] CALL to eth PMD maintainers: complete closing of port X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Thomas, Ipn3ke is based on ifpga_bus, and all ethdevs created from ipn3ke are repre= sentors. So it's no need to add RTE_ETH_DEV_CLOSE_REMOVE flags into ipn3ke driver. Thanks, Rosen > -----Original Message----- > From: Thomas Monjalon > Sent: Monday, September 14, 2020 6:16 > To: John W. Linville ; Zhang, Qi Z > ; Shepard Siegel ; > Ed Czeck ; John Miller > ; Igor Russkikh > ; Pavel Belous ; > Matt Peters ; Rasesh Mody > ; Shahed Shaikh ; Ajit > Khaparde ; Somnath Kotur > ; Chas Williams ; Rahul > Lakkireddy ; Hemant Agrawal > ; Marcin Wojtas ; Michal > Krawczyk ; Guy Tzalik ; Evgeny > Schemeilin ; Gagandeep Singh ; > John Daley ; Hyong Youb Kim ; > Gaetan Rivet ; Wang, Xiao W ; > Yang, Qiming ; Yigit, Ferruh > ; Shijith Thotton ; > Srisivasubramanian Srinivasan ; Matan Azrad > ; Shahaf Shuler ; Zyta > Szpak ; Liron Himi ; Stephen > Hemminger ; K. Y. Srinivasan > ; Haiyang Zhang ; Jerin > Jacob ; Richardson, Bruce > ; Andrew Rybchenko > ; Singh, Jasvinder > ; Dumitrescu, Cristian > ; Wiles, Keith ; > Maciej Czekaj ; Maxime Coquelin > ; Wang, Zhihong > ; Yong Wang ; > Burakov, Anatoly ; Xing, Beilei > ; Wu, Jingjing ; > dev@dpdk.org > Cc: Xu, Rosen ; dev@dpdk.org; Loftus, Ciara > ; Steven Webster ; > Somalapuram Amaranath ; > xavier.huwei@huawei.com; Sachin Saxena ; > Zhao1, Wei ; Guo, Jia ; Igor > Chauskin ; Ziyang Xuan ; > Xiaoyun Wang ; Guoyang Zhou > ; Min Hu (Connor) ; > Yisen Zhuang ; Alfredo Cardigliano > ; Jakub Grajciar ; Viacheslav > Ovsiienko ; Long Li ; > Martin Spinler ; Heinrich Kuhn > ; Harman Kalra ; > Nithin Dabilpuram ; Kiran Kumar K > ; Akhil Goyal ; Yigit, > Ferruh ; Thomas Monjalon > Subject: Re: [dpdk-dev] CALL to eth PMD maintainers: complete closing of > port >=20 > The patches for removing RTE_ETH_DEV_CLOSE_REMOVE are sent: > https://patches.dpdk.org/project/dpdk/list/?series=3D12173 >=20 > 11 drivers are not supporting the new behaviour correctly: > bnx2x, cxgbe, dpaa, dpaa2, enetc, ionic, > ipn3ke, liquidio, nfp, pfe, qede >=20 > If you are the maintainer of one of these drivers, you can still consider= fixing > it in the next days. >=20 >=20 > 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=3D23ea57a2a > > > > " > > > > 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. >=20 >=20