Lines Matching refs:l2_node
674 struct bnxt_tc_l2_node *l2_node = flow_node->l2_node; in bnxt_tc_put_l2_node() local
680 if (--l2_node->refcount == 0) { in bnxt_tc_put_l2_node()
681 rc = rhashtable_remove_fast(&tc_info->l2_table, &l2_node->node, in bnxt_tc_put_l2_node()
687 kfree_rcu(l2_node, rcu); in bnxt_tc_put_l2_node()
697 struct bnxt_tc_l2_node *l2_node; in bnxt_tc_get_l2_node() local
700 l2_node = rhashtable_lookup_fast(l2_table, l2_key, ht_params); in bnxt_tc_get_l2_node()
701 if (!l2_node) { in bnxt_tc_get_l2_node()
702 l2_node = kzalloc(sizeof(*l2_node), GFP_KERNEL); in bnxt_tc_get_l2_node()
703 if (!l2_node) { in bnxt_tc_get_l2_node()
708 l2_node->key = *l2_key; in bnxt_tc_get_l2_node()
709 rc = rhashtable_insert_fast(l2_table, &l2_node->node, in bnxt_tc_get_l2_node()
712 kfree_rcu(l2_node, rcu); in bnxt_tc_get_l2_node()
718 INIT_LIST_HEAD(&l2_node->common_l2_flows); in bnxt_tc_get_l2_node()
720 return l2_node; in bnxt_tc_get_l2_node()
733 struct bnxt_tc_l2_node *l2_node; in bnxt_tc_get_ref_flow_handle() local
735 l2_node = bnxt_tc_get_l2_node(bp, &tc_info->l2_table, in bnxt_tc_get_ref_flow_handle()
738 if (!l2_node) in bnxt_tc_get_ref_flow_handle()
744 if (l2_node->refcount > 0) { in bnxt_tc_get_ref_flow_handle()
745 ref_flow_node = list_first_entry(&l2_node->common_l2_flows, in bnxt_tc_get_ref_flow_handle()
757 flow_node->l2_node = l2_node; in bnxt_tc_get_ref_flow_handle()
758 list_add(&flow_node->l2_list_node, &l2_node->common_l2_flows); in bnxt_tc_get_ref_flow_handle()
759 l2_node->refcount++; in bnxt_tc_get_ref_flow_handle()