net/mlx: fix compile errors with ignore pedantic pragma
PATCH 1/1 net/mlx: fix compile errors with ignore pedantic pragma
With recent gcc versions, e.g. gcc 6.1, compilation of mlx drivers with debug enabled produces lots of errors complaining that "pedantic" is not a warning level that can be ignored.
error: ‘-pedantic’ is not an option that controls warnings [-Werror=pragmas]
#pragma GCC diagnostic ignored "-pedantic"
^~~~~~~~~~~
These errors can be removed by changing the "-pedantic" to "-Wpedantic".
--- drivers/net/mlx4/mlx4.c | 8 ++++---- drivers/net/mlx5/mlx5.c | 8 ++++---- drivers/net/mlx5/mlx5.h | 8 ++++---- drivers/net/mlx5/mlx5_ethdev.c | 4 ++-- drivers/net/mlx5/mlx5_fdir.c | 8 ++++---- drivers/net/mlx5/mlx5_mac.c | 8 ++++---- drivers/net/mlx5/mlx5_mr.c | 8 ++++---- drivers/net/mlx5/mlx5_prm.h | 4 ++-- drivers/net/mlx5/mlx5_rss.c | 8 ++++---- drivers/net/mlx5/mlx5_rxmode.c | 8 ++++---- drivers/net/mlx5/mlx5_rxq.c | 8 ++++---- drivers/net/mlx5/mlx5_rxtx.c | 8 ++++---- drivers/net/mlx5/mlx5_rxtx.h | 8 ++++---- drivers/net/mlx5/mlx5_stats.c | 4 ++-- drivers/net/mlx5/mlx5_trigger.c | 4 ++-- drivers/net/mlx5/mlx5_txq.c | 8 ++++---- drivers/net/mlx5/mlx5_vlan.c | 4 ++-- 17 files changed, 58 insertions(+), 58 deletions(-)
drivers/net/mlx4/mlx4.c +4 -4
@@ -61,16 +61,16 @@/* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <infiniband/verbs.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_ether.h> #include <rte_ethdev.h>
@@ -87,7 +87,7 @@#include <rte_alarm.h> #include <rte_memory.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* Generated configuration header. */
drivers/net/mlx5/mlx5.c +4 -4
@@ -43,16 +43,16 @@/* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <infiniband/verbs.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_malloc.h> #include <rte_ethdev.h>
@@ -60,7 +60,7 @@#include <rte_common.h> #include <rte_kvargs.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5.h"
drivers/net/mlx5/mlx5.h +4 -4
@@ -43,16 +43,16 @@/* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <infiniband/verbs.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_ether.h> #include <rte_ethdev.h>
@@ -60,7 +60,7 @@#include <rte_interrupts.h> #include <rte_errno.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5_utils.h"
drivers/net/mlx5/mlx5_ethdev.c +2 -2
@@ -50,7 +50,7 @@/* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_atomic.h> #include <rte_ethdev.h>
@@ -60,7 +60,7 @@#include <rte_alarm.h> #include <rte_malloc.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5.h"
drivers/net/mlx5/mlx5_fdir.c +4 -4
@@ -40,23 +40,23 @@/* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <infiniband/verbs.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_ether.h> #include <rte_malloc.h> #include <rte_ethdev.h> #include <rte_common.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5.h"
drivers/net/mlx5/mlx5_mac.c +4 -4
@@ -44,22 +44,22 @@/* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <infiniband/verbs.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_ether.h> #include <rte_ethdev.h> #include <rte_common.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5.h"
drivers/net/mlx5/mlx5_mr.c +4 -4
@@ -34,20 +34,20 @@/* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <infiniband/verbs.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_mempool.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5.h"
drivers/net/mlx5/mlx5_prm.h +2 -2
@@ -37,11 +37,11 @@/* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <infiniband/mlx5_hw.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* Get CQE owner bit. */
drivers/net/mlx5/mlx5_rss.c +4 -4
@@ -40,21 +40,21 @@/* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <infiniband/verbs.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_malloc.h> #include <rte_ethdev.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5.h"
drivers/net/mlx5/mlx5_rxmode.c +4 -4
@@ -38,20 +38,20 @@/* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <infiniband/verbs.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_ethdev.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5.h"
drivers/net/mlx5/mlx5_rxq.c +4 -4
@@ -40,25 +40,25 @@/* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <infiniband/verbs.h> #include <infiniband/arch.h> #include <infiniband/mlx5_hw.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_mbuf.h> #include <rte_malloc.h> #include <rte_ethdev.h> #include <rte_common.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5.h"
drivers/net/mlx5/mlx5_rxtx.c +4 -4
@@ -39,18 +39,18 @@/* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <infiniband/verbs.h> #include <infiniband/mlx5_hw.h> #include <infiniband/arch.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_mbuf.h> #include <rte_mempool.h>
@@ -59,7 +59,7 @@#include <rte_branch_prediction.h> #include <rte_ether.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5.h"
drivers/net/mlx5/mlx5_rxtx.h +4 -4
@@ -40,22 +40,22 @@/* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <infiniband/verbs.h> #include <infiniband/mlx5_hw.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_mbuf.h> #include <rte_mempool.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5_utils.h"
drivers/net/mlx5/mlx5_stats.c +2 -2
@@ -33,11 +33,11 @@/* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_ethdev.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5.h"
drivers/net/mlx5/mlx5_trigger.c +2 -2
@@ -33,14 +33,14 @@/* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_ether.h> #include <rte_ethdev.h> #include <rte_interrupts.h> #include <rte_alarm.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5.h"
drivers/net/mlx5/mlx5_txq.c +4 -4
@@ -40,23 +40,23 @@/* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <infiniband/verbs.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_mbuf.h> #include <rte_malloc.h> #include <rte_ethdev.h> #include <rte_common.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5_utils.h"
drivers/net/mlx5/mlx5_vlan.c +2 -2
@@ -38,12 +38,12 @@/* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_ethdev.h> #include <rte_common.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5_utils.h"
Signature · 1 line
2.7.4
Hi Bruce,
Quoted 9 lines · Bruce Richardson
With recent gcc versions, e.g. gcc 6.1, compilation of mlx drivers with debug enabled produces lots of errors complaining that "pedantic" is not a warning level that can be ignored.
error: ‘-pedantic’ is not an option that controls warnings [-Werror=pragmas]
#pragma GCC diagnostic ignored "-pedantic"^~~~~~~~~~~These errors can be removed by changing the "-pedantic" to "-Wpedantic".
Nice to have a workaround, I thought they did not keep the option at all. However after testing:
- It does not seem to work with GCC 4.6 and older, they prefer -pedantic:
"warning: unknown option after `#pragma GCC diagnostic' kind".
- GCC 4.9 (possibly 5.x as well) does not care, can use either -pedantic or -Wpedantic.
- GCC 6 can only supports -Wpedantic.
Note we're working toward removing the need for these #pragma in the first place as soon as possible, however in the meantime I fear that checking the GCC version is necessary.
Quoted 507 lines
Fixes 7fae69eeff13 ("mlx4: new poll mode driver")Fixes 771fa900b73a ("mlx5: introduce new driver for Mellanox ConnectX-4 adapters")Signed-off-by Bruce Richardson <[email protected]>--- drivers/net/mlx4/mlx4.c | 8 ++++---- drivers/net/mlx5/mlx5.c | 8 ++++---- drivers/net/mlx5/mlx5.h | 8 ++++---- drivers/net/mlx5/mlx5_ethdev.c | 4 ++-- drivers/net/mlx5/mlx5_fdir.c | 8 ++++---- drivers/net/mlx5/mlx5_mac.c | 8 ++++---- drivers/net/mlx5/mlx5_mr.c | 8 ++++---- drivers/net/mlx5/mlx5_prm.h | 4 ++-- drivers/net/mlx5/mlx5_rss.c | 8 ++++---- drivers/net/mlx5/mlx5_rxmode.c | 8 ++++---- drivers/net/mlx5/mlx5_rxq.c | 8 ++++---- drivers/net/mlx5/mlx5_rxtx.c | 8 ++++---- drivers/net/mlx5/mlx5_rxtx.h | 8 ++++---- drivers/net/mlx5/mlx5_stats.c | 4 ++-- drivers/net/mlx5/mlx5_trigger.c | 4 ++-- drivers/net/mlx5/mlx5_txq.c | 8 ++++---- drivers/net/mlx5/mlx5_vlan.c | 4 ++-- 17 files changed, 58 insertions(+), 58 deletions(-)drivers/net/mlx4/mlx4.c +4
-4@@ -61,16 +61,16 @@/* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <infiniband/verbs.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_ether.h> #include <rte_ethdev.h> @@ -87,7 +87,7 @@#include <rte_alarm.h> #include <rte_memory.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* Generated configuration header. */ drivers/net/mlx5/mlx5.c +4
-4@@ -43,16 +43,16 @@/* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <infiniband/verbs.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_malloc.h> #include <rte_ethdev.h> @@ -60,7 +60,7 @@#include <rte_common.h> #include <rte_kvargs.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5.h" drivers/net/mlx5/mlx5.h +4
-4@@ -43,16 +43,16 @@/* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <infiniband/verbs.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_ether.h> #include <rte_ethdev.h> @@ -60,7 +60,7 @@#include <rte_interrupts.h> #include <rte_errno.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5_utils.h" drivers/net/mlx5/mlx5_ethdev.c +2
-2@@ -50,7 +50,7 @@/* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_atomic.h> #include <rte_ethdev.h> @@ -60,7 +60,7 @@#include <rte_alarm.h> #include <rte_malloc.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5.h" drivers/net/mlx5/mlx5_fdir.c +4
-4@@ -40,23 +40,23 @@/* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <infiniband/verbs.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_ether.h> #include <rte_malloc.h> #include <rte_ethdev.h> #include <rte_common.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5.h" drivers/net/mlx5/mlx5_mac.c +4
-4@@ -44,22 +44,22 @@/* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <infiniband/verbs.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_ether.h> #include <rte_ethdev.h> #include <rte_common.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5.h" drivers/net/mlx5/mlx5_mr.c +4
-4@@ -34,20 +34,20 @@/* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <infiniband/verbs.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_mempool.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5.h" drivers/net/mlx5/mlx5_prm.h +2
-2@@ -37,11 +37,11 @@/* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <infiniband/mlx5_hw.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* Get CQE owner bit. */ drivers/net/mlx5/mlx5_rss.c +4
-4@@ -40,21 +40,21 @@/* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <infiniband/verbs.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_malloc.h> #include <rte_ethdev.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5.h" drivers/net/mlx5/mlx5_rxmode.c +4
-4@@ -38,20 +38,20 @@/* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <infiniband/verbs.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_ethdev.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5.h" drivers/net/mlx5/mlx5_rxq.c +4
-4@@ -40,25 +40,25 @@/* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <infiniband/verbs.h> #include <infiniband/arch.h> #include <infiniband/mlx5_hw.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_mbuf.h> #include <rte_malloc.h> #include <rte_ethdev.h> #include <rte_common.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5.h" drivers/net/mlx5/mlx5_rxtx.c +4
-4@@ -39,18 +39,18 @@/* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <infiniband/verbs.h> #include <infiniband/mlx5_hw.h> #include <infiniband/arch.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_mbuf.h> #include <rte_mempool.h> @@ -59,7 +59,7 @@#include <rte_branch_prediction.h> #include <rte_ether.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5.h" drivers/net/mlx5/mlx5_rxtx.h +4
-4@@ -40,22 +40,22 @@/* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <infiniband/verbs.h> #include <infiniband/mlx5_hw.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_mbuf.h> #include <rte_mempool.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5_utils.h" drivers/net/mlx5/mlx5_stats.c +2
-2@@ -33,11 +33,11 @@/* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_ethdev.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5.h" drivers/net/mlx5/mlx5_trigger.c +2
-2@@ -33,14 +33,14 @@/* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_ether.h> #include <rte_ethdev.h> #include <rte_interrupts.h> #include <rte_alarm.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5.h" drivers/net/mlx5/mlx5_txq.c +4
-4@@ -40,23 +40,23 @@/* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <infiniband/verbs.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif /* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_mbuf.h> #include <rte_malloc.h> #include <rte_ethdev.h> #include <rte_common.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5_utils.h" drivers/net/mlx5/mlx5_vlan.c +2
-2@@ -38,12 +38,12 @@/* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" +#pragma GCC diagnostic ignored "-Wpedantic"#endif #include <rte_ethdev.h> #include <rte_common.h> #ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" +#pragma GCC diagnostic error "-Wpedantic"#endif #include "mlx5_utils.h" Signature · 1 line
2.7.4
Signature · 2 lines
Adrien Mazarguil 6WIND
Quoted 19 lines · Adrien Mazarguil
Hi Bruce,
Quoted 9 lines · Bruce Richardson
With recent gcc versions, e.g. gcc 6.1, compilation of mlx drivers with debug enabled produces lots of errors complaining that "pedantic" is not a warning level that can be ignored.
error: ‘-pedantic’ is not an option that controls warnings [-Werror=pragmas]
#pragma GCC diagnostic ignored "-pedantic"^~~~~~~~~~~These errors can be removed by changing the "-pedantic" to "-Wpedantic".
Nice to have a workaround, I thought they did not keep the option at all. However after testing:
- It does not seem to work with GCC 4.6 and older, they prefer -pedantic:
"warning: unknown option after `#pragma GCC diagnostic' kind".
Quoted 9 lines
- GCC 4.9 (possibly 5.x as well) does not care, can use either -pedantic or -Wpedantic.
- GCC 6 can only supports -Wpedantic.
Note we're working toward removing the need for these #pragma in the first place as soon as possible, however in the meantime I fear that checking the GCC version is necessary.
Depends on how old of GCC version we need to support. From the release notes it appears that -Wpedantic was introduced in GCC 4.8 (3 1/2 years ago).
https://gcc.gnu.org/gcc-4.8/changes.html
Do we need to support compilation on gcc versions older than this?
Regards,
/Bruce
Adrien Mazarguil
Acked-byQuoted 29 lines · Bruce Richardson
Quoted 19 lines · Adrien Mazarguil
Hi Bruce,
Quoted 9 lines · Bruce Richardson
With recent gcc versions, e.g. gcc 6.1, compilation of mlx drivers with debug enabled produces lots of errors complaining that "pedantic" is not a warning level that can be ignored.
error: ‘-pedantic’ is not an option that controls warnings [-Werror=pragmas]
#pragma GCC diagnostic ignored "-pedantic"^~~~~~~~~~~These errors can be removed by changing the "-pedantic" to "-Wpedantic".
Nice to have a workaround, I thought they did not keep the option at all. However after testing:
- It does not seem to work with GCC 4.6 and older, they prefer -pedantic:
"warning: unknown option after `#pragma GCC diagnostic' kind".Quoted 9 lines
- GCC 4.9 (possibly 5.x as well) does not care, can use either -pedantic or -Wpedantic.
- GCC 6 can only supports -Wpedantic.
Note we're working toward removing the need for these #pragma in the first place as soon as possible, however in the meantime I fear that checking the GCC version is necessary.
Quoted 6 lines
Depends on how old of GCC version we need to support. From the release notes it appears that -Wpedantic was introduced in GCC 4.8 (3 1/2 years ago).
https://gcc.gnu.org/gcc-4.8/changes.html
Do we need to support compilation on gcc versions older than this?
I'm all for upgrading so I do not really mind if we stop caring about older GCC versions (especially considering this problem only occurs in debugging mode which is seldom used by non-developers). The version check is necessary if we want to keep full compatibility with at least:
- RHEL <= 6.x
- Debian <= 7.x
- Ubuntu <= 13.04
Works for me either way, thus:
Signature · 2 lines
Adrien Mazarguil 6WIND
Quoted 42 lines · Adrien Mazarguil
Quoted 29 lines · Bruce Richardson
Quoted 19 lines · Adrien Mazarguil
Hi Bruce,
Quoted 9 lines · Bruce Richardson
With recent gcc versions, e.g. gcc 6.1, compilation of mlx drivers with debug enabled produces lots of errors complaining that "pedantic" is not a warning level that can be ignored.
error: ‘-pedantic’ is not an option that controls warnings [-Werror=pragmas]
#pragma GCC diagnostic ignored "-pedantic"^~~~~~~~~~~These errors can be removed by changing the "-pedantic" to "-Wpedantic".
Nice to have a workaround, I thought they did not keep the option at all. However after testing:
- It does not seem to work with GCC 4.6 and older, they prefer -pedantic:
"warning: unknown option after `#pragma GCC diagnostic' kind".Quoted 9 lines
- GCC 4.9 (possibly 5.x as well) does not care, can use either -pedantic or -Wpedantic.
- GCC 6 can only supports -Wpedantic.
Note we're working toward removing the need for these #pragma in the first place as soon as possible, however in the meantime I fear that checking the GCC version is necessary.
Quoted 6 lines
Depends on how old of GCC version we need to support. From the release notes it appears that -Wpedantic was introduced in GCC 4.8 (3 1/2 years ago).
https://gcc.gnu.org/gcc-4.8/changes.html
Do we need to support compilation on gcc versions older than this?
I'm all for upgrading so I do not really mind if we stop caring about older GCC versions (especially considering this problem only occurs in debugging mode which is seldom used by non-developers). The version check is necessary if we want to keep full compatibility with at least:
Quoted 8 lines
- RHEL <= 6.x
- Debian <= 7.x
- Ubuntu <= 13.04Works for me either way, thus:
Acked-by Adrien Mazarguil <[email protected]>
Any objections to dropping of support for debug settings for these OS's?
/Bruce
Quoted 47 lines · Bruce Richardson
Quoted 46 lines · Adrien Mazarguil
Quoted 29 lines · Bruce Richardson
Quoted 19 lines · Adrien Mazarguil
Hi Bruce,
Quoted 9 lines · Bruce Richardson
With recent gcc versions, e.g. gcc 6.1, compilation of mlx drivers with debug enabled produces lots of errors complaining that "pedantic" is not a warning level that can be ignored.
error: ‘-pedantic’ is not an option that controls warnings [-Werror=pragmas]
#pragma GCC diagnostic ignored "-pedantic"^~~~~~~~~~~These errors can be removed by changing the "-pedantic" to "-Wpedantic".
Nice to have a workaround, I thought they did not keep the option at all. However after testing:
- It does not seem to work with GCC 4.6 and older, they prefer -pedantic:
"warning: unknown option after `#pragma GCC diagnostic' kind".Quoted 9 lines
- GCC 4.9 (possibly 5.x as well) does not care, can use either -pedantic or -Wpedantic.
- GCC 6 can only supports -Wpedantic.
Note we're working toward removing the need for these #pragma in the first place as soon as possible, however in the meantime I fear that checking the GCC version is necessary.
Quoted 6 lines
Depends on how old of GCC version we need to support. From the release notes it appears that -Wpedantic was introduced in GCC 4.8 (3 1/2 years ago).
https://gcc.gnu.org/gcc-4.8/changes.html
Do we need to support compilation on gcc versions older than this?
I'm all for upgrading so I do not really mind if we stop caring about older GCC versions (especially considering this problem only occurs in debugging mode which is seldom used by non-developers). The version check is necessary if we want to keep full compatibility with at least:
- RHEL <= 6.x
- Debian <= 7.x
- Ubuntu <= 13.04
Quoted 5 lines
Quoted 4 lines
Works for me either way, thus:
Acked-by Adrien Mazarguil <[email protected]>Any objections to dropping of support for debug settings for these OS's?
Not sure who should answer this. These #pragma are workarounds we should eventually get rid of anyway (DPDK headers are now clean enough, some work remains to be done on the Verbs side) so let's use your patch in the meantime.
Signature · 2 lines
Adrien Mazarguil 6WIND
Quoted 50 lines · Adrien Mazarguil
Quoted 49 lines · Bruce Richardson
Quoted 48 lines · Adrien Mazarguil
Quoted 29 lines · Bruce Richardson
Quoted 19 lines · Adrien Mazarguil
Hi Bruce,
Quoted 9 lines · Bruce Richardson
With recent gcc versions, e.g. gcc 6.1, compilation of mlx drivers with debug enabled produces lots of errors complaining that "pedantic" is not a warning level that can be ignored.
error: ‘-pedantic’ is not an option that controls warnings [-Werror=pragmas]
#pragma GCC diagnostic ignored "-pedantic"^~~~~~~~~~~These errors can be removed by changing the "-pedantic" to "-Wpedantic".
Nice to have a workaround, I thought they did not keep the option at all. However after testing:
- It does not seem to work with GCC 4.6 and older, they prefer -pedantic:
"warning: unknown option after `#pragma GCC diagnostic' kind".Quoted 9 lines
- GCC 4.9 (possibly 5.x as well) does not care, can use either -pedantic or -Wpedantic.
- GCC 6 can only supports -Wpedantic.
Note we're working toward removing the need for these #pragma in the first place as soon as possible, however in the meantime I fear that checking the GCC version is necessary.
Quoted 6 lines
Depends on how old of GCC version we need to support. From the release notes it appears that -Wpedantic was introduced in GCC 4.8 (3 1/2 years ago).
https://gcc.gnu.org/gcc-4.8/changes.html
Do we need to support compilation on gcc versions older than this?
I'm all for upgrading so I do not really mind if we stop caring about older GCC versions (especially considering this problem only occurs in debugging mode which is seldom used by non-developers). The version check is necessary if we want to keep full compatibility with at least:
- RHEL <= 6.x
- Debian <= 7.x
- Ubuntu <= 13.04Works for me either way, thus:
Quoted 9 lines
Quoted 3 lines
Quoted 2 lines
Acked-by Adrien Mazarguil <[email protected]>Any objections to dropping of support for debug settings for these OS's?
Not sure who should answer this. These #pragma are workarounds we should eventually get rid of anyway (DPDK headers are now clean enough, some work remains to be done on the Verbs side) so let's use your patch in the meantime.
Just as a quick note, this breaks compilation for ICC:
.../drivers/net/mlx4/mlx4.c(64): error #2282: unrecognized GCC pragma
#pragma GCC diagnostic ignored "-Wpedantic"
Since this compilation error only happens for MLX4/5 when debug config option enabled, this not big issue, but please aware of the issue.
Thanks,
ferruh
----- Original Message -----
Quoted 57 lines · Adrien Mazarguil
Quoted 56 lines · Bruce Richardson
Quoted 41 lines · Adrien Mazarguil
Quoted 30 lines
Hi Bruce,
Quoted 5 lines · Bruce Richardson
With recent gcc versions, e.g. gcc 6.1, compilation of mlx drivers with
debug enabled produces lots of errors complaining that "pedantic" is not a warning level that can be ignored.Quoted 7 lines
error: ‘-pedantic’ is not an option that controls warnings [-Werror=pragmas]
#pragma GCC diagnostic ignored "-pedantic"^~~~~~~~~~~These errors can be removed by changing the "-pedantic" to "-Wpedantic".
Nice to have a workaround, I thought they did not keep the option at all.
However after testing:- It does not seem to work with GCC 4.6 and older, they prefer
(quoted diff) +0
-4-pedantic: "warning: unknown option after `#pragma GCC diagnostic' kind". - GCC 4.9 (possibly 5.x as well) does not care, can use either -pedantic or -Wpedantic. - GCC 6 can only supports -Wpedantic.Quoted 6 lines
Note we're working toward removing the need for these #pragma in the first
place as soon as possible, however in the meantime I fear that checking the
GCC version is necessary.Depends on how old of GCC version we need to support. From the release notes
it appears that -Wpedantic was introduced in GCC 4.8 (3 1/2 years ago).Quoted 3 lines
https://gcc.gnu.org/gcc-4.8/changes.html
Do we need to support compilation on gcc versions older than this?
I'm all for upgrading so I do not really mind if we stop caring about older GCC versions (especially considering this problem only occurs in debugging mode which is seldom used by non-developers). The version check is necessary
if we want to keep full compatibility with at least:- RHEL <= 6.x
- Debian <= 7.x
- Ubuntu <= 13.04
Quoted 5 lines
Quoted 4 lines
Works for me either way, thus:
Acked-by Adrien Mazarguil <[email protected]>Any objections to dropping of support for debug settings for these OS's?
No objections on dropping RHEL <= 6 support, we never did DPDK on those old versions anyway.
As for the others, I've no particular opinion but certainly no objections either.
- Panu -
Quoted 3 lines
/Bruce
Bruce Richardson
AppliedQuoted 42 lines · Adrien Mazarguil
Quoted 29 lines · Bruce Richardson
Quoted 19 lines · Adrien Mazarguil
Hi Bruce,
Quoted 9 lines · Bruce Richardson
With recent gcc versions, e.g. gcc 6.1, compilation of mlx drivers with debug enabled produces lots of errors complaining that "pedantic" is not a warning level that can be ignored.
error: ‘-pedantic’ is not an option that controls warnings [-Werror=pragmas]
#pragma GCC diagnostic ignored "-pedantic"^~~~~~~~~~~These errors can be removed by changing the "-pedantic" to "-Wpedantic".
Nice to have a workaround, I thought they did not keep the option at all. However after testing:
- It does not seem to work with GCC 4.6 and older, they prefer -pedantic:
"warning: unknown option after `#pragma GCC diagnostic' kind".Quoted 9 lines
- GCC 4.9 (possibly 5.x as well) does not care, can use either -pedantic or -Wpedantic.
- GCC 6 can only supports -Wpedantic.
Note we're working toward removing the need for these #pragma in the first place as soon as possible, however in the meantime I fear that checking the GCC version is necessary.
Quoted 6 lines
Depends on how old of GCC version we need to support. From the release notes it appears that -Wpedantic was introduced in GCC 4.8 (3 1/2 years ago).
https://gcc.gnu.org/gcc-4.8/changes.html
Do we need to support compilation on gcc versions older than this?
I'm all for upgrading so I do not really mind if we stop caring about older GCC versions (especially considering this problem only occurs in debugging mode which is seldom used by non-developers). The version check is necessary if we want to keep full compatibility with at least:
Quoted 8 lines
- RHEL <= 6.x
- Debian <= 7.x
- Ubuntu <= 13.04Works for me either way, thus:
Acked-by Adrien Mazarguil <[email protected]>
Applied to dpdk-next-net/rel_16_11
/Bruce