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 AD543438F4; Thu, 18 Jan 2024 17:53:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2D08E40295; Thu, 18 Jan 2024 17:53:28 +0100 (CET) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mails.dpdk.org (Postfix) with ESMTP id C5C7140285 for ; Thu, 18 Jan 2024 17:53:26 +0100 (CET) Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1d5db9eb0e7so26407275ad.2 for ; Thu, 18 Jan 2024 08:53:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1705596806; x=1706201606; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VhyPHmi1KD+XWzE/jdJQtPKjKk6JVgk3jt6MazuJ1O8=; b=leIIKB9BALGyQd7tijJ76V9EqesIs4Q5SKS0g8Y2BJ0KMNsmvmpGFqurT1oVCoFrIt zog2QHPlwDsYv62I3i+MsF4itIJHGc48wQo0tkmsCGnHkzZLwW0HpwyYDy/qo7I/S5no Jo3SnV5lrm0EpZQulKZCSq+w8cf6fGcQ4i899AC6wTkwUUOEXHQq0YwkiJx+UaHRRDMR 0Oncl6iwG/uJG/HNjxs7LxPJStJHu2CD70nUqLA6GvvkPay463FL/dFlS0UcubvSXP7U Q5+5n1EfMBLiwlpcjacQSLT237koEdlGe2AliNlYLu3+1O19RFZSdddGQtPiUtRnEoig DAEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705596806; x=1706201606; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VhyPHmi1KD+XWzE/jdJQtPKjKk6JVgk3jt6MazuJ1O8=; b=EVzzfCqJPV1mGCDgJqOwIM2bMnGvdHZlFXXx9eFoQu25GXCIjLmzD4LYaZ1UpTG5M0 hDy0bMXwbiwsLhq6xl1s3V4GtQvhGKcNgLMZj2Jzl6Ey7/DINpNS3y4hmbA66nVrwHBy MJozcY56NMF9HEq/eMvcseuL0CTKpsq+NsvcJLmgMKks+ceYNyjbvZH4mlmzeGsoFE/1 KpUeHBdZXUTAITnKxciJPLDomfO9M6GUEOmhsFzasSqbdMjKkq15GlpOBZ4kR2TwAByv VjGilxyqDjxGWDDN+u/1LJ54IOV32vDbXy2tbSqLo2VQIa8tv70WlPfqVm6B8jygS8jP 8CQQ== X-Gm-Message-State: AOJu0Ywgpxd8K44NZaMES36xcyHlbBXLx513hABIDX8hu3EOCJ374jp3 /0+Q2RWH84zw5Wjx9Km8UVt1G7Ig03nnElejOuL03AlbdR60lLlHYRo1PhiP3l7CkI9B1uFEg0w SAA4= X-Google-Smtp-Source: AGHT+IFeGdwAES7ykwfWdXA9zzHDfX0IS4CW5fGiwqpoSLzifeKaf57S8gzdXnYRVGLzSvke3fQzRQ== X-Received: by 2002:a17:902:7c94:b0:1d4:3d04:cdd with SMTP id y20-20020a1709027c9400b001d43d040cddmr1017158pll.32.1705596805740; Thu, 18 Jan 2024 08:53:25 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id u2-20020a170903304200b001d706912d1esm1427980pla.225.2024.01.18.08.53.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 08:53:25 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v5 0/6] use static_assert for build error reports Date: Thu, 18 Jan 2024 08:50:55 -0800 Message-ID: <20240118165315.63959-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231111172153.57461-1-stephen@networkplumber.org> References: <20231111172153.57461-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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(-) -- 2.43.0