diff options
author | grehan <grehan@FreeBSD.org> | 2011-11-22 02:27:59 +0000 |
---|---|---|
committer | grehan <grehan@FreeBSD.org> | 2011-11-22 02:27:59 +0000 |
commit | f68bada80b9371e881d04b43a8ab412fa54cd5fa (patch) | |
tree | 97b668c8ce00f69d94b0237dac765c76f460638b /share | |
parent | cdc4639328546d2b0ad5a90dd2d4e4534e874c26 (diff) | |
parent | 08ecf874bb3cc09a324985ab9315883462c59ae8 (diff) | |
download | FreeBSD-src-f68bada80b9371e881d04b43a8ab412fa54cd5fa.zip FreeBSD-src-f68bada80b9371e881d04b43a8ab412fa54cd5fa.tar.gz |
IFC @ r227804
Pull in the virtio drivers from head.
Diffstat (limited to 'share')
49 files changed, 1281 insertions, 308 deletions
diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index b38a01c..0d5a780 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -253,6 +253,7 @@ MAN= aac.4 \ net80211.4 \ netgraph.4 \ netintro.4 \ + netmap.4 \ ${_nfe.4} \ ${_nfsmb.4} \ ng_async.4 \ @@ -347,6 +348,7 @@ MAN= aac.4 \ pts.4 \ pty.4 \ puc.4 \ + ${_qlxgb.4} \ ral.4 \ random.4 \ rc.4 \ @@ -376,6 +378,7 @@ MAN= aac.4 \ send.4 \ ses.4 \ sf.4 \ + sfxge.4 \ sge.4 \ si.4 \ siba.4 \ @@ -713,6 +716,10 @@ _xen.4= xen.4 MLINKS+=lindev.4 full.4 .endif +.if ${MACHINE_CPUARCH} == "amd64" +_qlxgb.4= qlxgb.4 +.endif + .if ${MACHINE_CPUARCH} == "powerpc" _atp.4= atp.4 .endif diff --git a/share/man/man4/altq.4 b/share/man/man4/altq.4 index 7cfced4..90fe440 100644 --- a/share/man/man4/altq.4 +++ b/share/man/man4/altq.4 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 30, 2010 +.Dd November 8, 2011 .Dt ALTQ 4 .Os .Sh NAME @@ -150,6 +150,7 @@ They have been applied to the following hardware drivers: .Xr nge 4 , .Xr npe 4 , .Xr nve 4 , +.Xr qlxgb 4 , .Xr ral 4 , .Xr re 4 , .Xr rl 4 , @@ -160,6 +161,7 @@ They have been applied to the following hardware drivers: .Xr sk 4 , .Xr ste 4 , .Xr stge 4 , +.Xr ti 4 , .Xr txp 4 , .Xr udav 4 , .Xr ural 4 , diff --git a/share/man/man4/esp.4 b/share/man/man4/esp.4 index 897ee8e..6ebc85b 100644 --- a/share/man/man4/esp.4 +++ b/share/man/man4/esp.4 @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2004 Tom Rhodes +.\" Copyright (c) 2011 Marius Strobl <marius@FreeBSD.org> .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,158 +25,91 @@ .\" .\" $FreeBSD$ .\" -.Dd September 18, 2005 +.Dd November 1, 2011 .Dt ESP 4 .Os .Sh NAME .Nm esp -.Nd Qlogic FEPS and FAS366 SCSI driver +.Nd Emulex ESP, NCR 53C9x and QLogic FAS families based SCSI controllers .Sh SYNOPSIS -To compile this driver into the kernel, -place the following lines in your +To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device scbus" .Cd "device esp" .Ed -.Sh HARDWARE +.Pp +Alternatively, to load the driver as a module at boot time, place the +following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_esp_load="YES" +.Ed +.Sh DESCRIPTION The .Nm driver provides support for the -.Tn Qlogic -FAS216 and FAS408 +.Tn AMD +Am53C974, the +.Tn Emulex +ESP100, ESP100A, ESP200 and ESP406, the +.Tn NCR +53C90, 53C94 and 53C96 as well as the +.Tn QLogic +FAS100A, FAS216, FAS366 and FAS408 .Tn SCSI controller chips found in a wide variety of systems and peripheral boards. -This includes the -.Tn Qlogic -.Tn SCSI -cards found in most -.Tn Sun -.Tn Ultra 1e -and -.Tn Ultra 2 -machines. -.Pp -For -.Tn Qlogic -.Tn PCI -.Tn SCSI -host adapters, the -.Xr isp 4 -driver should be used in place of the -.Nm -driver. -.Sh IMPLEMENTATION NOTES -During the boot sequence, the +.Sh HARDWARE +Controllers supported by the .Nm -driver -searches the linked list for LUN info by LUN ID. -At this point the driver will attach on that instance, -and then attempt to attach every sub-device. -.Pp -There are at least 4 variations of the -configuration 3 register. -A second config register must be loaded to inquire the chip revision, -otherwise the -.Fn ncr53c9x_reset -function will not set the defaults correctly. -.Pp -The drive attach routine attempts to set the appropriate -bit to put the chip into Fast -.Tn SCSI -mode so that it does not -have to be figured out each time. -This will then be stored in the -.Tn NCR -registers for later use. +driver include: .Pp -The -.Nm -driver makes use of the -.Tn LSI -64854 -.Tn DMA -engine which contains three independent -channels designed to interface with -an NCR539X -.Tn SCSI -controller; -an AM7990 Ethernet controller; -and certain types of parallel port hardware. -As such this driver may eventually replace the -.Xr amd 4 -driver for network hardware. -.Sh DIAGNOSTICS -The following driver specific error messages -may be reported: -.Bl -diag -.It "esp: cannot map %d segments" -The device was unable to map segments while mapping the -.Tn SCSI -devices in -.Tn DMA -mode. -.It "unknown variant %d, devices not attached" -An unknown version of the card was found and devices will -not be attached. -.It "Unhandled function code %d" -The device returned a function code which the driver is -unable to handle, most likely during negotiation. -.It "esp:%d:%d: selection failed %d left in FIFO" -The target left the command phase prematurely. -If a command did not reach the device then it will -be reported as shown above. -.It "invalid state: %d" -The device has reached an invalid state. -.El -.Sh SEE ALSO -.Xr amd 4 , -.Xr isp 4 , -.Xr scbus 4 , -.Xr camcontrol 8 -.Pp -.Bl -item -compact +.Bl -bullet -compact +.It +MELCO IFC-DP (PC-98) +.It +Sun ESP family +.It +Sun FAS family .It -.Pa http://www.qlc.com/ +Tekram DC390 .It -.Pa http://www.sun.com/ +Tekram DC390T .El +.Sh SEE ALSO +.Xr cd 4 , +.Xr ch 4 , +.Xr da 4 , +.Xr intro 4 , +.Xr pci 4 , +.Xr sa 4 , +.Xr sbus 4 , +.Xr scsi 4 , +.Xr camcontrol 8 .Sh HISTORY The .Nm -driver was written for -.Nx -by -.An Eric S. Hvozda . +driver first appeared in +.Nx 1.3 . +The first +.Fx +version to include it was +.Fx 5.3 . +.Sh AUTHORS +.An -nosplit The .Nm -driver was then ported to -.Fx 5.3 +driver was ported to +.Fx by -.An Scott Long Aq scottl@FreeBSD.org . -.Sh AUTHORS -This manual page was written by -.An Tom Rhodes Aq trhodes@FreeBSD.org -instead of porting the original from -.Nx . +.An Scott Long +.Aq scottl@FreeBSD.org +and later on considerably improved by +.An Marius Strobl +.Aq marius@FreeBSD.org . .Sh BUGS The .Nm -driver includes the sbus front-end but lacks the -.Tn PCI -front-end. -Thus it can only support the -.Tn FEPS/FAS366 -.Tn SCSI -found in -.Tn Sun -.Tn Ultra 1e -and -.Tn Ultra 2 -machines at this time. -.Pp -This driver should eventually replace the -.Xr amd 4 -driver, but that requires porting the -.Tn PCI -front-end mentioned above. +driver should read the EEPROM settings of +.Tn Tekram +controllers. diff --git a/share/man/man4/ip.4 b/share/man/man4/ip.4 index ea9172b..4e7d8b0 100644 --- a/share/man/man4/ip.4 +++ b/share/man/man4/ip.4 @@ -32,7 +32,7 @@ .\" @(#)ip.4 8.2 (Berkeley) 11/30/93 .\" $FreeBSD$ .\" -.Dd June 1, 2009 +.Dd November 14, 2011 .Dt IP 4 .Os .Sh NAME @@ -847,3 +847,10 @@ The .Vt ip_mreqn structure appeared in .Tn Linux 2.4 . +.Sh BUGS +Before +.Fx 10.0 +packets received on raw IP sockets had the +.Va ip_hl +subtracted from the +.Va ip_len field. diff --git a/share/man/man4/mps.4 b/share/man/man4/mps.4 index e22bf15..2899747 100644 --- a/share/man/man4/mps.4 +++ b/share/man/man4/mps.4 @@ -60,9 +60,9 @@ driver provides support for LSI Logic Fusion-MPT 2 .Tn SAS controllers. .Sh HARDWARE -The following controllers are supported by the +The .Nm -driver +driver supports the following controllers: .Pp .Bl -bullet -compact .It diff --git a/share/man/man4/mtio.4 b/share/man/man4/mtio.4 index 0b60b1e..f3dd602 100644 --- a/share/man/man4/mtio.4 +++ b/share/man/man4/mtio.4 @@ -35,7 +35,7 @@ .\" @(#)mtio.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd February 11, 1996 +.Dd November 11, 2011 .Dt MTIO 4 .Os .Sh NAME @@ -97,7 +97,7 @@ The following definitions are from /* structure for MTIOCTOP - mag tape op command */ struct mtop { short mt_op; /* operations defined below */ - daddr_t mt_count; /* how many of them */ + int32_t mt_count; /* how many of them */ }; /* operations */ @@ -165,19 +165,25 @@ struct mtget { short mt_dsreg; /* ``drive status'' register */ short mt_erreg; /* ``error'' register */ /* end device-dependent registers */ + /* + * Note that the residual count, while maintained, may be + * be nonsense because the size of the residual may (greatly) + * exceed 32 K-bytes. Use the MTIOCERRSTAT ioctl to get a + * more accurate count. + */ short mt_resid; /* residual count */ #if defined (__FreeBSD__) - daddr_t mt_blksiz; /* presently operating blocksize */ - daddr_t mt_density; /* presently operating density */ + int32_t mt_blksiz; /* presently operating blocksize */ + int32_t mt_density; /* presently operating density */ u_int32_t mt_comp; /* presently operating compression */ - daddr_t mt_blksiz0; /* blocksize for mode 0 */ - daddr_t mt_blksiz1; /* blocksize for mode 1 */ - daddr_t mt_blksiz2; /* blocksize for mode 2 */ - daddr_t mt_blksiz3; /* blocksize for mode 3 */ - daddr_t mt_density0; /* density for mode 0 */ - daddr_t mt_density1; /* density for mode 1 */ - daddr_t mt_density2; /* density for mode 2 */ - daddr_t mt_density3; /* density for mode 3 */ + int32_t mt_blksiz0; /* blocksize for mode 0 */ + int32_t mt_blksiz1; /* blocksize for mode 1 */ + int32_t mt_blksiz2; /* blocksize for mode 2 */ + int32_t mt_blksiz3; /* blocksize for mode 3 */ + int32_t mt_density0; /* density for mode 0 */ + int32_t mt_density1; /* density for mode 1 */ + int32_t mt_density2; /* density for mode 2 */ + int32_t mt_density3; /* density for mode 3 */ /* the following are not yet implemented */ u_int32_t mt_comp0; /* compression type for mode 0 */ u_int32_t mt_comp1; /* compression type for mode 1 */ @@ -185,8 +191,8 @@ struct mtget { u_int32_t mt_comp3; /* compression type for mode 3 */ /* end not yet implemented */ #endif - daddr_t mt_fileno; /* relative file number of current position */ - daddr_t mt_blkno; /* relative block number of current position */ + int32_t mt_fileno; /* relative file number of current position */ + int32_t mt_blkno; /* relative block number of current position */ }; /* structure for MTIOCERRSTAT - tape get error status command */ @@ -198,10 +204,10 @@ struct scsi_tape_errors { * of issuing an MTIOCERRSTAT unlatches and clears them. */ u_int8_t io_sense[32]; /* Last Sense Data For Data I/O */ - u_int32_t io_resid; /* residual count from last Data I/O */ + int32_t io_resid; /* residual count from last Data I/O */ u_int8_t io_cdb[16]; /* Command that Caused the Last Data Sense */ u_int8_t ctl_sense[32]; /* Last Sense Data For Control I/O */ - u_int32_t ctl_resid; /* residual count from last Control I/O */ + int32_t ctl_resid; /* residual count from last Control I/O */ u_int8_t ctl_cdb[16]; /* Command that Caused the Last Control Sense */ /* * These are the read and write cumulative error counters. @@ -276,20 +282,6 @@ union mterrstat { #define DEFTAPE "/dev/nsa0" #endif -#ifdef _KERNEL -/* - * minor device number - */ - -#define T_UNIT 003 /* unit selection */ -#define T_NOREWIND 004 /* no rewind on close */ -#define T_DENSEL 030 /* density select */ -#define T_800BPI 000 /* select 800 bpi */ -#define T_1600BPI 010 /* select 1600 bpi */ -#define T_6250BPI 020 /* select 6250 bpi */ -#define T_BADBPI 030 /* undefined selection */ -#endif - #endif /* !_SYS_MTIO_H_ */ .Ed .Sh FILES diff --git a/share/man/man4/mvs.4 b/share/man/man4/mvs.4 index 23eed9d..a7bbe80 100644 --- a/share/man/man4/mvs.4 +++ b/share/man/man4/mvs.4 @@ -109,7 +109,8 @@ hardware command queues (up to 31 command per port), Native Command Queuing, SATA interface Power Management, device hot-plug and Message Signaled Interrupts. .Pp -Same hardware is also supported by atamarvell and ataadaptec drivers from +The same hardware is also supported by the atamarvell and ataadaptec +drivers from the .Xr ata 4 subsystem. If both drivers are loaded at the same time, this one will be @@ -118,9 +119,9 @@ given precedence as the more functional of the two. The .Nm driver supports the following controllers: -.Bl -tag -compact -.It Gen-I (SATA 1.5Gbps): -.Bl -bullet -compact +.Pp +Gen-I (SATA 1.5Gbps): +.Bl -bullet -compact -offset "xxxxxx" .It 88SX5040 .It @@ -130,8 +131,9 @@ driver supports the following controllers: .It 88SX5081 .El -.It Gen-II (SATA 3Gbps, NCQ, PMP): -.Bl -bullet -compact +.Pp +Gen-II (SATA 3Gbps, NCQ, PMP): +.Bl -bullet -compact -offset "xxxxxx" .It 88SX6040 .It @@ -141,8 +143,9 @@ driver supports the following controllers: .It 88SX6081 .El -.It Gen-IIe (SATA 3Gbps, NCQ, PMP with FBS): -.Bl -bullet -compact +.Pp +Gen-IIe (SATA 3Gbps, NCQ, PMP with FBS): +.Bl -bullet -compact -offset "xxxxxx" .It 88SX6042 .It @@ -154,11 +157,10 @@ driver supports the following controllers: .It MV78100 SoC .El -.El -Note, that this hardware supports command queueing and FIS-based switching -only for ATA DMA commands. ATAPI and non-DMA ATA commands executed one by one -for each port. .Pp +Note, that this hardware supports command queueing and FIS-based switching +only for ATA DMA commands. +ATAPI and non-DMA ATA commands executed one by one for each port. .Sh SEE ALSO .Xr ada 4 , .Xr ata 4 , @@ -172,4 +174,4 @@ The driver first appeared in .Fx 8.1 . .Sh AUTHORS -.An Alexander Motin Aq mav@FreeBSD.org . +.An Alexander Motin Aq mav@FreeBSD.org diff --git a/share/man/man4/netmap.4 b/share/man/man4/netmap.4 new file mode 100644 index 0000000..8b646f9 --- /dev/null +++ b/share/man/man4/netmap.4 @@ -0,0 +1,300 @@ +.\" Copyright (c) 2011 Matteo Landi, Luigi Rizzo, Universita` di Pisa +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" This document is derived in part from the enet man page (enet.4) +.\" distributed with 4.3BSD Unix. +.\" +.\" $FreeBSD$ +.\" $Id: netmap.4 9662 2011-11-16 13:18:06Z luigi $: stable/8/share/man/man4/bpf.4 181694 2008-08-13 17:45:06Z ed $ +.\" +.Dd November 16, 2011 +.Dt NETMAP 4 +.Os +.Sh NAME +.Nm netmap +.Nd a framework for fast packet I/O +.Sh SYNOPSIS +.Cd device netmap +.Sh DESCRIPTION +.Nm +is a framework for fast and safe access to network devices +(reaching 14.88 Mpps at less than 1 GHz). +.Nm +uses memory mapped buffers and metadata +(buffer indexes and lengths) to communicate with the kernel, +which is in charge of validating information through +.Pa ioctl() +and +.Pa select()/poll(). +.Nm +can exploit the parallelism in multiqueue devices and +multicore systems. +.Pp +.Pp +.Nm +requires explicit support in device drivers. +For a list of supported devices, see the end of this manual page. +.Sh OPERATION +.Nm +clients must first open the +.Pa open("/dev/netmap") , +and then issue an +.Pa ioctl(...,NIOCREGIF,...) +to bind the file descriptor to a network device. +.Pp +When a device is put in +.Nm +mode, its data path is disconnected from the host stack. +The processes owning the file descriptor +can exchange packets with the device, or with the host stack, +through an mmapped memory region that contains pre-allocated +buffers and metadata. +.Pp +Non blocking I/O is done with special +.Pa ioctl()'s , +whereas the file descriptor can be passed to +.Pa select()/poll() +to be notified about incoming packet or available transmit buffers. +.Ss Data structures +All data structures for all devices in +.Nm +mode are in a memory +region shared by the kernel and all processes +who open +.Pa /dev/netmap +(NOTE: visibility may be restricted in future implementations). +All references between the shared data structure +are relative (offsets or indexes). Some macros help converting +them into actual pointers. +.Pp +The data structures in shared memory are the following: +.Pp +.Bl -tag -width XXX +.It Dv struct netmap_if (one per interface) +indicates the number of rings supported by an interface, their +sizes, and the offsets of the +.Pa netmap_rings +associated to the interface. +The offset of a +.Pa struct netmap_if +in the shared memory region is indicated by the +.Pa nr_offset +field in the structure returned by the +.Pa NIOCREGIF +(see below). +.Bd -literal +struct netmap_if { + char ni_name[IFNAMSIZ]; /* name of the interface. */ + const u_int ni_num_queues; /* number of hw ring pairs */ + const ssize_t ring_ofs[]; /* offset of tx and rx rings */ +}; +.Ed +.It Dv struct netmap_ring (one per ring) +contains the index of the current read or write slot (cur), +the number of slots available for reception or transmission (avail), +and an array of +.Pa slots +describing the buffers. +There is one ring pair for each of the N hardware ring pairs +supported by the card (numbered 0..N-1), plus +one ring pair (numbered N) for packets from/to the host stack. +.Bd -literal +struct netmap_ring { + const ssize_t buf_ofs; + const uint32_t num_slots; /* number of slots in the ring. */ + uint32_t avail; /* number of usable slots */ + uint32_t cur; /* 'current' index for the user side */ + + const uint16_t nr_buf_size; + uint16_t flags; + struct netmap_slot slot[0]; /* array of slots. */ +} +.Ed +.It Dv struct netmap_slot (one per packet) +contains the metadata for a packet: a buffer index (buf_idx), +a buffer length (len), and some flags. +.Bd -literal +struct netmap_slot { + uint32_t buf_idx; /* buffer index */ + uint16_t len; /* packet length */ + uint16_t flags; /* buf changed, etc. */ +#define NS_BUF_CHANGED 0x0001 /* must resync, buffer changed */ +#define NS_REPORT 0x0002 /* tell hw to report results + * e.g. by generating an interrupt + */ +}; +.Ed +.It Dv packet buffers +are fixed size (approximately 2k) buffers allocated by the kernel +that contain packet data. Buffers addresses are computed through +macros. +.El +.Pp +Some macros support the access to objects in the shared memory +region. In particular: +.Bd -literal +struct netmap_if *nifp; +... +struct netmap_ring *txring = NETMAP_TXRING(nifp, i); +struct netmap_ring *rxring = NETMAP_RXRING(nifp, i); +int i = txring->slot[txring->cur].buf_idx; +char *buf = NETMAP_BUF(txring, i); +.Ed +.Ss IOCTLS +.Pp +.Nm +supports some ioctl() to synchronize the state of the rings +between the kernel and the user processes, plus some +to query and configure the interface. +The former do not require any argument, whereas the latter +use a +.Pa struct netmap_req +defined as follows: +.Bd -literal +struct nmreq { + char nr_name[IFNAMSIZ]; + uint32_t nr_offset; /* nifp offset in the shared region */ + uint32_t nr_memsize; /* size of the shared region */ + uint32_t nr_numdescs; /* descriptors per queue */ + uint16_t nr_numqueues; + uint16_t nr_ringid; /* ring(s) we care about */ +#define NETMAP_HW_RING 0x4000 /* low bits indicate one hw ring */ +#define NETMAP_SW_RING 0x2000 /* we process the sw ring */ +#define NETMAP_NO_TX_POLL 0x1000 /* no gratuitous txsync on poll */ +#define NETMAP_RING_MASK 0xfff /* the actual ring number */ +}; + +.Ed +A device descriptor obtained through +.Pa /dev/netmap +also supports the ioctl supported by network devices. +.Pp +The netmap-specific +.Xr ioctl 2 +command codes below are defined in +.In net/netmap.h +and are: +.Bl -tag -width XXXX +.It Dv NIOCGINFO +returns information about the interface named in nr_name. +On return, nr_memsize indicates the size of the shared netmap +memory region (this is device-independent), +nr_numslots indicates how many buffers are in a ring, +nr_numrings indicates the number of rings supported by the hardware. +.Pp +If the device does not support netmap, the ioctl returns EINVAL. +.It Dv NIOCREGIF +puts the interface named in nr_name into netmap mode, disconnecting +it from the host stack, and/or defines which rings are controlled +through this file descriptor. +On return, it gives the same info as NIOCGINFO, and nr_ringid +indicates the identity of the rings controlled through the file +descriptor. +.Pp +Possible values for nr_ringid are +.Bl -tag -width XXXXX +.It 0 +default, all hardware rings +.It NETMAP_SW_RING +the ``host rings'' connecting to the host stack +.It NETMAP_HW_RING + i +the i-th hardware ring +.El +By default, a +.Nm poll +or +.Nm select +call pushes out any pending packets on the transmit ring, even if +no write events are specified. +The feature can be disabled by or-ing +.Nm NETMAP_NO_TX_SYNC +to nr_ringid. +But normally you should keep this feature unless you are using +separate file descriptors for the send and receive rings, because +otherwise packets are pushed out only if NETMAP_TXSYNC is called, +or the send queue is full. +.Pp +.Pa NIOCREGIF +can be used multiple times to change the association of a +file descriptor to a ring pair, always within the same device. +.It Dv NIOCUNREGIF +brings an interface back to normal mode. +.It Dv NIOCTXSYNC +tells the hardware of new packets to transmit, and updates the +number of slots available for transmission. +.It Dv NIOCRXSYNC +tells the hardware of consumed packets, and asks for newly available +packets. +.El +.Ss SYSTEM CALLS +.Nm +uses +.Nm select +and +.Nm poll +to wake up processes when significant events occur. +.Sh EXAMPLES +The following code implements a traffic generator +.Pp +.Bd -literal -compact +#include <net/netmap.h> +#include <net/netmap_user.h> +struct netmap_if *nifp; +struct netmap_ring *ring; +struct netmap_request nmr; + +fd = open("/dev/netmap", O_RDWR); +bzero(&nmr, sizeof(nmr)); +strcpy(nmr.nm_name, "ix0"); +ioctl(fd, NIOCREG, &nmr); +p = mmap(0, nmr.memsize, fd); +nifp = NETMAP_IF(p, nmr.offset); +ring = NETMAP_TXRING(nifp, 0); +fds.fd = fd; +fds.events = POLLOUT; +for (;;) { + poll(list, 1, -1); + while (ring->avail-- > 0) { + i = ring->cur; + buf = NETMAP_BUF(ring, ring->slot[i].buf_index); + ... prepare packet in buf ... + ring->slot[i].len = ... packet length ... + ring->cur = NETMAP_RING_NEXT(ring, i); + } +} +.Ed +.Sh SUPPORTED INTERFACES +.Nm +supports the following interfaces: +.Xr em 4 , +.Xr ixgbe 4 , +.Xr re 4 , +.Sh AUTHORS +The +.Nm +framework has been designed and implemented by +.An Luigi Rizzo +and +.An Matteo Landi +in 2011 at the Universita` di Pisa. diff --git a/share/man/man4/qlxgb.4 b/share/man/man4/qlxgb.4 new file mode 100644 index 0000000..c76386f --- /dev/null +++ b/share/man/man4/qlxgb.4 @@ -0,0 +1,93 @@ +.\"- +.\" Copyright (c) 2011 "Bjoern A. Zeeb" <bz@FreeBSD.org> +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd November 3, 2011 +.Dt QLXGB 4 +.Os +.Sh NAME +.Nm qlxgb +.Nd "QLogic 10 Gigabit Ethernet & CNA Adapter Driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device qlxgb" +.Ed +.Pp +To load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_qlxgb_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver supports IPv4 checksum offload, +TCP and UDP checksum offload for both IPv4 and IPv6, +Large Segment Offload for both IPv4 and IPv6, +Jumbo frames, VLAN Tag, and +Receive Side scaling. +For further hardware information, see +.Pa http://www.qlogic.com/ . +.Sh HARDWARE +The +.Nm +driver supports 10 Gigabit Ethernet & CNA Adapter based on the following +chipsets: +.Pp +.Bl -bullet -compact +.It +QLogic 3200 series +.It +QLogic 8200 series +.El +.Sh SUPPORT +For support questions please contact your QLogic approved reseller or +QLogic Technical Support at +.Pa http://support.qlogic.com , +or by E-mail at +.Aq support@qlogic.com . +.Sh SEE ALSO +.Xr altq 4 , +.Xr arp 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 10.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An David C Somayajulu +at QLogic Corporation. diff --git a/share/man/man4/sfxge.4 b/share/man/man4/sfxge.4 new file mode 100644 index 0000000..33063d9 --- /dev/null +++ b/share/man/man4/sfxge.4 @@ -0,0 +1,96 @@ +.\" Copyright (c) 2011 Solarflare Communications, Inc. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd November 16, 2011 +.Dt SFXGE 4 +.Os +.Sh NAME +.Nm sfxge +.Nd "Solarflare 10Gb Ethernet adapter driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device sfxge" +.Ed +.Pp +To load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +sfxge_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for 10Gb Ethernet adapters based on +Solarflare SFC9000 family controllers. +The driver supports jumbo +frames, transmit/receive checksum offload, TCP Segmentation Offload +(TSO), Large Receive Offload (LRO), VLAN checksum offload, VLAN TSO, +and Receive Side Scaling (RSS) using MSI-X interrupts. +.Pp +The driver allocates 1 receive queue, transmit queue, event queue and +IRQ per CPU up to a maximum of 64. +IRQ affinities should be spread out using +.Xr cpuset 8 . +Interrupt moderation may be controlled through the sysctl +.Va dev.sfxge.%d.int_mod +(units are microseconds). +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Pp +A large number of MAC, PHY and data path statistics are available +under the sysctl +.Va dev.sfxge.%d.stats . +The adapter's VPD +fields including its serial number are available under the sysctl +.Va dev.sfxge.%d.vpd . +.Sh HARDWARE +The +.Nm +driver supports all 10Gb Ethernet adapters based on Solarflare SFC9000 +family controllers. +.Sh SUPPORT +For general information and support, +go to the Solarflare support website at: +.Pa https://support.solarflare.com . +.Sh SEE ALSO +.Xr arp 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr vlan 4 , +.Xr cpuset 8 , +.Xr ifconfig 8 +.Sh AUTHORS +The +.Nm +driver was written by +.An Philip Paeps +and +.An Solarflare Communications, Inc. diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4 index 213e94a..e2d4ad3 100644 --- a/share/man/man4/tcp.4 +++ b/share/man/man4/tcp.4 @@ -38,7 +38,7 @@ .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd September 15, 2011 +.Dd November 14, 2011 .Dt TCP 4 .Os .Sh NAME @@ -290,14 +290,6 @@ That of 2 results in any packets to closed ports being logged. Any value unlisted above disables the logging (default is 0, i.e., the logging is disabled). -.It Va slowstart_flightsize -The number of packets allowed to be in-flight during the -.Tn TCP -slow-start phase on a non-local network. -.It Va local_slowstart_flightsize -The number of packets allowed to be in-flight during the -.Tn TCP -slow-start phase to local machines in the same subnet. .It Va msl The Maximum Segment Lifetime, in milliseconds, for a packet. .It Va keepinit @@ -411,15 +403,6 @@ maximum segment size. This helps throughput in general, but particularly affects short transfers and high-bandwidth large propagation-delay connections. -.Pp -When this feature is enabled, the -.Va slowstart_flightsize -and -.Va local_slowstart_flightsize -settings are not observed for new -connection slow starts, but they are still used for slow starts -that occur when the connection has been idle and starts sending -again. .It Va sack.enable Enable support for RFC 2018, TCP Selective Acknowledgment option, which allows the receiver to inform the sender about all successfully diff --git a/share/man/man4/ti.4 b/share/man/man4/ti.4 index 269b6cf..2ef606c 100644 --- a/share/man/man4/ti.4 +++ b/share/man/man4/ti.4 @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 16, 2005 +.Dd November 14, 2011 .Dt TI 4 .Os .Sh NAME @@ -42,7 +42,7 @@ place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device ti" -.Cd "options TI_PRIVATE_JUMBOS" +.Cd "options TI_SF_BUF_JUMBO" .Cd "options TI_JUMBO_HDRSPLIT" .Ed .Pp @@ -97,13 +97,14 @@ for more discussion on zero copy receive and header splitting. .Pp The .Nm -driver normally uses jumbo receive buffers allocated by the +driver uses UMA backed jumbo receive buffers, but can be configured +to use .Xr sendfile 2 -buffer allocator, but can be configured to use its own private pool of -jumbo buffers that are contiguous instead of buffers from the jumbo -allocator, which are made up of multiple page sized chunks. -To turn on private jumbos, use the -.Dv TI_PRIVATE_JUMBOS +buffer allocator. +To turn on +.Xr sendfile 2 +buffer allocator, use the +.Dv TI_SF_BUF_JUMBO option. .Pp Support for vlans is also available using the @@ -201,6 +202,93 @@ NEC Gigabit Ethernet .It Silicon Graphics PCI Gigabit Ethernet adapter .El +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +.Bl -tag -width "xxxxxx" +.It Va hw.ti.%d.dac +If this tunable is set to 0 it will disable DAC (Dual Address Cycle). +The default value is 1 which means driver will use full 64bit +DMA addressing. +.El +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables. +The interface has to be brought down and up again before a +change takes effect when any of the following tunables are +changed. +The one microsecond clock tick referenced below is a nominal +time and the actual hardware may not provide granularity to +this level. +For example, on Tigon 2 (revision 6) cards with release 12.0 +the clock granularity is 5 microseconds. +.Bl -tag -width "xxxxxx" +.It Va dev.ti.%d.rx_coal_ticks +This value, receive coalesced ticks, controls the number of clock +ticks (of 1 microseconds each) that must elapse before the NIC DMAs +the receive return producer pointer to the Host and generates an +interrupt. +This parameter works in conjunction with the rx_max_coal_bds, +receive max coalesced BDs, tunable parameter. +The NIC will return the receive return producer pointer to the Host +when either of the thresholds is exceeded. +A value of 0 means that this parameter is ignored and receive BDs +will only be returned when the receive max coalesced BDs value is +reached. +The default valus is 170. +.It Va dev.ti.%d.rx_max_coal_bds +This value, receive max coalesced BDs, controls the number of +receive buffer descriptors that will be coalesced before the NIC +updates the receive return ring producer index. +If this value is set to 0 it will disable receive buffer descriptor +coalescing. +The default valus is 64. +.It Va dev.ti.%d.ti_tx_coal_ticks +This value, send coalesced ticks, controls the number of clock +ticks (of 1 microseconds each) that must elapse before the NIC DMAs +the send consumer pointer to the Host and generates an interrupt. +This parameter works in conjunction with the tx_max_coal_bds, +send max coalesced BDs, tunable parameter. +The NIC will return the send consumer pointer to the Host when +either of the thresholds is exceeded. +A value of 0 means that this parameter is ignored and send BDs will +only be returned when the send max coalesced BDs value is reached. +The default value is 2000. +.It Va dev.ti.%d.tx_max_coal_bds +This value, send max coalesced BDs, controls the number of send +buffer descriptors that will be coalesced before the NIC updates +the send consumer index. +If this valus is set to 0 it will disable send buffer descriptor +coalescing. +The default valus is 32. +.It Va dev.ti.%d.tx_buf_ratio +This value controls the ratio of the remaining memory in the NIC +that should be devoted to transmit buffer vs. receive buffer. +The lower 7 bits are used to indicate the ratio in 1/64th increments. +For example, setting this value to 16 will set the transmit buffer +to 1/4 of the remaining buffer space. +In no cases will the transmit or receive buffer be reduced below +68 KB. +For a 1 MB NIC the approximate total space for data buffers is +800 KB. +For a 512 KB NIC that number is 300 KB. +The default value is 21. +.It Va dev.ti.%d.stat_ticks +The value, stat ticks, controls the number of clock ticks +(of 1 microseconds each) that must elapse before the NIC DMAs +the statistics block to the Host and generates a STATS_UPDATED +event. +If set to zero then statistics are never DMAed to the Host. +It is recommended that this value be set to a high enough +frequency to not mislead someone reading statistics refreshes. +Several times a second is enough. +The default value is 2000000 (2 seconds). +.El .Sh IOCTLS In addition to the standard .Xr socket 2 @@ -311,6 +399,7 @@ the network connection (cable). .El .Sh SEE ALSO .Xr sendfile 2 , +.Xr altq 4 , .Xr arp 4 , .Xr netintro 4 , .Xr ng_ether 4 , diff --git a/share/man/man4/u3g.4 b/share/man/man4/u3g.4 index 215270c..87e3824 100644 --- a/share/man/man4/u3g.4 +++ b/share/man/man4/u3g.4 @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 7, 2008 +.Dd November 20, 2011 .Dt U3G 4 .Os .Sh NAME @@ -29,6 +29,8 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device usb" +.Cd "device ucom" .Cd "device u3g" .Ed .Pp diff --git a/share/man/man4/uark.4 b/share/man/man4/uark.4 index 7001a7f..945983c 100644 --- a/share/man/man4/uark.4 +++ b/share/man/man4/uark.4 @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 15, 2006 +.Dd November 20, 2011 .Dt UARK 4 .Os .Sh NAME @@ -27,6 +27,8 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device usb" +.Cd "device ucom" .Cd "device uark" .Ed .Pp diff --git a/share/man/man4/ubsa.4 b/share/man/man4/ubsa.4 index 4eb45f6..df9002c 100644 --- a/share/man/man4/ubsa.4 +++ b/share/man/man4/ubsa.4 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 28, 2008 +.Dd November 20, 2011 .Dt UBSA 4 .Os .Sh NAME @@ -39,6 +39,8 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device usb" +.Cd "device ucom" .Cd "device ubsa" .Ed .Pp diff --git a/share/man/man4/ubser.4 b/share/man/man4/ubser.4 index 6e6fee30..556d4ec 100644 --- a/share/man/man4/ubser.4 +++ b/share/man/man4/ubser.4 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2006 +.Dd November 20, 2011 .Dt UBSER 4 .Os .Sh NAME @@ -39,6 +39,8 @@ To compile this driver into the kernel, place the following line in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device usb" +.Cd "device ucom" .Cd "device ubser" .Ed .Pp diff --git a/share/man/man4/uchcom.4 b/share/man/man4/uchcom.4 index 4452b53..d7c0abc 100644 --- a/share/man/man4/uchcom.4 +++ b/share/man/man4/uchcom.4 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 18, 2009 +.Dd November 20, 2011 .Dt UCHCOM 4 .Os .Sh NAME @@ -40,6 +40,8 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device usb" +.Cd "device ucom" .Cd "device uchcom" .Ed .Pp diff --git a/share/man/man4/ucycom.4 b/share/man/man4/ucycom.4 index 6d76564..063d419 100644 --- a/share/man/man4/ucycom.4 +++ b/share/man/man4/ucycom.4 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2006 +.Dd November 20, 2011 .Dt UCYCOM 4 .Os .Sh NAME @@ -38,6 +38,8 @@ To compile this driver into the kernel, place the following line in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device usb" +.Cd "device ucom" .Cd "device ucycom" .Ed .Pp diff --git a/share/man/man4/ufoma.4 b/share/man/man4/ufoma.4 index 1cbde0f..77d192f 100644 --- a/share/man/man4/ufoma.4 +++ b/share/man/man4/ufoma.4 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2006 +.Dd November 20, 2011 .Dt UFOMA 4 .Os .Sh NAME @@ -38,6 +38,8 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device usb" +.Cd "device ucom" .Cd "device ufoma" .Ed .Pp diff --git a/share/man/man4/uftdi.4 b/share/man/man4/uftdi.4 index 9512560..db75c68 100644 --- a/share/man/man4/uftdi.4 +++ b/share/man/man4/uftdi.4 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2006 +.Dd November 20, 2011 .Dt UFTDI 4 .Os .Sh NAME @@ -40,6 +40,8 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device usb" +.Cd "device ucom" .Cd "device uftdi" .Ed .Pp diff --git a/share/man/man4/uipaq.4 b/share/man/man4/uipaq.4 index 3362268..310cbfe 100644 --- a/share/man/man4/uipaq.4 +++ b/share/man/man4/uipaq.4 @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 24, 2008 +.Dd November 20, 2011 .Dt UIPAQ 4 .Os .Sh NAME @@ -41,6 +41,8 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device usb" +.Cd "device ucom" .Cd "device uipaq" .Ed .Pp diff --git a/share/man/man4/umcs.4 b/share/man/man4/umcs.4 index f57b084..af8bd5f 100644 --- a/share/man/man4/umcs.4 +++ b/share/man/man4/umcs.4 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 10, 2010 +.Dd November 20, 2011 .Dt UMCS 4 .Os .Sh NAME @@ -39,6 +39,8 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device usb" +.Cd "device ucom" .Cd "device umcs" .Ed .Pp diff --git a/share/man/man4/umct.4 b/share/man/man4/umct.4 index 5f4ac56..e40e146 100644 --- a/share/man/man4/umct.4 +++ b/share/man/man4/umct.4 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2006 +.Dd November 20, 2011 .Dt UMCT 4 .Os .Sh NAME @@ -36,6 +36,8 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device usb" +.Cd "device ucom" .Cd "device umct" .Ed .Pp diff --git a/share/man/man4/umodem.4 b/share/man/man4/umodem.4 index a683a9c..594f4b0 100644 --- a/share/man/man4/umodem.4 +++ b/share/man/man4/umodem.4 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2006 +.Dd November 20, 2011 .Dt UMODEM 4 .Os .Sh NAME @@ -40,6 +40,8 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device usb" +.Cd "device ucom" .Cd "device umodem" .Ed .Pp diff --git a/share/man/man4/uplcom.4 b/share/man/man4/uplcom.4 index 3ebed34..05b4ff3 100644 --- a/share/man/man4/uplcom.4 +++ b/share/man/man4/uplcom.4 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 11, 2011 +.Dd November 20, 2011 .Dt UPLCOM 4 .Os .Sh NAME @@ -40,6 +40,8 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device usb" +.Cd "device ucom" .Cd "device uplcom" .Ed .Pp diff --git a/share/man/man4/uslcom.4 b/share/man/man4/uslcom.4 index 40e6fc8..a2a2dcc 100644 --- a/share/man/man4/uslcom.4 +++ b/share/man/man4/uslcom.4 @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 31, 2007 +.Dd November 20, 2011 .Dt USLCOM 4 .Os .Sh NAME @@ -27,6 +27,8 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device usb" +.Cd "device ucom" .Cd "device uslcom" .Ed .Pp diff --git a/share/man/man4/uvisor.4 b/share/man/man4/uvisor.4 index 1a81aeb..2397e45 100644 --- a/share/man/man4/uvisor.4 +++ b/share/man/man4/uvisor.4 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2006 +.Dd November 20, 2011 .Dt UVISOR 4 .Os .Sh NAME @@ -40,6 +40,8 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device usb" +.Cd "device ucom" .Cd "device uvisor" .Ed .Pp diff --git a/share/man/man4/uvscom.4 b/share/man/man4/uvscom.4 index 77a7f4e..be40518 100644 --- a/share/man/man4/uvscom.4 +++ b/share/man/man4/uvscom.4 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2006 +.Dd November 20, 2011 .Dt UVSCOM 4 .Os .Sh NAME @@ -40,6 +40,8 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device usb" +.Cd "device ucom" .Cd "device uvscom" .Ed .Pp diff --git a/share/man/man4/virtio.4 b/share/man/man4/virtio.4 new file mode 100644 index 0000000..7787051 --- /dev/null +++ b/share/man/man4/virtio.4 @@ -0,0 +1,91 @@ +.\" Copyright (c) 2011 Bryan Venteicher +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd July 4, 2011 +.Dt VIRTIO 4 +.Os +.Sh NAME +.Nm virtio +.Nd VirtIO Device Support +.Sh SYNOPSIS +To compile VirtIO device support into the kernel, place the following lines +in your kernel configuration file: +.Bd -ragged -offset indent +.Cd "device virtio" +.Cd "device virtio_pci" +.Ed +.Pp +Alternatively, to load VirtIO support as modules at boot time, place the +following lines in +.Xr loader.conf 5 : +.Bd -literal -offset indent +virtio_load="YES" +virtio_pci_load="YES" +.Ed +.Sh DESCRIPTION +VirtIO is a specification for para-virtualized I/O in a virtual machine (VM). +Traditionally, the hypervisor emulated real devices such as an Ethernet +interface or disk controller to provide the VM with I/O. This emulation is +often inefficient. +.Pp +VirtIO defines an interface for efficient I/O between the hypervisor and VM. +The +.Xr virtio 4 +module provides a shared memory transport called a virtqueue. +The +.Xr virtio_pci 4 +device driver represents an emulated PCI device that the hypervisor makes +available to the VM. This device provides the probing, configuration, and +interrupt notifications need to interact with the hypervisor. +.Fx +supports the following VirtIO devices: +.Bl -hang -offset indent -width xxxxxxxx +.It Nm Ethernet +An emulated Ethernet device is provided by the +.Xr if_vtnet 4 +device driver. +.It Nm Block +An emulated disk controller is provided by the +.Xr virtio_blk 4 +device driver. +.It Nm Balloon +A pseudo-device to allow the VM to release memory back to the hypervisor is +provided by the +.Xr virtio_balloon 4 +device driver. +.El +.Sh SEE ALSO +.Xr if_vtnet 4 , +.Xr virtio_blk 4 , +.Xr virtio_balloon 4 +.Sh HISTORY +Support for VirtIO first appeared in +.Fx 9.0 . +.Sh AUTHORS +.An -nosplit +.Fx +support for VirtIO was first added by +.An Bryan Venteicher Aq bryanv@daemoninthecloset.org . diff --git a/share/man/man4/virtio_balloon.4 b/share/man/man4/virtio_balloon.4 new file mode 100644 index 0000000..4053f78 --- /dev/null +++ b/share/man/man4/virtio_balloon.4 @@ -0,0 +1,64 @@ +.\" Copyright (c) 2011 Bryan Venteicher +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd July 4, 2011 +.Dt VIRTIO_BALLOON 4 +.Os +.Sh NAME +.Nm virtio_balloon +.Nd VirtIO Memory Balloon driver +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device virtio_balloon" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +virtio_balloon_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +device driver provides support for VirtIO memory balloon devices. +.Pp +The memory balloon allows the guest to, at the request of the +hypervisor, return memory allocated to the hypervisor so it can +be made available to other guests. The hypervisor can later +signal the balloon to return the memory. +.Sh SEE ALSO +.Xr virtio 4 +.Sh HISTORY +The +.Nm +driver was written by +.An Bryan Venteicher Aq bryanv@daemoninthecloset.org . +It first appeared in +.Fx 9.0 . diff --git a/share/man/man4/virtio_blk.4 b/share/man/man4/virtio_blk.4 new file mode 100644 index 0000000..4250141 --- /dev/null +++ b/share/man/man4/virtio_blk.4 @@ -0,0 +1,70 @@ +.\" Copyright (c) 2011 Bryan Venteicher +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd July 4, 2011 +.Dt VIRTIO_BLK 4 +.Os +.Sh NAME +.Nm virtio_blk +.Nd VirtIO Block driver +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device virtio_blk" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +virtio_blk_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +device driver provides support for VirtIO block devices. +.Pp +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +.Bl -tag -width "xxxxxx" +.It Va hw.vtblk.no_ident +This tunable disables retrieving the device identification string +from the hypervisor. The default value is 0. +.El +.Sh SEE ALSO +.Xr virtio 4 +.Sh HISTORY +The +.Nm +driver was written by +.An Bryan Venteicher Aq bryanv@daemoninthecloset.org . +It first appeared in +.Fx 9.0 . diff --git a/share/man/man4/vtnet.4 b/share/man/man4/vtnet.4 new file mode 100644 index 0000000..900d12d --- /dev/null +++ b/share/man/man4/vtnet.4 @@ -0,0 +1,98 @@ +.\" Copyright (c) 2011 Bryan Venteicher +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd July 4, 2011 +.Dt VTNET 4 +.Os +.Sh NAME +.Nm vtnet +.Nd VirtIO Ethernet driver +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device if_vtnet" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_vtnet_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +device driver provides support for VirtIO Ethernet devices. +.Pp +If the hypervisor advertises the appreciate features, the +.Nm +driver supports TCP/UDP checksum offload for both transmit and receive, +TCP segmentation offload (TSO), TCP large receive offload (LRO), and +hardware VLAN tag stripping/insertion features, as well as a multicast +hash filter, as well as Jumbo Frames (up to 9216 bytes), which can be +configured via the interface MTU setting. +Selecting an MTU larger than 1500 bytes with the +.Xr ifconfig 8 +utility configures the adapter to receive and transmit Jumbo Frames. +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.El +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +.Bl -tag -width "xxxxxx" +.It Va hw.vtnet.csum_disable +This tunable disables receive and send checksum offload. The default +value is 0. +.It Va hw.vtnet.tso_disable +This tunable disables TSO. The default value is 0. +.It Va hw.vtnet.lro_disable +This tunable disables LRO. The default value is 0. +.El +.Sh SEE ALSO +.Xr arp 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr vlan 4 , +.Xr virtio 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +driver was written by +.An Bryan Venteicher Aq bryanv@daemoninthecloset.org . +It first appeared in +.Fx 9.0 . +.Sh CAVEATS +The +.Nm +driver only supports LRO when the hypervisor advertises the +mergeable buffer feature. diff --git a/share/man/man7/release.7 b/share/man/man7/release.7 index f2ca0c8..f527c24 100644 --- a/share/man/man7/release.7 +++ b/share/man/man7/release.7 @@ -149,6 +149,11 @@ when invoked by the script. .It Ev SVNROOT The location of the FreeBSD SVN source repository. Defaults to .Pa svn://svn.freebsd.org/base . +.It Ev RELSTRING +Optional base name for generated media images (e.g. FreeBSD-9.0-RC2-amd64). +Defaults to the output of +.Ic `uname -s`-`uname -r`-`uname -p` +within the chroot. .El .Sh MAKEFILE TARGETS The release makefile diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 3026ef8..0870355 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -724,7 +724,8 @@ MLINKS+=kobj.9 DEFINE_CLASS.9 \ kobj.9 kobj_class_free.9 \ kobj.9 kobj_create.9 \ kobj.9 kobj_delete.9 \ - kobj.9 kobj_init.9 + kobj.9 kobj_init.9 \ + kobj.9 kobj_init_static.9 MLINKS+=kproc.9 kproc_create.9 \ kproc.9 kproc_exit.9 \ kproc.9 kproc_resume.9 \ diff --git a/share/man/man9/VOP_VPTOCNP.9 b/share/man/man9/VOP_VPTOCNP.9 index 6bcbd25..f2d5ddc 100644 --- a/share/man/man9/VOP_VPTOCNP.9 +++ b/share/man/man9/VOP_VPTOCNP.9 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 7, 2008 +.Dd November 19, 2011 .Dt VOP_VPTOCNP 9 .Os .Sh NAME @@ -65,9 +65,9 @@ is not a directory, then .Nm returns ENOENT. .Sh LOCKS -The vnode should be locked on entry and will still be locked on exit. The -parent directory vnode will be unlocked on a successful exit. However, it -will have its hold count incremented. +The vnode should be locked on entry and will still be locked on exit. +The parent directory vnode will be unlocked on a successful exit. +However, it will have its use count incremented. .Sh RETURN VALUES Zero is returned on success, otherwise an error code is returned. .Sh ERRORS diff --git a/share/man/man9/kobj.9 b/share/man/man9/kobj.9 index aed1244..0e1745e 100644 --- a/share/man/man9/kobj.9 +++ b/share/man/man9/kobj.9 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 4, 2000 +.Dd November 14, 2011 .Dt KOBJ 9 .Os .Sh NAME @@ -48,6 +48,8 @@ .Ft void .Fn kobj_init "kobj_t obj" "kobj_class_t cls" .Ft void +.Fn kobj_init_static "kobj_t obj" "kobj_class_t cls" +.Ft void .Fn kobj_delete "kobj_t obj" "struct malloc_type *mtype" .Fn DEFINE_CLASS name "kobj_method_t *methods" "size_t size" .Sh DESCRIPTION @@ -88,10 +90,14 @@ Objects created in this way should be freed by calling Clients which would like to manage the allocation of memory themselves should call .Fn kobj_init +or +.Fn kobj_init_static with a pointer to the memory for the object and the class which implements it. It is also possible to use .Fn kobj_init +and +.Fn kobj_init_static to change the class for an object. This should be done with care as the classes must agree on the layout of the object. @@ -109,13 +115,19 @@ A client should not normally need to call these since a class will automatically be compiled the first time it is used. If a class is to be used before .Xr malloc 9 -is initialised, +and +.Xr mutex 9 +are initialised, then .Fn kobj_class_compile_static should be called with the class and a pointer to a statically allocated .Vt kobj_ops structure before the class is used to initialise any objects. +In that case, also +.Fn kobj_init_static +should be used instead of +.Fn kobj_init . .Pp To define a class, first define a simple array of .Vt kobj_method_t . diff --git a/share/man/man9/kqueue.9 b/share/man/man9/kqueue.9 index c657088..8f0d109 100644 --- a/share/man/man9/kqueue.9 +++ b/share/man/man9/kqueue.9 @@ -1,4 +1,4 @@ -.\" Copyright 2006 John-Mark Gurney +.\" Copyright 2006,2011 John-Mark Gurney .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,15 +24,16 @@ .\" .\" $FreeBSD$ .\" -.Dd December 28, 2006 +.Dd November 5, 2011 .Dt KQUEUE 9 .Os .Sh NAME .Nm kqueue_add_filteropts , kqueue_del_filteropts , .Nm kqfd_register , .Nm knote_fdclose , +.Nm knlist_init , knlist_init_mtx , .Nm knlist_add , knlist_remove , knlist_remove_inevent , knlist_empty , -.Nm knlist_init , knlist_destroy , knlist_clear , knlist_delete , +.Nm knlist_clear , knlist_delete , knlist_destroy , .Nm KNOTE_LOCKED , KNOTE_UNLOCKED .Nd "event delivery subsystem" .Sh SYNOPSIS @@ -46,14 +47,6 @@ .Ft void .Fn knote_fdclose "struct thread *td" "int fd" .Ft void -.Fn knlist_add "struct knlist *knl" "struct knote *kn" "int islocked" -.Ft void -.Fn knlist_remove "struct knlist *knl" "struct knote *kn" "int islocked" -.Ft void -.Fn knlist_remove_inevent "struct knlist *knl" "struct knote *kn" -.Ft int -.Fn knlist_empty "struct knlist *knl" -.Ft void .Fo knlist_init .Fa "struct knlist *knl" .Fa "void *lock" @@ -62,12 +55,22 @@ .Fa "int \*[lp]*kl_locked\*[rp]\*[lp]void *\*[rp]" .Fc .Ft void -.Fn knlist_destroy "struct knlist *knl" +.Fn knlist_init_mtx "struct knlist *knl" "struct mtx *lock" +.Ft void +.Fn knlist_add "struct knlist *knl" "struct knote *kn" "int islocked" +.Ft void +.Fn knlist_remove "struct knlist *knl" "struct knote *kn" "int islocked" +.Ft void +.Fn knlist_remove_inevent "struct knlist *knl" "struct knote *kn" +.Ft int +.Fn knlist_empty "struct knlist *knl" .Ft void .Fn knlist_clear "struct knlist *knl" "int islocked" .Ft void .Fn knlist_delete "struct knlist *knl" "struct thread *td" "int islocked" .Ft void +.Fn knlist_destroy "struct knlist *knl" +.Ft void .Fn KNOTE_LOCKED "struct knlist *knl" "long hint" .Ft void .Fn KNOTE_UNLOCKED "struct knlist *knl" "long hint" @@ -135,7 +138,8 @@ bit of .Va kn_status in the .Vt knote . -The function shall return 0 on success, or appropriate error for the failure. +The function shall return 0 on success, or appropriate error for the failure, +such as when the object is being destroyed, or does not exist. During .Va f_attach , it is valid to change the @@ -155,7 +159,13 @@ function will be called to detach the if the .Vt knote has not already been detached by a call to -.Fn knlist_remove . +.Fn knlist_remove , +.Fn knlist_remove_inevent +or +.Fn knlist_delete . +The list +.Fa lock +will not be held when this function is called. .It Va f_event The .Va f_event @@ -247,57 +257,120 @@ A is not required, but is commonly used. If used, the .Vt knlist -must be initialized with the +must be initialized with either .Fn knlist_init -function. -If +or +.Fn knlist_init_mtx . +The +.Vt knlist +structure may be embedded into the object structure. +The +.Fa lock +will be held over +.Va f_event +calls. +.Pp +For the +.Fn knlist_init +function, if .Fa lock is .Dv NULL , -an internal lock will be used and the remaining arguments will be ignored. -The +a shared global lock will be used and the remaining arguments must be +.Dv NULL . +The function pointers .Fa kl_lock , kl_unlock and .Fa kl_locked -functions will be used to manipulate a +will be used to manipulate the argument .Fa lock . -If the argument is +If any of the function pointers are .Dv NULL , -default routines operating on -.Vt "struct mtx *" -will be used. -The +a function operating on +.Dv MTX_DEF +style +.Xr mutex 9 +locks will be used instead. +.Pp +The function +.Fn knlist_init_mtx +may be used to initalize a .Vt knlist -structure may be embedded into the object structure. -The +when .Fa lock -will be held over calls to -.Va f_event . -If -.Dv NULL -is passed for the mutex, a private mutex will be used. +is a +.Dv MTX_DEF +style +.Xr mutex 9 +lock. +.Pp The function .Fn knlist_empty -requires that a +returns true when there are no +.Vt knotes +on the list. +The function requires that the .Fa lock -be held. +be held when called. +.Pp The function .Fn knlist_clear -is used to remove all +removes all .Vt knotes -associated with the list. +from the list. The .Fa islocked -argument declares if +argument declares if the .Fa lock has been acquired. All .Vt knotes -will be marked as detached, and +will have .Dv EV_ONESHOT -will be set so that the +set so that the .Vt knote -will be deleted after the next scan. +will be returned and removed durning the next scan. +The +.Va f_detach +function will be called when the +.Vt knote +is deleted durning the next scan. +This function must not be used when +.Va f_isfd +is set in +.Vt "struct filterops" , +as the +.Fa td +argument of +.Fn fdrop +will be +.Dv NULL . +.Pp +The function +.Fn knlist_delete +removes and deletes all +.Vt knotes +on the list. +The function +.Va f_detach +will not be called, and the +.Vt knote +will not be returned on the next scan. +Using this function could leak user land resources if a process uses the +.Vt knote +to track resources. +.Pp +Both the +.Fn knlist_clear +and +.Fn knlist_delete +functions may sleep. +They also may release the +.Fa lock +to wait for other +.Vt knotes +to drain. +.Pp The .Fn knlist_destroy function is used to destroy a @@ -314,7 +387,9 @@ may be attached to the object. A .Vt knlist may be emptied by calling -.Fn knlist_clear . +.Fn knlist_clear +or +.Fn knlist_delete . .Pp The macros .Fn KNOTE_LOCKED @@ -333,7 +408,7 @@ The macro .Fn KNOTE_LOCKED must be used if the lock associated with the .Fa knl -passed in is held. +is held. The function .Fn KNOTE_UNLOCKED will acquire the lock before iterating over the list of diff --git a/share/man/man9/lock.9 b/share/man/man9/lock.9 index c94612a..049de42 100644 --- a/share/man/man9/lock.9 +++ b/share/man/man9/lock.9 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 16, 2009 +.Dd November 16, 2011 .Dt LOCK 9 .Os .Sh NAME @@ -60,20 +60,20 @@ .Ft void .Fn lockmgr_disown "struct lock *lkp" .Ft void -.Fn lockmgr_printinfo "struct lock *lkp" +.Fn lockmgr_printinfo "const struct lock *lkp" .Ft int -.Fn lockmgr_recursed "struct lock *lkp" +.Fn lockmgr_recursed "const struct lock *lkp" .Ft int .Fn lockmgr_rw "struct lock *lkp" "u_int flags" "struct rwlock *ilk" .Ft int -.Fn lockmgr_waiters "struct lock *lkp" +.Fn lockmgr_waiters "const struct lock *lkp" .Ft int -.Fn lockstatus "struct lock *lkp" +.Fn lockstatus "const struct lock *lkp" .Pp .Cd "options INVARIANTS" .Cd "options INVARIANT_SUPPORT" .Ft void -.Fn lockmgr_assert "struct lock *lkp" "int what" +.Fn lockmgr_assert "const struct lock *lkp" "int what" .Sh DESCRIPTION The .Fn lockinit diff --git a/share/man/man9/mutex.9 b/share/man/man9/mutex.9 index d1e7438..628939f 100644 --- a/share/man/man9/mutex.9 +++ b/share/man/man9/mutex.9 @@ -28,7 +28,7 @@ .\" from BSDI $Id: mutex.4,v 1.1.2.3 1998/04/27 22:53:13 ewv Exp $ .\" $FreeBSD$ .\" -.Dd December 21, 2006 +.Dd November 16, 2011 .Dt MUTEX 9 .Os .Sh NAME @@ -83,16 +83,16 @@ .Ft int .Fn mtx_sleep "void *chan" "struct mtx *mtx" "int priority" "const char *wmesg" "int timo" .Ft int -.Fn mtx_initialized "struct mtx *mutex" +.Fn mtx_initialized "const struct mtx *mutex" .Ft int -.Fn mtx_owned "struct mtx *mutex" +.Fn mtx_owned "const struct mtx *mutex" .Ft int -.Fn mtx_recursed "struct mtx *mutex" +.Fn mtx_recursed "const struct mtx *mutex" .Pp .Cd "options INVARIANTS" .Cd "options INVARIANT_SUPPORT" .Ft void -.Fn mtx_assert "struct mtx *mutex" "int what" +.Fn mtx_assert "const struct mtx *mutex" "int what" .In sys/kernel.h .Fn MTX_SYSINIT "name" "struct mtx *mtx" "const char *description" "int opts" .Sh DESCRIPTION diff --git a/share/man/man9/rmlock.9 b/share/man/man9/rmlock.9 index 2e68b07..bc20d70 100644 --- a/share/man/man9/rmlock.9 +++ b/share/man/man9/rmlock.9 @@ -26,7 +26,7 @@ .\" $FreeBSD$ .\" .\" Based on rwlock.9 man page -.Dd November 10, 2007 +.Dd November 16, 2011 .Dt RMLOCK 9 .Os .Sh NAME @@ -63,7 +63,7 @@ .Ft void .Fn rm_wunlock "struct rmlock *rm" .Ft int -.Fn rm_wowned "struct rmlock *rm" +.Fn rm_wowned "const struct rmlock *rm" .In sys/kernel.h .Fn RM_SYSINIT "name" "struct rmlock *rm" "const char *desc" "int opts" .Sh DESCRIPTION @@ -208,7 +208,7 @@ This functions destroys a lock previously initialized with The .Fa rm lock must be unlocked. -.It Fn rm_wowned "struct rmlock *rm" +.It Fn rm_wowned "const struct rmlock *rm" This function returns a non-zero value if the current thread owns an exclusive lock on .Fa rm . diff --git a/share/man/man9/rwlock.9 b/share/man/man9/rwlock.9 index 5039a42..f7da699 100644 --- a/share/man/man9/rwlock.9 +++ b/share/man/man9/rwlock.9 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 1, 2008 +.Dd November 16, 2011 .Dt RWLOCK 9 .Os .Sh NAME @@ -78,14 +78,14 @@ .Ft int .Fn rw_sleep "void *chan" "struct rwlock *rw" "int priority" "const char *wmesg" "int timo" .Ft int -.Fn rw_initialized "struct rwlock *rw" +.Fn rw_initialized "const struct rwlock *rw" .Ft int -.Fn rw_wowned "struct rwlock *rw" +.Fn rw_wowned "const struct rwlock *rw" .Pp .Cd "options INVARIANTS" .Cd "options INVARIANT_SUPPORT" .Ft void -.Fn rw_assert "struct rwlock *rw" "int what" +.Fn rw_assert "const struct rwlock *rw" "int what" .In sys/kernel.h .Fn RW_SYSINIT "name" "struct rwlock *rw" "const char *desc" .Sh DESCRIPTION @@ -231,7 +231,7 @@ while waiting for an event. For more details on the parameters to this function, see .Xr sleep 9 . -.It Fn rw_initialized "struct rwlock *rw" +.It Fn rw_initialized "const struct rwlock *rw" This function returns non-zero if .Fa rw has been initialized, and zero otherwise. @@ -241,11 +241,11 @@ This functions destroys a lock previously initialized with The .Fa rw lock must be unlocked. -.It Fn rw_wowned "struct rwlock *rw" +.It Fn rw_wowned "const struct rwlock *rw" This function returns a non-zero value if the current thread owns an exclusive lock on .Fa rw . -.It Fn rw_assert "struct rwlock *rw" "int what" +.It Fn rw_assert "const struct rwlock *rw" "int what" This function allows assertions specified in .Fa what to be made about diff --git a/share/man/man9/stack.9 b/share/man/man9/stack.9 index 2c2b762..fee6b8f 100644 --- a/share/man/man9/stack.9 +++ b/share/man/man9/stack.9 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 24, 2009 +.Dd November 16, 2011 .Dt STACK 9 .Os .Sh NAME @@ -46,21 +46,21 @@ In the kernel configuration file: .Ft int .Fn stack_put "struct stack *st" "vm_offset_t pc" .Ft void -.Fn stack_copy "struct stack *src" "struct stack dst" +.Fn stack_copy "const struct stack *src" "struct stack dst" .Ft void .Fn stack_zero "struct stack *st" .Ft void -.Fn stack_print "struct stack *st" +.Fn stack_print "const struct stack *st" .Ft void -.Fn stack_print_ddb "struct stack *st" +.Fn stack_print_ddb "const struct stack *st" .Ft void -.Fn stack_print_short "struct stack *st" +.Fn stack_print_short "const struct stack *st" .Ft void -.Fn stack_print_short_ddb "struct stack *st" +.Fn stack_print_short_ddb "const struct stack *st" .Ft void -.Fn stack_sbuf_print "struct sbuf sb*" "struct stack *st" +.Fn stack_sbuf_print "struct sbuf sb*" "const struct stack *st" .Ft void -.Fn stack_sbuf_print_ddb "struct sbuf sb*" "struct stack *st" +.Fn stack_sbuf_print_ddb "struct sbuf sb*" "const struct stack *st" .Ft void .Fn stack_save "struct stack *st" .Sh DESCRIPTION diff --git a/share/man/man9/sx.9 b/share/man/man9/sx.9 index c75c6a7..b998749 100644 --- a/share/man/man9/sx.9 +++ b/share/man/man9/sx.9 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 28, 2009 +.Dd November 16, 2011 .Dt SX 9 .Os .Sh NAME @@ -88,12 +88,12 @@ .Ft "struct thread *" .Fn sx_xholder "struct sx *sx" .Ft int -.Fn sx_xlocked "struct sx *sx" +.Fn sx_xlocked "const struct sx *sx" .Pp .Cd "options INVARIANTS" .Cd "options INVARIANT_SUPPORT" .Ft void -.Fn sx_assert "struct sx *sx" "int what" +.Fn sx_assert "const struct sx *sx" "int what" .In sys/kernel.h .Fn SX_SYSINIT "name" "struct sx *sx" "const char *description" .Sh DESCRIPTION diff --git a/share/misc/bsd-family-tree b/share/misc/bsd-family-tree index 1f4ec11..822e5f2 100644 --- a/share/misc/bsd-family-tree +++ b/share/misc/bsd-family-tree @@ -248,6 +248,9 @@ FreeBSD 5.2 | | | | | 8.2 7.4 | | | DragonFly 2.10.1 | v | | OpenBSD 4.9 | | | | | | + | | | | | + | | | OpenBSD 5.0 | + | | | | | FreeBSD 9 -current | NetBSD -current OpenBSD -current | | | | | | v v v v v @@ -534,6 +537,7 @@ FreeBSD 7.4 2011-02-24 [FBD] FreeBSD 8.2 2011-02-24 [FBD] DragonFly 2.10.1 2011-04-26 [DFB] OpenBSD 4.9 2011-05-01 [OBD] +OpenBSD 5.0 2011-11-01 [OBD] Bibliography ------------------------ diff --git a/share/misc/committers-ports.dot b/share/misc/committers-ports.dot index 2569169..35587e2 100644 --- a/share/misc/committers-ports.dot +++ b/share/misc/committers-ports.dot @@ -156,11 +156,13 @@ pgollucci [label="Philip M. Gollucci\npgollucci@FreeBSD.org\n2008/07/21"] rafan [label="Rong-En Fan\nrafan@FreeBSD.org\n2006/06/23"] rakuco [label="Raphael Kubo da Costa\nrakuco@FreeBSD.org\n2011/08/22"] rene [label="Rene Ladan\nrene@FreeBSD.org\n2010/04/11"] +rm [label="Ruslan Mahmatkhanov\nrm@FreeBSD.org\n2011/11/06"] rnoland [label="Robert Noland\nrnoland@FreeBSD.org\n2008/07/21"] romain [label="Romain Tartiere\nromain@FreeBSD.org\n2010/01/24"] sahil [label="Sahil Tandon\nsahil@FreeBSD.org\n2010/04/11"] sat [label="Andrew Pantyukhin\nsat@FreeBSD.org\n2006/05/06"] sbz [label="Sofian Brabez\nsbz@FreeBSD.org\n2011/03/14"] +scheidell [label="Michael Scheidell\nscheidell@FreeBSD.org\n2011/11/06"] sem [label="Sergey Matveychuk\nsem@FreeBSD.org\n2004/07/07"] sergei [label="Sergei Kolobov\nsergei@FreeBSD.org\n2003/10/21"] shaun [label="Shaun Amott\nshaun@FreeBSD.org\n2006/06/19"] @@ -268,6 +270,7 @@ flz -> romain gabor -> lippe gabor -> pgj gabor -> stephen +gabor -> scheidell garga -> acm garga -> alepulver @@ -280,6 +283,7 @@ garga -> xride glarkin -> avl glarkin -> cs +glarkin -> rm glewis -> hq glewis -> jkim @@ -352,6 +356,7 @@ miwi -> mandree miwi -> mva miwi -> nox miwi -> pawel +miwi -> rm miwi -> sbz miwi -> sylvio miwi -> tabthorpe @@ -366,6 +371,7 @@ nork -> ale novel -> alexbl novel -> ehaupt +novel -> rm obrien -> mharo obrien -> gerald diff --git a/share/misc/committers-src.dot b/share/misc/committers-src.dot index 8f97775..a0c2dd8 100644 --- a/share/misc/committers-src.dot +++ b/share/misc/committers-src.dot @@ -167,6 +167,7 @@ jls [label="Jordan Sissel\njls@FreeBSD.org\n2006/12/06"] joerg [label="Joerg Wunsch\njoerg@FreeBSD.org\n1993/11/14"] jon [label="Jonathan Chen\njon@FreeBSD.org\n2000/10/17"] jonathan [label="Jonathan Anderson\njonathan@FreeBSD.org\n2010/10/07"] +jpaetzel [label="Josh Paetzel\njpaetzel@FreeBSD.org\n2011/01/21"] julian [label="Julian Elischer\njulian@FreeBSD.org\n1993/??/??"] kaiw [label="Kai Wang\nkaiw@FreeBSD.org\n2007/09/26"] kan [label="Alexander Kabaev\nkan@FreeBSD.org\n2002/07/21"] @@ -237,6 +238,7 @@ stas [label="Stanislav Sedov\nstas@FreeBSD.org\n2008/08/22"] suz [label="SUZUKI Shinsuke\nsuz@FreeBSD.org\n2002/03/26"] syrinx [label="Shteryana Shopova\nsyrinx@FreeBSD.org\n2006/10/07"] takawata [label="Takanori Watanabe\ntakawata@FreeBSD.org\n2000/07/06"] +theraven [label="David Chisnall\ntheraven@FreeBSD.org\n2011/11/11"] thompsa [label="Andrew Thompson\nthompsa@FreeBSD.org\n2005/05/25"] ticso [label="Bernd Walter\nticso@FreeBSD.org\n2002/01/31"] tijl [label="Tijl Coosemans\ntijl@FreeBSD.org\n2010/07/16"] @@ -303,6 +305,7 @@ brian -> joe brooks -> bushman brooks -> jamie +brooks -> theraven bz -> anchie bz -> jamie @@ -332,6 +335,8 @@ dds -> versus dfr -> zml +dim -> theraven + dwmalone -> fanf dwmalone -> peadar dwmalone -> snb @@ -443,6 +448,7 @@ kan -> kib kib -> ae kib -> dchagin +kib -> jpaetzel kib -> lulf kib -> melifaro kib -> pho diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 943010c..264f889 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -67,23 +67,29 @@ PICFLAG=-fpic PO_FLAG=-pg +.c.o: + ${CC} ${STATIC_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} + .c.po: - ${CC} ${PO_FLAG} ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} + ${CC} ${PO_FLAG} ${STATIC_CFLAGS} ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) .c.So: - ${CC} ${PICFLAG} -DPIC ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} + ${CC} ${PICFLAG} -DPIC ${SHARED_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.cc.o: + ${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} + .cc.po .C.po .cpp.po .cxx.po: - ${CXX} ${PO_FLAG} ${PO_CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} + ${CXX} ${PO_FLAG} ${STATIC_CXXFLAGS} ${PO_CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} .cc.So .C.So .cpp.So .cxx.So: - ${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} + ${CXX} ${PICFLAG} -DPIC ${SHARED_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} .f.po: ${FC} -pg ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 3058970..5743fc4 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -428,15 +428,14 @@ __T=${TARGET_ARCH} .else __T=${MACHINE_ARCH} .endif -# Clang is only for x86 and 32-bit powerpc right now, by default. -.if ${__T} == "amd64" || ${__T} == "i386" || ${__T} == "powerpc" +# Clang is only for x86 and powerpc right now, by default. +.if ${__T} == "amd64" || ${__T} == "i386" || ${__T:Mpowerpc*} __DEFAULT_YES_OPTIONS+=CLANG .else __DEFAULT_NO_OPTIONS+=CLANG .endif -# FDT is needed only for arm, mips and powerpc (and not powerpc64) -.if ${__T} == "arm" || ${__T} == "armeb" || ${__T} == "powerpc" || \ - ${__T:Mmips*} +# FDT is needed only for arm, mips and powerpc +.if ${__T:Marm*} || ${__T:Mpowerpc*} || ${__T:Mmips*} __DEFAULT_YES_OPTIONS+=FDT .else __DEFAULT_NO_OPTIONS+=FDT diff --git a/share/monetdef/zh_CN.UTF-8.src b/share/monetdef/zh_CN.UTF-8.src index 136d66c..c130595 100644 --- a/share/monetdef/zh_CN.UTF-8.src +++ b/share/monetdef/zh_CN.UTF-8.src @@ -18,9 +18,9 @@ CNY # negative_sign - # int_frac_digits -0 +2 # frac_digits -0 +2 # p_cs_precedes 1 # p_sep_by_space |