• Home
  • Raw
  • Download

Lines Matching refs:txq

519 static void qede_tx_log_print(struct qede_dev *edev, struct qede_tx_queue *txq)  in qede_tx_log_print()  argument
523 txq->index, le16_to_cpu(*txq->hw_cons_ptr), in qede_tx_log_print()
524 qed_chain_get_cons_idx(&txq->tx_pbl), in qede_tx_log_print()
525 qed_chain_get_prod_idx(&txq->tx_pbl), in qede_tx_log_print()
532 struct qede_tx_queue *txq; in qede_tx_timeout() local
542 txq = &edev->fp_array[txqueue].txq[cos]; in qede_tx_timeout()
544 if (qed_chain_get_cons_idx(&txq->tx_pbl) != in qede_tx_timeout()
545 qed_chain_get_prod_idx(&txq->tx_pbl)) in qede_tx_timeout()
546 qede_tx_log_print(edev, txq); in qede_tx_timeout()
895 kfree(fp->txq); in qede_free_fp_array()
955 fp->txq = kcalloc(edev->dev_info.num_tc, in qede_alloc_fp_array()
956 sizeof(*fp->txq), GFP_KERNEL); in qede_alloc_fp_array()
957 if (!fp->txq) in qede_alloc_fp_array()
1576 static void qede_free_mem_txq(struct qede_dev *edev, struct qede_tx_queue *txq) in qede_free_mem_txq() argument
1579 if (txq->is_xdp) in qede_free_mem_txq()
1580 kfree(txq->sw_tx_ring.xdp); in qede_free_mem_txq()
1582 kfree(txq->sw_tx_ring.skbs); in qede_free_mem_txq()
1585 edev->ops->common->chain_free(edev->cdev, &txq->tx_pbl); in qede_free_mem_txq()
1589 static int qede_alloc_mem_txq(struct qede_dev *edev, struct qede_tx_queue *txq) in qede_alloc_mem_txq() argument
1600 txq->num_tx_buffers = edev->q_num_tx_buffers; in qede_alloc_mem_txq()
1603 if (txq->is_xdp) { in qede_alloc_mem_txq()
1604 size = sizeof(*txq->sw_tx_ring.xdp) * txq->num_tx_buffers; in qede_alloc_mem_txq()
1605 txq->sw_tx_ring.xdp = kzalloc(size, GFP_KERNEL); in qede_alloc_mem_txq()
1606 if (!txq->sw_tx_ring.xdp) in qede_alloc_mem_txq()
1609 size = sizeof(*txq->sw_tx_ring.skbs) * txq->num_tx_buffers; in qede_alloc_mem_txq()
1610 txq->sw_tx_ring.skbs = kzalloc(size, GFP_KERNEL); in qede_alloc_mem_txq()
1611 if (!txq->sw_tx_ring.skbs) in qede_alloc_mem_txq()
1615 rc = edev->ops->common->chain_alloc(edev->cdev, &txq->tx_pbl, &params); in qede_alloc_mem_txq()
1622 qede_free_mem_txq(edev, txq); in qede_alloc_mem_txq()
1641 qede_free_mem_txq(edev, &fp->txq[cos]); in qede_free_mem_fp()
1672 rc = qede_alloc_mem_txq(edev, &fp->txq[cos]); in qede_alloc_mem_fp()
1715 struct qede_tx_queue *txq) in qede_empty_tx_queue() argument
1721 netdev_txq = netdev_get_tx_queue(edev->ndev, txq->ndev_txq_id); in qede_empty_tx_queue()
1723 while (qed_chain_get_cons_idx(&txq->tx_pbl) != in qede_empty_tx_queue()
1724 qed_chain_get_prod_idx(&txq->tx_pbl)) { in qede_empty_tx_queue()
1727 txq->index, qed_chain_get_cons_idx(&txq->tx_pbl), in qede_empty_tx_queue()
1728 qed_chain_get_prod_idx(&txq->tx_pbl)); in qede_empty_tx_queue()
1730 rc = qede_free_tx_pkt(edev, txq, &len); in qede_empty_tx_queue()
1734 txq->index, in qede_empty_tx_queue()
1735 qed_chain_get_cons_idx(&txq->tx_pbl), in qede_empty_tx_queue()
1736 qed_chain_get_prod_idx(&txq->tx_pbl)); in qede_empty_tx_queue()
1742 txq->sw_tx_cons++; in qede_empty_tx_queue()
1761 &fp->txq[cos]); in qede_empty_tx_queues()
1814 struct qede_tx_queue *txq = &fp->txq[cos]; in qede_init_fp() local
1817 txq->cos = cos; in qede_init_fp()
1818 txq->index = txq_index; in qede_init_fp()
1819 ndev_tx_id = QEDE_TXQ_TO_NDEV_TXQ_ID(edev, txq); in qede_init_fp()
1820 txq->ndev_txq_id = ndev_tx_id; in qede_init_fp()
1823 txq->is_legacy = true; in qede_init_fp()
1824 txq->dev = &edev->pdev->dev; in qede_init_fp()
1987 struct qede_tx_queue *txq, bool allow_drain) in qede_drain_txq() argument
1991 while (txq->sw_tx_cons != txq->sw_tx_prod) { in qede_drain_txq()
1996 txq->index); in qede_drain_txq()
2000 return qede_drain_txq(edev, txq, false); in qede_drain_txq()
2004 txq->index, txq->sw_tx_prod, in qede_drain_txq()
2005 txq->sw_tx_cons); in qede_drain_txq()
2020 struct qede_tx_queue *txq, int rss_id) in qede_stop_txq() argument
2023 edev->ops->common->db_recovery_del(edev->cdev, txq->doorbell_addr, in qede_stop_txq()
2024 &txq->tx_db); in qede_stop_txq()
2026 return edev->ops->q_tx_stop(edev->cdev, rss_id, txq->handle); in qede_stop_txq()
2062 rc = qede_drain_txq(edev, &fp->txq[cos], true); in qede_stop_queues()
2084 rc = qede_stop_txq(edev, &fp->txq[cos], i); in qede_stop_queues()
2119 struct qede_tx_queue *txq, u8 rss_id, u16 sb_idx) in qede_start_txq() argument
2121 dma_addr_t phys_table = qed_chain_get_pbl_phys(&txq->tx_pbl); in qede_start_txq()
2122 u32 page_cnt = qed_chain_get_page_cnt(&txq->tx_pbl); in qede_start_txq()
2133 if (txq->is_xdp) in qede_start_txq()
2134 params.queue_id = QEDE_TXQ_XDP_TO_IDX(edev, txq); in qede_start_txq()
2136 params.queue_id = txq->index; in qede_start_txq()
2140 params.tc = txq->cos; in qede_start_txq()
2145 DP_ERR(edev, "Start TXQ #%d failed %d\n", txq->index, rc); in qede_start_txq()
2149 txq->doorbell_addr = ret_params.p_doorbell; in qede_start_txq()
2150 txq->handle = ret_params.p_handle; in qede_start_txq()
2153 txq->hw_cons_ptr = &fp->sb_info->sb_virt->pi_array[sb_idx]; in qede_start_txq()
2156 SET_FIELD(txq->tx_db.data.params, ETH_DB_DATA_DEST, DB_DEST_XCM); in qede_start_txq()
2157 SET_FIELD(txq->tx_db.data.params, ETH_DB_DATA_AGG_CMD, DB_AGG_CMD_SET); in qede_start_txq()
2158 SET_FIELD(txq->tx_db.data.params, ETH_DB_DATA_AGG_VAL_SEL, in qede_start_txq()
2160 txq->tx_db.data.agg_flags = DQ_XCM_ETH_DQ_CF_CMD; in qede_start_txq()
2163 rc = edev->ops->common->db_recovery_add(edev->cdev, txq->doorbell_addr, in qede_start_txq()
2164 &txq->tx_db, DB_REC_WIDTH_32B, in qede_start_txq()
2264 rc = qede_start_txq(edev, fp, &fp->txq[cos], i, in qede_start_queues()
2736 static bool qede_is_txq_full(struct qede_dev *edev, struct qede_tx_queue *txq) in qede_is_txq_full() argument
2740 netdev_txq = netdev_get_tx_queue(edev->ndev, txq->ndev_txq_id); in qede_is_txq_full()
2805 struct qede_tx_queue *txq = QEDE_FP_TC0_TXQ(fp); in qede_get_eth_tlv_data() local
2807 if (txq->sw_tx_cons != txq->sw_tx_prod) in qede_get_eth_tlv_data()
2809 if (qede_is_txq_full(edev, txq)) in qede_get_eth_tlv_data()