Introduce new rte_devargs accessor allowing to iterate over all rte_devargs pertaining to a bus.
Signed-off-by: Gaetan Rivet <gaetan.ri...@6wind.com> --- lib/librte_eal/common/include/rte_devargs.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/librte_eal/common/include/rte_devargs.h b/lib/librte_eal/common/include/rte_devargs.h index 0eec406..6222677 100644 --- a/lib/librte_eal/common/include/rte_devargs.h +++ b/lib/librte_eal/common/include/rte_devargs.h @@ -206,6 +206,14 @@ void rte_eal_devargs_dump(FILE *f); struct rte_devargs * rte_eal_devargs_next(const char *busname, const struct rte_devargs *start); +/** + * Iterate over all rte_devargs for a specific bus. + */ +#define RTE_EAL_DEVARGS_FOREACH(busname, da) \ + for (da = rte_eal_devargs_next(busname, NULL); \ + da != NULL; \ + da = rte_eal_devargs_next(busname, da)) \ + #ifdef __cplusplus } #endif -- 2.1.4