From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 69358236 for ; Wed, 22 Nov 2017 11:36:02 +0100 (CET) Received: by mail-wm0-f65.google.com with SMTP id x63so9095293wmf.4 for ; Wed, 22 Nov 2017 02:36:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Uqgq06eJkBd8ytXElEfqGJGWnmpeUyh+/WKOHZVubKQ=; b=fc429qt0cq1g3IQTM/f1m4dljozaNQpBPVhJdEYiFZxSs/eLskcA/aZN3UNefRabaN YHp9IEqUyeNIrZIVELQbOAvKHpoa1M/HvAxLY4dTK+5zYaZz5EkwhxnwK1PhEzOZW6Aw 0baX9sg4a9h18cSipwdf6eTOFSWcN2tzYR/A1ccgJo8w1h3aKtJhJKnMllgp2q6Vp9zj 7QpCblv6GS4N+prHQB9ojC/czjntxqJovEcVQP9O17hcq6A31jTF0ikEBEUBDTxwLASd sxIJGXY2uFNdGLnkniaSBePHMFjxj1SHacCNDjUUzxUHkx/6+GDKsZQsdKOle22c4N7K /vjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=Uqgq06eJkBd8ytXElEfqGJGWnmpeUyh+/WKOHZVubKQ=; b=cGMW/Fp3HCSxfmTDYMVw6MQQBZX4WshLStLBqhiXTpOCPsZz4HEJeP1EXEisveWdOZ O91y7Nph5nEyszy3JFL9t/vYzBfWZBjgXP05UVHyrgfY7/IWvJ1xbG8rPYjJoU0MEZhn LyCSoO922oQput/y2qr0QzReZUXULNCrXfXM4zFqDTGv21PTXsgG1SCeW7jALbIzycFS uWicmREqZuNXJxD/4luAvmUApZXAu+IGphf0QMql9gBXwHhw0SkynvmTTu//oV9JSKyP 79gUgnuJJL9krdHL5Nr9p0y/U79fDbsGauRqlleXs7ikPRZIKsB1CUYInPvo3b2eqgsd Bngg== X-Gm-Message-State: AJaThX6pdIvERu4RHpBprht8RAJzmNCkHIub1Tl0eQxDE1uXRwBO+y9o OaMqsQ8ndjHhegev5e6bAA7F X-Google-Smtp-Source: AGs4zMajPwiBELGxc4OygcDyNZz48jPLsB+znUbfrmcKFYONWxoEaqaKIuxePVqJsdO+mkzTrmFb9A== X-Received: by 10.80.131.230 with SMTP id 93mr28804864edi.12.1511346962158; Wed, 22 Nov 2017 02:36:02 -0800 (PST) Received: from laranjeiro-vm.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id r8sm9468319edm.22.2017.11.22.02.36.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Nov 2017 02:36:01 -0800 (PST) Date: Wed, 22 Nov 2017 11:35:55 +0100 From: Nelio Laranjeiro To: "De Lara Guarch, Pablo" Cc: Akhil Goyal , "Doherty, Declan" , "dev@dpdk.org" , "stable@dpdk.org" Message-ID: <20171122103555.qjw2ysr24l2iyzud@laranjeiro-vm.dev.6wind.com> References: <2efb17c107b980d2aea8007d19bc6363e751be10.1511338151.git.nelio.laranjeiro@6wind.com> <7f9e891b0e441a6b949d4b298140efad6936c67e.1511338151.git.nelio.laranjeiro@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-stable] [PATCH 2/3] crypto: fix pedentic compilation errors X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Nov 2017 10:36:02 -0000 Hi Pablo, On Wed, Nov 22, 2017 at 09:48:47AM +0000, De Lara Guarch, Pablo wrote: > Hi Nelio, > > > -----Original Message----- > > From: Nelio Laranjeiro [mailto:nelio.laranjeiro@6wind.com] > > Sent: Wednesday, November 22, 2017 8:10 AM > > To: Akhil Goyal ; Doherty, Declan > > > > Cc: dev@dpdk.org; De Lara Guarch, Pablo > > ; stable@dpdk.org > > Subject: [PATCH 2/3] crypto: fix pedentic compilation errors > > > > /root/dpdk/x86_64-native-linuxapp-gcc/include/rte_crypto.h:126:28: > > error: ISO C forbids zero-size array ‘sym’ [-Werror=pedantic] > > struct rte_crypto_sym_op sym[0]; > > ^~~ > > > > Fixes: d2a4223c4c6d ("cryptodev: do not store pointer to op specific > > params") > > Cc: pablo.de.lara.guarch@intel.com > > Cc: stable@dpdk.org > > > > Signed-off-by: Nelio Laranjeiro > > --- > > lib/librte_cryptodev/rte_crypto.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/lib/librte_cryptodev/rte_crypto.h > > b/lib/librte_cryptodev/rte_crypto.h > > index 3d672fe7d..dc6e91d1d 100644 > > --- a/lib/librte_cryptodev/rte_crypto.h > > +++ b/lib/librte_cryptodev/rte_crypto.h > > @@ -123,7 +123,7 @@ struct rte_crypto_op { > > > > RTE_STD_C11 > > union { > > - struct rte_crypto_sym_op sym[0]; > > + struct rte_crypto_sym_op *sym; > > This would add extra 64 bits that are not necessary, > as the rte_crypto_sym_op structure is always placed after rte_crypto_op > (this is just a marker). > > Is there any other way to fix this error? Indeed it is not the correct solution, the point here is RTE_STD_C11 is wrongly used because even in C11 arrays with size of 0 are not allowed. If it was the last attribute of the structure it could have been replaced with empty brackets but as it is inside an union, it cannot. The correct solution is to replace the RTE_STD_C11 by __extension__. > Which compiler are you using? It occurs with any compiler when you enable the pedantic flag under C11. All DPDK headers have been fix to avoid such issue [1]. Thanks, [1] http://dpdk.org/ml/archives/dev/2016-April/037051.html -- Nélio Laranjeiro 6WIND