| /netbsd-src/sys/kern/ |
| H A D | subr_psref.c | 83 SLIST_HEAD(psref_head, psref); 121 struct psref *prdi_psref; 130 static void psref_debug_acquire(struct psref *); 131 static void psref_debug_release(struct psref *); 231 psref_exist(struct psref_cpu *pcpu, struct psref *psref) in psref_exist() argument 233 struct psref *_psref; in psref_exist() 236 if (_psref == psref) in psref_exist() 243 psref_check_duplication(struct psref_cpu *pcpu, struct psref *psref, in psref_check_duplication() argument 248 found = psref_exist(pcpu, psref); in psref_check_duplication() 251 "psref=%p target=%p", psref, target); in psref_check_duplication() [all …]
|
| /netbsd-src/sys/sys/ |
| H A D | psref.h | 45 struct psref; 75 struct psref { struct 76 SLIST_ENTRY(psref) psref_entry; 93 void psref_acquire(struct psref *, const struct psref_target *, 95 void psref_release(struct psref *, const struct psref_target *, 97 void psref_copy(struct psref *, const struct psref *, 110 #define PSREF_DEBUG_FILL_RETURN_ADDRESS0(psref, addr) do { \ argument 111 (psref)->psref_debug = (addr); \ 113 #define PSREF_DEBUG_FILL_RETURN_ADDRESS(psref) do { \ argument 114 PSREF_DEBUG_FILL_RETURN_ADDRESS0(psref, __builtin_return_address(0));\ [all …]
|
| /netbsd-src/sys/netinet/ |
| H A D | ip_encap.c | 112 struct psref *); 116 struct psref *); 195 struct psref *match_psref) in encap4_lookup() 228 struct psref elem_psref; in encap4_lookup() 237 psref_acquire(&elem_psref, &ep->psref, in encap4_lookup() 248 psref_release(&elem_psref, &ep->psref, in encap4_lookup() 256 psref_release(match_psref, &match->psref, in encap4_lookup() 265 psref_release(&elem_psref, &ep->psref, in encap4_lookup() 271 struct psref elem_psref; in encap4_lookup() 278 psref_acquire(&elem_psref, &ep->psref, in encap4_lookup() [all …]
|
| H A D | in_var.h | 128 ia4_acquire(struct in_ifaddr *ia, struct psref *psref) in ia4_acquire() argument 132 ifa_acquire(&ia->ia_ifa, psref); in ia4_acquire() 136 ia4_release(struct in_ifaddr *ia, struct psref *psref) in ia4_release() argument 141 ifa_release(&ia->ia_ifa, psref); in ia4_release() 274 in_get_ia_psref(struct in_addr addr, struct psref *psref) in in_get_ia_psref() argument 282 ia4_acquire(ia, psref); in in_get_ia_psref() 307 in_get_ia_on_iface_psref(struct in_addr addr, struct ifnet *ifp, struct psref *psref) in in_get_ia_on_iface_psref() argument 315 ia4_acquire(ia, psref); in in_get_ia_on_iface_psref() 339 in_get_ia_from_ifp_psref(struct ifnet *ifp, struct psref *psref) in in_get_ia_from_ifp_psref() argument 347 ia4_acquire(ia, psref); in in_get_ia_from_ifp_psref()
|
| H A D | in.c | 412 struct psref psref; in in_control0() local 452 ia = in_get_ia_from_ifp_psref(ifp, &psref); in in_control0() 464 ia4_release(ia, &psref); in in_control0() 474 ia4_acquire(ia, &psref); in in_control0() 718 ia4_release(ia, &psref); in in_control0() 768 ia4_release(ia, &psref); in in_control0() 816 struct psref psref; in in_ifremlocal() local 839 ifa_acquire(alt_ifa, &psref); in in_ifremlocal() 1427 struct psref psref; in_scrubprefix() local 1540 struct psref psref; in_if_link_up() local 1593 struct psref psref; in_if_link_down() local 1841 in_selectsrc(struct sockaddr_in * sin,struct route * ro,int soopts,struct ip_moptions * mopts,int * errorp,struct psref * psref) in_selectsrc() argument 2331 struct psref psref; in_multicast_sysctl() local [all...] |
| H A D | ip_input.c | 248 static struct in_ifaddr *ip_rtaddr(struct in_addr, struct psref *); 401 struct psref psref; in ipintr() local 403 ifp = m_get_rcvif_psref(m, &psref); in ipintr() 412 m_put_rcvif_psref(ifp, &psref); in ipintr() 905 struct psref psref; in ip_dooptions() local 962 &psref); in ip_dooptions() 968 ia = ip_rtaddr(ipaddr.sin_addr, &psref); in ip_dooptions() 978 ia4_release(ia, &psref); in ip_dooptions() 988 struct psref psref; in ip_dooptions() local 1018 ifa = ifa_ifwithaddr_psref(sintosa(&ipaddr), &psref); in ip_dooptions() [all …]
|
| /netbsd-src/sys/net/ |
| H A D | if_vlan.c | 217 vlan_getref_linkmib(struct ifvlan *, struct psref *); 218 static void vlan_putref_linkmib(struct ifvlan_linkmib *, struct psref *); 222 struct psref *); 418 struct psref psref; in vlan_config() local 434 checkmib = vlan_lookup_tag_psref(p, vid, &psref); in vlan_config() 436 vlan_putref_linkmib(checkmib, &psref); in vlan_config() 729 vlan_getref_linkmib(struct ifvlan *sc, struct psref *psref) in vlan_getref_linkmib() argument 740 psref_acquire(psref, &mib->ifvm_psref, ifvm_psref_class); in vlan_getref_linkmib() 747 vlan_putref_linkmib(struct ifvlan_linkmib *mib, struct psref *psref) in vlan_putref_linkmib() argument 751 psref_release(psref, &mib->ifvm_psref, ifvm_psref_class); in vlan_putref_linkmib() [all …]
|
| H A D | pfil.c | 60 struct psref_target psref; member 108 psref_target_init(&pflistset->active->psref, pfil_psref_class); in pfil_listset_init() 143 psref_target_destroy(&pfh->ph_in.active->psref, pfil_psref_class); in pfil_head_destroy() 144 psref_target_destroy(&pfh->ph_out.active->psref, pfil_psref_class); in pfil_head_destroy() 145 psref_target_destroy(&pfh->ph_ifaddr.active->psref, pfil_psref_class); in pfil_head_destroy() 146 psref_target_destroy(&pfh->ph_ifevent.active->psref, pfil_psref_class); in pfil_head_destroy() 219 psref_target_init(&newlist->psref, pfil_psref_class); in pfil_list_add() 248 psref_target_destroy(&oldlist->psref, pfil_psref_class); in pfil_list_add() 332 psref_target_init(&newlist->psref, pfil_psref_class); in pfil_list_remove() 355 psref_target_destroy(&oldlist->psref, pfil_psref_class); in pfil_list_remove() [all …]
|
| H A D | if_gif.c | 63 #include <sys/psref.h> 456 struct psref psref; in gif_encapcheck() local 466 var = gif_getref_variant(sc, &psref); in gif_encapcheck() 515 gif_putref_variant(var, &psref); in gif_encapcheck() 537 struct psref psref; in gif_output() local 553 var = gif_getref_variant(sc, &psref); in gif_output() 579 gif_putref_variant(var, &psref); in gif_output() 591 struct psref psre in gif_start() local 636 struct psref psref; gif_transmit() local 743 struct psref psref; gif_ioctl() local 1109 struct psref psref; gif_set_tunnel() local [all...] |
| H A D | if_bridge.c | 277 struct psref *); 280 struct psref *); 282 struct psref *); 287 struct psref *); 655 bridge_lookup_member(struct bridge_softc *sc, const char *name, struct psref *psref) in bridge_lookup_member() 669 bridge_acquire_member(sc, bif, psref); in bridge_lookup_member() 683 struct psref *psref) in bridge_lookup_member_if() 692 psref_acquire(psref, in bridge_lookup_member_if() 654 bridge_lookup_member(struct bridge_softc * sc,const char * name,struct psref * psref) bridge_lookup_member() argument 682 bridge_lookup_member_if(struct bridge_softc * sc,struct ifnet * member_ifp,struct psref * psref) bridge_lookup_member_if() argument 702 bridge_acquire_member(struct bridge_softc * sc,struct bridge_iflist * bif,struct psref * psref) bridge_acquire_member() argument 715 bridge_release_member(struct bridge_softc * sc,struct bridge_iflist * bif,struct psref * psref) bridge_release_member() argument 832 struct psref psref; bridge_ioctl_add() local 975 struct psref psref; bridge_ioctl_gifflags() local 997 struct psref psref; bridge_ioctl_sifflags() local 1172 struct psref psref; bridge_ioctl_saddr() local 1327 struct psref psref; bridge_ioctl_sifprio() local 1384 struct psref psref; bridge_ioctl_sifcost() local 1673 struct psref psref; bridge_output() local 1798 struct psref psref; bridge_forward() local 1985 struct psref psref; bridge_input() local 2117 struct psref psref; bridge_broadcast() local [all...] |
| H A D | if_l2tp.c | 412 struct psref psref; in l2tp_output() local 415 var = l2tp_getref_variant(sc, &psref); in l2tp_output() 449 l2tp_putref_variant(var, &psref); in l2tp_output() 546 struct psref psref; in l2tpintr_softint() local 549 var = l2tp_getref_variant(sc, &psref); in l2tpintr_softint() 554 l2tp_putref_variant(var, &psref); in l2tpintr_softint() 646 struct psref psref; in l2tp_start() local 651 var = l2tp_getref_variant(sc, &psref); in l2tp_start() 661 l2tp_putref_variant(var, &psref); in l2tp_start() 668 struct psref psref; in l2tp_transmit() local [all …]
|
| H A D | if_l2tp.h | 128 l2tp_getref_variant(struct l2tp_softc *sc, struct psref *psref) in l2tp_getref_variant() argument 139 psref_acquire(psref, &var->lv_psref, lv_psref_class); in l2tp_getref_variant() 146 l2tp_putref_variant(struct l2tp_variant *var, struct psref *psref) in l2tp_putref_variant() argument 151 psref_release(psref, &var->lv_psref, lv_psref_class); in l2tp_putref_variant() 168 struct l2tp_variant *l2tp_lookup_session_ref(uint32_t, struct psref *);
|
| H A D | if_gif.h | 98 gif_getref_variant(struct gif_softc *sc, struct psref *psref) in gif_getref_variant() argument 106 psref_acquire(psref, &var->gv_psref, gv_psref_class); in gif_getref_variant() 113 gif_putref_variant(struct gif_variant *var, struct psref *psref) in gif_putref_variant() argument 117 psref_release(psref, &var->gv_psref, gv_psref_class); in gif_putref_variant()
|
| H A D | if.c | 596 struct psref psref; in if_activate_sadl() local 597 ifa_acquire(ifa, &psref); in if_activate_sadl() 603 ifa_release(ifa, &psref); in if_activate_sadl() 1169 struct psref psref; in if_attachdomain() 1170 psref_acquire(&psref, &ifp->if_psref, ifnet_psref_class); in if_attachdomain() 1174 psref_release(&psref, &ifp->if_psref, ifnet_psref_class); in if_attachdomain() 1430 * so we don't need to take a lock or psref. Avoid using in if_detach() 1577 struct psref psre in if_clone_create() 1168 struct psref psref; if_attachdomain() local 1576 struct psref psref; if_clone_create() local 1602 struct psref psref; if_clone_destroy() local 1866 ifa_acquire(struct ifaddr * ifa,struct psref * psref) ifa_acquire() argument 1874 ifa_release(struct ifaddr * ifa,struct psref * psref) ifa_release() argument 1927 ifa_ifwithaddr_psref(const struct sockaddr * addr,struct psref * psref) ifa_ifwithaddr_psref() argument 1968 ifa_ifwithdstaddr_psref(const struct sockaddr * addr,struct psref * psref) ifa_ifwithdstaddr_psref() argument 2055 ifa_ifwithnet_psref(const struct sockaddr * addr,struct psref * psref) ifa_ifwithnet_psref() argument 2084 ifa_ifwithladdr_psref(const struct sockaddr * addr,struct psref * psref) ifa_ifwithladdr_psref() argument 2168 ifaof_ifpforaddr_psref(const struct sockaddr * addr,struct ifnet * ifp,struct psref * psref) ifaof_ifpforaddr_psref() argument 2193 struct psref psref; link_rtrequest() local 2534 struct psref psref; _if_down() local 2926 if_get(const char * name,struct psref * psref) if_get() argument 2967 if_put(const struct ifnet * ifp,struct psref * psref) if_put() argument 3008 if_get_byindex(u_int idx,struct psref * psref) if_get_byindex() argument 3024 if_get_bylla(const void * lla,unsigned char lla_len,struct psref * psref) if_get_bylla() argument 3051 if_acquire(struct ifnet * ifp,struct psref * psref) if_acquire() argument 3457 struct psref psref; doifioctl() local 3655 struct psref psref; ifconf() local 4057 struct psref psref; if_sdl_sysctl() local [all...] |
| H A D | if_ipsec.c | 538 struct psref psref; in if_ipsec_encap_func() local 547 var = if_ipsec_getref_variant(sc, &psref); in if_ipsec_encap_func() 599 if_ipsec_putref_variant(var, &psref); in if_ipsec_encap_func() 620 struct psref psref; in if_ipsec_output() local 640 var = if_ipsec_getref_variant(sc, &psref); in if_ipsec_output() 674 if_ipsec_putref_variant(var, &psref); in if_ipsec_output() 802 struct psref psref; in if_ipsec_ioctl() local 925 var = if_ipsec_getref_variant(sc, &psref); in if_ipsec_ioctl() 956 if_ipsec_putref_variant(var, &psref); in if_ipsec_ioctl() 965 var = if_ipsec_getref_variant(sc, &psref); in if_ipsec_ioctl() [all …]
|
| H A D | if_ipsec.h | 162 if_ipsec_getref_variant(struct ipsec_softc *sc, struct psref *psref) in if_ipsec_getref_variant() argument 170 psref_acquire(psref, &var->iv_psref, iv_psref_class); in if_ipsec_getref_variant() 177 if_ipsec_putref_variant(struct ipsec_variant *var, struct psref *psref) in if_ipsec_putref_variant() argument 181 psref_release(psref, &var->iv_psref, iv_psref_class); in if_ipsec_putref_variant()
|
| H A D | route.c | 288 static struct ifaddr *rt_getifa(struct rt_addrinfo *, struct psref *); 289 static struct ifnet *rt_getifp(struct rt_addrinfo *, struct psref *); 291 const struct sockaddr *, struct psref *); 838 struct psref psref; in rtredirect() local 841 if ((ifa = ifa_ifwithnet_psref(gateway, &psref)) == NULL) { in rtredirect() 951 ifa_release(ifa, &psref); in rtredirect() 984 const struct sockaddr *gateway, struct psref *psref) in ifa_ifwithroute_psref() argument 997 ifa = ifa_ifwithdstaddr_psref(dst, psref); in ifa_ifwithroute_psref() 999 ifa = ifa_ifwithaddr_psref(gateway, psref); in ifa_ifwithroute_psref() 1006 ifa = ifa_ifwithdstaddr_psref(gateway, psref); in ifa_ifwithroute_psref() [all …]
|
| /netbsd-src/sys/net/lagg/ |
| H A D | if_laggproto.c | 112 struct lagg_proto_port *, struct psref *); 221 struct lagg_proto_port *pport, struct psref *psref) in lagg_link_active() 247 lagg_port_getref(lp, psref); in lagg_link_active() 479 struct psref psref; in lagg_fail_transmit() 481 lp = lagg_link_active(psc, NULL, &psref); in lagg_fail_transmit() 490 lagg_port_putref(lp, &psref); in lagg_fail_transmit() 501 struct psref psref; in lagg_fail_input() 219 lagg_link_active(struct lagg_proto_softc * psc,struct lagg_proto_port * pport,struct psref * psref) lagg_link_active() argument 477 struct psref psref; lagg_fail_transmit() local 499 struct psref psref; lagg_fail_input() local 532 struct psref psref; lagg_fail_portstat() local 591 struct psref psref; lagg_fail_linkspeed_work() local 696 struct psref psref; lagg_lb_transmit() local [all...] |
| H A D | if_lagg.c | 184 lagg_variant_getref(struct lagg_softc *, struct psref *); 185 static void lagg_variant_putref(struct lagg_variant *, struct psref *); 555 struct psref psref; in lagg_config() local 578 ifp_port = if_get(rp->rp_portname, &psref); in lagg_config() 585 if_put(ifp_port, &psref); in lagg_config() 593 ifp_port = if_get(rp->rp_portname, &psref); in lagg_config() 600 if_put(ifp_port, &psref); in lagg_config() 604 ifp_port = if_get(rp->rp_portname, &psref); in lagg_config() 611 if_put(ifp_port, &psref); in lagg_config() 615 ifp_port = if_get(rp->rp_portname, &psref); in lagg_config() [all …]
|
| /netbsd-src/sys/netinet6/ |
| H A D | in6_gif.c | 278 struct psref psref_var; in in6_gif_input() 288 struct psref psref; in in6_gif_input() local 289 struct ifnet *rcvif = m_get_rcvif_psref(m, &psref); in in6_gif_input() 291 m_put_rcvif_psref(rcvif, &psref); in in6_gif_input() 297 m_put_rcvif_psref(rcvif, &psref); in in6_gif_input() 410 struct psref psref; in gif_encapcheck6() local 414 ifp = m_get_rcvif_psref(m, &psref); in gif_encapcheck6() 418 m_put_rcvif_psref(ifp, &psref); in gif_encapcheck6() 475 struct psref psref; in in6_gif_ctlinput() local 499 var = gif_getref_variant(sc, &psref); in in6_gif_ctlinput() [all …]
|
| H A D | nd6_rtr.c | 67 struct psref psref; in nd6_rtr_cache() local 70 ifp = m_get_rcvif_psref(m, &psref); in nd6_rtr_cache() 95 m_put_rcvif_psref(ifp, &psref); in nd6_rtr_cache() 113 m_put_rcvif_psref(ifp, &psref); in nd6_rtr_cache() 146 m_put_rcvif_psref(ifp, &psref); in nd6_rtr_cache() 153 m_put_rcvif_psref(ifp, &psref); in nd6_rtr_cache()
|
| H A D | in6_var.h | 135 ia6_acquire(struct in6_ifaddr *ia, struct psref *psref) in ia6_acquire() argument 139 ifa_acquire(&ia->ia_ifa, psref); in ia6_acquire() 143 ia6_release(struct in6_ifaddr *ia, struct psref *psref) in ia6_release() argument 148 ifa_release(&ia->ia_ifa, psref); in ia6_release() 513 in6_get_ia_from_ifp_psref(struct ifnet *ifp, struct psref *psref) in in6_get_ia_from_ifp_psref() argument 521 ia6_acquire(ia, psref); in in6_get_ia_from_ifp_psref() 619 in6ifa_ifpforlinklocal_psref(const struct ifnet *, int, struct psref *); 624 struct psref *);
|
| H A D | in6.c | 154 struct in6_ifaddr **, struct psref *, int); 198 struct psref psref; in in6_ifremlocal() local 239 ifa_acquire(alt_ifa, &psref); in in6_ifremlocal() 248 ifa_release(alt_ifa, &psref); in in6_ifremlocal() 317 struct psref psref; in in6_ifremprefix() local 320 ia6_acquire(ia, &psref); in in6_ifremprefix() 338 ia6_release(ia, &psref); in in6_ifremprefix() 408 struct psref psref; in in6_control1() local 527 ia = in6ifa_ifpwithaddr_psref(ifp, &sa6->sin6_addr, &psref); in in6_control1() 727 error = in6_update_ifa1(ifp, ifra, &ia, &psref, 0); in in6_control1() [all …]
|
| H A D | mld6.c | 354 struct psref psref; in mld_input() local 356 ifp = m_get_rcvif_psref(m, &psref); in mld_input() 538 m_put_rcvif_psref(ifp, &psref); in mld_input() 556 struct psref psref; in mld_sendpkt() local 569 ia = in6ifa_ifpforlinklocal_psref(ifp, ignflags, &psref); in mld_sendpkt() 575 ia6_release(ia, &psref); in mld_sendpkt() 582 ia6_release(ia, &psref); in mld_sendpkt() 591 ia6_release(ia, &psref); in mld_sendpkt() 1003 struct psref psref, psref_ia; in in6_multicast_sysctl() local 1012 ifp = if_get_byindex(name[0], &psref); in in6_multicast_sysctl() [all …]
|
| /netbsd-src/sys/compat/common/ |
| H A D | uipc_syscalls_40.c | 46 struct psref psref; in compat_ifconf() local 71 if_acquire(ifp, &psref); in compat_ifconf() 95 struct psref psref_ifa; in compat_ifconf() 153 if_release(ifp, &psref); in compat_ifconf() 165 if_release(ifp, &psref); in compat_ifconf()
|