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 31BA2A00D7; Thu, 31 Oct 2019 18:18:36 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A610D1D164; Thu, 31 Oct 2019 18:18:31 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 66B081D14E for ; Thu, 31 Oct 2019 18:18:27 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Oct 2019 10:18:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,252,1569308400"; d="scan'208";a="199586015" Received: from npg-dpdk-haiyue-1.sh.intel.com ([10.67.119.213]) by fmsmga007.fm.intel.com with ESMTP; 31 Oct 2019 10:18:25 -0700 From: Haiyue Wang To: dev@dpdk.org, thomas@monjalon.net, arybchenko@solarflare.com, ferruh.yigit@intel.com, jerinjacobk@gmail.com, xiaolong.ye@intel.com, ray.kinsella@intel.com, chenmin.sun@intel.com Cc: Haiyue Wang Date: Fri, 1 Nov 2019 01:11:38 +0800 Message-Id: <20191031171139.105110-2-haiyue.wang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191031171139.105110-1-haiyue.wang@intel.com> References: <20191031171139.105110-1-haiyue.wang@intel.com> Subject: [dpdk-dev] [PATCH v1 2/3] net/i40e: remove the specific burst mode bit set 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" Just keep the vectorization related burst mode bit set, others are not so generic. Signed-off-by: Haiyue Wang --- drivers/net/i40e/i40e_rxtx.c | 37 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index 6a66cec20..9a2d0045c 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -3024,34 +3024,24 @@ i40e_rx_burst_mode_get(struct rte_eth_dev *dev, __rte_unused uint16_t queue_id, eth_rx_burst_t pkt_burst = dev->rx_pkt_burst; uint64_t options; - if (pkt_burst == i40e_recv_scattered_pkts) - options = RTE_ETH_BURST_SCALAR | RTE_ETH_BURST_SCATTERED; - else if (pkt_burst == i40e_recv_pkts_bulk_alloc) - options = RTE_ETH_BURST_SCALAR | RTE_ETH_BURST_BULK_ALLOC; - else if (pkt_burst == i40e_recv_pkts) + if (pkt_burst == i40e_recv_scattered_pkts || + pkt_burst == i40e_recv_pkts_bulk_alloc || + pkt_burst == i40e_recv_pkts) options = RTE_ETH_BURST_SCALAR; #ifdef RTE_ARCH_X86 - else if (pkt_burst == i40e_recv_scattered_pkts_vec_avx2) - options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_AVX2 | - RTE_ETH_BURST_SCATTERED; - else if (pkt_burst == i40e_recv_pkts_vec_avx2) + else if (pkt_burst == i40e_recv_scattered_pkts_vec_avx2 || + pkt_burst == i40e_recv_pkts_vec_avx2) options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_AVX2; - else if (pkt_burst == i40e_recv_scattered_pkts_vec) - options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_SSE | - RTE_ETH_BURST_SCATTERED; - else if (pkt_burst == i40e_recv_pkts_vec) + else if (pkt_burst == i40e_recv_scattered_pkts_vec || + pkt_burst == i40e_recv_pkts_vec) options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_SSE; #elif defined(RTE_ARCH_ARM64) - else if (pkt_burst == i40e_recv_scattered_pkts_vec) - options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_NEON | - RTE_ETH_BURST_SCATTERED; - else if (pkt_burst == i40e_recv_pkts_vec) + else if (pkt_burst == i40e_recv_scattered_pkts_vec || + pkt_burst == i40e_recv_pkts_vec) options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_NEON; #elif defined(RTE_ARCH_PPC_64) - else if (pkt_burst == i40e_recv_scattered_pkts_vec) - options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_ALTIVEC | - RTE_ETH_BURST_SCATTERED; - else if (pkt_burst == i40e_recv_pkts_vec) + else if (pkt_burst == i40e_recv_scattered_pkts_vec || + pkt_burst == i40e_recv_pkts_vec) options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_ALTIVEC; #endif else @@ -3162,9 +3152,8 @@ i40e_tx_burst_mode_get(struct rte_eth_dev *dev, __rte_unused uint16_t queue_id, eth_tx_burst_t pkt_burst = dev->tx_pkt_burst; uint64_t options; - if (pkt_burst == i40e_xmit_pkts_simple) - options = RTE_ETH_BURST_SCALAR | RTE_ETH_BURST_SIMPLE; - else if (pkt_burst == i40e_xmit_pkts) + if (pkt_burst == i40e_xmit_pkts_simple || + pkt_burst == i40e_xmit_pkts) options = RTE_ETH_BURST_SCALAR; #ifdef RTE_ARCH_X86 else if (pkt_burst == i40e_xmit_pkts_vec_avx2) -- 2.17.1