Lines Matching refs:ctl

80 static struct nhgrp_priv *get_nhgrp(struct nh_control *ctl,
338 struct nh_control *ctl; in nhgrp_free() local
374 ctl = nhg_priv->nh_control; in nhgrp_free()
375 if (unlink_nhgrp(ctl, nhg_priv) == NULL) { in nhgrp_free()
466 struct nh_control *ctl; in nhgrp_alloc() local
473 ctl = rh->nh_control; in nhgrp_alloc()
480 if (ctl->gr_head.hash_size == 0) { in nhgrp_alloc()
482 if (nhgrp_ctl_alloc_default(ctl, M_NOWAIT) == 0) { in nhgrp_alloc()
492 if (wn[i].nh->nh_priv->nh_control != ctl) { in nhgrp_alloc()
507 nhg_priv->nh_control = ctl; in nhgrp_alloc()
521 struct nh_control *ctl = key->nh_control; in nhgrp_get_nhgrp() local
523 nhg_priv = find_nhgrp(ctl, key); in nhgrp_get_nhgrp()
545 if (link_nhgrp(ctl, key) == 0) { in nhgrp_get_nhgrp()
565 get_nhgrp(struct nh_control *ctl, struct weightened_nhop *wn, int num_nhops, in get_nhgrp() argument
570 nhg = nhgrp_alloc(ctl->ctl_rh->rib_fibnum, ctl->ctl_rh->rib_family, in get_nhgrp()
592 append_nhops(struct nh_control *ctl, const struct nhgrp_object *gr_orig, in append_nhops() argument
625 nhg_priv = get_nhgrp(ctl, pnhops, curr_nhops, 0, perror); in append_nhops()
648 struct nh_control *ctl = rh->nh_control; in nhgrp_get_group() local
652 nhg_priv = get_nhgrp(ctl, wn, num_nhops, uidx, &error); in nhgrp_get_group()
670 struct nh_control *ctl = rh->nh_control; in nhgrp_get_filtered_group() local
706 mp_priv = get_nhgrp(ctl, pnhops, num_nhops, 0, &error); in nhgrp_get_filtered_group()
727 struct nh_control *ctl = rh->nh_control; in nhgrp_get_addition_group() local
747 nhg_priv = get_nhgrp(ctl, wn, 2, 0, &error); in nhgrp_get_addition_group()
750 nhg_priv = append_nhops(ctl, rnd_orig->rnd_nhgrp, &wn[0], 1, in nhgrp_get_addition_group()
926 struct nh_control *ctl; in nhgrp_get_count() local
929 ctl = rh->nh_control; in nhgrp_get_count()
931 NHOPS_RLOCK(ctl); in nhgrp_get_count()
932 count = ctl->gr_head.items_count; in nhgrp_get_count()
933 NHOPS_RUNLOCK(ctl); in nhgrp_get_count()
941 struct nh_control *ctl = rh->nh_control; in nhgrp_dump_sysctl() local
948 if (ctl->gr_head.items_count == 0) in nhgrp_dump_sysctl()
960 NHOPS_RLOCK(ctl); in nhgrp_dump_sysctl()
961 CHT_SLIST_FOREACH(&ctl->gr_head, mpath, nhg_priv) { in nhgrp_dump_sysctl()
966 NHOPS_RUNLOCK(ctl); in nhgrp_dump_sysctl()