[PATCH v3 4/5] app/test: use rte macro instead of GCC attribute
Tyler Retzlaff
roretzla at linux.microsoft.com
Wed Mar 6 23:14:46 CET 2024
Use newly added __rte_pure macro from rte_common.h instead of
directly using __attribute__((pure)).
Signed-off-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
---
app/test-fib/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/test-fib/main.c b/app/test-fib/main.c
index 75a5613..c49bfe8 100644
--- a/app/test-fib/main.c
+++ b/app/test-fib/main.c
@@ -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 */
--
1.8.3.1
More information about the dev
mailing list