Re: [dpdk-dev] [PATCH v4 3/3] ethdev: allow close function to return an error

2020-10-13 Thread Ferruh Yigit
On 10/13/2020 9:55 AM, Thomas Monjalon wrote: <...> dev = &rte_eth_devices[port_id]; - RTE_FUNC_PTR_OR_RET(*dev->dev_ops->dev_close); - (*dev->dev_ops->dev_close)(dev); + RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_close, -ENOTSUP); + *lasterr = (*dev->dev_ops->dev

Re: [dpdk-dev] [PATCH v4 3/3] ethdev: allow close function to return an error

2020-10-13 Thread Thomas Monjalon
13/10/2020 10:40, Andrew Rybchenko: > On 10/6/20 1:57 PM, Thomas Monjalon wrote: > > 06/10/2020 11:43, Ferruh Yigit: > >> On 10/5/2020 6:08 PM, Thomas Monjalon wrote: > >>> The API function rte_eth_dev_close() was returning void. > >>> The return type is changed to int for notifying of errors. > >>

Re: [dpdk-dev] [PATCH v4 3/3] ethdev: allow close function to return an error

2020-10-13 Thread Andrew Rybchenko
On 10/6/20 1:57 PM, Thomas Monjalon wrote: > 06/10/2020 11:43, Ferruh Yigit: >> On 10/5/2020 6:08 PM, Thomas Monjalon wrote: >>> The API function rte_eth_dev_close() was returning void. >>> The return type is changed to int for notifying of errors. >>> >>> If an error happens during a close operati

Re: [dpdk-dev] [PATCH v4 3/3] ethdev: allow close function to return an error

2020-10-06 Thread Thomas Monjalon
06/10/2020 11:43, Ferruh Yigit: > On 10/5/2020 6:08 PM, Thomas Monjalon wrote: > > The API function rte_eth_dev_close() was returning void. > > The return type is changed to int for notifying of errors. > > > > If an error happens during a close operation, > > the status of the port is undefined,

Re: [dpdk-dev] [PATCH v4 3/3] ethdev: allow close function to return an error

2020-10-06 Thread Ferruh Yigit
On 10/5/2020 6:08 PM, Thomas Monjalon wrote: The API function rte_eth_dev_close() was returning void. The return type is changed to int for notifying of errors. If an error happens during a close operation, the status of the port is undefined, a maximum of resources having been freed. Signed-of