From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: [PATCH v2] net/ixgbe: fix compilation when offload flags disabled Date: Tue, 5 Jul 2016 10:11:46 +0100 Message-ID: <20160705091146.GB10232@bricha3-MOBL3> References: <1467042269-22703-1-git-send-email-olivier.matz@6wind.com> <1467360147-19571-1-git-send-email-olivier.matz@6wind.com> <2601191342CEEE43887BDE71AB97725836B789B0@irsmsx105.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Olivier Matz , "dev@dpdk.org" , "Zhang, Helin" , "amint@icsi.berkeley.edu" To: "Ananyev, Konstantin" Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 8C1A037A4 for ; Tue, 5 Jul 2016 11:11:51 +0200 (CEST) Content-Disposition: inline In-Reply-To: <2601191342CEEE43887BDE71AB97725836B789B0@irsmsx105.ger.corp.intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Jul 01, 2016 at 10:02:46AM +0100, Ananyev, Konstantin wrote: >=20 > > The ixgbe driver does not compile if CONFIG_RTE_IXGBE_RX_OLFLAGS_ENAB= LE=3Dn > > because the macro has not the proper number of parameters. To reprodu= ce > > the issue: > >=20 > > make config T=3Dx86_64-native-linuxapp-gcc > > sed -i 's,CONFIG_RTE_IXGBE_RX_OLFLAGS_ENABLE=3Dy,CONFIG_RTE_IXGBE_R= X_OLFLAGS_ENABLE=3Dn,' build/.config > > make -j4 > > [...] > > ixgbe_rxtx_vec_sse.c: In function =E2=80=98_recv_raw_pkts_vec=E2=80= =99: > > ixgbe_rxtx_vec_sse.c:345:53: error: macro "desc_to_olflags_v" pass= ed 3 arguments, but takes just 2 > > desc_to_olflags_v(descs, vlan_flags, &rx_pkts[pos]); > > ^ > > ixgbe_rxtx_vec_sse.c:345:3: error: =E2=80=98desc_to_olflags_v=E2=80= =99 undeclared (first use in this function) > > desc_to_olflags_v(descs, vlan_flags, &rx_pkts[pos]); > > ^ > > ixgbe_rxtx_vec_sse.c:345:3: note: each undeclared identifier is re= ported only once for each function it appears in > > ixgbe_rxtx_vec_sse.c:231:10: error: variable =E2=80=98vlan_flags=E2= =80=99 set but not used [-Werror=3Dunused-but-set-variable] > > uint8_t vlan_flags; > > ^ > > cc1: all warnings being treated as errors > >=20 > > This patch fixes the number of arguments in th macro, and ensure that > > vlan_flags is marked as used to avoid the third error. > >=20 > > Fixes: b37b528d957c ("mbuf: add new Rx flags for stripped VLAN") > > Reported-by: Amin Tootoonchian > > Signed-off-by: Olivier Matz > > --- > > drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > >=20 > > diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c b/drivers/net/ixg= be/ixgbe_rxtx_vec_sse.c > > index 4f95deb..1c4fd7c 100644 > > --- a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c > > +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c > > @@ -197,7 +197,9 @@ desc_to_olflags_v(__m128i descs[4], uint8_t vlan_= flags, > > rx_pkts[3]->ol_flags =3D vol.e[3]; > > } > > #else > > -#define desc_to_olflags_v(desc, rx_pkts) do {} while (0) > > +#define desc_to_olflags_v(desc, vlan_flags, rx_pkts) do { \ > > + RTE_SET_USED(vlan_flags); \ > > + } while (0) > > #endif > >=20 > > /* > > -- >=20 > Acked-by: Konstantin Ananyev >=20 Applied to dpdk-next-net/rel_16_07 /Bruce