* [PATCH] net/iavf: fix old GCC compilation warnings
@ 2023-06-09 5:41 Zhichao Zeng
2023-06-09 6:58 ` David Marchand
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Zhichao Zeng @ 2023-06-09 5:41 UTC (permalink / raw)
To: dev
Cc: qi.z.zhang, daxuex.gao, Zhichao Zeng, Bruce Richardson,
Konstantin Ananyev, Jingjing Wu, Beilei Xing, Wenjun Wu
The code uses the Wimplicit-fallthrough compile option to ignore
falls through warnings in switch case, but this option was introduced
by GCC 7 and old GCC do not recognize the option.
Add judgment to avoid warnings about unrecognized options in old GCC.
Fixes: 95a1b0b23140 ("net/iavf: support Rx timestamp offload on SSE")
Fixes: 4f58266da4d3 ("net/iavf: support Rx timestamp offload on AVX2")
Fixes: d65eadb9e178 ("net/iavf: support Rx timestamp offload on AVX512")
Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
---
drivers/net/iavf/iavf_rxtx_vec_avx2.c | 10 +++++++---
drivers/net/iavf/iavf_rxtx_vec_avx512.c | 10 +++++++---
drivers/net/iavf/iavf_rxtx_vec_sse.c | 10 +++++++---
3 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx2.c b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
index 86290c4bbb..25094d5958 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx2.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
@@ -1397,8 +1397,10 @@ _iavf_recv_raw_pkts_vec_avx2_flex_rxd(struct iavf_rx_queue *rxq,
(_mm256_castsi256_si128(status0_7)));
received += burst;
#ifndef RTE_LIBRTE_IAVF_16BYTE_RX_DESC
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
+#if __GNUC__ >= 7
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
+#endif
if (rxq->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) {
inflection_point = (inflection_point <= burst) ? inflection_point : 0;
switch (inflection_point) {
@@ -1436,7 +1438,9 @@ _iavf_recv_raw_pkts_vec_avx2_flex_rxd(struct iavf_rx_queue *rxq,
rxq->hw_time_update = rte_get_timer_cycles() / (rte_get_timer_hz() / 1000);
}
-#pragma GCC diagnostic pop
+#if __GNUC__ >= 7
+ #pragma GCC diagnostic pop
+#endif
#endif
if (burst != IAVF_DESCS_PER_LOOP_AVX)
break;
diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx512.c b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
index f9961e53b8..b74a6443b3 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx512.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
@@ -1551,8 +1551,10 @@ _iavf_recv_raw_pkts_vec_avx512_flex_rxd(struct iavf_rx_queue *rxq,
received += burst;
#ifndef RTE_LIBRTE_IAVF_16BYTE_RX_DESC
#ifdef IAVF_RX_TS_OFFLOAD
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
+#if __GNUC__ >= 7
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
+#endif
if (rxq->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) {
inflection_point = (inflection_point <= burst) ? inflection_point : 0;
switch (inflection_point) {
@@ -1590,7 +1592,9 @@ _iavf_recv_raw_pkts_vec_avx512_flex_rxd(struct iavf_rx_queue *rxq,
rxq->hw_time_update = rte_get_timer_cycles() / (rte_get_timer_hz() / 1000);
}
-#pragma GCC diagnostic pop
+#if __GNUC__ >= 7
+ #pragma GCC diagnostic pop
+#endif
#endif
#endif
if (burst != IAVF_DESCS_PER_LOOP_AVX)
diff --git a/drivers/net/iavf/iavf_rxtx_vec_sse.c b/drivers/net/iavf/iavf_rxtx_vec_sse.c
index b754122c51..ff364d4fe5 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_sse.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_sse.c
@@ -1126,8 +1126,10 @@ _recv_raw_pkts_vec_flex_rxd(struct iavf_rx_queue *rxq,
nb_pkts_recd += var;
#ifndef RTE_LIBRTE_IAVF_16BYTE_RX_DESC
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
+#if __GNUC__ >= 7
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
+#endif
if (rxq->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) {
inflection_point = (inflection_point <= var) ? inflection_point : 0;
switch (inflection_point) {
@@ -1153,7 +1155,9 @@ _recv_raw_pkts_vec_flex_rxd(struct iavf_rx_queue *rxq,
rxq->hw_time_update = rte_get_timer_cycles() / (rte_get_timer_hz() / 1000);
}
-#pragma GCC diagnostic pop
+#if __GNUC__ >= 7
+ #pragma GCC diagnostic pop
+#endif
#endif
if (likely(var != IAVF_VPMD_DESCS_PER_LOOP))
--
2.34.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] net/iavf: fix old GCC compilation warnings
2023-06-09 5:41 [PATCH] net/iavf: fix old GCC compilation warnings Zhichao Zeng
@ 2023-06-09 6:58 ` David Marchand
2023-06-09 7:19 ` Zeng, ZhichaoX
2023-06-09 9:02 ` [PATCH v2] net/iavf: fix " Zhichao Zeng
2023-06-09 14:38 ` [PATCH] net/iavf: fix old GCC " Stephen Hemminger
2 siblings, 1 reply; 10+ messages in thread
From: David Marchand @ 2023-06-09 6:58 UTC (permalink / raw)
To: Zhichao Zeng
Cc: dev, qi.z.zhang, daxuex.gao, Bruce Richardson,
Konstantin Ananyev, Jingjing Wu, Beilei Xing, Wenjun Wu
On Fri, Jun 9, 2023 at 7:35 AM Zhichao Zeng <zhichaox.zeng@intel.com> wrote:
>
> The code uses the Wimplicit-fallthrough compile option to ignore
> falls through warnings in switch case, but this option was introduced
> by GCC 7 and old GCC do not recognize the option.
>
> Add judgment to avoid warnings about unrecognized options in old GCC.
>
> Fixes: 95a1b0b23140 ("net/iavf: support Rx timestamp offload on SSE")
> Fixes: 4f58266da4d3 ("net/iavf: support Rx timestamp offload on AVX2")
> Fixes: d65eadb9e178 ("net/iavf: support Rx timestamp offload on AVX512")
> Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
This is ugly.
I don't think we introduced a marker for this in EAL, but at least I
see other drivers use /* fallthrough */.
Prefer this form, please.
IOW:
diff --git a/drivers/net/iavf/iavf_rxtx_vec_sse.c
b/drivers/net/iavf/iavf_rxtx_vec_sse.c
index b754122c51..81ea154519 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_sse.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_sse.c
@@ -1126,24 +1126,26 @@ _recv_raw_pkts_vec_flex_rxd(struct iavf_rx_queue *rxq,
nb_pkts_recd += var;
#ifndef RTE_LIBRTE_IAVF_16BYTE_RX_DESC
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
if (rxq->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) {
inflection_point = (inflection_point <= var) ?
inflection_point : 0;
switch (inflection_point) {
case 1:
*RTE_MBUF_DYNFIELD(rx_pkts[pos + 0],
iavf_timestamp_dynfield_offset
+ 4, uint32_t *) += 1;
+ /* fallthrough */
case 2:
etc...
--
David Marchand
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] net/iavf: fix old GCC compilation warnings
2023-06-09 6:58 ` David Marchand
@ 2023-06-09 7:19 ` Zeng, ZhichaoX
0 siblings, 0 replies; 10+ messages in thread
From: Zeng, ZhichaoX @ 2023-06-09 7:19 UTC (permalink / raw)
To: David Marchand
Cc: dev, Zhang, Qi Z, Gao, DaxueX, Richardson, Bruce,
Konstantin Ananyev, Wu, Jingjing, Xing, Beilei, Wu, Wenjun1
Hi David,
> -----Original Message-----
> From: David Marchand <david.marchand@redhat.com>
> Sent: Friday, June 9, 2023 2:58 PM
> To: Zeng, ZhichaoX <zhichaox.zeng@intel.com>
> Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Gao, DaxueX
> <daxuex.gao@intel.com>; Richardson, Bruce <bruce.richardson@intel.com>;
> Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>; Wu, Jingjing
> <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>; Wu, Wenjun1
> <wenjun1.wu@intel.com>
> Subject: Re: [PATCH] net/iavf: fix old GCC compilation warnings
>
> On Fri, Jun 9, 2023 at 7:35 AM Zhichao Zeng <zhichaox.zeng@intel.com>
> wrote:
> >
> > The code uses the Wimplicit-fallthrough compile option to ignore falls
> > through warnings in switch case, but this option was introduced by GCC
> > 7 and old GCC do not recognize the option.
> >
> > Add judgment to avoid warnings about unrecognized options in old GCC.
> >
> > Fixes: 95a1b0b23140 ("net/iavf: support Rx timestamp offload on SSE")
> > Fixes: 4f58266da4d3 ("net/iavf: support Rx timestamp offload on AVX2")
> > Fixes: d65eadb9e178 ("net/iavf: support Rx timestamp offload on
> > AVX512")
> > Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
>
> This is ugly.
>
> I don't think we introduced a marker for this in EAL, but at least I see other
> drivers use /* fallthrough */.
> Prefer this form, please.
Thanks for your advice, I will change to this form and submit v2.
Best Regards
Zhichao
> IOW:
>
> diff --git a/drivers/net/iavf/iavf_rxtx_vec_sse.c
> b/drivers/net/iavf/iavf_rxtx_vec_sse.c
> index b754122c51..81ea154519 100644
> --- a/drivers/net/iavf/iavf_rxtx_vec_sse.c
> +++ b/drivers/net/iavf/iavf_rxtx_vec_sse.c
> @@ -1126,24 +1126,26 @@ _recv_raw_pkts_vec_flex_rxd(struct
> iavf_rx_queue *rxq,
> nb_pkts_recd += var;
>
> #ifndef RTE_LIBRTE_IAVF_16BYTE_RX_DESC
> -#pragma GCC diagnostic push
> -#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
> if (rxq->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) {
> inflection_point = (inflection_point <= var) ?
> inflection_point : 0;
> switch (inflection_point) {
> case 1:
> *RTE_MBUF_DYNFIELD(rx_pkts[pos + 0],
> iavf_timestamp_dynfield_offset
> + 4, uint32_t *) += 1;
> + /* fallthrough */
> case 2:
>
> etc...
>
>
> --
> David Marchand
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2] net/iavf: fix compilation warnings
2023-06-09 5:41 [PATCH] net/iavf: fix old GCC compilation warnings Zhichao Zeng
2023-06-09 6:58 ` David Marchand
@ 2023-06-09 9:02 ` Zhichao Zeng
2023-06-12 8:32 ` Gao, DaxueX
2023-06-09 14:38 ` [PATCH] net/iavf: fix old GCC " Stephen Hemminger
2 siblings, 1 reply; 10+ messages in thread
From: Zhichao Zeng @ 2023-06-09 9:02 UTC (permalink / raw)
To: dev
Cc: qi.z.zhang, daxuex.gao, Zhichao Zeng, Bruce Richardson,
Konstantin Ananyev, Jingjing Wu, Beilei Xing, Wenjun Wu
Use fallthrough comments to ignore compilation warnings instead of
diagnostic pragmas, which are not recognized by old GCC(below GCC7).
Fixes: 95a1b0b23140 ("net/iavf: support Rx timestamp offload on SSE")
Fixes: 4f58266da4d3 ("net/iavf: support Rx timestamp offload on AVX2")
Fixes: d65eadb9e178 ("net/iavf: support Rx timestamp offload on AVX512")
Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
---
drivers/net/iavf/iavf_rxtx_vec_avx2.c | 11 ++++++++---
drivers/net/iavf/iavf_rxtx_vec_avx512.c | 11 ++++++++---
drivers/net/iavf/iavf_rxtx_vec_sse.c | 7 ++++---
3 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx2.c b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
index 86290c4bbb..184fa30e0e 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx2.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
@@ -1397,36 +1397,42 @@ _iavf_recv_raw_pkts_vec_avx2_flex_rxd(struct iavf_rx_queue *rxq,
(_mm256_castsi256_si128(status0_7)));
received += burst;
#ifndef RTE_LIBRTE_IAVF_16BYTE_RX_DESC
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
if (rxq->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) {
inflection_point = (inflection_point <= burst) ? inflection_point : 0;
switch (inflection_point) {
case 1:
*RTE_MBUF_DYNFIELD(rx_pkts[i + 0],
iavf_timestamp_dynfield_offset + 4, uint32_t *) += 1;
+ /* fallthrough */
case 2:
*RTE_MBUF_DYNFIELD(rx_pkts[i + 1],
iavf_timestamp_dynfield_offset + 4, uint32_t *) += 1;
+ /* fallthrough */
case 3:
*RTE_MBUF_DYNFIELD(rx_pkts[i + 2],
iavf_timestamp_dynfield_offset + 4, uint32_t *) += 1;
+ /* fallthrough */
case 4:
*RTE_MBUF_DYNFIELD(rx_pkts[i + 3],
iavf_timestamp_dynfield_offset + 4, uint32_t *) += 1;
+ /* fallthrough */
case 5:
*RTE_MBUF_DYNFIELD(rx_pkts[i + 4],
iavf_timestamp_dynfield_offset + 4, uint32_t *) += 1;
+ /* fallthrough */
case 6:
*RTE_MBUF_DYNFIELD(rx_pkts[i + 5],
iavf_timestamp_dynfield_offset + 4, uint32_t *) += 1;
+ /* fallthrough */
case 7:
*RTE_MBUF_DYNFIELD(rx_pkts[i + 6],
iavf_timestamp_dynfield_offset + 4, uint32_t *) += 1;
+ /* fallthrough */
case 8:
*RTE_MBUF_DYNFIELD(rx_pkts[i + 7],
iavf_timestamp_dynfield_offset + 4, uint32_t *) += 1;
rxq->phc_time += (uint64_t)1 << 32;
+ /* fallthrough */
case 0:
break;
default:
@@ -1436,7 +1442,6 @@ _iavf_recv_raw_pkts_vec_avx2_flex_rxd(struct iavf_rx_queue *rxq,
rxq->hw_time_update = rte_get_timer_cycles() / (rte_get_timer_hz() / 1000);
}
-#pragma GCC diagnostic pop
#endif
if (burst != IAVF_DESCS_PER_LOOP_AVX)
break;
diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx512.c b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
index f9961e53b8..38649b6f0b 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx512.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
@@ -1551,36 +1551,42 @@ _iavf_recv_raw_pkts_vec_avx512_flex_rxd(struct iavf_rx_queue *rxq,
received += burst;
#ifndef RTE_LIBRTE_IAVF_16BYTE_RX_DESC
#ifdef IAVF_RX_TS_OFFLOAD
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
if (rxq->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) {
inflection_point = (inflection_point <= burst) ? inflection_point : 0;
switch (inflection_point) {
case 1:
*RTE_MBUF_DYNFIELD(rx_pkts[i + 0],
iavf_timestamp_dynfield_offset + 4, uint32_t *) += 1;
+ /* fallthrough */
case 2:
*RTE_MBUF_DYNFIELD(rx_pkts[i + 1],
iavf_timestamp_dynfield_offset + 4, uint32_t *) += 1;
+ /* fallthrough */
case 3:
*RTE_MBUF_DYNFIELD(rx_pkts[i + 2],
iavf_timestamp_dynfield_offset + 4, uint32_t *) += 1;
+ /* fallthrough */
case 4:
*RTE_MBUF_DYNFIELD(rx_pkts[i + 3],
iavf_timestamp_dynfield_offset + 4, uint32_t *) += 1;
+ /* fallthrough */
case 5:
*RTE_MBUF_DYNFIELD(rx_pkts[i + 4],
iavf_timestamp_dynfield_offset + 4, uint32_t *) += 1;
+ /* fallthrough */
case 6:
*RTE_MBUF_DYNFIELD(rx_pkts[i + 5],
iavf_timestamp_dynfield_offset + 4, uint32_t *) += 1;
+ /* fallthrough */
case 7:
*RTE_MBUF_DYNFIELD(rx_pkts[i + 6],
iavf_timestamp_dynfield_offset + 4, uint32_t *) += 1;
+ /* fallthrough */
case 8:
*RTE_MBUF_DYNFIELD(rx_pkts[i + 7],
iavf_timestamp_dynfield_offset + 4, uint32_t *) += 1;
rxq->phc_time += (uint64_t)1 << 32;
+ /* fallthrough */
case 0:
break;
default:
@@ -1590,7 +1596,6 @@ _iavf_recv_raw_pkts_vec_avx512_flex_rxd(struct iavf_rx_queue *rxq,
rxq->hw_time_update = rte_get_timer_cycles() / (rte_get_timer_hz() / 1000);
}
-#pragma GCC diagnostic pop
#endif
#endif
if (burst != IAVF_DESCS_PER_LOOP_AVX)
diff --git a/drivers/net/iavf/iavf_rxtx_vec_sse.c b/drivers/net/iavf/iavf_rxtx_vec_sse.c
index b754122c51..81ea154519 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_sse.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_sse.c
@@ -1126,24 +1126,26 @@ _recv_raw_pkts_vec_flex_rxd(struct iavf_rx_queue *rxq,
nb_pkts_recd += var;
#ifndef RTE_LIBRTE_IAVF_16BYTE_RX_DESC
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
if (rxq->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) {
inflection_point = (inflection_point <= var) ? inflection_point : 0;
switch (inflection_point) {
case 1:
*RTE_MBUF_DYNFIELD(rx_pkts[pos + 0],
iavf_timestamp_dynfield_offset + 4, uint32_t *) += 1;
+ /* fallthrough */
case 2:
*RTE_MBUF_DYNFIELD(rx_pkts[pos + 1],
iavf_timestamp_dynfield_offset + 4, uint32_t *) += 1;
+ /* fallthrough */
case 3:
*RTE_MBUF_DYNFIELD(rx_pkts[pos + 2],
iavf_timestamp_dynfield_offset + 4, uint32_t *) += 1;
+ /* fallthrough */
case 4:
*RTE_MBUF_DYNFIELD(rx_pkts[pos + 3],
iavf_timestamp_dynfield_offset + 4, uint32_t *) += 1;
rxq->phc_time += (uint64_t)1 << 32;
+ /* fallthrough */
case 0:
break;
default:
@@ -1153,7 +1155,6 @@ _recv_raw_pkts_vec_flex_rxd(struct iavf_rx_queue *rxq,
rxq->hw_time_update = rte_get_timer_cycles() / (rte_get_timer_hz() / 1000);
}
-#pragma GCC diagnostic pop
#endif
if (likely(var != IAVF_VPMD_DESCS_PER_LOOP))
--
2.34.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] net/iavf: fix old GCC compilation warnings
2023-06-09 5:41 [PATCH] net/iavf: fix old GCC compilation warnings Zhichao Zeng
2023-06-09 6:58 ` David Marchand
2023-06-09 9:02 ` [PATCH v2] net/iavf: fix " Zhichao Zeng
@ 2023-06-09 14:38 ` Stephen Hemminger
2 siblings, 0 replies; 10+ messages in thread
From: Stephen Hemminger @ 2023-06-09 14:38 UTC (permalink / raw)
To: Zhichao Zeng
Cc: dev, qi.z.zhang, daxuex.gao, Bruce Richardson,
Konstantin Ananyev, Jingjing Wu, Beilei Xing, Wenjun Wu
On Fri, 9 Jun 2023 13:41:56 +0800
Zhichao Zeng <zhichaox.zeng@intel.com> wrote:
> The code uses the Wimplicit-fallthrough compile option to ignore
> falls through warnings in switch case, but this option was introduced
> by GCC 7 and old GCC do not recognize the option.
>
> Add judgment to avoid warnings about unrecognized options in old GCC.
>
> Fixes: 95a1b0b23140 ("net/iavf: support Rx timestamp offload on SSE")
> Fixes: 4f58266da4d3 ("net/iavf: support Rx timestamp offload on AVX2")
> Fixes: d65eadb9e178 ("net/iavf: support Rx timestamp offload on AVX512")
> Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
> ---
RHEL 7 becomes end of life this month.
That makes the oldest version of Gcc that DPDK is required to support
is gcc 8.X in RHEL 8.
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH v2] net/iavf: fix compilation warnings
2023-06-09 9:02 ` [PATCH v2] net/iavf: fix " Zhichao Zeng
@ 2023-06-12 8:32 ` Gao, DaxueX
2023-06-12 9:01 ` Thomas Monjalon
0 siblings, 1 reply; 10+ messages in thread
From: Gao, DaxueX @ 2023-06-12 8:32 UTC (permalink / raw)
To: Zeng, ZhichaoX, dev
Cc: Zhang, Qi Z, Richardson, Bruce, Konstantin Ananyev, Wu, Jingjing,
Xing, Beilei, Wu, Wenjun1
> -----Original Message-----
> From: Zeng, ZhichaoX <zhichaox.zeng@intel.com>
> Sent: 2023年6月9日 17:03
> To: dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Gao, DaxueX
> <daxuex.gao@intel.com>; Zeng, ZhichaoX <zhichaox.zeng@intel.com>;
> Richardson, Bruce <bruce.richardson@intel.com>; Konstantin Ananyev
> <konstantin.v.ananyev@yandex.ru>; Wu, Jingjing <jingjing.wu@intel.com>; Xing,
> Beilei <beilei.xing@intel.com>; Wu, Wenjun1 <wenjun1.wu@intel.com>
> Subject: [PATCH v2] net/iavf: fix compilation warnings
>
> Use fallthrough comments to ignore compilation warnings instead of diagnostic
> pragmas, which are not recognized by old GCC(below GCC7).
>
> Fixes: 95a1b0b23140 ("net/iavf: support Rx timestamp offload on SSE")
> Fixes: 4f58266da4d3 ("net/iavf: support Rx timestamp offload on AVX2")
> Fixes: d65eadb9e178 ("net/iavf: support Rx timestamp offload on AVX512")
> Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
Tested-by: Daxue Gao <daxuex.gao@intel.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] net/iavf: fix compilation warnings
2023-06-12 8:32 ` Gao, DaxueX
@ 2023-06-12 9:01 ` Thomas Monjalon
2023-06-12 12:29 ` Zhang, Qi Z
0 siblings, 1 reply; 10+ messages in thread
From: Thomas Monjalon @ 2023-06-12 9:01 UTC (permalink / raw)
To: Zeng, ZhichaoX, Zhang, Qi Z
Cc: dev, Richardson, Bruce, Konstantin Ananyev, Wu, Jingjing, Xing,
Beilei, Wu, Wenjun1, Gao, DaxueX, david.marchand, john.mcnamara
12/06/2023 10:32, Gao, DaxueX:
> From: Zeng, ZhichaoX <zhichaox.zeng@intel.com>
> > Use fallthrough comments to ignore compilation warnings instead of diagnostic
> > pragmas, which are not recognized by old GCC(below GCC7).
> >
> > Fixes: 95a1b0b23140 ("net/iavf: support Rx timestamp offload on SSE")
> > Fixes: 4f58266da4d3 ("net/iavf: support Rx timestamp offload on AVX2")
> > Fixes: d65eadb9e178 ("net/iavf: support Rx timestamp offload on AVX512")
> > Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
> Tested-by: Daxue Gao <daxuex.gao@intel.com>
Please squash the fix in the original commits above,
so we won't have any compilation issue when doing "git bisect".
In the meantime, I am pulling the branch next-net-intel
without the Rx timestamp support for SSE/AVX2/AVX512.
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH v2] net/iavf: fix compilation warnings
2023-06-12 9:01 ` Thomas Monjalon
@ 2023-06-12 12:29 ` Zhang, Qi Z
2023-06-12 14:15 ` Thomas Monjalon
0 siblings, 1 reply; 10+ messages in thread
From: Zhang, Qi Z @ 2023-06-12 12:29 UTC (permalink / raw)
To: Thomas Monjalon, Zeng, ZhichaoX
Cc: dev, Richardson, Bruce, Konstantin Ananyev, Wu, Jingjing, Xing,
Beilei, Wu, Wenjun1, Gao, DaxueX, david.marchand, Mcnamara, John
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Monday, June 12, 2023 5:02 PM
> To: Zeng, ZhichaoX <zhichaox.zeng@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Richardson, Bruce <bruce.richardson@intel.com>;
> Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>; Wu, Jingjing
> <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>; Wu, Wenjun1
> <wenjun1.wu@intel.com>; Gao, DaxueX <daxuex.gao@intel.com>;
> david.marchand@redhat.com; Mcnamara, John <john.mcnamara@intel.com>
> Subject: Re: [PATCH v2] net/iavf: fix compilation warnings
>
> 12/06/2023 10:32, Gao, DaxueX:
> > From: Zeng, ZhichaoX <zhichaox.zeng@intel.com>
> > > Use fallthrough comments to ignore compilation warnings instead of
> > > diagnostic pragmas, which are not recognized by old GCC(below GCC7).
> > >
> > > Fixes: 95a1b0b23140 ("net/iavf: support Rx timestamp offload on
> > > SSE")
> > > Fixes: 4f58266da4d3 ("net/iavf: support Rx timestamp offload on
> > > AVX2")
> > > Fixes: d65eadb9e178 ("net/iavf: support Rx timestamp offload on
> > > AVX512")
> > > Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
> > Tested-by: Daxue Gao <daxuex.gao@intel.com>
>
> Please squash the fix in the original commits above, so we won't have any
> compilation issue when doing "git bisect".
>
> In the meantime, I am pulling the branch next-net-intel without the Rx
> timestamp support for SSE/AVX2/AVX512.
>
Squashed to original patches in dpdk-next-net-intel.
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] net/iavf: fix compilation warnings
2023-06-12 12:29 ` Zhang, Qi Z
@ 2023-06-12 14:15 ` Thomas Monjalon
2023-06-12 15:08 ` Zhang, Qi Z
0 siblings, 1 reply; 10+ messages in thread
From: Thomas Monjalon @ 2023-06-12 14:15 UTC (permalink / raw)
To: Zhang, Qi Z
Cc: Zeng, ZhichaoX, dev, Richardson, Bruce, Konstantin Ananyev, Wu,
Jingjing, Xing, Beilei, Wu, Wenjun1, Gao, DaxueX, david.marchand,
Mcnamara, John, helin.zhang
12/06/2023 14:29, Zhang, Qi Z:
> From: Thomas Monjalon <thomas@monjalon.net>
> > 12/06/2023 10:32, Gao, DaxueX:
> > > From: Zeng, ZhichaoX <zhichaox.zeng@intel.com>
> > > > Use fallthrough comments to ignore compilation warnings instead of
> > > > diagnostic pragmas, which are not recognized by old GCC(below GCC7).
> > > >
> > > > Fixes: 95a1b0b23140 ("net/iavf: support Rx timestamp offload on
> > > > SSE")
> > > > Fixes: 4f58266da4d3 ("net/iavf: support Rx timestamp offload on
> > > > AVX2")
> > > > Fixes: d65eadb9e178 ("net/iavf: support Rx timestamp offload on
> > > > AVX512")
> > > > Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
> > > Tested-by: Daxue Gao <daxuex.gao@intel.com>
> >
> > Please squash the fix in the original commits above, so we won't have any
> > compilation issue when doing "git bisect".
> >
> > In the meantime, I am pulling the branch next-net-intel without the Rx
> > timestamp support for SSE/AVX2/AVX512.
> >
>
> Squashed to original patches in dpdk-next-net-intel.
It is still not compiling:
In function '_mm_testz_si128',
inlined from '_recv_raw_pkts_vec_flex_rxd' at ../../dpdk/drivers/net/iavf/iavf_rxtx_vec_sse.c:1070:12:
/usr/lib/gcc/x86_64-pc-linux-gnu/13.1.1/include/smmintrin.h:69:10: error: 'mask_low' may be used uninitialized [-Werror=maybe-uninitialized]
69 | return __builtin_ia32_ptestz128 ((__v2di)__M, (__v2di)__V);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../dpdk/drivers/net/iavf/iavf_rxtx_vec_sse.c: In function '_recv_raw_pkts_vec_flex_rxd':
../../dpdk/drivers/net/iavf/iavf_rxtx_vec_sse.c:1058:49: note: 'mask_low' was declared here
1058 | __m128i mask_low;
| ^~~~~~~~
In function '_mm_testz_si128',
inlined from '_recv_raw_pkts_vec_flex_rxd' at ../../dpdk/drivers/net/iavf/iavf_rxtx_vec_sse.c:1072:13:
/usr/lib/gcc/x86_64-pc-linux-gnu/13.1.1/include/smmintrin.h:69:10: error: 'mask_high' may be used uninitialized [-Werror=maybe-uninitialized]
69 | return __builtin_ia32_ptestz128 ((__v2di)__M, (__v2di)__V);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../dpdk/drivers/net/iavf/iavf_rxtx_vec_sse.c: In function '_recv_raw_pkts_vec_flex_rxd':
../../dpdk/drivers/net/iavf/iavf_rxtx_vec_sse.c:1059:49: note: 'mask_high' was declared here
1059 | __m128i mask_high;
| ^~~~~~~~~
cc1: all warnings being treated as errors
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH v2] net/iavf: fix compilation warnings
2023-06-12 14:15 ` Thomas Monjalon
@ 2023-06-12 15:08 ` Zhang, Qi Z
0 siblings, 0 replies; 10+ messages in thread
From: Zhang, Qi Z @ 2023-06-12 15:08 UTC (permalink / raw)
To: Thomas Monjalon
Cc: Zeng, ZhichaoX, dev, Richardson, Bruce, Konstantin Ananyev, Wu,
Jingjing, Xing, Beilei, Wu, Wenjun1, Gao, DaxueX, david.marchand,
Mcnamara, John, Zhang, Helin
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Monday, June 12, 2023 10:15 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: Zeng, ZhichaoX <zhichaox.zeng@intel.com>; dev@dpdk.org; Richardson,
> Bruce <bruce.richardson@intel.com>; Konstantin Ananyev
> <konstantin.v.ananyev@yandex.ru>; Wu, Jingjing <jingjing.wu@intel.com>;
> Xing, Beilei <beilei.xing@intel.com>; Wu, Wenjun1 <wenjun1.wu@intel.com>;
> Gao, DaxueX <daxuex.gao@intel.com>; david.marchand@redhat.com;
> Mcnamara, John <john.mcnamara@intel.com>; Zhang, Helin
> <helin.zhang@intel.com>
> Subject: Re: [PATCH v2] net/iavf: fix compilation warnings
>
> 12/06/2023 14:29, Zhang, Qi Z:
> > From: Thomas Monjalon <thomas@monjalon.net>
> > > 12/06/2023 10:32, Gao, DaxueX:
> > > > From: Zeng, ZhichaoX <zhichaox.zeng@intel.com>
> > > > > Use fallthrough comments to ignore compilation warnings instead
> > > > > of diagnostic pragmas, which are not recognized by old GCC(below
> GCC7).
> > > > >
> > > > > Fixes: 95a1b0b23140 ("net/iavf: support Rx timestamp offload on
> > > > > SSE")
> > > > > Fixes: 4f58266da4d3 ("net/iavf: support Rx timestamp offload on
> > > > > AVX2")
> > > > > Fixes: d65eadb9e178 ("net/iavf: support Rx timestamp offload on
> > > > > AVX512")
> > > > > Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
> > > > Tested-by: Daxue Gao <daxuex.gao@intel.com>
> > >
> > > Please squash the fix in the original commits above, so we won't
> > > have any compilation issue when doing "git bisect".
> > >
> > > In the meantime, I am pulling the branch next-net-intel without the
> > > Rx timestamp support for SSE/AVX2/AVX512.
> > >
> >
> > Squashed to original patches in dpdk-next-net-intel.
>
> It is still not compiling:
>
> In function '_mm_testz_si128',
> inlined from '_recv_raw_pkts_vec_flex_rxd'
> at ../../dpdk/drivers/net/iavf/iavf_rxtx_vec_sse.c:1070:12:
> /usr/lib/gcc/x86_64-pc-linux-gnu/13.1.1/include/smmintrin.h:69:10: error:
> 'mask_low' may be used uninitialized [-Werror=maybe-uninitialized]
> 69 | return __builtin_ia32_ptestz128 ((__v2di)__M, (__v2di)__V);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../../dpdk/drivers/net/iavf/iavf_rxtx_vec_sse.c: In function
> '_recv_raw_pkts_vec_flex_rxd':
> ../../dpdk/drivers/net/iavf/iavf_rxtx_vec_sse.c:1058:49: note: 'mask_low' was
> declared here
> 1058 | __m128i mask_low;
> | ^~~~~~~~
> In function '_mm_testz_si128',
> inlined from '_recv_raw_pkts_vec_flex_rxd'
> at ../../dpdk/drivers/net/iavf/iavf_rxtx_vec_sse.c:1072:13:
> /usr/lib/gcc/x86_64-pc-linux-gnu/13.1.1/include/smmintrin.h:69:10: error:
> 'mask_high' may be used uninitialized [-Werror=maybe-uninitialized]
> 69 | return __builtin_ia32_ptestz128 ((__v2di)__M, (__v2di)__V);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../../dpdk/drivers/net/iavf/iavf_rxtx_vec_sse.c: In function
> '_recv_raw_pkts_vec_flex_rxd':
> ../../dpdk/drivers/net/iavf/iavf_rxtx_vec_sse.c:1059:49: note: 'mask_high' was
> declared here
> 1059 | __m128i mask_high;
> | ^~~~~~~~~
> cc1: all warnings being treated as errors
>
>
The question is if "apply patch failure" happens, the CI build will not be executed and we may not able to figure out the error early, any BKM we should follow? Thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-06-12 15:15 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-09 5:41 [PATCH] net/iavf: fix old GCC compilation warnings Zhichao Zeng
2023-06-09 6:58 ` David Marchand
2023-06-09 7:19 ` Zeng, ZhichaoX
2023-06-09 9:02 ` [PATCH v2] net/iavf: fix " Zhichao Zeng
2023-06-12 8:32 ` Gao, DaxueX
2023-06-12 9:01 ` Thomas Monjalon
2023-06-12 12:29 ` Zhang, Qi Z
2023-06-12 14:15 ` Thomas Monjalon
2023-06-12 15:08 ` Zhang, Qi Z
2023-06-09 14:38 ` [PATCH] net/iavf: fix old GCC " Stephen Hemminger
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).