Lines Matching refs:prio
12 u8 tx_queues = pfvf->hw.tx_queues, prio; in otx2_check_pfc_config() local
15 for (prio = 0; prio < NIX_PF_PFC_PRIO_MAX; prio++) { in otx2_check_pfc_config()
16 if ((pfc_en & (1 << prio)) && in otx2_check_pfc_config()
17 prio > tx_queues - 1) { in otx2_check_pfc_config()
20 tx_queues, prio + 1); in otx2_check_pfc_config()
31 int prio, lvl, err; in otx2_pfc_txschq_config() local
34 for (prio = 0; prio < NIX_PF_PFC_PRIO_MAX; prio++) { in otx2_pfc_txschq_config()
35 pfc_bit_set = pfc_en & (1 << prio); in otx2_pfc_txschq_config()
40 if (!pfc_bit_set || !pfvf->pfc_alloc_status[prio]) in otx2_pfc_txschq_config()
45 err = otx2_txschq_config(pfvf, lvl, prio, true); in otx2_pfc_txschq_config()
49 __func__, lvl, prio); in otx2_pfc_txschq_config()
59 static int otx2_pfc_txschq_alloc_one(struct otx2_nic *pfvf, u8 prio) in otx2_pfc_txschq_alloc_one() argument
91 pfvf->pfc_schq_list[lvl][prio] = rsp->schq_list[lvl][0]; in otx2_pfc_txschq_alloc_one()
98 pfvf->pfc_schq_list[lvl][prio] = pfvf->hw.txschq_list[lvl][0]; in otx2_pfc_txschq_alloc_one()
100 pfvf->pfc_alloc_status[prio] = true; in otx2_pfc_txschq_alloc_one()
108 int err, prio; in otx2_pfc_txschq_alloc() local
110 for (prio = 0; prio < NIX_PF_PFC_PRIO_MAX; prio++) { in otx2_pfc_txschq_alloc()
111 pfc_bit_set = pfc_en & (1 << prio); in otx2_pfc_txschq_alloc()
113 if (!pfc_bit_set || pfvf->pfc_alloc_status[prio]) in otx2_pfc_txschq_alloc()
117 err = otx2_pfc_txschq_alloc_one(pfvf, prio); in otx2_pfc_txschq_alloc()
128 static int otx2_pfc_txschq_stop_one(struct otx2_nic *pfvf, u8 prio) in otx2_pfc_txschq_stop_one() argument
135 pfvf->pfc_schq_list[lvl][prio]); in otx2_pfc_txschq_stop_one()
137 pfvf->pfc_alloc_status[prio] = false; in otx2_pfc_txschq_stop_one()
141 static int otx2_pfc_update_sq_smq_mapping(struct otx2_nic *pfvf, int prio) in otx2_pfc_update_sq_smq_mapping() argument
149 if (pfvf->pfc_alloc_status[prio]) in otx2_pfc_update_sq_smq_mapping()
152 netif_tx_stop_queue(netdev_get_tx_queue(dev, prio)); in otx2_pfc_update_sq_smq_mapping()
161 cn10k_sq_aq->qidx = prio; in otx2_pfc_update_sq_smq_mapping()
169 cn10k_sq_aq->sq.smq = otx2_get_smq_idx(pfvf, prio); in otx2_pfc_update_sq_smq_mapping()
176 sq_aq->qidx = prio; in otx2_pfc_update_sq_smq_mapping()
184 sq_aq->sq.smq = otx2_get_smq_idx(pfvf, prio); in otx2_pfc_update_sq_smq_mapping()
190 if (pfvf->pfc_alloc_status[prio]) in otx2_pfc_update_sq_smq_mapping()
193 netif_tx_start_queue(netdev_get_tx_queue(dev, prio)); in otx2_pfc_update_sq_smq_mapping()
204 int err, prio; in otx2_pfc_txschq_update() local
207 for (prio = 0; prio < NIX_PF_PFC_PRIO_MAX; prio++) { in otx2_pfc_txschq_update()
208 pfc_bit_set = pfc_en & (1 << prio); in otx2_pfc_txschq_update()
211 if (!pfc_bit_set && pfvf->pfc_alloc_status[prio]) { in otx2_pfc_txschq_update()
216 otx2_smq_flush(pfvf, pfvf->pfc_schq_list[NIX_TXSCH_LVL_SMQ][prio]); in otx2_pfc_txschq_update()
221 err = otx2_pfc_txschq_stop_one(pfvf, prio); in otx2_pfc_txschq_update()
225 __func__, prio); in otx2_pfc_txschq_update()
236 if (!pfc_bit_set || pfvf->pfc_alloc_status[prio]) in otx2_pfc_txschq_update()
240 err = otx2_pfc_txschq_alloc_one(pfvf, prio); in otx2_pfc_txschq_update()
245 __func__, prio); in otx2_pfc_txschq_update()
250 err = otx2_pfc_update_sq_smq_mapping(pfvf, prio); in otx2_pfc_txschq_update()
253 dev_err(pfvf->dev, "%s failed PFC Tx schq sq:%d mapping", __func__, prio); in otx2_pfc_txschq_update()
270 int prio, err; in otx2_pfc_txschq_stop() local
273 for (prio = 0; prio < NIX_PF_PFC_PRIO_MAX; prio++) { in otx2_pfc_txschq_stop()
274 pfc_bit_set = pfc_en & (1 << prio); in otx2_pfc_txschq_stop()
275 if (!pfc_bit_set || !pfvf->pfc_alloc_status[prio]) in otx2_pfc_txschq_stop()
279 err = otx2_pfc_txschq_stop_one(pfvf, prio); in otx2_pfc_txschq_stop()