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 09AD443B2A; Fri, 16 Feb 2024 10:14:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 853FB40A6F; Fri, 16 Feb 2024 10:14:32 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id D1ECA4064A for ; Fri, 16 Feb 2024 10:14:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708074870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FNR5+YTwFjYrjhLGIzR0vyCw3Pr8K+DkR65CC35dADY=; b=LWmvbaQN0SoK1ZM4QyomVnXhDAhHcp9/OeQIA3SZR37UFEaj0oQIXHTCUhcWwY0hNopLk2 IC5ODPOgtHssQtpY95KqSXNCF2QJ2+QipHxnZO3+0FcnIFf9A3/Ri8KxZPPYGBPUx9Ye9c u8aMxJ9VdK31EEkNvowQqslrMJZJcr8= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-522-yc6AWoZbPtaDmFQFumyUvA-1; Fri, 16 Feb 2024 04:14:28 -0500 X-MC-Unique: yc6AWoZbPtaDmFQFumyUvA-1 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-51169a55bddso1643511e87.0 for ; Fri, 16 Feb 2024 01:14:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708074867; x=1708679667; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FNR5+YTwFjYrjhLGIzR0vyCw3Pr8K+DkR65CC35dADY=; b=Zb5C+a0mLEciwDvGQYD1bHYtDW0k60FR2TmZQ7qKjCRh7ExeKeD8DieJxjqttgynVk iqqIJGvEN8yMi/9Eg8dbh1dWnmOV1qGnGbR/GAqfv3SYV4u4QJZTPZL9Mq8z4Mt4bUe6 gnsKCL4kSHdGmQez/Xek3LkFhkEntrbr7r0gG5nMIAZlk6nz/nahCl1kP1DxMnxTP2vp NOF1sYGXRjQOwMpXTNxLBk8FSf+lZRb9vFQqH0+XcGqEFEfPPALGZMqeUGXZ0vyCwe1Z MUmxjpw5BlZWekVy1T+Z8akcGaSMVV9zSl+lgcus8hLjXqHPgQ+9FSldPiLDmI+p09rc ZOmw== X-Gm-Message-State: AOJu0YxJ6CbeDlL+9cBu9GRSnT//xIkvPpSysatG11P5CQkTFy++MpjH g1q9AYCQU/SaKi4b3pCaK96zBj+kvcVNasR/Ytty7KcQ+rPNGh9ChivwcA4PS5ZYzPp7tH94oUm Tp67V6s9fBRkkforAsaSygJZKVCWg5xtexV50rY/37BkjF8znFhCU3dzcf+vVXn4wnXqvageUJK dTBREv9BZvsKlZS5Y= X-Received: by 2002:a19:3803:0:b0:511:8cb1:7c9d with SMTP id f3-20020a193803000000b005118cb17c9dmr3048331lfa.24.1708074866873; Fri, 16 Feb 2024 01:14:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IHx+SXtQagEeFkupQpEEPtc+rcAq+4VjkI4OSkml475C+3yV4PjlGYNUFZ7jxHada9xuZhpQQnzb8va+jWllVc= X-Received: by 2002:a19:3803:0:b0:511:8cb1:7c9d with SMTP id f3-20020a193803000000b005118cb17c9dmr3048322lfa.24.1708074866498; Fri, 16 Feb 2024 01:14:26 -0800 (PST) MIME-Version: 1.0 References: <20231111172153.57461-1-stephen@networkplumber.org> <20240118165315.63959-1-stephen@networkplumber.org> In-Reply-To: <20240118165315.63959-1-stephen@networkplumber.org> From: David Marchand Date: Fri, 16 Feb 2024 10:14:14 +0100 Message-ID: Subject: Re: [PATCH v5 0/6] use static_assert for build error reports To: Stephen Hemminger Cc: dev@dpdk.org, Bruce Richardson , Thomas Monjalon , =?UTF-8?Q?Morten_Br=C3=B8rup?= , Tyler Retzlaff X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Thu, Jan 18, 2024 at 5:53=E2=80=AFPM Stephen Hemminger wrote: > > This series fixes a couple places where expressions that could not > be evaluated as constant early in compiler passes were used. > Then converts RTE_BUILD_BUG_ON() with static_assert. > > static_assert() is more picky about the expression has to > be a constant, which also catches some existing undefined > behavior that pre-existed. > > The series requires a couple of workarounds to deal > with quirks in static_assert() in some toolchains. > > v6 - minor cleanups > handle missing macro in old FreeBSD > > Stephen Hemminger (6): > eal: introduce RTE_MIN_T() and RTE_MAX_T() macros > event/opdl: fix non-constant compile time assertion > net/sfc: fix non-constant expression in RTE_BUILD_BUG_ON() > net/i40e: avoid using const variable in assertion > mempool: avoid floating point expression in static assertion > eal: replace out of bounds VLA with static_assert > > drivers/event/opdl/opdl_ring.c | 2 +- > drivers/net/i40e/i40e_ethdev.h | 1 + > drivers/net/i40e/i40e_rxtx_vec_sse.c | 10 ++++------ > drivers/net/mlx5/mlx5_rxq.c | 2 +- > drivers/net/sfc/sfc_ef100_tx.c | 3 +-- > lib/eal/include/rte_common.h | 27 ++++++++++++++++++++++++++- > lib/mempool/rte_mempool.c | 7 ++++--- > 7 files changed, 38 insertions(+), 14 deletions(-) Added a small RN and applied, thanks Stephen. --=20 David Marchand