FreeBSD src
Go to file
Gleb Smirnoff 0f9d0a73a4 Merge from projects/sendfile:
o Introduce a notion of "not ready" mbufs in socket buffers.  These
mbufs are now being populated by some I/O in background and are
referenced outside.  This forces following implications:
- An mbuf which is "not ready" can't be taken out of the buffer.
- An mbuf that is behind a "not ready" in the queue neither.
- If sockbet buffer is flushed, then "not ready" mbufs shouln't be
  freed.

o In struct sockbuf the sb_cc field is split into sb_ccc and sb_acc.
  The sb_ccc stands for ""claimed character count", or "committed
  character count".  And the sb_acc is "available character count".
  Consumers of socket buffer API shouldn't already access them directly,
  but use sbused() and sbavail() respectively.
o Not ready mbufs are marked with M_NOTREADY, and ready but blocked ones
  with M_BLOCKED.
o New field sb_fnrdy points to the first not ready mbuf, to avoid linear
  search.
o New function sbready() is provided to activate certain amount of mbufs
  in a socket buffer.

A special note on SCTP:
  SCTP has its own sockbufs.  Unfortunately, FreeBSD stack doesn't yet
allow protocol specific sockbufs.  Thus, SCTP does some hacks to make
itself compatible with FreeBSD: it manages sockbufs on its own, but keeps
sb_cc updated to inform the stack of amount of data in them.  The new
notion of "not ready" data isn't supported by SCTP.  Instead, only a
mechanical substitute is done: s/sb_cc/sb_ccc/.
  A proper solution would be to take away struct sockbuf from struct
socket and allow protocols to implement their own socket buffers, like
SCTP already does.  This was discussed with rrs@.

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2014-11-30 12:52:33 +00:00
bin Convert bin/ to LIBADD, reduce overlinking allow to build all components as 2014-11-25 11:15:40 +00:00
cddl Adjust some checks missed in r274637, now that pi_rname can be NULL. 2014-11-25 07:01:38 +00:00
contrib Implement --no-fatal-warning for compatibility with newer ld 2014-11-29 11:50:19 +00:00
crypto Merge OpenSSL 1.0.1j. 2014-10-15 19:12:05 +00:00
etc Remove duplicate FILESYSTEMS REQUIRE from etc/rc.d/ipmon and etc/rc.d/pflog 2014-11-30 12:34:48 +00:00
games Update factor for changes to types in primes, which is a dependency. 2014-09-27 10:57:34 +00:00
gnu Put each SUBDIR on a separate line 2014-11-27 20:22:46 +00:00
include Make nfs server components conditional according to MK_NFS_SERVER 2014-11-30 02:31:37 +00:00
kerberos5 Remove now useless USEPRIVATELIB 2014-11-25 22:43:17 +00:00
lib MFhead @ r275302 2014-11-30 06:48:37 +00:00
libexec Convert to LIBADD 2014-11-25 21:18:18 +00:00
release Convert to LIBADD 2014-11-26 08:12:21 +00:00
rescue Add libxo, now needed by df(1). 2014-11-07 04:39:01 +00:00
sbin Remove the unnecessary glob 2014-11-30 09:04:24 +00:00
secure Reduce overlinking 2014-11-25 22:25:13 +00:00
share MFhead @ r275302 2014-11-30 06:48:37 +00:00
sys Merge from projects/sendfile: 2014-11-30 12:52:33 +00:00
tests Update libucl to latest version 2014-11-29 00:33:10 +00:00
tools Build spppcontrol if MK_PPP != no 2014-11-30 08:34:46 +00:00
usr.bin Merge from projects/sendfile: 2014-11-30 12:52:33 +00:00
usr.sbin Make nfs server components conditional according to MK_NFS_SERVER 2014-11-30 02:31:37 +00:00
.arcconfig Update the URL to the phabricator instance. 2014-08-14 16:25:43 +00:00
.arclint arc: add linting for python files 2014-06-02 00:21:42 +00:00
COPYRIGHT Bump copyright year. 2013-12-31 12:18:10 +00:00
LOCKS
MAINTAINERS Remove cokane@ from MAINTAINERS for 3dfx(4)/tdfx(4) because their email 2014-11-25 05:25:12 +00:00
Makefile Import OpenSSL 1.0.1j. 2014-10-15 17:32:57 +00:00
Makefile.inc1 Slightly alter the handling of LOCAL_LIB_DIRS to skip addition of 2014-11-21 18:35:48 +00:00
ObsoleteFiles.inc Followup to r275299: add an ObsoleteFiles.inc entry for etc/rc.d/mrouted 2014-11-30 06:46:30 +00:00
README Import OpenSSL 1.0.1j. 2014-10-15 17:32:57 +00:00
UPDATING Renove faith(4) and faithd(8) from base. It looks like industry 2014-11-09 21:33:01 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The ``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

cddl		Various commands and libraries under the Common Development
		and Distribution License.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html