summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_timewait.c
Commit message (Collapse)AuthorAgeFilesLines
* Improved connection establishment performance by doing local port lookups viadg1998-01-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* Make TCP_COMPAT_42 a new style option.eivind1998-01-251-1/+2
|
* Fix an incredibly horrible bug in the ipfw codejulian1997-12-191-1/+3
| | | | | | | | where if you are using the "reset tcp" firewall command, the kernel would write ethernet headers onto random kernel stack locations. Fought to the death by: terry, julian, archie. fix valid for 2.2 series as well.
* Removed unused #includes.bde1997-10-281-5/+1
|
* Make TCPDEBUG a new-style option.joerg1997-09-161-1/+3
|
* Fixed gratuitous ANSIisms.bde1997-09-161-4/+5
|
* Reorganize elements of the inpcb struct to take better advantage ofdg1997-04-031-2/+2
| | | | | | | | cache lines. Removed the struct ip proto since only a couple of chars were actually being used in it. Changed the order of compares in the PCB hash lookup to take advantage of partial cache line fills (on PPro). Discussed-with: wollman
* Improved performance of hash algorithm while (hopefully) not reducingdg1997-03-031-2/+2
| | | | | | | | the quality of the hash distribution. This does not fix a problem dealing with poor distribution when using lots of IP aliases and listening on the same port on every one of them...some other day perhaps; fixing that requires significant code changes. The use of xor was inspired by David S. Miller <davem@jenolan.rutgers.edu>
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Fix the mechanism for choosing wehether to save the slow-start thresholdwollman1997-02-141-2/+19
| | | | | | | | | | 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.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-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.
* Eliminate some more references to separate ip_v and ip_hl fields.wollman1996-07-241-2/+4
|
* Better selection of initial retransmit timeout when no cachedwollman1996-06-141-6/+4
| | | | | | | RTT information is available. Submitted by: kbracey@art.acorn.co.uk (Kevin Bracey) (slightly modified by me)
* Correct formula for TCP RTO calculation. Also try to do a better job inwollman1996-06-051-4/+2
| | | | | filling in a new PCB's rttvar (but this is not the last word on the subject). And get rid of `#ifdef RTV_RTT', it's been true for four years now...
* In tcp_respond(), check that ro->ro_rt is non-null before RTFREEingwollman1996-03-271-2/+2
| | | | it.
* Make sure tcp_respond() always calls ip_output() with a validwollman1996-03-221-1/+8
| | | | | route pointer. This has no effect in the current ip_output(), but my version requires that ip_output() always be passed a route.
* Move or add #include <queue.h> in preparation for upcoming struct socketdg1996-03-111-2/+2
| | | | changes.
* Fix a nagging divide-by-zero error resulting from the MTU discovery codewollman1995-12-201-2/+20
| | | | getting triggered at a bad time.
* Uniformized pr_ctlinput protosw functions. The third arg is now `voidbde1995-12-161-3/+4
| | | | | | | *' instead of caddr_t and it isn't optional (it never was). Most of the netipx (and netns) pr_ctlinput functions abuse the second arg instead of using the third arg but fixing this is beyond the scope of this round of changes.
* Path MTU Discovery is now standard.wollman1995-12-051-5/+5
|
* New style sysctl & staticize alot of stuff.phk1995-11-141-7/+11
|
* Start adding new style sysctl here too.phk1995-11-091-1/+11
|
* The ability to administratively change the MTU of an interface presentswollman1995-10-161-6/+2
| | | | | | | a few new wrinkles for MTU discovery which tcp_output() had better be prepared to handle. ip_output() is also modified to do something helpful in this case, since it has already calculated the information we need.
* The additional checks involving sequence numbers in MTU discovery resendswollman1995-10-121-7/+5
| | | | | | turned out not to be necessary; simply watching for MTU decreases (which we already did) automagically eliminates all the cases we were trying to protect against.
* More MTU discovery: avoid over-retransmission if route changes in thewollman1995-10-101-10/+9
| | | | | | | | middle of a fully-open window. Also, keep track of how many retransmits we do as a result of MTU discovery. This may actually do more work than necessary, but it's an unusual condition... Suggested by: Janey Hoe <janey@lcs.mit.edu>
* Finish 4.4-Lite-2 merge: randomize TCP initial sequence numberswollman1995-10-031-4/+4
| | | | to make ISS-guessing spoofing attacks harder.
* Correct spelling error in MTUDISC code.wollman1995-09-221-2/+2
|
* Add support in TCP for Path MTU discovery. This is highly experimentalwollman1995-09-201-3/+45
| | | | | | | and gated on `options MTUDISC' in the source. It is also practically untested becausse (sniff!) I don't have easy access to a network with an MTU of less than an Ethernet. If you have a small MTU network, please try it and tell me if it works!
* Initial back-end support for IP MTU discovery, gated on MTUDISC. The supportwollman1995-09-181-1/+29
| | | | for TCP has yet to be written.
* Keep track of the number of samples through the srtt filter so that wewollman1995-06-291-9/+8
| | | | | | know better when to cache values in the route, rather than relying on a heuristic involving sequence numbers that broke when tcp_sendspace was increased to 16k.
* Now that we've gone to all sorts of effort to allow TCP to cache some ofwollman1995-06-191-1/+4
| | | | | | | | its connection parameters, we want to keep statistics on how often this actually happens to see whether there is any work that needs to be done in TCP itself. Suggested by: John Wroclawski <jtw@lcs.mit.edu>
* Remove trailing whitespace.rgrimes1995-05-301-4/+4
|
* Implemented PCB hashing. Includes new functions in_pcbinshash, in_pcbrehash,dg1995-04-091-6/+12
| | | | and in_pcblookuphash.
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'bde1995-03-161-3/+2
| | | | | | (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.
* Removed unnecessary define for TCPOUTFLAGS since they are not used.nate1995-03-061-2/+1
|
* Transaction TCP support now standard. Hack away!wollman1995-02-161-9/+1
|
* Merge Transaction TCP, courtesy of Andras Olah <olah@cs.utwente.nl> andwollman1995-02-091-3/+86
| | | | | | | | | 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).
* Cosmetics: silences gcc -Wall.phk1994-10-081-3/+3
|
* GCC cleanup.phk1994-10-021-2/+2
| | | | | | Reviewed by: Submitted by: Obtained from:
* Added $Id$dg1994-08-021-0/+1
|
* The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.rgrimes1994-05-251-1/+1
| | | | | Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman
* BSD 4.4 Lite Kernel Sourcesrgrimes1994-05-241-0/+445
OpenPOWER on IntegriCloud