[dpdk-dev] [PATCH v4 2/9] bus: add device iterator

Thomas Monjalon thomas at monjalon.net
Wed Jun 21 13:55:39 CEST 2017


21/06/2017 01:29, Gaetan Rivet:
> +/**
> + * Device comparison function.
> + *
> + * @param dev
> + *   Device handle.
> + *
> + * @param data
> + *   Data to compare against.
> + *
> + * @return
> + *   0 if the device matches the data.
> + *   !0 if the device does not match.
> + *   <0 if ordering is possible and the device is lower than the data.
> + *   >0 if ordering is possible and the device is greater than the data.
> + */
> +typedef int (*rte_dev_cmp_t)(const struct rte_device *dev, const void *data);

data is really abstract.
Maybe a comment is missing to explain that data is better specified
in bus implementations?

Why not implement it for PCI?



More information about the dev mailing list