[PATCH] eal/unix: lower log level for reading files
Morten Brørup
mb at smartsharesystems.com
Fri Oct 27 11:00:37 CEST 2023
> From: David Marchand [mailto:david.marchand at redhat.com]
> Sent: Friday, 27 October 2023 10.01
>
> The eal_parse_sysfs_value helper both returns an error code and logs an
> error level message when something goes wrong.
> On the other hand, internal users of this helper either ignore this
> error code (like when trying to find out some numa information from the
> Linux sysfs, or discovering some optional feature), or add their own
> error
> logging when reading the file actually matters.
>
> Lower this helper log messages to debug level as it provides no useful
> information to final DPDK users.
Such assumptions seem risky.
Please add __attribute__ ((warn_unused_result)) to this function's header, to support the assumption.
Alternatively, add a "bool may_not_exist" parameter to the function to choose the relevant log level.
More information about the dev
mailing list