DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] ethdev: fix compilation with gcc 4.8
@ 2019-10-23 12:14 Raslan Darawsheh
  2019-10-23 13:29 ` Ferruh Yigit
  2019-10-23 15:00 ` Ferruh Yigit
  0 siblings, 2 replies; 3+ messages in thread
From: Raslan Darawsheh @ 2019-10-23 12:14 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: Slava Ovsiienko, dev, kirankumark

gcc 4.8 is considering bit filed as extention rather than
c11 std with pedantic, which cause compilation failure.

This adds extention keyword exceplicitly to the struct
to avoid compilation issue on gcc 4.8

Fixes: a7658a86 ("ethdev: add HIGIG2 key field to flow API")

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
---
 lib/librte_net/rte_higig.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_net/rte_higig.h b/lib/librte_net/rte_higig.h
index 44df666..b9cdfef 100644
--- a/lib/librte_net/rte_higig.h
+++ b/lib/librte_net/rte_higig.h
@@ -103,7 +103,7 @@ struct rte_higig2_ppt_type0 {
  *
  * higig2 ppt type1 header.
  */
-RTE_STD_C11
+__extension__
 struct rte_higig2_ppt_type1 {
 	uint16_t classification;
 	uint16_t resv;
-- 
2.7.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] ethdev: fix compilation with gcc 4.8
  2019-10-23 12:14 [dpdk-dev] [PATCH] ethdev: fix compilation with gcc 4.8 Raslan Darawsheh
@ 2019-10-23 13:29 ` Ferruh Yigit
  2019-10-23 15:00 ` Ferruh Yigit
  1 sibling, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2019-10-23 13:29 UTC (permalink / raw)
  To: Raslan Darawsheh; +Cc: Slava Ovsiienko, dev, kirankumark

On 10/23/2019 1:14 PM, Raslan Darawsheh wrote:
> gcc 4.8 is considering bit filed as extention rather than
> c11 std with pedantic, which cause compilation failure.
> 
> This adds extention keyword exceplicitly to the struct
> to avoid compilation issue on gcc 4.8
> 
> Fixes: a7658a86 ("ethdev: add HIGIG2 key field to flow API")
> 
> Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
> ---
>  lib/librte_net/rte_higig.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/librte_net/rte_higig.h b/lib/librte_net/rte_higig.h
> index 44df666..b9cdfef 100644
> --- a/lib/librte_net/rte_higig.h
> +++ b/lib/librte_net/rte_higig.h
> @@ -103,7 +103,7 @@ struct rte_higig2_ppt_type0 {
>   *
>   * higig2 ppt type1 header.
>   */
> -RTE_STD_C11
> +__extension__
>  struct rte_higig2_ppt_type1 {
>  	uint16_t classification;
>  	uint16_t resv;
> 

Why other structs in this file with bit-field doesn't cause problem with gcc4.8,
is the problem only for "uint16_t" ?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] ethdev: fix compilation with gcc 4.8
  2019-10-23 12:14 [dpdk-dev] [PATCH] ethdev: fix compilation with gcc 4.8 Raslan Darawsheh
  2019-10-23 13:29 ` Ferruh Yigit
@ 2019-10-23 15:00 ` Ferruh Yigit
  1 sibling, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2019-10-23 15:00 UTC (permalink / raw)
  To: Raslan Darawsheh; +Cc: Slava Ovsiienko, dev, kirankumark, Olivier MATZ

On 10/23/2019 1:14 PM, Raslan Darawsheh wrote:
> gcc 4.8 is considering bit filed as extention rather than
> c11 std with pedantic, which cause compilation failure.
> 
> This adds extention keyword exceplicitly to the struct
> to avoid compilation issue on gcc 4.8
> 
> Fixes: a7658a86 ("ethdev: add HIGIG2 key field to flow API")
> 
> Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>

Squashed into relevant commit in next-net, thanks.

Unfortunately lost the context that why it has been marked with '__extension__'
instead of 'RTE_STD_C11', hopefully someone won't try to "fix" it in the future.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-23 15:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-23 12:14 [dpdk-dev] [PATCH] ethdev: fix compilation with gcc 4.8 Raslan Darawsheh
2019-10-23 13:29 ` Ferruh Yigit
2019-10-23 15:00 ` Ferruh Yigit

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).