Lines Matching refs:fdir

174 	struct ice_vf_fdir *fdir = &vf->fdir;  in ice_vc_fdir_alloc_prof()  local
176 if (!fdir->fdir_prof) { in ice_vc_fdir_alloc_prof()
177 fdir->fdir_prof = devm_kcalloc(ice_pf_to_dev(vf->pf), in ice_vc_fdir_alloc_prof()
179 sizeof(*fdir->fdir_prof), in ice_vc_fdir_alloc_prof()
181 if (!fdir->fdir_prof) in ice_vc_fdir_alloc_prof()
185 if (!fdir->fdir_prof[flow]) { in ice_vc_fdir_alloc_prof()
186 fdir->fdir_prof[flow] = devm_kzalloc(ice_pf_to_dev(vf->pf), in ice_vc_fdir_alloc_prof()
187 sizeof(**fdir->fdir_prof), in ice_vc_fdir_alloc_prof()
189 if (!fdir->fdir_prof[flow]) in ice_vc_fdir_alloc_prof()
204 struct ice_vf_fdir *fdir = &vf->fdir; in ice_vc_fdir_free_prof() local
206 if (!fdir->fdir_prof) in ice_vc_fdir_free_prof()
209 if (!fdir->fdir_prof[flow]) in ice_vc_fdir_free_prof()
212 devm_kfree(ice_pf_to_dev(vf->pf), fdir->fdir_prof[flow]); in ice_vc_fdir_free_prof()
213 fdir->fdir_prof[flow] = NULL; in ice_vc_fdir_free_prof()
222 struct ice_vf_fdir *fdir = &vf->fdir; in ice_vc_fdir_free_prof_all() local
225 if (!fdir->fdir_prof) in ice_vc_fdir_free_prof_all()
231 devm_kfree(ice_pf_to_dev(vf->pf), fdir->fdir_prof); in ice_vc_fdir_free_prof_all()
232 fdir->fdir_prof = NULL; in ice_vc_fdir_free_prof_all()
479 struct ice_vf_fdir *fdir = &vf->fdir; in ice_vc_fdir_rem_prof() local
490 if (!fdir->fdir_prof || !fdir->fdir_prof[flow]) in ice_vc_fdir_rem_prof()
493 vf_prof = fdir->fdir_prof[flow]; in ice_vc_fdir_rem_prof()
502 if (!fdir->prof_entry_cnt[flow][tun]) in ice_vc_fdir_rem_prof()
505 for (i = 0; i < fdir->prof_entry_cnt[flow][tun]; i++) in ice_vc_fdir_rem_prof()
522 fdir->prof_entry_cnt[flow][tun] = 0; in ice_vc_fdir_rem_prof()
544 static void ice_vc_fdir_reset_cnt_all(struct ice_vf_fdir *fdir) in ice_vc_fdir_reset_cnt_all() argument
550 fdir->fdir_fltr_cnt[flow][0] = 0; in ice_vc_fdir_reset_cnt_all()
551 fdir->fdir_fltr_cnt[flow][1] = 0; in ice_vc_fdir_reset_cnt_all()
554 fdir->fdir_fltr_cnt_total = 0; in ice_vc_fdir_reset_cnt_all()
572 list_for_each_entry(desc, &vf->fdir.fdir_rule_list, fltr_node) { in ice_vc_fdir_has_prof_conflict()
638 struct ice_vf_fdir *fdir = &vf->fdir; in ice_vc_fdir_write_flow_prof() local
661 vf_prof = fdir->fdir_prof[flow]; in ice_vc_fdir_write_flow_prof()
670 if (fdir->fdir_fltr_cnt[flow][tun]) { in ice_vc_fdir_write_flow_prof()
710 fdir->prof_entry_cnt[flow][tun] = 0; in ice_vc_fdir_write_flow_prof()
715 fdir->prof_entry_cnt[flow][tun]++; in ice_vc_fdir_write_flow_prof()
720 fdir->prof_entry_cnt[flow][tun]++; in ice_vc_fdir_write_flow_prof()
1294 list_for_each_entry(desc, &vf->fdir.fdir_rule_list, fltr_node) { in ice_vc_fdir_is_dup_fltr()
1324 i = idr_alloc(&vf->fdir.fdir_rule_idr, conf, 0, in ice_vc_fdir_insert_entry()
1330 list_add(&input->fltr_node, &vf->fdir.fdir_rule_list); in ice_vc_fdir_insert_entry()
1346 idr_remove(&vf->fdir.fdir_rule_idr, id); in ice_vc_fdir_remove_entry()
1360 return idr_find(&vf->fdir.fdir_rule_idr, id); in ice_vc_fdir_lookup_entry()
1373 &vf->fdir.fdir_rule_list, fltr_node) { in ice_vc_fdir_flush_entry()
1456 struct ice_vf_fdir *fdir; in ice_vf_fdir_timer() local
1461 fdir = container_of(ctx_irq, struct ice_vf_fdir, ctx_irq); in ice_vf_fdir_timer()
1462 vf = container_of(fdir, struct ice_vf, fdir); in ice_vf_fdir_timer()
1463 ctx_done = &fdir->ctx_done; in ice_vf_fdir_timer()
1465 spin_lock_irqsave(&fdir->ctx_lock, flags); in ice_vf_fdir_timer()
1467 spin_unlock_irqrestore(&fdir->ctx_lock, flags); in ice_vf_fdir_timer()
1478 spin_unlock_irqrestore(&fdir->ctx_lock, flags); in ice_vf_fdir_timer()
1497 struct ice_vf_fdir *fdir; in ice_vc_fdir_irq_handler() local
1505 fdir = &vf->fdir; in ice_vc_fdir_irq_handler()
1506 ctx_done = &fdir->ctx_done; in ice_vc_fdir_irq_handler()
1507 ctx_irq = &fdir->ctx_irq; in ice_vc_fdir_irq_handler()
1509 spin_lock_irqsave(&fdir->ctx_lock, flags); in ice_vc_fdir_irq_handler()
1511 spin_unlock_irqrestore(&fdir->ctx_lock, flags); in ice_vc_fdir_irq_handler()
1523 spin_unlock_irqrestore(&fdir->ctx_lock, flags); in ice_vc_fdir_irq_handler()
1706 vf->fdir.fdir_fltr_cnt[conf->input.flow_type][is_tun]++; in ice_vc_add_fdir_fltr_post()
1707 vf->fdir.fdir_fltr_cnt_total++; in ice_vc_add_fdir_fltr_post()
1771 vf->fdir.fdir_fltr_cnt[conf->input.flow_type][is_tun]--; in ice_vc_del_fdir_fltr_post()
1772 vf->fdir.fdir_fltr_cnt_total--; in ice_vc_del_fdir_fltr_post()
1825 ctx = &vf->fdir.ctx_done; in ice_flush_fdir_ctx()
1826 spin_lock_irqsave(&vf->fdir.ctx_lock, flags); in ice_flush_fdir_ctx()
1828 spin_unlock_irqrestore(&vf->fdir.ctx_lock, flags); in ice_flush_fdir_ctx()
1831 spin_unlock_irqrestore(&vf->fdir.ctx_lock, flags); in ice_flush_fdir_ctx()
1852 spin_lock_irqsave(&vf->fdir.ctx_lock, flags); in ice_flush_fdir_ctx()
1854 spin_unlock_irqrestore(&vf->fdir.ctx_lock, flags); in ice_flush_fdir_ctx()
1864 spin_lock_irqsave(&vf->fdir.ctx_lock, flags); in ice_flush_fdir_ctx()
1866 spin_unlock_irqrestore(&vf->fdir.ctx_lock, flags); in ice_flush_fdir_ctx()
1887 ctx = &vf->fdir.ctx_irq; in ice_vc_fdir_set_irq_ctx()
1888 spin_lock_irqsave(&vf->fdir.ctx_lock, flags); in ice_vc_fdir_set_irq_ctx()
1889 if ((vf->fdir.ctx_irq.flags & ICE_VF_FDIR_CTX_VALID) || in ice_vc_fdir_set_irq_ctx()
1890 (vf->fdir.ctx_done.flags & ICE_VF_FDIR_CTX_VALID)) { in ice_vc_fdir_set_irq_ctx()
1891 spin_unlock_irqrestore(&vf->fdir.ctx_lock, flags); in ice_vc_fdir_set_irq_ctx()
1897 spin_unlock_irqrestore(&vf->fdir.ctx_lock, flags); in ice_vc_fdir_set_irq_ctx()
1917 struct ice_vf_fdir_ctx *ctx = &vf->fdir.ctx_irq; in ice_vc_fdir_clear_irq_ctx()
1921 spin_lock_irqsave(&vf->fdir.ctx_lock, flags); in ice_vc_fdir_clear_irq_ctx()
1923 spin_unlock_irqrestore(&vf->fdir.ctx_lock, flags); in ice_vc_fdir_clear_irq_ctx()
2109 vf->fdir.fdir_fltr_cnt_total >= ICE_VF_MAX_FDIR_FILTERS) { in ice_vc_add_fdir_fltr()
2316 struct ice_vf_fdir *fdir = &vf->fdir; in ice_vc_del_fdir_fltr() local
2390 if (fdir->fdir_fltr_cnt[flow][is_tun] == 1) in ice_vc_del_fdir_fltr()
2413 struct ice_vf_fdir *fdir = &vf->fdir; in ice_vf_fdir_init() local
2415 idr_init(&fdir->fdir_rule_idr); in ice_vf_fdir_init()
2416 INIT_LIST_HEAD(&fdir->fdir_rule_list); in ice_vf_fdir_init()
2418 spin_lock_init(&fdir->ctx_lock); in ice_vf_fdir_init()
2419 fdir->ctx_irq.flags = 0; in ice_vf_fdir_init()
2420 fdir->ctx_done.flags = 0; in ice_vf_fdir_init()
2421 ice_vc_fdir_reset_cnt_all(fdir); in ice_vf_fdir_init()
2431 idr_destroy(&vf->fdir.fdir_rule_idr); in ice_vf_fdir_exit()