* [dpdk-dev] [PATCH v2] doc: update API deprecation for device reset
@ 2018-09-20 4:59 Qi Zhang
2019-01-28 0:20 ` Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: Qi Zhang @ 2018-09-20 4:59 UTC (permalink / raw)
To: thomas, declan.doherty, ferruh.yigit
Cc: ktraynor, dev, benjamin.h.shelton, narender.vangati, Qi Zhang
Device reset may have the dependency, for example, a VF reset expects
PF ready, or a NIC function as a part of a SOC need to wait for other
parts of the system be ready, these are time-consuming tasks and will
block current thread.
So we rename rte_eth_dev_reset to rte_eth_dev_reset_async as an async
API, that makes things easy for an application that what to reset the
device from the interrupt thread since typically a
RTE_ETH_EVENT_INTR_RESET handler is invoked in interrupt thread.
RFC patch:
http://patchwork.dpdk.org/patch/44989/
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
v2:
- rename rte_eth_dev_reset to rte_eth_dev_reset_async
doc/guides/rel_notes/deprecation.rst | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index bade1e4c4..c8dd6522e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -95,3 +95,9 @@ Deprecation Notices
- ``rte_pdump_set_socket_dir`` will be removed;
- The parameter, ``path``, of ``rte_pdump_init`` will be removed;
- The enum ``rte_pdump_socktype`` will be removed.
+
+* ethdev: In v19.02 ``rte_eth_dev_reset`` is renamed to
+ ``rte_eth_dev_reset_async``. As the name, it is an async API.
+ Application should not assume device reset is finished after
+ ``rte_eth_dev_reset_async`` return, it should always wait for a
+ RTE_ETH_EVENT_RESET_COMPLETE event and check the reset result.
--
2.13.6
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH v2] doc: update API deprecation for device reset
2018-09-20 4:59 [dpdk-dev] [PATCH v2] doc: update API deprecation for device reset Qi Zhang
@ 2019-01-28 0:20 ` Thomas Monjalon
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2019-01-28 0:20 UTC (permalink / raw)
To: Qi Zhang
Cc: dev, declan.doherty, ferruh.yigit, ktraynor, benjamin.h.shelton,
narender.vangati
Hi,
I don't remember why this deprecation notice did not get any feedback
in the 18.11 cycle. It looks to be outdated now.
In case you still plan some changes, I give my opinion below.
20/09/2018 06:59, Qi Zhang:
> Device reset may have the dependency, for example, a VF reset expects
> PF ready, or a NIC function as a part of a SOC need to wait for other
> parts of the system be ready, these are time-consuming tasks and will
> block current thread.
>
> So we rename rte_eth_dev_reset to rte_eth_dev_reset_async as an async
> API, that makes things easy for an application that what to reset the
> device from the interrupt thread since typically a
> RTE_ETH_EVENT_INTR_RESET handler is invoked in interrupt thread.
>
> RFC patch:
> http://patchwork.dpdk.org/patch/44989/
>
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
I remmember I did not like this function when it was introduced.
I think the cases addressed by rte_eth_dev_reset() should be handled
with hotplug mechanism.
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> +* ethdev: In v19.02 ``rte_eth_dev_reset`` is renamed to
Is it still planned for 19.05?
> + ``rte_eth_dev_reset_async``. As the name, it is an async API.
Why removing the old function?
We could avoid breaking applications by adding an async flavor
of the function.
> + Application should not assume device reset is finished after
> + ``rte_eth_dev_reset_async`` return, it should always wait for a
> + RTE_ETH_EVENT_RESET_COMPLETE event and check the reset result.
This could be done in the synchronous flavor with sleeps in a loop.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-28 0:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-20 4:59 [dpdk-dev] [PATCH v2] doc: update API deprecation for device reset Qi Zhang
2019-01-28 0:20 ` Thomas Monjalon
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).