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 AB5DA438E3; Tue, 16 Jan 2024 19:43:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1C38E40278; Tue, 16 Jan 2024 19:43:13 +0100 (CET) Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) by mails.dpdk.org (Postfix) with ESMTP id 70A42400D6 for ; Tue, 16 Jan 2024 19:43:12 +0100 (CET) Received: by mail-pg1-f175.google.com with SMTP id 41be03b00d2f7-5c6bd3100fcso4437590a12.3 for ; Tue, 16 Jan 2024 10:43:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1705430591; x=1706035391; 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=ozxS4jNVUp1dvOxAiFbrZOBtn8DMWN4wHhSKaR1D8Xk=; b=q6cSvgVjey4WxLsP119g7nQve173uxxQx3coKVyqktTcqMgeMXmnE7fjted1NiQxnE lvtrklNrV38e7UJmgTNG9CwtokVVmuvv16wWeWlmFd/lWlaJb9Goa9yeZujzNMnexvrn 52KcsraTgjETW6rsOL+XgEQh5ysaE9wxT3KXileB++rQo7DCL9IcWxTrQ48EahynfAcp Cy5p254f8m64ZeRZqnekhLPrFPnEvzLrbfnT23amZZtQTfK3bwm/YEzYCXAMwOtIAeTv HvJagQNTeKsbnTxYp/8N/m64WuCyJ0/QDUpudcgUCVuSeCN4s7/D0QmBYL8QT8Y7lGE3 yq5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705430591; x=1706035391; 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=ozxS4jNVUp1dvOxAiFbrZOBtn8DMWN4wHhSKaR1D8Xk=; b=MNrAaJx69IjXsMy/JHtXq01FBgiUKLWxkB5OBp8zwD/TRpT3FCxybnZecCI+nayf6J 5lggx8eEeL8awRLaTZgDfO+6jfO4GYgZc5kDTz+3WDIVlc8VjFkdNOMAb70AIDsqT9PC aMbwJBGU9lFTQQFnc91J0PF2E8ydm+jHbBhVm3RvViSSJ4CL3Yo6aj6+uPFmnuTNVs6c FisPcxDnlVvgBCUddPkGqtrEMVa55ABJm7E83MiNdNebZHLRwBnbIuBbBd0WOLikyu8W hnr+zSdNG76uSitmxEAFS6b0/XlLZs/ERhyt/NthsQb+PnZRIYDUSqM/EHKYFbKysUUR XJrQ== X-Gm-Message-State: AOJu0YxBMcQ46qujwtTzxmo7ySsZjdTrjNmM0qDx0sBFH9GQBh37NS3A LbRlqgICKKqkdoZ7nqvAhla7uRfKoNV9223FN9C9czJHTYRneA== X-Google-Smtp-Source: AGHT+IFqh8PH/cpJugHzqk04VQGfQiTYPUeVBNnMaUjeMmMitYB3HTOHYv6VlLa1is/u/4IWU+jo4Q== X-Received: by 2002:a17:903:2b0c:b0:1d6:a70:8096 with SMTP id mc12-20020a1709032b0c00b001d60a708096mr630218plb.81.1705430591406; Tue, 16 Jan 2024 10:43:11 -0800 (PST) Received: from hermes.lan (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id m8-20020a1709026bc800b001d60a70809bsm379238plt.168.2024.01.16.10.43.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 10:43:11 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v3 0/5] use static_assert to catch build errors Date: Tue, 16 Jan 2024 10:41:10 -0800 Message-ID: <20240116184307.162882-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. And 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. Stephen Hemminger (5): 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 | 5 ++++- drivers/net/i40e/i40e_ethdev.h | 1 + drivers/net/i40e/i40e_rxtx_vec_sse.c | 10 ++++------ drivers/net/sfc/sfc_ef100_tx.c | 7 +++++-- lib/eal/include/rte_common.h | 3 ++- lib/mempool/rte_mempool.c | 4 +--- 6 files changed, 17 insertions(+), 13 deletions(-) -- 2.43.0