#
a4f40cc8 |
| 14-Nov-2023 |
Aaron LI <aly@aaronly.me> |
Update rn_inithead() users to switch to byte offset
|
Revision tags: v6.4.0, v6.4.0rc1, v6.5.0, v6.2.2, v6.2.1, v6.2.0, v6.3.0, v6.0.1, v6.0.0, v6.0.0rc1, v6.1.0, v5.8.3, v5.8.2, v5.8.1, v5.8.0, v5.9.0, v5.8.0rc1, v5.6.3 |
|
#
f14c36b5 |
| 10-Sep-2019 |
Roy Marples <roy@marples.name> |
inet: unhook and remove rip_ctlinput
This is no longer needed thanks to rt_purgecloned. This also fixes two problems where we would lie about the address being removed via RTM_DELADDR and the assump
inet: unhook and remove rip_ctlinput
This is no longer needed thanks to rt_purgecloned. This also fixes two problems where we would lie about the address being removed via RTM_DELADDR and the assumption that the subnet route should be removed / moved to another interface.
show more ...
|
#
8266e2ec |
| 10-Sep-2019 |
Roy Marples <roy@marples.name> |
inet: hookup in_if_down with rt_purgecloned
|
Revision tags: v5.6.2, v5.6.1, v5.6.0, v5.6.0rc1, v5.7.0, v5.4.3, v5.4.2, v5.4.1, v5.4.0, v5.5.0, v5.4.0rc1, v5.2.2, v5.2.1 |
|
#
755d70b8 |
| 21-Apr-2018 |
Sascha Wildner <saw@online.de> |
Remove IPsec and related code from the system.
It was unmaintained ever since we inherited it from FreeBSD 4.8.
In fact, we had two implementations from that time: IPSEC and FAST_IPSEC. FAST_IPSEC
Remove IPsec and related code from the system.
It was unmaintained ever since we inherited it from FreeBSD 4.8.
In fact, we had two implementations from that time: IPSEC and FAST_IPSEC. FAST_IPSEC is the implementation to which FreeBSD has moved since, but it didn't even build in DragonFly.
Fixes for dports have been committed to DeltaPorts.
Requested-by: dillon Dports-testing-and-fixing: zrj
show more ...
|
Revision tags: v5.2.0, v5.3.0, v5.2.0rc, v5.0.2, v5.0.1, v5.0.0, v5.0.0rc2, v5.1.0, v5.0.0rc1, v4.8.1 |
|
#
2eb060ca |
| 01-Aug-2017 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
domain: Nuke pfslowtimo.
|
#
7355fd58 |
| 01-Aug-2017 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
ip: Don't use pr_slowtimo.
|
#
fd16f770 |
| 01-Aug-2017 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
igmp: Don't use pr_slowtimo.
|
#
d2a45df8 |
| 31-Jul-2017 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
domain: Nuke pffasttimo
|
#
2e6afa32 |
| 31-Jul-2017 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
igmp: Use callout instead of pffasttimo.
|
#
51e5cc05 |
| 22-Jun-2017 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
domain: Explicitly setup inet/inet6/route/local domain.
|
Revision tags: v4.8.0, v4.6.2, v4.9.0, v4.8.0rc, v4.6.1, v4.6.0, v4.6.0rc2, v4.6.0rc, v4.7.0 |
|
#
680c4dd3 |
| 26-May-2016 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
tcp: Make setsockopt(2) TCP_{NODELAY,NOPUSH,NOOPT,FASTKEEP} asynchronous
This makes all network system calls used by nginx asynchronous and greatly improves nginx performance.
For 1 requests/connec
tcp: Make setsockopt(2) TCP_{NODELAY,NOPUSH,NOOPT,FASTKEEP} asynchronous
This makes all network system calls used by nginx asynchronous and greatly improves nginx performance.
For 1 requests/connection (30K concurrent connections), this commit gives 12% improvement for 16KB web object (was 16.8Gbps, now 19.2Gbps, which maxes out 2x10Ge). And it gives 19% improvement for 1KB web object (was 156Kreqs/s, now 186Kreqs/s).
show more ...
|
Revision tags: v4.4.3, v4.4.2, v4.4.1, v4.4.0, v4.5.0, v4.4.0rc |
|
#
5aaa7016 |
| 23-Oct-2015 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
udp: Implement asynchronized pru_connect.
This is mainly used to improve UDP connect(2) performance. Most of the DNS resolvers (getaddrinfo(3) and curl's DNS resolver, etc) and RTP application will
udp: Implement asynchronized pru_connect.
This is mainly used to improve UDP connect(2) performance. Most of the DNS resolvers (getaddrinfo(3) and curl's DNS resolver, etc) and RTP application will see improvement.
Before this commit the user space thread uses connect(2) will have to wait for the netisr to complete all preceeding messages. This could be performance hit for connect(2): the user space thread is suspended, even if the UDP connect(2) should always be nonblocking.
The only drawback is that bunch of datagrams sent immediately after connect(2) may not appear on the network in the sending order, but UDP applications should always be able to handle out-of-order data- grams.
UDP's asynchronous pru_connect implementation will set ISCONNECTED before dispatching connect message to netisr. The errors like EADDRNOTAVAIL, i.e. out of local port space, will be notified through later send(2)/recv(2), or getsockopt(2) SOL_SOCKET/SO_ERROR.
The measured effect of this change on 2-ways E5-2600v2 with Intel 82599 (10Gbe) using tools/kq_connect_client -u, i.e. UDP socket/ connect/send /close before initiating a TCP connection: - Connect rate increases by ~45Kconns/s; we are now doing 300Kconns/s. - IPIs rate to the CPUs not running netisrs reduces (23Kipis/s -> 16Kipis/s).
show more ...
|
Revision tags: v4.2.4, v4.3.1, v4.2.3, v4.2.1, v4.2.0, v4.0.6, v4.3.0, v4.2.0rc, v4.0.5, v4.0.4, v4.0.3 |
|
#
60a260ad |
| 07-Jan-2015 |
Sascha Wildner <saw@online.de> |
kernel: Remove our ancient SCTP support.
It was based on an early stage of FreeBSD's support and never got beyond that point, due to lack of usage and lack of maintenance.
It is also kind of standi
kernel: Remove our ancient SCTP support.
It was based on an early stage of FreeBSD's support and never got beyond that point, due to lack of usage and lack of maintenance.
It is also kind of standing the the way of ongoing work in the IPv6 stack by sephe.
If anyone ever wants to start again on upgrading and maintaining it, they can decide then if reverting this commit again makes sense as a base.
Requested-by: sephe Approved-by: dillon
show more ...
|
Revision tags: v4.0.2, v4.0.1 |
|
#
de9f6700 |
| 24-Nov-2014 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
igmp: IGMP processing mpsafe
|
Revision tags: v4.0.0, v4.0.0rc3, v4.0.0rc2, v4.0.0rc, v4.1.0 |
|
#
684247a4 |
| 29-Sep-2014 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
udp: Optimize detach path
If the inpcb was never put onto wildcard hash and the multicast options were never accessed nor modified, we could directly dispose the inpcb on detach path instead of goin
udp: Optimize detach path
If the inpcb was never put onto wildcard hash and the multicast options were never accessed nor modified, we could directly dispose the inpcb on detach path instead of going through all netisrs to make sure that it is no longer being accessed.
After this commit 'kq_connect_client -u' gives ~180Kconns/s instead of ~160Kconns/s (~12% improvement).
show more ...
|
Revision tags: v3.8.2 |
|
#
be4519a2 |
| 03-Jul-2014 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
udp: Make udp pcbinfo and portinfo per-cpu; greatly improve performance
MAJOR CHANGES:
- Add token to protect pcbinfo's inpcb list and wildcard hash table. Currently only udp per-cpu pcbinfo sets
udp: Make udp pcbinfo and portinfo per-cpu; greatly improve performance
MAJOR CHANGES:
- Add token to protect pcbinfo's inpcb list and wildcard hash table. Currently only udp per-cpu pcbinfo sets this token. udp serializer and netisr barrier are nuked.
o udp inpcb list:
Under most cases, udp inpcb list is operated in its owner netisr. However, it is also accessed and modified (no effiective udp inpcb will be unlinked though) in netisr0 to adjust multicast options if one interface is to be detached. So protecting udp inpcb list accessing and modification w/ token is necessary.
At udp inpcb detach time, the udp inpcb is first removed from the udp inpcb list, then a message will go through all netisrs, which makes sure that no netisrs are using or can find this udp inpcb from the udp inpcb list. After all these, this udp inpcb is destroyed in its owner netisr.
In netisrs, it is MP safe to find a udp inpcb from udp inpcb list, then release the token and process the found udp inpcb.
In other threads, it is MP safe to find a udp inpcb from udp inpcb list, then release the token and process the found udp inpcb in non-blocking fashion.
See also the usage of inpcb marker.
o udp wildcard hash table:
On input path, udp wildcard hash table is searched in its owner netisr. In order to ease implicit binding (bind during send), connect after binding, and disconnect, udp inpcb are inserted into and removed from other udp pcbinfos' wildcard hash table in its owner netisr. Thus the udp wildcard hash table must be protected w/ token.
At udp inpcb detach time, a message will go through all netisrs, and this udp inpcb will be removed from the udp wildcard hash table belonging to the current netisr. This makes sure that once the current netisr runs the message handler, this udp inpcb will not be used and be found in the current netisr. When the message reaches the last netisr, this udp inpcb is redispatched to its owner netisr to be destroyed.
In netisrs, it is MP safe to find a udp inpcb from udp wildcard hash table, then release the token and process the found udp inpcb, e.g. use udp inpcb found by in_pcblookuphash().
In other threads, it is MP safe to find a udp inpcb from udp wildcard hash table, then release the token and process the found udp inpcb in non-blocking fashion.
See also the usage of inpcb container marker.
o udp connect hash table:
It is lockless MP safe, and only accessed and modified in its owner netisr.
- During inpcb iteration through inpcb list, use inpcb marker when calling functions, which may block, e.g. in_pcbpurgeif0(), so the inpcb iteration will not stop prematurely, if the inpcb being processed is removed from the inpcb list.
- Use udp inpcb wildcard table and udp inpcb connect hash table to dispatch input multicast and broadcast udp datagrams. Using udp inpcb list could be time consume, since we need to check udp inpcb lists on all cpus; and secondly, once udp inpcb has a local port, it will be in either udp wildcard hash table or udp connect hash table.
Since the socket buffer operation on input path may block, inpcb container marker is used when iterating inpcbs from udp inpcb wildcard hash table. in_pcblookup_pkthash() is adjusted to skip inpcb container marker.
- udp socket so_port is no longer fixed to netisr0 msgport o Initial udp socket so_port is the current cpu's netisr msgport. o Bound but unconnected udp socket so_port is selected according to local port hash. o Connected udp socket so_port is selected according to the udp hash, i.e. laddr/faddr toeplitz hash (exception: multicast laddr or multicast faddr, is hashed to netisr0). o Multicast socket options are forced to be handled in netisr0, since udp socket so_port may not be netisr0 msgport.
- In order to support asynchronized udp inpcb detach: o EJUSTRETURN from pru_detach method now means protocol will call sodiscard() and sofree() for soclose(). udp pru_detach method returns EJUSTRETURN as of this commit. o SS_ISCLOSING socket state is set before calling pru_detach method, so protocol could avoid certain expensive, unnecessary or disallowed operation in pru_disconnect or pru_detach method, e.g. udp pru_disconnect method avoids putting udp inpcb back to udp wildcard hash table, if SS_ISCLOSING is set.
MISC CHANGES:
- pcbinfo's cpu id must be set now; -1 is disallowed. - udp pru_abort method should never be called; it panicks now. - Restore traditional BSD behaviour, if unbound udp socket connect fails: if local port of the udp socket has been selected, its inpcb should be in wildcard hash table, i.e. the udp inpcb should be visible on udp datagrams input path. - Make sure multicast stuffs are adjusted only in netisr0 for inet6, if one interface is about to be detached.
PERFORMANCE IMPROVEMENT:
For 'kq_connect_client -u' test, this commit gives 400% performance improvement (31Kconns/s -> 160Kconns/s).
show more ...
|
#
ee0be9ca |
| 18-Jun-2014 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
net: Add initport protosw method to init socket's default protocol port
Currently only tcp implements this method to distribute pru_attach and pru_connect workload.
Nuke no longer necessary protosw
net: Add initport protosw method to init socket's default protocol port
Currently only tcp implements this method to distribute pru_attach and pru_connect workload.
Nuke no longer necessary protosw flag PR_RAND_INITPORT and sysctl kern.ipc.rand_initport.
show more ...
|
Revision tags: v3.8.1, v3.6.3, v3.8.0, v3.8.0rc2, v3.9.0, v3.8.0rc |
|
#
6f25d555 |
| 20-Apr-2014 |
Sascha Wildner <saw@online.de> |
Remove support for the IPX and NCP protocols, and for NWFS.
This was on the list for a longer time now. FreeBSD removed it recently, too. Their commit msg has some more info:
"IPX was a network tra
Remove support for the IPX and NCP protocols, and for NWFS.
This was on the list for a longer time now. FreeBSD removed it recently, too. Their commit msg has some more info:
"IPX was a network transport protocol in Novell's NetWare network operating system from late 80s and then 90s. The NetWare itself switched to TCP/IP as default transport in 1998. Later, in this century the Novell Open Enterprise Server became successor of Novell NetWare. The last release that claimed to still support IPX was OES 2 in 2007. Routing equipment vendors (e.g. Cisco) discontinued support for IPX in 2011."
The commit removes support for NCP (NetWare Core Protocol) and NWFS (NetWare File System) along with it (both gone from FreeBSD too since a while).
show more ...
|
Revision tags: v3.6.2, v3.6.1, v3.6.0, v3.7.1, v3.6.0rc, v3.7.0 |
|
#
5bf31620 |
| 25-Oct-2013 |
Antonio Huete Jimenez <tuxillo@quantumachine.net> |
A working IPSEC implementation (1/many)
* Fix fast_ipsec(4) so that it at least builds. * Untested and probably not working.
Reported-by: Thomas Nikolajsen Dragonfly-bug: <http://bugs.dragonflybsd.
A working IPSEC implementation (1/many)
* Fix fast_ipsec(4) so that it at least builds. * Untested and probably not working.
Reported-by: Thomas Nikolajsen Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/1843>
show more ...
|
#
1c92f416 |
| 28-Aug-2013 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
tcp: Implement random initial msgport
After e368a6e95e2cd9556a3e0fc43167d2dcf3a8253f, it is found that the left bottle neck of nonblocking TCP connect(2) performance is that all socket(2) and initia
tcp: Implement random initial msgport
After e368a6e95e2cd9556a3e0fc43167d2dcf3a8253f, it is found that the left bottle neck of nonblocking TCP connect(2) performance is that all socket(2) and initial TCP connect operation (bind laddr and lport) are all carried out in netisr0; CPU0 is 100% busy during test.
The idea of random initial msgport for TCP is that instead of using netisr0's msgport as initial msgport, we could use any of the available netisr msgport to carry out socket(2) and initial TCP connect operation.
Most of parts of TCP are already ready for random initial msgport, only TCP pru_listen requires trivial modification to fix the socket msgport to netisr0's msgport (which is required to perform global wild hashtable updating).
As of this commit, the current CPU's netisr msgport will be selected as TCP socket's initial msgport, if random initial msgport is enabled.
Sysctl node kern.ipc.rand_initport is added to disable this optimization. It is enabled by default.
This commit improves both nonblocking TCP connect(2) and blocking TCP connect(2) performance.
Nonblocking connect(2) performance measurement (i7-2600 w/ bnx(4)), using tools/tools/netrate/accept_connect/kq_connect_client:
kq_connect_client -4 SERVADDR -p SERVPORT -i 8 -c 32 -l 30 (8 processes, each creates 32 connections simultaniously)
16 run average: random initial msgport netisr0 msgport 263915.17 conns/s 220979.89 conns/s
This commit gives ~19% performance improvement for nonblocking connect(2)
Blocking connect(2) performance measurement (i7-2600 w/ bnx(4)), using tools/tools/netrate/accept_connect/connect_client:
connect_client -4 SERVADDR -p SERVPORT -i 256 -l 30 (256 processes)
16 run average: random initial msgport netisr0 msgport 240235.23 conns/s 198312.87 conns/s
This commit gives ~21% performance improvement for blocking connect(2)
show more ...
|
Revision tags: v3.4.3 |
|
#
e368a6e9 |
| 20-Aug-2013 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
tcp: Implement asynchronous pru_connect
This is mainly used to improve TCP nonblocking connect(2) performance.
Before this commit the user space thread uses nonblocking connect(2) will have to wait
tcp: Implement asynchronous pru_connect
This is mainly used to improve TCP nonblocking connect(2) performance.
Before this commit the user space thread uses nonblocking connect(2) will have to wait for the netisr completes the SYN output. This could be performance hit for nonblocking connect(2). First, the user space thread is put into sleep, even if the connect(2) is nonblocking. Second, it does not make too much sense for nonblocking connect(2) to wait for the SYN output.
TCP's asynchronous pru_connect implementation will set ISCONNECTING before dispatching netmsg to netisr0. The errors like EADDRNOTAVAIL, i.e. out of local port space, will be notified through kevent(2) or getsockopt(2) SOL_SOCKET/SO_ERROR.
NFS and other kernel code still use old synchronized pru_connect. This commit only affects connect(2) syscall.
Sysctl node kern.ipc.soconnect_async is added to enable and disable asynchronous pru_connect. It is enabled by default.
The performance measurement (i7-2600 w/ bnx(4)), using tools/tools/netrate/accept_connect/kq_connect_client:
kq_connect_client -4 SERVADDR -p SERVPORT -i 8 -c 32 -l 30 (8 processes, each creates 32 connections simultaniously, run 30 secs)
16 runs average:
asynchronous pru_connect synchronized pru_connect 220979.89 conns/s 189106.88 conns/s
This commit gives ~16% performance improvement for nonblocking connect(2)
show more ...
|
#
c0467c22 |
| 20-Aug-2013 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
uipc: Reference the originator thread if asynchronized pru_send is used
It is required for UDP asynchronized pru_send, which could access the originator's thread.
|
#
dc71b7ab |
| 31-May-2013 |
Justin C. Sherrill <justin@shiningsilence.com> |
Correct BSD License clause numbering from 1-2-4 to 1-2-3.
Apparently everyone's doing it: http://svnweb.freebsd.org/base?view=revision&revision=251069
Submitted-by: "Eitan Adler" <lists at eitanadl
Correct BSD License clause numbering from 1-2-4 to 1-2-3.
Apparently everyone's doing it: http://svnweb.freebsd.org/base?view=revision&revision=251069
Submitted-by: "Eitan Adler" <lists at eitanadler.com>
show more ...
|
Revision tags: v3.4.2 |
|
#
2702099d |
| 06-May-2013 |
Justin C. Sherrill <justin@shiningsilence.com> |
Remove advertising clause from all that isn't contrib or userland bin.
By: Eitan Adler <lists@eitanadler.com>
|
Revision tags: v3.4.0, v3.4.1, v3.4.0rc, v3.5.0 |
|
#
9770e26e |
| 21-Feb-2013 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
icmp: ICMP is MPSAFE
|