freebsd with flexible iflib nic queues
Go to file
Luigi Rizzo 33d5497079 Cleanup and document the implementation of firmware(9) based on
a version that i posted earlier on the -current mailing list,
and subsequent feedback received.

The core of the change is just in sys/firmware.h and kern/subr_firmware.c,
while other files are just adaptation of the clients to the ABI change
(const-ification of some parameters and hiding of internal info,
so this is fully compatible at the binary level).

In detail:
- reduce the amount of information exported to clients in struct firmware,
  and constify the pointer;

- internally, document and simplify the implementation of the various
  functions, and make sure error conditions are dealt with properly.

The diffs are large, but the code is really straightforward now (i hope).

Note also that there is a subtle issue with the implementation of
firmware_register(): currently, as in the previous version, we just
store a reference to the 'imagename' argument, but we should rather
copy it because there is no guarantee that this is a static string.
I realised this while testing this code, but i prefer to fix it in
a later commit -- there is no regression with respect to the past.

Note, too, that the version in RELENG_6 has various bugs including
missing locks around the module release calls, mishandling of modules
loaded by /boot/loader, and so on, so an MFC is absolutely necessary
there.  I was just postponing it until this cleanup to avoid doing
things twice.

MFC after: 1 week
2007-02-15 17:21:31 +00:00
bin Use eaccess() instead of access() for the type builtin, like we do for the 2007-01-18 22:31:22 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r166332, 2007-01-29 18:31:57 +00:00
crypto Resolve conflicts. 2006-11-10 16:52:41 +00:00
etc fix comment about what pnpinfo is set 2007-02-15 16:38:10 +00:00
games Add Wise Words from Colin on irregular verbs and code quality. :-) 2007-01-11 15:19:53 +00:00
gnu Fix PowerPC-targeted cross-builds performed on 64-bit platforms. 2007-02-11 07:15:06 +00:00
include Makefile changes to reflect moving sys/isofs/cd9660 to sys/fs/cd9660. 2007-02-11 14:01:32 +00:00
kerberos5 Kerberos/Heimdal doesn't really depend on the INET6 macro. 2006-07-28 06:33:27 +00:00
lib Hook ypclnt.3 up to the build. 2007-02-15 02:43:14 +00:00
libexec Let automatic TCP send buffer sizing do its job for ftpd(8): stop 2007-02-09 17:18:39 +00:00
release New release notes: SA-07:02.bind (+MFC), auto-sizing TCP socket buffers, 2007-02-10 19:55:18 +00:00
rescue Replace the GNU gzip with a slightly modified NetBSD gzip. The 2007-01-26 10:19:08 +00:00
sbin Correct -c and -d description. 2007-02-15 14:46:04 +00:00
secure Fix static compilation. 2006-10-07 17:32:05 +00:00
share Expand history and authors section of mbuf.9 man page to discuss recent 2007-02-15 14:44:46 +00:00
sys Cleanup and document the implementation of firmware(9) based on 2007-02-15 17:21:31 +00:00
tools Add 's' after printing the send interval to make it clear it's a send 2007-02-08 15:37:13 +00:00
usr.bin Retire most of the classful network behaviour of netstat -r output, for IPv4. 2007-02-14 14:17:01 +00:00
usr.sbin Kill blank line at EOF. 2007-02-15 02:45:14 +00:00
COPYRIGHT Welcome to 2007 2006-12-31 16:35:29 +00:00
LOCKS
MAINTAINERS Request pre-commit review of BSD.{local,x11*}.dist by portmgr, since these 2006-11-11 22:24:10 +00:00
Makefile Add arm to universe. 2006-11-28 01:03:29 +00:00
Makefile.inc1 Switch to new ncurses build glue 2007-01-20 07:48:10 +00:00
ObsoleteFiles.inc Typo fix in a comment 2007-02-12 21:41:17 +00:00
README Simply running ``make world'' will bomb unless you dig up the 2006-06-07 03:33:48 +00:00
UPDATING Retire most of the classful network behaviour of netstat -r output, for IPv4. 2007-02-14 14:17: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.

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