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 9D5B7438E5; Tue, 16 Jan 2024 23:49:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 783AD40278; Tue, 16 Jan 2024 23:49:57 +0100 (CET) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mails.dpdk.org (Postfix) with ESMTP id 4E349400D6 for ; Tue, 16 Jan 2024 23:49:55 +0100 (CET) Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-1d5f56912daso5445165ad.2 for ; Tue, 16 Jan 2024 14:49:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1705445394; x=1706050194; 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=SjE36Dfle/oL2j5Lr7Az0L4ncqDRd/rY2vfeXYEuTvQ=; b=sStS58tLDc8mQwpJgsu3nu5kF1pIPq+iJgmWzojKYbGtUTJ644wkt15glmz55ZON3m DqQbDk/VQov9Rmu6WsNkOyJKgSxznUOmNU71CnZx8cWPJuYG8tVvgV/SezHEQsLFGSVd n/7QWVws3JPMHa5momQyb3PZd2WuDXQMwg4PC0H5/MMpfAwMLNKU9TP50A2qzTf7l/qs rs08SCKKsQiPPRVhKtASXGE0XNIvRh9J+OULkgnBGYFVWitOIo2jPtTLmjy2NfIZKpgy F4zbdKLvHleGhm84mlZ4uU+RVHi+UoV/a7PAYd3ipp8+ZE5984pwiam7WFlfbf40cKlx VRoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705445394; x=1706050194; 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=SjE36Dfle/oL2j5Lr7Az0L4ncqDRd/rY2vfeXYEuTvQ=; b=nwe5CwayOCzOMmAFc5o2m1OlcUsCIJyBTBc6EN7dSCC1qtsbMl9bviFgP8fXUB5qTT ekESi5HHNT2SBoSYeoZw+K8f/OH/TaRTH+ySu0a64zNmnu/CS+EV0BPXRgPcPGDyDtWK RpScpnMHkPWrQ55etaMNFzbDYWojXd7i2WwcIeTj1GLebxfjwsSXwMTjJ2wXlYx4E08w mG7zjFBgJbGh0MkSjzia7mBbSbiNR6HQFI/LD8r6JOuCdvLcs2smy7o6XJx11d8hNc3P jDlllSD1ODAM+SD27AcK9f4+AZPRbrgMMAL29lywgDbVBWePneHXXe7D5l0xNHj+8nCg G6Fw== X-Gm-Message-State: AOJu0YzETynXjG1NubUn9PFKXvODzBbdTAV/javQUsRAuRqwxN4QLb2Q IyUqywTEfXvG1d/cymJLHA7RYWF7a1IM8Q== X-Google-Smtp-Source: AGHT+IEeCV2+l0upV5JFa8w+ge8c1BsGhExw/jTLNwx4YJdYCCwE0aW/AfoUl2dgp6oPZg5wgUzMpA== X-Received: by 2002:a17:902:e810:b0:1d6:ebf7:d166 with SMTP id u16-20020a170902e81000b001d6ebf7d166mr335551plg.96.1705445394436; Tue, 16 Jan 2024 14:49:54 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id h12-20020a170902f7cc00b001d59432a29csm8222370plw.282.2024.01.16.14.49.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 14:49:54 -0800 (PST) Date: Tue, 16 Jan 2024 14:49:52 -0800 From: Stephen Hemminger To: Morten =?UTF-8?B?QnLDuHJ1cA==?= Cc: "Tyler Retzlaff" , "Andrew Rybchenko" , Subject: Re: static_assert, sfc, and clang issues Message-ID: <20240116144952.3614593f@hermes.local> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F169@smartserver.smartshare.dk> References: <20240116090301.4c29d5b7@hermes.local> <20240116215034.GA351@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <98CBD80474FA8B44BF855DF32C47DC35E9F169@smartserver.smartshare.dk> 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 Tue, 16 Jan 2024 23:14:36 +0100 Morten Br=C3=B8rup wrote: > > +1 for #2 just make it a block. =20 >=20 > I prefer that you implement the workaround in the RTE_BUILD_BUG_ON() macr= o, by surrounding it by "do { } while (0)", like this: >=20 > #define RTE_BUILD_BUG_ON(condition) do { static_assert(!(condition), #con= dition); } while (0) >=20 > And please mention the workaround reason, with the reference to the clang= bug, in the source code comment describing the function. >=20 > The godbolt link in the clang issue seems happy with this workaround. In the patch series sent, already did that. Didn't need to do { } while(0) = hack to make it work. Reference is in commit message.