From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 31A5B43C62; Wed, 6 Mar 2024 23:15:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BB1E942ECF; Wed, 6 Mar 2024 23:14:54 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 77E5A42DBD for ; Wed, 6 Mar 2024 23:14:49 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id C61DF20B74C4; Wed, 6 Mar 2024 14:14:48 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C61DF20B74C4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1709763288; bh=egNl7GP6L08rChXF5v9IVyvDZdgu53/a8xQw8mc29fo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RTYXui8755VIbqvFWV2h8hMxv5w6AACtVRtU6FVI1dqkpjUMyB18qC3VthqKtIV6+ h9rylXI11nstvlQu1mHopbbF7xH2dLrPcfRWiVr2r1AIdiBLR9DGTf0OG3YpsxoJul gy6H+qw4QfnkF8VGX/R/GpjJq6R0oUgUwYX+AtvE= From: Tyler Retzlaff To: dev@dpdk.org Cc: Bruce Richardson , Honnappa Nagarahalli , Vladimir Medvedkin , mb@smartsharesystems.com, david.marchand@redhat.com, Tyler Retzlaff Subject: [PATCH v3 4/5] app/test: use rte macro instead of GCC attribute Date: Wed, 6 Mar 2024 14:14:46 -0800 Message-Id: <1709763287-10713-5-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1709763287-10713-1-git-send-email-roretzla@linux.microsoft.com> References: <1709075273-6885-1-git-send-email-roretzla@linux.microsoft.com> <1709763287-10713-1-git-send-email-roretzla@linux.microsoft.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Use newly added __rte_pure macro from rte_common.h instead of directly using __attribute__((pure)). Signed-off-by: Tyler Retzlaff --- 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