[dpdk-dev] [PATCH] doc: add deprecation notice to fix ethdev API returning void

Thomas Monjalon thomas at monjalon.net
Tue Aug 6 13:24:38 CEST 2019


23/07/2019 16:22, Ferruh Yigit:
> On 7/23/2019 3:07 PM, Andrew Rybchenko wrote:
> > void return value is bad for get API (like rte_eth_dev_info-get())
> > since caller does not know if the function does its job or not and
> > output value is filled in.
> > 
> > void return value is bad for state changing API (like
> > rte_eth_promiscuous_enable()) since caller should use get API
> > to understand if state is really changed.
> > 
> > Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
> > ---
> > +* ethdev: update API functions returning ``void`` to return ``int`` with
> > +  negative errno values to indicate various error conditions (e.g.
> > +  invalid port ID, unsupported operation, failed operation):
> > +
> > +  - ``rte_eth_dev_info_get``
> > +  - ``rte_eth_promiscuous_enable`` and ``rte_eth_promiscuous_disable``
> > +  - ``rte_eth_allmulticast_enable`` and ``rte_eth_allmulticast_disable``
> > +  - ``rte_eth_link_get`` and ``rte_eth_link_get_nowait``
> > +  - ``rte_eth_dev_stop``
> > +  - ``rte_eth_dev_close``
> > +  - ``rte_eth_xstats_reset``
> > +  - ``rte_eth_macaddr_get``
> > +  - ``rte_eth_dev_owner_delete``
> 
> Acked-by: Ferruh Yigit <ferruh.yigit at intel.com>

Acked-by: Thomas Monjalon <thomas at monjalon.net>





More information about the dev mailing list