Changeset View
Changeset View
Standalone View
Standalone View
sys/net/route/nhgrp_ctl.c
Show First 20 Lines • Show All 288 Lines • ▼ Show 20 Lines | memcpy(&nhg_priv->nhg_nh_weights[0], wn, | ||||
num_nhops * sizeof(struct weightened_nhop)); | num_nhops * sizeof(struct weightened_nhop)); | ||||
compile_nhgrp(nhg_priv, wn, nhg->nhg_size); | compile_nhgrp(nhg_priv, wn, nhg->nhg_size); | ||||
return (nhg_priv); | return (nhg_priv); | ||||
} | } | ||||
void | void | ||||
nhgrp_ref_object(struct nhgrp_object *nhg) | |||||
{ | |||||
struct nhgrp_priv *nhg_priv; | |||||
u_int old; | |||||
nhg_priv = NHGRP_PRIV(nhg); | |||||
old = refcount_acquire(&nhg_priv->nhg_refcount); | |||||
KASSERT(old > 0, ("%s: nhgrp object %p has 0 refs", __func__, nhg)); | |||||
} | |||||
void | |||||
nhgrp_free(struct nhgrp_object *nhg) | nhgrp_free(struct nhgrp_object *nhg) | ||||
{ | { | ||||
struct nhgrp_priv *nhg_priv; | struct nhgrp_priv *nhg_priv; | ||||
struct nh_control *ctl; | struct nh_control *ctl; | ||||
struct epoch_tracker et; | struct epoch_tracker et; | ||||
nhg_priv = NHGRP_PRIV(nhg); | nhg_priv = NHGRP_PRIV(nhg); | ||||
▲ Show 20 Lines • Show All 493 Lines • Show Last 20 Lines |