Lines Matching refs:txsch
273 struct nix_txsch *txsch; in is_valid_txschq() local
281 txsch = &nix_hw->txsch[lvl]; in is_valid_txschq()
283 if (schq >= txsch->schq.max) in is_valid_txschq()
287 map_func = TXSCH_MAP_FUNC(txsch->pfvf_map[schq]); in is_valid_txschq()
1915 struct nix_txsch *txsch; in nix_check_txschq_alloc_req() local
1918 txsch = &nix_hw->txsch[lvl]; in nix_check_txschq_alloc_req()
1937 if (end <= txsch->schq.max && schq < end && in nix_check_txschq_alloc_req()
1938 !test_bit(schq, txsch->schq.bmap)) in nix_check_txschq_alloc_req()
1943 free_cnt = rvu_rsrc_free_count(&txsch->schq); in nix_check_txschq_alloc_req()
1952 !rvu_rsrc_check_contig(&txsch->schq, req->schq_contig[lvl])) in nix_check_txschq_alloc_req()
1958 static void nix_txsch_alloc(struct rvu *rvu, struct nix_txsch *txsch, in nix_txsch_alloc() argument
1993 if (idx >= (end - start) || test_bit(schq, txsch->schq.bmap)) { in nix_txsch_alloc()
2001 set_bit(schq, txsch->schq.bmap); in nix_txsch_alloc()
2006 set_bit(schq, txsch->schq.bmap); in nix_txsch_alloc()
2014 schq = bitmap_find_next_zero_area(txsch->schq.bmap, in nix_txsch_alloc()
2015 txsch->schq.max, start, in nix_txsch_alloc()
2020 set_bit(schq, txsch->schq.bmap); in nix_txsch_alloc()
2030 if (!test_bit(schq, txsch->schq.bmap)) { in nix_txsch_alloc()
2031 set_bit(schq, txsch->schq.bmap); in nix_txsch_alloc()
2050 struct nix_txsch *txsch; in rvu_mbox_handler_nix_txsch_alloc() local
2077 txsch = &nix_hw->txsch[lvl]; in rvu_mbox_handler_nix_txsch_alloc()
2078 pfvf_map = txsch->pfvf_map; in rvu_mbox_handler_nix_txsch_alloc()
2095 end = txsch->schq.max; in rvu_mbox_handler_nix_txsch_alloc()
2098 nix_txsch_alloc(rvu, txsch, rsp, lvl, start, end); in rvu_mbox_handler_nix_txsch_alloc()
2188 struct nix_txsch *txsch; in nix_smq_flush_enadis_xoff() local
2198 txsch = &nix_hw->txsch[NIX_TXSCH_LVL_TL2]; in nix_smq_flush_enadis_xoff()
2199 for (tl2 = 0; tl2 < txsch->schq.max; tl2++) { in nix_smq_flush_enadis_xoff()
2204 if (TXSCH_MAP_FLAGS(txsch->pfvf_map[tl2]) & NIX_TXSCHQ_FREE) in nix_smq_flush_enadis_xoff()
2207 if ((TXSCH_MAP_FUNC(txsch->pfvf_map[tl2]) & ~RVU_PFVF_FUNC_MASK) != in nix_smq_flush_enadis_xoff()
2208 (TXSCH_MAP_FUNC(txsch->pfvf_map[smq_flush_ctx->tl2_schq] & in nix_smq_flush_enadis_xoff()
2311 struct nix_txsch *txsch; in nix_txschq_free() local
2330 txsch = &nix_hw->txsch[lvl]; in nix_txschq_free()
2335 for (schq = 0; schq < txsch->schq.max; schq++) { in nix_txschq_free()
2336 if (TXSCH_MAP_FUNC(txsch->pfvf_map[schq]) != pcifunc) in nix_txschq_free()
2350 txsch = &nix_hw->txsch[NIX_TXSCH_LVL_TL1]; in nix_txschq_free()
2355 map_func = TXSCH_MAP_FUNC(txsch->pfvf_map[schq]); in nix_txschq_free()
2356 txsch->pfvf_map[schq] = TXSCH_SET_FLAG(map_func, 0x0); in nix_txschq_free()
2360 txsch = &nix_hw->txsch[NIX_TXSCH_LVL_SMQ]; in nix_txschq_free()
2361 for (schq = 0; schq < txsch->schq.max; schq++) { in nix_txschq_free()
2362 if (TXSCH_MAP_FUNC(txsch->pfvf_map[schq]) != pcifunc) in nix_txschq_free()
2375 txsch = &nix_hw->txsch[lvl]; in nix_txschq_free()
2376 for (schq = 0; schq < txsch->schq.max; schq++) { in nix_txschq_free()
2377 if (TXSCH_MAP_FUNC(txsch->pfvf_map[schq]) != pcifunc) in nix_txschq_free()
2380 rvu_free_rsrc(&txsch->schq, schq); in nix_txschq_free()
2381 txsch->pfvf_map[schq] = TXSCH_MAP(0, NIX_TXSCHQ_FREE); in nix_txschq_free()
2401 struct nix_txsch *txsch; in nix_txschq_free_one() local
2420 txsch = &nix_hw->txsch[lvl]; in nix_txschq_free_one()
2422 if (lvl >= hw->cap.nix_tx_aggr_lvl || schq >= txsch->schq.max) in nix_txschq_free_one()
2425 pfvf_map = txsch->pfvf_map; in nix_txschq_free_one()
2454 rvu_free_rsrc(&txsch->schq, schq); in nix_txschq_free_one()
2455 txsch->pfvf_map[schq] = TXSCH_MAP(0, NIX_TXSCHQ_FREE); in nix_txschq_free_one()
2559 pfvf_map = nix_hw->txsch[NIX_TXSCH_LVL_TL1].pfvf_map; in nix_tl1_default_cfg()
2608 struct nix_txsch *txsch, bool enable) in rvu_nix_tx_tl2_cfg() argument
2622 for (schq = 0; schq < txsch->schq.max; schq++) { in rvu_nix_tx_tl2_cfg()
2623 if (TXSCH_MAP_FUNC(txsch->pfvf_map[schq]) != pcifunc) in rvu_nix_tx_tl2_cfg()
2644 struct nix_txsch *txsch; in rvu_mbox_handler_nix_txschq_cfg() local
2665 txsch = &nix_hw->txsch[req->lvl]; in rvu_mbox_handler_nix_txschq_cfg()
2666 pfvf_map = txsch->pfvf_map; in rvu_mbox_handler_nix_txschq_cfg()
2685 txsch->lvl, reg, regval)) in rvu_mbox_handler_nix_txschq_cfg()
3304 struct nix_txsch *txsch; in nix_setup_txschq() local
3312 txsch = &nix_hw->txsch[lvl]; in nix_setup_txschq()
3313 txsch->lvl = lvl; in nix_setup_txschq()
3332 txsch->schq.max = cfg & 0xFFFF; in nix_setup_txschq()
3333 err = rvu_alloc_bitmap(&txsch->schq); in nix_setup_txschq()
3340 txsch->pfvf_map = devm_kcalloc(rvu->dev, txsch->schq.max, in nix_setup_txschq()
3342 if (!txsch->pfvf_map) in nix_setup_txschq()
3344 for (schq = 0; schq < txsch->schq.max; schq++) in nix_setup_txschq()
3345 txsch->pfvf_map[schq] = TXSCH_MAP(0, NIX_TXSCHQ_FREE); in nix_setup_txschq()
4223 struct nix_txsch *txsch; in rvu_mbox_handler_nix_set_hw_frs() local
4254 txsch = &nix_hw->txsch[NIX_TXSCH_LVL_SMQ]; in rvu_mbox_handler_nix_set_hw_frs()
4256 for (schq = 0; schq < txsch->schq.max; schq++) { in rvu_mbox_handler_nix_set_hw_frs()
4257 if (TXSCH_MAP_FUNC(txsch->pfvf_map[schq]) != pcifunc) in rvu_mbox_handler_nix_set_hw_frs()
4750 struct nix_txsch *txsch; in rvu_nix_block_freemem() local
4764 txsch = &nix_hw->txsch[lvl]; in rvu_nix_block_freemem()
4765 kfree(txsch->schq.bmap); in rvu_nix_block_freemem()