Lines Matching refs:nhg
219 dst = dst_priv->nhg;
242 ("index overflow during nhg compilation"));
259 struct nhgrp_object *nhg;
269 nhg = malloc(sz, M_NHOP, flags | M_ZERO);
270 if (nhg == NULL) {
275 nhg->nhg_size = nhgrp_size;
277 nhg->nhg_flags = MPF_MULTIPATH;
279 nhg_priv = NHGRP_PRIV(nhg);
286 nhg_priv->nhg = nhg;
290 compile_nhgrp(nhg_priv, wn, nhg->nhg_size);
296 nhgrp_ref_object(struct nhgrp_object *nhg)
301 nhg_priv = NHGRP_PRIV(nhg);
303 KASSERT(old > 0, ("%s: nhgrp object %p has 0 refs", __func__, nhg));
307 nhgrp_free(struct nhgrp_object *nhg)
313 nhg_priv = NHGRP_PRIV(nhg);
367 free(nhg_priv->nhg, M_NHOP);
574 rnd->rnd_nhgrp = nhg_priv->nhg;
628 rnd->rnd_nhgrp = mp_priv->nhg;
676 rnd_new->rnd_nhgrp = nhg_priv->nhg;
684 * given @nhg. Stores number of items in the array into @pnum_nhops.
687 nhgrp_get_nhops(struct nhgrp_object *nhg, uint32_t *pnum_nhops)
691 KASSERT(((nhg->nhg_flags & MPF_MULTIPATH) != 0), ("nhop is not mpath"));
693 nhg_priv = NHGRP_PRIV(nhg);
706 const struct nhgrp_object *nhg;
711 nhg = nhg_priv->nhg;
719 sz += sizeof(struct nhgrp_nhop_external) * nhg->nhg_size;
754 nhgc->nhgc_len += sizeof(struct nhgrp_nhop_external) * nhg->nhg_size;
755 nhgc->nhgc_count = nhg->nhg_size;
758 for (int i = 0; i < nhg->nhg_size; i++) {
759 ext[i].nh_idx = nhg->nhops[i]->nh_priv->nh_idx;
769 nhgrp_get_idx(const struct nhgrp_object *nhg)
773 nhg_priv = NHGRP_PRIV_CONST(nhg);