Lines Matching refs:lvl

257 			    int lvl, u16 pcifunc, u16 schq)  in is_valid_txschq()  argument
268 txsch = &nix_hw->txsch[lvl]; in is_valid_txschq()
278 if (lvl >= hw->cap.nix_tx_aggr_lvl) { in is_valid_txschq()
1599 int lvl, u64 reg, u64 regval) in handle_txschq_shaper_update() argument
1611 switch (lvl) { in handle_txschq_shaper_update()
1674 nixlf, schq, lvl); in handle_txschq_shaper_update()
1691 int nixlf, int lvl, int schq) in nix_reset_tx_shaping() argument
1697 switch (lvl) { in nix_reset_tx_shaping()
1724 lvl, cir_reg, 0); in nix_reset_tx_shaping()
1727 lvl, pir_reg, 0); in nix_reset_tx_shaping()
1743 int lvl, int schq) in nix_reset_tx_linkcfg() argument
1749 if (lvl >= hw->cap.nix_tx_aggr_lvl) in nix_reset_tx_linkcfg()
1753 if (lvl == NIX_TXSCH_LVL_TL4) in nix_reset_tx_linkcfg()
1758 if (lvl != link_level) in nix_reset_tx_linkcfg()
1768 int lvl, int schq) in nix_clear_tx_xoff() argument
1778 switch (lvl) { in nix_clear_tx_xoff()
1837 static int nix_check_txschq_alloc_req(struct rvu *rvu, int lvl, u16 pcifunc, in nix_check_txschq_alloc_req() argument
1846 txsch = &nix_hw->txsch[lvl]; in nix_check_txschq_alloc_req()
1847 req_schq = req->schq_contig[lvl] + req->schq[lvl]; in nix_check_txschq_alloc_req()
1855 if (lvl >= hw->cap.nix_tx_aggr_lvl) { in nix_check_txschq_alloc_req()
1878 if (!hw->cap.nix_fixed_txschq_mapping && req->schq_contig[lvl] && in nix_check_txschq_alloc_req()
1879 !rvu_rsrc_check_contig(&txsch->schq, req->schq_contig[lvl])) in nix_check_txschq_alloc_req()
1887 int lvl, int start, int end) in nix_txsch_alloc() argument
1896 if (lvl >= hw->cap.nix_tx_aggr_lvl) { in nix_txsch_alloc()
1898 if (rsp->schq_contig[lvl]) { in nix_txsch_alloc()
1899 rsp->schq_contig[lvl] = 1; in nix_txsch_alloc()
1900 rsp->schq_contig_list[lvl][0] = start; in nix_txsch_alloc()
1904 if (rsp->schq_contig[lvl]) in nix_txsch_alloc()
1905 rsp->schq[lvl] = 0; in nix_txsch_alloc()
1907 if (rsp->schq[lvl]) { in nix_txsch_alloc()
1908 rsp->schq[lvl] = 1; in nix_txsch_alloc()
1909 rsp->schq_list[lvl][0] = start; in nix_txsch_alloc()
1921 rsp->schq_contig[lvl] = 0; in nix_txsch_alloc()
1922 rsp->schq[lvl] = 0; in nix_txsch_alloc()
1926 if (rsp->schq_contig[lvl]) { in nix_txsch_alloc()
1927 rsp->schq_contig[lvl] = 1; in nix_txsch_alloc()
1929 rsp->schq_contig_list[lvl][0] = schq; in nix_txsch_alloc()
1930 rsp->schq[lvl] = 0; in nix_txsch_alloc()
1931 } else if (rsp->schq[lvl]) { in nix_txsch_alloc()
1932 rsp->schq[lvl] = 1; in nix_txsch_alloc()
1934 rsp->schq_list[lvl][0] = schq; in nix_txsch_alloc()
1940 if (rsp->schq_contig[lvl]) { in nix_txsch_alloc()
1943 rsp->schq_contig[lvl], 0); in nix_txsch_alloc()
1945 rsp->schq_contig[lvl] = 0; in nix_txsch_alloc()
1946 for (idx = 0; idx < rsp->schq_contig[lvl]; idx++) { in nix_txsch_alloc()
1948 rsp->schq_contig_list[lvl][idx] = schq; in nix_txsch_alloc()
1954 if (rsp->schq[lvl]) { in nix_txsch_alloc()
1959 rsp->schq_list[lvl][idx++] = schq; in nix_txsch_alloc()
1961 if (idx == rsp->schq[lvl]) in nix_txsch_alloc()
1965 rsp->schq[lvl] = idx; in nix_txsch_alloc()
1976 int lvl, idx, start, end; in rvu_mbox_handler_nix_txsch_alloc() local
1996 for (lvl = 0; lvl < NIX_TXSCH_LVL_CNT; lvl++) { in rvu_mbox_handler_nix_txsch_alloc()
1997 rc = nix_check_txschq_alloc_req(rvu, lvl, pcifunc, nix_hw, req); in rvu_mbox_handler_nix_txsch_alloc()
2003 for (lvl = 0; lvl < NIX_TXSCH_LVL_CNT; lvl++) { in rvu_mbox_handler_nix_txsch_alloc()
2004 txsch = &nix_hw->txsch[lvl]; in rvu_mbox_handler_nix_txsch_alloc()
2007 if (!req->schq[lvl] && !req->schq_contig[lvl]) in rvu_mbox_handler_nix_txsch_alloc()
2010 rsp->schq[lvl] = req->schq[lvl]; in rvu_mbox_handler_nix_txsch_alloc()
2011 rsp->schq_contig[lvl] = req->schq_contig[lvl]; in rvu_mbox_handler_nix_txsch_alloc()
2015 if (lvl >= hw->cap.nix_tx_aggr_lvl) { in rvu_mbox_handler_nix_txsch_alloc()
2025 nix_txsch_alloc(rvu, txsch, rsp, lvl, start, end); in rvu_mbox_handler_nix_txsch_alloc()
2028 for (idx = 0; idx < req->schq_contig[lvl]; idx++) { in rvu_mbox_handler_nix_txsch_alloc()
2029 schq = rsp->schq_contig_list[lvl][idx]; in rvu_mbox_handler_nix_txsch_alloc()
2033 nix_reset_tx_linkcfg(rvu, blkaddr, lvl, schq); in rvu_mbox_handler_nix_txsch_alloc()
2034 nix_reset_tx_shaping(rvu, blkaddr, nixlf, lvl, schq); in rvu_mbox_handler_nix_txsch_alloc()
2037 for (idx = 0; idx < req->schq[lvl]; idx++) { in rvu_mbox_handler_nix_txsch_alloc()
2038 schq = rsp->schq_list[lvl][idx]; in rvu_mbox_handler_nix_txsch_alloc()
2042 nix_reset_tx_linkcfg(rvu, blkaddr, lvl, schq); in rvu_mbox_handler_nix_txsch_alloc()
2043 nix_reset_tx_shaping(rvu, blkaddr, nixlf, lvl, schq); in rvu_mbox_handler_nix_txsch_alloc()
2101 int blkaddr, nixlf, lvl, schq, err; in nix_txschq_free() local
2121 for (lvl = NIX_TXSCH_LVL_MDQ; lvl < NIX_TXSCH_LVL_CNT; lvl++) { in nix_txschq_free()
2122 txsch = &nix_hw->txsch[lvl]; in nix_txschq_free()
2124 if (lvl >= hw->cap.nix_tx_aggr_lvl) in nix_txschq_free()
2130 nix_reset_tx_linkcfg(rvu, blkaddr, lvl, schq); in nix_txschq_free()
2131 nix_clear_tx_xoff(rvu, blkaddr, lvl, schq); in nix_txschq_free()
2159 for (lvl = 0; lvl < NIX_TXSCH_LVL_CNT; lvl++) { in nix_txschq_free()
2163 if (lvl >= hw->cap.nix_tx_aggr_lvl) in nix_txschq_free()
2166 txsch = &nix_hw->txsch[lvl]; in nix_txschq_free()
2190 int lvl, schq, nixlf, blkaddr; in nix_txschq_free_one() local
2208 lvl = req->schq_lvl; in nix_txschq_free_one()
2210 txsch = &nix_hw->txsch[lvl]; in nix_txschq_free_one()
2212 if (lvl >= hw->cap.nix_tx_aggr_lvl || schq >= txsch->schq.max) in nix_txschq_free_one()
2227 nix_clear_tx_xoff(rvu, blkaddr, lvl, schq); in nix_txschq_free_one()
2232 if (lvl == NIX_TXSCH_LVL_SMQ && in nix_txschq_free_one()
2259 int lvl, u64 reg, u64 regval) in is_txschq_hierarchy_valid() argument
2264 if (!rvu_check_valid_reg(TXSCHQ_HWREGMAP, lvl, reg)) in is_txschq_hierarchy_valid()
2269 if (!is_valid_txschq(rvu, blkaddr, lvl, pcifunc, schq)) in is_txschq_hierarchy_valid()
2296 static bool is_txschq_shaping_valid(struct rvu_hwinfo *hw, int lvl, u64 reg) in is_txschq_shaping_valid() argument
2308 switch (lvl) { in is_txschq_shaping_valid()
2382 if (!rvu_check_valid_reg(TXSCHQ_HWREGMAP, req->lvl, reg) || in nix_txschq_cfg_read()
2383 !is_valid_txschq(rvu, blkaddr, req->lvl, pcifunc, schq)) in nix_txschq_cfg_read()
2387 rsp->lvl = req->lvl; in nix_txschq_cfg_read()
2434 if (req->lvl >= NIX_TXSCH_LVL_CNT || in rvu_mbox_handler_nix_txschq_cfg()
2449 txsch = &nix_hw->txsch[req->lvl]; in rvu_mbox_handler_nix_txschq_cfg()
2452 if (req->lvl >= hw->cap.nix_tx_aggr_lvl && in rvu_mbox_handler_nix_txschq_cfg()
2455 if (req->lvl == NIX_TXSCH_LVL_TL1) in rvu_mbox_handler_nix_txschq_cfg()
2469 txsch->lvl, reg, regval)) in rvu_mbox_handler_nix_txschq_cfg()
2473 if (!is_txschq_shaping_valid(hw, req->lvl, reg)) in rvu_mbox_handler_nix_txschq_cfg()
2482 req->lvl, reg, regval)) in rvu_mbox_handler_nix_txschq_cfg()
3091 int err, lvl, schq; in nix_setup_txschq() local
3097 for (lvl = 0; lvl < NIX_TXSCH_LVL_CNT; lvl++) { in nix_setup_txschq()
3098 txsch = &nix_hw->txsch[lvl]; in nix_setup_txschq()
3099 txsch->lvl = lvl; in nix_setup_txschq()
3100 switch (lvl) { in nix_setup_txschq()
4433 int lvl; in rvu_nix_block_freemem() local
4442 for (lvl = 0; lvl < NIX_TXSCH_LVL_CNT; lvl++) { in rvu_nix_block_freemem()
4443 txsch = &nix_hw->txsch[lvl]; in rvu_nix_block_freemem()