]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
12 years agoMFC 221208:
jhb [Wed, 8 Jun 2011 21:10:44 +0000 (21:10 +0000)]
MFC 221208:
Add a 'show progress' command that shows a summary of all in-progress
commands for a given adapter.  Specifically, it shows the status of any
drive or volume activities currently in progress similar to the
'drive process' and 'volume progress' commands.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222872 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 221182,222760:
jhb [Wed, 8 Jun 2011 20:57:22 +0000 (20:57 +0000)]
MFC 221182,222760:
Add support for Oxford PCI Express Expresso family devices.
For these devices, the number of supported ports is read from a register
in BAR 0.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222871 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 221179:
jhb [Wed, 8 Jun 2011 20:12:38 +0000 (20:12 +0000)]
MFC 221179:
Trim an additional unnecessary <linker_set.h> include.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222870 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 220390:
jhb [Wed, 8 Jun 2011 19:58:20 +0000 (19:58 +0000)]
MFC 220390:
Fix several places to ignore processes that are not yet fully constructed.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222868 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r218056:
mm [Wed, 8 Jun 2011 19:45:47 +0000 (19:45 +0000)]
MFC r218056:

Fix bug in the netfront driver that caused excessive packet drops during
receive processing.

Remove unnecessary restrictions on the mbuf chain length built during an
LRO receive.  This restriction was copied from the Linux netfront driver
where the LRO implementation cannot handle more than 18 discontinuities.
The FreeBSD implementation has no such restriction.

Approved by: gibbs (private e-mail)

git-svn-id: svn://svn.freebsd.org/base/stable/8@222867 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r221430:
netchild [Wed, 8 Jun 2011 11:36:06 +0000 (11:36 +0000)]
MFC r221430:
  Use proper return codes (valuable output, invalid config, problems).

git-svn-id: svn://svn.freebsd.org/base/stable/8@222857 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoSync Groff with what's in HEAD except for not re-enabling ANSI SGR support.
ru [Wed, 8 Jun 2011 08:22:54 +0000 (08:22 +0000)]
Sync Groff with what's in HEAD except for not re-enabling ANSI SGR support.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222855 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222560:
ae [Wed, 8 Jun 2011 04:57:14 +0000 (04:57 +0000)]
MFC r222560:
  Hide some debug messages under debug macro.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222851 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222559:
ae [Wed, 8 Jun 2011 04:50:23 +0000 (04:50 +0000)]
MFC r222559:
  Hide useless warning under debug macro.

  PR: kern/69963, kern/139226

git-svn-id: svn://svn.freebsd.org/base/stable/8@222849 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r219558:
dchagin [Wed, 8 Jun 2011 03:55:58 +0000 (03:55 +0000)]
MFC r219558:

Style(9) fixes. No functional changes.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222847 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r219405:
dchagin [Wed, 8 Jun 2011 03:45:40 +0000 (03:45 +0000)]
MFC r219405:
Extend struct sysvec with new method sv_schedtail, which is used for an
explicit process at fork trampoline path instead of eventhadler(schedtail)
invocation for each child process.

Remove eventhandler(schedtail) code and change linux ABI to use newly added
sysvec method.

While here replace explicit comparing of module sysentvec structure with the
newly created process sysentvec to detect the linux ABI.

MFC r219421:
Remove bogus since r219405 check of the Linux ABI.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222846 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r222291
rmacklem [Wed, 8 Jun 2011 01:28:46 +0000 (01:28 +0000)]
MFC: r222291
Add some missing mutex locking to the new NFS client.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222844 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC less v443.
delphij [Wed, 8 Jun 2011 01:18:47 +0000 (01:18 +0000)]
MFC less v443.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222843 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r222289
rmacklem [Wed, 8 Jun 2011 01:14:31 +0000 (01:14 +0000)]
MFC: r222289
Fix the new NFS client so that it correctly sets the "must_commit"
argument for a write RPC when it succeeds for the first one and
fails for a subsequent RPC within the same call to the function.
This makes it compatible with the old NFS client for this case.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222842 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 219968:
jhb [Tue, 7 Jun 2011 21:48:36 +0000 (21:48 +0000)]
MFC 219968:
Fix some locking nits with the p_state field of struct proc:
- Hold the proc lock while changing the state from PRS_NEW to PRS_NORMAL
  in fork to honor the locking requirements.  While here, expand the scope
  of the PROC_LOCK() on the new process (p2) to avoid some LORs.  Previously
  the code was locking the new child process (p2) after it had locked the
  parent process (p1).  However, when locking two processes, the safe order
  is to lock the child first, then the parent.
- Fix various places that were checking p_state against PRS_NEW without
  having the process locked to use PROC_LOCK().  Every place was already
  locking the process, just after the PRS_NEW check.
- Remove or reduce the use of PROC_SLOCK() for places that were checking
  p_state against PRS_NEW.  The PROC_LOCK() alone is sufficient for reading
  the current state.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222839 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 221138:
jhb [Tue, 7 Jun 2011 21:15:43 +0000 (21:15 +0000)]
MFC 221138:
Only align MSI message groups based on the number of messages being
allocated, not the maximum number of messages the device supports.  The
spec only requires the former, and I believe I implemented the latter due
to misunderstanding an e-mail.  In particular, this fixes an issue where
having several devices that all support 16 messages can run out of
IDT vectors on x86 even though the driver only uses a single message.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222837 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r219242:
dchagin [Tue, 7 Jun 2011 18:43:02 +0000 (18:43 +0000)]
MFC r219242:

Print out shared flag for debug purpose.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222831 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222666:
nwhitehorn [Tue, 7 Jun 2011 14:36:13 +0000 (14:36 +0000)]
MFC r222666:
Fix a typo derived from a mismerge from mmu_oea that would cause
pmap_sync_icache() to sync random (possibly uncached or nonexisting!)
memory, causing kernel page faults or machine checks, most easily
triggered by using GDB. While here, add an additional safeguard to only
sync cacheable memory.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222823 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222430:
nwhitehorn [Tue, 7 Jun 2011 14:35:18 +0000 (14:35 +0000)]
MFC r222430:
Require an error instead of a timeout to decide the new-style fan
commands won't work. This prevents a busy system from making smu(4)
suddenly decide its fans use the old-style command set.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222822 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222234:
attilio [Mon, 6 Jun 2011 23:36:39 +0000 (23:36 +0000)]
MFC r222234:
Fix arguments passing to _long() version of atomic functions.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222796 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222509, r222510, r222513, r222551, r222552, r222701, r222703,
np [Mon, 6 Jun 2011 22:26:02 +0000 (22:26 +0000)]
MFC r222509, r222510, r222513, r222551, r222552, r222701, r222703,
and some direct modifications to minimize diffs with head.

r222509:
L2 table code.  This is enough to get the T4's switch + L2 rewrite
filters working.  (All other filters - switch without L2 info rewrite,
steer, and drop - were already fully-functional).

r222510:
- Specialized ingress queues that take interrupts for other ingress
  queues.  Try to have a set of these per port when possible, fall back
  to sharing a common pool between all ports otherwise.
- One control queue per port (used to be one per hardware channel).
- t4_eth_rx now handles Ethernet rx only.
- sysctls to display pidx/cidx for some queues.

r222513:
Update to firmware interface 1.3.10

r222551:
Firmware device log.

r222552:
Provide hit-count with rest of the information about a filter.

r222701:
Allow lazy fill up of freelists.

r222703:
Cause backpressure (instead of dropping frames) on congestion.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222794 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r222233
rmacklem [Mon, 6 Jun 2011 21:51:35 +0000 (21:51 +0000)]
MFC: r222233
Set the MNT_NFS4ACLS flag for an NFSv4 client mount
if the NFSv4 server supports it.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222789 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 196727 [1]:
gjb [Mon, 6 Jun 2011 21:40:38 +0000 (21:40 +0000)]
MFC 196727 [1]:

Document MALLOC_PRODUCTION knob.

PR: 136029
Original commit by: maxim [1]

git-svn-id: svn://svn.freebsd.org/base/stable/8@222784 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 199873 [1]:
gjb [Mon, 6 Jun 2011 21:23:11 +0000 (21:23 +0000)]
MFC 199873 [1]:

- correct xref sections

PR: 140940
Original commit by: danger [1]

git-svn-id: svn://svn.freebsd.org/base/stable/8@222781 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 199871 [1]:
gjb [Mon, 6 Jun 2011 21:07:44 +0000 (21:07 +0000)]
MFC 199871 [1]:

- correctly render the provided example

PR: 140962
Obtained from: danger [1]

git-svn-id: svn://svn.freebsd.org/base/stable/8@222780 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222578 and r222696.
hselasky [Mon, 6 Jun 2011 20:58:15 +0000 (20:58 +0000)]
MFC r222578 and r222696.
Add new USB serial device driver.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222777 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 199245 [1]:
gjb [Mon, 6 Jun 2011 20:48:36 +0000 (20:48 +0000)]
MFC 199245 [1]:

Fix the grammar in the isprint(3) description.

PR: 140456
Obtained from: roam [1]

git-svn-id: svn://svn.freebsd.org/base/stable/8@222775 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 218951 [1]:
gjb [Mon, 6 Jun 2011 16:17:02 +0000 (16:17 +0000)]
MFC 218951 [1]:

- Add reference to makefs(8).

PR: 154708
Obtained from: jh [1]

git-svn-id: svn://svn.freebsd.org/base/stable/8@222762 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 220965 [1]:
gjb [Mon, 6 Jun 2011 16:00:23 +0000 (16:00 +0000)]
MFC 220965 [1]:

Remove incomplete sentence from tcpdrop(8).

PR: 156593
Obtained from: maxim [1]

git-svn-id: svn://svn.freebsd.org/base/stable/8@222761 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC ZFS version 28 and related revisions:
mm [Mon, 6 Jun 2011 09:36:46 +0000 (09:36 +0000)]
MFC ZFS version 28 and related revisions:
208682, 211900, 212543, 213791, 216378, 218007, 218725, 219089, 219090,
219092, 219316, 219317, 219320, 219404, 219636, 219703, 219959, 219973,
220447, 220575, 221112, 221177, 221263, 221409, 222050, 222267, 222268

MFC r208682 (pjd):
Fix panic when reading label from provider with non power of 2 sector size.

MFC r211900 (pjd):
Use ZFS_CTLDIR_NAME instead of hardcoding ".zfs".

MFC r212543 (imp):
Simplify atomic selection

MFC r213791 (rpaulo):
Pass a format string to panic() and to taskqueue_start_threads().

Found with: clang

MFC r216378 (pjd):
Remove redundant semicolon and empty like.

MFC r218007 (jchandra):
CDDL fixes for MIPS n32.

Provide 64 bit atomic ops, and use 32 bit pointer.

MFC r218725 (dim):
When building libzpool on ia64 or sparc64, don't add the .note.GNU-stack
section.

MFC r219089 (pjd):
Finally... Import the latest open-source ZFS version - (SPA) 28.

Few new things available from now on:

- Data deduplication.
- Triple parity RAIDZ (RAIDZ3).
- zfs diff.
- zpool split.
- Snapshot holds.
- zpool import -F. Allows to rewind corrupted pool to earlier
  transaction group.
- Possibility to import pool in read-only mode.

MFC r219090 (pjd):
Commit two more files missed in r219089.

MFC r219092 (pjd):
Use proper lock in assertion.

MFC r219316 (pjd):
Simplify zvol_remove_minors() a bit.

MFC r219317 (pjd):
Make renaming of a ZVOL, ZVOL's parent directory and ZVOL snapshot work.

MFC r219320 (pjd):
Fix libzpool build.

MFC r219404 (pjd):
Correct readdir over ZFS handling.

MFC r219636 (pjd):
Fix potential panic in dbuf_sync_list() relate to spill blocks handling.

MFC r219703 (ae):
The size of zfsboot2 grown up to 64 Kbytes in r219089.
Increase NSECT up to 128 sectors too.

MFC r219959 (pjd):
Properly print characters larger than 127.

MFC r219973 (pjd):
Checking file access on size change is bogus. The checks are done earlier by
VFS where we know if this is truncate(2) or ftruncate(2). If this is the
latter we should depend on the mode the file was opened and not on the current
permission.

MFC r220447 (mm):
Partially fix ZFS compat code for sparc64.
Some endianess bugs still need to be resolved.

MFC r220575 (pjd):
Fix 'zfs list <path>' handling. If the path was found, the 'ret' variable was
uninitialized.

MFC r221112 (marcel):
Fix copy-paste bug.

MFC r221177 (jhb):
Due to space constraints, the UFS boot2 and boot1 use an evil hack where
boot2 calls back into boot1 to perform disk reads.  The ZFS MBR boot blocks
do not have the same space constraints, so remove this hack for ZFS.
While here, remove commented out code to support C/H/S addressing from
zfsldr.  The ZFS and GPT bootstraps always just use EDD LBA addressing.

MFC r221263 (mm):
Fix deduplicated zfs receive
(dmu_recv_stream builds incomplete guid_to_ds_map)

Illumos-gate changeset: 13329:c48b8bf84ab7

MFC r221409 (marius):
Convert the last use of xcopyout() to ddi_copyout() and remove the now
unused xcopyin() as well as xcopyout().

MFC r222050 (mm):
Restore old (v15) behaviour for a recursive snapshot destroy.
(zfs destroy -r pool/dataset@snapshot)

To destroy all descendent snapshots with the same name the top level
snapshot was not required to exist. So if the top level snapshot does
not exist, check permissions of the parent dataset instead.

Filed as Illumos Bug #1043

MFC r222267 (pjd):
Don't access task structure once we call task function.
The task structure might be no longer available.
This also allows to eliminates the need for two tasks in the zio structure.

MFC r222268 (pjd):
Don't pass pointer to name buffer which is on the stack to another thread,
because the stack might be paged out once the other thread tries to use the
data. Instead, just allocate memory.

Discussed with: pjd

git-svn-id: svn://svn.freebsd.org/base/stable/8@222741 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r217358, 222286, 222519:
bcr [Mon, 6 Jun 2011 07:26:07 +0000 (07:26 +0000)]
MFC r217358, 222286, 222519:

r222519:
Minor wording adjustments to usbdump(8).

PR: docs/157317
Submitted by: Warren Block (wblock at wonkity dot com)
Reviewed by: hps@

r222286:
[mdoc] Fixed .Dt call.

r217358:
Documents OUTPUT formats.  While I'm here cleans up styles and words.

Reviewed by: brueffer@

git-svn-id: svn://svn.freebsd.org/base/stable/8@222740 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222492:
bcr [Mon, 6 Jun 2011 07:15:19 +0000 (07:15 +0000)]
MFC r222492:

Add a short description about NO_CHECKSUM.

PR: docs/155980
Submitted by KOIE Hidetaka (koie at suri co jp)

git-svn-id: svn://svn.freebsd.org/base/stable/8@222739 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r220403:
delphij [Mon, 6 Jun 2011 06:47:11 +0000 (06:47 +0000)]
MFC r220403:

Update arcmsr(4) to vendor version 1.20.00.21.  This release primarily
improves command timeout handling.

Many thanks to Areca for continuing to support FreeBSD.

Submitted by: Ching-Lung Huang <ching2048 areca com tw>

git-svn-id: svn://svn.freebsd.org/base/stable/8@222737 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222210, 222211, 222287:
delphij [Mon, 6 Jun 2011 05:40:52 +0000 (05:40 +0000)]
MFC r222210, 222211, 222287:

 - Diff reduction against NetBSD.  The most notable change is to zdiff(1)
   to handle more file formats including bzip2 and xz.
 - Match symbolic link handling behavior with GNU gzip, bzip2 and xz:
   When we are operating on a symbolic link pointing to an existing
   file, bail out by default, but go ahead if -f is specified.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222735 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222065:
attilio [Sat, 4 Jun 2011 22:51:06 +0000 (22:51 +0000)]
MFC r222065:
Sync XEN support with i386 about the usage of ipi_send_cpu()

git-svn-id: svn://svn.freebsd.org/base/stable/8@222700 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222447:
bcr [Sat, 4 Jun 2011 11:28:44 +0000 (11:28 +0000)]
MFC r222447:

Mention that jumbo frame support is disabled on PCIe VT6130/VT6132
controllers because of TX MAC hangs when trying to send a frame
that is larger than 4K (see r200759).

PR: docs/156742
Submitted by: Michael Moll (kvedulv at kvedulv dot de)
Reviewed by: yongari@

git-svn-id: svn://svn.freebsd.org/base/stable/8@222677 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r222390: find: If a part of an expression is unknown, do not call it an
jilles [Fri, 3 Jun 2011 18:18:54 +0000 (18:18 +0000)]
MFC r222390: find: If a part of an expression is unknown, do not call it an
option.

Although most of the primaries and operators start with "-", they are not
options.

Examples:
  find . -xyz
  find . -name xyz -or bad

git-svn-id: svn://svn.freebsd.org/base/stable/8@222657 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r222075
rmacklem [Thu, 2 Jun 2011 20:57:36 +0000 (20:57 +0000)]
MFC: r222075
Add a sanity check for the existence of an "addr" option
to both NFS clients. This avoids the crash reported by
Sergey Kandaurov (pluknet@gmail.com) to the freebsd-fs@
list with subject "[old nfsclient] different nmount()
args passed from mount vs mount_nfs" dated May 17, 2011.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222629 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r222298:
mav [Thu, 2 Jun 2011 08:39:10 +0000 (08:39 +0000)]
MFC r222298:
Add better names for the Intel HDMI audio codecs.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222598 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211910 (by jfv):
mav [Thu, 2 Jun 2011 07:51:33 +0000 (07:51 +0000)]
MFC r211910 (by jfv):
Add Intel Cougar Point PCH HD Audio Controller ID

git-svn-id: svn://svn.freebsd.org/base/stable/8@222597 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208934:
mav [Thu, 2 Jun 2011 07:45:45 +0000 (07:45 +0000)]
MFC r208934:
Add set of codec IDs.

PR:             kern/147466

git-svn-id: svn://svn.freebsd.org/base/stable/8@222596 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r221789, r221794 (by jfv):
mav [Thu, 2 Jun 2011 07:39:05 +0000 (07:39 +0000)]
MFC r221789, r221794 (by jfv):
Chipset support for the new Intel Panther Point PCH, thanks
to Seth Heasley for preparing the changes.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222595 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMRC r212721:
mav [Thu, 2 Jun 2011 07:21:27 +0000 (07:21 +0000)]
MRC r212721:
Few whitespace cleanups and comments tunings.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222594 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209339:
mav [Thu, 2 Jun 2011 07:19:19 +0000 (07:19 +0000)]
MFC r209339:
Core i5, same as previously Core2Duo, found to not set P-state for single
core lower then set on other cores. Do not try to test P-states on attach
on SMP systems. It is hopeless now and will just pollute verbose logs.
If needed, check still can be forced via loader tunable.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222593 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoPartial MFC of r212370. np@ requested this functionality so I kept in
mdf [Wed, 1 Jun 2011 18:26:59 +0000 (18:26 +0000)]
Partial MFC of r212370.  np@ requested this functionality so I kept in
the cxgb change, but otherwise MFC'd only the new function
sbuf_new_for_sysctl(9) and none of the changed code.

MFC r217830:

Document sbuf_new_for_sysctl(9).

Partial MFC of r217916:

Explicitly wire the user buffer rather than doing it implicitly in
sbuf_new_for_sysctl(9).  This allows using an sbuf with a SYSCTL_OUT
drain for extremely large amounts of data where the caller knows that
appropriate references are held, and sleeping is not an issue.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222579 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212478: (originally by kan@)
mdf [Wed, 1 Jun 2011 17:51:18 +0000 (17:51 +0000)]
MFC r212478: (originally by kan@)

Add missing pointer increment to sbuf_cat.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222576 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212365, r212367:
mdf [Wed, 1 Jun 2011 17:36:52 +0000 (17:36 +0000)]
MFC r212365, r212367:

r212365: Refactor sbuf code so that most uses of sbuf_extend() are in
a new sbuf_put_byte().  This makes it easier to add drain
functionality when a buffer would overflow as there are fewer code
points.

r212367: Add drain functionality to sbufs.  The drain is a function
that is called when the sbuf internal buffer is filled.  For kernel
sbufs with a drain, the internal buffer will never be expanded.  For
userland sbufs with a drain, the internal buffer may still be expanded
by sbuf_[v]printf(3).

Sbufs now have three basic uses:
1) static string manipulation.  Overflow is marked.
2) dynamic string manipulation.  Overflow triggers string growth.
3) drained string manipulation.  Overflow triggers draining.

In all cases the manipulation is 'safe' in that overflow is detected and
managed.

Note that r212367 had to be minorly re-implemented to dynamically
allocate space for a function pointer, a void * argument, and an int
error, to not break the ABI/KBI.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222574 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212180-r212184:
mdf [Wed, 1 Jun 2011 16:34:18 +0000 (16:34 +0000)]
MFC r212180-r212184:

Use math rather than iteration when the desired sbuf size is larger than
SBUF_MAXEXTENDSIZE.

Fix brain fart when converting an if statement into a KASSERT.

Fix user-space libsbuf build.  Why isn't CTASSERT available to
user-space?

Style(9) fixes and eliminate the use of min().

Use a better #if guard.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222570 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212364:
mdf [Wed, 1 Jun 2011 15:46:12 +0000 (15:46 +0000)]
MFC r212364:

Fix small errors in the sbuf(9) man page.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222566 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoFixed lost svn:mergeinfo on some directories in sys/
art [Wed, 1 Jun 2011 14:41:08 +0000 (14:41 +0000)]
Fixed lost svn:mergeinfo on some directories in sys/

Approved by: avg (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@222565 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r219561, r220437:
art [Wed, 1 Jun 2011 06:07:57 +0000 (06:07 +0000)]
MFC r219561, r220437:
add DTrace systrace support for linux32 and freebsd32 on amd64 syscalls

Add systrace_linux32 and systrace_freebsd32 modules which provide
support for tracing compat system calls in addition to native system
call tracing provided by systrace module.

Provided that all the systrace modules are loaded now you can select
what syscalls to trace in the following manner:

syscall::xxx:yyy - work on all system calls that match the specification
syscall:freebsd:xxx:yyy - only native system calls
syscall:linux:xxx:yyy - linux compat system calls (linux32 on amd64)
syscall:freebsd32:xxx:yyy - freebsd32 compat system calls on amd64

PR:         kern/152822
Reviewed by:        jhb (earlier version)
Approved by: avg (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@222557 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoAdded DTrace systrace support for linux32 and freebsd32 on amd64 syscalls
art [Wed, 1 Jun 2011 06:01:17 +0000 (06:01 +0000)]
Added DTrace systrace support for linux32 and freebsd32 on amd64 syscalls

Regenerates system call and systrace support files.

PR:         kern/152822
Reviewed by:        jhb (earlier version)
Approved by: avg (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@222556 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r219559:
art [Wed, 1 Jun 2011 05:50:24 +0000 (05:50 +0000)]
MFC r219559:

add DTrace systrace support for linux32 and freebsd32 on amd64 syscalls

This commits makes necessary changes in syscall/sysent generation
infrastructure.

PR:         kern/152822
Reviewed by:        jhb (ealier version)
Approved by: avg (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@222555 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r222283:
ae [Wed, 1 Jun 2011 05:03:17 +0000 (05:03 +0000)]
MFC r222283:
  Prevent non-aligned reading from provider while tasting. Reject
  providers with unsupported sectorsize.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222554 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r222313: Close a race between libzfs and mountd when updating NFS exports.
will [Tue, 31 May 2011 17:24:18 +0000 (17:24 +0000)]
MFC r222313: Close a race between libzfs and mountd when updating NFS exports.

Reviewed by: pjd
Approved by: ken

git-svn-id: svn://svn.freebsd.org/base/stable/8@222536 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r222243,222244:
ae [Tue, 31 May 2011 05:00:45 +0000 (05:00 +0000)]
MFC r222243,222244:
  Remove unused variable.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222517 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r222003, r222085, r222102
np [Mon, 30 May 2011 23:27:42 +0000 (23:27 +0000)]
MFC r222003, r222085, r222102

r222003:
Add missing header. The test for VLAN_CAPABILITIES later in the file
doesn't make sense without it.

r222085:
- Enable per-channel congestion notification.
- Enable PCIe relaxed ordering for all egress queues and rx data buffers.

r222102:
Simplify t4_os_find_pci_capability.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222514 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r222317:
marcel [Mon, 30 May 2011 16:10:15 +0000 (16:10 +0000)]
MFC r222317:
Ignore MCR[6] during the probe to fix a false negative.

PR: kern/129663

git-svn-id: svn://svn.freebsd.org/base/stable/8@222501 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r220592: Staticize malloc types.
pluknet [Mon, 30 May 2011 11:24:03 +0000 (11:24 +0000)]
MFC r220592: Staticize malloc types.

Approved by: lstewart

git-svn-id: svn://svn.freebsd.org/base/stable/8@222496 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r222278:
bcr [Mon, 30 May 2011 08:04:47 +0000 (08:04 +0000)]
MFC r222278:

Add a description to the checksum target about not only
being able to verify, but also having the ability to
fetch distfiles that are missing or failed the checksum
calculation

PR: docs/138887
Submitted by: Radim Kolar (hsn at sendmail dot cz)

git-svn-id: svn://svn.freebsd.org/base/stable/8@222480 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r218699:
bcr [Mon, 30 May 2011 07:58:49 +0000 (07:58 +0000)]
MFC r218699:

Document TRYBROKEN in ports(7).

PR: docs/153542
Submitted by: Eitan Adler <lists@eitanadler.com>

git-svn-id: svn://svn.freebsd.org/base/stable/8@222478 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r222334:
mckusick [Sun, 29 May 2011 18:09:14 +0000 (18:09 +0000)]
MFC r222334:
The check for whether a block is going to be claimed by a snapshot
needs to happen before we notify the underlying layer that it is
being freed.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222455 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r222174: sh: Add test for r222173 (MFCed as r222452).
jilles [Sun, 29 May 2011 15:10:12 +0000 (15:10 +0000)]
MFC r222174: sh: Add test for r222173 (MFCed as r222452).

git-svn-id: svn://svn.freebsd.org/base/stable/8@222453 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r222173: sh: Fix bss-based buffer overflow in . builtin.
jilles [Sun, 29 May 2011 15:07:53 +0000 (15:07 +0000)]
MFC r222173: sh: Fix bss-based buffer overflow in . builtin.

If the length of a directory in PATH together with the given filename
exceeded FILENAME_MAX (which may happen even for pathnames that work), a
static buffer was overflown.

The static buffer is unnecessary, we can use the stalloc() stack.

Obtained from: NetBSD

git-svn-id: svn://svn.freebsd.org/base/stable/8@222452 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r222201:
attilio [Sun, 29 May 2011 02:10:57 +0000 (02:10 +0000)]
MFC r222201:
Fill the whole cpuset_t, not only the first object.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222437 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r222002:
attilio [Sun, 29 May 2011 02:09:09 +0000 (02:09 +0000)]
MFC r222002:
Do not use memory barrier when is not necessary.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222436 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r220560:
lstewart [Sat, 28 May 2011 13:54:19 +0000 (13:54 +0000)]
MFC r220560:

Use the full and proper company name for Swinburne University of Technology
throughout the source tree.

Requested by: Grenville Armitage, Director of CAIA at Swinburne University of
Technology

git-svn-id: svn://svn.freebsd.org/base/stable/8@222420 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r218912,218945,220237:
lstewart [Sat, 28 May 2011 13:48:49 +0000 (13:48 +0000)]
MFC r218912,218945,220237:

- Add new man pages for the modular congestion control, Khelp and Hhook
  frameworks (cc.4, cc.9, khelp.9 and hhook.9).

- Add new man pages for each available congestion control algorithm (cc_chd.4,
  cc_cubic.4, cc_hd.4, cc_htcp.4, cc_newreno.4 and cc_vegas.4).

- Add a new man page for the Enhanced Round Trip Time (ERTT) Khelp module
  (h_ertt.4).

- Update the TCP (tcp.4) man page to mention the TCP_CONGESTION socket option,
  cross reference to cc.4 and remove references to the retired
  "net.inet.tcp.newreno" sysctl MIB variable.

In collaboration with: David Hayes <dahayes at swin edu au> and
   Grenville Armitage <garmitage at swin edu au>
Sponsored by: FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/8@222419 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r218545,218914:
lstewart [Sat, 28 May 2011 08:43:24 +0000 (08:43 +0000)]
MFC r218545,218914:

Add an example Khelp module, which will be referenced in the forthcoming Khelp
documentation.

Sponsored by: FreeBSD Foundation
Discussed with: David Hayes <dahayes at swin edu au>

git-svn-id: svn://svn.freebsd.org/base/stable/8@222415 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 218155:
lstewart [Sat, 28 May 2011 08:34:30 +0000 (08:34 +0000)]
MFC 218155:

Import an implementation of the CAIA-Hamilton-Delay (CHD) congestion control
algorithm described in the paper "Improved coexistence and loss tolerance for
delay based TCP congestion control" by Hayes and Armitage. It is implemented as
a kernel module compatible with the recently committed modular congestion
control framework.

CHD enhances the approach taken by the Hamilton-Delay (HD) algorithm to provide
tolerance to non-congestion related packet loss and improvements to coexistence
with loss-based congestion control algorithms. A key idea in improving
coexistence with loss-based congestion control algorithms is the use of a shadow
window, which attempts to track how NewReno's congestion window (cwnd) would
evolve. At the next packet loss congestion event, CHD uses the shadow window to
correct cwnd in a way that reduces the amount of unfairness CHD experiences when
competing with loss-based algorithms.

In collaboration with: David Hayes <dahayes at swin edu au> and
Grenville Armitage <garmitage at swin edu au>
Sponsored by: FreeBSD Foundation
Reviewed by: bz and others along the way

git-svn-id: svn://svn.freebsd.org/base/stable/8@222413 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 218153:
lstewart [Sat, 28 May 2011 08:32:17 +0000 (08:32 +0000)]
MFC 218153:

Import a clean-room implementation of the Hamilton-Delay (HD) congestion control
algorithm based on the paper "A strategy for fair coexistence of loss and
delay-based congestion control algorithms" by Budzisz, Stanojevic, Shorten and
Baker. It is implemented as a kernel module compatible with the recently
committed modular congestion control framework.

HD uses a probabilistic approach to reacting to delay-based congestion. The
probability of reducing cwnd is zero when the queuing delay is very small,
increasing to a maximum at a set threshold, then back down to zero again when
the queuing delay is high. Normal operation keeps the queuing delay below the
set threshold. However, since loss-based congestion control algorithms push the
queuing delay high when probing for bandwidth, having the probability of
reducing cwnd drop back to zero for high delays allows HD to compete with
loss-based algorithms.

In collaboration with: David Hayes <dahayes at swin edu au> and
Grenville Armitage <garmitage at swin edu au>
Sponsored by: FreeBSD Foundation
Reviewed by: bz and others along the way

git-svn-id: svn://svn.freebsd.org/base/stable/8@222412 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r218152,218156:
lstewart [Sat, 28 May 2011 08:28:37 +0000 (08:28 +0000)]
MFC r218152,218156:

Import a clean-room implementation of the VEGAS congestion control algorithm
based on the paper "TCP Vegas: end to end congestion avoidance on a global
internet" by Brakmo and Peterson. It is implemented as a kernel module
compatible with the recently committed modular congestion control framework.

VEGAS uses network delay as a congestion indicator and unlike regular loss-based
algorithms, attempts to keep the network operating with stable queuing delays
and no congestion losses. By keeping network buffers used along the path within
a set range, queuing delays are kept low while maintaining high throughput.

In collaboration with: David Hayes <dahayes at swin edu au> and
Grenville Armitage <garmitage at swin edu au>
Sponsored by: FreeBSD Foundation
Reviewed by: bz and others along the way

git-svn-id: svn://svn.freebsd.org/base/stable/8@222411 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 217806:
lstewart [Sat, 28 May 2011 08:24:22 +0000 (08:24 +0000)]
MFC 217806:

Import the ERTT (Enhanced Round Trip Time) Khelp module. ERTT uses the
Khelp/Hhook KPIs to hook into the TCP stack and maintain a per-connection, low
noise estimate of the instantaneous RTT. ERTT's implementation is robust even in
the face of delayed acknowledgements and/or TSO being in use for a connection.

A high quality, low noise RTT estimate is a requirement for applications such as
delay-based congestion control, for which we will be importing some algorithm
implementations shortly.

In collaboration with: David Hayes <dahayes at swin edu au> and
Grenville Armitage <garmitage at swin edu au>
Sponsored by: FreeBSD Foundation
Reviewed by: bz and others along the way

git-svn-id: svn://svn.freebsd.org/base/stable/8@222410 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r217773:
lstewart [Sat, 28 May 2011 08:20:25 +0000 (08:20 +0000)]
MFC r217773:

Add build infrastructure for Khelp modules.

Sponsored by: FreeBSD Foundation
Reviewed by: bz

git-svn-id: svn://svn.freebsd.org/base/stable/8@222409 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r216758,217252:
lstewart [Sat, 28 May 2011 08:13:39 +0000 (08:13 +0000)]
MFC r216758,217252:

- Add some helper hook points to the TCP stack. The hooks allow Khelp modules to
  access inbound/outbound events and associated data for established TCP
  connections. The hooks only run if at least one hook function is registered
  for the hook point, ensuring the impact on the stack is effectively nil when
  no TCP Khelp modules are loaded. struct tcp_hhook_data is passed as contextual
  data to any registered Khelp module hook functions.

- Add an OSD (Object Specific Data) pointer to struct tcpcb to allow Khelp
  modules to associate per-connection data with the TCP control block.

- Tweak the MFCed code to preserve the ABI of the 8-STABLE branch with respect
  to "struct tcpcb" by consuming some of the padding within the struct.

- Bump __FreeBSD_version to 802506.

In collaboration with: David Hayes <dahayes at swin edu au> and
Grenville Armitage <garmitage at swin edu au>
Sponsored by: FreeBSD Foundation
Reviewed by: bz, others along the way

git-svn-id: svn://svn.freebsd.org/base/stable/8@222408 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r216753,217221:
lstewart [Sat, 28 May 2011 07:23:26 +0000 (07:23 +0000)]
MFC r216753,217221:

Add a new sack hint to track the most recent and highest sacked sequence number.
This will be used by the incoming Enhanced RTT Khelp module.

Sponsored by: FreeBSD Foundation
Submitted by: David Hayes <dahayes at swin edu au>
Reviewed by: bz and others (as part of a larger patch)

git-svn-id: svn://svn.freebsd.org/base/stable/8@222407 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r216615,217248,217250:
lstewart [Sat, 28 May 2011 06:56:09 +0000 (06:56 +0000)]
MFC r216615,217248,217250:

- Introduce the Hhook (Helper Hook) KPI. The KPI is closely modelled on pfil(9),
  and in many respects can be thought of as a more generic superset of pfil.
  Hhook provides a way for kernel subsystems to export hook points that Khelp
  modules can hook to provide enhanced or new functionality to the kernel. The
  KPI has been designed to ensure hook points pose no noticeable overhead when
  no hook functions are registered.

- Introduce the Khelp (Kernel Helpers) KPI. Khelp provides a framework for
  managing Khelp modules, which indirectly use the Hhook KPI to register their
  hook functions with hook points of interest within the kernel. Khelp modules
  aim to provide a structured way to dynamically extend the kernel at runtime in
  an ABI preserving manner. Depending on the subsystem providing hook points, a
  Khelp module may be able to associate per-object data for maintaining relevant
  state between hook calls.

- pjd's Object Specific Data (OSD) KPI is used to manage the per-object data
  allocated to Khelp modules. Create a new "OSD_KHELP" OSD type for use by the
  Khelp framework.

- Bump __FreeBSD_version to 802505 to mark the introduction of the new KPIs.

In collaboration with: David Hayes <dahayes at swin edu au> and
Grenville Armitage <garmitage at swin edu au>
Sponsored by: FreeBSD Foundation
Reviewed by: bz, others along the way

git-svn-id: svn://svn.freebsd.org/base/stable/8@222406 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r216115:
lstewart [Sat, 28 May 2011 05:28:00 +0000 (05:28 +0000)]
MFC r216115:

Import a clean-room implementation of the experimental H-TCP congestion control
algorithm based on the Internet-Draft "draft-leith-tcp-htcp-06.txt". It is
implemented as a kernel module compatible with the recently committed modular
congestion control framework.

H-TCP was designed to provide increased throughput in fast and long-distance
networks. It attempts to maintain fairness when competing with legacy NewReno
TCP in lower speed scenarios where NewReno is able to operate adequately.  The
paper "H-TCP: A framework for congestion control in high-speed and long-distance
networks" provides additional detail.

In collaboration with: David Hayes <dahayes at swin edu au> and
Grenville Armitage <garmitage at swin edu au>
Sponsored by: FreeBSD Foundation
Reviewed by: rpaulo

git-svn-id: svn://svn.freebsd.org/base/stable/8@222404 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r216114,217683:
lstewart [Sat, 28 May 2011 05:17:52 +0000 (05:17 +0000)]
MFC r216114,217683:

Import a clean-room implementation of the experimental CUBIC congestion control
algorithm based on the Internet-Draft "draft-rhee-tcpm-cubic-02.txt". It is
implemented as a kernel module compatible with the recently committed modular
congestion control framework.

CUBIC was designed for provide increased throughput in fast and long-distance
networks. It attempts to maintain fairness when competing with legacy NewReno
TCP in lower speed scenarios where NewReno is able to operate adequately.  The
paper "CUBIC: A New TCP-Friendly High-Speed TCP Variant" provides additional
detail.

In collaboration with: David Hayes <dahayes at swin edu au> and
Grenville Armitage <garmitage at swin edu au>
Sponsored by: FreeBSD Foundation
Reviewed by: rpaulo

git-svn-id: svn://svn.freebsd.org/base/stable/8@222403 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r216109:
lstewart [Sat, 28 May 2011 05:04:53 +0000 (05:04 +0000)]
MFC r216109:

Add build infrastructure for the forthcoming CC algorithm modules.

Sponsored by: FreeBSD Foundation
Submitted by: David Hayes <dahayes at swin edu au>

git-svn-id: svn://svn.freebsd.org/base/stable/8@222402 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r215166,215377,215391,215392,215393,215395,216101,216103,216105,216107,
lstewart [Sat, 28 May 2011 04:40:35 +0000 (04:40 +0000)]
MFC r215166,215377,215391,215392,215393,215395,216101,216103,216105,216107,
    216749,216760,217748,218167:

- Add a KPI and supporting infrastructure to allow modular congestion control
  algorithms to be used in the net stack. Algorithms can maintain per-connection
  state if required, and connections maintain their own algorithm pointer, which
  allows different connections to concurrently use different algorithms. The
  TCP_CONGESTION socket option can be used with getsockopt()/setsockopt() to
  programmatically query or change the congestion control algorithm respectively
  from within an application at runtime.

- Integrate the framework with the TCP stack in as least intrusive a manner as
  possible. Care was also taken to develop the framework in a way that should
  allow integration with other congestion aware transport protocols (e.g.  SCTP)
  in the future. The hope is that we will one day be able to share a single set
  of congestion control algorithm modules between all congestion aware transport
  protocols.

- Introduce a new congestion recovery (TF_CONGRECOVERY) state into the TCP stack
  and use it to decouple the meaning of recovery from a congestion event and
  recovery from packet loss (TF_FASTRECOVERY) a la RFC2581. ECN and delay based
  congestion control protocols don't generally need to recover from packet loss
  and need a different way to note a congestion recovery episode within the
  stack.

- Remove the net.inet.tcp.newreno sysctl, which simplifies some portions of code
  and ensures the stack always uses the appropriate mechanisms for recovering
  from packet loss during a congestion recovery episode.

- Extract the NewReno congestion control algorithm from the TCP stack and
  massage it into module form. NewReno is always built into the kernel and will
  remain the default algorithm for the forseeable future. Implementations of
  additional different algorithms will become available in the near future.

- Tweak the MFCed code to preserve the ABI of the 8-STABLE branch with respect
  to "struct tcpcb" by consuming some of the padding within the struct.

- Bump __FreeBSD_version to 802504.

In collaboration with: David Hayes <dahayes at swin edu au> and
Grenville Armitage <garmitage at swin edu au>
Sponsored by: Cisco URP, FreeBSD Foundation
Reviewed by: rpaulo (r215166), bz (r215391,215395,216749,217748)
Tested by: David Hayes (r215166), trociny (r215377,215391,215392,215395)

git-svn-id: svn://svn.freebsd.org/base/stable/8@222401 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoUpgrade to 9.6-ESV-R4-P1, which address the following issues:
dougb [Sat, 28 May 2011 00:33:06 +0000 (00:33 +0000)]
Upgrade to 9.6-ESV-R4-P1, which address the following issues:

1. Very large RRSIG RRsets included in a negative cache can trigger
an assertion failure that will crash named (BIND 9 DNS) due to an
off-by-one error in a buffer size check.

This bug affects all resolving name servers, whether DNSSEC validation
is enabled or not, on all BIND versions prior to today. There is a
possibility of malicious exploitation of this bug by remote users.

2. Named could fail to validate zones listed in a DLV that validated
insecure without using DLV and had DS records in the parent zone.

Add a patch provided by ru@ and confirmed by ISC to fix a crash at
shutdown time when a SIG(0) key is being used.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222396 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r221565-221568,221579:
yongari [Fri, 27 May 2011 21:43:35 +0000 (21:43 +0000)]
MFC r221565-221568,221579:
r221565:
  Reuse the TX descriptor(DPD) if xl_encap() failed instead of just
  picking the next available one. This may explain why xl(4) sees TX
  underrun error with no queued frame. I hope this addresses a long
  standing xl(4) watchdog timeout issue as well.

  Obtained from:        OpenBSD

r221566,221579:
  Rename xl_stats_update() callout handler to xl_tick() and move MII
  tick driving logic to xl_tick(). Now xl_tick() handles MII tick as
  well as periodic updating of statistics.
  This change removes a hack used in interrupt handler where it
  wanted to update statistics without driving MII tick.

r221567:
  Rearm watchdog timer if driver kick controller to recover from TX
  underrun error.
  While here, prepend 0x to status code to show TX status is hex
  number.

r221568:
  XL_DMACTL is 32bit register, use 32bit write macro.
  While I'm here add more bits for the register.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222387 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r221563-221564:
yongari [Fri, 27 May 2011 20:33:26 +0000 (20:33 +0000)]
MFC r221563-221564:
r221563:
  Terminate interrupt handler if driver detect it's not running.
  Also add check for driver running state before trying to send
  frames. While I'm here, use for loop.

r221564:
  Change xl_rxeof() a bit to return the number of processed frames in
  RX descriptor ring. Previously it returned the number of frames
  that were successfully passed to upper stack which in turn means it
  ignored frames that were discarded due to errors. The number of
  processed frames in RX descriptor ring is used to detect whether
  driver is out of sync with controller's current descriptor pointer.
  Returning number of processed frames reduces unnecessary (probably
  wrong) re-synchronization.

  While here, remove unnecessary local variable initialization.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222384 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r221557-221558,221560-221561,221571:
yongari [Fri, 27 May 2011 20:21:12 +0000 (20:21 +0000)]
MFC r221557-221558,221560-221561,221571:
r221557:
  Remove unnecessary htole32/le32toh dance.

r221571:
  Remove unneeded use of variable status.

r221558:
  Set status word once instead of twice. For 3C90xB/3C90xC, frame
  length of status word is ignored. While here move bus_dmamap_sync()
  up where DMA map is loaded.

r221560:
  Call bus_dmamap_sync() only after TX DPD update.

r221561:
  Updating status word should be the last operation of UPD structure
  renewal.  Disable instruction reordering by adding volatile to
  xl_list_onefrag structure.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222382 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r221555:
yongari [Fri, 27 May 2011 19:26:12 +0000 (19:26 +0000)]
MFC r221555:
  Rewrite RX filter logic and provide controller specific filter
  handler for 3C90x and 3C90xB/C respectively.  This simplifies ioctl
  handler as well as enhancing readability.
  While I'm here don't reprogram multicast filter when driver is not
  running.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222377 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r222107:
yongari [Fri, 27 May 2011 19:03:42 +0000 (19:03 +0000)]
MFC r222107:
  Fix typo.

  Submitted by: brad at OpenBSD

git-svn-id: svn://svn.freebsd.org/base/stable/8@222374 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r222135:
yongari [Fri, 27 May 2011 18:58:08 +0000 (18:58 +0000)]
MFC r222135:
  Remove unnecessary controller reinitialization by checking
  IFF_DRV_RUNNING flag.  Previously running dhclient or adding alias
  addresses reinitialized controller and it resulted in unnecessary
  link flips.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222371 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r221712:
yongari [Fri, 27 May 2011 18:46:24 +0000 (18:46 +0000)]
MFC r221712:
  Since r117657, bge(4) does not enable buffer manager for BCM5705 or
  newer controllers.  However, all data sheet I have access has no
  indication that buffer manager should not be touched on these
  controllers.  It seems the buffer manager always runs on BCM5705 or
  newer controllers. Some controller(e.g. BCM5719) needs other buffer
  manager configuration so driver should enable buffer manager for
  all controllers.  Both Linux and OpenBSD/NetBSD use the same
  approach.
  This change polls enable bit of block to know whether specified
  block was really stopped as well as enabling buffer manager for all
  controllers in driver initialization.

  Obtained from: NetBSD

git-svn-id: svn://svn.freebsd.org/base/stable/8@222369 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r222142:
yongari [Fri, 27 May 2011 18:39:18 +0000 (18:39 +0000)]
MFC r222142:
  Datasheet says vge(4) controllers support DAC but it seems that's
  not true on old PCI based controllers.  DAC configuration is read
  from EEPROM in device reset phase and driver can override DAC
  configuration.  However I guess there is an undocumented reason why
  EEPROM configuration does not enable DAC so do not blindly override
  DAC configuration.  Recent PCIe based controllers are supposed to
  support 64bit DMA so allow 64bit DMA only on PCIe based controllers.

  PR: kern/157184

git-svn-id: svn://svn.freebsd.org/base/stable/8@222367 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r222136: Add missing header file.
pluknet [Fri, 27 May 2011 09:55:18 +0000 (09:55 +0000)]
MFC r222136: Add missing header file.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222350 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r222245: Ensure there is a whitespace after a mount point.
ru [Fri, 27 May 2011 09:50:29 +0000 (09:50 +0000)]
MFC: r222245: Ensure there is a whitespace after a mount point.

PR: 157286

git-svn-id: svn://svn.freebsd.org/base/stable/8@222349 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r222127,r222130:
pluknet [Fri, 27 May 2011 09:15:56 +0000 (09:15 +0000)]
MFC r222127,r222130:

- Fix the description of the "paddr" keyword.
- Spelling in P_HADTHREADS.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222348 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r222257:
zec [Fri, 27 May 2011 08:43:59 +0000 (08:43 +0000)]
MFC r222257:
  Assume the link to be dead if bit error rate (BER) parameter is set to 1.
  When a transition from link alive to link dead configuration or vice
  versa occurs, notify any upstream and / or downstream peers using
  NGM_FLOW messagges.

  Link state notification using NGM_FLOW messages is modelled around
  around already existing code in ng_ether.c.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222347 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r222255:
zec [Fri, 27 May 2011 08:43:03 +0000 (08:43 +0000)]
MFC r222255:
  Provide fake link status information in an attempt to let ng_eiface(4)
  virtual ifnets more realistically mimic physical ethernet interfaces.
  The main motivation behind this change is to allow for ng_eiface(4)
  interfaces to participate in STP if_bridge(4) configurations.

  When announcing link status changes, switch to the vnet to which the
  ifnet belongs, since it is possible for ng_eiface ifnets to be assigned
  to a vnet different from the one in which its netgraph node resides.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222346 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r222247:
zec [Fri, 27 May 2011 08:41:57 +0000 (08:41 +0000)]
MFC r222247:
  Allow for vlan(4) interfaces with MTU of 1500 bytes to be configured
  on top of epair(4) virtual interfaces, since there's no physical
  hardware associated with epair interfaces which would imply any
  constraints on MTU sizes.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222345 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r222246:
zec [Fri, 27 May 2011 08:40:26 +0000 (08:40 +0000)]
MFC r222246:
  Let epair(4) virtual interfaces report fake link / media status,
  by borrowing the skeleton of if_media manipulation and reporting
  code from if_lagg(4).  The main motivation behind this change is
  to allow for epair(4) interfaces to participate in STP if_bridge(4)
  configurations.

  Reviewed by:  bz

git-svn-id: svn://svn.freebsd.org/base/stable/8@222344 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r222122:
bcr [Fri, 27 May 2011 07:38:58 +0000 (07:38 +0000)]
MFC r222122:

Correct typos in comments, no functional changes.

Found by: codespell
Reviewed by: kaiw

git-svn-id: svn://svn.freebsd.org/base/stable/8@222342 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r221860:
delphij [Fri, 27 May 2011 00:23:44 +0000 (00:23 +0000)]
MFC r221860:

Constify a few string variables.  While I'm there, also convert usage() to
use a prototype.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222335 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r220911:
mav [Thu, 26 May 2011 00:37:44 +0000 (00:37 +0000)]
MFC r220911:
Make PATA-like soft-reset in ata(4) more strict in checking disk signature.
It allows to avoid false positive device detection under Xen, that caused
long probe delays due to subsequent IDENTIFY command timeouts.

git-svn-id: svn://svn.freebsd.org/base/stable/8@222297 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f