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

2024-01-18 Thread fengchengwen
On 2024/1/19 0:50, 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 > b

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

2024-01-18 Thread Stephen Hemminger
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 usef