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 1E1B343F76; Sat, 4 May 2024 02:59:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DB04A4025D; Sat, 4 May 2024 02:59:10 +0200 (CEST) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mails.dpdk.org (Postfix) with ESMTP id D035540150 for ; Sat, 4 May 2024 02:59:08 +0200 (CEST) Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-1ed012c1afbso1872475ad.1 for ; Fri, 03 May 2024 17:59:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1714784348; x=1715389148; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=w8jZzFrRXUk/aPMAAfeUx9KvkdDhnvBcS0coq3rFEBw=; b=tMbQ+T5pd071ZipNqZZHGhKJWEYV4J7xb22laH/ASAvk3yFr7qxY24J548pV6o3Hco mJQGjsfTgtD0XIqgEQTVG4g0h+qjjawfWHtW4CvvAjK8AxxvUiO9JRr483uNmCbkmQW9 1A4zc4MhKDlOCz+b2D8IFRTMTZ1qndxNR/Y+tiWowhkZg6NCup+3bprIO4/qfKAcIYpY +XoPEHJLnguDuwBXgjsPIGn/VbSOyNqb/ZOahZwpYEoC0hU3SxyZIKi4cgbAU2TRXPoZ q4PRBlvgDUzr4Qs8zY4Fbokd6LTbfvDVh94TuT2mBwPEw8VmFD3x72Rig3s//6q4WZmg /27A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714784348; x=1715389148; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w8jZzFrRXUk/aPMAAfeUx9KvkdDhnvBcS0coq3rFEBw=; b=a79tyzcTNW9/siP7Zmi15wEzKY34he5njacfIk5Ul7FPym7HDASUTB2FSL6mjxW0oT qmt+OlMav4or9nYVH//fa1XU0P1fIVsbIFidl3u5K+qmEgvtdxqS9QwGF36j/77G14ko QTkLmKT0KKBB9Ox9zEwCsh6af/iOXVqCSOd2y3BrUibg0pM1UOjNT0UqQPeFgzLkV/y9 w77zQW9zgGCfvo99undIXJj7jlU3OWFKqKcC1jK+xjek9KYMhhJPOcxGPgzjMLGeJI82 cOxHbK0XBsT3Lo9XGBEwix9lzoHwEkrtlhba8bwch0yKTCLrGYBBpB2H9EnqE1+ILlWH 9RjQ== X-Forwarded-Encrypted: i=1; AJvYcCVXEUHTqQlCUTfBGCymUW7Z4S9HQY6BG4HiNm57TGZdogecofx2h8rL5TMBzysHBQI2Qb62kjbXhe7ulXo= X-Gm-Message-State: AOJu0Yzso1vNQ7iTn8xJ2AcbW340lQPkICUXWxkTwu0xiSvT9HgxvKXP i+tA00Xj3vcfwf66XQQYbstYbW2VE0kBHM63blDDgCti5MtDbB7WTKj4LCnxrYI= X-Google-Smtp-Source: AGHT+IFv/pI2nrM+JYSmtQ9FWP3q6tyy/87TsaMEUNUCX3bFlWcuIGcY8pNKaI4my7qNYht1gzvB2Q== X-Received: by 2002:a17:902:9f96:b0:1e7:b6f4:2d77 with SMTP id g22-20020a1709029f9600b001e7b6f42d77mr4190714plq.22.1714784347920; Fri, 03 May 2024 17:59:07 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id im16-20020a170902bb1000b001ecd65e58d2sm3975215plb.85.2024.05.03.17.59.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 17:59:07 -0700 (PDT) Date: Fri, 3 May 2024 17:59:05 -0700 From: Stephen Hemminger To: Daniel Gregory Cc: Ruifeng Wang , dev@dpdk.org, Punit Agrawal , Liang Ma , feifei.wang2@arm.com Subject: Re: [PATCH v2] eal/arm: replace RTE_BUILD_BUG on non-constant Message-ID: <20240503175905.28c590cf@hermes.local> In-Reply-To: <20240503182730.31693-1-daniel.gregory@bytedance.com> References: <20240502142116.63760-1-daniel.gregory@bytedance.com> <20240503182730.31693-1-daniel.gregory@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 On Fri, 3 May 2024 19:27:30 +0100 Daniel Gregory wrote: > The ARM implementation of rte_pause uses RTE_BUILD_BUG_ON to check > memorder, which is not constant. This causes compile errors when it is > enabled with RTE_ARM_USE_WFE. eg. >=20 > ../lib/eal/arm/include/rte_pause_64.h: In function =E2=80=98rte_wait_unti= l_equal_16=E2=80=99: > ../lib/eal/include/rte_common.h:530:56: error: expression in static asser= tion is not constant > 530 | #define RTE_BUILD_BUG_ON(condition) do { static_assert(!(conditio= n), #condition); } while (0) > | ^~~~~~~~~~= ~~ > ../lib/eal/arm/include/rte_pause_64.h:156:9: note: in expansion of macro = =E2=80=98RTE_BUILD_BUG_ON=E2=80=99 > 156 | RTE_BUILD_BUG_ON(memorder !=3D rte_memory_order_acquire && > | ^~~~~~~~~~~~~~~~ >=20 > Fix the compile errors by replacing the check with an assert, like in > the generic implementation (lib/eal/include/generic/rte_pause.h). No, don't hide the problem. What code is calling these. Looks like a real bug. Could be behind layers o= f wrappers.