1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2014-2018 Broadcom
9 /* Maximum transmit burst for vector mode. */
10 #define RTE_BNXT_MAX_TX_BURST 64U
12 struct bnxt_tx_ring_info;
13 struct bnxt_cp_ring_info;
14 struct bnxt_tx_queue {
15 uint16_t nb_tx_desc; /* number of TX descriptors */
16 uint16_t tx_free_thresh;/* minimum TX before freeing */
17 /** Index to last TX descriptor to have been cleaned. */
18 uint16_t last_desc_cleaned;
19 /** Total number of TX descriptors ready to be allocated. */
20 uint16_t tx_next_dd; /* next desc to scan for DD bit */
21 uint16_t tx_next_rs; /* next desc to set RS bit */
22 uint16_t queue_id; /* TX queue index */
23 uint16_t reg_idx; /* TX queue register index */
24 uint16_t port_id; /* Device port identifier */
25 uint8_t pthresh; /* Prefetch threshold register */
26 uint8_t hthresh; /* Host threshold register */
27 uint8_t wthresh; /* Write-back threshold reg */
28 uint32_t ctx_curr; /* Hardware context states */
29 uint8_t tx_deferred_start; /* not in global dev start */
30 uint8_t tx_started; /* TX queue is started */
35 uint32_t vfr_tx_cfa_action;
36 struct bnxt_tx_ring_info *tx_ring;
38 unsigned int cp_nr_rings;
39 struct bnxt_cp_ring_info *cp_ring;
40 const struct rte_memzone *mz;
41 struct rte_mbuf **free;
44 void bnxt_free_txq_stats(struct bnxt_tx_queue *txq);
45 void bnxt_free_tx_mbufs(struct bnxt *bp);
46 void bnxt_tx_queue_release_op(void *tx_queue);
47 int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
50 unsigned int socket_id,
51 const struct rte_eth_txconf *tx_conf);