net/ice: fix gcc error with -DRTE_LIBRTE_ICE_16BYTE_RX_DESC
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
--- drivers/net/ice/ice_rxtx.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ice/ice_rxtx.c +4 -0
@@ -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
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_DESCgcc will report error "unused parameter 'rxq'" when the macro
RTE_LIBRTE_ICE_16BYTE_RX_DESCis defined. use "(void)rxq" to avoid itFixes 7a340b0b4e03 ("net/ice: refactor Rx FlexiMD handling")Signed-off-by Yiding Zhou <[email protected]>--- drivers/net/ice/ice_rxtx.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/ice/ice_rxtx.c +2
-0@@ -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
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_DESCgcc will report error "unused parameter 'rxq'" when the macro
RTE_LIBRTE_ICE_16BYTE_RX_DESCis defined. use "(void)rxq" to avoid itFixes 7a340b0b4e03 ("net/ice: refactor Rx FlexiMD handling")Signed-off-by Yiding Zhou <[email protected]>--- drivers/net/ice/ice_rxtx.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/ice/ice_rxtx.c +2
-0@@ -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_unusedstructice_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
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_DESCQuoted 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_DESCgcc will report error "unused parameter 'rxq'" when the macro
RTE_LIBRTE_ICE_16BYTE_RX_DESCis defined. use "(void)rxq" to avoid itFixes 7a340b0b4e03 ("net/ice: refactor Rx FlexiMD handling")Signed-off-by Yiding Zhou <[email protected]>--- 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@@ -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_unusedstructice_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
Ling, WeiX
Tested-byQuoted 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_DESCQuoted 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_DESCQuoted 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_DESCgcc will report error "unused parameter 'rxq'" when the macro
RTE_LIBRTE_ICE_16BYTE_RX_DESCis defined. use "(void)rxq" to avoid itFixes 7a340b0b4e03 ("net/ice: refactor Rx FlexiMD handling")Signed-off-by Yiding Zhou <[email protected]>---
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_DESCQuoted 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_DESCQuoted 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_DESCQuoted 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_DESCgcc will report error "unused parameter 'rxq'" when the macro
RTE_LIBRTE_ICE_16BYTE_RX_DESCis 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")Signed-off-by Yiding Zhou <[email protected]>---
Tested-by Wei Ling <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi
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_DESCQuoted 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_DESCQuoted 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_DESCQuoted 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_DESCgcc will report error "unused parameter 'rxq'" when the macro
RTE_LIBRTE_ICE_16BYTE_RX_DESCis defined. use "(void)rxq" to avoid itFixes 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
Signed-off-by Yiding Zhou <[email protected]>---
Tested-by Wei Ling <[email protected]>Acked-by Qi Zhang <[email protected]>Applied to dpdk-next-net-intel.
Hi Qi,
Just to confirm, there is a v2 of this patch, which version is merged?
PATCH v2 1/1 net/ice: fix gcc error with -DRTE_LIBRTE_ICE_16BYTE_RX_DESC
In reply to Yiding Zhougcc will report error "unused parameter 'rxq'" when the macro RTE_LIBRTE_ICE_16BYTE_RX_DESC is defined. use RTE_SET_USED to avoid it
--- drivers/net/ice/ice_rxtx.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ice/ice_rxtx.c +4 -0
@@ -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
Quoted 7 lines
-----Original Message-----
From: Yiding Zhou <[email protected]>
Sent: Tuesday, February 8, 2022 11:42 PM
To: Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: Zhou, YidingX <[email protected]>; [email protected]
Subject: [PATCH v2] net/ice: fix gcc error with -