]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
10 years agoMFC r252732:
mm [Sun, 7 Jul 2013 09:21:39 +0000 (09:21 +0000)]
MFC r252732:
Fix misleading or remove irrelevant illumos messages and manpage references
in the zfs command.

PR: bin/178996
Submitted by: Peter Schaefer <peter.schaefer@wilhelmheinrichs.de>

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

10 years agoMFC r252869:
delphij [Sat, 6 Jul 2013 23:56:58 +0000 (23:56 +0000)]
MFC r252869:

Update driver with recent vendor improvements, most notably support
of Skyhawk adapters.

Many thanks to Emulex for their continued support of FreeBSD.

Submitted by: "Duvvuru,Venkat Kumar" <VenkatKumar.Duvvuru Emulex.Com>

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

10 years agoMFC r252857:
delphij [Sat, 6 Jul 2013 23:46:23 +0000 (23:46 +0000)]
MFC r252857:

Refresh vendor driver version which fixes command queue
full issue with ARC-1214 and ARC-1224.

Many thanks to Areca for continuing to support FreeBSD.

Submitted by: 黃清隆 <ching2048 areca com tw>

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

10 years agoMFC r252867:
delphij [Sat, 6 Jul 2013 23:26:36 +0000 (23:26 +0000)]
MFC r252867:

Import HighPoint DC Series Data Center HBA (DC7280 and R750) driver.
This driver works for FreeBSD/i386 and FreeBSD/amd64 platforms.

Many thanks to HighPoint for providing this driver.

(This changeset have not included changes found in 249468 and 246713)

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

10 years agoMFC r252852:
delphij [Sat, 6 Jul 2013 23:04:59 +0000 (23:04 +0000)]
MFC r252852:

Update hpt27xx(4) driver to address a problem reported by FreeNAS
user, where when more than one hpt27xx adapters are being used,
the "unit number" stays at 0.

Many thanks to HighPoint for providing this driver update.

(This changeset have not included change found in 249468)

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

10 years agoMFC r252587:
dim [Sat, 6 Jul 2013 22:51:56 +0000 (22:51 +0000)]
MFC r252587:

Pull in r185446 from clang trunk:

 Fix to PR15826 - clang hits assert in clang::ASTContext::getASTRecordLayout.

Reported by: glebius

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

10 years agoFix minor mis-merge in contrib/llvm/tools/clang/lib/Basic/Targets.cpp,
dim [Sat, 6 Jul 2013 22:39:17 +0000 (22:39 +0000)]
Fix minor mis-merge in contrib/llvm/tools/clang/lib/Basic/Targets.cpp,
reducing the diff against the file in head.

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

10 years agoMFC e1000 driver revisions: 248906,248908,249074,249339,249509
jfv [Sat, 6 Jul 2013 22:34:42 +0000 (22:34 +0000)]
MFC e1000 driver revisions: 248906,248908,249074,249339,249509
                            250108,250109,250168,250413,250414

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

10 years agoMFC ixgbe driver revisions 248901, 250108, and 251964
jfv [Sat, 6 Jul 2013 21:38:55 +0000 (21:38 +0000)]
MFC ixgbe driver revisions 248901, 250108, and 251964

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

10 years agoMFC r238087:
tuexen [Sat, 6 Jul 2013 20:39:44 +0000 (20:39 +0000)]
MFC r238087:
Initialize a variable.

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

10 years agoMFC r238003, r239091:
tuexen [Sat, 6 Jul 2013 20:35:21 +0000 (20:35 +0000)]
MFC r238003, r239091:
Move common code parts to sctp_common_input_processing().

Fix a bug found by dim@:
Don't use an uninitilized variable, if INVARIANTS is on and an illegal
packet with destination 0 is received.

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

10 years agoMFC r226454 (by bz):
kib [Sat, 6 Jul 2013 20:10:39 +0000 (20:10 +0000)]
MFC r226454 (by bz):

Fix VNET build.

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

10 years agoMerge r252337 from head:
gavin [Sat, 6 Jul 2013 19:43:42 +0000 (19:43 +0000)]
Merge r252337 from head:

  Don't try to re-insert an already present but invalid page.

  This could happen if a thread doing a page-in loses a ZFS range lock
  race to a thread writing to the same range

  This fixes "panic: vm_page_alloc: pindex already allocated" in
  http://docs.FreeBSD.org/cgi/mid.cgi?1372165971.96049.42.camel

Submitted by: avg

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

10 years agoMFC rr237715, r238294:
tuexen [Sat, 6 Jul 2013 17:11:33 +0000 (17:11 +0000)]
MFC rr237715, r238294:
Pass the src and dst address of a received packet explicitly around.

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

10 years agoMFC r250102: socket: Make shutdown() wake up a blocked accept().
jilles [Sat, 6 Jul 2013 14:21:22 +0000 (14:21 +0000)]
MFC r250102: socket: Make shutdown() wake up a blocked accept().

A blocking accept (and some other operations) waits on &so->so_timeo. Once
it wakes up, it will detect the SBS_CANTRCVMORE bit.

The error from accept() is [ECONNABORTED] which is not the nicest one -- the
thread calling accept() needs to know out-of-band what is happening.

A spurious wakeup on so->so_timeo appears harmless (sleep retried) except
when lingering on close (SO_LINGER, and in that case there is no descriptor
to call shutdown() on) so this should be fairly safe.

A shutdown() already woke up a blocked accept() for TCP sockets, but not for
Unix domain sockets. This fix is generic for all domains.

This patch was sent to -hackers@ and -net@ on April 5.

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

10 years agoMFC r252415, r252422:
mjg [Sat, 6 Jul 2013 12:56:30 +0000 (12:56 +0000)]
MFC r252415, r252422:

acct: reduce code duplication by using acct_disable as cleanup for
failed kproc_create

acct: create a special plimit object and set it for exiting processe
instead of allocating new one each time

All limits are set to RLIM_INFINITY which sould be ok (even though we
care only about RLIMT_FSIZE in this case).

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

10 years agoMFC r250567: fdescfs: Supply a real value for d_type in readdir.
jilles [Sat, 6 Jul 2013 11:39:37 +0000 (11:39 +0000)]
MFC r250567: fdescfs: Supply a real value for d_type in readdir.

All the fdescfs nodes (except . and ..) appear as character devices to
stat(), so DT_CHR is correct.

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

10 years agoMFC r252851:
delphij [Sat, 6 Jul 2013 09:49:01 +0000 (09:49 +0000)]
MFC r252851:

Add PCI IDs for HighPoint RocketRAID 4521, 3620, 3622 and 3640
controllers.  Update the hptiop(4) manual page to reflect this
as well as mentioning that some cards are already end-of-life.

Many thanks to Highpoint for providing this driver update.

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

10 years agoMFC r237569:
tuexen [Sat, 6 Jul 2013 09:23:04 +0000 (09:23 +0000)]
MFC r237569:
Unify sctp_input() and sctp6_input().

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

10 years agoMFC r237565:
tuexen [Sat, 6 Jul 2013 09:17:54 +0000 (09:17 +0000)]
MFC r237565:
Whitespace cleanup.

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

10 years agoMFC r237542:
tuexen [Sat, 6 Jul 2013 09:11:38 +0000 (09:11 +0000)]
MFC r237542:
Pass the packet length explicitly around.

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

10 years agoMFC r237541:
tuexen [Sat, 6 Jul 2013 09:08:17 +0000 (09:08 +0000)]
MFC r237541:
Remove redundant check.

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

10 years agoMFC r237540:
tuexen [Sat, 6 Jul 2013 09:04:55 +0000 (09:04 +0000)]
MFC r237540:
Do packet logging in a consistent way.

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

10 years agoMFC r248820: rc.subr: disabling globbing while processing devfs rules
avg [Sat, 6 Jul 2013 09:02:30 +0000 (09:02 +0000)]
MFC r248820: rc.subr: disabling globbing while processing devfs rules

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

10 years agoMFC r249139: strncmp for boot code: fix an off by one error
avg [Sat, 6 Jul 2013 08:58:30 +0000 (08:58 +0000)]
MFC r249139: strncmp for boot code: fix an off by one error

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

10 years agoMFC r248645: post mountroot event after a real/final root is mounted
avg [Sat, 6 Jul 2013 08:51:56 +0000 (08:51 +0000)]
MFC r248645: post mountroot event after a real/final root is mounted

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

10 years agoMFC r248641: libdwarf: anonymous types are expected to have empty type names
avg [Sat, 6 Jul 2013 08:43:31 +0000 (08:43 +0000)]
MFC r248641: libdwarf: anonymous types are expected to have empty type names

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

10 years agoMFC r226712 (sobomax):
delphij [Sat, 6 Jul 2013 08:43:09 +0000 (08:43 +0000)]
MFC r226712 (sobomax):

Add new option -F to specify alternative location of the /etc/fstab
file.

MFC r226742 (ed):

Build swapon with WARNS=6.

Don't use a variable called stat, because it collides with stat(2).

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

10 years agoMFC r252325:
markj [Sat, 6 Jul 2013 03:39:40 +0000 (03:39 +0000)]
MFC r252325:
The dtmalloc provider uses the short description of a malloc type as the
function name of its corresponding DTrace probes. These descriptions may
contain whitespace, but probe names cannot, so just replace any whitespace
with underscores when creating probes.

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

10 years agoMFC r251238:
markj [Sat, 6 Jul 2013 02:49:56 +0000 (02:49 +0000)]
MFC r251238:
SDT probes can directly pass up to five arguments as arguments to
dtrace_probe(). Arguments beyond these five must be obtained in an
architecture-specific way; this can be done through the getargval provider
method, and through dtrace_getarg() if getargval isn't overridden.

This change fixes two off-by-one bugs in the way these arguments are fetched
in FreeBSD's DTrace implementation. First, the SDT provider must set the
aframes parameter to 1 when creating a probe. The aframes parameter controls
the number of frames that dtrace_getarg() will step over in order to find
the frame containing the extra arguments. On FreeBSD, dtrace_getarg() is
called in SDT probe context via

dtrace_probe()->dtrace_dif_emulate()->dtrace_dif_variable->dtrace_getarg()

so aframes must be 3 since the arguments are in dtrace_probe()'s frame; it
was previously being called with a value of 2 instead. illumos uses a
different aframes value for SDT probes, but this is because illumos SDT
probes fire by triggering the #UD fault handler rather than calling
dtrace_probe() directly.

The second bug has to do with the way arguments are grabbed out
dtrace_probe()'s frame on amd64. The code currently jumps over the first
stack argument and retrieves the rest of them using a pointer into the
stack. This works on i386 because all of dtrace_probe()'s arguments will be
on the stack and the first argument is the probe ID, which should be
ignored. However, it is incorrect to ignore the first stack argument on
amd64, so we correct the pointer used to access the arguments.

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

10 years agoMFC r241703:
andre [Fri, 5 Jul 2013 21:33:32 +0000 (21:33 +0000)]
MFC r241703:

  Remove double-wrapping of #ifdef ZERO_COPY_SOCKETS within
  zero copy specialized sosend_copyin() helper function.

MFC r241704:

  Remove unnecessary includes from sosend_copyin() and fix
  a couple of style issues.

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

10 years agoMFC r226433:
andre [Fri, 5 Jul 2013 20:11:27 +0000 (20:11 +0000)]
MFC r226433:

 Update the comment and description of tcp_sendspace and tcp_recvspace
 to better reflect their purpose.

MFC r226437:

 VNET virtualize tcp_sendspace/tcp_recvspace and change the
 type to INT.  A long is not necessary as the TCP window is
 limited to 2**30.  A larger initial window isn't useful.

MFC r226448:

 Move the tcp_sendspace and tcp_recvspace sysctl's from
 the middle of tcp_usrreq.c to the top of tcp_output.c
 and tcp_input.c respectively next to the socket buffer
 autosizing controls.

MFC r227034:

 Restore sysctl names for tcp_sendspace/tcp_recvspace.

 They seem to be changed unintentionally in r226437, and there were no
 any mentions of renaming in commit log message.

 Reported by: Anton Yuzhaninov <citrin citrin ru>

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

10 years agoRegenerate after r252827
emaste [Fri, 5 Jul 2013 19:45:16 +0000 (19:45 +0000)]
Regenerate after r252827

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

10 years agoMFC r241724:
andre [Fri, 5 Jul 2013 19:43:33 +0000 (19:43 +0000)]
MFC r241724:

  Remove splimp() comment from sysinit table and attribute SI_SUB_PROTO_BEGIN
  and SI_SUB_PROTO_END to VNET related initializations.

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

10 years agoUndo accidental MFC of GPL_DTC in r252827
emaste [Fri, 5 Jul 2013 19:39:19 +0000 (19:39 +0000)]
Undo accidental MFC of GPL_DTC in r252827

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

10 years agoMFC r252313, r252349, 252436:
trociny [Fri, 5 Jul 2013 19:38:57 +0000 (19:38 +0000)]
MFC r252313, r252349, 252436:

To avoid LOR, drop the filedesc lock in export_fd_to_sb(), before
writing to sbuf.

MFC r252351 (mjg):

Remove duplicate NULL check in kern_proc_filedesc_out.
No functional changes.

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

10 years agoMFC r243624:
andre [Fri, 5 Jul 2013 19:36:34 +0000 (19:36 +0000)]
MFC r243624:

  Remove unused and unnecessary CSUM_IP_FRAGS checksumming capability.
  Checksumming the IP header of fragments is no different from doing
  normal IP headers.

  Discussed with: yongari

Note that the definition of CSUM_IP_FRAGS is left in mbuf.h to allow
for stable branch source compatibility.

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

10 years agoMFC r244236,r244408,r244915,r247054,r251512:
emaste [Fri, 5 Jul 2013 19:35:51 +0000 (19:35 +0000)]
MFC r244236,r244408,r244915,r247054,r251512:

  Add a new knob WITH_DEBUG_FILES to control the building of standalone
  debug files for userland programs and libraries.  The "-g" debug flag
  is automatically applied when WITH_DEBUG_FILES is set.

  The debug files are named ${prog}.debug and ${shlib}.debug for                  consistency with other systems and documentation.  In addition they are
  installed under /usr/lib/debug, to simplify the process of installing
  them if needed after a crash.  Users of bsd.{prog,lib}.mk outside of the
  base system place the standalone debug files in a .debug subdirectory.
  GDB automatically searches both of these directories for standalone
  debug files.

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

10 years agoMFC r242308:
andre [Fri, 5 Jul 2013 19:11:12 +0000 (19:11 +0000)]
MFC r242308:

  Define the delayed ACK timeout value directly as hz/10 instead of
  obfuscating it by going through PR_FASTHZ.  No functional change.

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

10 years agoMFC r242998:
andre [Fri, 5 Jul 2013 18:56:04 +0000 (18:56 +0000)]
MFC r242998:

  Remove description of deprecated IP fragment checksum support.
  Since SMPng it wasn't really supported anymore and if it worked
  then only by chance.  Only very few drivers ever supported it.

  Discussed with: yongari

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

10 years agoMFC r243628:
andre [Fri, 5 Jul 2013 18:51:21 +0000 (18:51 +0000)]
MFC r243628:

  Update comment to prefer M_NOWAIT over M_DONTWAIT and
  M_WAITOK over M_WAIT.

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

10 years agoMFC r252516, r252540:
trociny [Fri, 5 Jul 2013 18:46:35 +0000 (18:46 +0000)]
MFC r252516, r252540:

Add a mib for worker process ID.

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

10 years agoMFC r252472:
trociny [Fri, 5 Jul 2013 18:44:10 +0000 (18:44 +0000)]
MFC r252472:

Make hastctl(1) ('list' command) output a worker pid.

Reviewed by: pjd

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

10 years ago- MFC r252661, r252705, r252711, r252715, r252716, r252724, r252728,
np [Fri, 5 Jul 2013 18:27:38 +0000 (18:27 +0000)]
- MFC r252661, r252705, r252711, r252715, r252716, r252724, r252728,
  r252747.
- Connect t3_tom and t4_tom to the build (r252555 enables them).

r252661:
- Include the T5 firmware with the driver.
- Update the T4 firmware to the latest.
- Minor reorganization and updates to the version macros, etc.

r252705:
- Read all TP parameters in one place.
- Read the filter mode, calculate various shifts, and use them
  properly during active open (in select_ntuple).

r252711:
The T5 allows the driver to specify the ISS.  Do so; use the ISS picked
by the kernel.

r252715:
Ring the egress queue's doorbell as soon as there are 8 or more
descriptors ready to be processed.

r252716:
Pay attention to TCP_NODELAY when it's set/unset after the connection
is established.

r252724:
On-the-fly changes to the interrupt coalescing timer should apply to the
TOE rx queues too.

r252728:
- Make note of interface MTU change if the rx queues exist, and not just
  when the interface is up.
- Add a tunable to control the TOE's rx coalesce feature (enabled by
  default as it always has been).  Consider the interface MTU or the
  coalesce size when deciding which cluster zone to use to fill the
  offload rx queue's free list.  The tunable is:
  dev.{t4nex,t5nex}.<N>.toe.rx_coalesce

r252747:
- Show the reason why link is down if this information is available.
- Display the temperature and PHY firmware version of the BT PHY.

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

10 years agoMFC r251601, r251685:
emaste [Fri, 5 Jul 2013 17:57:25 +0000 (17:57 +0000)]
MFC r251601, r251685:

  Handle options that override other options

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

10 years agoMFC r242256:
andre [Fri, 5 Jul 2013 16:03:19 +0000 (16:03 +0000)]
MFC r242256:

 Improve m_cat() by being able to also merge contents from M_EXT
 mbuf's by doing proper testing with M_WRITABLE().

 In m_collapse() replace an incomplete manual check for M_RDONLY
 with the M_WRITABLE() macro that also tests for shared buffers
 and other cases that make a particular mbuf immutable.

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

10 years agoMFC r242257:
andre [Fri, 5 Jul 2013 15:57:36 +0000 (15:57 +0000)]
MFC r242257:

 Remove bogus 'else' in #ifdef that prevented the rttvar from being reset
 tcp_timer_rexmt() on retransmit for IPv6 sessions.

MFC r242260:

 When retransmitting SYN in TCPS_SYN_SENT state use TCPTV_RTOBASE,
 the default retransmit timeout, as base to calculate the backoff
 time until next try instead of the TCP_REXMTVAL() macro which only
 works correctly when we already have measured an actual RTT+RTTVAR.

MFC r242263, r242264:

 Add SACK_PERMIT to the list of TCP options that are switched off after
 retransmitting a SYN three times.

MFC r242267:

 If the user has closed the socket then drop a persisting connection
 after a much reduced timeout.

 Typically web servers close their sockets quickly under the assumption
 that the TCP connections goes away as well.  That is not entirely true
 however.  If the peer closed the window we're going to wait for a long
 time with lots of data in the send buffer.

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

10 years agoMFC r242251, r242311:
andre [Fri, 5 Jul 2013 15:47:59 +0000 (15:47 +0000)]
MFC r242251, r242311:

 Defer sending an independent window update if a delayed ACK is pending
 saving a packet.  The window update then gets piggy-backed on the next
 already scheduled ACK.

MFC r242252:

 Prevent a flurry of forced window updates when an application is
 doing small reads on a (partially) filled receive socket buffer.

 Normally one would a send a window update every time the available
 space in the socket buffer increases by two times MSS.  This leads
 to a flurry of window updates that do not provide any meaningful
 new information to the sender.  There still is available space in
 the window and the sender can continue sending data.  All window
 updates then get carried by the regular ACKs.  Only when the socket
 buffer was (almost) full and the window closed accordingly a window
 updates delivery new information and allows the sender to start
 sending more data again.

 Send window updates only every two MSS when the socket buffer
 has less than 1/8 space available, or the available space in the
 socket buffer increased by 1/4 its full capacity, or the socket
 buffer is very small.  The next regular data ACK will carry and
 report the exact window size again.

 Reported by: sbruno
 Tested by: darrenr
 Tested by: Darren Baginski
 PR: kern/116335

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

10 years agoMFC r244039:
andre [Fri, 5 Jul 2013 15:30:02 +0000 (15:30 +0000)]
MFC r244039:

 Remove outdated reference to tcp inflight tuning.

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

10 years agoMFC r243147:
andre [Fri, 5 Jul 2013 15:26:12 +0000 (15:26 +0000)]
MFC r243147:

 Change fetch(1) to:
 o Report the instantaneous bandwidth instead of an average since the
   beginning of the download.
 o At the finish of the download report the average bandwidth and also
   the total time it took instead of 00m00s.

 Reviewed by: des

MFC r244058:

 Fix bandwidth reporting when doing a restarted download with "-r".
 The offset is already accounted for in xs->lastrcvd and doesn't
 have to be subtracted again.

 Reported by: Florian Smeets <flo@smeets.im>
 Submitted by: Mateusz Guzik <mjguzik@gmail.com>
 Tested by: Florian Smeets <flo@smeets.im>

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

10 years agoMFC r242253:
andre [Fri, 5 Jul 2013 15:18:54 +0000 (15:18 +0000)]
MFC r242253:

 Simplify implementation of net.inet.tcp.reass.maxsegments and
 net.inet.tcp.reass.cursegments.

MFC r242254:

 Change the syncache count reporting the current number of entries
 from an unprotected u_int that reports garbage on SMP to a function
 based sysctl obtaining the current value from UMA.

 Also read back the actual cache_limit after page size rounding by UMA.
 PR: kern/165879

MFC r244680:

 Fix sysctl_handle_int() usage. Either arg1 or arg2 should be supplied,
 and arg2 doesn't pass size of arg1.

MFC r246208:

 uma_zone_set_max() directly returns the rounded effective zone
 limit.  Use the return value directly instead of doing a second
 uma_zone_set_max() step.

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

10 years agoMFC r242266:
andre [Fri, 5 Jul 2013 14:58:24 +0000 (14:58 +0000)]
MFC r242266:

 Increase the initial CWND to 10 segments as defined in IETF TCPM
 draft-ietf-tcpm-initcwnd-05. It explains why the increased initial
 window improves the overall performance of many web services without
 risking congestion collapse.

 As long as it remains a draft it is placed under a sysctl marking it
 as experimental:
  net.inet.tcp.experimental.initcwnd10 = 1
 When it becomes an official RFC soon the sysctl will be changed to
 the RFC number and moved to net.inet.tcp.

 This implementation differs from the RFC draft in that it is a bit
 more conservative in the case of packet loss on SYN or SYN|ACK because
 we haven't reduced the default RTO to 1 second yet.  Also the restart
 window isn't yet increased as allowed.  Both will be adjusted with
 upcoming changes.

 Is is enabled by default.  In Linux it is enabled since kernel 3.0.

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

10 years agoMFC r226447:
andre [Fri, 5 Jul 2013 14:50:06 +0000 (14:50 +0000)]
MFC r226447:

 Remove the ss_fltsz and ss_fltsz_local sysctl's which have
 long been superseded by the RFC3390 initial CWND sizing.

 Also remove the remnants of TCP_METRICS_CWND which used the
 TCP hostcache to set the initial CWND in a non-RFC compliant
 way.

MFC r242249:

 Adjust the initial default CWND upon connection establishment to the
 new and increased values specified by RFC5681 Section 3.1.

 The even larger initial CWND per RFC3390, if enabled, is not affected.

MFC r242250:

 When SYN or SYN/ACK had to be retransmitted RFC5681 requires us to
 reduce the initial CWND to one segment.  This reduction got lost
 some time ago due to a change in initialization ordering.

 Additionally in tcp_timer_rexmt() avoid entering fast recovery when
 we're still in TCPS_SYN_SENT state.

MFC r242255:

 Allow arbitrary MSS sizes and don't mind about the cluster size anymore.
 We've got more cluster sizes for quite some time now and the orginally
 imposed limits and the previously codified thoughts on efficiency gains
 are no longer true.

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

10 years agoMFC r249317:
andre [Fri, 5 Jul 2013 14:30:54 +0000 (14:30 +0000)]
MFC r249317:

 Fix a race condition on tcp listen socket teardown with pending
 connections in the accept queue and contiguous new incoming SYNs.

 Compared to the original submitters patch I've moved the test
 next to the SYN handling to have it together in a logical unit
 and reworded the comment explaining the issue.

 Submitted by: Matt Miller <matt@matthewjmiller.net>
 Submitted by: Juan Mojica <jmojica@gmail.com>
 Reviewed by: Matt Miller (changes)
 Tested by: pho

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

10 years agoMFC r249809:
andre [Fri, 5 Jul 2013 14:24:37 +0000 (14:24 +0000)]
MFC r249809:

 When doing RFC3042 limited transmit on the first on second
 duplicate ACK make sure we actually have new data to send.
 This prevents us from sending unneccessary pure ACKs.

 Reported by: Matt Miller <matt@matthewjmiller.net>

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

10 years agoMFC r242309:
andre [Fri, 5 Jul 2013 14:18:09 +0000 (14:18 +0000)]
MFC r242309:

 Fix a couple of soreceive_stream() issues.

 Submitted by: trociny

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

10 years agoMFC r243627, r243638:
andre [Fri, 5 Jul 2013 14:12:26 +0000 (14:12 +0000)]
MFC r243627, r243638:

 Fix a race on listen socket teardown where while draining the
 accept queues a new socket/connection may be added to the queue
 due to a race on the ACCEPT_LOCK.

 The submitted patch is slightly changed in comments, teardown
 and locking order and extended with KASSERT's.

 Submitted by: Vijay Singh <vijju.singh-at-gmail-dot-com>
 Found by: His team.

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

10 years agoMFC r242306, r250365:
andre [Fri, 5 Jul 2013 14:08:36 +0000 (14:08 +0000)]
MFC r242306, r250365:

 Add logging for socket attach failures in sonewconn() during accept(2).
 Include the pointer to the PCB so it can be attributed to a particular
 application by corresponding it to "netstat -A" output.

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

10 years agoMFC r291296, r291297, r291393:
andre [Fri, 5 Jul 2013 13:48:32 +0000 (13:48 +0000)]
MFC r291296, r291297, r291393:

 Allow drivers to specify a maximum TSP length in bytes if they
 are limited in the amount of data they can handle at once.

 Apply this to the netfront driver.

 Spare fields in struct tcpcb and struct ifnet are used to keep
 the structure sizes the same.

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

10 years agoMFC r250963, r251013, r251056: Driver 'aacraid' added to support Adaptec by PMC RAID...
achim [Fri, 5 Jul 2013 09:36:09 +0000 (09:36 +0000)]
MFC r250963, r251013, r251056: Driver 'aacraid' added to support Adaptec by PMC RAID controller families Series 6, 7, 8 and upcoming products.

Approved by: emaste (co-mentor)

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

10 years agoFinish MFC of r248291,249741:
marck [Fri, 5 Jul 2013 08:16:40 +0000 (08:16 +0000)]
Finish MFC of r248291,249741:

Change 'status' command to produce one-line easy-parseable output.

Approved by: trociny

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

10 years agoMFC r252523:
delphij [Fri, 5 Jul 2013 04:24:21 +0000 (04:24 +0000)]
MFC r252523:

When listing with -f, skip all memory disks that are not vnode-backed.

Noticed by: kevlo

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

10 years agoMFC r252360:
delphij [Fri, 5 Jul 2013 04:22:40 +0000 (04:22 +0000)]
MFC r252360:

Don't attempt to do DHCP on certain interfaces, similar to what's done for
ipv6_autoconfif() in r212577.

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

10 years agoMFC r252218:
delphij [Fri, 5 Jul 2013 04:16:03 +0000 (04:16 +0000)]
MFC r252218:

Diff reduction against Illumos, no real change to code itself.

This marks vendor branch revision 252213 as merged, the actual code was
committed in r245479.

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

10 years agoMFC r251646 + r252219:
delphij [Fri, 5 Jul 2013 04:08:45 +0000 (04:08 +0000)]
MFC r251646 + r252219:

MFV r251644:

Poor ZFS send / receive performance due to snapshot
hold / release processing (by smh@)

Illumos ZFS issues:
3740 Poor ZFS send / receive performance due to snapshot
     hold / release processing

MFV r252215:

Restore a previous behavior before r251646, where when destructing
ZFS snapshot, the ioctl would return ENOENT when it hit any of
them in the errlist (the new behavior was only return ENOENT when
all returns error).

Illumos ZFS issues:
  3829 fix for 3740 changed behavior of zfs destroy/hold/release ioctl

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

10 years agoMFC r251636: illumos #3749 zfs event processing should work on R/O root
delphij [Fri, 5 Jul 2013 04:01:25 +0000 (04:01 +0000)]
MFC r251636: illumos #3749 zfs event processing should work on R/O root
filesystems

This log is a modified version of the original one written by gibbs@,
to account for changes made during the illumos RTI process.

Allow ZFS asynchronous event handling to proceed even if the root file
system is mounted read-only.  This restriction appears to have been put
in place to avoid errors with updating the configuration cache file.
However:

 o The majority of asynchronous event handling does not involve
   configuration cache file updates.
 o The configuration cache file need not be on the root file system,
   so the check was not complete.
 o Other classes of errors (e.g. file system full) can also prevent
   a successful update yet do not prevent asynchronous event processing.
 o Configurations such as NanoBSD never have a read-write root,
   so ZFS event processing is permanently disabled in these systems.
 o Failure to handle asynchronous events promptly can extend the
   window of time that a pool is in a critical state.

At worst, a missed configuration cache update will force the operator to
perform a manual "zfs import" (note -f is not required) to inform the
system about a newly created pool.  To minimize the likelihood of this
rare occurrence, configuration cache write failures now emit FMA events
(via devctl) so the operator can take corrective action, and the write
is retried every 5 minutes.  The retry interval, in seconds, is tunable
via the sysctl "vfs.zfs.ccw_retry_interval".

As a side effect of reporting configuration cache events, other sysevents,
such as re-silver start/stop, are now also reported via devctl.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c:
o As is done in zfs_fm.c, provide a manual declaration for
  devctl_notify().  Both declarations could be combined
  into spa_impl.h, but the declaration is fault management
  related, not spa specific.  sys/fm/fs/zfs.h would be ideal
  if it weren't so public and reserved for FMA string
  definitions.  I'm open to suggestions on how to improve
  this nit while minimizing our divergence from Solaris.
o Use devctl_notify() to implement sysevent support in
  spa_event_notify().  The subsystem is EC_ZFS so that
  these events can never collide with those emitted in
  zfs_fm.c.
o Add the sysctl "vfs.zfs.ccw_retry_interval".  The value
  defaults to 5 minutes and is used to rate limit, on a
  per-pool basis, configuration cache file write attempts.
o Modify spa_async_dispatch to honor configuration cache
  write limiting.  If other events are pending, a configuration
  cache write will be attempted at the same time, so the
  rate limiting only applies when the asynchronous dispatch
  system is otherwise idle.  Async events should be rare
  (e.g. device arrival/departure) and configuration cache
  writes rarer, so a more complicated system to strictly
  honor the retry limit seems unwarranted.
o Remove check in spa_async_dispatch() for the root file
  system being read-write.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c:
Instead of silently ignoring configuration cache write
failures, report them via a new FMA event as well as
to the console.  The current zfs_ereport_post() doesn't
allow arbitrary name=value pairs to be appended to the
report, so the configuration cache file name is only
available on the console output.  This limitation should
be addressed in a future update.

Note: This error report is only posted once per incident,
to avoid spamming.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h:
Add a hrtime_t to the spa data structure to track the
time (via gethrtime()) of the last configuration cache file
write failure.  This is referenced in spa_async_dispatch()
to effect the rate limiting.

sys/cddl/contrib/opensolaris/uts/common/sys/fm/fs/zfs.h:
  Add FM_EREPORT_ZFS_CONFIG_CACHE_WRITE as an ereport class.

Submitted by: gibbs
Reviewed by: Matthew Ahrens <mahrens@delphix.com>,
Eric Schrock <eric.schrock@delphix.com>,
Christopher Siden <christopher.siden@delphix.com>
Sponsored by: Spectra Logic

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

10 years agoMFC r251635: illumos #3747 txg commit callbacks don't work
delphij [Fri, 5 Jul 2013 03:54:13 +0000 (03:54 +0000)]
MFC r251635: illumos #3747 txg commit callbacks don't work

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c:
Fix commit callbacks by moving them to the task's list.
Previously, list_move_tail() returned without doing anything because
the task list was passed as the source rather than destination.

cddl/contrib/opensolaris/cmd/ztest/ztest.c:
Check the commit callback threshold correctly.

Submitted by: will
Reviewed by: Matthew Ahrens <mahrens@delphix.com>,
Christopher Siden <christopher.siden@delphix.com>
Sponsored by: Spectra Logic

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

10 years agoMFC r251634: illumos #3745 zpool create should treat -O mountpoint and -m the same
delphij [Fri, 5 Jul 2013 03:49:52 +0000 (03:49 +0000)]
MFC r251634: illumos #3745 zpool create should treat -O mountpoint and -m the same

cddl/contrib/opensolaris/cmd/zpool/zpool_main.c:  (change 644608)
This allows specifying a mountpoint using the latter form and having
its value checked and used as it would be using the former form.

As a consequence of this change:

1. The mountpoint property is set in the fsprops nvlist prior
   to creating the pool, rather than being set after creating
   the pool.  To me, this is the proper approach, since it
   avoids creating the pool if the mountpoint setting would
   cause the command to fail.
2. The mountpoint property, unlike all others, can be specified
   more than once.  Only the last setting takes effect.  This
   is to avoid breaking potential existing users that specify
   -m more than once.

Submitted by: will

cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
Fix "zpool create -R <whatever> -m <whatever>".  Ever since
change 644608, this has been broken.  The problem is that some
old code in libzfs_pool.c would force a pool's mountpoint to
"/" when creating a pool with an altroot.  That probably
implemented some old policy decision regarding altroots, but it
conflicts with the current manpage.  It also had no effect
until 644608, because the zpool command would _always_ change
the pool's mountpoint after creating it.  The solution is to
delete the old code from libzfs_pool.c.

Submitted by: asomers

Reviewed by: Matthew Ahrens <mahrens@delphix.com>,
Christopher Siden <christopher.siden@delphix.com>
Sponsored by: Spectra Logic

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

10 years agoMFC r251633: illumos #3744 zfs shouldn't ignore errors unmounting
delphij [Fri, 5 Jul 2013 03:44:08 +0000 (03:44 +0000)]
MFC r251633: illumos #3744 zfs shouldn't ignore errors unmounting
snapshots

Propagate errors from zfs_unmount_snap() up to its callers wherever
feasible.

Submitted by: will
Reviewed by: Matthew Ahrens <mahrens@delphix.com>,
Christopher Siden <christopher.siden@delphix.com>
Sponsored by: Spectra Logic

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

10 years agoMFC r251632: illumos #3743 zfs needs a refcount audit
delphij [Fri, 5 Jul 2013 03:38:06 +0000 (03:38 +0000)]
MFC r251632: illumos #3743 zfs needs a refcount audit

Audit zap cursor usage and correct missing calls to zap_cursor_fini().

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_errlog.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c:
Correct early exit handling of several functions that
previously failed to close a cursor prior to returning.

Submitted by: gibbs

Audit holders of dmu_bufs and correct missing calls to dmu_buf_rele().

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c:
Correct early exit handling of several functions that
previously failed to release a dmu_buf prior to returning.

Submitted by: will

Reviewed by: Matthew Ahrens <mahrens@delphix.com>,
Eric Schrock <eric.schrock@delphix.com>,
George Wilson <george.wilson@delphix.com>,
Christopher Siden <christopher.siden@delphix.com>
Sponsored by: Spectra Logic

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

10 years agoMFC r251631: illumos #3742 zfs comments need cleaner, more consistent style
delphij [Fri, 5 Jul 2013 03:05:59 +0000 (03:05 +0000)]
MFC r251631: illumos #3742 zfs comments need cleaner, more consistent style

- Make more of ZFS's comments use a natural English writing flow.
- Break up long paragraphs, fix various typos and spelling errors.
- Don't prefix a function description with its name when the function
  definition immediately follows.
- Remove useless comments.
- Add extra whitespace where it makes the comments more readable.

New comments were separated from this change and added in r251629.

Submitted by: asomers, gibbs, will
Reviewed by: Matthew Ahrens <mahrens@delphix.com>,
George Wilson <george.wilson@delphix.com>,
Eric Schrock <eric.schrock@delphix.com>,
Christopher Siden <christopher.siden@delphix.com>
Sponsored by: Spectra Logic

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

10 years agoMFC r251629: 3741 zfs needs better comments
delphij [Fri, 5 Jul 2013 03:01:35 +0000 (03:01 +0000)]
MFC r251629: 3741 zfs needs better comments

Embellish the comments in various components of ZFS.  Move some comments
around closer to what they describe.  Specifically, answer the questions:

- What are some of the edge cases of the dbuf state machine?
- What does a txg quiesce do?
- When does the DMU notify threads waiting on txg's that they may
  proceed?
- How do the calculations for RAIDZ map allocations work?
- What process do the RAIDZ I/O start and done callbacks follow?

While here, adjust the function prototype of dmu_zfetch.c:dmu_zfetch_colinear()
to match its comment which describes its return as a boolean.

Submitted by: asomers, gibbs, will
Reviewed by: Matthew Ahrens <mahrens@delphix.com>,
Eric Schrock <eric.schrock@delphix.com>,
Christopher Siden <christopher.siden@delphix.com>
Sponsored by: Spectra Logic

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

10 years agoMerge r252230:
rpaulo [Fri, 5 Jul 2013 02:06:59 +0000 (02:06 +0000)]
Merge r252230:

  Implement ifconfig_wlanX="HOSTAP".

  Not only this is a bit cleaner, it allows multiple instances of hostapd to be
  running on the system host, useful for simultaneous dual-band WiFi.
  This is similar to ifconfig_wlanX="WPA" but it uses /etc/hostapd-wlanX.conf.
  Compatibility with hostapd_enable=YES/NO was kept.

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

10 years agoMFC: r252067
rmacklem [Fri, 5 Jul 2013 01:22:37 +0000 (01:22 +0000)]
MFC: r252067
Since some NFSv4 servers enforce the requirement for a reserved port#,
enable use of the (no)resvport mount option for NFSv4. I had thought
that the RFC required that non-reserved port #s be allowed, but I couldn't
find it in the RFC.

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

10 years agoMFC r252387:
dim [Thu, 4 Jul 2013 22:09:14 +0000 (22:09 +0000)]
MFC r252387:

Make libsupc++'s __cxa_call_terminate() prototype consistent with the
definition.

Submitted by: dt71@gmx.com

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

10 years agoMFC r249940:
smh [Thu, 4 Jul 2013 21:57:09 +0000 (21:57 +0000)]
MFC r249940:
Teach GEOM and CAM about the difference between the max "size" of r/w and delete
requests.

MFC r252657:
Bump disk(9) ABI version to signify the addition of d_delmaxsize.

Make the addition of the d_delmaxsize binary compatible.  This allows storage
drivers compiled for 9.0 and 9.1 to work by preserving the ABI for disks.

Reviewed by: mav

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

10 years agoMerge clang 3.3 release and various fixes: r241214, r246705, r248548,
dim [Thu, 4 Jul 2013 20:17:04 +0000 (20:17 +0000)]
Merge clang 3.3 release and various fixes: r241214, r246705, r248548,
r249423, r249817, r250217, r250593, r250616, r250997, r251216, r251662,
r251761, r251785, r251790, r252039.

MFC r241214 (by jkim):
  Do not install incomplete unwind.h from clang.  This header file was meant
  to be a wrapper for the canonical system header file.  Unfortunately, we do
  not have one (yet) and some times it is causing weird failures when clang
  is used for building ports.  More complete and correct file will come from
  libcxxrt in the future.

  Discussed with: dim, kib, theraven

MFC r246705 (by andrew):
  Allow us to build clang for ARM EABI. Clang and llvm use the
  arm-gnueabi-freebsd10.0 triple for EABI. Use this when we are on arm or
  armv6 and are building for EABI.

  Reviewed by: dim

MFC r248548 (by andrew):
  Pull in r177252 from upstream clang trunk:

   Make sure to use same EABI version for external assembler as for
   integrated as.

  This allows us to use gcc on a world built with clang on ARM.

MFC r249423:
  Upgrade our copy of llvm/clang to trunk r178860, in preparation of the
  upcoming 3.3 release (branching and freezing expected in a few weeks).

  Preliminary release notes can be found at the usual location:
  <http://llvm.org/docs/ReleaseNotes.html>

  An MFC is planned once the actual 3.3 release is finished.

MFC r249817:
  Pull in r180121 from upstream llvm trunk:

    LoopVectorizer: Fix 15830. When scalarizing and unrolling stores make
    sure that the order in which the elements are scalarized is the same
    as the original order.
    This fixes a miscompilation in FreeBSD's regex library.

  This should fix lib/libc/regex/regcomp.c at -O3 with clang 3.3 r178860
  on CPUs with SSE.  Before this change, the vectorizer could incorrectly
  rearrange the second loop in computejumps(), leading to possibly invalid
  entries in the re_gets::charjump table.

  The net result was that for example "sed s/@CC@/foo/" failed to work
  correctly, leading to trouble with many configure scripts.

MFC r250217:
  Allow building clang on older FreeBSD releases, where log2() does not
  exist yet.  With this change, I have verified that building head on
  8.1-RELEASE works.

  Noticed by: Ryan Stone <rysto32@gmail.com>

MFC r250593:
  Pull in r181286 from upstream llvm trunk:

    LoopVectorize: getConsecutiveVector must respect signed arithmetic

    We were passing an i32 to ConstantInt::get where an i64 was needed and we must
    also pass the sign if we pass negatives numbers. The start index passed to
    getConsecutiveVector must also be signed.

    Should fix PR15882.

  This should fix Firefox crashes some people have been reporting, when it
  is compiled with -O3.

MFC r250616:
  Use an ugly hack to get around bootstrapping problems when building
  clang on head between r239347 and r245428.

  The former revision introduced CLOCK_PROCESS_CPUTIME_ID as a clock id
  for the clock_gettime() function and friends, but it was only added in
  <sys/time.h>, not in <time.h>.  Any program including <time.h> would
  therefore not be able to use CLOCK_PROCESS_CPUTIME_ID, even though the
  value of _POSIX_CPUTIME indicates its existence.  The latter revision
  synchronized the defines again.

  Work around this problem by defining the id on the command line for the
  particular .cpp file that needs it.  If the id ever changes value, this
  hack will need to be updated.

MFC r250997:
  Pull in r182656 from upstream llvm trunk:

    LoopVectorize: LoopSimplify can't canonicalize loops with an
    indirectbr in it, don't assert on those cases.

    Fixes PR16139.

  This should fix clang assertion failures when optimizing at -O3, similar
  to:

    Assertion failed: (TheLoop->getLoopPreheader() && "No preheader!!"),
    function canVectorize, file
    contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp, line 2171.

  Reported by: O. Hartmann <ohartman@zedat.fu-berlin.de>
  PR: ports/178332, ports/178977

MFC r251216 (by ed):
  Pull in r183033 and r183036 from LLVM trunk:

    Add support for optimized (non-generic) atomic libcalls.

    For integer types of sizes 1, 2, 4 and 8, libcompiler-rt (and libgcc)
    provide atomic functions that pass parameters by value and return
    results directly.

    libgcc and libcompiler-rt only provide optimized libcalls for
    __atomic_fetch_*, as generic libcalls on non-integer types would make
    little sense. This means that we can finally make __atomic_fetch_*
    work
    on architectures for which we don't provide these operations as
    builtins
    (e.g. ARM).

    This should fix the dreaded "cannot compile this atomic library call
    yet" error that would pop up once every while.

  This should make it possible for me to get C11 atomics working on all of
  our platforms.

MFC r251662:
  Upgrade our copy of llvm/clang to 3.3 release.

  Release notes are still in the works, these will follow soon.

MFC r251761:
  Pull in r181620 from llvm trunk:

    [ms-inline asm] Fix a crasher when we fail on a direct match.

    The issue was that the MatchingInlineAsm and VariantID args to the
    MatchInstructionImpl function weren't being set properly.  Specifically, when
    parsing intel syntax, the parser thought it was parsing inline assembly in the
    at&t dialect; that will never be the case.

    The crash was caused when the emitter tried to emit the instruction, but the
    operands weren't set.  When parsing inline assembly we only set the opcode, not
    the operands, which is used to lookup the instruction descriptor.
    rdar://13854391 and PR15945

    Also, this commit reverts r176036.  Now that we're correctly parsing the intel
    syntax the pushad/popad don't match properly.  I've reimplemented that fix using
    a MnemonicAlias.

  Pull in r183907 from llvm trunk:

    X86: Make the cmov aliases work with intel syntax too.

  These commits make a number of Intel-style inline assembly mnemonics
  aliases (occurring in several ports) work properly, which could cause
  assertions otherwise.

  Reported by: kwm, bapt

MFC r251785 (by ed)
  Pull in r184040 from upstream clang trunk:

    Emit native implementations of atomic operations on FreeBSD/armv6.

    Just like on Linux, FreeBSD/armv6 assumes the system supports
    ldrex/strex unconditionally. It is also used by the kernel. We can
    therefore enable support for it, like we do on Linux.

    While there, change one of the unit tests to explicitly test against
    armv5 instead of armv7, as it actually tests whether libcalls are
    emitted.

MFC r251790 (by andrew):
  Pull in r183926 from LLVM trunk:

    Allow clang to build __clear_cache on ARM.

    __clear_cache is special. It needs no signature, but is a real function in
    compiler_rt or libgcc.

    Patch by Andrew Turner.

  This allows us to build the __clear_cache function in compiler-rt.

MFC r252039:
  Pull in r183984 from llvm trunk:

    Make PrologEpilogInserter save/restore all callee saved registers in
    functions which call __builtin_unwind_init()

    __builtin_unwind_init() is an undocumented gcc intrinsic which has
    this effect, and is used in libgcc_eh.

    Goes part of the way toward fixing PR8541.

  This obsoletes the ugly hack to libgcc's unwind code from r245272, and
  should also work for other arches, so revert the hack too.

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

10 years agoMFC r240780, r252468:
mav [Thu, 4 Jul 2013 15:21:27 +0000 (15:21 +0000)]
MFC  r240780, r252468:
Make nfs_readdir() more careful about using response data, cached in global
buffer. For now it fixes bug when following `ls` command will return data
from previous one aborted by pager. Also it should allow to read several
directories same time, for example, for recursive tracerse.

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

10 years agoMFC r240774:
mav [Thu, 4 Jul 2013 15:19:45 +0000 (15:19 +0000)]
MFC r240774:
Don't use global nfs_root_node variable as per-file storage. There are
fields that should be file-specific.

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

10 years agoProtect the #define MALLOC_PRODUCTION directive in case it was also
des [Thu, 4 Jul 2013 14:26:42 +0000 (14:26 +0000)]
Protect the #define MALLOC_PRODUCTION directive in case it was also
defined on the command line (due to MALLOC_PRODUCTION=yes in src.conf).

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

10 years agoMFC r252028:
ae [Thu, 4 Jul 2013 08:59:34 +0000 (08:59 +0000)]
MFC r252028:
  Use corresponding macros to update statistics for AH, ESP, IPIP, IPCOMP,
  PFKEY.

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

10 years agoMFC r252026:
ae [Thu, 4 Jul 2013 08:57:13 +0000 (08:57 +0000)]
MFC r252026:
  Use IPSECSTAT_INC() and IPSEC6STAT_INC() macros for ipsec statistics
  accounting.

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

10 years agoMFC r252364:
pfg [Thu, 4 Jul 2013 01:40:32 +0000 (01:40 +0000)]
MFC r252364:

Bring some updates from ufs/ufs_lookup to ext2fs.

Don't set IN_CHANGE and IN_UPDATE on inodes for potentially suspended
file systems.

Only set i_offset in the parent directory's i-node during a lookup for
non-LOOKUP operations.
Relax a VOP assertion for a DELETE lookup.

Move the code from ufs_lookup.c used to do dotdot lookup, into
the helper function. It is supposed to be useful for any filesystem
that has to unlock dvp to walk to the ".." entry in lookup routine.

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

10 years agoMFC: r252483
rmacklem [Thu, 4 Jul 2013 01:22:52 +0000 (01:22 +0000)]
MFC: r252483
Document that NFSv4 mounts won't work if hostid_enable="NO" is set
in /etc/rc.conf because the host uuid is used to uniquely identify
the client to the server.
This is a content change.

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

10 years agoMFC: r252139
rmacklem [Thu, 4 Jul 2013 01:18:38 +0000 (01:18 +0000)]
MFC: r252139
Document the "-o" option added by r252138.
This is a content change.

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

10 years agoMFC: r252138
rmacklem [Thu, 4 Jul 2013 01:15:44 +0000 (01:15 +0000)]
MFC: r252138
Add a new "-o" option to the gssd which forces gss_init_sec_context()
to use DES and the associated old style GSS initialization token.
This appears to be required for some non-FreeBSD servers to
get a kerberized NFS mount to work. Also, ignore some signals when daemonized,
which might fix the gssd from "disappearing" without leaving a core dump.
Given the tight timeframe for the FreeBSD9.2 release, I have
committed this while waiting for code review. I will commit
changes recommended by the review in a separate commit.

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

10 years agoMFC r252278:
jimharris [Thu, 4 Jul 2013 00:16:43 +0000 (00:16 +0000)]
MFC r252278:

  Add firmware replacement and activation support to nvmecontrol(8) through
  a new firmware command.

  NVMe controllers may support up to 7 firmware slots for storing of
  different firmware revisions.  This new firmware command supports
  firmware replacement (i.e. firmware download) with or without immediate
  activation, or activation of a previously stored firmware image.  It
  also supports selection of the firmware slot during replacement
  operations, using IDENTIFY information from the controller to
  check that the specified slot is valid.

  Newly activated firmware does not take effect until the new controller
  reset, either via a reboot or separate 'nvmecontrol reset' command to the
  same controller.

Submitted by: Joe Golio <joseph.golio@emc.com>
Obtained from: EMC / Isilon Storage Division

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

10 years agoMFC r252277:
jimharris [Thu, 4 Jul 2013 00:06:11 +0000 (00:06 +0000)]
MFC r252277:

  Add log page support to nvmecontrol(8) through a new logpage command.

  This includes pretty printers for all of the standard NVMe log pages
  (Error, SMART/Health, Firmware), as well as hex output for non-standard
  or vendor-specific log pages.

Also add missing static keyword that glebius@ fixed as part of r252302.

Submitted by: Joe Golio <joseph.golio@emc.com>
Obtained from: EMC / Isilon Storage Division

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

10 years agoMFC r252275:
jimharris [Thu, 4 Jul 2013 00:03:30 +0000 (00:03 +0000)]
MFC r252275:

  Add generalized helper functions for printing hex data as part of
  nvmecontrol commands.

Submitted by: Joe Golio <joseph.golio@emc.com>
Obtained from: EMC / Isilon Storage Division

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

10 years agoMFC r252274:
jimharris [Thu, 4 Jul 2013 00:00:59 +0000 (00:00 +0000)]
MFC r252274:

  Ensure that a device node is specified when invoking the identify or reset
  commands.

  Also improve the checking of device node names, so that better error
  messages are displayed when incorrect names are specified.

Sponsored by: Intel

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

10 years agoMFC r252273:
jimharris [Wed, 3 Jul 2013 23:59:08 +0000 (23:59 +0000)]
MFC r252273:

  Remove remaining uio-related code.

  The nvme_physio() function was removed quite a while ago, which was the
  only user of this uio-related code.

Sponsored by: Intel

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

10 years agoMFC r252272:
jimharris [Wed, 3 Jul 2013 23:58:09 +0000 (23:58 +0000)]
MFC r252272:

  Fail any passthrough command whose transfer size exceeds the controller's
  max transfer size.  This guards against rogue commands coming in from
  userspace.

  Also add KASSERTS for the virtual address and unmapped bio cases, if the
  transfer size exceeds the controller's max transfer size.

Sponsored by: Intel

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

10 years agoMFC r252271:
jimharris [Wed, 3 Jul 2013 23:56:41 +0000 (23:56 +0000)]
MFC r252271:

  Use MAXPHYS to specify the maximum I/O size for nvme(4).

  Also allow admin commands to transfer up to this maximum I/O size, rather
  than the artificial limit previously imposed.  The larger I/O size is very
  beneficial for upcoming firmware download support.  This has the added
  benefit of simplifying the code since both admin and I/O commands now use
  the same maximum I/O size.

Sponsored by: Intel

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

10 years agoMFC r252270:
jimharris [Wed, 3 Jul 2013 23:54:36 +0000 (23:54 +0000)]
MFC r252270:

  Create #defines for NVME_CTRLR_PREFIX and NVME_NS_PREFIX for the "nvme"
  and "ns" strings, rather than hardcoding the string values throughout the
  nvmecontrol code base.

Sponsored by: Intel

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

10 years agoMFC r252269:
jimharris [Wed, 3 Jul 2013 23:53:28 +0000 (23:53 +0000)]
MFC r252269:

  Add an nvme_function structure array, defining the name, C function and
  usage message for each nvmecontrol command.  This helps reduce some code
  clutter both now and for future commits which will add logpage and
  firmware support to nvmecontrol(8).

  Also move helper function prototypes to the end of the header file, after
  the per-command functions.

Also add missing static keyword that glebius@ fixed as part of r252302.

Sponsored by: Intel

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

10 years agoMFC r252268:
jimharris [Wed, 3 Jul 2013 23:51:03 +0000 (23:51 +0000)]
MFC r252268:

  Break out code related to the reset command into a separate source file.

Sponsored by: Intel

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

10 years agoMFC r252267:
jimharris [Wed, 3 Jul 2013 23:48:58 +0000 (23:48 +0000)]
MFC r252267:

  Break out code related to the perftest command into a separate file.

Sponsored by: Intel

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

10 years agoMFC r252266:
jimharris [Wed, 3 Jul 2013 23:47:23 +0000 (23:47 +0000)]
MFC r252266:

  Break out code related to the identify command into a separate source file.

Sponsored by: Intel

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

10 years agoMFC r252265:
jimharris [Wed, 3 Jul 2013 23:45:58 +0000 (23:45 +0000)]
MFC r252265:

  Break out code related to the devlist command into a separate source file.

Sponsored by: Intel

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

10 years agoMFC r252264:
jimharris [Wed, 3 Jul 2013 23:42:12 +0000 (23:42 +0000)]
MFC r252264:

  Add separate *_usage() functions for each nvmecontrol command.

Sponsored by: Intel

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