From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id 6B1D81D8A for ; Wed, 22 Nov 2017 11:36:02 +0100 (CET) Received: by mail-wm0-f68.google.com with SMTP id 128so9102255wmo.3 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=eZsQ3jQVXuVVi8CIvt8SorQ995IfVyDIZZTLKXI+VIlVnK7hWf4KtXhZZy+1+S0qnO +9cB2vG3EDv6P/gc041haokU4ymitq6D6KoH2jYqBJ7UZLef66alt1WzOjrl5aRDPUEO PelUd26Ue4veVoCciyaDfQKiiA/q3Eympf5UvXf3yuSwiDCkbI7a/J6H0+Zy3v+zWVEn eEmwIRJ7vDO8L+cPXnbnj1mstNDPYRIsixXMDjW5WjRsfRIBF1No3O/QXMf/zzbN9ezl C1F7cDpTimEujT8me9LEH6IVpILZVmm3I3ETdQ1hzY3TZAZMSbGDCRb5pk9yV9TD7GZi y7rA== X-Gm-Message-State: AJaThX6zF9PAD89XX7jRyJLozaoxpfwu9BA77RNVvj9tHTVuO1WRhd2O iZzpDHFGeDoCccw1f2iQAELy 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-dev] [PATCH 2/3] crypto: fix pedentic compilation errors X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions 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