History log of /src/sys/rump/net/lib/libnetinet |
Revision | Date | Author | Comments |
1.6 | 19-Oct-2015 |
pooka | Add a COMMENT describing what each component roughly does.
"make describe" prints the comment.
Requested/inspired by Vincent Schwarzer on rumpkernel-users
|
1.5 | 13-Mar-2014 |
pooka | branches: 1.5.6; rename component.c -> netinet_component.c
|
1.4 | 11-Dec-2009 |
pooka | branches: 1.4.12; 1.4.22; 1.4.26; Include component.c instead of dummy.c so that domain constructors get properly called.
|
1.3 | 16-Oct-2008 |
pooka | branches: 1.3.2; 1.3.10; 1.3.16; Deal with the ld.so/linkset brokenness and compile all of libnet and libnetinet into a big bunch for now. If they were separate libraries, the DOMAIN_DEFINE() in the latter on the linkline would not get noticed at "boot" time because of the abovementioned brokenness. One of these days I'll add code to dlopen() the libraries and resplit them, but this will allow things to work until then.
|
1.2 | 13-Oct-2008 |
pooka | Add tcp debugging as a build option.
|
1.1 | 06-Oct-2008 |
pooka | branches: 1.1.2; Provide the TCP/IP as a rump library.
|
1.1.2.2 | 10-Oct-2008 |
skrll | Sync with HEAD.
|
1.1.2.1 | 06-Oct-2008 |
skrll | file Makefile was added on branch wrstuden-revivesa on 2008-10-10 22:37:09 +0000
|
1.3.16.3 | 11-Mar-2010 |
yamt | sync with head
|
1.3.16.2 | 04-May-2009 |
yamt | sync with head.
|
1.3.16.1 | 16-Oct-2008 |
yamt | file Makefile was added on branch yamt-nfs-mp on 2009-05-04 08:14:33 +0000
|
1.3.10.2 | 17-Jan-2009 |
mjf | Sync with HEAD.
|
1.3.10.1 | 16-Oct-2008 |
mjf | file Makefile was added on branch mjf-devfs2 on 2009-01-17 13:29:39 +0000
|
1.3.2.2 | 19-Oct-2008 |
haad | Sync with HEAD.
|
1.3.2.1 | 16-Oct-2008 |
haad | file Makefile was added on branch haad-dm on 2008-10-19 22:18:08 +0000
|
1.4.26.1 | 18-May-2014 |
rmind | sync with head
|
1.4.22.2 | 03-Dec-2017 |
jdolecek | update from HEAD
|
1.4.22.1 | 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.4.12.1 | 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
1.5.6.1 | 27-Dec-2015 |
skrll | Sync with HEAD (as of 26th Dec)
|
1.16 | 20-Sep-2022 |
ozaki-r | tcp: separate syn cache stuffs into tcp_syncache.[ch] files
No functional change.
|
1.15 | 08-Mar-2021 |
christos | remove ip{,6}_id.c
|
1.14 | 14-Apr-2017 |
ozaki-r | branches: 1.14.24; Rumpify netipsec
Note that we should modularize netipsec and reduce reverse symbol references (referencing symbols of netipsec from net, netinet and netinet6) though, the task needs lots of code changes. Prior to doing so, rumpifying it and having ATF tests should be useful.
|
1.13 | 24-Aug-2015 |
pooka | branches: 1.13.2; 1.13.4; purge rump/net of component-specific opt directories
|
1.12 | 18-Jan-2015 |
justin | Move defines of INET and INET6 from opt_inet.h to Makefile.inc
As discussed with pooka@ fixes current issues with ipv6 on rump being broken
|
1.11 | 14-Aug-2013 |
pooka | branches: 1.11.6; Separate inet and inet6, allows inet6-only rump kernels.
|
1.10 | 01-Jun-2013 |
pooka | branches: 1.10.2; default portalgo to random_start, for less connections from port 65535
|
1.9 | 01-Jun-2013 |
pooka | cosmetic: put portalgo.c in the conceptually right place
|
1.8 | 03-May-2011 |
dyoung | branches: 1.8.4; 1.8.14; Reduces the resources demanded by TCP sessions in TIME_WAIT-state using methods called Vestigial Time-Wait (VTW) and Maximum Segment Lifetime Truncation (MSLT).
MSLT and VTW were contributed by Coyote Point Systems, Inc.
Even after a TCP session enters the TIME_WAIT state, its corresponding socket and protocol control blocks (PCBs) stick around until the TCP Maximum Segment Lifetime (MSL) expires. On a host whose workload necessarily creates and closes down many TCP sockets, the sockets & PCBs for TCP sessions in TIME_WAIT state amount to many megabytes of dead weight in RAM.
Maximum Segment Lifetimes Truncation (MSLT) assigns each TCP session to a class based on the nearness of the peer. Corresponding to each class is an MSL, and a session uses the MSL of its class. The classes are loopback (local host equals remote host), local (local host and remote host are on the same link/subnet), and remote (local host and remote host communicate via one or more gateways). Classes corresponding to nearer peers have lower MSLs by default: 2 seconds for loopback, 10 seconds for local, 60 seconds for remote. Loopback and local sessions expire more quickly when MSLT is used.
Vestigial Time-Wait (VTW) replaces a TIME_WAIT session's PCB/socket dead weight with a compact representation of the session, called a "vestigial PCB". VTW data structures are designed to be very fast and memory-efficient: for fast insertion and lookup of vestigial PCBs, the PCBs are stored in a hash table that is designed to minimize the number of cacheline visits per lookup/insertion. The memory both for vestigial PCBs and for elements of the PCB hashtable come from fixed-size pools, and linked data structures exploit this to conserve memory by representing references with a narrow index/offset from the start of a pool instead of a pointer. When space for new vestigial PCBs runs out, VTW makes room by discarding old vestigial PCBs, oldest first. VTW cooperates with MSLT.
It may help to think of VTW as a "FIN cache" by analogy to the SYN cache.
A 2.8-GHz Pentium 4 running a test workload that creates TIME_WAIT sessions as fast as it can is approximately 17% idle when VTW is active versus 0% idle when VTW is inactive. It has 103 megabytes more free RAM when VTW is active (approximately 64k vestigial PCBs are created) than when it is inactive.
|
1.7 | 10-Aug-2010 |
pooka | branches: 1.7.2; Support carp. It would be nice to support this as its own component, but there's about 1000 lines of #ifdef which disagree with my wish.
|
1.6 | 13-Jul-2010 |
rmind | Split-off IPv4 re-assembly mechanism into a separate module. Abstract into ip_reass_init(), ip_reass_lookup(), etc (note: abstraction is not yet complete). No functional changes to the actual mechanism.
OK matt@
|
1.5 | 16-Feb-2010 |
pooka | branches: 1.5.2; Globally define -Wno-pointer-sign, as it has become a pointless exercise of "add it to every Makefile individually".
XXX: should autosynchronize with the rest of the kernel buildflags in sys/conf/Makefile.kern.inc.
|
1.4 | 26-May-2009 |
pooka | branches: 1.4.2; Support IPv6 in rump. I'd have liked to introduce a netinet6 component, but due to ifdef happiness permeating the sources, it's a compile decision for now, so netinet pulls in both inet and inet6.
One issue, one single issue: the loopback interface still needs to be created for IPv6 to work. I have patches to take care of it automatically if the appropriate component (net) is present, but they require a bit more testing before commit.
|
1.3 | 03-Feb-2009 |
pooka | branches: 1.3.2; 1.3.4; Better define GATEWAY in opt_gateway.h instead of the Makefile so UPDATE builds don't go all coocoo.
|
1.2 | 01-Feb-2009 |
pooka | enable GATEWAY
|
1.1 | 16-Oct-2008 |
pooka | branches: 1.1.2; 1.1.4; 1.1.10; Deal with the ld.so/linkset brokenness and compile all of libnet and libnetinet into a big bunch for now. If they were separate libraries, the DOMAIN_DEFINE() in the latter on the linkline would not get noticed at "boot" time because of the abovementioned brokenness. One of these days I'll add code to dlopen() the libraries and resplit them, but this will allow things to work until then.
|
1.1.10.2 | 17-Jan-2009 |
mjf | Sync with HEAD.
|
1.1.10.1 | 16-Oct-2008 |
mjf | file Makefile.inc was added on branch mjf-devfs2 on 2009-01-17 13:29:39 +0000
|
1.1.4.1 | 03-Mar-2009 |
skrll | Sync with HEAD.
|
1.1.2.2 | 19-Oct-2008 |
haad | Sync with HEAD.
|
1.1.2.1 | 16-Oct-2008 |
haad | file Makefile.inc was added on branch haad-dm on 2008-10-19 22:18:08 +0000
|
1.3.4.5 | 11-Aug-2010 |
yamt | sync with head.
|
1.3.4.4 | 11-Mar-2010 |
yamt | sync with head
|
1.3.4.3 | 20-Jun-2009 |
yamt | sync with head
|
1.3.4.2 | 04-May-2009 |
yamt | sync with head.
|
1.3.4.1 | 03-Feb-2009 |
yamt | file Makefile.inc was added on branch yamt-nfs-mp on 2009-05-04 08:14:33 +0000
|
1.3.2.1 | 23-Jul-2009 |
jym | Sync with HEAD.
|
1.4.2.2 | 17-Aug-2010 |
uebayasi | Sync with HEAD.
|
1.4.2.1 | 30-Apr-2010 |
uebayasi | Sync with HEAD.
|
1.5.2.2 | 31-May-2011 |
rmind | sync with head
|
1.5.2.1 | 05-Mar-2011 |
rmind | sync with head
|
1.7.2.1 | 06-Jun-2011 |
jruoho | Sync with HEAD.
|
1.8.14.3 | 03-Dec-2017 |
jdolecek | update from HEAD
|
1.8.14.2 | 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.8.14.1 | 23-Jun-2013 |
tls | resync from head
|
1.8.4.1 | 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
1.10.2.1 | 28-Aug-2013 |
rmind | sync with head
|
1.11.6.3 | 28-Aug-2017 |
skrll | Sync with HEAD
|
1.11.6.2 | 22-Sep-2015 |
skrll | Sync with HEAD
|
1.11.6.1 | 06-Apr-2015 |
skrll | Sync with HEAD
|
1.13.4.1 | 21-Apr-2017 |
bouyer | Sync with HEAD
|
1.13.2.1 | 26-Apr-2017 |
pgoyette | Sync with HEAD
|
1.14.24.1 | 03-Apr-2021 |
thorpej | Sync with HEAD.
|
1.11 | 13-Mar-2014 |
pooka | rename component.c -> netinet_component.c
|
1.10 | 14-Feb-2014 |
pooka | Register netisr's from component constructors instead of via a hardcoded global list.
|
1.9 | 02-Jan-2014 |
pooka | Allow kernels compiled with INET+INET6 to be booted as IPv4-only or IPv6-only.
|
1.8 | 14-Aug-2013 |
pooka | Partially revert previous, there are still a few gotchas in running ipv4/ipv6-only (too many dependencies on ifdefs).
|
1.7 | 14-Aug-2013 |
pooka | Separate inet and inet6, allows inet6-only rump kernels.
|
1.6 | 30-Jun-2013 |
pooka | Raise lo0 so that ipv6 config gets done for it.
Requested and tested by Justin Cormack.
|
1.5 | 11-Jan-2011 |
pooka | branches: 1.5.8; 1.5.18; 1.5.22; Ensure that a) loopback attaches after all the domains have attached b) loopback is configured only after it has attached.
makes tests/net/if_loop work again
|
1.4 | 09-Jan-2011 |
pooka | Autoconfigure 127.0.0.1 for lo0. (testing bind/connect/etc. is now possible on a virgin rump kernel without the need to ifconfig anything)
|
1.3 | 10-Aug-2010 |
pooka | Support carp. It would be nice to support this as its own component, but there's about 1000 lines of #ifdef which disagree with my wish.
|
1.2 | 01-Mar-2010 |
pooka | branches: 1.2.2; Introduce RUMP_COMPONENT. It behaves mostly like a simplified module which is linked into the kernel and cannot be unloaded. The main purpose is to get the proper constructors run and create any /dev nodes necessary for said component. Once more of the kernel (e.g. networking stack and device drivers) are converted to MODULE and devfs pops up from somewhere, rump components can be retired.
|
1.1 | 28-May-2009 |
pooka | branches: 1.1.2; 1.1.4; Use a bunch of weak symbols to determine which network components are present. This works in userspace as opposed relying in link sets, which fail miserably. Later, when the networking stack becomes modularized, we can move to a dynamic scheme like with file systems.
Also, this change allows us to do proper autoconfig, namely attach the loopback interface iff it is present.
|
1.1.4.2 | 17-Aug-2010 |
uebayasi | Sync with HEAD.
|
1.1.4.1 | 30-Apr-2010 |
uebayasi | Sync with HEAD.
|
1.1.2.4 | 11-Aug-2010 |
yamt | sync with head.
|
1.1.2.3 | 11-Mar-2010 |
yamt | sync with head
|
1.1.2.2 | 20-Jun-2009 |
yamt | sync with head
|
1.1.2.1 | 28-May-2009 |
yamt | file component.c was added on branch yamt-nfs-mp on 2009-06-20 07:20:37 +0000
|
1.2.2.1 | 05-Mar-2011 |
rmind | sync with head
|
1.5.22.2 | 18-May-2014 |
rmind | sync with head
|
1.5.22.1 | 28-Aug-2013 |
rmind | sync with head
|
1.5.18.1 | 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.5.8.1 | 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
1.2 | 11-Dec-2009 |
pooka | Include component.c instead of dummy.c so that domain constructors get properly called.
|
1.1 | 16-Oct-2008 |
pooka | branches: 1.1.2; 1.1.10; 1.1.16; Deal with the ld.so/linkset brokenness and compile all of libnet and libnetinet into a big bunch for now. If they were separate libraries, the DOMAIN_DEFINE() in the latter on the linkline would not get noticed at "boot" time because of the abovementioned brokenness. One of these days I'll add code to dlopen() the libraries and resplit them, but this will allow things to work until then.
|
1.1.16.3 | 11-Mar-2010 |
yamt | sync with head
|
1.1.16.2 | 04-May-2009 |
yamt | sync with head.
|
1.1.16.1 | 16-Oct-2008 |
yamt | file dummy.c was added on branch yamt-nfs-mp on 2009-05-04 08:14:33 +0000
|
1.1.10.2 | 17-Jan-2009 |
mjf | Sync with HEAD.
|
1.1.10.1 | 16-Oct-2008 |
mjf | file dummy.c was added on branch mjf-devfs2 on 2009-01-17 13:29:39 +0000
|
1.1.2.2 | 19-Oct-2008 |
haad | Sync with HEAD.
|
1.1.2.1 | 16-Oct-2008 |
haad | file dummy.c was added on branch haad-dm on 2008-10-19 22:18:08 +0000
|
1.13 | 03-Sep-2022 |
thorpej | Garbage-collect the remaining vestiges of netisr.
|
1.12 | 03-Sep-2022 |
thorpej | Convert ARP from a legacy netisr to pktqueue.
|
1.11 | 24-Feb-2018 |
ozaki-r | Avoid a deadlock between softnet_lock and IFNET_LOCK
A deadlock occurs because there is a violation of the rule of lock ordering; softnet_lock is held with hodling IFNET_LOCK, which violates the rule. To avoid the deadlock, replace softnet_lock in in_control and in6_control with KERNEL_LOCK.
We also need to add some KERNEL_LOCKs to protect the network stack surely. This is required, for example, for PR kern/51356.
Fix PR kern/53043
|
1.10 | 11-Dec-2017 |
ozaki-r | Wrap if_ioctl_lock with IFNET_* macros (NFC)
Also if_ioctl_lock perhaps needs to be renamed to something because it's now not just for ioctl...
|
1.9 | 07-Dec-2017 |
ozaki-r | Ensure to call if_addr_init with holding if_ioctl_lock
|
1.8 | 20-Jan-2017 |
ozaki-r | branches: 1.8.6; Protect if_clone data with if_clone_mtx
To this end, carpattach needs to be delayed from RUMP_COMPONENT_NET to RUMP_COMPONENT_NET_IF on rump_server. Otherwise mutex_enter via carpattach for if_clone_mtx is called before mutex_init for it in ifinit1.
|
1.7 | 13-Aug-2016 |
christos | branches: 1.7.2; Don't call loopinit() here. Instead panic if -lrumpnet_net has not been called to initialize lo0ifp.
|
1.6 | 12-Aug-2016 |
christos | more loopinit();
|
1.5 | 26-Jan-2016 |
pooka | branches: 1.5.2; Put the kernelside rump kernel headers into <rump-sys> instead of sprinkling them around the faction directories. Avoids having to add a CPPFLAGS (or several) to pretty much every component Makefile.
Leave compat headers around in the old locations.
The commit changes some autogenerated files, but I'll fix the generators shortly and regen.
|
1.4 | 22-Aug-2014 |
pooka | branches: 1.4.2; Nuke the DOMAINADD() macro and just call domain_attach(), now that things work correctly that way.
|
1.3 | 01-Jul-2014 |
rtr | branches: 1.3.4; fix parameter types in pr_ioctl, called xx_control() functions and remove abuse of pointer to struct mbuf type.
param2 changed to u_long type and uses parameter name 'cmd' (ioctl command) param3 changed to void * type and uses parameter name 'data' param4 changed to struct ifnet * and uses parameter name 'ifp' param5 has been removed (formerly struct lwp *) and uses of 'l' have been replaced with curlwp from curproc(9).
callers have had (now unnecessary) casts to struct mbuf * removed, called code has had (now unnecessary) casts to u_long, void * and struct ifnet * respectively removed.
reviewed by rmind@
|
1.2 | 05-Jun-2014 |
rmind | - Implement pktqueue interface for lockless IP input queue. - Replace ipintrq and ip6intrq with the pktqueue mechanism. - Eliminate kernel-lock from ipintr() and ip6intr(). - Some preparation work to push softnet_lock out of ipintr().
Discussed on tech-net.
|
1.1 | 13-Mar-2014 |
pooka | branches: 1.1.2; 1.1.4; 1.1.6; rename component.c -> netinet_component.c
|
1.1.6.2 | 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
1.1.6.1 | 13-Mar-2014 |
yamt | file netinet_component.c was added on branch yamt-pagecache on 2014-05-22 11:41:17 +0000
|
1.1.4.2 | 18-May-2014 |
rmind | sync with head
|
1.1.4.1 | 13-Mar-2014 |
rmind | file netinet_component.c was added on branch rmind-smpnet on 2014-05-18 17:46:20 +0000
|
1.1.2.1 | 10-Aug-2014 |
tls | Rebase.
|
1.3.4.3 | 03-Dec-2017 |
jdolecek | update from HEAD
|
1.3.4.2 | 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.3.4.1 | 01-Jul-2014 |
tls | file netinet_component.c was added on branch tls-maxphys on 2014-08-20 00:04:43 +0000
|
1.4.2.3 | 05-Feb-2017 |
skrll | Sync with HEAD
|
1.4.2.2 | 05-Oct-2016 |
skrll | Sync with HEAD
|
1.4.2.1 | 19-Mar-2016 |
skrll | Sync with HEAD
|
1.5.2.1 | 20-Mar-2017 |
pgoyette | Sync with HEAD
|
1.7.2.1 | 21-Apr-2017 |
bouyer | Sync with HEAD
|
1.8.6.2 | 26-Feb-2018 |
martin | Pull up following revision(s) (requested by ozaki-r in ticket #588): sys/netinet6/in6.c: revision 1.260 sys/netinet/in.c: revision 1.219 sys/netinet/wqinput.c: revision 1.4 sys/rump/net/lib/libnetinet/netinet_component.c: revision 1.11 sys/netinet/ip_input.c: revision 1.376 sys/netinet6/ip6_input.c: revision 1.193 Avoid a deadlock between softnet_lock and IFNET_LOCK
A deadlock occurs because there is a violation of the rule of lock ordering; softnet_lock is held with hodling IFNET_LOCK, which violates the rule. To avoid the deadlock, replace softnet_lock in in_control and in6_control with KERNEL_LOCK.
We also need to add some KERNEL_LOCKs to protect the network stack surely. This is required, for example, for PR kern/51356.
Fix PR kern/53043
|
1.8.6.1 | 02-Jan-2018 |
snj | Pull up following revision(s) (requested by ozaki-r in ticket #456): sys/arch/arm/sunxi/sunxi_emac.c: 1.9 sys/dev/ic/dwc_gmac.c: 1.43-1.44 sys/dev/pci/if_iwm.c: 1.75 sys/dev/pci/if_wm.c: 1.543 sys/dev/pci/ixgbe/ixgbe.c: 1.112 sys/dev/pci/ixgbe/ixv.c: 1.74 sys/kern/sys_socket.c: 1.75 sys/net/agr/if_agr.c: 1.43 sys/net/bpf.c: 1.219 sys/net/if.c: 1.397, 1.399, 1.401-1.403, 1.406-1.410, 1.412-1.416 sys/net/if.h: 1.242-1.247, 1.250, 1.252-1.257 sys/net/if_bridge.c: 1.140 via patch, 1.142-1.146 sys/net/if_etherip.c: 1.40 sys/net/if_ethersubr.c: 1.243, 1.246 sys/net/if_faith.c: 1.57 sys/net/if_gif.c: 1.132 sys/net/if_l2tp.c: 1.15, 1.17 sys/net/if_loop.c: 1.98-1.101 sys/net/if_media.c: 1.35 sys/net/if_pppoe.c: 1.131-1.132 sys/net/if_spppsubr.c: 1.176-1.177 sys/net/if_tun.c: 1.142 sys/net/if_vlan.c: 1.107, 1.109, 1.114-1.121 sys/net/npf/npf_ifaddr.c: 1.3 sys/net/npf/npf_os.c: 1.8-1.9 sys/net/rtsock.c: 1.230 sys/netcan/if_canloop.c: 1.3-1.5 sys/netinet/if_arp.c: 1.255 sys/netinet/igmp.c: 1.65 sys/netinet/in.c: 1.210-1.211 sys/netinet/in_pcb.c: 1.180 sys/netinet/ip_carp.c: 1.92, 1.94 sys/netinet/ip_flow.c: 1.81 sys/netinet/ip_input.c: 1.362 sys/netinet/ip_mroute.c: 1.147 sys/netinet/ip_output.c: 1.283, 1.285, 1.287 sys/netinet6/frag6.c: 1.61 sys/netinet6/in6.c: 1.251, 1.255 sys/netinet6/in6_pcb.c: 1.162 sys/netinet6/ip6_flow.c: 1.35 sys/netinet6/ip6_input.c: 1.183 sys/netinet6/ip6_output.c: 1.196 sys/netinet6/mld6.c: 1.90 sys/netinet6/nd6.c: 1.239-1.240 sys/netinet6/nd6_nbr.c: 1.139 sys/netinet6/nd6_rtr.c: 1.136 sys/netipsec/ipsec_output.c: 1.65 sys/rump/net/lib/libnetinet/netinet_component.c: 1.9-1.10 kmem_intr_free kmem_intr_[z]alloced memory the underlying pools are the same but api-wise those should match Unify IFEF_*_MPSAFE into IFEF_MPSAFE There are already two flags for if_output and if_start, however, it seems such MPSAFE flags are eventually needed for all if_XXX operations. Having discrete flags for each operation is wasteful of if_extflags bits. So let's unify the flags into one: IFEF_MPSAFE. Fortunately IFEF_*_MPSAFE flags have never been included in any releases, so we can change them without breaking backward compatibility of the releases (though the kernel version of -current should be bumped). Note that if an interface have both MP-safe and non-MP-safe operations at a time, we have to set the IFEF_MPSAFE flag and let callees of non-MP-safe opeartions take the kernel lock. Proposed on tech-kern@ and tech-net@ Provide macros for softnet_lock and KERNEL_LOCK hiding NET_MPSAFE switch It reduces C&P codes such as "#ifndef NET_MPSAFE KERNEL_LOCK(1, NULL); ..." scattered all over the source code and makes it easy to identify remaining KERNEL_LOCK and/or softnet_lock that are held even if NET_MPSAFE. No functional change Hold KERNEL_LOCK on if_ioctl selectively based on IFEF_MPSAFE If IFEF_MPSAFE is set, hold the lock and otherwise don't hold. This change requires additions of KERNEL_LOCK to subsequence functions from if_ioctl such as ifmedia_ioctl and ifioctl_common to protect non-MP-safe components. Proposed on tech-kern@ and tech-net@ Ensure to hold if_ioctl_lock when calling if_flags_set Fix locking against myself on ifpromisc vlan_unconfig_locked could be called with holding if_ioctl_lock. Ensure to not turn on IFF_RUNNING of an interface until its initialization completes And ensure to turn off it before destruction as per IFF_RUNNING's description "resource allocated". (The description is a bit doubtful though, I believe the change is still proper.) Ensure to hold if_ioctl_lock on if_up and if_down One exception for if_down is if_detach; in the case the lock isn't needed because it's guaranteed that no other one can access ifp at that point. Make if_link_queue MP-safe if IFEF_MPSAFE if_link_queue is a queue to store events of link state changes, which is used to pass events from (typically) an interrupt handler to if_link_state_change softint. The queue was protected by KERNEL_LOCK so far, but if IFEF_MPSAFE is enabled, it becomes unsafe because (perhaps) an interrupt handler of an interface with IFEF_MPSAFE doesn't take KERNEL_LOCK. Protect it by a spin mutex. Additionally with this change KERNEL_LOCK of if_link_state_change softint is omitted if NET_MPSAFE is enabled. Note that the spin mutex is now ifp->if_snd.ifq_lock as well as the case of if_timer (see the comment). Use IFADDR_WRITER_FOREACH instead of IFADDR_READER_FOREACH At that point no other one modifies the list so IFADDR_READER_FOREACH is unnecessary. Use of IFADDR_READER_FOREACH is harmless in general though, if we try to detect contract violations of pserialize, using it violates the contract. So avoid using it makes life easy. Ensure to call if_addr_init with holding if_ioctl_lock Get rid of outdated comments Fix build of kernels without ether By throwing out if_enable_vlan_mtu and if_disable_vlan_mtu that created a unnecessary dependency from if.c to if_ethersubr.c. PR kern/52790 Rename IFNET_LOCK to IFNET_GLOBAL_LOCK IFNET_LOCK will be used in another lock, if_ioctl_lock (might be renamed then). Wrap if_ioctl_lock with IFNET_* macros (NFC) Also if_ioctl_lock perhaps needs to be renamed to something because it's now not just for ioctl... Reorder some destruction routines in if_detach - Destroy if_ioctl_lock at the end of the if_detach because it's used in various destruction routines - Move psref_target_destroy after pr_purgeif because we want to use psref in pr_purgeif (otherwise destruction procedures can be tricky) Ensure to call if_mcast_op with holding IFNET_LOCK Note that CARP doesn't deal with IFNET_LOCK yet. Remove IFNET_GLOBAL_LOCK where it's unnecessary because IFNET_LOCK is held Describe which lock is used to protect each member variable of struct ifnet Requested by skrll@ Write a guideline for converting an interface to IFEF_MPSAFE Requested by skrll@ Note that IFNET_LOCK must not be held in softint Don't set IFEF_MPSAFE unless NET_MPSAFE at this point Because recent investigations show that interfaces with IFEF_MPSAFE need to follow additional restrictions to work with the flag safely. We should enable it on an interface by default only if the interface surely satisfies the restrictions, which are described in if.h. Note that enabling IFEF_MPSAFE solely gains a few benefit on performance because the network stack is still serialized by the big kernel locks by default.
|
1.2 | 02-Dec-2014 |
pooka | Remove shlib_version files and just use Makefile SHLIB_MAJOR/MINOR, with the default provided by Makefile.rump (they're all 0.0 anyway)
|
1.1 | 06-Oct-2008 |
pooka | branches: 1.1.2; 1.1.4; 1.1.12; 1.1.18; 1.1.46; 1.1.66; Provide the TCP/IP as a rump library.
|
1.1.66.1 | 06-Apr-2015 |
skrll | Sync with HEAD
|
1.1.46.1 | 03-Dec-2017 |
jdolecek | update from HEAD
|
1.1.18.2 | 04-May-2009 |
yamt | sync with head.
|
1.1.18.1 | 06-Oct-2008 |
yamt | file shlib_version was added on branch yamt-nfs-mp on 2009-05-04 08:14:33 +0000
|
1.1.12.2 | 17-Jan-2009 |
mjf | Sync with HEAD.
|
1.1.12.1 | 06-Oct-2008 |
mjf | file shlib_version was added on branch mjf-devfs2 on 2009-01-17 13:29:39 +0000
|
1.1.4.2 | 19-Oct-2008 |
haad | Sync with HEAD.
|
1.1.4.1 | 06-Oct-2008 |
haad | file shlib_version was added on branch haad-dm on 2008-10-19 22:18:08 +0000
|
1.1.2.2 | 10-Oct-2008 |
skrll | Sync with HEAD.
|
1.1.2.1 | 06-Oct-2008 |
skrll | file shlib_version was added on branch wrstuden-revivesa on 2008-10-10 22:37:09 +0000
|