--- - branch: netbsd-8 date: Tue Jan 2 10:20:34 UTC 2018 files: - new: 1.4.4.4 old: 1.4.4.3 path: src/sys/arch/arm/sunxi/sunxi_emac.c pathrev: src/sys/arch/arm/sunxi/sunxi_emac.c@1.4.4.4 type: modified - new: 1.40.6.2 old: 1.40.6.1 path: src/sys/dev/ic/dwc_gmac.c pathrev: src/sys/dev/ic/dwc_gmac.c@1.40.6.2 type: modified - new: 1.73.2.3 old: 1.73.2.2 path: src/sys/dev/pci/if_iwm.c pathrev: src/sys/dev/pci/if_iwm.c@1.73.2.3 type: modified - new: 1.508.4.11 old: 1.508.4.10 path: src/sys/dev/pci/if_wm.c pathrev: src/sys/dev/pci/if_wm.c@1.508.4.11 type: modified - new: 1.88.2.7 old: 1.88.2.6 path: src/sys/dev/pci/ixgbe/ixgbe.c pathrev: src/sys/dev/pci/ixgbe/ixgbe.c@1.88.2.7 type: modified - new: 1.56.2.4 old: 1.56.2.3 path: src/sys/dev/pci/ixgbe/ixv.c pathrev: src/sys/dev/pci/ixgbe/ixv.c@1.56.2.4 type: modified - new: 1.74.10.1 old: '1.74' path: src/sys/kern/sys_socket.c pathrev: src/sys/kern/sys_socket.c@1.74.10.1 type: modified - new: 1.216.6.4 old: 1.216.6.3 path: src/sys/net/bpf.c pathrev: src/sys/net/bpf.c@1.216.6.4 type: modified - new: 1.394.2.4 old: 1.394.2.3 path: src/sys/net/if.c pathrev: src/sys/net/if.c@1.394.2.4 type: modified - new: 1.239.2.3 old: 1.239.2.2 path: src/sys/net/if.h pathrev: src/sys/net/if.h@1.239.2.3 type: modified - new: 1.134.6.5 old: 1.134.6.4 path: src/sys/net/if_bridge.c pathrev: src/sys/net/if_bridge.c@1.134.6.5 type: modified - new: 1.38.10.2 old: 1.38.10.1 path: src/sys/net/if_etherip.c pathrev: src/sys/net/if_etherip.c@1.38.10.2 type: modified - new: 1.242.6.2 old: 1.242.6.1 path: src/sys/net/if_ethersubr.c pathrev: src/sys/net/if_ethersubr.c@1.242.6.2 type: modified - new: 1.55.8.2 old: 1.55.8.1 path: src/sys/net/if_faith.c pathrev: src/sys/net/if_faith.c@1.55.8.2 type: modified - new: 1.126.2.6 old: 1.126.2.5 path: src/sys/net/if_gif.c pathrev: src/sys/net/if_gif.c@1.126.2.6 type: modified - new: 1.11.2.3 old: 1.11.2.2 path: src/sys/net/if_l2tp.c pathrev: src/sys/net/if_l2tp.c@1.11.2.3 type: modified - new: 1.94.6.4 old: 1.94.6.3 path: src/sys/net/if_loop.c pathrev: src/sys/net/if_loop.c@1.94.6.4 type: modified - new: 1.32.6.2 old: 1.32.6.1 path: src/sys/net/if_media.c pathrev: src/sys/net/if_media.c@1.32.6.2 type: modified - new: 1.125.6.5 old: 1.125.6.4 path: src/sys/net/if_pppoe.c pathrev: src/sys/net/if_pppoe.c@1.125.6.5 type: modified - new: 1.169.6.3 old: 1.169.6.2 path: src/sys/net/if_spppsubr.c pathrev: src/sys/net/if_spppsubr.c@1.169.6.3 type: modified - new: 1.139.2.2 old: 1.139.2.1 path: src/sys/net/if_tun.c pathrev: src/sys/net/if_tun.c@1.139.2.2 type: modified - new: 1.97.2.11 old: 1.97.2.10 path: src/sys/net/if_vlan.c pathrev: src/sys/net/if_vlan.c@1.97.2.11 type: modified - new: 1.213.2.4 old: 1.213.2.3 path: src/sys/net/rtsock.c pathrev: src/sys/net/rtsock.c@1.213.2.4 type: modified - new: 1.41.6.1 old: '1.41' path: src/sys/net/agr/if_agr.c pathrev: src/sys/net/agr/if_agr.c@1.41.6.1 type: modified - new: 1.2.12.1 old: '1.2' path: src/sys/net/npf/npf_ifaddr.c pathrev: src/sys/net/npf/npf_ifaddr.c@1.2.12.1 type: modified - new: 1.6.8.2 old: 1.6.8.1 path: src/sys/net/npf/npf_os.c pathrev: src/sys/net/npf/npf_os.c@1.6.8.2 type: modified - new: 1.2.2.1 old: '1.2' path: src/sys/netcan/if_canloop.c pathrev: src/sys/netcan/if_canloop.c@1.2.2.1 type: modified - new: 1.250.2.4 old: 1.250.2.3 path: src/sys/netinet/if_arp.c pathrev: src/sys/netinet/if_arp.c@1.250.2.4 type: modified - new: 1.64.6.1 old: '1.64' path: src/sys/netinet/igmp.c pathrev: src/sys/netinet/igmp.c@1.64.6.1 type: modified - new: 1.203.2.4 old: 1.203.2.3 path: src/sys/netinet/in.c pathrev: src/sys/netinet/in.c@1.203.2.4 type: modified - new: 1.178.4.2 old: 1.178.4.1 path: src/sys/netinet/in_pcb.c pathrev: src/sys/netinet/in_pcb.c@1.178.4.2 type: modified - new: 1.90.2.3 old: 1.90.2.2 path: src/sys/netinet/ip_carp.c pathrev: src/sys/netinet/ip_carp.c@1.90.2.3 type: modified - new: 1.80.6.1 old: '1.80' path: src/sys/netinet/ip_flow.c pathrev: src/sys/netinet/ip_flow.c@1.80.6.1 type: modified - new: 1.355.2.3 old: 1.355.2.2 path: src/sys/netinet/ip_input.c pathrev: src/sys/netinet/ip_input.c@1.355.2.3 type: modified - new: 1.146.6.2 old: 1.146.6.1 path: src/sys/netinet/ip_mroute.c pathrev: src/sys/netinet/ip_mroute.c@1.146.6.2 type: modified - new: 1.279.2.3 old: 1.279.2.2 path: src/sys/netinet/ip_output.c pathrev: src/sys/netinet/ip_output.c@1.279.2.3 type: modified - new: 1.60.6.1 old: '1.60' path: src/sys/netinet6/frag6.c pathrev: src/sys/netinet6/frag6.c@1.60.6.1 type: modified - new: 1.245.2.4 old: 1.245.2.3 path: src/sys/netinet6/in6.c pathrev: src/sys/netinet6/in6.c@1.245.2.4 type: modified - new: 1.161.4.1 old: '1.161' path: src/sys/netinet6/in6_pcb.c pathrev: src/sys/netinet6/in6_pcb.c@1.161.4.1 type: modified - new: 1.34.8.1 old: '1.34' path: src/sys/netinet6/ip6_flow.c pathrev: src/sys/netinet6/ip6_flow.c@1.34.8.1 type: modified - new: 1.178.2.3 old: 1.178.2.2 path: src/sys/netinet6/ip6_input.c pathrev: src/sys/netinet6/ip6_input.c@1.178.2.3 type: modified - new: 1.191.6.4 old: 1.191.6.3 path: src/sys/netinet6/ip6_output.c pathrev: src/sys/netinet6/ip6_output.c@1.191.6.4 type: modified - new: 1.89.2.1 old: '1.89' path: src/sys/netinet6/mld6.c pathrev: src/sys/netinet6/mld6.c@1.89.2.1 type: modified - new: 1.232.2.5 old: 1.232.2.4 path: src/sys/netinet6/nd6.c pathrev: src/sys/netinet6/nd6.c@1.232.2.5 type: modified - new: 1.138.6.1 old: '1.138' path: src/sys/netinet6/nd6_nbr.c pathrev: src/sys/netinet6/nd6_nbr.c@1.138.6.1 type: modified - new: 1.135.6.1 old: '1.135' path: src/sys/netinet6/nd6_rtr.c pathrev: src/sys/netinet6/nd6_rtr.c@1.135.6.1 type: modified - new: 1.48.2.2 old: 1.48.2.1 path: src/sys/netipsec/ipsec_output.c pathrev: src/sys/netipsec/ipsec_output.c@1.48.2.2 type: modified - new: 1.8.6.1 old: '1.8' path: src/sys/rump/net/lib/libnetinet/netinet_component.c pathrev: src/sys/rump/net/lib/libnetinet/netinet_component.c@1.8.6.1 type: modified id: 20180102T102034Z.7c8d43eb59be3a8cedcda32dd6ec24c5267ce61e log: "Pull up following revision(s) (requested by ozaki-r in ticket #456):\n\tsys/arch/arm/sunxi/sunxi_emac.c: 1.9\n\tsys/dev/ic/dwc_gmac.c: 1.43-1.44\n\tsys/dev/pci/if_iwm.c: 1.75\n\tsys/dev/pci/if_wm.c: 1.543\n\tsys/dev/pci/ixgbe/ixgbe.c: 1.112\n\tsys/dev/pci/ixgbe/ixv.c: 1.74\n\tsys/kern/sys_socket.c: 1.75\n\tsys/net/agr/if_agr.c: 1.43\n\tsys/net/bpf.c: 1.219\n\tsys/net/if.c: 1.397, 1.399, 1.401-1.403, 1.406-1.410, 1.412-1.416\n\tsys/net/if.h: 1.242-1.247, 1.250, 1.252-1.257\n\tsys/net/if_bridge.c: 1.140 via patch, 1.142-1.146\n\tsys/net/if_etherip.c: 1.40\n\tsys/net/if_ethersubr.c: 1.243, 1.246\n\tsys/net/if_faith.c: 1.57\n\tsys/net/if_gif.c: 1.132\n\tsys/net/if_l2tp.c: 1.15, 1.17\n\tsys/net/if_loop.c: 1.98-1.101\n\tsys/net/if_media.c: 1.35\n\tsys/net/if_pppoe.c: 1.131-1.132\n\tsys/net/if_spppsubr.c: 1.176-1.177\n\tsys/net/if_tun.c: 1.142\n\tsys/net/if_vlan.c: 1.107, 1.109, 1.114-1.121\n\tsys/net/npf/npf_ifaddr.c: 1.3\n\tsys/net/npf/npf_os.c: 1.8-1.9\n\tsys/net/rtsock.c: 1.230\n\tsys/netcan/if_canloop.c: 1.3-1.5\n\tsys/netinet/if_arp.c: 1.255\n\tsys/netinet/igmp.c: 1.65\n\tsys/netinet/in.c: 1.210-1.211\n\tsys/netinet/in_pcb.c: 1.180\n\tsys/netinet/ip_carp.c: 1.92, 1.94\n\tsys/netinet/ip_flow.c: 1.81\n\tsys/netinet/ip_input.c: 1.362\n\tsys/netinet/ip_mroute.c: 1.147\n\tsys/netinet/ip_output.c: 1.283, 1.285, 1.287\n\tsys/netinet6/frag6.c: 1.61\n\tsys/netinet6/in6.c: 1.251, 1.255\n\tsys/netinet6/in6_pcb.c: 1.162\n\tsys/netinet6/ip6_flow.c: 1.35\n\tsys/netinet6/ip6_input.c: 1.183\n\tsys/netinet6/ip6_output.c: 1.196\n\tsys/netinet6/mld6.c: 1.90\n\tsys/netinet6/nd6.c: 1.239-1.240\n\tsys/netinet6/nd6_nbr.c: 1.139\n\tsys/netinet6/nd6_rtr.c: 1.136\n\tsys/netipsec/ipsec_output.c: 1.65\n\tsys/rump/net/lib/libnetinet/netinet_component.c: 1.9-1.10\nkmem_intr_free kmem_intr_[z]alloced memory\nthe underlying pools are the same but api-wise those should match\nUnify IFEF_*_MPSAFE into IFEF_MPSAFE\nThere are already two flags for if_output and if_start, however, it seems such\nMPSAFE flags are eventually needed for all if_XXX operations. Having discrete\nflags for each operation is wasteful of if_extflags bits. So let's unify\nthe flags into one: IFEF_MPSAFE.\nFortunately IFEF_*_MPSAFE flags have never been included in any releases, so\nwe can change them without breaking backward compatibility of the releases\n(though the kernel version of -current should be bumped).\nNote that if an interface have both MP-safe and non-MP-safe operations at a\ntime, we have to set the IFEF_MPSAFE flag and let callees of non-MP-safe\nopeartions take the kernel lock.\nProposed on tech-kern@ and tech-net@\nProvide macros for softnet_lock and KERNEL_LOCK hiding NET_MPSAFE switch\nIt reduces C&P codes such as \"#ifndef NET_MPSAFE KERNEL_LOCK(1, NULL); ...\"\nscattered all over the source code and makes it easy to identify remaining\nKERNEL_LOCK and/or softnet_lock that are held even if NET_MPSAFE.\nNo functional change\nHold KERNEL_LOCK on if_ioctl selectively based on IFEF_MPSAFE\nIf IFEF_MPSAFE is set, hold the lock and otherwise don't hold.\nThis change requires additions of KERNEL_LOCK to subsequence functions from\nif_ioctl such as ifmedia_ioctl and ifioctl_common to protect non-MP-safe\ncomponents.\nProposed on tech-kern@ and tech-net@\nEnsure to hold if_ioctl_lock when calling if_flags_set\nFix locking against myself on ifpromisc\nvlan_unconfig_locked could be called with holding if_ioctl_lock.\nEnsure to not turn on IFF_RUNNING of an interface until its initialization completes\nAnd ensure to turn off it before destruction as per IFF_RUNNING's description\n\"resource allocated\". (The description is a bit doubtful though, I believe the\nchange is still proper.)\nEnsure to hold if_ioctl_lock on if_up and if_down\nOne exception for if_down is if_detach; in the case the lock isn't needed\nbecause it's guaranteed that no other one can access ifp at that point.\nMake if_link_queue MP-safe if IFEF_MPSAFE\nif_link_queue is a queue to store events of link state changes, which is\nused to pass events from (typically) an interrupt handler to\nif_link_state_change softint. The queue was protected by KERNEL_LOCK so far,\nbut if IFEF_MPSAFE is enabled, it becomes unsafe because (perhaps) an interrupt\nhandler of an interface with IFEF_MPSAFE doesn't take KERNEL_LOCK. Protect it\nby a spin mutex.\nAdditionally with this change KERNEL_LOCK of if_link_state_change softint is\nomitted if NET_MPSAFE is enabled.\nNote that the spin mutex is now ifp->if_snd.ifq_lock as well as the case of\nif_timer (see the comment).\nUse IFADDR_WRITER_FOREACH instead of IFADDR_READER_FOREACH\nAt that point no other one modifies the list so IFADDR_READER_FOREACH\nis unnecessary. Use of IFADDR_READER_FOREACH is harmless in general though,\nif we try to detect contract violations of pserialize, using it violates\nthe contract. So avoid using it makes life easy.\nEnsure to call if_addr_init with holding if_ioctl_lock\nGet rid of outdated comments\nFix build of kernels without ether\nBy throwing out if_enable_vlan_mtu and if_disable_vlan_mtu that\ncreated a unnecessary dependency from if.c to if_ethersubr.c.\nPR kern/52790\nRename IFNET_LOCK to IFNET_GLOBAL_LOCK\nIFNET_LOCK will be used in another lock, if_ioctl_lock (might be renamed then).\nWrap if_ioctl_lock with IFNET_* macros (NFC)\nAlso if_ioctl_lock perhaps needs to be renamed to something because it's now\nnot just for ioctl...\nReorder some destruction routines in if_detach\n- Destroy if_ioctl_lock at the end of the if_detach because it's used in various\n destruction routines\n- Move psref_target_destroy after pr_purgeif because we want to use psref in\n pr_purgeif (otherwise destruction procedures can be tricky)\nEnsure to call if_mcast_op with holding IFNET_LOCK\nNote that CARP doesn't deal with IFNET_LOCK yet.\nRemove IFNET_GLOBAL_LOCK where it's unnecessary because IFNET_LOCK is held\nDescribe which lock is used to protect each member variable of struct ifnet\nRequested by skrll@\nWrite a guideline for converting an interface to IFEF_MPSAFE\nRequested by skrll@\nNote that IFNET_LOCK must not be held in softint\nDon't set IFEF_MPSAFE unless NET_MPSAFE at this point\nBecause recent investigations show that interfaces with IFEF_MPSAFE need to\nfollow additional restrictions to work with the flag safely. We should enable it\non an interface by default only if the interface surely satisfies the\nrestrictions, which are described in if.h.\nNote that enabling IFEF_MPSAFE solely gains a few benefit on performance because\nthe network stack is still serialized by the big kernel locks by default.\n" module: src subject: 'CVS commit: [netbsd-8] src/sys' unixtime: '1514888434' user: snj