* [dpdk-dev] [PATCH] ixgbe: fix compilation when offload flags disabled
@ 2016-06-27 15:44 Olivier Matz
2016-06-27 17:05 ` Thomas Monjalon
2016-07-01 8:02 ` [dpdk-dev] [PATCH v2] net/ixgbe: " Olivier Matz
0 siblings, 2 replies; 8+ messages in thread
From: Olivier Matz @ 2016-06-27 15:44 UTC (permalink / raw)
To: dev, helin.zhang, konstantin.ananyev; +Cc: amint
The ixgbe driver does not compile if CONFIG_RTE_IXGBE_RX_OLFLAGS_ENABLE=n
because the macro has not the proper number of parameters.
Fixes: b37b528d957c ("mbuf: add new Rx flags for stripped VLAN")
Reported-by: Amin Tootoonchian <amint@icsi.berkeley.edu>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
drivers/net/ixgbe/ixgbe_rxtx_vec.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec.c b/drivers/net/ixgbe/ixgbe_rxtx_vec.c
index 12190d2..6989fc3 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec.c
@@ -196,7 +196,9 @@ desc_to_olflags_v(__m128i descs[4], uint8_t vlan_flags,
rx_pkts[3]->ol_flags = 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
/*
--
2.8.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH] ixgbe: fix compilation when offload flags disabled
2016-06-27 15:44 [dpdk-dev] [PATCH] ixgbe: fix compilation when offload flags disabled Olivier Matz
@ 2016-06-27 17:05 ` Thomas Monjalon
2016-06-29 10:15 ` Bruce Richardson
2016-07-01 8:02 ` [dpdk-dev] [PATCH v2] net/ixgbe: " Olivier Matz
1 sibling, 1 reply; 8+ messages in thread
From: Thomas Monjalon @ 2016-06-27 17:05 UTC (permalink / raw)
To: Olivier Matz, konstantin.ananyev; +Cc: dev, helin.zhang, amint
2016-06-27 17:44, Olivier Matz:
> The ixgbe driver does not compile if CONFIG_RTE_IXGBE_RX_OLFLAGS_ENABLE=n
> because the macro has not the proper number of parameters.
We really need to understand why this build option is needed.
Target: zero build option.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH] ixgbe: fix compilation when offload flags disabled
2016-06-27 17:05 ` Thomas Monjalon
@ 2016-06-29 10:15 ` Bruce Richardson
2016-06-29 11:35 ` Olivier MATZ
0 siblings, 1 reply; 8+ messages in thread
From: Bruce Richardson @ 2016-06-29 10:15 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Olivier Matz, konstantin.ananyev, dev, helin.zhang, amint
On Mon, Jun 27, 2016 at 07:05:45PM +0200, Thomas Monjalon wrote:
> 2016-06-27 17:44, Olivier Matz:
> > The ixgbe driver does not compile if CONFIG_RTE_IXGBE_RX_OLFLAGS_ENABLE=n
> > because the macro has not the proper number of parameters.
>
> We really need to understand why this build option is needed.
> Target: zero build option.
Agreed. However, we are where we are right now, and this build option is there.
Olivier, can you do a V2 of this patch based on dpdk-next-net/rel_16_07, since
the code in question has actually moved on that branch.
Out of interest, can you perhaps also give a little more detail on how to
reproduce the issue, as turning off the setting fails to show up a build
problem for me with either gcc or clang, at -O3 or -O0.
/Bruce
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH] ixgbe: fix compilation when offload flags disabled
2016-06-29 10:15 ` Bruce Richardson
@ 2016-06-29 11:35 ` Olivier MATZ
2016-06-29 12:30 ` Bruce Richardson
0 siblings, 1 reply; 8+ messages in thread
From: Olivier MATZ @ 2016-06-29 11:35 UTC (permalink / raw)
To: Bruce Richardson, Thomas Monjalon
Cc: konstantin.ananyev, dev, helin.zhang, amint
On 06/29/2016 12:15 PM, Bruce Richardson wrote:
> On Mon, Jun 27, 2016 at 07:05:45PM +0200, Thomas Monjalon wrote:
>> 2016-06-27 17:44, Olivier Matz:
>>> The ixgbe driver does not compile if CONFIG_RTE_IXGBE_RX_OLFLAGS_ENABLE=n
>>> because the macro has not the proper number of parameters.
>>
>> We really need to understand why this build option is needed.
>> Target: zero build option.
>
> Agreed. However, we are where we are right now, and this build option is there.
>
> Olivier, can you do a V2 of this patch based on dpdk-next-net/rel_16_07, since
> the code in question has actually moved on that branch.
Sure, will do.
> Out of interest, can you perhaps also give a little more detail on how to
> reproduce the issue, as turning off the setting fails to show up a build
> problem for me with either gcc or clang, at -O3 or -O0.
That's strange, I just set CONFIG_RTE_IXGBE_RX_OLFLAGS_ENABLE=n to
reproduce the issue. I'll check on dpdk-next-net/rel_16_07 and add more
details, like the output of the compiler.
Thanks,
Olivier
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH] ixgbe: fix compilation when offload flags disabled
2016-06-29 11:35 ` Olivier MATZ
@ 2016-06-29 12:30 ` Bruce Richardson
0 siblings, 0 replies; 8+ messages in thread
From: Bruce Richardson @ 2016-06-29 12:30 UTC (permalink / raw)
To: Olivier MATZ; +Cc: Thomas Monjalon, konstantin.ananyev, dev, helin.zhang, amint
On Wed, Jun 29, 2016 at 01:35:15PM +0200, Olivier MATZ wrote:
>
>
> On 06/29/2016 12:15 PM, Bruce Richardson wrote:
> >On Mon, Jun 27, 2016 at 07:05:45PM +0200, Thomas Monjalon wrote:
> >>2016-06-27 17:44, Olivier Matz:
> >>>The ixgbe driver does not compile if CONFIG_RTE_IXGBE_RX_OLFLAGS_ENABLE=n
> >>>because the macro has not the proper number of parameters.
> >>
> >>We really need to understand why this build option is needed.
> >>Target: zero build option.
> >
> >Agreed. However, we are where we are right now, and this build option is there.
> >
> >Olivier, can you do a V2 of this patch based on dpdk-next-net/rel_16_07, since
> >the code in question has actually moved on that branch.
>
> Sure, will do.
>
Thanks.
>
> >Out of interest, can you perhaps also give a little more detail on how to
> >reproduce the issue, as turning off the setting fails to show up a build
> >problem for me with either gcc or clang, at -O3 or -O0.
>
> That's strange, I just set CONFIG_RTE_IXGBE_RX_OLFLAGS_ENABLE=n to
> reproduce the issue. I'll check on dpdk-next-net/rel_16_07 and add more
> details, like the output of the compiler.
>
Ok, no problem either way since inspection of the code shows there is a bug
there anyway. I'm just curious as to why I couldn't reproduce it.
/Bruce
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dpdk-dev] [PATCH v2] net/ixgbe: fix compilation when offload flags disabled
2016-06-27 15:44 [dpdk-dev] [PATCH] ixgbe: fix compilation when offload flags disabled Olivier Matz
2016-06-27 17:05 ` Thomas Monjalon
@ 2016-07-01 8:02 ` Olivier Matz
2016-07-01 9:02 ` Ananyev, Konstantin
1 sibling, 1 reply; 8+ messages in thread
From: Olivier Matz @ 2016-07-01 8:02 UTC (permalink / raw)
To: dev, helin.zhang, konstantin.ananyev, bruce.richardson; +Cc: amint
The ixgbe driver does not compile if CONFIG_RTE_IXGBE_RX_OLFLAGS_ENABLE=n
because the macro has not the proper number of parameters. To reproduce
the issue:
make config T=x86_64-native-linuxapp-gcc
sed -i 's,CONFIG_RTE_IXGBE_RX_OLFLAGS_ENABLE=y,CONFIG_RTE_IXGBE_RX_OLFLAGS_ENABLE=n,' build/.config
make -j4
[...]
ixgbe_rxtx_vec_sse.c: In function ‘_recv_raw_pkts_vec’:
ixgbe_rxtx_vec_sse.c:345:53: error: macro "desc_to_olflags_v" passed 3 arguments, but takes just 2
desc_to_olflags_v(descs, vlan_flags, &rx_pkts[pos]);
^
ixgbe_rxtx_vec_sse.c:345:3: error: ‘desc_to_olflags_v’ 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 reported only once for each function it appears in
ixgbe_rxtx_vec_sse.c:231:10: error: variable ‘vlan_flags’ set but not used [-Werror=unused-but-set-variable]
uint8_t vlan_flags;
^
cc1: all warnings being treated as errors
This patch fixes the number of arguments in th macro, and ensure that
vlan_flags is marked as used to avoid the third error.
Fixes: b37b528d957c ("mbuf: add new Rx flags for stripped VLAN")
Reported-by: Amin Tootoonchian <amint@icsi.berkeley.edu>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c b/drivers/net/ixgbe/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 = 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
/*
--
2.8.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix compilation when offload flags disabled
2016-07-01 8:02 ` [dpdk-dev] [PATCH v2] net/ixgbe: " Olivier Matz
@ 2016-07-01 9:02 ` Ananyev, Konstantin
2016-07-05 9:11 ` Bruce Richardson
0 siblings, 1 reply; 8+ messages in thread
From: Ananyev, Konstantin @ 2016-07-01 9:02 UTC (permalink / raw)
To: Olivier Matz, dev, Zhang, Helin, Richardson, Bruce; +Cc: amint
> The ixgbe driver does not compile if CONFIG_RTE_IXGBE_RX_OLFLAGS_ENABLE=n
> because the macro has not the proper number of parameters. To reproduce
> the issue:
>
> make config T=x86_64-native-linuxapp-gcc
> sed -i 's,CONFIG_RTE_IXGBE_RX_OLFLAGS_ENABLE=y,CONFIG_RTE_IXGBE_RX_OLFLAGS_ENABLE=n,' build/.config
> make -j4
> [...]
> ixgbe_rxtx_vec_sse.c: In function ‘_recv_raw_pkts_vec’:
> ixgbe_rxtx_vec_sse.c:345:53: error: macro "desc_to_olflags_v" passed 3 arguments, but takes just 2
> desc_to_olflags_v(descs, vlan_flags, &rx_pkts[pos]);
> ^
> ixgbe_rxtx_vec_sse.c:345:3: error: ‘desc_to_olflags_v’ 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 reported only once for each function it appears in
> ixgbe_rxtx_vec_sse.c:231:10: error: variable ‘vlan_flags’ set but not used [-Werror=unused-but-set-variable]
> uint8_t vlan_flags;
> ^
> cc1: all warnings being treated as errors
>
> This patch fixes the number of arguments in th macro, and ensure that
> vlan_flags is marked as used to avoid the third error.
>
> Fixes: b37b528d957c ("mbuf: add new Rx flags for stripped VLAN")
> Reported-by: Amin Tootoonchian <amint@icsi.berkeley.edu>
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> ---
> drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c b/drivers/net/ixgbe/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 = 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
>
> /*
> --
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> 2.8.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix compilation when offload flags disabled
2016-07-01 9:02 ` Ananyev, Konstantin
@ 2016-07-05 9:11 ` Bruce Richardson
0 siblings, 0 replies; 8+ messages in thread
From: Bruce Richardson @ 2016-07-05 9:11 UTC (permalink / raw)
To: Ananyev, Konstantin; +Cc: Olivier Matz, dev, Zhang, Helin, amint
On Fri, Jul 01, 2016 at 10:02:46AM +0100, Ananyev, Konstantin wrote:
>
> > The ixgbe driver does not compile if CONFIG_RTE_IXGBE_RX_OLFLAGS_ENABLE=n
> > because the macro has not the proper number of parameters. To reproduce
> > the issue:
> >
> > make config T=x86_64-native-linuxapp-gcc
> > sed -i 's,CONFIG_RTE_IXGBE_RX_OLFLAGS_ENABLE=y,CONFIG_RTE_IXGBE_RX_OLFLAGS_ENABLE=n,' build/.config
> > make -j4
> > [...]
> > ixgbe_rxtx_vec_sse.c: In function ‘_recv_raw_pkts_vec’:
> > ixgbe_rxtx_vec_sse.c:345:53: error: macro "desc_to_olflags_v" passed 3 arguments, but takes just 2
> > desc_to_olflags_v(descs, vlan_flags, &rx_pkts[pos]);
> > ^
> > ixgbe_rxtx_vec_sse.c:345:3: error: ‘desc_to_olflags_v’ 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 reported only once for each function it appears in
> > ixgbe_rxtx_vec_sse.c:231:10: error: variable ‘vlan_flags’ set but not used [-Werror=unused-but-set-variable]
> > uint8_t vlan_flags;
> > ^
> > cc1: all warnings being treated as errors
> >
> > This patch fixes the number of arguments in th macro, and ensure that
> > vlan_flags is marked as used to avoid the third error.
> >
> > Fixes: b37b528d957c ("mbuf: add new Rx flags for stripped VLAN")
> > Reported-by: Amin Tootoonchian <amint@icsi.berkeley.edu>
> > Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> > ---
> > drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c b/drivers/net/ixgbe/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 = 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
> >
> > /*
> > --
>
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
>
Applied to dpdk-next-net/rel_16_07
/Bruce
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-07-05 9:11 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-27 15:44 [dpdk-dev] [PATCH] ixgbe: fix compilation when offload flags disabled Olivier Matz
2016-06-27 17:05 ` Thomas Monjalon
2016-06-29 10:15 ` Bruce Richardson
2016-06-29 11:35 ` Olivier MATZ
2016-06-29 12:30 ` Bruce Richardson
2016-07-01 8:02 ` [dpdk-dev] [PATCH v2] net/ixgbe: " Olivier Matz
2016-07-01 9:02 ` Ananyev, Konstantin
2016-07-05 9:11 ` Bruce Richardson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).