net/ice: remove legacy Rx descriptor definition
[dpdk.git] / drivers / net / ice / ice_rxtx.h
index d1c9b92..25b3822 100644 (file)
@@ -5,6 +5,7 @@
 #ifndef _ICE_RXTX_H_
 #define _ICE_RXTX_H_
 
+#include "rte_pmd_ice.h"
 #include "ice_ethdev.h"
 
 #define ICE_ALIGN_RING_DESC  32
@@ -20,9 +21,9 @@
 #define ICE_CHK_Q_ENA_INTERVAL_US  100
 
 #ifdef RTE_LIBRTE_ICE_16BYTE_RX_DESC
-#define ice_rx_desc ice_16byte_rx_desc
+#define ice_rx_flex_desc ice_16b_rx_flex_desc
 #else
-#define ice_rx_desc ice_32byte_rx_desc
+#define ice_rx_flex_desc ice_32b_rx_flex_desc
 #endif
 
 #define ICE_SUPPORT_CHAIN_NUM 5
@@ -45,8 +46,8 @@ struct ice_rx_entry {
 
 struct ice_rx_queue {
        struct rte_mempool *mp; /* mbuf pool to populate RX ring */
-       volatile union ice_rx_desc *rx_ring;/* RX ring virtual address */
-       uint64_t rx_ring_phys_addr; /* RX ring DMA address */
+       volatile union ice_rx_flex_desc *rx_ring;/* RX ring virtual address */
+       rte_iova_t rx_ring_dma; /* RX ring DMA address */
        struct ice_rx_entry *sw_ring; /* address of RX soft ring */
        uint16_t nb_rx_desc; /* number of RX descriptors */
        uint16_t rx_free_thresh; /* max free RX desc to hold */
@@ -76,6 +77,7 @@ struct ice_rx_queue {
        uint16_t max_pkt_len; /* Maximum packet length */
        bool q_set; /* indicate if rx queue has been configured */
        bool rx_deferred_start; /* don't start this queue in dev start */
+       uint8_t proto_xtr; /* Protocol extraction from flexible descriptor */
        ice_rx_release_mbufs_t rx_rel_mbufs;
 };
 
@@ -87,7 +89,7 @@ struct ice_tx_entry {
 
 struct ice_tx_queue {
        uint16_t nb_tx_desc; /* number of TX descriptors */
-       uint64_t tx_ring_phys_addr; /* TX ring DMA address */
+       rte_iova_t tx_ring_dma; /* TX ring DMA address */
        volatile struct ice_tx_desc *tx_ring; /* TX ring virtual address */
        struct ice_tx_entry *sw_ring; /* virtual address of SW ring */
        uint16_t tx_tail; /* current value of tail register */
@@ -158,6 +160,8 @@ uint16_t ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 void ice_set_rx_function(struct rte_eth_dev *dev);
 uint16_t ice_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
                       uint16_t nb_pkts);
+void ice_set_tx_function_flag(struct rte_eth_dev *dev,
+                             struct ice_tx_queue *txq);
 void ice_set_tx_function(struct rte_eth_dev *dev);
 uint32_t ice_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id);
 void ice_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
@@ -181,4 +185,9 @@ uint16_t ice_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
                           uint16_t nb_pkts);
 uint16_t ice_recv_pkts_vec_avx2(void *rx_queue, struct rte_mbuf **rx_pkts,
                                uint16_t nb_pkts);
+uint16_t ice_recv_scattered_pkts_vec_avx2(void *rx_queue,
+                                         struct rte_mbuf **rx_pkts,
+                                         uint16_t nb_pkts);
+uint16_t ice_xmit_pkts_vec_avx2(void *tx_queue, struct rte_mbuf **tx_pkts,
+                               uint16_t nb_pkts);
 #endif /* _ICE_RXTX_H_ */