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()
58 static int otx2_pfc_txschq_alloc_one(struct otx2_nic *pfvf, u8 prio) in otx2_pfc_txschq_alloc_one() argument
90 pfvf->pfc_schq_list[lvl][prio] = rsp->schq_list[lvl][0]; in otx2_pfc_txschq_alloc_one()
97 pfvf->pfc_schq_list[lvl][prio] = pfvf->hw.txschq_list[lvl][0]; in otx2_pfc_txschq_alloc_one()
99 pfvf->pfc_alloc_status[prio] = true; in otx2_pfc_txschq_alloc_one()
107 int err, prio; in otx2_pfc_txschq_alloc() local
109 for (prio = 0; prio < NIX_PF_PFC_PRIO_MAX; prio++) { in otx2_pfc_txschq_alloc()
110 pfc_bit_set = pfc_en & (1 << prio); in otx2_pfc_txschq_alloc()
112 if (!pfc_bit_set || pfvf->pfc_alloc_status[prio]) in otx2_pfc_txschq_alloc()
116 err = otx2_pfc_txschq_alloc_one(pfvf, prio); in otx2_pfc_txschq_alloc()
126 static int otx2_pfc_txschq_stop_one(struct otx2_nic *pfvf, u8 prio) in otx2_pfc_txschq_stop_one() argument
133 pfvf->pfc_schq_list[lvl][prio]); in otx2_pfc_txschq_stop_one()
135 pfvf->pfc_alloc_status[prio] = false; in otx2_pfc_txschq_stop_one()
139 static int otx2_pfc_update_sq_smq_mapping(struct otx2_nic *pfvf, int prio) in otx2_pfc_update_sq_smq_mapping() argument
147 if (pfvf->pfc_alloc_status[prio]) in otx2_pfc_update_sq_smq_mapping()
150 netif_tx_stop_queue(netdev_get_tx_queue(dev, prio)); in otx2_pfc_update_sq_smq_mapping()
159 cn10k_sq_aq->qidx = prio; in otx2_pfc_update_sq_smq_mapping()
167 cn10k_sq_aq->sq.smq = otx2_get_smq_idx(pfvf, prio); in otx2_pfc_update_sq_smq_mapping()
174 sq_aq->qidx = prio; in otx2_pfc_update_sq_smq_mapping()
182 sq_aq->sq.smq = otx2_get_smq_idx(pfvf, prio); in otx2_pfc_update_sq_smq_mapping()
188 if (pfvf->pfc_alloc_status[prio]) in otx2_pfc_update_sq_smq_mapping()
191 netif_tx_start_queue(netdev_get_tx_queue(dev, prio)); in otx2_pfc_update_sq_smq_mapping()
202 int err, prio; in otx2_pfc_txschq_update() local
205 for (prio = 0; prio < NIX_PF_PFC_PRIO_MAX; prio++) { in otx2_pfc_txschq_update()
206 pfc_bit_set = pfc_en & (1 << prio); in otx2_pfc_txschq_update()
209 if (!pfc_bit_set && pfvf->pfc_alloc_status[prio]) { in otx2_pfc_txschq_update()
214 otx2_smq_flush(pfvf, pfvf->pfc_schq_list[NIX_TXSCH_LVL_SMQ][prio]); in otx2_pfc_txschq_update()
219 err = otx2_pfc_txschq_stop_one(pfvf, prio); in otx2_pfc_txschq_update()
223 __func__, prio); in otx2_pfc_txschq_update()
234 if (!pfc_bit_set || pfvf->pfc_alloc_status[prio]) in otx2_pfc_txschq_update()
238 err = otx2_pfc_txschq_alloc_one(pfvf, prio); in otx2_pfc_txschq_update()
243 __func__, prio); in otx2_pfc_txschq_update()
248 err = otx2_pfc_update_sq_smq_mapping(pfvf, prio); in otx2_pfc_txschq_update()
251 dev_err(pfvf->dev, "%s failed PFC Tx schq sq:%d mapping", __func__, prio); in otx2_pfc_txschq_update()
267 int prio, err; in otx2_pfc_txschq_stop() local
270 for (prio = 0; prio < NIX_PF_PFC_PRIO_MAX; prio++) { in otx2_pfc_txschq_stop()
271 pfc_bit_set = pfc_en & (1 << prio); in otx2_pfc_txschq_stop()
272 if (!pfc_bit_set || !pfvf->pfc_alloc_status[prio]) in otx2_pfc_txschq_stop()
276 err = otx2_pfc_txschq_stop_one(pfvf, prio); in otx2_pfc_txschq_stop()