Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/sys
Module Name: src
Committed By: ozaki-r
Date: Fri Jun 10 13:31:45 UTC 2016
Modified Files:
src/sys/altq: altq_cdnr.c
src/sys/dev/pci: if_lmc.c
src/sys/dist/pf/net: if_pfsync.c
src/sys/external/bsd/ipf/netinet: ip_compat.h
src/sys/kern: uipc_mbuf.c
src/sys/net: bpf.c if.c if.h if_bridge.c if_mpls.c if_pppoe.c if_stf.c
src/sys/netatalk: ddp_input.c
src/sys/netinet: if_arp.c igmp.c in_gif.c ip_carp.c ip_flow.c ip_icmp.c
ip_input.c sctp_input.c sctp_output.c tcp_input.c udp_usrreq.c
src/sys/netinet6: icmp6.c in6_gif.c ip6_forward.c ip6_input.c
ip6_mroute.c ip6_var.h mld6.c nd6_nbr.c nd6_rtr.c raw_ip6.c
sctp6_usrreq.c udp6_output.c udp6_usrreq.c
src/sys/netipsec: ipsec_input.c key_debug.c xform_ipip.c
src/sys/netmpls: mpls_ttl.c
src/sys/netnatm: natm.c
src/sys/sys: mbuf.h
Log Message:
Avoid storing a pointer of an interface in a mbuf
Having a pointer of an interface in a mbuf isn't safe if we remove big
kernel locks; an interface object (ifnet) can be destroyed anytime in any
packet processing and accessing such object via a pointer is racy. Instead
we have to get an object from the interface collection (ifindex2ifnet) via
an interface index (if_index) that is stored to a mbuf instead of an
pointer.
The change provides two APIs: m_{get,put}_rcvif_psref that use psref(9)
for sleep-able critical sections and m_{get,put}_rcvif that use
pserialize(9) for other critical sections. The change also adds another
API called m_get_rcvif_NOMPSAFE, that is NOT MP-safe and for transition
moratorium, i.e., it is intended to be used for places where are not
planned to be MP-ified soon.
The change adds some overhead due to psref to performance sensitive paths,
however the overhead is not serious, 2% down at worst.
Proposed on tech-kern and tech-net.
To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/altq/altq_cdnr.c
cvs rdiff -u -r1.60 -r1.61 src/sys/dev/pci/if_lmc.c
cvs rdiff -u -r1.13 -r1.14 src/sys/dist/pf/net/if_pfsync.c
cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/ipf/netinet/ip_compat.h
cvs rdiff -u -r1.166 -r1.167 src/sys/kern/uipc_mbuf.c
cvs rdiff -u -r1.197 -r1.198 src/sys/net/bpf.c
cvs rdiff -u -r1.337 -r1.338 src/sys/net/if.c
cvs rdiff -u -r1.206 -r1.207 src/sys/net/if.h
cvs rdiff -u -r1.124 -r1.125 src/sys/net/if_bridge.c
cvs rdiff -u -r1.22 -r1.23 src/sys/net/if_mpls.c
cvs rdiff -u -r1.107 -r1.108 src/sys/net/if_pppoe.c
cvs rdiff -u -r1.89 -r1.90 src/sys/net/if_stf.c
cvs rdiff -u -r1.26 -r1.27 src/sys/netatalk/ddp_input.c
cvs rdiff -u -r1.210 -r1.211 src/sys/netinet/if_arp.c
cvs rdiff -u -r1.57 -r1.58 src/sys/netinet/igmp.c
cvs rdiff -u -r1.75 -r1.76 src/sys/netinet/in_gif.c
cvs rdiff -u -r1.66 -r1.67 src/sys/netinet/ip_carp.c \
src/sys/netinet/ip_flow.c
cvs rdiff -u -r1.146 -r1.147 src/sys/netinet/ip_icmp.c
cvs rdiff -u -r1.328 -r1.329 src/sys/netinet/ip_input.c
cvs rdiff -u -r1.2 -r1.3 src/sys/netinet/sctp_input.c
cvs rdiff -u -r1.5 -r1.6 src/sys/netinet/sctp_output.c
cvs rdiff -u -r1.346 -r1.347 src/sys/netinet/tcp_input.c
cvs rdiff -u -r1.225 -r1.226 src/sys/netinet/udp_usrreq.c
cvs rdiff -u -r1.187 -r1.188 src/sys/netinet6/icmp6.c
cvs rdiff -u -r1.73 -r1.74 src/sys/netinet6/in6_gif.c
cvs rdiff -u -r1.78 -r1.79 src/sys/netinet6/ip6_forward.c
cvs rdiff -u -r1.159 -r1.160 src/sys/netinet6/ip6_input.c
cvs rdiff -u -r1.109 -r1.110 src/sys/netinet6/ip6_mroute.c
cvs rdiff -u -r1.64 -r1.65 src/sys/netinet6/ip6_var.h
cvs rdiff -u -r1.65 -r1.66 src/sys/netinet6/mld6.c
cvs rdiff -u -r1.118 -r1.119 src/sys/netinet6/nd6_nbr.c
cvs rdiff -u -r1.110 -r1.111 src/sys/netinet6/nd6_rtr.c
cvs rdiff -u -r1.143 -r1.144 src/sys/netinet6/raw_ip6.c
cvs rdiff -u -r1.4 -r1.5 src/sys/netinet6/sctp6_usrreq.c
cvs rdiff -u -r1.50 -r1.51 src/sys/netinet6/udp6_output.c
cvs rdiff -u -r1.122 -r1.123 src/sys/netinet6/udp6_usrreq.c
cvs rdiff -u -r1.35 -r1.36 src/sys/netipsec/ipsec_input.c
cvs rdiff -u -r1.12 -r1.13 src/sys/netipsec/key_debug.c
cvs rdiff -u -r1.38 -r1.39 src/sys/netipsec/xform_ipip.c
cvs rdiff -u -r1.7 -r1.8 src/sys/netmpls/mpls_ttl.c
cvs rdiff -u -r1.51 -r1.52 src/sys/netnatm/natm.c
cvs rdiff -u -r1.163 -r1.164 src/sys/sys/mbuf.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index