From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 9AB46432F6;
	Fri, 10 Nov 2023 21:50:01 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 1F4EC402EE;
	Fri, 10 Nov 2023 21:50:01 +0100 (CET)
Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182])
 by mails.dpdk.org (Postfix) with ESMTP id 66B87402EA
 for <dev@dpdk.org>; Fri, 10 Nov 2023 21:49:59 +0100 (CET)
Received: by linux.microsoft.com (Postfix, from userid 1086)
 id B067520B74C0; Fri, 10 Nov 2023 12:49:58 -0800 (PST)
DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com B067520B74C0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;
 s=default; t=1699649398;
 bh=Z7FrrrE82/cUcfR5yXv2EzkIvcrBybcgFnBZW8e5wkk=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
 b=ZUPVRloabLcySL9b+1E0vHEtyFGXDltKGOvvoj/ygareC2oB9CPUVVyeU73AJ0Snw
 q3qsB9WkE1761iT8E7riGzN+W29WXzPYcHmrSusRXFI4iYelmwcNrcf1Sr+BJVEzBm
 9JTsvSvQaKSeAGnlwcopNyNkNBXlXTy2xse3cuNk=
Date: Fri, 10 Nov 2023 12:49:58 -0800
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
To: Ferruh Yigit <ferruh.yigit@amd.com>
Cc: dev@dpdk.org, Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
 Cristian Dumitrescu <cristian.dumitrescu@intel.com>,
 Thomas Monjalon <thomas@monjalon.net>
Subject: Re: [PATCH] ethdev: add extension keyword to statement expression
 macro
Message-ID: <20231110204958.GA5627@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>
References: <1699560818-7453-1-git-send-email-roretzla@linux.microsoft.com>
 <7accc638-f55b-4da2-bdf8-5b55fca9e4e3@amd.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <7accc638-f55b-4da2-bdf8-5b55fca9e4e3@amd.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Fri, Nov 10, 2023 at 05:22:52PM +0000, Ferruh Yigit wrote:
> On 11/9/2023 8:13 PM, Tyler Retzlaff wrote:
> > add missing __extension__ keyword to macros using gcc statement
> > expression extension.
> > 
> > Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> > 
> 
> Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
> 
> 
> It seems there are a few more usage not marked in lib folder [1], and
> more including drivers.

yeah, sorry i'm not doing them all at once. though given the number of
instances left i'll see if i can find a few minutes maybe just clear
lib/* entirely drivers like for everything else are lower priority for
me right now (always open to help of course).

> 
> Is this compiler extension causing any problem for the Windows build or
> MSVC toolchain?

just the msvc toolchain, builds with gcc/clang targeting windows work fine.

i'm working internally with the msvc toolchain team to enable support
for the extension on the condition that it be marked with the
__extension__ keyword so i'm just making sure it is applied
consistently.

> 
> 
> 
> [1]
> $ grep -r '({' lib/ | grep -v __extension__
> lib/port/rte_port_source_sink.c:({
> lib/port/rte_port_source_sink.c:({
> lib/pipeline/rte_swx_pipeline_internal.h:({
> lib/pipeline/rte_pipeline.c:    ({ (p)->n_pkts_ah_drop =
> lib/pipeline/rte_pipeline.c:    ({ (counter) += (p)->n_pkts_ah_drop;
> lib/pipeline/rte_pipeline.c:    ({ (p)->pkts_drop_mask =
> lib/pipeline/rte_pipeline.c:({
> lib/ethdev/rte_mtr.c:({
> lib/ethdev/rte_mtr.c:({
> lib/ethdev/rte_tm.c:({