Hi Thomas, >From: dev <dev-boun...@dpdk.org> On Behalf Of Thomas Monjalon >Sent: Sunday, September 13, 2020 3:16 PM > >The patches for removing RTE_ETH_DEV_CLOSE_REMOVE are sent: > https://urldefense.proofpoint.com/v2/url?u=https- >3A__patches.dpdk.org_project_dpdk_list_-3Fseries- >3D12173&d=DwICAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=Vhi2FR3R84xPMUtUhj >NPxoiMSxcj1IW0xDKEoZ0F00o&m=9C_CX6dJtCkd6pU6mUDB8eV- >EorzP6ErRLFuCc-dtTg&s=8L7RxyHhOuIXf3MBurNOeqvGa-gGhH1NY9vnoj- >fXM4&e= > >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. > The fixes for bnx2x and qede PMDs are posted. https://patches.dpdk.org/patch/78779/ https://patches.dpdk.org/patch/78780/
Thanks! -Rasesh > >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: >> > > >> > > https://urldefense.proofpoint.com/v2/url?u=http-3A__git.dpdk.org_d >> > > pdk_commit_-3Fid- >3D23ea57a2a&d=DwICAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=V >> > > >hi2FR3R84xPMUtUhjNPxoiMSxcj1IW0xDKEoZ0F00o&m=9C_CX6dJtCkd6pU6m >UDB8 >> > > eV-EorzP6ErRLFuCc- >dtTg&s=23dp27AoThshb5NflUTFh3HH3M_KPwa8Svd2TOeN9 >> > > gs&e= >> > > " >> > > 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: >> >> https://urldefense.proofpoint.com/v2/url?u=http-3A__mails.dpdk.org_arc >> hives_dev_2020- >2DAugust_177314.html&d=DwICAg&c=nKjWec2b6R0mOyPaz7xtfQ& >> >r=Vhi2FR3R84xPMUtUhjNPxoiMSxcj1IW0xDKEoZ0F00o&m=9C_CX6dJtCkd6p >U6mUDB8e >> V-EorzP6ErRLFuCc-dtTg&s=PRJ- >nWVm0NO6WrpQDWaI0ocSwaIDowsMQNWrif0FDgg&e= >> >> > 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: >> > >> > https://urldefense.proofpoint.com/v2/url?u=http-3A__inbox.dpdk.org_d >> > ev_1748144.UFpUr2FPnr- >40xps_&d=DwICAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=Vhi >> > >2FR3R84xPMUtUhjNPxoiMSxcj1IW0xDKEoZ0F00o&m=9C_CX6dJtCkd6pU6mU >DB8eV-E >> > orzP6ErRLFuCc- >dtTg&s=00JuVYCjq_EZW27VmszpI4E8Yq_dN9oGjewjBTaCZ9s&e= >> >> 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. > >