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 8FAD643903; Fri, 19 Jan 2024 23:45:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4848540297; Fri, 19 Jan 2024 23:45:21 +0100 (CET) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by mails.dpdk.org (Postfix) with ESMTP id 36BDE40144 for ; Fri, 19 Jan 2024 23:45:19 +0100 (CET) Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-6d9b13fe9e9so1064695b3a.2 for ; Fri, 19 Jan 2024 14:45:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1705704318; x=1706309118; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=ceREBz75L4VqvuAMDN4APCSCx8/qPi5y+enWEuBWQkg=; b=z7N22eVsYkGGShqNDzn6QSMF9E56AyPfK1b6lerjcBrFi4DE532jTgFIr4NaGhdJYZ XFjNqlKwEsN48KenjdM0CpGfLQ13a1XO3XOQcR34WYicl8OEGNfaczGuzwCD23vQkt3k prNhdEOxzRMHUfwc/L6Js03wTIvJrSvthOopKMarZATS0oFoyRiNrn9qyB8AJivDbq4S qkrr+OqOuPgIY5EZhoqSwANj/x0YMTs2r0vjubVKCHX0Fq2XuPAuC6bRP+FrduE8rupi hjjT+DSzgBfQgeANalGb/okSheqHovtAnE4SVQWE33yUMQ6RnC7K+xMd9isbUjXDIly1 9mMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705704318; x=1706309118; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ceREBz75L4VqvuAMDN4APCSCx8/qPi5y+enWEuBWQkg=; b=WOFGUuLZ+3SIkis+OS+XkCJKpQbQEtW/2cEaj4Q511qlRN9JbYd0pEXt3V6x1trJOe TNpULX7Hv8IPBKpEdIabBOMQMnX2M3ke18+hgjrNH/akv0kpFKUKFXMOoHAeC3T9gXNf cpO91xSbUpARWGjjAUMKqSt5mQzKFfVC5KZxwJSYJL0bUkHbCF5lMs6dFLo1+cmEZIb7 l4M+osJJwomAZS0MgjXrBGA4lL39VaiBe7Vybb/pJ0hpmHv0aM+AUA6aScS9JyU7P5wn moQ/0jRRFaBlCRw9XDmOm3+gBXtIES2bcLwLvXtLJrKkzu1jaXjsz4kPhMTFbiFlEglH whgw== X-Gm-Message-State: AOJu0YyElP9+nfZzWR1rc6RWlofU5eRLXS8ZCtIty73xmVNpoHAYSIek WuczV2VPcOhBpkGoNYpQpa+V5fUpgmMHJ8Kuw9BrHzSGQ8zOjXEz8HN/DmO+CrQ= X-Google-Smtp-Source: AGHT+IFL91IkBgZIv7b/rUfZxyRo/a2WSrVY5J3BL/PJzC8vkBk184NAtcxbg+J6w3JtV/57Vwyqng== X-Received: by 2002:a05:6a00:464b:b0:6d9:b4e6:ffb with SMTP id kp11-20020a056a00464b00b006d9b4e60ffbmr715860pfb.0.1705704318184; Fri, 19 Jan 2024 14:45:18 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id i124-20020a62c182000000b006dadc436071sm5844478pfg.36.2024.01.19.14.45.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 14:45:18 -0800 (PST) Date: Fri, 19 Jan 2024 14:39:36 -0800 From: Stephen Hemminger To: Tyler Retzlaff Cc: dev@dpdk.org Subject: Re: [PATCH v4 1/6] eal: introduce RTE_MIN_T() and RTE_MAX_T() macros Message-ID: <20240119143928.423fac80@hermes.local> In-Reply-To: <20240119205847.GA24862@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20231111172153.57461-1-stephen@networkplumber.org> <20240117182541.211125-1-stephen@networkplumber.org> <20240117182541.211125-2-stephen@networkplumber.org> <20240119205847.GA24862@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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 Fri, 19 Jan 2024 12:58:47 -0800 Tyler Retzlaff wrote: > On Wed, Jan 17, 2024 at 10:19:55AM -0800, 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. > > parameter ordering seems weird, also Linux kernel copied? just curious > more than anything. if not i would put 't' as the first parameter. > > Acked-by: Tyler Retzlaff Hmm, kernel version takes type first will use that.