X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fiavf%2Fiavf_rxtx_vec_common.h;h=457d6339e1d7d0dbb943fe7076286a62254fb401;hb=83680d371592fcf1b66cbbfecb0fb8b3aa4ccc8d;hp=62a333f0d919cb12b8a92df84f4984a623412716;hpb=059f18ae2aec7e824c5e0956aa415fc3630c5e52;p=dpdk.git diff --git a/drivers/net/iavf/iavf_rxtx_vec_common.h b/drivers/net/iavf/iavf_rxtx_vec_common.h index 62a333f0d9..457d6339e1 100644 --- a/drivers/net/iavf/iavf_rxtx_vec_common.h +++ b/drivers/net/iavf/iavf_rxtx_vec_common.h @@ -15,7 +15,7 @@ #pragma GCC diagnostic ignored "-Wcast-qual" #endif -static inline uint16_t +static __rte_always_inline uint16_t reassemble_packets(struct iavf_rx_queue *rxq, struct rte_mbuf **rx_bufs, uint16_t nb_bufs, uint8_t *split_flags) { @@ -231,7 +231,10 @@ iavf_rx_vec_queue_default(struct iavf_rx_queue *rxq) if (rxq->proto_xtr != IAVF_PROTO_XTR_NONE) return -1; - return 0; + if (rxq->offloads & IAVF_RX_VECTOR_OFFLOAD) + return IAVF_VECTOR_OFFLOAD_PATH; + + return IAVF_VECTOR_PATH; } static inline int @@ -258,14 +261,20 @@ iavf_rx_vec_dev_check_default(struct rte_eth_dev *dev) { int i; struct iavf_rx_queue *rxq; + int ret; + int result = 0; for (i = 0; i < dev->data->nb_rx_queues; i++) { rxq = dev->data->rx_queues[i]; - if (iavf_rx_vec_queue_default(rxq)) + ret = iavf_rx_vec_queue_default(rxq); + + if (ret < 0) return -1; + if (ret > result) + result = ret; } - return 0; + return result; } static inline int @@ -561,7 +570,7 @@ iavf_rxq_rearm_common(struct iavf_rx_queue *rxq, __rte_unused bool avx512) (rxq->nb_rx_desc - 1) : (rxq->rxrearm_start - 1)); /* Update the tail pointer on the NIC */ - IAVF_PCI_REG_WRITE(rxq->qrx_tail, rx_id); + IAVF_PCI_REG_WC_WRITE(rxq->qrx_tail, rx_id); } #endif