From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 903F0A051A; Fri, 17 Jan 2020 03:21:38 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 75F491D517; Fri, 17 Jan 2020 03:21:37 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id DA29F1D50E for ; Fri, 17 Jan 2020 03:21:35 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jan 2020 18:21:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,327,1574150400"; d="scan'208";a="373523481" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga004.jf.intel.com with ESMTP; 16 Jan 2020 18:21:34 -0800 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 16 Jan 2020 18:21:33 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.30]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.89]) with mapi id 14.03.0439.000; Fri, 17 Jan 2020 10:21:31 +0800 From: "Yang, Qiming" To: "Ye, Xiaolong" , "Lu, Wenzhuo" CC: "dev@dpdk.org" , "Yigit, Ferruh" , "Di, ChenxuX" Thread-Topic: [PATCH] net/ice: cleanup for vec path check Thread-Index: AQHVzDv4xYrZVwm9vk2ib/9HtB14IafuISKg Date: Fri, 17 Jan 2020 02:21:31 +0000 Message-ID: References: <767c28a2f74b414580a46aec1f4443d8@intel.com> <20200116070948.108027-1-xiaolong.ye@intel.com> In-Reply-To: <20200116070948.108027-1-xiaolong.ye@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYmEzM2E2ODYtMWNmOC00ZmEyLWFjOGEtOWIwNWE3NDNiZTI0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoic0x2ckxHUkZkYVhhZWZUeEZvSFpPbjRiOHZxMlc5eDdrbHorVHVBdUo4YjJcL1pVb0ozcTU0VkJcL2N6emlqOUZTIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/ice: cleanup for vec path check X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Ye, Xiaolong > Sent: Thursday, January 16, 2020 3:10 PM > To: Yang, Qiming ; Lu, Wenzhuo > > Cc: dev@dpdk.org; Yigit, Ferruh ; Di, ChenxuX > ; Ye, Xiaolong > Subject: [PATCH] net/ice: cleanup for vec path check >=20 > Move the conditional compilation block to the inner check helper, so we c= an > reduce the number of multiple ifdef check pairs used. >=20 > Signed-off-by: Xiaolong Ye Acked-by: Qiming Yang > --- > drivers/net/ice/ice_rxtx.c | 9 --------- > drivers/net/ice/ice_rxtx_vec_common.h | 8 ++++++++ > 2 files changed, 8 insertions(+), 9 deletions(-) >=20 > diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c inde= x > 71adba809..8feeeb828 100644 > --- a/drivers/net/ice/ice_rxtx.c > +++ b/drivers/net/ice/ice_rxtx.c > @@ -2753,14 +2753,12 @@ ice_tx_done_cleanup_full(struct ice_tx_queue *txq= , > return (int)pkt_cnt; > } >=20 > -#ifdef RTE_ARCH_X86 > static int > ice_tx_done_cleanup_vec(struct ice_tx_queue *txq __rte_unused, > uint32_t free_cnt __rte_unused) > { > return -ENOTSUP; > } > -#endif >=20 > static int > ice_tx_done_cleanup_simple(struct ice_tx_queue *txq, @@ -2794,10 +2792,8 > @@ ice_tx_done_cleanup(void *txq, uint32_t free_cnt) > struct ice_adapter *ad =3D > ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); >=20 > -#ifdef RTE_ARCH_X86 > if (ad->tx_vec_allowed) > return ice_tx_done_cleanup_vec(q, free_cnt); -#endif > if (ad->tx_simple_allowed) > return ice_tx_done_cleanup_simple(q, free_cnt); > else > @@ -2953,7 +2949,6 @@ ice_set_rx_function(struct rte_eth_dev *dev) > PMD_INIT_FUNC_TRACE(); > struct ice_adapter *ad =3D > ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); > -#ifdef RTE_ARCH_X86 > struct ice_rx_queue *rxq; > int i; > bool use_avx2 =3D false; > @@ -2998,8 +2993,6 @@ ice_set_rx_function(struct rte_eth_dev *dev) > return; > } >=20 > -#endif > - > if (dev->data->scattered_rx) { > /* Set the non-LRO scattered function */ > PMD_INIT_LOG(DEBUG, > @@ -3131,7 +3124,6 @@ ice_set_tx_function(struct rte_eth_dev *dev) { > struct ice_adapter *ad =3D > ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); > -#ifdef RTE_ARCH_X86 > struct ice_tx_queue *txq; > int i; > bool use_avx2 =3D false; > @@ -3167,7 +3159,6 @@ ice_set_tx_function(struct rte_eth_dev *dev) >=20 > return; > } > -#endif >=20 > if (ad->tx_simple_allowed) { > PMD_INIT_LOG(DEBUG, "Simple tx finally be used."); diff --git > a/drivers/net/ice/ice_rxtx_vec_common.h > b/drivers/net/ice/ice_rxtx_vec_common.h > index 6b57ff2ae..223aac878 100644 > --- a/drivers/net/ice/ice_rxtx_vec_common.h > +++ b/drivers/net/ice/ice_rxtx_vec_common.h > @@ -267,6 +267,7 @@ ice_tx_vec_queue_default(struct ice_tx_queue *txq) > static inline int ice_rx_vec_dev_check_default(struct rte_eth_dev *dev) = { > +#ifdef RTE_ARCH_X86 > int i; > struct ice_rx_queue *rxq; > struct ice_adapter *ad =3D > @@ -283,11 +284,15 @@ ice_rx_vec_dev_check_default(struct rte_eth_dev > *dev) > } >=20 > return 0; > +#else > + return -1; > +#endif > } >=20 > static inline int > ice_tx_vec_dev_check_default(struct rte_eth_dev *dev) { > +#ifdef RTE_ARCH_X86 > int i; > struct ice_tx_queue *txq; >=20 > @@ -298,6 +303,9 @@ ice_tx_vec_dev_check_default(struct rte_eth_dev *dev) > } >=20 > return 0; > +#else > + return -1; > +#endif > } >=20 > #endif > -- > 2.17.1