net/iavf: fix crash in AVX512
[dpdk.git] / drivers / net / iavf / iavf_rxtx_vec_avx512.c
index 67184ae..385f44e 100644 (file)
@@ -13,7 +13,7 @@
 #define IAVF_DESCS_PER_LOOP_AVX 8
 #define PKTLEN_SHIFT 10
 
-static inline void
+static __rte_always_inline void
 iavf_rxq_rearm(struct iavf_rx_queue *rxq)
 {
        int i;
@@ -25,6 +25,9 @@ iavf_rxq_rearm(struct iavf_rx_queue *rxq)
 
        rxdp = rxq->rx_ring + rxq->rxrearm_start;
 
+       if (unlikely(!cache))
+               return iavf_rxq_rearm_common(rxq, true);
+
        /* We need to pull 'n' more MBUFs into the software ring from mempool
         * We inline the mempool function here, so we can vectorize the copy
         * from the cache into the shadow ring.