Just keep the vectorization related burst mode bit set, others are not so generic.
Signed-off-by: Haiyue Wang <haiyue.w...@intel.com> --- drivers/net/ice/ice_rxtx.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) 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) -- 2.17.1