Lines Matching refs:ipolicer

5626 	struct nix_ipolicer *ipolicer;  in nix_setup_ipolicers()  local
5632 hw->cap.ipolicer = false; in nix_setup_ipolicers()
5636 hw->cap.ipolicer = true; in nix_setup_ipolicers()
5637 nix_hw->ipolicer = devm_kcalloc(rvu->dev, BAND_PROF_NUM_LAYERS, in nix_setup_ipolicers()
5638 sizeof(*ipolicer), GFP_KERNEL); in nix_setup_ipolicers()
5639 if (!nix_hw->ipolicer) in nix_setup_ipolicers()
5645 ipolicer = &nix_hw->ipolicer[layer]; in nix_setup_ipolicers()
5648 ipolicer->band_prof.max = cfg & 0XFFFF; in nix_setup_ipolicers()
5651 ipolicer->band_prof.max = (cfg >> 16) & 0XFFFF; in nix_setup_ipolicers()
5654 ipolicer->band_prof.max = (cfg >> 32) & 0XFFFF; in nix_setup_ipolicers()
5658 if (!ipolicer->band_prof.max) in nix_setup_ipolicers()
5661 err = rvu_alloc_bitmap(&ipolicer->band_prof); in nix_setup_ipolicers()
5665 ipolicer->pfvf_map = devm_kcalloc(rvu->dev, in nix_setup_ipolicers()
5666 ipolicer->band_prof.max, in nix_setup_ipolicers()
5668 if (!ipolicer->pfvf_map) in nix_setup_ipolicers()
5671 ipolicer->match_id = devm_kcalloc(rvu->dev, in nix_setup_ipolicers()
5672 ipolicer->band_prof.max, in nix_setup_ipolicers()
5674 if (!ipolicer->match_id) in nix_setup_ipolicers()
5678 prof_idx < ipolicer->band_prof.max; prof_idx++) { in nix_setup_ipolicers()
5680 ipolicer->pfvf_map[prof_idx] = 0x00; in nix_setup_ipolicers()
5700 ipolicer->ref_count = devm_kcalloc(rvu->dev, in nix_setup_ipolicers()
5701 ipolicer->band_prof.max, in nix_setup_ipolicers()
5703 if (!ipolicer->ref_count) in nix_setup_ipolicers()
5717 struct nix_ipolicer *ipolicer; in nix_ipolicer_freemem() local
5720 if (!rvu->hw->cap.ipolicer) in nix_ipolicer_freemem()
5724 ipolicer = &nix_hw->ipolicer[layer]; in nix_ipolicer_freemem()
5726 if (!ipolicer->band_prof.max) in nix_ipolicer_freemem()
5729 kfree(ipolicer->band_prof.bmap); in nix_ipolicer_freemem()
5736 struct nix_ipolicer *ipolicer; in nix_verify_bandprof() local
5743 ipolicer = &nix_hw->ipolicer[layer]; in nix_verify_bandprof()
5744 if (prof_idx >= ipolicer->band_prof.max) in nix_verify_bandprof()
5750 if (pcifunc && ipolicer->pfvf_map[prof_idx] != pcifunc) in nix_verify_bandprof()
5770 ipolicer = &nix_hw->ipolicer[hi_layer]; in nix_verify_bandprof()
5772 if (prof_idx >= ipolicer->band_prof.max || in nix_verify_bandprof()
5773 ipolicer->pfvf_map[prof_idx] != pcifunc) in nix_verify_bandprof()
5785 struct nix_ipolicer *ipolicer; in rvu_mbox_handler_nix_bandprof_alloc() local
5788 if (!rvu->hw->cap.ipolicer) in rvu_mbox_handler_nix_bandprof_alloc()
5802 ipolicer = &nix_hw->ipolicer[layer]; in rvu_mbox_handler_nix_bandprof_alloc()
5808 prof = rvu_alloc_rsrc(&ipolicer->band_prof); in rvu_mbox_handler_nix_bandprof_alloc()
5813 ipolicer->pfvf_map[prof] = pcifunc; in rvu_mbox_handler_nix_bandprof_alloc()
5823 struct nix_ipolicer *ipolicer; in nix_free_all_bandprof() local
5826 if (!rvu->hw->cap.ipolicer) in nix_free_all_bandprof()
5838 ipolicer = &nix_hw->ipolicer[layer]; in nix_free_all_bandprof()
5840 for (prof_idx = 0; prof_idx < ipolicer->band_prof.max; prof_idx++) { in nix_free_all_bandprof()
5841 if (ipolicer->pfvf_map[prof_idx] != pcifunc) in nix_free_all_bandprof()
5846 ipolicer->match_id[prof_idx]) in nix_free_all_bandprof()
5849 ipolicer->pfvf_map[prof_idx] = 0x00; in nix_free_all_bandprof()
5850 ipolicer->match_id[prof_idx] = 0; in nix_free_all_bandprof()
5851 rvu_free_rsrc(&ipolicer->band_prof, prof_idx); in nix_free_all_bandprof()
5864 struct nix_ipolicer *ipolicer; in rvu_mbox_handler_nix_bandprof_free() local
5870 if (!rvu->hw->cap.ipolicer) in rvu_mbox_handler_nix_bandprof_free()
5885 ipolicer = &nix_hw->ipolicer[layer]; in rvu_mbox_handler_nix_bandprof_free()
5890 if (prof_idx >= ipolicer->band_prof.max || in rvu_mbox_handler_nix_bandprof_free()
5891 ipolicer->pfvf_map[prof_idx] != pcifunc) in rvu_mbox_handler_nix_bandprof_free()
5896 ipolicer->match_id[prof_idx]) in rvu_mbox_handler_nix_bandprof_free()
5899 ipolicer->pfvf_map[prof_idx] = 0x00; in rvu_mbox_handler_nix_bandprof_free()
5900 ipolicer->match_id[prof_idx] = 0; in rvu_mbox_handler_nix_bandprof_free()
5901 rvu_free_rsrc(&ipolicer->band_prof, prof_idx); in rvu_mbox_handler_nix_bandprof_free()
5952 struct nix_ipolicer *ipolicer; in rvu_nix_setup_ratelimit_aggr() local
5956 if (!rvu->hw->cap.ipolicer) in rvu_nix_setup_ratelimit_aggr()
5979 ipolicer = &nix_hw->ipolicer[BAND_PROF_LEAF_LAYER]; in rvu_nix_setup_ratelimit_aggr()
5980 ipolicer->match_id[leaf_prof] = match_id; in rvu_nix_setup_ratelimit_aggr()
5983 for (idx = 0; idx < ipolicer->band_prof.max; idx++) { in rvu_nix_setup_ratelimit_aggr()
5986 if (ipolicer->match_id[idx] != match_id) in rvu_nix_setup_ratelimit_aggr()
5993 if (idx == ipolicer->band_prof.max) in rvu_nix_setup_ratelimit_aggr()
6008 ipolicer = &nix_hw->ipolicer[BAND_PROF_MID_LAYER]; in rvu_nix_setup_ratelimit_aggr()
6027 ipolicer->ref_count[mid_prof]++; in rvu_nix_setup_ratelimit_aggr()
6036 mid_prof = rvu_alloc_rsrc(&ipolicer->band_prof); in rvu_nix_setup_ratelimit_aggr()
6044 ipolicer->pfvf_map[mid_prof] = 0x00; in rvu_nix_setup_ratelimit_aggr()
6045 ipolicer->ref_count[mid_prof] = 0; in rvu_nix_setup_ratelimit_aggr()
6089 ipolicer->ref_count[mid_prof]++; in rvu_nix_setup_ratelimit_aggr()
6099 ipolicer->ref_count[mid_prof]--; in rvu_nix_setup_ratelimit_aggr()
6104 ipolicer->ref_count[mid_prof]++; in rvu_nix_setup_ratelimit_aggr()
6117 struct nix_ipolicer *ipolicer; in nix_clear_ratelimit_aggr() local
6138 ipolicer = &nix_hw->ipolicer[BAND_PROF_MID_LAYER]; in nix_clear_ratelimit_aggr()
6139 ipolicer->ref_count[mid_prof]--; in nix_clear_ratelimit_aggr()
6141 if (!ipolicer->ref_count[mid_prof]) { in nix_clear_ratelimit_aggr()
6142 ipolicer->pfvf_map[mid_prof] = 0x00; in nix_clear_ratelimit_aggr()
6143 rvu_free_rsrc(&ipolicer->band_prof, mid_prof); in nix_clear_ratelimit_aggr()
6150 struct nix_ipolicer *ipolicer; in rvu_mbox_handler_nix_bandprof_get_hwinfo() local
6155 if (!rvu->hw->cap.ipolicer) in rvu_mbox_handler_nix_bandprof_get_hwinfo()
6168 ipolicer = &nix_hw->ipolicer[layer]; in rvu_mbox_handler_nix_bandprof_get_hwinfo()
6169 rsp->prof_count[layer] = rvu_rsrc_free_count(&ipolicer->band_prof); in rvu_mbox_handler_nix_bandprof_get_hwinfo()