[PATCH v4 1/6] eal: introduce RTE_MIN_T() and RTE_MAX_T() macros

Andrew Rybchenko andrew.rybchenko at oktetlabs.ru
Thu Jan 18 10:44:25 CET 2024


On 1/17/24 21:19, Stephen Hemminger wrote:
> These macros work like RTE_MIN and RTE_MAX but take an explicit
> type. Necessary when being used in static assertions since
> RTE_MIN and RTE_MAX use temporary variables which confuses
> compilers constant expression checks. These macros could also
> be useful in other scenarios when bounded range is useful.
> 
> Naming is chosen to be similar to Linux kernel conventions.
> 
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>

Acked-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>




More information about the dev mailing list