Lines Matching refs:cntr
1849 int cntr; in npc_mcam_rsrcs_init() local
1954 for (cntr = 0; cntr < mcam->counters.max; cntr++) in npc_mcam_rsrcs_init()
1955 mcam->cntr2pfvf_map[cntr] = NPC_MCAM_INVALID_MAP; in npc_mcam_rsrcs_init()
2202 int cntr; in rvu_npc_get_mcam_counter_alloc_info() local
2207 for (cntr = 0; cntr < mcam->counters.max; cntr++) { in rvu_npc_get_mcam_counter_alloc_info()
2208 if (mcam->cntr2pfvf_map[cntr] == pcifunc) { in rvu_npc_get_mcam_counter_alloc_info()
2210 if (mcam->cntr_refcnt[cntr]) in rvu_npc_get_mcam_counter_alloc_info()
2235 u16 pcifunc, int cntr) in npc_mcam_verify_counter() argument
2240 if (cntr >= mcam->counters.max) in npc_mcam_verify_counter()
2243 if (pcifunc != mcam->cntr2pfvf_map[cntr]) in npc_mcam_verify_counter()
2250 int blkaddr, u16 entry, u16 cntr) in npc_map_mcam_entry_and_cntr() argument
2257 mcam->entry2cntr_map[entry] = cntr; in npc_map_mcam_entry_and_cntr()
2258 mcam->cntr_refcnt[cntr]++; in npc_map_mcam_entry_and_cntr()
2262 ((cntr >> 9) << 12) | hw->npc_stat_ena | cntr); in npc_map_mcam_entry_and_cntr()
2267 int blkaddr, u16 entry, u16 cntr) in npc_unmap_mcam_entry_and_cntr() argument
2274 mcam->cntr_refcnt[cntr]--; in npc_unmap_mcam_entry_and_cntr()
2315 u16 index, cntr; in npc_mcam_free_all_entries() local
2327 cntr = mcam->entry2cntr_map[index]; in npc_mcam_free_all_entries()
2328 if (cntr != NPC_MCAM_INVALID_MAP) in npc_mcam_free_all_entries()
2331 cntr); in npc_mcam_free_all_entries()
2340 u16 cntr; in npc_mcam_free_all_counters() local
2343 for (cntr = 0; cntr < mcam->counters.max; cntr++) { in npc_mcam_free_all_counters()
2344 if (mcam->cntr2pfvf_map[cntr] == pcifunc) { in npc_mcam_free_all_counters()
2345 mcam->cntr2pfvf_map[cntr] = NPC_MCAM_INVALID_MAP; in npc_mcam_free_all_counters()
2346 mcam->cntr_refcnt[cntr] = 0; in npc_mcam_free_all_counters()
2347 rvu_free_rsrc(&mcam->counters, cntr); in npc_mcam_free_all_counters()
2734 u16 cntr; in rvu_mbox_handler_npc_mcam_free_entry() local
2759 cntr = mcam->entry2cntr_map[req->entry]; in rvu_mbox_handler_npc_mcam_free_entry()
2760 if (cntr != NPC_MCAM_INVALID_MAP) in rvu_mbox_handler_npc_mcam_free_entry()
2762 req->entry, cntr); in rvu_mbox_handler_npc_mcam_free_entry()
2818 npc_mcam_verify_counter(mcam, pcifunc, req->cntr)) { in rvu_mbox_handler_npc_mcam_write_entry()
2848 req->entry, req->cntr); in rvu_mbox_handler_npc_mcam_write_entry()
2910 u16 index, cntr; in rvu_mbox_handler_npc_mcam_shift_entry() local
2948 cntr = mcam->entry2cntr_map[old_entry]; in rvu_mbox_handler_npc_mcam_shift_entry()
2949 if (cntr != NPC_MCAM_INVALID_MAP) { in rvu_mbox_handler_npc_mcam_shift_entry()
2951 old_entry, cntr); in rvu_mbox_handler_npc_mcam_shift_entry()
2953 new_entry, cntr); in rvu_mbox_handler_npc_mcam_shift_entry()
2977 u16 max_contig, cntr; in rvu_mbox_handler_npc_mcam_alloc_counter() local
3012 rsp->cntr = index; in rvu_mbox_handler_npc_mcam_alloc_counter()
3013 for (cntr = index; cntr < (index + max_contig); cntr++) { in rvu_mbox_handler_npc_mcam_alloc_counter()
3014 __set_bit(cntr, mcam->counters.bmap); in rvu_mbox_handler_npc_mcam_alloc_counter()
3015 mcam->cntr2pfvf_map[cntr] = pcifunc; in rvu_mbox_handler_npc_mcam_alloc_counter()
3021 for (cntr = 0; cntr < req->count; cntr++) { in rvu_mbox_handler_npc_mcam_alloc_counter()
3025 rsp->cntr_list[cntr] = index; in rvu_mbox_handler_npc_mcam_alloc_counter()
3047 err = npc_mcam_verify_counter(mcam, req->hdr.pcifunc, req->cntr); in rvu_mbox_handler_npc_mcam_free_counter()
3054 mcam->cntr2pfvf_map[req->cntr] = NPC_MCAM_INVALID_MAP; in rvu_mbox_handler_npc_mcam_free_counter()
3055 rvu_free_rsrc(&mcam->counters, req->cntr); in rvu_mbox_handler_npc_mcam_free_counter()
3059 if (!mcam->cntr_refcnt[req->cntr]) in rvu_mbox_handler_npc_mcam_free_counter()
3066 if (mcam->entry2cntr_map[index] != req->cntr) in rvu_mbox_handler_npc_mcam_free_counter()
3070 index, req->cntr); in rvu_mbox_handler_npc_mcam_free_counter()
3089 rc = npc_mcam_verify_counter(mcam, req->hdr.pcifunc, req->cntr); in rvu_mbox_handler_npc_mcam_unmap_counter()
3099 req->entry, req->cntr); in rvu_mbox_handler_npc_mcam_unmap_counter()
3105 if (!mcam->cntr_refcnt[req->cntr]) in rvu_mbox_handler_npc_mcam_unmap_counter()
3113 if (mcam->entry2cntr_map[index] != req->cntr) in rvu_mbox_handler_npc_mcam_unmap_counter()
3117 index, req->cntr); in rvu_mbox_handler_npc_mcam_unmap_counter()
3135 err = npc_mcam_verify_counter(mcam, req->hdr.pcifunc, req->cntr); in rvu_mbox_handler_npc_mcam_clear_counter()
3140 rvu_write64(rvu, blkaddr, NPC_AF_MATCH_STATX(req->cntr), 0x00); in rvu_mbox_handler_npc_mcam_clear_counter()
3157 err = npc_mcam_verify_counter(mcam, req->hdr.pcifunc, req->cntr); in rvu_mbox_handler_npc_mcam_counter_stats()
3162 rsp->stat = rvu_read64(rvu, blkaddr, NPC_AF_MATCH_STATX(req->cntr)); in rvu_mbox_handler_npc_mcam_counter_stats()
3179 u16 cntr = NPC_MCAM_ENTRY_INVALID; in rvu_mbox_handler_npc_mcam_alloc_and_write_entry() local
3229 cntr = cntr_rsp.cntr; in rvu_mbox_handler_npc_mcam_alloc_and_write_entry()
3243 npc_map_mcam_entry_and_cntr(rvu, mcam, blkaddr, entry, cntr); in rvu_mbox_handler_npc_mcam_alloc_and_write_entry()
3247 rsp->cntr = cntr; in rvu_mbox_handler_npc_mcam_alloc_and_write_entry()
3445 u16 index, cntr; in rvu_mbox_handler_npc_mcam_entry_stats() local
3468 cntr = regval & 0x1FF; in rvu_mbox_handler_npc_mcam_entry_stats()
3471 rsp->stat = rvu_read64(rvu, blkaddr, NPC_AF_MATCH_STATX(cntr)); in rvu_mbox_handler_npc_mcam_entry_stats()