summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_socket2.c
Commit message (Collapse)AuthorAgeFilesLines
* Modify the kernel to use the new pr_usrreqs interface rather than the oldwollman1996-07-111-95/+27
| | | | | | | | | | | | | | 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.
* This is a proposal-in-code for a substantial modification of the waywollman1996-07-091-1/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the high kernel calls into a protocol stack to perform requests on the user's behalf. We replace the pr_usrreq() entry in struct protosw with a pointer to a structure containing pointers to functions which implement the various reuqests; each function is declared with the correct type and number of arguments. (This is unlike the current scheme in which a quarter of the requests take arguments of type other than (struct mbuf *) and the difference is papered over with casts.) There are a few benefits to this new scheme: 1) Arguments are passed with their correct types, and null-pointer dummies are no longer necessary. 2) There should be slightly better caching effects from eliminating the prximity to extraneous code and th switch in pr_usrreq(). 3) It becomes much easier to change the types of the arguments to something other than `struct mbuf *' (e.g.,pushing the work of sosend() into the protocol as advocated by Van Jacobson). There is one principal drawback: existing protocol stacks need to be modified. This is alleviated by compatibility code in uipc_socket2.c and uipc_domain.c which emulates the new interface in terms of the old and vice versa. This idea is not original to me. I read about what Jacobson did in one of his papers and have tried to implement the first steps towards something like that here. Much work remains to be done.
* Clean up -Wunused warnings.gpalmer1996-06-121-2/+1
| | | | Reviewed by: bde
* Changed socket code to use 4.4BSD queue macros. This includes removingdg1996-03-111-57/+22
| | | | | | | | | the obsolete soqinsque and soqremque functions as well as collapsing so_q0len and so_qlen into a single queue length of unaccepted connections. Now the queue of unaccepted & complete connections is checked directly for queued sockets. The new code should be functionally equivilent to the old while being substantially faster - especially in cases where large numbers of connections are often queued for accept (e.g. http).
* Eliminate the dramatic TCP performance decrease observed for writes inwollman1996-01-051-2/+6
| | | | | | | | | | | | | | | | | the range [210:260] by sweeping the problem under the rug. This change has the following effects: 1) A new MIB variable in the kern branch is defined to allow modification of the socket buffer layer's ``wastage factor'' (which determines how much unused-but-allocated space in mbufs and mbuf clusters is allowed in a socket buffer). 2) The default value of the wastage factor is changed from 2 to 8. The original value was chosen when MINCLSIZE was 7*MLEN (!), and is not appropriate for an environment where MINCLSIZE is much less. The real solution to this problem is to scrap both mbufs and sockbufs and completely redesign the buffering mechanism used at both levels.
* Nuked ambiguous sleep message strings:bde1995-12-141-8/+3
| | | | | | | old: new: netcls[] = "netcls" "soclos" netcon[] = "netcon" "accept", "connec" netio[] = "netio" "sblock", "sbwait"
* Make somaxconn (maximum backlog in a listen(2) request) and sb_maxwollman1995-11-031-2/+5
| | | | | | | | (maximum size of a socket buffer) tunable. Permit callers of listen(2) to specify a negative backlog, which is translated into somaxconn. Previously, a negative backlog was silently translated into 0.
* Remove trailing whitespace.rgrimes1995-05-301-5/+5
|
* All of this is cosmetic. prototypes, #includes, printfs and so on. Makesphk1994-10-021-18/+20
| | | | GCC a lot more silent.
* Added $Id$dg1994-08-021-0/+1
|
* The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.rgrimes1994-05-251-0/+32
| | | | | Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman
* BSD 4.4 Lite Kernel Sourcesrgrimes1994-05-241-0/+755
OpenPOWER on IntegriCloud