[v2] net/ice: fix gcc error with -DRTE_LIBRTE_ICE_16BYTE_RX_DESC

Message ID 20220208154219.266278-1-yidingx.zhou@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series [v2] net/ice: fix gcc error with -DRTE_LIBRTE_ICE_16BYTE_RX_DESC |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/github-robot: build success github build: passed
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-x86_64-unit-testing fail Testing issues

Commit Message

Yiding Zhou Feb. 8, 2022, 3:42 p.m. UTC
  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")
Cc: stable@dpdk.org

Signed-off-by: Yiding Zhou <yidingx.zhou@intel.com>
---
 drivers/net/ice/ice_rxtx.c | 4 ++++
 1 file changed, 4 insertions(+)
  

Comments

Ling, WeiX Feb. 10, 2022, 2:36 a.m. UTC | #1
> -----Original Message-----
> From: Yiding Zhou <yidingx.zhou@intel.com>
> Sent: Tuesday, February 8, 2022 11:42 PM
> To: Yang, Qiming <qiming.yang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>
> Cc: Zhou, YidingX <yidingx.zhou@intel.com>; dev@dpdk.org
> Subject: [PATCH v2] net/ice: fix gcc error with -

Tested-by: Wei Ling <weix.ling@intel.com>
  

Patch

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 58700f1b92..4f218bcd0d 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -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
 }