[dpdk-dev] [PATCH v3 1/3] eal: add API for bus close

Ferruh Yigit ferruh.yigit at intel.com
Thu Sep 24 13:39:27 CEST 2020


On 8/26/2020 6:52 AM, rohit.raj at nxp.com wrote:
> From: Rohit Raj <rohit.raj at nxp.com>
> 
> As per the current code we have API for bus probe, but the
> bus close API is missing. This breaks the multi process
> scenarios as objects are not cleaned while terminating the
> secondary processes.
> 
> This patch adds a new API rte_bus_close() for cleanup of
> bus objects which were acquired during probe.
> 
> Signed-off-by: Rohit Raj <rohit.raj at nxp.com>

<...>

> @@ -67,6 +67,18 @@ typedef int (*rte_bus_scan_t)(void);
>    */
>   typedef int (*rte_bus_probe_t)(void);
>   
> +/**
> + * Implementation specific close function which is responsible for closing
> + * devices on that bus.
> + *
> + * This is called while iterating over each registered bus.
> + *
> + * @return
> + *	0 for successful close
> + *	!0 for any error while closing
> + */
> +typedef int (*rte_bus_close_t)(void);
> +

Can you please put more comments to clarify what does "closing devices 
on bus" mean, what is the responsibility of that function, what is the 
expected state after that function, etc ?

Since 'pci' & 'vdev' bus implementations are missing, this comment 
should help them to clarify what exactly needs to be implemented for 
those buses.


More information about the dev mailing list