net/axgbe: check max SIMD bitwidth
authorCiara Power <ciara.power@intel.com>
Mon, 19 Oct 2020 13:48:44 +0000 (15:48 +0200)
committerDavid Marchand <david.marchand@redhat.com>
Mon, 19 Oct 2020 14:45:02 +0000 (16:45 +0200)
When choosing a vector path to take, an extra condition must be
satisfied to ensure the max SIMD bitwidth allows for the CPU enabled
path.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Amaranath Somalapuram <asomalap@amd.com>
drivers/net/axgbe/axgbe_rxtx.c

index bc93bec..032e3ce 100644 (file)
@@ -10,6 +10,7 @@
 #include <rte_time.h>
 #include <rte_mempool.h>
 #include <rte_mbuf.h>
+#include <rte_vect.h>
 
 static void
 axgbe_rx_queue_release(struct axgbe_rx_queue *rx_queue)
@@ -557,7 +558,8 @@ int axgbe_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
        if (!pdata->tx_queues)
                pdata->tx_queues = dev->data->tx_queues;
 
-       if (txq->vector_disable)
+       if (txq->vector_disable ||
+                       rte_vect_get_max_simd_bitwidth() < RTE_VECT_SIMD_128)
                dev->tx_pkt_burst = &axgbe_xmit_pkts;
        else
 #ifdef RTE_ARCH_X86