From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 93CD9A034F; Mon, 7 Feb 2022 14:46:15 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 35CA2410F3; Mon, 7 Feb 2022 14:46:15 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id B4A06410EA for ; Mon, 7 Feb 2022 14:46:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644241573; x=1675777573; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=H0pwFoALB2esojfQ/KEXprr1Q08GLwaGnsB08Snn2nk=; b=Z4nb0Rhoe05Oe5vAnz0FiuPZJW2IXrgeuJrbodfUF0Pno714oi6QyQrD JnzW7Ys2mKoN4t7nIJ+ItS91hJgtcScWJMDJW5QiHC5YVV0+oVUAcMkqU DTkYS2ByX2KKsYW51POfCpdRjHxfOp6+RvrQW2nwo9UFSEdJrVFJjsHDz dl1QDSOnWbFKCkm/KI77YA32C+1tqDuu+nTS1hFcQL18D5j4zVDzo1x0t ZcusIyHKILAE2pv69j+jhpMZXE0cKtcXc2c4AdTFs3Lor9Xsnc19CEqFn AFfPAGS0XWX4CWOuS+tqnfSrU5nzVdaPryWCkjvRm9LVwEnAg6ogGve3K Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10250"; a="309459260" X-IronPort-AV: E=Sophos;i="5.88,349,1635231600"; d="scan'208";a="309459260" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Feb 2022 05:46:12 -0800 X-IronPort-AV: E=Sophos;i="5.88,349,1635231600"; d="scan'208";a="540103524" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.10.89]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 07 Feb 2022 05:46:11 -0800 Date: Mon, 7 Feb 2022 13:46:07 +0000 From: Bruce Richardson To: "Wang, Haiyue" Cc: "Zhou, YidingX" , "Yang, Qiming" , "Zhang, Qi Z" , "dev@dpdk.org" Subject: Re: [PATCH] net/ice: fix gcc error with -DRTE_LIBRTE_ICE_16BYTE_RX_DESC Message-ID: References: <20220207164801.2768734-1-yidingx.zhou@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, Feb 07, 2022 at 01:14:18PM +0000, Wang, Haiyue wrote: > > -----Original Message----- > > From: Yiding Zhou > > Sent: Tuesday, February 8, 2022 00:48 > > To: Yang, Qiming ; Zhang, Qi Z > > Cc: dev@dpdk.org > > 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") > > Cc: stable@dpdk.org > > > > Signed-off-by: Yiding Zhou > > --- > > drivers/net/ice/ice_rxtx.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c > > index 58700f1b92..97572d5952 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 > > + (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 > > } > > > > " __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