• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/net/route/

Lines Matching defs:nh_priv

86     struct nhop_priv *nh_priv);
91 static void destroy_nhop(struct nhop_priv *nh_priv);
187 nh->nh_priv->rt_flags |= RTF_FIXEDMTU;
193 nh->nh_priv->rt_flags &= ~RTF_FIXEDMTU;
279 fill_nhop_from_info(struct nhop_priv *nh_priv, struct rt_addrinfo *info)
284 nh = nh_priv->nh;
288 nh->nh_priv->rt_flags = rt_flags;
289 nh_priv->nh_family = info->rti_info[RTAX_DST]->sa_family;
290 nh_priv->nh_type = 0; // hook responsibility to set nhop type
321 struct nhop_priv *nh_priv;
329 nh_priv = alloc_nhop_structure();
331 error = fill_nhop_from_info(nh_priv, info);
333 uma_zfree(nhops_zone, nh_priv->nh);
337 error = get_nhop(rnh, info, &nh_priv);
339 *nh_ret = nh_priv->nh;
358 struct nhop_priv *nh_priv, *tmp_priv;
361 nh_priv = *pnh_priv;
368 error = rnh->rnh_preadd(rnh->rib_fibnum, dst, netmask, nh_priv->nh);
370 uma_zfree(nhops_zone, nh_priv->nh);
374 tmp_priv = find_nhop(rnh->nh_control, nh_priv);
376 uma_zfree(nhops_zone, nh_priv->nh);
390 error = finalize_nhop(rnh->nh_control, info, nh_priv);
421 nh->nh_priv->rt_flags &= ~RTF_FMASK;
422 nh->nh_priv->rt_flags |= info->rti_flags & RTF_FMASK;
431 nh->nh_priv->rt_flags &= ~RTF_GATEWAY;
432 nh->nh_priv->rt_flags |= (RTF_GATEWAY & info->rti_flags);
435 nh->nh_flags = convert_rt_to_nh_flags(nh->nh_priv->rt_flags);
459 struct nhop_priv *nh_priv;
465 nh_priv = alloc_nhop_structure();
466 nh = nh_priv->nh;
469 nh_priv->nh_family = nh_orig->nh_priv->nh_family;
470 nh_priv->rt_flags = nh_orig->nh_priv->rt_flags;
471 nh_priv->nh_type = nh_orig->nh_priv->nh_type;
482 uma_zfree(nhops_zone, nh_priv->nh);
486 error = get_nhop(rnh, info, &nh_priv);
488 *pnh = nh_priv->nh;
502 struct nhop_priv *nh_priv;
507 nh_priv = (struct nhop_priv *)((char *)nh + NHOP_OBJECT_ALIGNED_SIZE);
509 nh->nh_priv = nh_priv;
510 nh_priv->nh = nh;
512 return (nh_priv);
519 * errno otherwise. @nh_priv is freed in case of error.
523 struct nhop_priv *nh_priv)
527 nh = nh_priv->nh;
539 nh_priv->nh_vnet = curvnet;
547 refcount_init(&nh_priv->nh_refcnt, 1);
550 refcount_init(&nh_priv->nh_linked, 2);
554 if (link_nhop(ctl, nh_priv) == 0) {
562 destroy_nhop(nh_priv);
599 prefix, nh->nh_priv, nh->nh_priv->nh_family, nh->nh_ifp,
605 destroy_nhop(struct nhop_priv *nh_priv)
609 nh = nh_priv->nh;
627 struct nhop_priv *nh_priv;
629 nh_priv = __containerof(ctx, struct nhop_priv, nh_epoch_ctx);
631 destroy_nhop(nh_priv);
639 old = refcount_acquire(&nh->nh_priv->nh_refcnt);
647 return (refcount_acquire_if_not_zero(&nh->nh_priv->nh_refcnt));
654 struct nhop_priv *nh_priv = nh->nh_priv;
657 if (!refcount_release(&nh_priv->nh_refcnt))
680 if (refcount_release_if_not_last(&nh_priv->nh_linked)) {
681 ctl = nh_priv->nh_control;
682 if (unlink_nhop(ctl, nh_priv) == NULL) {
684 DPRINTF("Failed to unlink nexhop %p", nh_priv);
692 &nh_priv->nh_epoch_ctx);
728 return (nh->nh_priv->nh_idx);
735 return (nh->nh_priv->nh_type);
742 nh->nh_priv->nh_type = nh_type;
749 return (nh->nh_priv->rt_flags);
756 nh->nh_priv->rt_flags = rt_flags;
763 return (nh->nh_priv->nh_vnet);
777 struct nhop_priv *nh_priv;
783 CHT_SLIST_FOREACH(&ctl->nh_head, nhops, nh_priv) {
784 nh = nh_priv->nh;
786 if ((nh_priv->rt_flags & RTF_FIXEDMTU) == 0 ||
827 arpc.rtm.rtm_flags = nh->nh_priv->rt_flags;
832 pnhe->nh_idx = nh->nh_priv->nh_idx;
836 pnhe->nh_family = nh->nh_priv->nh_family;
837 pnhe->nh_type = nh->nh_priv->nh_type;
843 pnhe->nh_refcount = nh->nh_priv->nh_refcnt;
896 struct nhop_priv *nh_priv;
903 CHT_SLIST_FOREACH(&ctl->nh_head, nhops, nh_priv) {
904 error = dump_nhop_entry(rh, nh_priv->nh, w);