From: Tyler Retzlaff <roretzla@linux.microsoft.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,
Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
mb@smartsharesystems.com, david.marchand@redhat.com,
Tyler Retzlaff <roretzla@linux.microsoft.com>
Subject: [PATCH v3 2/5] lpm: use rte macro instead of GCC attribute
Date: Wed, 6 Mar 2024 14:14:44 -0800 [thread overview]
Message-ID: <1709763287-10713-3-git-send-email-roretzla@linux.microsoft.com> (raw)
In-Reply-To: <1709763287-10713-1-git-send-email-roretzla@linux.microsoft.com>
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>
---
lib/lpm/rte_lpm.c | 4 ++--
lib/lpm/rte_lpm6.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/lpm/rte_lpm.c b/lib/lpm/rte_lpm.c
index 9633d63..a5c9e7c 100644
--- a/lib/lpm/rte_lpm.c
+++ b/lib/lpm/rte_lpm.c
@@ -85,7 +85,7 @@ struct __rte_lpm {
* depth (IN) : range = 1 - 32
* mask (OUT) : 32bit mask
*/
-static uint32_t __attribute__((pure))
+static uint32_t __rte_pure
depth_to_mask(uint8_t depth)
{
VERIFY_DEPTH(depth);
@@ -99,7 +99,7 @@ static uint32_t __attribute__((pure))
/*
* Converts given depth value to its corresponding range value.
*/
-static uint32_t __attribute__((pure))
+static uint32_t __rte_pure
depth_to_range(uint8_t depth)
{
VERIFY_DEPTH(depth);
diff --git a/lib/lpm/rte_lpm6.c b/lib/lpm/rte_lpm6.c
index 46d8f71..42828a1 100644
--- a/lib/lpm/rte_lpm6.c
+++ b/lib/lpm/rte_lpm6.c
@@ -1128,7 +1128,7 @@ struct rte_lpm6 *
* Convert a depth to a one byte long mask
* Example: 4 will be converted to 0xF0
*/
-static uint8_t __attribute__((pure))
+static uint8_t __rte_pure
depth_to_mask_1b(uint8_t depth)
{
/* To calculate a mask start with a 1 on the left hand side and right
--
1.8.3.1
next prev parent reply other threads:[~2024-03-06 22:15 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-27 23:07 [PATCH 0/3] use rte macros instead of GCC __attribute Tyler Retzlaff
2024-02-27 23:07 ` [PATCH 1/3] eal: add rte pure attribute macro Tyler Retzlaff
2024-02-27 23:07 ` [PATCH 2/3] lpm: use rte macro instead of GCC attribute Tyler Retzlaff
2024-02-27 23:07 ` [PATCH 3/3] rcu: " Tyler Retzlaff
2024-02-28 9:29 ` Morten Brørup
2024-02-28 17:29 ` Tyler Retzlaff
2024-02-28 18:47 ` [PATCH v2 0/3] use rte macros instead of GCC __attribute Tyler Retzlaff
2024-02-28 18:47 ` [PATCH v2 1/3] eal: add rte pure attribute macro Tyler Retzlaff
2024-02-28 18:47 ` [PATCH v2 2/3] lpm: use rte macro instead of GCC attribute Tyler Retzlaff
2024-03-06 20:51 ` Medvedkin, Vladimir
2024-02-28 18:47 ` [PATCH v2 3/3] rcu: " Tyler Retzlaff
2024-03-06 19:36 ` [PATCH v2 0/3] use rte macros instead of GCC __attribute Tyler Retzlaff
2024-03-06 20:49 ` David Marchand
2024-03-06 21:22 ` Tyler Retzlaff
2024-03-06 22:14 ` [PATCH v3 0/5] " Tyler Retzlaff
2024-03-06 22:14 ` [PATCH v3 1/5] eal: add rte pure attribute macro Tyler Retzlaff
2024-03-06 22:14 ` Tyler Retzlaff [this message]
2024-03-06 22:14 ` [PATCH v3 3/5] rcu: use rte macro instead of GCC attribute Tyler Retzlaff
2024-03-06 22:14 ` [PATCH v3 4/5] app/test: " Tyler Retzlaff
2024-03-06 22:41 ` Morten Brørup
2024-03-06 22:14 ` [PATCH v3 5/5] net/cxgbe: " Tyler Retzlaff
2024-03-06 22:42 ` Morten Brørup
2024-06-12 8:16 ` David Marchand
2024-06-13 13:44 ` David Marchand
2024-06-13 14:05 ` David Marchand
2024-10-07 20:18 ` Stephen Hemminger
2024-10-09 6:47 ` Potnuri Bharat Teja
2024-10-09 20:27 ` David Marchand
2024-06-13 14:07 ` [PATCH v3 0/5] use rte macros instead of GCC __attribute David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1709763287-10713-3-git-send-email-roretzla@linux.microsoft.com \
--to=roretzla@linux.microsoft.com \
--cc=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=honnappa.nagarahalli@arm.com \
--cc=mb@smartsharesystems.com \
--cc=vladimir.medvedkin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).