Lines Matching refs:fdir

176 	struct ice_vf_fdir *fdir = &vf->fdir;  in ice_vc_fdir_alloc_prof()  local
178 if (!fdir->fdir_prof) { in ice_vc_fdir_alloc_prof()
179 fdir->fdir_prof = devm_kcalloc(ice_pf_to_dev(vf->pf), in ice_vc_fdir_alloc_prof()
181 sizeof(*fdir->fdir_prof), in ice_vc_fdir_alloc_prof()
183 if (!fdir->fdir_prof) in ice_vc_fdir_alloc_prof()
187 if (!fdir->fdir_prof[flow]) { in ice_vc_fdir_alloc_prof()
188 fdir->fdir_prof[flow] = devm_kzalloc(ice_pf_to_dev(vf->pf), in ice_vc_fdir_alloc_prof()
189 sizeof(**fdir->fdir_prof), in ice_vc_fdir_alloc_prof()
191 if (!fdir->fdir_prof[flow]) in ice_vc_fdir_alloc_prof()
206 struct ice_vf_fdir *fdir = &vf->fdir; in ice_vc_fdir_free_prof() local
208 if (!fdir->fdir_prof) in ice_vc_fdir_free_prof()
211 if (!fdir->fdir_prof[flow]) in ice_vc_fdir_free_prof()
214 devm_kfree(ice_pf_to_dev(vf->pf), fdir->fdir_prof[flow]); in ice_vc_fdir_free_prof()
215 fdir->fdir_prof[flow] = NULL; in ice_vc_fdir_free_prof()
224 struct ice_vf_fdir *fdir = &vf->fdir; in ice_vc_fdir_free_prof_all() local
227 if (!fdir->fdir_prof) in ice_vc_fdir_free_prof_all()
233 devm_kfree(ice_pf_to_dev(vf->pf), fdir->fdir_prof); in ice_vc_fdir_free_prof_all()
234 fdir->fdir_prof = NULL; in ice_vc_fdir_free_prof_all()
481 struct ice_vf_fdir *fdir = &vf->fdir; in ice_vc_fdir_rem_prof() local
492 if (!fdir->fdir_prof || !fdir->fdir_prof[flow]) in ice_vc_fdir_rem_prof()
495 vf_prof = fdir->fdir_prof[flow]; in ice_vc_fdir_rem_prof()
503 if (!fdir->prof_entry_cnt[flow][tun]) in ice_vc_fdir_rem_prof()
509 for (i = 0; i < fdir->prof_entry_cnt[flow][tun]; i++) in ice_vc_fdir_rem_prof()
526 fdir->prof_entry_cnt[flow][tun] = 0; in ice_vc_fdir_rem_prof()
559 struct ice_vf_fdir *fdir = &vf->fdir; in ice_vc_fdir_write_flow_prof() local
583 vf_prof = fdir->fdir_prof[flow]; in ice_vc_fdir_write_flow_prof()
592 if (fdir->fdir_fltr_cnt[flow][tun]) { in ice_vc_fdir_write_flow_prof()
635 fdir->prof_entry_cnt[flow][tun] = 0; in ice_vc_fdir_write_flow_prof()
640 fdir->prof_entry_cnt[flow][tun]++; in ice_vc_fdir_write_flow_prof()
645 fdir->prof_entry_cnt[flow][tun]++; in ice_vc_fdir_write_flow_prof()
1097 list_for_each_entry(desc, &vf->fdir.fdir_rule_list, fltr_node) { in ice_vc_fdir_is_dup_fltr()
1127 i = idr_alloc(&vf->fdir.fdir_rule_idr, conf, 0, in ice_vc_fdir_insert_entry()
1133 list_add(&input->fltr_node, &vf->fdir.fdir_rule_list); in ice_vc_fdir_insert_entry()
1149 idr_remove(&vf->fdir.fdir_rule_idr, id); in ice_vc_fdir_remove_entry()
1163 return idr_find(&vf->fdir.fdir_rule_idr, id); in ice_vc_fdir_lookup_entry()
1176 &vf->fdir.fdir_rule_list, fltr_node) { in ice_vc_fdir_flush_entry()
1254 struct ice_vf_fdir *fdir; in ice_vf_fdir_timer() local
1259 fdir = container_of(ctx_irq, struct ice_vf_fdir, ctx_irq); in ice_vf_fdir_timer()
1260 vf = container_of(fdir, struct ice_vf, fdir); in ice_vf_fdir_timer()
1261 ctx_done = &fdir->ctx_done; in ice_vf_fdir_timer()
1263 spin_lock_irqsave(&fdir->ctx_lock, flags); in ice_vf_fdir_timer()
1265 spin_unlock_irqrestore(&fdir->ctx_lock, flags); in ice_vf_fdir_timer()
1276 spin_unlock_irqrestore(&fdir->ctx_lock, flags); in ice_vf_fdir_timer()
1295 struct ice_vf_fdir *fdir; in ice_vc_fdir_irq_handler() local
1303 fdir = &vf->fdir; in ice_vc_fdir_irq_handler()
1304 ctx_done = &fdir->ctx_done; in ice_vc_fdir_irq_handler()
1305 ctx_irq = &fdir->ctx_irq; in ice_vc_fdir_irq_handler()
1307 spin_lock_irqsave(&fdir->ctx_lock, flags); in ice_vc_fdir_irq_handler()
1309 spin_unlock_irqrestore(&fdir->ctx_lock, flags); in ice_vc_fdir_irq_handler()
1321 spin_unlock_irqrestore(&fdir->ctx_lock, flags); in ice_vc_fdir_irq_handler()
1484 vf->fdir.fdir_fltr_cnt[conf->input.flow_type][is_tun]++; in ice_vc_add_fdir_fltr_post()
1548 vf->fdir.fdir_fltr_cnt[conf->input.flow_type][is_tun]--; in ice_vc_del_fdir_fltr_post()
1601 ctx = &vf->fdir.ctx_done; in ice_flush_fdir_ctx()
1602 spin_lock_irqsave(&vf->fdir.ctx_lock, flags); in ice_flush_fdir_ctx()
1604 spin_unlock_irqrestore(&vf->fdir.ctx_lock, flags); in ice_flush_fdir_ctx()
1607 spin_unlock_irqrestore(&vf->fdir.ctx_lock, flags); in ice_flush_fdir_ctx()
1628 spin_lock_irqsave(&vf->fdir.ctx_lock, flags); in ice_flush_fdir_ctx()
1630 spin_unlock_irqrestore(&vf->fdir.ctx_lock, flags); in ice_flush_fdir_ctx()
1640 spin_lock_irqsave(&vf->fdir.ctx_lock, flags); in ice_flush_fdir_ctx()
1642 spin_unlock_irqrestore(&vf->fdir.ctx_lock, flags); in ice_flush_fdir_ctx()
1663 ctx = &vf->fdir.ctx_irq; in ice_vc_fdir_set_irq_ctx()
1664 spin_lock_irqsave(&vf->fdir.ctx_lock, flags); in ice_vc_fdir_set_irq_ctx()
1665 if ((vf->fdir.ctx_irq.flags & ICE_VF_FDIR_CTX_VALID) || in ice_vc_fdir_set_irq_ctx()
1666 (vf->fdir.ctx_done.flags & ICE_VF_FDIR_CTX_VALID)) { in ice_vc_fdir_set_irq_ctx()
1667 spin_unlock_irqrestore(&vf->fdir.ctx_lock, flags); in ice_vc_fdir_set_irq_ctx()
1673 spin_unlock_irqrestore(&vf->fdir.ctx_lock, flags); in ice_vc_fdir_set_irq_ctx()
1693 struct ice_vf_fdir_ctx *ctx = &vf->fdir.ctx_irq; in ice_vc_fdir_clear_irq_ctx()
1697 spin_lock_irqsave(&vf->fdir.ctx_lock, flags); in ice_vc_fdir_clear_irq_ctx()
1699 spin_unlock_irqrestore(&vf->fdir.ctx_lock, flags); in ice_vc_fdir_clear_irq_ctx()
1919 struct ice_vf_fdir *fdir = &vf->fdir; in ice_vf_fdir_init() local
1921 idr_init(&fdir->fdir_rule_idr); in ice_vf_fdir_init()
1922 INIT_LIST_HEAD(&fdir->fdir_rule_list); in ice_vf_fdir_init()
1924 spin_lock_init(&fdir->ctx_lock); in ice_vf_fdir_init()
1925 fdir->ctx_irq.flags = 0; in ice_vf_fdir_init()
1926 fdir->ctx_done.flags = 0; in ice_vf_fdir_init()
1936 idr_destroy(&vf->fdir.fdir_rule_idr); in ice_vf_fdir_exit()