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 7141E438F9; Fri, 19 Jan 2024 02:30:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0DA1640274; Fri, 19 Jan 2024 02:30:42 +0100 (CET) Received: from szxga07-in.huawei.com (szxga07-in.huawei.com [45.249.212.35]) by mails.dpdk.org (Postfix) with ESMTP id 284224026F for ; Fri, 19 Jan 2024 02:30:40 +0100 (CET) Received: from mail.maildlp.com (unknown [172.19.88.163]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4TGMTQ2CwQz1V4Mr; Fri, 19 Jan 2024 09:28:58 +0800 (CST) Received: from dggpeml500024.china.huawei.com (unknown [7.185.36.10]) by mail.maildlp.com (Postfix) with ESMTPS id 36D1718001A; Fri, 19 Jan 2024 09:30:38 +0800 (CST) Received: from [10.67.121.161] (10.67.121.161) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 19 Jan 2024 09:30:37 +0800 Subject: Re: [PATCH v5 1/6] eal: introduce RTE_MIN_T() and RTE_MAX_T() macros To: Stephen Hemminger , CC: Konstantin Ananyev , Andrew Rybchenko References: <20231111172153.57461-1-stephen@networkplumber.org> <20240118165315.63959-1-stephen@networkplumber.org> <20240118165315.63959-2-stephen@networkplumber.org> From: fengchengwen Message-ID: <0541e291-7f4b-1a78-d407-e1d822601ad7@huawei.com> Date: Fri, 19 Jan 2024 09:30:37 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20240118165315.63959-2-stephen@networkplumber.org> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.121.161] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpeml500024.china.huawei.com (7.185.36.10) 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 2024/1/19 0:50, 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: Konstantin Ananyev > Acked-by: Andrew Rybchenko > --- Acked-by: Chengwen Feng