Lines Matching refs:txr

357 	struct bnxt_tx_ring_info *txr;  in bnxt_start_xmit()  local
367 txr = &bp->tx_ring[bp->tx_ring_map[i]]; in bnxt_start_xmit()
368 prod = txr->tx_prod; in bnxt_start_xmit()
370 free_size = bnxt_tx_avail(bp, txr); in bnxt_start_xmit()
380 txbd = &txr->tx_desc_ring[TX_RING(prod)][TX_IDX(prod)]; in bnxt_start_xmit()
384 tx_buf = &txr->tx_buf_ring[prod]; in bnxt_start_xmit()
401 struct tx_push_buffer *tx_push_buf = txr->tx_push; in bnxt_start_xmit()
404 void __iomem *db = txr->tx_db.doorbell; in bnxt_start_xmit()
447 txbd->tx_bd_haddr = txr->data_mapping; in bnxt_start_xmit()
449 txbd = &txr->tx_desc_ring[TX_RING(prod)][TX_IDX(prod)]; in bnxt_start_xmit()
454 txr->tx_prod = prod; in bnxt_start_xmit()
499 &txr->tx_desc_ring[TX_RING(prod)][TX_IDX(prod)]; in bnxt_start_xmit()
542 txbd = &txr->tx_desc_ring[TX_RING(prod)][TX_IDX(prod)]; in bnxt_start_xmit()
551 tx_buf = &txr->tx_buf_ring[prod]; in bnxt_start_xmit()
571 txr->tx_prod = prod; in bnxt_start_xmit()
574 bnxt_db_write(bp, &txr->tx_db, prod); in bnxt_start_xmit()
578 if (unlikely(bnxt_tx_avail(bp, txr) <= MAX_SKB_FRAGS + 1)) { in bnxt_start_xmit()
580 bnxt_db_write(bp, &txr->tx_db, prod); in bnxt_start_xmit()
590 if (bnxt_tx_avail(bp, txr) > bp->tx_wake_thresh) in bnxt_start_xmit()
599 prod = txr->tx_prod; in bnxt_start_xmit()
600 tx_buf = &txr->tx_buf_ring[prod]; in bnxt_start_xmit()
609 tx_buf = &txr->tx_buf_ring[prod]; in bnxt_start_xmit()
621 struct bnxt_tx_ring_info *txr = bnapi->tx_ring; in bnxt_tx_int() local
622 struct netdev_queue *txq = netdev_get_tx_queue(bp->dev, txr->txq_index); in bnxt_tx_int()
623 u16 cons = txr->tx_cons; in bnxt_tx_int()
633 tx_buf = &txr->tx_buf_ring[cons]; in bnxt_tx_int()
649 tx_buf = &txr->tx_buf_ring[cons]; in bnxt_tx_int()
665 txr->tx_cons = cons; in bnxt_tx_int()
675 (bnxt_tx_avail(bp, txr) > bp->tx_wake_thresh)) { in bnxt_tx_int()
678 bnxt_tx_avail(bp, txr) > bp->tx_wake_thresh && in bnxt_tx_int()
679 txr->dev_state != BNXT_DEV_STATE_CLOSING) in bnxt_tx_int()
2216 struct bnxt_tx_ring_info *txr = bnapi->tx_ring; in __bnxt_poll_work() local
2217 u16 prod = txr->tx_prod; in __bnxt_poll_work()
2222 bnxt_db_write_relaxed(bp, &txr->tx_db, prod); in __bnxt_poll_work()
2475 struct bnxt_tx_ring_info *txr = &bp->tx_ring[i]; in bnxt_free_tx_skbs() local
2479 struct bnxt_sw_tx_bd *tx_buf = &txr->tx_buf_ring[j]; in bnxt_free_tx_skbs()
2521 tx_buf = &txr->tx_buf_ring[ring_idx]; in bnxt_free_tx_skbs()
2881 struct bnxt_tx_ring_info *txr = &bp->tx_ring[i]; in bnxt_free_tx_rings() local
2884 if (txr->tx_push) { in bnxt_free_tx_rings()
2886 txr->tx_push, txr->tx_push_mapping); in bnxt_free_tx_rings()
2887 txr->tx_push = NULL; in bnxt_free_tx_rings()
2890 ring = &txr->tx_ring_struct; in bnxt_free_tx_rings()
2917 struct bnxt_tx_ring_info *txr = &bp->tx_ring[i]; in bnxt_alloc_tx_rings() local
2921 ring = &txr->tx_ring_struct; in bnxt_alloc_tx_rings()
2927 ring->grp_idx = txr->bnapi->index; in bnxt_alloc_tx_rings()
2934 txr->tx_push = dma_alloc_coherent(&pdev->dev, in bnxt_alloc_tx_rings()
2936 &txr->tx_push_mapping, in bnxt_alloc_tx_rings()
2939 if (!txr->tx_push) in bnxt_alloc_tx_rings()
2942 mapping = txr->tx_push_mapping + in bnxt_alloc_tx_rings()
2944 txr->data_mapping = cpu_to_le64(mapping); in bnxt_alloc_tx_rings()
3080 struct bnxt_tx_ring_info *txr; in bnxt_init_ring_struct() local
3118 txr = bnapi->tx_ring; in bnxt_init_ring_struct()
3119 if (!txr) in bnxt_init_ring_struct()
3122 ring = &txr->tx_ring_struct; in bnxt_init_ring_struct()
3126 rmem->pg_arr = (void **)txr->tx_desc_ring; in bnxt_init_ring_struct()
3127 rmem->dma_arr = txr->tx_desc_mapping; in bnxt_init_ring_struct()
3129 rmem->vmem = (void **)&txr->tx_buf_ring; in bnxt_init_ring_struct()
3294 struct bnxt_tx_ring_info *txr = &bp->tx_ring[i]; in bnxt_init_tx_rings() local
3295 struct bnxt_ring_struct *ring = &txr->tx_ring_struct; in bnxt_init_tx_rings()
3852 struct bnxt_tx_ring_info *txr; in bnxt_clear_ring_indices() local
3860 txr = bnapi->tx_ring; in bnxt_clear_ring_indices()
3861 if (txr) { in bnxt_clear_ring_indices()
3862 txr->tx_prod = 0; in bnxt_clear_ring_indices()
3863 txr->tx_cons = 0; in bnxt_clear_ring_indices()
4020 struct bnxt_tx_ring_info *txr = &bp->tx_ring[i]; in bnxt_alloc_mem() local
4023 txr->tx_ring_struct.ring_mem.flags = in bnxt_alloc_mem()
4025 txr->bnapi = bp->bnapi[j]; in bnxt_alloc_mem()
4026 bp->bnapi[j]->tx_ring = txr; in bnxt_alloc_mem()
4029 txr->txq_index = i - bp->tx_nr_rings_xdp; in bnxt_alloc_mem()
4809 static u16 bnxt_cp_ring_for_tx(struct bnxt *bp, struct bnxt_tx_ring_info *txr) in bnxt_cp_ring_for_tx() argument
4812 struct bnxt_napi *bnapi = txr->bnapi; in bnxt_cp_ring_for_tx()
4818 return bnxt_cp_ring_from_grp(bp, &txr->tx_ring_struct); in bnxt_cp_ring_for_tx()
5236 struct bnxt_tx_ring_info *txr; in hwrm_ring_alloc_send_msg() local
5238 txr = container_of(ring, struct bnxt_tx_ring_info, in hwrm_ring_alloc_send_msg()
5243 req.cmpl_ring_id = cpu_to_le16(bnxt_cp_ring_for_tx(bp, txr)); in hwrm_ring_alloc_send_msg()
5426 struct bnxt_tx_ring_info *txr = &bp->tx_ring[i]; in bnxt_hwrm_ring_alloc() local
5431 struct bnxt_napi *bnapi = txr->bnapi; in bnxt_hwrm_ring_alloc()
5447 ring = &txr->tx_ring_struct; in bnxt_hwrm_ring_alloc()
5452 bnxt_set_db(bp, &txr->tx_db, type, map_idx, ring->fw_ring_id); in bnxt_hwrm_ring_alloc()
5549 struct bnxt_tx_ring_info *txr = &bp->tx_ring[i]; in bnxt_hwrm_ring_free() local
5550 struct bnxt_ring_struct *ring = &txr->tx_ring_struct; in bnxt_hwrm_ring_free()
5553 u32 cmpl_ring_id = bnxt_cp_ring_for_tx(bp, txr); in bnxt_hwrm_ring_free()
8329 struct bnxt_tx_ring_info *txr; in bnxt_tx_disable() local
8333 txr = &bp->tx_ring[i]; in bnxt_tx_disable()
8334 txr->dev_state = BNXT_DEV_STATE_CLOSING; in bnxt_tx_disable()
8345 struct bnxt_tx_ring_info *txr; in bnxt_tx_enable() local
8348 txr = &bp->tx_ring[i]; in bnxt_tx_enable()
8349 txr->dev_state = 0; in bnxt_tx_enable()
9874 struct bnxt_tx_ring_info *txr = bnapi->tx_ring; in bnxt_dump_tx_sw_state() local
9877 if (!txr) in bnxt_dump_tx_sw_state()
9881 i, txr->tx_ring_struct.fw_ring_id, txr->tx_prod, in bnxt_dump_tx_sw_state()
9882 txr->tx_cons); in bnxt_dump_tx_sw_state()