[v1,1/3] net/ice: remove the specific burst mode bit set

Message ID 20191031171139.105110-1-haiyue.wang@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series [v1,1/3] net/ice: remove the specific burst mode bit set |

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-compilation success Compile Testing PASS
ci/iol-mellanox-Performance fail Performance Testing issues
ci/checkpatch success coding style OK

Commit Message

Wang, Haiyue Oct. 31, 2019, 5:11 p.m. UTC
  Just keep the vectorization related burst mode bit set, others are not
so generic.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/ice/ice_rxtx.c | 24 ++++++++----------------
 1 file changed, 8 insertions(+), 16 deletions(-)
  

Patch

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 8d4820d3c..65e50a713 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2800,22 +2800,16 @@  ice_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 == ice_recv_scattered_pkts)
-		options = RTE_ETH_BURST_SCALAR | RTE_ETH_BURST_SCATTERED;
-	else if (pkt_burst == ice_recv_pkts_bulk_alloc)
-		options = RTE_ETH_BURST_SCALAR | RTE_ETH_BURST_BULK_ALLOC;
-	else if (pkt_burst == ice_recv_pkts)
+	if (pkt_burst == ice_recv_scattered_pkts ||
+	    pkt_burst == ice_recv_pkts_bulk_alloc ||
+	    pkt_burst == ice_recv_pkts)
 		options = RTE_ETH_BURST_SCALAR;
 #ifdef RTE_ARCH_X86
-	else if (pkt_burst == ice_recv_scattered_pkts_vec_avx2)
-		options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_AVX2 |
-			  RTE_ETH_BURST_SCATTERED;
-	else if (pkt_burst == ice_recv_pkts_vec_avx2)
+	else if (pkt_burst == ice_recv_scattered_pkts_vec_avx2 ||
+		 pkt_burst == ice_recv_pkts_vec_avx2)
 		options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_AVX2;
-	else if (pkt_burst == ice_recv_scattered_pkts_vec)
-		options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_SSE |
-			  RTE_ETH_BURST_SCATTERED;
-	else if (pkt_burst == ice_recv_pkts_vec)
+	else if (pkt_burst == ice_recv_scattered_pkts_vec ||
+		 pkt_burst == ice_recv_pkts_vec)
 		options = RTE_ETH_BURST_VECTOR | RTE_ETH_BURST_SSE;
 #endif
 	else
@@ -2956,9 +2950,7 @@  ice_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 == ice_xmit_pkts_simple)
-		options = RTE_ETH_BURST_SCALAR | RTE_ETH_BURST_SIMPLE;
-	else if (pkt_burst == ice_xmit_pkts)
+	if (pkt_burst == ice_xmit_pkts_simple || pkt_burst == ice_xmit_pkts)
 		options = RTE_ETH_BURST_SCALAR;
 #ifdef RTE_ARCH_X86
 	else if (pkt_burst == ice_xmit_pkts_vec_avx2)