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 DA1DA438E4; Wed, 17 Jan 2024 19:25:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 946EA4025E; Wed, 17 Jan 2024 19:25:53 +0100 (CET) Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by mails.dpdk.org (Postfix) with ESMTP id 853274014F for ; Wed, 17 Jan 2024 19:25:52 +0100 (CET) Received: by mail-pj1-f49.google.com with SMTP id 98e67ed59e1d1-28e73631189so1162283a91.3 for ; Wed, 17 Jan 2024 10:25:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1705515951; x=1706120751; 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=Jd8uZUfdaFtMdfF0tnEZmUKUlSFKNQRp7ptlZZVEglE=; b=JBZsTg/XQhfRgV2UXEmT8P4f0oarAjMcy2rRZiuuBCH9CTh+ca6NKU/aFIwea8xBy6 kjnv7w7EWJQstUHBiNvE/Xva5hOkoYlDYxkAWTFSrM8DHfRJVrqVxcpKgXU4OQw9lyra yLxdpDqJb9dM/oVkHKEbzeVj3RYWLs/5UDK68n9mYDk19fjXt4Og7fri3/7E/iHoQOTm Lq40MBda5QQDEKh9P/e1rs2hIqD20i3ASKBNRFMc0YcBuYwz5dIVxZA8BRbCMTXk8Awp qvScqm06yp7DOhiuvf2qlFF9JQKic0D27nT6luH48NWjGmS1YbVIAhcsI8E76TIUS3NM kKjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705515951; x=1706120751; 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=Jd8uZUfdaFtMdfF0tnEZmUKUlSFKNQRp7ptlZZVEglE=; b=qwGhYQDJYysLbM4gsp6VWth2F0J2rSo/yoiv1o+UTCcDpJT+WWM+HPVE/AVcSTfd1f EIlMwxsPOfhfmCOADbNDonuTJalBAfoF5PVHb4f96QQ4f9+E3HcTQCxT/o1hJ2icE2AE 2snFH5E3hWxT4Q2QO+7jwrfON8WuK/gcXaOzDmmNX0qWD/+eo3aSsUlRKblL1zHI4cCk VM6xLzf2F9nhZgdiuOxMSD/bJ/NLBYJVCt4MRCHfcS8qoYJO7sD6kaoYVMRpaElf7vxN RTKYJL5Yc/bNSD46w3JB9XOsfC7MXrfFoy+02bt+9ouHUNsRVqTj3uPEcQYEYaLodAQ8 zVKQ== X-Gm-Message-State: AOJu0YyNdbCjm2iYGxuRnzLHar9AjibCyE76rz5HAhfl8UQL0YwNDmDu OMm+0DqG48VxJZCk3HUWKeA8JXteks3NXIiMyoWVAYBxfGvPtQ== X-Google-Smtp-Source: AGHT+IGrwLD3PrXQvinBz/qW2/HX6sddyITuV2WylMCnCGEgYBPybIKwninwvlWpcY0qLJ9XCzE+lA== X-Received: by 2002:a17:90b:908:b0:290:14a1:d6c1 with SMTP id bo8-20020a17090b090800b0029014a1d6c1mr124516pjb.26.1705515951506; Wed, 17 Jan 2024 10:25:51 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id qj15-20020a17090b28cf00b0028ce507cd7dsm14334124pjb.55.2024.01.17.10.25.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 10:25:51 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v4 0/6] use static assert to cathc build errors Date: Wed, 17 Jan 2024 10:19:54 -0800 Message-ID: <20240117182541.211125-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. v4 - incorporate review feedback add RTE_MIN_T and RTE_MAX_T macros 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 | 4 +--- lib/eal/include/rte_common.h | 19 ++++++++++++++++++- lib/mempool/rte_mempool.c | 7 ++++--- 7 files changed, 30 insertions(+), 15 deletions(-) -- 2.43.0