[v3,4/5] app/test: use rte macro instead of GCC attribute
Checks
Commit Message
Use newly added __rte_pure macro from rte_common.h instead of
directly using __attribute__((pure)).
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
app/test-fib/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
> From: Tyler Retzlaff [mailto:roretzla@linux.microsoft.com]
> Sent: Wednesday, 6 March 2024 23.15
>
> Use newly added __rte_pure macro from rte_common.h instead of
> directly using __attribute__((pure)).
>
> Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> ---
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
@@ -137,13 +137,13 @@ struct rt_rule_6 {
return (rte_rand() % (u - l) + l);
}
-static __rte_always_inline __attribute__((pure)) uint8_t
+static __rte_always_inline __rte_pure uint8_t
bits_in_nh(uint8_t nh_sz)
{
return 8 * (1 << nh_sz);
}
-static __rte_always_inline __attribute__((pure)) uint64_t
+static __rte_always_inline __rte_pure uint64_t
get_max_nh(uint8_t nh_sz)
{
/* min between fib and lpm6 which is 21 bits */