summaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_usrreq.c
Commit message (Collapse)AuthorAgeFilesLines
* This commit was manufactured by cvs2svn to create tagrelease/3.0.0cvs2svn1999-01-211-7/+3
| | | | | | | | 'RELENG_3_0_0_RELEASE'. Notes: svn path=/stable/3/; revision=42951 svn path=/release/3.0.0/; revision=42952; tag=release/3.0.0
* Add a flag, passed to pru_send routines, PRUS_MORETOCOME. ThisBill Fenner1999-01-201-2/+7
| | | | | | | | | | | | flag means that there is more data to be put into the socket buffer. Use it in TCP to reduce the interaction between mbuf sizes and the Nagle algorithm. Based on: "Justin C. Walker" <justin@apple.com>'s description of Apple's fix for this problem. Notes: svn path=/head/; revision=42902
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticArchie Cobbs1998-12-071-2/+1
| | | | | | | and local variables, goto labels, and functions declared but not defined. Notes: svn path=/head/; revision=41591
* Yow! Completely change the way socket options are handled, eliminatingGarrett Wollman1998-08-231-57/+60
| | | | | | | | | another specialized mbuf type in the process. Also clean up some of the cruft surrounding IPFW, multicast routing, RSVP, and other ill-explored corners. Notes: svn path=/head/; revision=38482
* Improved connection establishment performance by doing local port lookups viaDavid Greenman1998-01-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a hashed port list. In the new scheme, in_pcblookup() goes away and is replaced by a new routine, in_pcblookup_local() for doing the local port check. Note that this implementation is space inefficient in that the PCB struct is now too large to fit into 128 bytes. I might deal with this in the future by using the new zone allocator, but I wanted these changes to be extensively tested in their current form first. Also: 1) Fixed off-by-one errors in the port lookup loops in in_pcbbind(). 2) Got rid of some unneeded rehashing. Adding a new routine, in_pcbinshash() to do the initialial hash insertion. 3) Renamed in_pcblookuphash() to in_pcblookup_hash() for easier readability. 4) Added a new routine, in_pcbremlists() to remove the PCB from the various hash lists. 5) Added/deleted comments where appropriate. 6) Removed unnecessary splnet() locking. In general, the PCB functions should be called at splnet()...there are unfortunately a few exceptions, however. 7) Reorganized a few structs for better cache line behavior. 8) Killed my TCP_ACK_HACK kludge. It may come back in a different form in the future, however. These changes have been tested on wcarchive for more than a month. In tests done here, connection establishment overhead is reduced by more than 50 times, thus getting rid of one of the major networking scalability problems. Still to do: make tcp_fastimo/tcp_slowtimo scale well for systems with a large number of connections. tcp_fastimo is easy; tcp_slowtimo is difficult. WARNING: Anything that knows about inpcb and tcpcb structs will have to be recompiled; at the very least, this includes netstat(1). Notes: svn path=/head/; revision=32821
* Fixed a missing splx(s) bug in tcp_usr_send().David Greenman1997-12-181-2/+3
| | | | Notes: svn path=/head/; revision=31840
* Make TCPDEBUG a new-style option.Joerg Wunsch1997-09-161-1/+3
| | | | Notes: svn path=/head/; revision=29514
* Update network code to use poll support.Peter Wemm1997-09-141-2/+2
| | | | Notes: svn path=/head/; revision=29366
* Fix all areas of the system (or at least all those in LINT) to avoid storingGarrett Wollman1997-08-161-17/+14
| | | | | | | | | | | socket addresses in mbufs. (Socket buffers are the one exception.) A number of kernel APIs needed to get fixed in order to make this happen. Also, fix three protocol families which kept PCBs in mbufs to not malloc them instead. Delete some old compatibility cruft while we're at it, and add some new routines in the in_cksum family. Notes: svn path=/head/; revision=28270
* Removed unused #includes.Bruce Evans1997-08-021-6/+1
| | | | Notes: svn path=/head/; revision=27845
* The long-awaited mega-massive-network-code- cleanup. Part I.Garrett Wollman1997-04-271-21/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit includes the following changes: 1) Old-style (pr_usrreq()) protocols are no longer supported, the compatibility glue for them is deleted, and the kernel will panic on boot if any are compiled in. 2) Certain protocol entry points are modified to take a process structure, so they they can easily tell whether or not it is possible to sleep, and also to access credentials. 3) SS_PRIV is no more, and with it goes the SO_PRIVSTATE setsockopt() call. Protocols should use the process pointer they are now passed. 4) The PF_LOCAL and PF_ROUTE families have been updated to use the new style, as has the `raw' skeleton family. 5) PF_LOCAL sockets now obey the process's umask when creating a socket in the filesystem. As a result, LINT is now broken. I'm hoping that some enterprising hacker with a bit more time will either make the broken bits work (should be easy for netipx) or dike them out. Notes: svn path=/head/; revision=25201
* Fix potential crash where a user attempts to perform an impliedGarrett Wollman1997-02-211-1/+14
| | | | | | | | | | | connect in TCP while sending urgent data. It is not clear what purpose is served by doing this, but there's no good reason why it shouldn't work. Submitted by: tjevans@raleigh.ibm.com via wpaul Notes: svn path=/head/; revision=22962
* Convert raw IP from mondo-switch-statement-from-Hell toGarrett Wollman1997-02-181-55/+6
| | | | | | | | | | | | pr_usrreqs. Collapse duplicates with udp_usrreq.c and tcp_usrreq.c (calling the generic routines in uipc_socket2.c and in_pcb.c). Calling sockaddr()_ or peeraddr() on a detached socket now traps, rather than harmlessly returning an error; this should never happen. Allow the raw IP buffer sizes to be controlled via sysctl. Notes: svn path=/head/; revision=22900
* Fix the mechanism for choosing wehether to save the slow-start thresholdGarrett Wollman1997-02-141-317/+0
| | | | | | | | | | | | | in the route. This allows us to remove the unconditional setting of the pipesize in the route, which should mean that SO_SNDBUF and SO_RCVBUF should actually work again. While we're at it: - Convert udp_usrreq from `mondo switch statement from Hell' to new-style. - Delete old TCP mondo switch statement from Hell, which had previously been diked out. Notes: svn path=/head/; revision=22719
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* Improved in_pcblookuphash() to support wildcarding, and changed relaventDavid Greenman1996-10-071-2/+2
| | | | | | | | | | | | | callers of it to take advantage of this. This reduces new connection request overhead in the face of a large number of PCBs in the system. Thanks to David Filo <filo@yahoo.com> for suggesting this and providing a sample implementation (which wasn't used, but showed that it could be done). Reviewed by: wollman Notes: svn path=/head/; revision=18795
* Make the misnamed tcp initial keepalive timer value (which is really thePaul Traina1996-09-131-2/+2
| | | | | | | | | | | time, in seconds, that state for non-established TCP sessions stays about) a sysctl modifyable variable. [part 1 of two commits, I just realized I can't play with the indices as I was typing this commit message.] Notes: svn path=/head/; revision=18280
* Fixed two bugs in previous commit: be sure to include tcp_debug.h whenDavid Greenman1996-07-121-2/+2
| | | | | | | TCPDEBUG is defined, and fix typo in TCPDEBUG2() macro. Notes: svn path=/head/; revision=17138
* Modify the kernel to use the new pr_usrreqs interface rather than the oldGarrett Wollman1996-07-111-1/+428
| | | | | | | | | | | | | | | | | pr_usrreq mechanism which was poorly designed and error-prone. This commit renames pr_usrreq to pr_ousrreq so that old code which depended on it would break in an obvious manner. This commit also implements the new interface for TCP, although the old function is left as an example (#ifdef'ed out). This commit ALSO fixes a longstanding bug in the TCP timer processing (introduced by davidg on 1995/04/12) which caused timer processing on a TCB to always stop after a single timer had expired (because it misinterpreted the return value from tcp_usrreq() to indicate that the TCB had been deleted). Finally, some code related to polling has been deleted from if.c because it is not relevant t -current and doesn't look at all like my current code. Notes: svn path=/head/; revision=17096
* Move or add #include <queue.h> in preparation for upcoming struct socketDavid Greenman1996-03-111-1/+2
| | | | | | | changes. Notes: svn path=/head/; revision=14546
* Removed unnecessary #includes of vm stuff. Most of them were onceBruce Evans1995-12-061-2/+1
| | | | | | | | | | prerequisites for <sys/sysctl.h>. subr_prof.c: Also replaced #include of <sys/user.h> by #include of <sys/resourcevar.h>. Notes: svn path=/head/; revision=12657
* New style sysctl & staticize alot of stuff.Poul-Henning Kamp1995-11-141-53/+11
| | | | Notes: svn path=/head/; revision=12296
* Start adding new style sysctl here too.Poul-Henning Kamp1995-11-091-2/+6
| | | | Notes: svn path=/head/; revision=12172
* Fix a logical error in T/TCP: when we actively open a connection, weAndras Olah1995-11-031-1/+20
| | | | | | | | | | | | | have to decide whether to send a CC or CCnew option in our SYN segment depending on the contents of our TAO cache. This decision has to be made once when the connection starts. The earlier code delayed this decision until the segment was assembled in tcp_output() and retransmitted SYN segments could have different CC options. Reviewed by: Richard Stevens, davidg, wollman Notes: svn path=/head/; revision=12045
* Start the 2MSL timer when the socket is closed and the TCP connection isAndras Olah1995-10-291-2/+6
| | | | | | | | | | | | in the FIN_WAIT_2 state in order to prevent the conn. hanging there forever. Reviewed by: davidg, olah Submitted by: Arne Henrik Juul <arnej@imf.unit.no> Obtained from: bugs@netbsd.org Notes: svn path=/head/; revision=11928
* Don't leak mbufs in an unusual error case in tcp_usrreq().Garrett Wollman1995-09-131-2/+14
| | | | | | | | Reviewed by: Andras Olah <olah@freebsd.org> Obtained from: Lite-2 Notes: svn path=/head/; revision=10714
* Merge RELENG_2_0_5 into HEADRodney W. Grimes1995-06-111-1/+3
| | | | Notes: svn path=/head/; revision=9202
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-4/+4
| | | | Notes: svn path=/head/; revision=8876
* Implemented PCB hashing. Includes new functions in_pcbinshash, in_pcbrehash,David Greenman1995-04-091-4/+5
| | | | | | | and in_pcblookuphash. Notes: svn path=/head/; revision=7684
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'Bruce Evans1995-03-161-6/+4
| | | | | | | | | (except in netccitt, netiso and netns) and most of the warnings from `gcc -Wnested-externs'. Fix all the bugs found. There were no serious ones. Notes: svn path=/head/; revision=7090
* Include missing <sys/kernel.h> for `hz'.Garrett Wollman1995-02-171-1/+2
| | | | | | | Submitted by: David Greenman, Rod Grimes, Christoph Kukulies Notes: svn path=/head/; revision=6510
* Correctly initialize so_linger in ticks (not seconds).Garrett Wollman1995-02-161-3/+3
| | | | | | | Obtained from: Stevens, vol. 2, p. 1010 Notes: svn path=/head/; revision=6481
* Transaction TCP support now standard. Hack away!Garrett Wollman1995-02-161-48/+0
| | | | Notes: svn path=/head/; revision=6475
* Add lots of useful MIB variables and a few not-so-useful ones forGarrett Wollman1995-02-161-9/+22
| | | | | | | completeness. Notes: svn path=/head/; revision=6472
* Merge Transaction TCP, courtesy of Andras Olah <olah@cs.utwente.nl> andGarrett Wollman1995-02-091-2/+199
| | | | | | | | | | | | Bob Braden <braden@isi.edu>. NB: This has not had David's TCP ACK hack re-integrated. It is not clear what the correct solution to this problem is, if any. If a better solution doesn't pop up in response to this message, I'll put David's code back in (or he's welcome to do so himself). Notes: svn path=/head/; revision=6283
* Fix PR 59: don't allow TCP connections withmulticast addresses at eitherGarrett Wollman1994-12-151-1/+22
| | | | | | | end. Notes: svn path=/head/; revision=5112
* Made TCPDEBUG truely optional. Based on changes I made in FreeBSD 1.1.5.David Greenman1994-09-151-1/+5
| | | | | | | | Fixed somebody's idea of a joke - about the first half of the lines in in_proto.c were spaced over by one space. Notes: svn path=/head/; revision=2788
* Added $Id$David Greenman1994-08-021-0/+1
| | | | Notes: svn path=/head/; revision=1817
* Increased tcp_send/recvspace to 16k, and added TCP_SMALLSPACE ifdefDavid Greenman1994-05-291-2/+12
| | | | | | | to set it to 4k. Notes: svn path=/head/; revision=1621
* The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.Rodney W. Grimes1994-05-251-1/+1
| | | | | | | | Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman Notes: svn path=/head/; revision=1549
* BSD 4.4 Lite Kernel SourcesRodney W. Grimes1994-05-241-0/+517
Notes: svn path=/head/; revision=1541