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 A572743F76; Sat, 4 May 2024 03:02:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4DDC54025D; Sat, 4 May 2024 03:02:41 +0200 (CEST) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by mails.dpdk.org (Postfix) with ESMTP id 7C36640150 for ; Sat, 4 May 2024 03:02:39 +0200 (CEST) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-6f4302187c0so2069201b3a.1 for ; Fri, 03 May 2024 18:02:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1714784558; x=1715389358; 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=wgsxLFZwU9GSKY1YfdRnc1auaKgw2pPcbzA6mp0uRUg=; b=xaDM4NE3LC7lIqLCH1la6CnE1ypJnZQRhxAWLXryg0rGVsNepK7+mXa/h+hyngNRlh TxtohS9UJdhvQQKDTmTrSkhKIUGu7gpOU6pkipQu/swl561Cr/5JkM1oW3G2Gxt78jj7 CSNdk1aUwqwuBECX1RpNXW6gzeR1YoMRKXa8aAodY72jEaKS0nnYsq0O47eH2m8a8R22 ZbvnpdTiJqwf6SmfsvfiDE+FqBnyhKlxzMv0fVn81ieZg2eRge5V/lllecFT5bczbmp4 /i4lrNmW3p/128lnYxoJ3lOr4PjmhS5LCk+1TCsnCoYZ172eV+GQYTFD5RiyO9/8xzy8 RSMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714784558; x=1715389358; 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=wgsxLFZwU9GSKY1YfdRnc1auaKgw2pPcbzA6mp0uRUg=; b=gCephuDSykYLNAdaipa32LDnHt9I39jNYeEwszEIreSOcF1YJkEweoZXt0oU5VlJZK dtAK5X7geFyK8NJL0K6MoBITgxYXgjwvrqZvFaUEKWEvo5Bei0FqIVo7j1oeG2NAaW27 AAu3YiMD5UfLxKjqUwviQ+LT4nv+l4BA2GVIzVkRpmtGcF70qGUZ+SUvzQKXh8yVojEn 8WZ0RufhgPbi9z/rKkUah55s7ztog8Lbm1Q3trnhTvc+hLHXAbJvNFguZSWjbLRo3hBg 10VA7RoOCZXA2/Oto6D5qEPRxGpsX0OGEiko5rBkLC0g7CaOgqosdQi+aYdwResjt2pl Vmxw== X-Forwarded-Encrypted: i=1; AJvYcCWncuBhRZpgGkOYuDfjn5gbgj35LfATu6hXixN/wGaFAf64jCjjX0qj5K6dPFX+GbI1J2AIC/brt+OvKBE= X-Gm-Message-State: AOJu0Yy+RtqvlG3kYhKtYp07PQPCu36YhXMHs5tPAVCeJ2nwvIJ63AIb 4hWmIWCEXB7KmoDW0ZbCEZL5qdlUFVKtv5SlpIkh3YGCycBbnVjBQ9H/JVGMTpw= X-Google-Smtp-Source: AGHT+IGZwXI/eLxJqAyzz6cJ3ATOvnp1A5NdVWbwmkRnuh/w+CjSUnqG5O2LU06RxSYk835y4ksHFA== X-Received: by 2002:a05:6a21:3406:b0:1a7:9ed1:fc21 with SMTP id yn6-20020a056a21340600b001a79ed1fc21mr5879257pzb.22.1714784558538; Fri, 03 May 2024 18:02:38 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id u10-20020aa7838a000000b006f456b23f90sm522423pfm.31.2024.05.03.18.02.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 18:02:38 -0700 (PDT) Date: Fri, 3 May 2024 18:02:36 -0700 From: Stephen Hemminger To: Daniel Gregory Cc: Ruifeng Wang , dev@dpdk.org, Punit Agrawal , Liang Ma Subject: Re: [PATCH] eal/arm: replace RTE_BUILD_BUG on non-constant Message-ID: <20240503180236.3dd0ee2c@hermes.local> In-Reply-To: <20240502142116.63760-1-daniel.gregory@bytedance.com> References: <20240502142116.63760-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 Thu, 2 May 2024 15:21:16 +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 > This has been the case since the switch to C11 assert (537caad2). Fix > the compile errors by replacing the check with an RTE_ASSERT. >=20 > Signed-off-by: Daniel Gregory The only calls to rte_wait_until_equal_16 in upstream code are in the test_bbdev_perf.c and test_timer.c. Looks like these test never got fixed to use rte_memory_order instead of __ATOMIC_ def= ines. And there should be a CI test for ARM that enables the WFE code at least to ensure it works!