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 0723FA04DB; Mon, 28 Sep 2020 20:26:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D5A3D1D685; Mon, 28 Sep 2020 20:26:26 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id D8BC41D5BD for ; Mon, 28 Sep 2020 20:26:23 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 08SIKTK2016474; Mon, 28 Sep 2020 11:25:52 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0220; bh=p1rJUNsnxe4PLKk9WH7tPJJAWeyBpZCdTdv8Ps+/ejc=; b=ksLuD70pzA0NTrT4ASmiiDJ3aq80FjGtbrk+RdFwHdIZKO5S0ddwaq/C3L+frweaW/nY nj5kRRv4yc1GMPP6ThDXJfwDeLSwZT2HYL5a6mihiOZOgmLJ1gVPXW6kpVcm3VPqSM9/ 8zYEcToC76abzfEtCUbw/bFB2gtuT9AT97ZDtiYg9Qa1rgr7NXrH0Gs7ZdW6rpgFingh wIdjkLMbPsNhyPDBi9E3zEroMbKV8zfK/sG3OHI0CgRWVGahjALzkkV5ZT9XTACwkzn4 0Cbn5nclnkfarrtp4SNnd1eYck7Vr8zb9sYAsw4PKSxhd6SZp+OwK2Z4ivX7XEm8GhhQ HQ== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 33teem8d48-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 28 Sep 2020 11:25:51 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 28 Sep 2020 11:25:50 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.169) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Mon, 28 Sep 2020 11:25:50 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dc7LnvMh/+E9s296U/oQA3n0fTNfyr+ymihHr97icwjMyn0+G/1q7t5uFgEBnNbt7gYqWtfghru6Qhw2n8XuAScnBVbofKWzD8C4BXiTZOdejvnGNU2YWzfb71lXQKKtBV6zo860640XAARaehIhiIzbimUiph1AMhgtEse+rBnDWl3rIisq2DnRVzGqCpUB+1VFoPp2zXVF47tnvRa5EhNKOZP/Gc0doXjYGA4Khw2rx8Ziw2EAZ6Av6/xlmmHoOGUa9pB6K2hCuWCQM+T8GAGtr8IWvJpRh/nT9J3w6+1/Mf0LtnIDeYUnO5pmuWcHuTzgqFsii47aI+L9TpLFtw== 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=p1rJUNsnxe4PLKk9WH7tPJJAWeyBpZCdTdv8Ps+/ejc=; b=hpiADHRfUlg4V6/c6QP9MKpA0+HKoXGmtcaceJs/aITE5mfP6dWfHSbbPDU5hoeriE8ji9lsHb7DKDXXE7PgcagCZXdFIp93igBl471M+0ob49hV0w8vPXXRrJzNNnecEXgc5Cj/8FnhgdxbAbHoFRMiyzQo5VBs2cUC77DVkKPZtrt8yhIMbVj1Xq4kXI9KRzWGpLua5fJhhZxkQbH/L+726vyNXfW69feUWoogb7TP2kASkG0G2tIrEPBKVDYnK3ng/m91pIbFzS5lDQITy4YdhilCYFVVkpNSZsjcoRG44KL4NSEBhK+PB5bWZr9sTjRw6Q2G2k5sxf+KHSsWHg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=p1rJUNsnxe4PLKk9WH7tPJJAWeyBpZCdTdv8Ps+/ejc=; b=KeuyccO0gbWrtCC/iDP5gxaehIF358XEt9orSqaTtzAgyGON5dlWqtzSrHEMhFEjVwOvBAl7LRCDuBNOkWRvlIPCCykhTgj2+8VpvHmSH/2T5fjWDZx/bz6NDq4QqvD8LXtlwuZne6zVJ8VYY8il4huAOpKJ0IkmlCV0YrkUY9w= Received: from DM5PR18MB2214.namprd18.prod.outlook.com (2603:10b6:4:b9::21) by DM5PR1801MB2041.namprd18.prod.outlook.com (2603:10b6:4:67::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.26; Mon, 28 Sep 2020 18:25:47 +0000 Received: from DM5PR18MB2214.namprd18.prod.outlook.com ([fe80::d0b8:c02e:9d8e:95b]) by DM5PR18MB2214.namprd18.prod.outlook.com ([fe80::d0b8:c02e:9d8e:95b%3]) with mapi id 15.20.3391.026; Mon, 28 Sep 2020 18:25:47 +0000 From: Liron Himi To: Thomas Monjalon , "dev@dpdk.org" CC: "ferruh.yigit@intel.com" , "arybchenko@solarflare.com" , Shijith Thotton , Srisivasubramanian Srinivasan , Heinrich Kuhn , "Hemant Agrawal" , Sachin Saxena , Gagandeep Singh , Akhil Goyal , "Alfredo Cardigliano" , Ray Kinsella , Neil Horman , "John W. Linville" , "Ciara Loftus" , Qi Zhang , "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 , Jeff Guo , Haiyue Wang , Marcin Wojtas , Michal Krawczyk , Guy Tzalik , Evgeny Schemeilin , Igor Chauskin , John Daley , Hyong Youb Kim , Gaetan Rivet , Xiao Wang , Ziyang Xuan , Xiaoyun Wang , Guoyang Zhou , "Min Hu (Connor)" , Yisen Zhuang , Beilei Xing , Jingjing Wu , Qiming Yang , 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 Kollanukkaran" , Nithin Kumar Dabilpuram , Kiran Kumar Kokkilagadda , Bruce Richardson , Jasvinder Singh , Cristian Dumitrescu , Keith Wiles , "Maxime Coquelin" , Chenbo Xia , Zhihong Wang , Yong Wang , "Liron Himi" Thread-Topic: [EXT] [PATCH v2 17/25] ethdev: remove old close behaviour Thread-Index: AQHWlSgStwYwvwmx4UCA4Us/B1qH6ql+XzAg Date: Mon, 28 Sep 2020 18:25:47 +0000 Message-ID: References: <20200913220711.3768597-1-thomas@monjalon.net> <20200927234249.3198780-1-thomas@monjalon.net> <20200927234249.3198780-18-thomas@monjalon.net> In-Reply-To: <20200927234249.3198780-18-thomas@monjalon.net> Accept-Language: he-IL, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=marvell.com; x-originating-ip: [46.117.144.7] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 33567ae8-6516-4871-1c69-08d863dbebd3 x-ms-traffictypediagnostic: DM5PR1801MB2041: 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: taQEyd3S2xr+zkEFMeKFLStzShix7dmCwHmNMSiceejH2sXCUx5LbzQiPHRj/a/TE+7J4Bwya6LMtiZMfw+wuctdMXYXltWJgAwxFXsU2CTECzn0gqHfPhlt62M/YgNK7DvaaCSH4R0m1CXiQ/EJNAdof0w04ibXS8skcNI1Ix6uuFn+a/Uxsv74n1V4JJjXdFE0k3Eka82mx/LGQN5UETavohgi7iNhY+PuJfP7/5VJndKU+Ygqj43RZo4C9r6Ht2PlHEcJdTulPChMrxbnaHFrDhcrNIvMV6YBSXZOHszGWk4hIa0IOliYchneJsYYB1L4LfkF32l+rGc668CHZbFTjeDxvSw3w/ST99idtY9ZeWzCpDPeMy+68Vf10Dkm/lkfYvbHXjniCQWGvs4Y50h08OYl7jGSZ6f/NkYMyQc7femNdoarjjgU1xmnPrRiY6TnTkvIv0YPQekNXL9J0ULZ5+ODTgMPSUZIEEZqBLjoiQV+zPWeDeGngqoP1X82 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR18MB2214.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(366004)(346002)(376002)(136003)(39850400004)(966005)(110136005)(7366002)(7416002)(7406005)(4326008)(7696005)(5660300002)(55016002)(54906003)(316002)(186003)(9686003)(83380400001)(66476007)(6506007)(26005)(53546011)(2906002)(66446008)(64756008)(66556008)(107886003)(33656002)(8676002)(86362001)(76116006)(52536014)(66946007)(478600001)(30864003)(8936002)(71200400001)(156664002)(559001)(579004); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: 3iOFjgpkYtozFQ3Uhi3hH2irTep/oGA71NWe9sa2+IXPL3lRgoottYttEZPLowwYkobETxxx/8RvIv1BncQcAbO5cCVY776/nau+YiiFDtvWImthLQMnBempXrSFnXaFdIsZ7L6CI8yKXgatPFIZeQFEyFJqtRmewFjDPjvwO4hl+G5IuURGHy4PfRGJQo+kP+/PYw3ktpAspV9eL7zmuy7mkGyrv8BXkjNkb6nSFOV0a7xHQgN6fN0SPeVlbGAQe4uAG9yuV9d0BJtLYNtonFxUdPGEsynwAQEsZuDAipBZTr2Sqy1WKQ9iGTdPj5t56lw9ahffH0d3vHr9W47KlPEkUQ/cnMB+P33e9oLp8UF95nBUY2oGXZs4Jwefz9FaEY4JuwSBDZuE3W7RDrVdH68UBPESPef0gIhMQeIIEDN2/TCyi4Ps/pENKT1W4KMHdyEngLktxjUJ+lOvmR5pt4HRznqiOhkBFTdr5+cZI9ooqDtgOoHfslnXMNR2Oi4DtJsS1XkASq9wSVUJ+8gYYKUAQU0TO+d6K1lMpMeH/AdUIY4nflYBuz5RrmLYjXeu3Yd0Lbw2aoNmGzCrWo6Yr42GCeEu+pa2+Boz74m/N8Lg5UlQ5Jjfyp/ONVeyaDTJy/xJuS+Vra5+XQBkvri+iA== 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: DM5PR18MB2214.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 33567ae8-6516-4871-1c69-08d863dbebd3 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Sep 2020 18:25:47.4786 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: bOYUTPxG5ZoftF0FbQWJVanf3Le5qzNke0HUQreLb4iwWj8F6Ehsoho8fA4N/iNMU81JsxXppDirfImaEV0Mgw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1801MB2041 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-09-28_20:2020-09-28, 2020-09-28 signatures=0 Subject: Re: [dpdk-dev] [EXT] [PATCH v2 17/25] 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" For mvpp2, mvneta. Reviewed-by: Liron Himi -----Original Message----- From: Thomas Monjalon =20 Sent: Monday, 28 September 2020 02:43 To: dev@dpdk.org Cc: ferruh.yigit@intel.com; arybchenko@solarflare.com; Shijith Thotton ; Srisivasubramanian Srinivasan ;= Heinrich Kuhn ; Hemant Agrawal ; Sachin Saxena ; Gagandeep Singh ; Akhil Goyal ; Alfredo Cardigliano ; Ray Kinsella ; Neil Horman ; John W. Linville ; Ciara Loftus ; Qi Zhang ; 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 ; J= eff Guo ; Haiyue Wang ; Marcin Wo= jtas ; Michal Krawczyk ; Guy Tzalik ; Evgeny Schemeilin ; Igor Chauskin ; John Daley ; Hyong Youb Kim ; Gaetan Rivet ; Xiao Wang = ; Ziyang Xuan ; Xiaoyun Wang ; Guoyang Zhou ; Min Hu (Connor) ; Yisen Zhuang ; Beilei Xing ; Jingjing Wu ; Qiming Yang ; Jakub Grajciar ; Matan Azrad ; Shahaf Shuler ; Viacheslav Ovsiienko ; Zyta Szpak ; Liron Himi ; Stephen Hemminger ; K. Y. Srinivasan ; Haiyang Zhang ; Long Li ; Martin Spinler ; Tetsuya Mukawa ; Harman Kalra ; Jerin Jacob Kollanukkaran ; Nithin Kumar Dabilpuram ; Kiran Kuma= r Kokkilagadda ; Bruce Richardson ; Jasvinder Singh ; Cristian Dumitre= scu ; Keith Wiles ; M= axime Coquelin ; Chenbo Xia ; Zhihong Wang ; Yong Wang Subject: [EXT] [PATCH v2 17/25] ethdev: remove old close behaviour External Email ---------------------------------------------------------------------- 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. 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 mo= re tasks: - trigger event callback - reset state and few pointers - free all generic port resources The private port resources must be released in the .dev_close callback. The .remove callback should: - call .dev_close callback - call rte_eth_dev_release_port() - free multi-port device shared resources 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: dpaa, dpaa2, enetc, ionic, liquidio, nfp, pfe Below is a summary of what t= o implement in those drivers. * The freeing of private port resources must be moved from the ".remove(dev= ice)" 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" function to protect from subsequent rt= e_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 onl= y 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 wh= en trying to close a non-stopped port: either try to stop it automatically or just return an error. Cc: Shijith Thotton Cc: Srisivasubramanian Srinivasan Cc: Heinrich Kuhn Cc: Hemant Agrawal Cc: Sachin Saxena Cc: Gagandeep Singh Cc: Akhil Goyal Cc: Alfredo Cardigliano Signed-off-by: Thomas Monjalon --- MAINTAINERS | 14 +++++++------- doc/guides/rel_notes/deprecation.rst | 6 ------ drivers/net/af_packet/rte_eth_af_packet.c | 1 - drivers/net/af_xdp/rte_eth_af_xdp.c | 2 -- drivers/net/ark/ark_ethdev.c | 2 -- drivers/net/atlantic/atl_ethdev.c | 2 -- drivers/net/avp/avp_ethdev.c | 2 -- drivers/net/axgbe/axgbe_ethdev.c | 1 - drivers/net/bnx2x/bnx2x_ethdev.c | 5 ----- drivers/net/bnxt/bnxt_ethdev.c | 5 ----- drivers/net/bnxt/bnxt_reps.c | 4 ---- drivers/net/bonding/rte_eth_bond_pmd.c | 1 - drivers/net/cxgbe/cxgbe_main.c | 2 -- drivers/net/cxgbe/cxgbevf_main.c | 2 -- drivers/net/e1000/em_ethdev.c | 5 ----- drivers/net/e1000/igb_ethdev.c | 10 ---------- drivers/net/ena/ena_ethdev.c | 6 ------ drivers/net/enic/enic_ethdev.c | 2 -- drivers/net/enic/enic_vf_representor.c | 3 +-- drivers/net/failsafe/failsafe.c | 1 - drivers/net/fm10k/fm10k_ethdev.c | 5 ----- drivers/net/hinic/hinic_pmd_ethdev.c | 6 ------ drivers/net/hns3/hns3_ethdev.c | 5 ----- drivers/net/hns3/hns3_ethdev_vf.c | 5 ----- drivers/net/i40e/i40e_ethdev.c | 5 ----- drivers/net/i40e/i40e_ethdev_vf.c | 5 ----- drivers/net/iavf/iavf_ethdev.c | 5 ----- drivers/net/ice/ice_dcf_ethdev.c | 2 -- drivers/net/ice/ice_ethdev.c | 5 ----- drivers/net/igc/igc_ethdev.c | 5 ----- drivers/net/ixgbe/ixgbe_ethdev.c | 10 ---------- drivers/net/kni/rte_eth_kni.c | 2 -- drivers/net/memif/rte_eth_memif.c | 3 --- drivers/net/mlx4/mlx4.c | 1 - drivers/net/mlx5/linux/mlx5_os.c | 2 -- drivers/net/mvneta/mvneta_ethdev.c | 3 --- drivers/net/mvpp2/mrvl_ethdev.c | 3 --- drivers/net/netvsc/hn_ethdev.c | 3 --- drivers/net/nfb/nfb_ethdev.c | 3 --- drivers/net/null/rte_eth_null.c | 1 - drivers/net/octeontx/octeontx_ethdev.c | 1 - drivers/net/octeontx2/otx2_ethdev.c | 1 - drivers/net/pcap/rte_eth_pcap.c | 1 - drivers/net/qede/qede_ethdev.c | 5 ----- drivers/net/ring/rte_eth_ring.c | 1 - drivers/net/sfc/sfc_ethdev.c | 4 +--- drivers/net/softnic/rte_eth_softnic.c | 1 - drivers/net/szedata2/rte_eth_szedata2.c | 3 --- drivers/net/tap/rte_eth_tap.c | 2 +- drivers/net/vhost/rte_eth_vhost.c | 2 +- drivers/net/virtio/virtio_ethdev.c | 5 ----- drivers/net/vmxnet3/vmxnet3_ethdev.c | 3 --- lib/librte_ethdev/rte_ethdev.c | 17 +---------------- lib/librte_ethdev/rte_ethdev.h | 8 +------- 54 files changed, 13 insertions(+), 196 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 49a6dfa7a5..71921675ab 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -604,7 +604,7 @@ F: drivers/net/thunderx/ F: doc/guides/nics/thunderx.rst F: doc/guides/nics/features/thunderx.ini =20 -Cavium LiquidIO +Cavium LiquidIO - UNMAINTAINED M: Shijith Thotton M: Srisivasubramanian Srinivasan T: git://dpdk.org/next/dpdk-next-net-mrvl @@ -793,13 +793,13 @@ F: drivers/net/nfb/ F: doc/guides/nics/nfb.rst F: doc/guides/nics/features/nfb.ini =20 -Netronome nfp +Netronome nfp - UNMAINTAINED M: Heinrich Kuhn F: drivers/net/nfp/ F: doc/guides/nics/nfp.rst F: doc/guides/nics/features/nfp*.ini =20 -NXP dpaa +NXP dpaa - UNMAINTAINED M: Hemant Agrawal M: Sachin Saxena F: drivers/mempool/dpaa/ @@ -807,7 +807,7 @@ F: drivers/net/dpaa/ F: doc/guides/nics/dpaa.rst F: doc/guides/nics/features/dpaa.ini =20 -NXP dpaa2 +NXP dpaa2 - UNMAINTAINED M: Hemant Agrawal M: Sachin Saxena F: drivers/mempool/dpaa2/ @@ -815,21 +815,21 @@ F: drivers/net/dpaa2/ F: doc/guides/nics/dpaa2.rst F: doc/guides/nics/features/dpaa2.ini =20 -NXP enetc +NXP enetc - UNMAINTAINED M: Gagandeep Singh M: Sachin Saxena F: drivers/net/enetc/ F: doc/guides/nics/enetc.rst F: doc/guides/nics/features/enetc.ini =20 -NXP pfe +NXP pfe - UNMAINTAINED M: Gagandeep Singh M: Akhil Goyal F: doc/guides/nics/pfe.rst F: drivers/net/pfe/ F: doc/guides/nics/features/pfe.ini =20 -Pensando ionic +Pensando ionic - UNMAINTAINED M: Alfredo Cardigliano F: drivers/net/ionic/ F: doc/guides/nics/ionic.rst diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/de= precation.rst index 67caedb11b..a907358078 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -142,12 +142,6 @@ Deprecation Notices - ``rte_eth_dev_stop`` - ``rte_eth_dev_close`` =20 -* ethdev: The temporary flag RTE_ETH_DEV_CLOSE_REMOVE will be removed in 2= 0.11. - As a consequence, the new behaviour introduced in 18.11 will be effectiv= e - for all drivers: generic port resources are freed on close operation. - Private resources are expected to be released in the ``dev_close`` callb= ack. - More details in https://urldefense.proofpoint.com/v2/url?u=3Dhttp-3A__in= box.dpdk.org_dev_5248162.j6AOsuQRmx-40thomas_&d=3DDwIDAg&c=3DnKjWec2b6R0mOy= Paz7xtfQ&r=3DM6lEONY3jVnAkBjt0yC6oAsT7Jn2HI7LhNHCQYlnx1Q&m=3DQncMCWuK2mCmjD= K6KuQ0SIksIJuMUZrd7AB4hjpCmog&s=3Dh2LLe8xxafiu6df0c3gMeMYu7tQtP_x3abE-uz73n= SI&e=3D - * ethdev: New offload flags ``DEV_RX_OFFLOAD_FLOW_MARK`` will be added in = 19.11. This will allow application to enable or disable PMDs from updating ``rte_mbuf::hash::fdir``. diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_pac= ket/rte_eth_af_packet.c index 12c202cba4..25876224f8 100644 --- a/drivers/net/af_packet/rte_eth_af_packet.c +++ b/drivers/net/af_packet/rte_eth_af_packet.c @@ -859,7 +859,6 @@ rte_pmd_init_internals(struct rte_vdev_device *dev, data->nb_tx_queues =3D (uint16_t)nb_queues; data->dev_link =3D pmd_link; data->mac_addrs =3D &(*internals)->eth_addr; - data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; =20 (*eth_dev)->dev_ops =3D &ops; =20 diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_e= th_af_xdp.c index badbce63fb..60add9ead4 100644 --- a/drivers/net/af_xdp/rte_eth_af_xdp.c +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c @@ -1274,8 +1274,6 @@ init_internals(struct rte_vdev_device *dev, const cha= r *if_name, eth_dev->dev_ops =3D &ops; eth_dev->rx_pkt_burst =3D eth_af_xdp_rx; eth_dev->tx_pkt_burst =3D eth_af_xdp_tx; - /* Let rte_eth_dev_close() release the port resources. */ - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; =20 #if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG) AF_XDP_LOG(INFO, "Zero copy between umem and mbuf enabled.\n"); diff --gi= t a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c index 5f2ed= 4b7b7..83dc4ecd2c 100644 --- a/drivers/net/ark/ark_ethdev.c +++ b/drivers/net/ark/ark_ethdev.c @@ -260,8 +260,6 @@ eth_ark_dev_init(struct rte_eth_dev *dev) /* Use dummy function until setup */ dev->rx_pkt_burst =3D ð_ark_recv_pkts_noop; dev->tx_pkt_burst =3D ð_ark_xmit_pkts_noop; - /* Let rte_eth_dev_close() release the port resources */ - dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; =20 ark->bar0 =3D (uint8_t *)pci_dev->mem_resource[0].addr; ark->a_bar =3D (uint8_t *)pci_dev->mem_resource[2].addr; diff --git a/dri= vers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c index d3babeff94..2217511ca0 100644 --- a/drivers/net/atlantic/atl_ethdev.c +++ b/drivers/net/atlantic/atl_ethdev.c @@ -380,8 +380,6 @@ eth_atl_dev_init(struct rte_eth_dev *eth_dev) if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) return 0; =20 - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - /* Vendor and Device ID need to be set before init of shared code */ hw->device_id =3D pci_dev->id.device_id; hw->vendor_id =3D pci_dev->id.vendor_id; diff --git a/drivers/net/avp/avp= _ethdev.c b/drivers/net/avp/avp_ethdev.c index 2eed6acc3f..c730b7ab86 10064= 4 --- a/drivers/net/avp/avp_ethdev.c +++ b/drivers/net/avp/avp_ethdev.c @@ -957,8 +957,6 @@ eth_avp_dev_init(struct rte_eth_dev *eth_dev) eth_dev->dev_ops =3D &avp_eth_dev_ops; eth_dev->rx_pkt_burst =3D &avp_recv_pkts; eth_dev->tx_pkt_burst =3D &avp_xmit_pkts; - /* Let rte_eth_dev_close() release the port resources */ - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; =20 if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) { /* diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_eth= dev.c index 2dd64180ad..cf085487cc 100644 --- a/drivers/net/axgbe/axgbe_ethdev.c +++ b/drivers/net/axgbe/axgbe_ethdev.c @@ -1959,7 +1959,6 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev) int ret; =20 eth_dev->dev_ops =3D &axgbe_eth_dev_ops; - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; =20 eth_dev->rx_descriptor_status =3D axgbe_dev_rx_descriptor_status; eth_dev->tx_descriptor_status =3D axgbe_dev_tx_descriptor_status; diff --= git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c index 8dc46384af..40225b2f44 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.c +++ b/drivers/net/bnx2x/bnx2x_ethdev.c @@ -735,11 +735,6 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int= is_vf) goto out; } =20 - /* Pass the information to the rte_eth_dev_close() that it should also - * release the private port resources. - */ - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - return 0; =20 out: diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.= c index e726d078ec..a77bab661d 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -5802,11 +5802,6 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *par= ams __rte_unused) =20 bnxt_alloc_switch_domain(bp); =20 - /* Pass the information to the rte_eth_dev_close() that it should also - * release the private port resources. - */ - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - PMD_DRV_LOG(INFO, DRV_MODULE_NAME "found at mem %" PRIX64 ", node addr %pM\n", pci_dev->mem_resource[0].phys_addr, diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c in= dex 2b6c0a277b..df8680c113 100644 --- a/drivers/net/bnxt/bnxt_reps.c +++ b/drivers/net/bnxt/bnxt_reps.c @@ -203,10 +203,6 @@ int bnxt_vf_representor_init(struct rte_eth_dev *eth_d= ev, void *params) PMD_DRV_LOG(INFO, "calling bnxt_print_link_info\n"); bnxt_print_link_info(eth_dev); =20 - /* Pass the information to the rte_eth_dev_close() that it should also - * release the private port resources. - */ - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; PMD_DRV_LOG(INFO, "Switch domain id %d: Representor Device %d init done\n", vf_rep_bp->switch_domain_id, vf_rep_bp->vf_id); diff --git a/drivers= /net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index a9ed5d8e12..1f761c7c9e 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -3209,7 +3209,6 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode) } =20 internals =3D eth_dev->data->dev_private; - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; eth_dev->data->nb_rx_queues =3D (uint16_t)1; eth_dev->data->nb_tx_queues =3D (uint16_t)1; =20 diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.= c index da4ae25d47..53b08a64af 100644 --- a/drivers/net/cxgbe/cxgbe_main.c +++ b/drivers/net/cxgbe/cxgbe_main.c @@ -2142,8 +2142,6 @@ int cxgbe_probe(struct adapter *adapter) goto out_free; } =20 - pi->eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - if (i > 0) { /* First port will be notified by upper layer */ rte_eth_dev_probing_finish(eth_dev); diff --git a/drivers/net/cxgbe/cxgbevf_main.c b/drivers/net/cxgbe/cxgbevf_m= ain.c index 35d873402b..9ee060504f 100644 --- a/drivers/net/cxgbe/cxgbevf_main.c +++ b/drivers/net/cxgbe/cxgbevf_main.c @@ -261,8 +261,6 @@ int cxgbevf_probe(struct adapter *adapter) goto out_free; } =20 - pi->eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - if (i > 0) { /* First port will be notified by upper layer */ rte_eth_dev_probing_finish(eth_dev); diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c = index 2d0e071448..6a6ae0e9d5 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -297,11 +297,6 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev) rte_ether_addr_copy((struct rte_ether_addr *)hw->mac.addr, eth_dev->data->mac_addrs); =20 - /* Pass the information to the rte_eth_dev_close() that it should also - * release the private port resources. - */ - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - /* initialize the vfta */ memset(shadow_vfta, 0, sizeof(*shadow_vfta)); =20 diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.= c index 9e4aefe00c..f8778207ef 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -841,11 +841,6 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev) rte_ether_addr_copy((struct rte_ether_addr *)hw->mac.addr, ð_dev->data->mac_addrs[0]); =20 - /* Pass the information to the rte_eth_dev_close() that it should also - * release the private port resources. - */ - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - /* initialize the vfta */ memset(shadow_vfta, 0, sizeof(*shadow_vfta)); =20 @@ -997,11 +992,6 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev) return -ENOMEM; } =20 - /* Pass the information to the rte_eth_dev_close() that it should also - * release the private port resources. - */ - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - /* Generate a random MAC address, if none was assigned by PF. */ if (rte_is_zero_ether_addr(perm_addr)) { rte_eth_random_addr(perm_addr->addr_bytes); diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c in= dex ae6daad892..cf1c0b9795 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -1863,12 +1863,6 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_= dev) get_feat_ctx.dev_attr.mac_addr, (struct rte_ether_addr *)adapter->mac_addr); =20 - /* - * Pass the information to the rte_eth_dev_close() that it should also - * release the private port resources. - */ - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - adapter->drv_stats =3D rte_zmalloc("adapter stats", sizeof(*adapter->drv_stats), RTE_CACHE_LINE_SIZE); diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.= c index ed03d53608..27f60b45b8 100644 --- a/drivers/net/enic/enic_ethdev.c +++ b/drivers/net/enic/enic_ethdev.c @@ -1292,8 +1292,6 @@ static int eth_enic_dev_init(struct rte_eth_dev *eth_= dev, enic->port_id =3D eth_dev->data->port_id; enic->rte_dev =3D eth_dev; enic->dev_data =3D eth_dev->data; - /* Let rte_eth_dev_close() release the port resources */ - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; =20 pdev =3D RTE_ETH_DEV_TO_PCI(eth_dev); rte_eth_copy_pci_info(eth_dev, pdev); diff --git a/drivers/net/enic/enic_vf_representor.c b/drivers/net/enic/enic= _vf_representor.c index c528be2b98..169c611a68 100644 --- a/drivers/net/enic/enic_vf_representor.c +++ b/drivers/net/enic/enic_vf_representor.c @@ -670,8 +670,7 @@ int enic_vf_representor_init(struct rte_eth_dev *eth_de= v, void *init_params) =20 eth_dev->device->driver =3D pf->rte_dev->device->driver; eth_dev->dev_ops =3D &enic_vf_representor_dev_ops; - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_REPRESENTOR - | RTE_ETH_DEV_CLOSE_REMOVE; + eth_dev->data->dev_flags |=3D RTE_ETH_DEV_REPRESENTOR; eth_dev->data->representor_id =3D vf->vf_id; eth_dev->data->mac_addrs =3D rte_zmalloc("enic_mac_addr_vf", sizeof(struct rte_ether_addr) * diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsaf= e.c index 44d47e8f72..b921e101e6 100644 --- a/drivers/net/failsafe/failsafe.c +++ b/drivers/net/failsafe/failsafe.c @@ -180,7 +180,6 @@ fs_eth_dev_create(struct rte_vdev_device *vdev) ERROR("Unable to allocate rte_eth_dev"); return -1; } - dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; priv =3D PRIV(dev); priv->data =3D dev->data; priv->rxp =3D FS_RX_PROXY_INIT; diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_eth= dev.c index 533f976709..23f4d04068 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -3129,11 +3129,6 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev) &dev->data->mac_addrs[0]); } =20 - /* Pass the information to the rte_eth_dev_close() that it should also - * release the private port resources. - */ - dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - /* Reset the hw statistics */ diag =3D fm10k_stats_reset(dev); if (diag !=3D 0) { diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic= _pmd_ethdev.c index 5f2e97d3bd..623534fda4 100644 --- a/drivers/net/hinic/hinic_pmd_ethdev.c +++ b/drivers/net/hinic/hinic_pmd_ethdev.c @@ -3100,12 +3100,6 @@ static int hinic_func_init(struct rte_eth_dev *eth_d= ev) goto mc_addr_fail; } =20 - /* - * Pass the information to the rte_eth_dev_close() that it should also - * release the private port resources. - */ - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - /* create hardware nic_device */ rc =3D hinic_nic_dev_create(eth_dev); if (rc) { diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.= c index 3b395a1ccf..dd03bd62b2 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -5678,11 +5678,6 @@ hns3_dev_init(struct rte_eth_dev *eth_dev) ð_dev->data->mac_addrs[0]); =20 hw->adapter_state =3D HNS3_NIC_INITIALIZED; - /* - * Pass the information to the rte_eth_dev_close() that it should also - * release the private port resources. - */ - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; =20 if (rte_atomic16_read(&hns->hw.reset.schedule) =3D=3D SCHEDULE_PENDING) { hns3_err(hw, "Reschedule reset service after dev_init"); diff --git a/dr= ivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c index e0ca5a6ac2..436d864b5f 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c @@ -2684,11 +2684,6 @@ hns3vf_dev_init(struct rte_eth_dev *eth_dev) ð_dev->data->mac_addrs[0]); =20 hw->adapter_state =3D HNS3_NIC_INITIALIZED; - /* - * Pass the information to the rte_eth_dev_close() that it should also - * release the private port resources. - */ - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; =20 if (rte_atomic16_read(&hns->hw.reset.schedule) =3D=3D SCHEDULE_PENDING) { hns3_err(hw, "Reschedule reset service after dev_init"); diff --git a/dr= ivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 804f012= 8ab..6fb88148b8 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -1699,11 +1699,6 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *ini= t_params __rte_unused) rte_ether_addr_copy((struct rte_ether_addr *)hw->mac.perm_addr, &dev->data->mac_addrs[0]); =20 - /* Pass the information to the rte_eth_dev_close() that it should also - * release the private port resources. - */ - dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - /* Init dcb to sw mode by default */ ret =3D i40e_dcb_init_configure(dev, TRUE); if (ret !=3D I40E_SUCCESS) { diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethd= ev_vf.c index 61aad8c415..4aaf41956c 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -1586,11 +1586,6 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev) hw->adapter_stopped =3D 1; hw->adapter_closed =3D 0; =20 - /* Pass the information to the rte_eth_dev_close() that it should also - * release the private port resources. - */ - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - if(i40evf_init_vf(eth_dev) !=3D 0) { PMD_INIT_LOG(ERR, "Init vf failed"); return -1; diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.= c index 8f46c4588f..512ade2ad0 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -1412,11 +1412,6 @@ iavf_dev_init(struct rte_eth_dev *eth_dev) adapter->eth_dev =3D eth_dev; adapter->stopped =3D 1; =20 - /* Pass the information to the rte_eth_dev_close() that it should also - * release the private port resources. - */ - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - if (iavf_init_vf(eth_dev) !=3D 0) { PMD_INIT_LOG(ERR, "Init vf failed"); return -1; diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_eth= dev.c index 5b626cb641..33dd0c44f2 100644 --- a/drivers/net/ice/ice_dcf_ethdev.c +++ b/drivers/net/ice/ice_dcf_ethdev.c @@ -908,8 +908,6 @@ ice_dcf_dev_init(struct rte_eth_dev *eth_dev) if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) return 0; =20 - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - adapter->real_hw.vc_event_msg_cb =3D ice_dcf_handle_pf_event_msg; if (ice_dcf_init_hw(eth_dev, &adapter->real_hw) !=3D 0) { PMD_INIT_LOG(ERR, "Failed to init DCF hardware"); diff --git a/drivers/n= et/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index b4ac5e3f81..85a3ca= 6a2d 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -2245,11 +2245,6 @@ ice_dev_init(struct rte_eth_dev *dev) goto err_init_mac; } =20 - /* Pass the information to the rte_eth_dev_close() that it should also - * release the private port resources. - */ - dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - ret =3D ice_res_pool_init(&pf->msix_pool, 1, hw->func_caps.common_cap.num_msix_vectors - 1); if (ret) { diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c in= dex 11397c5c1d..9d27fc0d07 100644 --- a/drivers/net/igc/igc_ethdev.c +++ b/drivers/net/igc/igc_ethdev.c @@ -1323,11 +1323,6 @@ eth_igc_dev_init(struct rte_eth_dev *dev) goto err_late; } =20 - /* Pass the information to the rte_eth_dev_close() that it should also - * release the private port resources. - */ - dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - hw->mac.get_link_status =3D 1; igc->stopped =3D 0; =20 diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_eth= dev.c index a1369a0744..426b7c9fe5 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -1248,11 +1248,6 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void= *init_params __rte_unused) return -ENOMEM; } =20 - /* Pass the information to the rte_eth_dev_close() that it should also - * release the private port resources. - */ - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - /* initialize the vfta */ memset(shadow_vfta, 0, sizeof(*shadow_vfta)); =20 @@ -1663,11 +1658,6 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev) return -ENOMEM; } =20 - /* Pass the information to the rte_eth_dev_close() that it should also - * release the private port resources. - */ - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - /* Generate a random MAC address, if none was assigned by PF. */ if (rte_is_zero_ether_addr(perm_addr)) { generate_random_mac_addr(perm_addr); diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c = index aa365a57de..45ab1b17a8 100644 --- a/drivers/net/kni/rte_eth_kni.c +++ b/drivers/net/kni/rte_eth_kni.c @@ -387,8 +387,6 @@ eth_kni_create(struct rte_vdev_device *vdev, data->promiscuous =3D 1; data->all_multicast =3D 1; =20 - data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - rte_eth_random_addr(internals->eth_addr.addr_bytes); =20 eth_dev->dev_ops =3D ð_kni_ops; diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_= memif.c index 1a2411c838..ff8a58081f 100644 --- a/drivers/net/memif/rte_eth_memif.c +++ b/drivers/net/memif/rte_eth_memif.c @@ -1527,9 +1527,6 @@ memif_create(struct rte_vdev_device *vdev, enum memif= _role_t role, eth_dev->tx_pkt_burst =3D eth_memif_tx; } =20 - - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - rte_eth_dev_probing_finish(eth_dev); =20 return 0; diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index ad7c80= 5d67..3e57875414 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -1027,7 +1027,6 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct= rte_pci_device *pci_dev) ERROR("can not allocate rte ethdev"); goto port_error; } - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; eth_dev->data->dev_private =3D priv; eth_dev->data->mac_addrs =3D priv->mac; eth_dev->device =3D &pci_dev->device; diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5= _os.c index 0511a55a28..8e498314ef 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -1155,8 +1155,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, err =3D ENOMEM; goto error; } - /* Flag to call rte_eth_dev_release_port() in rte_eth_dev_close(). */ - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; if (priv->representor) { eth_dev->data->dev_flags |=3D RTE_ETH_DEV_REPRESENTOR; eth_dev->data->representor_id =3D priv->representor_id; diff --git a/dri= vers/net/mvneta/mvneta_ethdev.c b/drivers/net/mvneta/mvneta_ethdev.c index eebcdb840e..db142bec23 100644 --- a/drivers/net/mvneta/mvneta_ethdev.c +++ b/drivers/net/mvneta/mvneta_ethdev.c @@ -834,9 +834,6 @@ mvneta_eth_dev_create(struct rte_vdev_device *vdev, con= st char *name) mvneta_set_tx_function(eth_dev); eth_dev->dev_ops =3D &mvneta_ops; =20 - /* Flag to call rte_eth_dev_release_port() in rte_eth_dev_close(). */ - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - rte_eth_dev_probing_finish(eth_dev); return 0; out_free: diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethde= v.c index 27f7cfb056..cfb97e4f8f 100644 --- a/drivers/net/mvpp2/mrvl_ethdev.c +++ b/drivers/net/mvpp2/mrvl_ethdev.c @@ -2863,9 +2863,6 @@ mrvl_eth_dev_create(struct rte_vdev_device *vdev, con= st char *name) mrvl_set_tx_function(eth_dev); eth_dev->dev_ops =3D &mrvl_ops; =20 - /* Flag to call rte_eth_dev_release_port() in rte_eth_dev_close(). */ - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - rte_eth_dev_probing_finish(eth_dev); return 0; out_free: diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.= c index 8968036ea3..15d6e9762d 100644 --- a/drivers/net/netvsc/hn_ethdev.c +++ b/drivers/net/netvsc/hn_ethdev.c @@ -123,9 +123,6 @@ eth_dev_vmbus_allocate(struct rte_vmbus_device *dev, si= ze_t private_data_size) eth_dev->data->dev_flags |=3D RTE_ETH_DEV_INTR_LSC; eth_dev->intr_handle =3D &dev->intr_handle; =20 - /* allow ethdev to remove on close */ - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - return eth_dev; } =20 diff --git a/drivers/net/nfb/nfb_ethdev.c b/drivers/net/nfb/nfb_ethdev.c in= dex c3c3d003f1..d937ac6922 100644 --- a/drivers/net/nfb/nfb_ethdev.c +++ b/drivers/net/nfb/nfb_ethdev.c @@ -457,9 +457,6 @@ nfb_eth_dev_init(struct rte_eth_dev *dev) rte_kvargs_free(kvlist); } =20 - /* Let rte_eth_dev_close() release the port resources */ - dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - /* * Get number of available DMA RX and TX queues, which is maximum * number of queues that can be created and store it in private device di= ff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.= c index 84c1d0c951..7c3c76a897 100644 --- a/drivers/net/null/rte_eth_null.c +++ b/drivers/net/null/rte_eth_null.c @@ -548,7 +548,6 @@ eth_dev_null_create(struct rte_vdev_device *dev, struct= pmd_options *args) data->mac_addrs =3D &internals->eth_addr; data->promiscuous =3D 1; data->all_multicast =3D 1; - data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; =20 eth_dev->dev_ops =3D &ops; =20 diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/= octeontx_ethdev.c index 48ce3e1621..a263f45399 100644 --- a/drivers/net/octeontx/octeontx_ethdev.c +++ b/drivers/net/octeontx/octeontx_ethdev.c @@ -1374,7 +1374,6 @@ octeontx_create(struct rte_vdev_device *dev, int port= , uint8_t evdev, data->promiscuous =3D 0; data->all_multicast =3D 0; data->scattered_rx =3D 0; - data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; =20 /* Get maximum number of supported MAC entries */ max_entries =3D octeontx_bgx_port_mac_entries_get(nic->port_id); diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/ot= x2_ethdev.c index abe5f03628..581ac89381 100644 --- a/drivers/net/octeontx2/otx2_ethdev.c +++ b/drivers/net/octeontx2/otx2_ethdev.c @@ -2394,7 +2394,6 @@ otx2_eth_dev_init(struct rte_eth_dev *eth_dev) pci_dev =3D RTE_ETH_DEV_TO_PCI(eth_dev); =20 rte_eth_copy_pci_info(eth_dev, pci_dev); - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; =20 /* Zero out everything after OTX2_DEV to allow proper dev_reset() */ memset(&dev->otx2_eth_dev_data_start, 0, sizeof(*dev) - diff --git a/driv= ers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c index 909eef8= cce..da4988064a 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -1334,7 +1334,6 @@ eth_from_pcaps(struct rte_vdev_device *vdev, else eth_dev->tx_pkt_burst =3D eth_tx_drop; =20 - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; rte_eth_dev_probing_finish(eth_dev); return 0; } diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.= c index 43fe68c2bf..cd578709fb 100644 --- a/drivers/net/qede/qede_ethdev.c +++ b/drivers/net/qede/qede_ethdev.c @@ -2711,11 +2711,6 @@ static int qede_common_dev_init(struct rte_eth_dev *= eth_dev, bool is_vf) adapter->ipgre.enable =3D false; } =20 - /* Pass the information to the rte_eth_dev_close() that it should also - * release the private port resources. - */ - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - DP_INFO(edev, "MAC address : %02x:%02x:%02x:%02x:%02x:%02x\n", adapter->primary_mac.addr_bytes[0], adapter->primary_mac.addr_bytes[1], diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_rin= g.c index ed0fdeb28f..12046f5a00 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -358,7 +358,6 @@ do_eth_dev_ring_create(const char *name, =20 eth_dev->dev_ops =3D &ops; data->numa_node =3D numa_node; - data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; =20 /* finally assign rx and tx ops */ eth_dev->rx_pkt_burst =3D eth_ring_rx; diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c in= dex eaa48627d6..1c72e40b75 100644 --- a/drivers/net/sfc/sfc_ethdev.c +++ b/drivers/net/sfc/sfc_ethdev.c @@ -343,7 +343,7 @@ sfc_dev_close(struct rte_eth_dev *dev) } =20 /* - * Cleanup all resources in accordance with RTE_ETH_DEV_CLOSE_REMOVE. + * Cleanup all resources. * Rollback primary process sfc_eth_dev_init() below. */ =20 @@ -2179,8 +2179,6 @@ sfc_eth_dev_init(struct rte_eth_dev *dev) =20 sfc_log_init(sa, "entry"); =20 - dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - dev->data->mac_addrs =3D rte_zmalloc("sfc", RTE_ETHER_ADDR_LEN, 0); if (dev->data->mac_addrs =3D=3D NULL) { rc =3D ENOMEM; diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rt= e_eth_softnic.c index ad9e2aa86d..e942df78b6 100644 --- a/drivers/net/softnic/rte_eth_softnic.c +++ b/drivers/net/softnic/rte_eth_softnic.c @@ -390,7 +390,6 @@ pmd_ethdev_register(struct rte_vdev_device *vdev, dev->device =3D &vdev->device; =20 /* dev->data */ - dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; dev->data->dev_private =3D dev_private; dev->data->dev_link.link_speed =3D ETH_SPEED_NUM_100G; dev->data->dev_link.link_duplex =3D ETH_LINK_FULL_DUPLEX; diff --git a/dr= ivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedat= a2.c index daa40cfd6c..4325b9a30d 100644 --- a/drivers/net/szedata2/rte_eth_szedata2.c +++ b/drivers/net/szedata2/rte_eth_szedata2.c @@ -1488,9 +1488,6 @@ rte_szedata2_eth_dev_init(struct rte_eth_dev *dev, st= ruct port_info *pi) PMD_INIT_LOG(INFO, "Initializing eth_dev %s (driver %s)", data->name, RTE_STR(RTE_SZEDATA2_DRIVER_NAME)); =20 - /* Let rte_eth_dev_close() release the port resources */ - dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - /* Fill internal private structure. */ internals->dev =3D dev; /* Get index of szedata2 device file and create path to device file */ di= ff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c in= dex 0d217f1486..b127ce62dc 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -1922,7 +1922,7 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, cons= t char *tap_name, /* Setup some default values */ data =3D dev->data; data->dev_private =3D pmd; - data->dev_flags =3D RTE_ETH_DEV_INTR_LSC | RTE_ETH_DEV_CLOSE_REMOVE; + data->dev_flags =3D RTE_ETH_DEV_INTR_LSC; data->numa_node =3D numa_node; =20 data->dev_link =3D pmd_link; diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_= vhost.c index f67f4db812..45552ef742 100644 --- a/drivers/net/vhost/rte_eth_vhost.c +++ b/drivers/net/vhost/rte_eth_vhost.c @@ -1443,7 +1443,7 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, cha= r *iface_name, internal->flags =3D flags; internal->disable_flags =3D disable_flags; data->dev_link =3D pmd_link; - data->dev_flags =3D RTE_ETH_DEV_INTR_LSC | RTE_ETH_DEV_CLOSE_REMOVE; + data->dev_flags =3D RTE_ETH_DEV_INTR_LSC; data->promiscuous =3D 1; data->all_multicast =3D 1; =20 diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio= _ethdev.c index 0787337a01..b6ed5829bd 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1924,11 +1924,6 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev) if (ret < 0) return ret; hw->speed =3D speed; - /* - * Pass the information to the rte_eth_dev_close() that it should also - * release the private port resources. - */ - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; =20 /* Allocate memory for storing MAC addresses */ eth_dev->data->mac_addrs =3D rte_zmalloc("virtio", diff --git a/drivers/n= et/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index 17fed0ed6e..34a169d2c0 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -321,9 +321,6 @@ eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev) hw->perm_addr[0], hw->perm_addr[1], hw->perm_addr[2], hw->perm_addr[3], hw->perm_addr[4], hw->perm_addr[5]); =20 - /* Flag to call rte_eth_dev_release_port() in rte_eth_dev_close(). */ - eth_dev->data->dev_flags |=3D RTE_ETH_DEV_CLOSE_REMOVE; - /* Put device in Quiesce Mode */ VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD, VMXNET3_CMD_QUIESCE_DEV); =20 diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.= c index d12d74dd8c..d7668114ca 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -1720,22 +1720,7 @@ rte_eth_dev_close(uint16_t port_id) (*dev->dev_ops->dev_close)(dev); =20 rte_ethdev_trace_close(port_id); - /* check behaviour flag - temporary for PMD migration */ - if ((dev->data->dev_flags & RTE_ETH_DEV_CLOSE_REMOVE) !=3D 0) { - /* new behaviour: send event + reset state + free all data */ - rte_eth_dev_release_port(dev); - return; - } - RTE_ETHDEV_LOG(DEBUG, "Port closing is using an old behaviour.\n" - "The driver %s should migrate to the new behaviour.\n", - dev->device->driver->name); - /* old behaviour: only free queue arrays */ - dev->data->nb_rx_queues =3D 0; - rte_free(dev->data->rx_queues); - dev->data->rx_queues =3D NULL; - dev->data->nb_tx_queues =3D 0; - rte_free(dev->data->tx_queues); - dev->data->tx_queues =3D NULL; + rte_eth_dev_release_port(dev); } =20 int diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.= h index 645a18664d..24d898ae89 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -1654,11 +1654,6 @@ struct rte_eth_dev_owner { char name[RTE_ETH_MAX_OWNER_NAME_LEN]; /**< The owner name. */ }; =20 -/** - * Port is released (i.e. totally freed and data erased) on close. - * Temporary flag for PMD migration to new rte_eth_dev_close() behaviour. - */ -#define RTE_ETH_DEV_CLOSE_REMOVE 0x0001 /** Device supports link state interrupt */ #define RTE_ETH_DEV_INTR_LSC 0x0002 /** Device is a bonded slave */ @@ -2282,8 +2277,7 @@ int rte_eth_dev_set_link_down(uint16_t port_id); =20 /** * Close a stopped Ethernet device. The device cannot be restarted! - * The function frees all port resources if the driver supports - * the flag RTE_ETH_DEV_CLOSE_REMOVE. + * The function frees all port resources. * * @param port_id * The port identifier of the Ethernet device. -- 2.28.0