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 B37DA438E4; Wed, 17 Jan 2024 19:26:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C96DF40ED0; Wed, 17 Jan 2024 19:25:56 +0100 (CET) Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by mails.dpdk.org (Postfix) with ESMTP id A6BD140A7D for ; Wed, 17 Jan 2024 19:25:53 +0100 (CET) Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-5cd8667c59eso7883218a12.2 for ; Wed, 17 Jan 2024 10:25:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1705515953; x=1706120753; 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=B9rouWG8I7V4q7YIiSvrAqhCBXeatuieOOtGYljteb0=; b=J2a4TPGsktMhczKFs6VG5On6eQ8B+sZEVk3VnehXluvauMR5nMK951lAmg2FPpRt/u h55NcdDDaHFz18T10IpfFcYV0AVjrLLIrf8DMF1YMZdCVF3d+ieEdySvkLWwW4p5f4QS FAr7pJfiN3dSI6oEeNBfxWB8gkyyYSCWfethvxZCuLxvhfn1HtOHSZ+xeSGBCums3anN /EOROPNkhHgSRgY154m/b9FlWlP05t9qxIvWygdz9p5c4K7UmEE0vm0vOs4b1ExQYPex Mt/W1WnUIcAiv7J5QJuswAMcO35LH7wz4tr8R5TDGcrdEfG9kGL5iZotlYjVaQkE4V3i g/VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705515953; x=1706120753; 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=B9rouWG8I7V4q7YIiSvrAqhCBXeatuieOOtGYljteb0=; b=Ep78Ip1C8/w8DtoNSp+DcAiHQvmetwBlkp2BpD8Cyp8OgerJboLcuaAl+CfLeWc72L VxLhx9ylUJ9+vkKGtzgm7nJXHhVID4cROykX33af43LwUrB5uOVlLh9tx2zbdTX3HBix W5QtyyiNw+7wfXnri6Lu+ELhsaUCA8KquqgXXuVKV/TDxumCSs8ARjXkLPAbgwwkaReX maMpRn+cgSaNwyt276b9gMImJyAPklUFo66XqCAMqjvoI/GjXT5bs9HJEfl0X1a+OqL5 aDPGrfs/59mZNT2EtRtvZrjw/3vWhGHju/7gF9i9/ilYlRIQgIlEoJlNQO1U8G52098V 0jsw== X-Gm-Message-State: AOJu0YzQsQwcURA4iLz0gxZA6A6/o9TczFfD+wAE2FrbyAxKkfanjnNg CNZh2dKTb6+T9eZ5GgG7BF+kOgCtkLRPt92JelT5JEZ8SWTEdA== X-Google-Smtp-Source: AGHT+IHF1sF976dwSfB6bjfyMLmlKg8WAjhoEPun4khq8lB+v3PdttjH4/sRJaf0rOwCAm1HNFDthw== X-Received: by 2002:a17:90a:d49:b0:28d:4fad:21c8 with SMTP id 9-20020a17090a0d4900b0028d4fad21c8mr5804585pju.35.1705515952982; Wed, 17 Jan 2024 10:25:52 -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.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 10:25:52 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , liang.j.ma@intel.com, Bruce Richardson , Tyler Retzlaff , Liang Ma , Peter Mccarthy , =?UTF-8?q?Se=C3=A1n=20Harte?= Subject: [PATCH v4 2/6] event/opdl: fix non-constant compile time assertion Date: Wed, 17 Jan 2024 10:19:56 -0800 Message-ID: <20240117182541.211125-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240117182541.211125-1-stephen@networkplumber.org> References: <20231111172153.57461-1-stephen@networkplumber.org> <20240117182541.211125-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 --- 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