Lines Matching refs:fib_node

571 	struct prestera_fib_node *fib_node;  in prestera_fib_node_find()  local
573 fib_node = rhashtable_lookup_fast(&sw->router->fib_ht, key, in prestera_fib_node_find()
575 return fib_node; in prestera_fib_node_find()
579 struct prestera_fib_node *fib_node) in __prestera_fib_node_destruct() argument
583 vr = fib_node->info.vr; in __prestera_fib_node_destruct()
584 prestera_hw_lpm_del(sw, vr->hw_vr_id, fib_node->key.addr.u.ipv4, in __prestera_fib_node_destruct()
585 fib_node->key.prefix_len); in __prestera_fib_node_destruct()
586 switch (fib_node->info.type) { in __prestera_fib_node_destruct()
588 prestera_nexthop_group_put(sw, fib_node->info.nh_grp); in __prestera_fib_node_destruct()
596 fib_node->info.type); in __prestera_fib_node_destruct()
603 struct prestera_fib_node *fib_node) in prestera_fib_node_destroy() argument
605 __prestera_fib_node_destruct(sw, fib_node); in prestera_fib_node_destroy()
606 rhashtable_remove_fast(&sw->router->fib_ht, &fib_node->ht_node, in prestera_fib_node_destroy()
608 kfree(fib_node); in prestera_fib_node_destroy()
626 struct prestera_fib_node *fib_node; in prestera_fib_node_create() local
631 fib_node = kzalloc(sizeof(*fib_node), GFP_KERNEL); in prestera_fib_node_create()
632 if (!fib_node) in prestera_fib_node_create()
635 memcpy(&fib_node->key, key, sizeof(*key)); in prestera_fib_node_create()
636 fib_node->info.type = fib_type; in prestera_fib_node_create()
642 fib_node->info.vr = vr; in prestera_fib_node_create()
652 fib_node->info.nh_grp = prestera_nexthop_group_get(sw, in prestera_fib_node_create()
654 if (IS_ERR(fib_node->info.nh_grp)) in prestera_fib_node_create()
657 grp_id = fib_node->info.nh_grp->grp_id; in prestera_fib_node_create()
669 err = rhashtable_insert_fast(&sw->router->fib_ht, &fib_node->ht_node, in prestera_fib_node_create()
674 return fib_node; in prestera_fib_node_create()
681 prestera_nexthop_group_put(sw, fib_node->info.nh_grp); in prestera_fib_node_create()
685 kfree(fib_node); in prestera_fib_node_create()