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 A8C5C438F4; Thu, 18 Jan 2024 17:53:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 66E6942DDC; Thu, 18 Jan 2024 17:53:30 +0100 (CET) Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by mails.dpdk.org (Postfix) with ESMTP id 5136B427D9 for ; Thu, 18 Jan 2024 17:53:28 +0100 (CET) Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-1d5f1e0e32eso20377455ad.3 for ; Thu, 18 Jan 2024 08:53:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1705596807; x=1706201607; 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=aMDg9N34JC+VDEXhQ4uAL2B6yc9fTDRoXXxri4Sih5g=; b=stzFsu6rHT/rllEA4lj6S8i1tDg5zVRQfRmdlY+n4uvSKvZcywnWneD7J22SHqv+LW djKXP9gpbUTui1PLPdlji4xZo1+c2MrWGZXrzS6hOMjaUe3mSchbZtRv+WCdYBrb/7no hC8wdBfGtiC7o9pf77q6IDhyIE90vOktqIXPgmPPemDP9UDLF4hWkVersCBKTIvplb0a 5UnWmKMeipeejGd58ZvEKde/1JuJsEnNAy5TxwwXhASltREj1lwd9h5vOuvnzQRPWY/2 ogQDaSa9y54x3HsMI71N7s+daBsExYtB5+8EyKD/UzBPp8JtqTyQZK2BtkHV7UsmZbnx nb5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705596807; x=1706201607; 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=aMDg9N34JC+VDEXhQ4uAL2B6yc9fTDRoXXxri4Sih5g=; b=PouiwDSOd88QpdgNNrqCjjApfjbXyxs1zURjwNL8zdP6mG40AdFxoqkoGdWwHnbcMR 2AygyW7jixbhqpo3N95dslkG4Jq5pfBOPRClpl6jiBA7umtF/j1U9sq/goUXPuk0eydG glwlm/JtMfggseDjRL4nKByPYEP9pOje6WtzNtXjNa7Wi/Sp5C0Er6LQ9jfUyEH8NXEV ER1azJUR8bTmwuWiFUlw5kcqHKMsu3ZjUHOoVK8EUovUkZ2sthWWF2gaKOmS7GVizSOA h5lvptIRKoMqXk8993R7nyr2TzaBSTpKt0PwVWHVwk+j6OwbCnPZTRfd45VV46Wz5y9M GtEg== X-Gm-Message-State: AOJu0Yyn7+8iujYnH9isMf+eikzCmHhL44gYT9C+reoQM+9T3Op+kC6Z QNe5p/835bK6tE6C6q3ycM/t1KAUwPniQ2KB2i+vzdX6LGanGP8VOPZXwW28XOtD3h9ftRq0tSh Wpus= X-Google-Smtp-Source: AGHT+IGJQ/AGdCH9sMbldmKNnv+F1rLd7y7NyFynVlAE6KJdd6HhoXur+0DdVKsJqASlz16J6G0x4A== X-Received: by 2002:a17:902:aa08:b0:1d5:ea53:595f with SMTP id be8-20020a170902aa0800b001d5ea53595fmr812587plb.60.1705596807467; Thu, 18 Jan 2024 08:53:27 -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.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 08:53:27 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , liang.j.ma@intel.com, Bruce Richardson , Tyler Retzlaff , Andrew Rybchenko , Liang Ma , Peter Mccarthy , =?UTF-8?q?Se=C3=A1n=20Harte?= Subject: [PATCH v5 2/6] event/opdl: fix non-constant compile time assertion Date: Thu, 18 Jan 2024 08:50:57 -0800 Message-ID: <20240118165315.63959-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240118165315.63959-1-stephen@networkplumber.org> References: <20231111172153.57461-1-stephen@networkplumber.org> <20240118165315.63959-1-stephen@networkplumber.org> MIME-Version: 1.0 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 RTE_BUILD_BUG_ON() was being used with a non-constant value. The inline function rte_is_power_of_2() is not constant since inline expansion happens later in the compile process. Replace it with the macro which will be constant. Fixes: 4236ce9bf5bf ("event/opdl: add OPDL ring infrastructure library") Cc: liang.j.ma@intel.com Signed-off-by: Stephen Hemminger Acked-by: Bruce Richardson Acked-by: Tyler Retzlaff Acked-by: Andrew Rybchenko --- drivers/event/opdl/opdl_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/event/opdl/opdl_ring.c b/drivers/event/opdl/opdl_ring.c index 69392b56bbec..da5ea02d1928 100644 --- a/drivers/event/opdl/opdl_ring.c +++ b/drivers/event/opdl/opdl_ring.c @@ -910,7 +910,7 @@ opdl_ring_create(const char *name, uint32_t num_slots, uint32_t slot_size, RTE_CACHE_LINE_MASK) != 0); RTE_BUILD_BUG_ON((offsetof(struct opdl_ring, slots) & RTE_CACHE_LINE_MASK) != 0); - RTE_BUILD_BUG_ON(!rte_is_power_of_2(OPDL_DISCLAIMS_PER_LCORE)); + RTE_BUILD_BUG_ON(!RTE_IS_POWER_OF_2(OPDL_DISCLAIMS_PER_LCORE)); /* Parameter checking */ if (name == NULL) { -- 2.43.0