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 71EB6438F1; Thu, 18 Jan 2024 10:44:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5E512410E6; Thu, 18 Jan 2024 10:44:28 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 771B0402B0 for ; Thu, 18 Jan 2024 10:44:26 +0100 (CET) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id AC0F050; Thu, 18 Jan 2024 12:44:25 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru AC0F050 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1705571065; bh=0aR+2Gl9+AFW5yokXdtcugI+Z2z0oOXmHYoHs3kc7yM=; h=Date:Subject:To:References:From:In-Reply-To:From; b=Paa2mztjjMvQL3ZjTmnpNyTtWm6qCzalIcbU0+BwG/6Gfpsu8gv6JtaFeRcoSG//k e91G+9jjdg1etOzyikhZd6QnDdwI01Mq1uupA0S929pvOwUmaa+phJpnTp9BWm3TQ4 dl3/7gHgyN1aTnmxeQzIWyEiTgP77Ui1FLjjoNLg= Message-ID: <6e1a5d86-994f-42b5-af88-6bc445551e89@oktetlabs.ru> Date: Thu, 18 Jan 2024 12:44:25 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 1/6] eal: introduce RTE_MIN_T() and RTE_MAX_T() macros Content-Language: en-US To: Stephen Hemminger , dev@dpdk.org References: <20231111172153.57461-1-stephen@networkplumber.org> <20240117182541.211125-1-stephen@networkplumber.org> <20240117182541.211125-2-stephen@networkplumber.org> From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: <20240117182541.211125-2-stephen@networkplumber.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 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 in other scenarios when bounded range is useful. > > Naming is chosen to be similar to Linux kernel conventions. > > Signed-off-by: Stephen Hemminger Acked-by: Andrew Rybchenko