[dpdk-dev] [PATCH v4 1/9] bus: add bus iterator to find a particular bus
Thomas Monjalon
thomas at monjalon.net
Wed Jun 21 14:12:11 CEST 2017
21/06/2017 01:29, Gaetan Rivet:
> +/**
> + * Bus iterator to find a particular bus.
> + *
> + * If the callback returns zero this function will stop iterating over
> + * any more buses.
> + * If the start parameter is non-NULL, the comparison will only be determined
> + * past this element.
> + *
> + * @param cmp
> + * Comparison function.
> + *
> + * @param data
> + * Data to pass to cmp callback
> + *
> + * @param start
> + * Starting point for the iteration.
> + *
> + * @return
> + * A pointer to a rte_bus structure or NULL in case no bus matches
> + */
> +struct rte_bus *rte_bus_find(rte_bus_cmp_t cmp,
> + const void *data,
> + const struct rte_bus *start);
>
What will be the typical usage? find by name?
Does it make sense to implement a helper for find_by_name?
Or is it used only for rte_bus_find_by_device()?
More information about the dev
mailing list