Skip to contentSkip to conversation

fix void function returning a value

PATCH Superseded Andre Muezerie 3 participants 14 messages Dec 26, 2024 – Feb 10, 2025 Network drivers

lore
Share & tools
lore
#0 lore raw

cover fix void function returning a value

This patch avoids warnings like the one below emitted by MSVC:

../drivers/common/idpf/idpf_common_rxtx_avx512.c(139):
warning C4098: 'idpf_singleq_rearm':
'void' function returning a value

Andre Muezerie (2):
drivers_common: fix void function returning a value
drivers_net: fix void function returning a value

 drivers/common/idpf/idpf_common_rxtx_avx512.c | 12 ++++++++----
 drivers/net/i40e/i40e_rxtx_vec_avx2.c         |  2 +-
 drivers/net/i40e/i40e_rxtx_vec_avx512.c       |  2 +-
 drivers/net/iavf/iavf_rxtx_vec_avx2.c         |  2 +-
 drivers/net/ice/ice_rxtx_vec_avx2.c           |  2 +-
 5 files changed, 12 insertions(+), 8 deletions(-)

--
2.47.0.vfs.0.3

#1 lore raw

PATCH 1/2 drivers_common: fix void function returning a value

This patch avoids warnings like the one below emitted by MSVC:

../drivers/common/idpf/idpf_common_rxtx_avx512.c(139):
warning C4098: 'idpf_singleq_rearm':
'void' function returning a value

---
 drivers/common/idpf/idpf_common_rxtx_avx512.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/common/idpf/idpf_common_rxtx_avx512.c +8 -4
index b8450b03ae..9ea71c3718 100644
@@ -137,8 +137,10 @@ idpf_singleq_rearm(struct idpf_rx_queue *rxq)
 
 	rxdp += rxq->rxrearm_start;
 
-	if (unlikely(cache == NULL))
-		return idpf_singleq_rearm_common(rxq);
+	if (unlikely(cache == NULL)) {
+		idpf_singleq_rearm_common(rxq);
+		return;
+	}
 
 	/* We need to pull 'n' more MBUFs into the software ring from mempool
 	 * We inline the mempool function here, so we can vectorize the copy
@@ -607,8 +609,10 @@ idpf_splitq_rearm(struct idpf_rx_queue *rx_bufq)
 
 	rxdp += rx_bufq->rxrearm_start;
 
-	if (unlikely(!cache))
-		return idpf_splitq_rearm_common(rx_bufq);
+	if (unlikely(!cache)) {
+		idpf_splitq_rearm_common(rx_bufq);
+		return;
+	}
 
 	/* We need to pull 'n' more MBUFs into the software ring from mempool
 	 * We inline the mempool function here, so we can vectorize the copy
Signature · 1 line
2.47.0.vfs.0.3
#2 lore raw

PATCH 2/2 drivers_net: fix void function returning a value

In reply to Andre Muezerie

This patch avoids warnings like the one below emitted by MSVC:

../drivers/common/idpf/idpf_common_rxtx_avx512.c(139):
warning C4098: 'idpf_singleq_rearm':
'void' function returning a value

---
 drivers/net/i40e/i40e_rxtx_vec_avx2.c   | 2 +-
 drivers/net/i40e/i40e_rxtx_vec_avx512.c | 2 +-
 drivers/net/iavf/iavf_rxtx_vec_avx2.c   | 2 +-
 drivers/net/ice/ice_rxtx_vec_avx2.c     | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/i40e/i40e_rxtx_vec_avx2.c +1 -1
index 19cf0ac718..3e95a6a1df 100644
@@ -22,7 +22,7 @@
 static __rte_always_inline void
 i40e_rxq_rearm(struct i40e_rx_queue *rxq)
 {
-	return i40e_rxq_rearm_common(rxq, false);
+	i40e_rxq_rearm_common(rxq, false);
 }
 
 #ifndef RTE_LIBRTE_I40E_16BYTE_RX_DESC
drivers/net/i40e/i40e_rxtx_vec_avx512.c +1 -1
index 3b2750221b..ae7bcb582b 100644
@@ -24,7 +24,7 @@
 static __rte_always_inline void
 i40e_rxq_rearm(struct i40e_rx_queue *rxq)
 {
-	return i40e_rxq_rearm_common(rxq, true);
+	i40e_rxq_rearm_common(rxq, true);
 }
 
 #ifndef RTE_LIBRTE_I40E_16BYTE_RX_DESC
drivers/net/iavf/iavf_rxtx_vec_avx2.c +1 -1
index 49d41af953..cdb48438da 100644
@@ -13,7 +13,7 @@
 static __rte_always_inline void
 iavf_rxq_rearm(struct iavf_rx_queue *rxq)
 {
-	return iavf_rxq_rearm_common(rxq, false);
+	iavf_rxq_rearm_common(rxq, false);
 }
 
 #define PKTLEN_SHIFT     10
drivers/net/ice/ice_rxtx_vec_avx2.c +1 -1
index d6e88dbb29..02bfb9b15d 100644
@@ -14,7 +14,7 @@
 static __rte_always_inline void
 ice_rxq_rearm(struct ice_rx_queue *rxq)
 {
-	return ice_rxq_rearm_common(rxq, false);
+	ice_rxq_rearm_common(rxq, false);
 }
 
 static __rte_always_inline __m256i
Signature · 1 line
2.47.0.vfs.0.3
#3 lore raw

v2 cover fix void function returning a value

v2:
* Updated commit messages to follow standard format.

This patch avoids warnings like the one below emitted by MSVC, and is needed to get the code to compile cleanly with MSVC.

../drivers/common/idpf/idpf_common_rxtx_avx512.c(139):
warning C4098: 'idpf_singleq_rearm':
'void' function returning a value

Andre Muezerie (2):
drivers/common: fix void function returning a value drivers/net: fix void function returning a value

 drivers/common/idpf/idpf_common_rxtx_avx512.c | 12 ++++++++----
 drivers/net/i40e/i40e_rxtx_vec_avx2.c         |  2 +-
 drivers/net/i40e/i40e_rxtx_vec_avx512.c       |  2 +-
 drivers/net/iavf/iavf_rxtx_vec_avx2.c         |  2 +-
 drivers/net/ice/ice_rxtx_vec_avx2.c           |  2 +-
 5 files changed, 12 insertions(+), 8 deletions(-)

--
2.47.2.vfs.0.1

#4 lore raw

PATCH v2 1/2 drivers/common: fix void function returning a value

This patch avoids warnings like the one below emitted by MSVC:

../drivers/common/idpf/idpf_common_rxtx_avx512.c(139):
warning C4098: 'idpf_singleq_rearm':
'void' function returning a value

---
 drivers/common/idpf/idpf_common_rxtx_avx512.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/common/idpf/idpf_common_rxtx_avx512.c +8 -4
index b8450b03ae..9ea71c3718 100644
@@ -137,8 +137,10 @@ idpf_singleq_rearm(struct idpf_rx_queue *rxq)
 
 	rxdp += rxq->rxrearm_start;
 
-	if (unlikely(cache == NULL))
-		return idpf_singleq_rearm_common(rxq);
+	if (unlikely(cache == NULL)) {
+		idpf_singleq_rearm_common(rxq);
+		return;
+	}
 
 	/* We need to pull 'n' more MBUFs into the software ring from mempool
 	 * We inline the mempool function here, so we can vectorize the copy
@@ -607,8 +609,10 @@ idpf_splitq_rearm(struct idpf_rx_queue *rx_bufq)
 
 	rxdp += rx_bufq->rxrearm_start;
 
-	if (unlikely(!cache))
-		return idpf_splitq_rearm_common(rx_bufq);
+	if (unlikely(!cache)) {
+		idpf_splitq_rearm_common(rx_bufq);
+		return;
+	}
 
 	/* We need to pull 'n' more MBUFs into the software ring from mempool
 	 * We inline the mempool function here, so we can vectorize the copy
Signature · 1 line
2.47.2.vfs.0.1
Acked-by on v2 1/2
#5 lore raw

Re: [PATCH v2 1/2] drivers/common: fix void function returning a value

Quoted 11 lines · Andre Muezerie

This patch avoids warnings like the one below emitted by MSVC:

../drivers/common/idpf/idpf_common_rxtx_avx512.c(139):
warning C4098: 'idpf_singleq_rearm':
'void' function returning a value

---
 drivers/common/idpf/idpf_common_rxtx_avx512.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
#6 lore raw

Re: [PATCH v2 1/2] drivers/common: fix void function returning a value

Quoted 7 lines · Bruce Richardson
Quoted 6 lines · Andre Muezerie

This patch avoids warnings like the one below emitted by MSVC:

../drivers/common/idpf/idpf_common_rxtx_avx512.c(139):
warning C4098: 'idpf_singleq_rearm':
'void' function returning a value

Quoted 6 lines
Quoted 5 lines
---
 drivers/common/idpf/idpf_common_rxtx_avx512.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
Fixes 5bf87b45b2c8 ("net/idpf: add AVX512 data path for single queue model")
Fixes e528d7c74819 ("common/idpf: add AVX512 data path for split queue model")

patch applied to dpdk-next-net-intel

Thanks,
/Bruce

#7 lore raw

PATCH v2 2/2 drivers/net: fix void function returning a value

In reply to Andre Muezerie

This patch avoids warnings like the one below emitted by MSVC:

../drivers/common/idpf/idpf_common_rxtx_avx512.c(139):
warning C4098: 'idpf_singleq_rearm':
'void' function returning a value

---
 drivers/net/i40e/i40e_rxtx_vec_avx2.c   | 2 +-
 drivers/net/i40e/i40e_rxtx_vec_avx512.c | 2 +-
 drivers/net/iavf/iavf_rxtx_vec_avx2.c   | 2 +-
 drivers/net/ice/ice_rxtx_vec_avx2.c     | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/i40e/i40e_rxtx_vec_avx2.c +1 -1
index 19cf0ac718..3e95a6a1df 100644
@@ -22,7 +22,7 @@
 static __rte_always_inline void
 i40e_rxq_rearm(struct i40e_rx_queue *rxq)
 {
-	return i40e_rxq_rearm_common(rxq, false);
+	i40e_rxq_rearm_common(rxq, false);
 }
 
 #ifndef RTE_LIBRTE_I40E_16BYTE_RX_DESC
drivers/net/i40e/i40e_rxtx_vec_avx512.c +1 -1
index 3b2750221b..ae7bcb582b 100644
@@ -24,7 +24,7 @@
 static __rte_always_inline void
 i40e_rxq_rearm(struct i40e_rx_queue *rxq)
 {
-	return i40e_rxq_rearm_common(rxq, true);
+	i40e_rxq_rearm_common(rxq, true);
 }
 
 #ifndef RTE_LIBRTE_I40E_16BYTE_RX_DESC
drivers/net/iavf/iavf_rxtx_vec_avx2.c +1 -1
index 49d41af953..cdb48438da 100644
@@ -13,7 +13,7 @@
 static __rte_always_inline void
 iavf_rxq_rearm(struct iavf_rx_queue *rxq)
 {
-	return iavf_rxq_rearm_common(rxq, false);
+	iavf_rxq_rearm_common(rxq, false);
 }
 
 #define PKTLEN_SHIFT     10
drivers/net/ice/ice_rxtx_vec_avx2.c +1 -1
index d6e88dbb29..02bfb9b15d 100644
@@ -14,7 +14,7 @@
 static __rte_always_inline void
 ice_rxq_rearm(struct ice_rx_queue *rxq)
 {
-	return ice_rxq_rearm_common(rxq, false);
+	ice_rxq_rearm_common(rxq, false);
 }
 
 static __rte_always_inline __m256i
Signature · 1 line
2.47.2.vfs.0.1
Acked-by on v2 2/2
#8 lore raw

Re: [PATCH v2 2/2] drivers/net: fix void function returning a value

Quoted 6 lines · Andre Muezerie

This patch avoids warnings like the one below emitted by MSVC:

../drivers/common/idpf/idpf_common_rxtx_avx512.c(139):
warning C4098: 'idpf_singleq_rearm':
'void' function returning a value

Quoted 8 lines
---
 drivers/net/i40e/i40e_rxtx_vec_avx2.c   | 2 +-
 drivers/net/i40e/i40e_rxtx_vec_avx512.c | 2 +-
 drivers/net/iavf/iavf_rxtx_vec_avx2.c   | 2 +-
 drivers/net/ice/ice_rxtx_vec_avx2.c     | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
#9 lore raw

Re: [PATCH v2 2/2] drivers/net: fix void function returning a value

Quoted 15 lines · Bruce Richardson
Quoted 6 lines · Andre Muezerie

This patch avoids warnings like the one below emitted by MSVC:

../drivers/common/idpf/idpf_common_rxtx_avx512.c(139):
warning C4098: 'idpf_singleq_rearm':
'void' function returning a value

Quoted 8 lines
---
 drivers/net/i40e/i40e_rxtx_vec_avx2.c   | 2 +-
 drivers/net/i40e/i40e_rxtx_vec_avx512.c | 2 +-
 drivers/net/iavf/iavf_rxtx_vec_avx2.c   | 2 +-
 drivers/net/ice/ice_rxtx_vec_avx2.c     | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
Quoted 1 line
Fixes 0604b1f2208f ("net/i40e: fix crash in AVX512")
Fixes 4eb3dcce7c5d ("net/iavf: fix crash in AVX512")
Fixes 20daa1c978b7 ("net/ice: fix crash in AVX512")

Patch applied to dpdk-next-net-intel

Thanks,
/Bruce

#10 lore raw
In reply to Andre Muezerie

Hello Bruce,

Quoted 15 lines · Andre Muezerie

v2:
* Updated commit messages to follow standard format.

This patch avoids warnings like the one below emitted by MSVC, and is needed to get the code to compile cleanly with MSVC.

../drivers/common/idpf/idpf_common_rxtx_avx512.c(139):
warning C4098: 'idpf_singleq_rearm':
'void' function returning a value

Andre Muezerie (2):
drivers/common: fix void function returning a value drivers/net: fix void function returning a value

Quoted 6 lines
 drivers/common/idpf/idpf_common_rxtx_avx512.c | 12 ++++++++----
 drivers/net/i40e/i40e_rxtx_vec_avx2.c         |  2 +-
 drivers/net/i40e/i40e_rxtx_vec_avx512.c       |  2 +-
 drivers/net/iavf/iavf_rxtx_vec_avx2.c         |  2 +-
 drivers/net/ice/ice_rxtx_vec_avx2.c           |  2 +-
 5 files changed, 12 insertions(+), 8 deletions(-)

I see the series is delegated to the main repo (Thomas).

This touches only Intel drivers and the code deduplication effort you started may conflict (though trivially) with such changes depending on when it lands.

Would you mind merging this fixes from Andre through the next-net-intel tree, right now?
If so, please mark it as delegated to you in patchwork.

Thanks!

Signature · 1 line
David Marchand
#11 lore raw
Quoted 32 lines · David Marchand

Hello Bruce,

Quoted 15 lines · Andre Muezerie

v2:
* Updated commit messages to follow standard format.

This patch avoids warnings like the one below emitted by MSVC, and is needed to get the code to compile cleanly with MSVC.

../drivers/common/idpf/idpf_common_rxtx_avx512.c(139):
warning C4098: 'idpf_singleq_rearm':
'void' function returning a value

Andre Muezerie (2):
drivers/common: fix void function returning a value drivers/net: fix void function returning a value

Quoted 6 lines
 drivers/common/idpf/idpf_common_rxtx_avx512.c | 12 ++++++++----
 drivers/net/i40e/i40e_rxtx_vec_avx2.c         |  2 +-
 drivers/net/i40e/i40e_rxtx_vec_avx512.c       |  2 +-
 drivers/net/iavf/iavf_rxtx_vec_avx2.c         |  2 +-
 drivers/net/ice/ice_rxtx_vec_avx2.c           |  2 +-
 5 files changed, 12 insertions(+), 8 deletions(-)

I see the series is delegated to the main repo (Thomas).

This touches only Intel drivers and the code deduplication effort you started may conflict (though trivially) with such changes depending on when it lands.

Quoted 7 lines

Would you mind merging this fixes from Andre through the next-net-intel tree, right now?
If so, please mark it as delegated to you in patchwork.

Thanks!

Hi David,

the code deduplication effort patchsets are similarly delegated to the main repo. I was assuming this was deliberate, but perhaps it isn't? I'm ok to take these patches in next-net-intel, but just would like to confirm that neither you, Thomas or Stephen (as net maintainer) want to review the dedup work ahead of that initial merge?

/Bruce

#12 lore raw
Quoted 39 lines · Bruce Richardson
Quoted 37 lines · David Marchand

Hello Bruce,

Quoted 15 lines · Andre Muezerie

v2:
* Updated commit messages to follow standard format.

This patch avoids warnings like the one below emitted by MSVC, and is needed to get the code to compile cleanly with MSVC.

../drivers/common/idpf/idpf_common_rxtx_avx512.c(139):
warning C4098: 'idpf_singleq_rearm':
'void' function returning a value

Andre Muezerie (2):
drivers/common: fix void function returning a value drivers/net: fix void function returning a value

Quoted 6 lines
 drivers/common/idpf/idpf_common_rxtx_avx512.c | 12 ++++++++----
 drivers/net/i40e/i40e_rxtx_vec_avx2.c         |  2 +-
 drivers/net/i40e/i40e_rxtx_vec_avx512.c       |  2 +-
 drivers/net/iavf/iavf_rxtx_vec_avx2.c         |  2 +-
 drivers/net/ice/ice_rxtx_vec_avx2.c           |  2 +-
 5 files changed, 12 insertions(+), 8 deletions(-)

I see the series is delegated to the main repo (Thomas).

This touches only Intel drivers and the code deduplication effort you started may conflict (though trivially) with such changes depending on when it lands.

Would you mind merging this fixes from Andre through the next-net-intel tree, right now?
If so, please mark it as delegated to you in patchwork.

Quoted 6 lines
Quoted 2 lines

Thanks!

Hi David,

the code deduplication effort patchsets are similarly delegated to the main repo. I was assuming this was deliberate, but perhaps it isn't? I'm ok to

I suspect it was delegated to main because of the change on devtools/check-git-log.sh.
But it is really only about net driver changes, so it should go either through your or Stephen tree.
(we have enough patches waiting in main ;-))

Quoted 3 lines

take these patches in next-net-intel, but just would like to confirm that neither you, Thomas or Stephen (as net maintainer) want to review the dedup work ahead of that initial merge?

I don't have an objection on this series (on the contrary, I am quite happy to see such effort).
I'll have a deeper look at it, this afternoon.

Signature · 1 line
David Marchand
#13 lore raw
Quoted 45 lines · David Marchand
Quoted 43 lines · Bruce Richardson
Quoted 32 lines · David Marchand

Hello Bruce,

Quoted 15 lines · Andre Muezerie

v2:
* Updated commit messages to follow standard format.

This patch avoids warnings like the one below emitted by MSVC, and is needed to get the code to compile cleanly with MSVC.

../drivers/common/idpf/idpf_common_rxtx_avx512.c(139):
warning C4098: 'idpf_singleq_rearm':
'void' function returning a value

Andre Muezerie (2):
drivers/common: fix void function returning a value drivers/net: fix void function returning a value

Quoted 6 lines
 drivers/common/idpf/idpf_common_rxtx_avx512.c | 12 ++++++++----
 drivers/net/i40e/i40e_rxtx_vec_avx2.c         |  2 +-
 drivers/net/i40e/i40e_rxtx_vec_avx512.c       |  2 +-
 drivers/net/iavf/iavf_rxtx_vec_avx2.c         |  2 +-
 drivers/net/ice/ice_rxtx_vec_avx2.c           |  2 +-
 5 files changed, 12 insertions(+), 8 deletions(-)

I see the series is delegated to the main repo (Thomas).

This touches only Intel drivers and the code deduplication effort you started may conflict (though trivially) with such changes depending on when it lands.

Quoted 7 lines

Would you mind merging this fixes from Andre through the next-net-intel tree, right now?
If so, please mark it as delegated to you in patchwork.

Thanks!

Hi David,

Quoted 9 lines
Quoted 2 lines

the code deduplication effort patchsets are similarly delegated to the main repo. I was assuming this was deliberate, but perhaps it isn't? I'm ok to

I suspect it was delegated to main because of the change on devtools/check-git-log.sh.
But it is really only about net driver changes, so it should go either through your or Stephen tree.
(we have enough patches waiting in main ;-))

I'm ok to take it in my tree, unless Stephen would rather in his tree.

Quoted 9 lines
Quoted 4 lines

take these patches in next-net-intel, but just would like to confirm that neither you, Thomas or Stephen (as net maintainer) want to review the dedup work ahead of that initial merge?

I don't have an objection on this series (on the contrary, I am quite happy to see such effort).
I'll have a deeper look at it, this afternoon.

Thanks.

I'm having it[1] reviewed internally, but I'd appreciate even a cursory review, especially at the new directory layout and build implications, from the higher-level directory maintainers.

/Bruce

[1] https://patches.dpdk.org/project/dpdk/list/?series=34398