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

2024-01-19 Thread Stephen Hemminger
On Fri, 19 Jan 2024 12:58:47 -0800 Tyler Retzlaff wrote: > On Wed, Jan 17, 2024 at 10:19:55AM -0800, 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 va

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

2024-01-19 Thread Tyler Retzlaff
On Wed, Jan 17, 2024 at 10:19:55AM -0800, 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. Thes

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

2024-01-18 Thread Andrew Rybchenko
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

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

2024-01-18 Thread Konstantin Ananyev
> 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 r

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

2024-01-17 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