[dpdk-dev] [PATCH v3 05/20] eal: introduce device class abstraction

Shreyansh Jain shreyansh.jain at nxp.com
Tue Mar 27 10:38:31 CEST 2018


On 3/27/2018 4:48 AM, Gaetan Rivet wrote:
> Signed-off-by: Gaetan Rivet <gaetan.rivet at 6wind.com>
> ---
>   lib/librte_eal/bsdapp/eal/Makefile         |   1 +
>   lib/librte_eal/common/Makefile             |   2 +-
>   lib/librte_eal/common/eal_common_class.c   |  62 +++++++++++++++
>   lib/librte_eal/common/include/rte_class.h  | 121 +++++++++++++++++++++++++++++
>   lib/librte_eal/common/include/rte_common.h |   1 +
>   lib/librte_eal/linuxapp/eal/Makefile       |   1 +
>   lib/librte_eal/rte_eal_version.map         |   2 +
>   7 files changed, 189 insertions(+), 1 deletion(-)
>   create mode 100644 lib/librte_eal/common/eal_common_class.c
>   create mode 100644 lib/librte_eal/common/include/rte_class.h
> 

[...]

> +
> +/**
> + * Class iterator to find a particular class.
> + *
> + * This function compares each registered class to find one that matches
> + * the data passed as parameter.
> + *
> + * If the comparison function returns zero this function will stop iterating
> + * over any more classes. To continue a search the class of a previous search
> + * can be passed via the start parameter.
> + *
> + * @param start
> + *	Starting point for the iteration.
> + *
> + * @param cmp
> + *	Comparison function.
> + *
> + * @param data
> + *	 Data to pass to comparison function.
> + *
> + * @return
> + *	 A pointer to a rte_bus structure or NULL in case no class matches

Trivial:               ^^^^^^^^
                 Should be rte_class

[...]

-
Shreyansh


More information about the dev mailing list