Lines Matching refs:fdir

366 	struct ice_vf_fdir *fdir = &vf->fdir;  in ice_vc_fdir_alloc_prof()  local
368 if (!fdir->fdir_prof) { in ice_vc_fdir_alloc_prof()
369 fdir->fdir_prof = devm_kcalloc(ice_pf_to_dev(vf->pf), in ice_vc_fdir_alloc_prof()
371 sizeof(*fdir->fdir_prof), in ice_vc_fdir_alloc_prof()
373 if (!fdir->fdir_prof) in ice_vc_fdir_alloc_prof()
377 if (!fdir->fdir_prof[flow]) { in ice_vc_fdir_alloc_prof()
378 fdir->fdir_prof[flow] = devm_kzalloc(ice_pf_to_dev(vf->pf), in ice_vc_fdir_alloc_prof()
379 sizeof(**fdir->fdir_prof), in ice_vc_fdir_alloc_prof()
381 if (!fdir->fdir_prof[flow]) in ice_vc_fdir_alloc_prof()
396 struct ice_vf_fdir *fdir = &vf->fdir; in ice_vc_fdir_free_prof() local
398 if (!fdir->fdir_prof) in ice_vc_fdir_free_prof()
401 if (!fdir->fdir_prof[flow]) in ice_vc_fdir_free_prof()
404 devm_kfree(ice_pf_to_dev(vf->pf), fdir->fdir_prof[flow]); in ice_vc_fdir_free_prof()
405 fdir->fdir_prof[flow] = NULL; in ice_vc_fdir_free_prof()
414 struct ice_vf_fdir *fdir = &vf->fdir; in ice_vc_fdir_free_prof_all() local
417 if (!fdir->fdir_prof) in ice_vc_fdir_free_prof_all()
423 devm_kfree(ice_pf_to_dev(vf->pf), fdir->fdir_prof); in ice_vc_fdir_free_prof_all()
424 fdir->fdir_prof = NULL; in ice_vc_fdir_free_prof_all()
671 struct ice_vf_fdir *fdir = &vf->fdir; in ice_vc_fdir_rem_prof() local
682 if (!fdir->fdir_prof || !fdir->fdir_prof[flow]) in ice_vc_fdir_rem_prof()
685 vf_prof = fdir->fdir_prof[flow]; in ice_vc_fdir_rem_prof()
693 if (!fdir->prof_entry_cnt[flow][tun]) in ice_vc_fdir_rem_prof()
699 for (i = 0; i < fdir->prof_entry_cnt[flow][tun]; i++) in ice_vc_fdir_rem_prof()
716 fdir->prof_entry_cnt[flow][tun] = 0; in ice_vc_fdir_rem_prof()
749 struct ice_vf_fdir *fdir = &vf->fdir; in ice_vc_fdir_write_flow_prof() local
774 vf_prof = fdir->fdir_prof[flow]; in ice_vc_fdir_write_flow_prof()
783 if (fdir->fdir_fltr_cnt[flow][tun]) { in ice_vc_fdir_write_flow_prof()
829 fdir->prof_entry_cnt[flow][tun] = 0; in ice_vc_fdir_write_flow_prof()
834 fdir->prof_entry_cnt[flow][tun]++; in ice_vc_fdir_write_flow_prof()
839 fdir->prof_entry_cnt[flow][tun]++; in ice_vc_fdir_write_flow_prof()
1368 list_for_each_entry(desc, &vf->fdir.fdir_rule_list, fltr_node) { in ice_vc_fdir_is_dup_fltr()
1398 i = idr_alloc(&vf->fdir.fdir_rule_idr, conf, 0, in ice_vc_fdir_insert_entry()
1404 list_add(&input->fltr_node, &vf->fdir.fdir_rule_list); in ice_vc_fdir_insert_entry()
1420 idr_remove(&vf->fdir.fdir_rule_idr, id); in ice_vc_fdir_remove_entry()
1434 return idr_find(&vf->fdir.fdir_rule_idr, id); in ice_vc_fdir_lookup_entry()
1447 &vf->fdir.fdir_rule_list, fltr_node) { in ice_vc_fdir_flush_entry()
1527 struct ice_vf_fdir *fdir; in ice_vf_fdir_timer() local
1532 fdir = container_of(ctx_irq, struct ice_vf_fdir, ctx_irq); in ice_vf_fdir_timer()
1533 vf = container_of(fdir, struct ice_vf, fdir); in ice_vf_fdir_timer()
1534 ctx_done = &fdir->ctx_done; in ice_vf_fdir_timer()
1536 spin_lock_irqsave(&fdir->ctx_lock, flags); in ice_vf_fdir_timer()
1538 spin_unlock_irqrestore(&fdir->ctx_lock, flags); in ice_vf_fdir_timer()
1549 spin_unlock_irqrestore(&fdir->ctx_lock, flags); in ice_vf_fdir_timer()
1567 struct ice_vf_fdir *fdir; in ice_vc_fdir_irq_handler() local
1575 fdir = &vf->fdir; in ice_vc_fdir_irq_handler()
1576 ctx_done = &fdir->ctx_done; in ice_vc_fdir_irq_handler()
1577 ctx_irq = &fdir->ctx_irq; in ice_vc_fdir_irq_handler()
1579 spin_lock_irqsave(&fdir->ctx_lock, flags); in ice_vc_fdir_irq_handler()
1581 spin_unlock_irqrestore(&fdir->ctx_lock, flags); in ice_vc_fdir_irq_handler()
1593 spin_unlock_irqrestore(&fdir->ctx_lock, flags); in ice_vc_fdir_irq_handler()
1751 vf->fdir.fdir_fltr_cnt[conf->input.flow_type][is_tun]++; in ice_vc_add_fdir_fltr_post()
1815 vf->fdir.fdir_fltr_cnt[conf->input.flow_type][is_tun]--; in ice_vc_del_fdir_fltr_post()
1867 ctx = &vf->fdir.ctx_done; in ice_flush_fdir_ctx()
1868 spin_lock_irqsave(&vf->fdir.ctx_lock, flags); in ice_flush_fdir_ctx()
1870 spin_unlock_irqrestore(&vf->fdir.ctx_lock, flags); in ice_flush_fdir_ctx()
1873 spin_unlock_irqrestore(&vf->fdir.ctx_lock, flags); in ice_flush_fdir_ctx()
1894 spin_lock_irqsave(&vf->fdir.ctx_lock, flags); in ice_flush_fdir_ctx()
1896 spin_unlock_irqrestore(&vf->fdir.ctx_lock, flags); in ice_flush_fdir_ctx()
1906 spin_lock_irqsave(&vf->fdir.ctx_lock, flags); in ice_flush_fdir_ctx()
1908 spin_unlock_irqrestore(&vf->fdir.ctx_lock, flags); in ice_flush_fdir_ctx()
1928 ctx = &vf->fdir.ctx_irq; in ice_vc_fdir_set_irq_ctx()
1929 spin_lock_irqsave(&vf->fdir.ctx_lock, flags); in ice_vc_fdir_set_irq_ctx()
1930 if ((vf->fdir.ctx_irq.flags & ICE_VF_FDIR_CTX_VALID) || in ice_vc_fdir_set_irq_ctx()
1931 (vf->fdir.ctx_done.flags & ICE_VF_FDIR_CTX_VALID)) { in ice_vc_fdir_set_irq_ctx()
1932 spin_unlock_irqrestore(&vf->fdir.ctx_lock, flags); in ice_vc_fdir_set_irq_ctx()
1938 spin_unlock_irqrestore(&vf->fdir.ctx_lock, flags); in ice_vc_fdir_set_irq_ctx()
1958 struct ice_vf_fdir_ctx *ctx = &vf->fdir.ctx_irq; in ice_vc_fdir_clear_irq_ctx()
1962 spin_lock_irqsave(&vf->fdir.ctx_lock, flags); in ice_vc_fdir_clear_irq_ctx()
1964 spin_unlock_irqrestore(&vf->fdir.ctx_lock, flags); in ice_vc_fdir_clear_irq_ctx()
2184 struct ice_vf_fdir *fdir = &vf->fdir; in ice_vf_fdir_init() local
2186 idr_init(&fdir->fdir_rule_idr); in ice_vf_fdir_init()
2187 INIT_LIST_HEAD(&fdir->fdir_rule_list); in ice_vf_fdir_init()
2189 spin_lock_init(&fdir->ctx_lock); in ice_vf_fdir_init()
2190 fdir->ctx_irq.flags = 0; in ice_vf_fdir_init()
2191 fdir->ctx_done.flags = 0; in ice_vf_fdir_init()
2201 idr_destroy(&vf->fdir.fdir_rule_idr); in ice_vf_fdir_exit()