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 26039A04DB; Tue, 29 Sep 2020 04:27:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F3C5D1D5D3; Tue, 29 Sep 2020 04:27:54 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 7939E1D5EC for ; Tue, 29 Sep 2020 04:27:52 +0200 (CEST) IronPort-SDR: PXaqTum15q3LhRTRQz8cG2cuVcrUBj9SwS06jfmEsxbli7UAiJzbeUnzRcGo7WgOVeZleMAndC DsjVlXWDw3BQ== X-IronPort-AV: E=McAfee;i="6000,8403,9758"; a="149877090" X-IronPort-AV: E=Sophos;i="5.77,316,1596524400"; d="scan'208";a="149877090" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2020 19:27:50 -0700 IronPort-SDR: UEuCv6y7cs+c8vsWU4/WqOM/WqBR8RQSFuALi0qT24OzYI9GgYm+i+r45zSXfGOpsKQwhbBhzj nWIunJMsUuXQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,316,1596524400"; d="scan'208";a="345111411" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga002.fm.intel.com with ESMTP; 28 Sep 2020 19:27:49 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 28 Sep 2020 19:27:49 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) 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, 28 Sep 2020 19:27:49 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.107) 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, 28 Sep 2020 19:27:45 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HyIj4ta1mIQP4aymILg9TiWSY2e8aXFl2V3wfXqq8mQWTnibUnp1Xml1Ehz3TCbuWwxzBc6JETLNIrZMAXdRyyKR1XOqEULKC5tmadlfLWluLOg2VtLYLM3iDdZL3G/DlrirR2DUO9PgyWXcLBdvxbDxItam/sQIk54Cdg1rX26S4Mxe89h0mNp2BAYtBLxa29jsy5V2tqIlQqvqnIVZICqRAcPUHBEUkXo+dHTUpQ2AYA/YaxUitgDs2q100lnDUo5ZmprDtN9y2G6Jw4VLZQM8FEeXImxCFVS9as5YR9ip7U38Lfa1bx9h+c8DE6ZtYfxir7h+M58U9EU/LtUicg== 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=ziHjDeEHfT/u6gQEmWFeDe94MG3qDj6APC2pVVDuXms=; b=EuuW9C5IB+a3kBZYwCdTcMyjdi7Lue6YHapLNQD8EkUXEtNhEJ1O17xxv0WyiJioBZeWWbg2jT+83sBMfzkGSRYRkKBY7eyP3ocLmI5DBvw9nO2DD1of6ArUURE3xCEgqaxp0MCvFRgmBgiYEqFJr5sKEOQsdMVO04CbivuNYlUSA5uYp3FVpj8xiut+YBsq53rdPe9gXJm3JKhQk1yfbwourXHdqMPShdE7wOoCAl8F4jhZ6wCWmG0mKJFVhPnL334CDKFmCrwlpBLnji04SLxqVkzNydndFJ1ooR/GiVYeGrfX2ys/YLASjTVIa5gpW1053z35H7ZOs7NgnGSwUQ== 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=ziHjDeEHfT/u6gQEmWFeDe94MG3qDj6APC2pVVDuXms=; b=I4buh9hjrRoh/E5MsslNhGf/TmvTs9s21AyCmTVA5IHYNtqIE32M2TA7JIdWK/oqSz0W0FEcH8dzvyp6reILKvs3v1u4hntN+S3alUSTrWVDTujYL8BAakxbsWM0JjZQDOe5g4aq3ZDDErqkqnPlN2x1qjzt/G4UZBBK86g5PCg= Received: from BN8PR11MB3795.namprd11.prod.outlook.com (2603:10b6:408:82::31) by BN8PR11MB3556.namprd11.prod.outlook.com (2603:10b6:408:8d::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.24; Tue, 29 Sep 2020 02:27:35 +0000 Received: from BN8PR11MB3795.namprd11.prod.outlook.com ([fe80::e4a8:91ab:e032:b8ae]) by BN8PR11MB3795.namprd11.prod.outlook.com ([fe80::e4a8:91ab:e032:b8ae%5]) with mapi id 15.20.3412.029; Tue, 29 Sep 2020 02:27:35 +0000 From: "Wang, Haiyue" To: Thomas Monjalon , "dev@dpdk.org" CC: "Yigit, Ferruh" , "arybchenko@solarflare.com" , Shijith Thotton , Srisivasubramanian Srinivasan , Heinrich Kuhn , Alfredo Cardigliano , Liron Himi , Ray Kinsella , Neil Horman , "John W. Linville" , "Loftus, Ciara" , "Zhang, Qi Z" , Shepard Siegel , "Ed Czeck" , John Miller , Igor Russkikh , Pavel Belous , Steven Webster , Matt Peters , Somalapuram Amaranath , Rasesh Mody , Shahed Shaikh , Ajit Khaparde , "Somnath Kotur" , Chas Williams , "Wei Hu (Xavier)" , Rahul Lakkireddy , Hemant Agrawal , Sachin Saxena , "Guo, Jia" , Marcin Wojtas , Michal Krawczyk , "Guy Tzalik" , Evgeny Schemeilin , "Igor Chauskin" , Gagandeep Singh , John Daley , Hyong Youb Kim , Gaetan Rivet , "Wang, Xiao W" , Ziyang Xuan , Xiaoyun Wang , Guoyang Zhou , "Min Hu (Connor)" , Yisen Zhuang , "Xing, Beilei" , "Wu, Jingjing" , "Yang, Qiming" , Jakub Grajciar , "Matan Azrad" , Shahaf Shuler , "Viacheslav Ovsiienko" , Zyta Szpak , "Stephen Hemminger" , "K. Y. Srinivasan" , Haiyang Zhang , Long Li , Martin Spinler , Tetsuya Mukawa , Harman Kalra , Jerin Jacob , "Nithin Dabilpuram" , Kiran Kumar K , Akhil Goyal , "Richardson, Bruce" , "Singh, Jasvinder" , "Dumitrescu, Cristian" , "Wiles, Keith" , Maxime Coquelin , "Xia, Chenbo" , "Wang, Zhihong" , Yong Wang Thread-Topic: [PATCH v3 21/29] ethdev: remove old close behaviour Thread-Index: AQHWle1WscGBoqpljE+WWxyojXrZsKl+4VSg Date: Tue, 29 Sep 2020 02:27:34 +0000 Message-ID: References: <20200913220711.3768597-1-thomas@monjalon.net> <20200928231437.414489-1-thomas@monjalon.net> <20200928231437.414489-22-thomas@monjalon.net> In-Reply-To: <20200928231437.414489-22-thomas@monjalon.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 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.102.204.38] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 733d41da-5524-426d-2f5c-08d8641f39ee x-ms-traffictypediagnostic: BN8PR11MB3556: 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:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: c+OawYLp90PPNcsuDT7b6McDEdX1Ww+5/1nJtF68jAkcZxKcj7En2Tu6CB9iwodQizoHXIWsqiTPruVcDZzw+a9u1p895hYgOaACOuPsg87jEFXY6nkHDSLHE6BzfYgezjT9SPAJDH8ED9MA7+4EJLL7Szql5ZVwhJg750kAWN2ug5LOXYJKeOemrT/T9xm0j/ywFfZRskq2KISjLWnvSmTR0oQ0j0JCw3awes4n6EiiM4CcFOzSsHGbuAU7OKEDCnbEmqRmkaPREEQ/Qs0bwwtFOHRP0I6iIRGkU2eYrkWc8JuhaqPKSCZ4ZDbhzC002txSdpVUJ5jiVRaUMcnQNvq74j36q0jz/P3mpzMhVaEvFj/jUFwWSc4CHFIt6uh5 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN8PR11MB3795.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(376002)(396003)(136003)(366004)(39860400002)(66446008)(64756008)(4326008)(55016002)(5660300002)(8936002)(8676002)(186003)(7696005)(53546011)(6506007)(83380400001)(9686003)(26005)(7406005)(7366002)(110136005)(478600001)(7416002)(54906003)(316002)(33656002)(66476007)(66946007)(66556008)(71200400001)(76116006)(2906002)(52536014)(86362001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: ljFBtupqcjpObJrZBPQQk2N8/WTAKgOwRhXclAFGOuAbY4SkCEYK7hGtbw4MjgjtC+Ch8UJKX5xpnkyep2LW9LfBbJbLYbQV+fPiZu3FdPB93k0xEYL2MP7KS7pRQMxSpwAB7l7pAkIn3fqWfMvt6/qbTXtopRDznma9fj/Tx9XIC0sZLhC0S4Wm2Ev2KltT0StWtQRCm3tiDd357LulqkVvom1Tp40LFNizPZorBNCU939xTtHW4W+99YlnbHytuqFdX654T6QaiGuwSfnVe2wFV6LRLim9SHjtQYhkUXxkceiS47tippuOR4ZRZeGf6bJU/6XJiFAeTn09M6brNPZpAZ5pa32lUoKL+ag5dM/cEVYU56aLp7QxwOb2/eOZNUWsgjn2NXU1qPVI1nJlSQICLy1hyU4DUtDKyisttwQdznYgEDyVkpXZbodv0GSud9x5fStqaBceYTZeM1HHXPuOl+iOp/9SfbbnNHh2Y7ghOnANkX8ToNhtwAw2YQfaufZpgDtbXWgu+jTW/t2nXxupaDoeIeFrpD++xUHCnjztb9abrbrisxaoNG9PPuay3O/waybglA6VBLLFSZhNBpAnXxXQUKEfaOKC8g5KVnFAmPCuWqlNjrTH6m/UyggoGu59tnCXw44RXRUV5wHyYQ== 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: BN8PR11MB3795.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 733d41da-5524-426d-2f5c-08d8641f39ee X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Sep 2020 02:27:34.5993 (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: N1btioLcWVZy+XCYUmtCoVMvLNKGJj1rX42f72vHMDmDjiQo9KdXZ1PLwP2mYAxpVNRaC7xFdGzASUgEqym48w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR11MB3556 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 21/29] ethdev: remove old close behaviour 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" > -----Original Message----- > From: Thomas Monjalon > Sent: Tuesday, September 29, 2020 07:14 > To: dev@dpdk.org > Cc: Yigit, Ferruh ; arybchenko@solarflare.com; Sh= ijith Thotton > ; Srisivasubramanian Srinivasan ; Heinrich Kuhn > ; Alfredo Cardigliano = ; Liron Himi > ; Ray Kinsella ; Neil Horman ; John W. > Linville ; Loftus, Ciara = ; Zhang, Qi Z > ; Shepard Siegel ; = Ed Czeck > ; John Miller ; Ig= or Russkikh > ; Pavel Belous ; S= teven Webster > ; Matt Peters ; = Somalapuram Amaranath > ; Rasesh Mody ; Shahed Shaikh ; Ajit > Khaparde ; Somnath Kotur ; Chas Williams > ; Wei Hu (Xavier) ; Rahul Lakkire= ddy > ; Hemant Agrawal ; = Sachin Saxena > ; Guo, Jia ; Wang, Haiyue <= haiyue.wang@intel.com>; > Marcin Wojtas ; Michal Krawczyk ; Guy T= zalik ; > Evgeny Schemeilin ; Igor Chauskin = ; Gagandeep Singh > ; John Daley ; Hyong Youb Kim ; Gaetan Rivet > ; Wang, Xiao W ; Ziyang Xuan ; Xiaoyun > Wang ; Guoyang Zhou ; Min Hu (Connor) > ; Yisen Zhuang ; Xing, Beile= i ; Wu, > Jingjing ; Yang, Qiming ; J= akub Grajciar > ; Matan Azrad ; Shahaf Shuler ; Viacheslav > Ovsiienko ; Zyta Szpak ; Stephen= Hemminger > ; K. Y. Srinivasan ; Haiyang Z= hang ; > Long Li ; Martin Spinler ; Tetsu= ya Mukawa > ; Harman Kalra ; Jerin Jacob ; Nithin > Dabilpuram ; Kiran Kumar K ; Akhil Goyal > ; Richardson, Bruce ; Si= ngh, Jasvinder > ; Dumitrescu, Cristian ; Wiles, Keith > ; Maxime Coquelin ; Xi= a, Chenbo > ; Wang, Zhihong ; Yong Wang= > Subject: [PATCH v3 21/29] ethdev: remove old close behaviour >=20 > The temporary flag RTE_ETH_DEV_CLOSE_REMOVE is removed. > It was introduced in DPDK 18.11 in order to give time for PMDs to migrate= . >=20 > The old behaviour was to free only queues when closing a port. > The new behaviour is calling rte_eth_dev_release_port() which does > three more tasks: > - trigger event callback > - reset state and few pointers > - free all generic port resources >=20 > The private port resources must be released in the .dev_close callback. >=20 > The .remove callback should: > - call .dev_close callback > - call rte_eth_dev_release_port() > - free multi-port device shared resources >=20 > Despite waiting two years, some drivers have not migrated, > so they may hit issues with the incompatible new behaviour. > After sending emails, adding logs, and announcing the deprecation, > the only last solution is to declare these drivers as unmaintained: > ionic, liquidio, nfp > Below is a summary of what to implement in those drivers. >=20 > * The freeing of private port resources must be moved > from the ".remove(device)" function to the ".dev_close(port)" function. >=20 > * If a generic resource (.mac_addrs or .hash_mac_addrs) cannot be freed, > it must be set to NULL in ".dev_close" function to protect from > subsequent rte_eth_dev_release_port() freeing. >=20 > * 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. >=20 > * Note 2: > If a device can have multiple ports, the common resources must be freed > only in the ".remove(device)" function. >=20 > * 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 > Cc: Shijith Thotton > Cc: Srisivasubramanian Srinivasan > Cc: Heinrich Kuhn > Cc: Alfredo Cardigliano >=20 > Signed-off-by: Thomas Monjalon > Reviewed-by: Liron Himi > --- > drivers/net/e1000/em_ethdev.c | 5 ----- > drivers/net/e1000/igb_ethdev.c | 10 ---------- > drivers/net/igc/igc_ethdev.c | 5 ----- > drivers/net/ixgbe/ixgbe_ethdev.c | 10 ---------- For e1000/igc/ixgbe Reviewed-by: Haiyue Wang > 2.28.0