net/octeontx2: add Rx and Tx descriptor operations
[dpdk.git] / drivers / net / octeontx2 / otx2_ethdev.h
index ffc350e..8f2691c 100644 (file)
@@ -19,6 +19,7 @@
 #include "otx2_irq.h"
 #include "otx2_mempool.h"
 #include "otx2_rx.h"
+#include "otx2_tm.h"
 #include "otx2_tx.h"
 
 #define OTX2_ETH_DEV_PMD_VERSION       "1.0"
@@ -201,6 +202,19 @@ struct otx2_eth_dev {
        uint64_t rx_offload_capa;
        uint64_t tx_offload_capa;
        struct otx2_qint qints_mem[RTE_MAX_QUEUES_PER_PORT];
+       uint16_t txschq[NIX_TXSCH_LVL_CNT];
+       uint16_t txschq_contig[NIX_TXSCH_LVL_CNT];
+       uint16_t txschq_index[NIX_TXSCH_LVL_CNT];
+       uint16_t txschq_contig_index[NIX_TXSCH_LVL_CNT];
+       /* Dis-contiguous queues */
+       uint16_t txschq_list[NIX_TXSCH_LVL_CNT][MAX_TXSCHQ_PER_FUNC];
+       /* Contiguous queues */
+       uint16_t txschq_contig_list[NIX_TXSCH_LVL_CNT][MAX_TXSCHQ_PER_FUNC];
+       uint16_t otx2_tm_root_lvl;
+       uint16_t tm_flags;
+       uint16_t tm_leaf_cnt;
+       struct otx2_nix_tm_node_list node_list;
+       struct otx2_nix_tm_shaper_profile_list shaper_profile_list;
        struct otx2_rss_info rss_info;
        uint32_t txmap[RTE_ETHDEV_QUEUE_STAT_CNTRS];
        uint32_t rxmap[RTE_ETHDEV_QUEUE_STAT_CNTRS];
@@ -260,12 +274,23 @@ otx2_eth_pmd_priv(struct rte_eth_dev *eth_dev)
 /* Ops */
 void otx2_nix_info_get(struct rte_eth_dev *eth_dev,
                       struct rte_eth_dev_info *dev_info);
+int otx2_nix_pool_ops_supported(struct rte_eth_dev *eth_dev, const char *pool);
+void otx2_nix_rxq_info_get(struct rte_eth_dev *eth_dev, uint16_t queue_id,
+                          struct rte_eth_rxq_info *qinfo);
+void otx2_nix_txq_info_get(struct rte_eth_dev *eth_dev, uint16_t queue_id,
+                          struct rte_eth_txq_info *qinfo);
+uint32_t otx2_nix_rx_queue_count(struct rte_eth_dev *eth_dev, uint16_t qidx);
+int otx2_nix_tx_done_cleanup(void *txq, uint32_t free_cnt);
+int otx2_nix_rx_descriptor_done(void *rxq, uint16_t offset);
+int otx2_nix_rx_descriptor_status(void *rx_queue, uint16_t offset);
 
 void otx2_nix_promisc_config(struct rte_eth_dev *eth_dev, int en);
 void otx2_nix_promisc_enable(struct rte_eth_dev *eth_dev);
 void otx2_nix_promisc_disable(struct rte_eth_dev *eth_dev);
 void otx2_nix_allmulticast_enable(struct rte_eth_dev *eth_dev);
 void otx2_nix_allmulticast_disable(struct rte_eth_dev *eth_dev);
+int otx2_nix_tx_queue_start(struct rte_eth_dev *eth_dev, uint16_t qidx);
+int otx2_nix_tx_queue_stop(struct rte_eth_dev *eth_dev, uint16_t qidx);
 uint64_t otx2_nix_rxq_mbuf_setup(struct otx2_eth_dev *dev, uint16_t port_id);
 
 /* Link */
@@ -339,6 +364,12 @@ int otx2_cgx_rxtx_stop(struct otx2_eth_dev *dev);
 int otx2_cgx_mac_addr_set(struct rte_eth_dev *eth_dev,
                          struct rte_ether_addr *addr);
 
+/* Lookup configuration */
+void *otx2_nix_fastpath_lookup_mem_get(void);
+
+/* PTYPES */
+const uint32_t *otx2_nix_supported_ptypes_get(struct rte_eth_dev *dev);
+
 /* Mac address handling */
 int otx2_nix_mac_addr_set(struct rte_eth_dev *eth_dev,
                          struct rte_ether_addr *addr);