Skip to contentSkip to conversation

net/ice: fix gcc error with -DRTE_LIBRTE_ICE_16BYTE_RX_DESC

PATCH Applied Yiding Zhou 6 participants 9 messages Feb 7, 2022 – Feb 10, 2022 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/ice: fix gcc error with -DRTE_LIBRTE_ICE_16BYTE_RX_DESC

gcc will report error "unused parameter 'rxq'" when the macro RTE_LIBRTE_ICE_16BYTE_RX_DESC is defined. use "(void)rxq" to avoid it

Fixes 7a340b0b4e03 ("net/ice: refactor Rx FlexiMD handling")
---
 drivers/net/ice/ice_rxtx.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/ice/ice_rxtx.c +4 -0
index 58700f1b92..97572d5952 100644
@@ -163,6 +163,8 @@ ice_rxd_to_pkt_fields_by_comms_aux_v1(struct ice_rx_queue *rxq,
 			*RTE_NET_ICE_DYNF_PROTO_XTR_METADATA(mb) = metadata;
 		}
 	}
+#else
+	(void)rxq;
 #endif
 }
 
@@ -201,6 +203,8 @@ ice_rxd_to_pkt_fields_by_comms_aux_v2(struct ice_rx_queue *rxq,
 			*RTE_NET_ICE_DYNF_PROTO_XTR_METADATA(mb) = metadata;
 		}
 	}
+#else
+	(void)rxq;
 #endif
 }
 
Signature · 1 line
2.25.1
#1 lore raw
Quoted 32 lines

-----Original Message-----
From: Yiding Zhou <[email protected]>
Sent: Tuesday, February 8, 2022 00:48
To: Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]
Subject: [PATCH] net/ice: fix gcc error with -DRTE_LIBRTE_ICE_16BYTE_RX_DESC

gcc will report error "unused parameter 'rxq'" when the macro RTE_LIBRTE_ICE_16BYTE_RX_DESC is defined. use "(void)rxq" to avoid it

Fixes 7a340b0b4e03 ("net/ice: refactor Rx FlexiMD handling")
---
 drivers/net/ice/ice_rxtx.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/ice/ice_rxtx.c +2 -0
index 58700f1b92..97572d5952 100644
@@ -163,6 +163,8 @@ ice_rxd_to_pkt_fields_by_comms_aux_v1(struct ice_rx_queue *rxq,
 			*RTE_NET_ICE_DYNF_PROTO_XTR_METADATA(mb) = metadata;
 		}
 	}
+#else
+	(void)rxq;
 #endif
 }
 

drivers/net/ice/ice_rxtx.c ice_rxd_to_pkt_fields_by_comms_aux_v2(struct ice_rx_queue *rxq, · line 210

Quoted 8 lines
drivers/net/ice/ice_rxtx.c +2 -0
@@ -201,6 +203,8 @@ ice_rxd_to_pkt_fields_by_comms_aux_v2(struct ice_rx_queue *rxq,
 			*RTE_NET_ICE_DYNF_PROTO_XTR_METADATA(mb) = metadata;
 		}
 	}
+#else
+	(void)rxq;
 #endif
 }
 

" __rte_unused struct ice_rx_queue *rxq" could make the fix clean.

Quoted 2 lines

--
2.25.1

#2 lore raw
Quoted 31 lines · Haiyue
Quoted 31 lines

-----Original Message-----
From: Yiding Zhou <[email protected]>
Sent: Tuesday, February 8, 2022 00:48
To: Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]
Subject: [PATCH] net/ice: fix gcc error with -DRTE_LIBRTE_ICE_16BYTE_RX_DESC

gcc will report error "unused parameter 'rxq'" when the macro RTE_LIBRTE_ICE_16BYTE_RX_DESC is defined. use "(void)rxq" to avoid it

Fixes 7a340b0b4e03 ("net/ice: refactor Rx FlexiMD handling")
---
 drivers/net/ice/ice_rxtx.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/ice/ice_rxtx.c +2 -0
index 58700f1b92..97572d5952 100644
@@ -163,6 +163,8 @@ ice_rxd_to_pkt_fields_by_comms_aux_v1(struct ice_rx_queue *rxq,
 			*RTE_NET_ICE_DYNF_PROTO_XTR_METADATA(mb) = metadata;
 		}
 	}
+#else
+	(void)rxq;
 #endif
 }
 
Quoted 12 lines

drivers/net/ice/ice_rxtx.c ice_rxd_to_pkt_fields_by_comms_aux_v2(struct ice_rx_queue *rxq, · line 210

Quoted 9 lines
drivers/net/ice/ice_rxtx.c +2 -0
@@ -201,6 +203,8 @@ ice_rxd_to_pkt_fields_by_comms_aux_v2(struct ice_rx_queue *rxq,
 			*RTE_NET_ICE_DYNF_PROTO_XTR_METADATA(mb) = metadata;
 		}
 	}
+#else
+	(void)rxq;
 #endif
 }
 

" __rte_unused struct ice_rx_queue *rxq" could make the fix clean.

+1

Or alternatively put in "RTE_SET_USED" macro after the endif. It doesn't generate any instructions so doesn't need a #else clause.

/Bruce

#3 lore raw
Quoted 64 lines

-----Original Message-----
From: Richardson, Bruce <[email protected]>
Sent: Monday, February 7, 2022 9:46 PM
To: Wang, Haiyue <[email protected]>
Cc: Zhou, YidingX <[email protected]>; Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>; [email protected]
Subject: Re: [PATCH] net/ice: fix gcc error with - DRTE_LIBRTE_ICE_16BYTE_RX_DESC

Quoted 21 lines · Haiyue
Quoted 21 lines

-----Original Message-----
From: Yiding Zhou <[email protected]>
Sent: Tuesday, February 8, 2022 00:48
To: Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]
Subject: [PATCH] net/ice: fix gcc error with -DRTE_LIBRTE_ICE_16BYTE_RX_DESC

gcc will report error "unused parameter 'rxq'" when the macro RTE_LIBRTE_ICE_16BYTE_RX_DESC is defined. use "(void)rxq" to avoid it

Fixes 7a340b0b4e03 ("net/ice: refactor Rx FlexiMD handling")
---
 drivers/net/ice/ice_rxtx.c | 4 ++++
 1 file changed, 4 insertions(+)
Quoted 5 lines

drivers/net/ice/ice_rxtx.c ice_rxd_to_pkt_fields_by_comms_aux_v1(struct

Quoted 5 lines
drivers/net/ice/ice_rxtx.c +0 -0
index 58700f1b92..97572d5952 100644
@@ -163,6 +163,8 @@ ice_rxd_to_pkt_fields_by_comms_aux_v1(struct

ice_rx_queue *rxq,

Quoted 1 line

drivers/net/ice/ice_rxtx.c ice_rxd_to_pkt_fields_by_comms_aux_v1(struct · line 163

Quoted 1 line
drivers/net/ice/ice_rxtx.c +0 -0
 			*RTE_NET_ICE_DYNF_PROTO_XTR_METADATA(mb)

= metadata;

Quoted 8 lines

drivers/net/ice/ice_rxtx.c ice_rxd_to_pkt_fields_by_comms_aux_v2(struct

Quoted 8 lines
drivers/net/ice/ice_rxtx.c +2 -0
 		}
 	}
+#else
+	(void)rxq;
 #endif
 }
 
@@ -201,6 +203,8 @@ ice_rxd_to_pkt_fields_by_comms_aux_v2(struct

ice_rx_queue *rxq,

Quoted 1 line

drivers/net/ice/ice_rxtx.c ice_rxd_to_pkt_fields_by_comms_aux_v2(struct · line 203

Quoted 1 line
drivers/net/ice/ice_rxtx.c +0 -0
 			*RTE_NET_ICE_DYNF_PROTO_XTR_METADATA(mb)

= metadata;

Quoted 10 lines

drivers/net/ice/ice_rxtx.c ice_rxd_to_pkt_fields_by_comms_aux_v1(struct ice_rx_queue *rxq, · line 170

Quoted 7 lines
drivers/net/ice/ice_rxtx.c +2 -0
 		}
 	}
+#else
+	(void)rxq;
 #endif
 }
 

" __rte_unused struct ice_rx_queue *rxq" could make the fix clean.

Quoted 5 lines

+1

Or alternatively put in "RTE_SET_USED" macro after the endif. It doesn't generate any instructions so doesn't need a #else clause.

Thanks for your advice. Using RTE_SET_USED macro is better.

Quoted 1 line

/Bruce

Tested-by
#4 lore raw
Quoted 41 lines

-----Original Message-----
From: Zhou, YidingX <[email protected]>
Sent: Tuesday, February 8, 2022 1:35 PM
To: Richardson, Bruce <[email protected]>; Wang, Haiyue <[email protected]>
Cc: Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>; [email protected]
Subject: RE: [PATCH] net/ice: fix gcc error with - DRTE_LIBRTE_ICE_16BYTE_RX_DESC

Quoted 29 lines

-----Original Message-----
From: Richardson, Bruce <[email protected]>
Sent: Monday, February 7, 2022 9:46 PM
To: Wang, Haiyue <[email protected]>
Cc: Zhou, YidingX <[email protected]>; Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>; [email protected]
Subject: Re: [PATCH] net/ice: fix gcc error with - DRTE_LIBRTE_ICE_16BYTE_RX_DESC

Quoted 18 lines · Haiyue
Quoted 18 lines

-----Original Message-----
From: Yiding Zhou <[email protected]>
Sent: Tuesday, February 8, 2022 00:48
To: Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]
Subject: [PATCH] net/ice: fix gcc error with -DRTE_LIBRTE_ICE_16BYTE_RX_DESC

gcc will report error "unused parameter 'rxq'" when the macro RTE_LIBRTE_ICE_16BYTE_RX_DESC is defined. use "(void)rxq" to avoid it

Fixes 7a340b0b4e03 ("net/ice: refactor Rx FlexiMD handling")

---

Acked-by Applied
#5 lore raw
Quoted 48 lines

-----Original Message-----
From: Ling, WeiX <[email protected]>
Sent: Thursday, February 10, 2022 11:09 AM
To: Zhou, YidingX <[email protected]>; Richardson, Bruce <[email protected]>; Wang, Haiyue <[email protected]>
Cc: Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>; [email protected]
Subject: RE: [PATCH] net/ice: fix gcc error with - DRTE_LIBRTE_ICE_16BYTE_RX_DESC

Quoted 36 lines

-----Original Message-----
From: Zhou, YidingX <[email protected]>
Sent: Tuesday, February 8, 2022 1:35 PM
To: Richardson, Bruce <[email protected]>; Wang, Haiyue <[email protected]>
Cc: Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>; [email protected]
Subject: RE: [PATCH] net/ice: fix gcc error with - DRTE_LIBRTE_ICE_16BYTE_RX_DESC

Quoted 24 lines

-----Original Message-----
From: Richardson, Bruce <[email protected]>
Sent: Monday, February 7, 2022 9:46 PM
To: Wang, Haiyue <[email protected]>
Cc: Zhou, YidingX <[email protected]>; Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>; [email protected]
Subject: Re: [PATCH] net/ice: fix gcc error with - DRTE_LIBRTE_ICE_16BYTE_RX_DESC

Quoted 13 lines · Haiyue
Quoted 13 lines

-----Original Message-----
From: Yiding Zhou <[email protected]>
Sent: Tuesday, February 8, 2022 00:48
To: Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]
Subject: [PATCH] net/ice: fix gcc error with -DRTE_LIBRTE_ICE_16BYTE_RX_DESC

gcc will report error "unused parameter 'rxq'" when the macro RTE_LIBRTE_ICE_16BYTE_RX_DESC is defined. use "(void)rxq" to avoid it

Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Fixes 7a340b0b4e03 ("net/ice: refactor Rx FlexiMD handling")

---

Applied to dpdk-next-net-intel.

Thanks
Qi

#6 lore raw
Quoted 51 lines · Qi Z
Quoted 51 lines

-----Original Message-----
From: Ling, WeiX <[email protected]>
Sent: Thursday, February 10, 2022 11:09 AM
To: Zhou, YidingX <[email protected]>; Richardson, Bruce <[email protected]>; Wang, Haiyue <[email protected]>
Cc: Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>; [email protected]
Subject: RE: [PATCH] net/ice: fix gcc error with - DRTE_LIBRTE_ICE_16BYTE_RX_DESC

Quoted 39 lines

-----Original Message-----
From: Zhou, YidingX <[email protected]>
Sent: Tuesday, February 8, 2022 1:35 PM
To: Richardson, Bruce <[email protected]>; Wang, Haiyue <[email protected]>
Cc: Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>; [email protected]
Subject: RE: [PATCH] net/ice: fix gcc error with - DRTE_LIBRTE_ICE_16BYTE_RX_DESC

Quoted 27 lines

-----Original Message-----
From: Richardson, Bruce <[email protected]>
Sent: Monday, February 7, 2022 9:46 PM
To: Wang, Haiyue <[email protected]>
Cc: Zhou, YidingX <[email protected]>; Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>; [email protected]
Subject: Re: [PATCH] net/ice: fix gcc error with - DRTE_LIBRTE_ICE_16BYTE_RX_DESC

Quoted 16 lines · Haiyue
Quoted 16 lines

-----Original Message-----
From: Yiding Zhou <[email protected]>
Sent: Tuesday, February 8, 2022 00:48
To: Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]
Subject: [PATCH] net/ice: fix gcc error with -DRTE_LIBRTE_ICE_16BYTE_RX_DESC

gcc will report error "unused parameter 'rxq'" when the macro RTE_LIBRTE_ICE_16BYTE_RX_DESC is defined. use "(void)rxq" to avoid it

Fixes 7a340b0b4e03 ("net/ice: refactor Rx FlexiMD handling")
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

---

Applied to dpdk-next-net-intel.

Hi Qi,

Just to confirm, there is a v2 of this patch, which version is merged?

#7 lore raw

PATCH v2 1/1 net/ice: fix gcc error with -DRTE_LIBRTE_ICE_16BYTE_RX_DESC

In reply to Yiding Zhou

gcc will report error "unused parameter 'rxq'" when the macro RTE_LIBRTE_ICE_16BYTE_RX_DESC is defined. use RTE_SET_USED to avoid it

Fixes 7a340b0b4e03 ("net/ice: refactor Rx FlexiMD handling")
---
 drivers/net/ice/ice_rxtx.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/ice/ice_rxtx.c +4 -0
index 58700f1b92..4f218bcd0d 100644
@@ -163,6 +163,8 @@ ice_rxd_to_pkt_fields_by_comms_aux_v1(struct ice_rx_queue *rxq,
 			*RTE_NET_ICE_DYNF_PROTO_XTR_METADATA(mb) = metadata;
 		}
 	}
+#else
+	RTE_SET_USED(rxq);
 #endif
 }
 
@@ -201,6 +203,8 @@ ice_rxd_to_pkt_fields_by_comms_aux_v2(struct ice_rx_queue *rxq,
 			*RTE_NET_ICE_DYNF_PROTO_XTR_METADATA(mb) = metadata;
 		}
 	}
+#else
+	RTE_SET_USED(rxq);
 #endif
 }
 
Signature · 1 line
2.25.1