[PATCH] rawdev: fix device ID retrieval function prototype
Thomas Monjalon
thomas at monjalon.net
Thu Oct 16 10:08:24 CEST 2025
16/10/2025 08:56, Nawal Kishor:
>
> >> Fixed rte_rawdev_get_dev_id() function prototype and its usage.
> >
> >What? Why?
>
> >[...]
> >> -uint16_t
> >> +int
> >> rte_rawdev_get_dev_id(const char *name);
>
> >Other functions handle dev_id as uint16_t, so why changing this function?
>
> The spec says that rte_rawdev_get_dev_id() returns negative number in case of failure.
> But in the definition it is returning uint16_t which will never be negative, hence changed it to int.
>
> If this is not acceptable, what fix will you suggest?
You should change to int16_t for all rawdev id parameters.
More information about the dev
mailing list