]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
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

10 years agoMFC r252263:
jimharris [Wed, 3 Jul 2013 23:40:43 +0000 (23:40 +0000)]
MFC r252263:

  Add an open_dev() helper function to be used in the various places
  where nvmecontrol needs to open a handle to a controller or namespace
  device node.

Sponsored by: Intel

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

10 years agoMFC r252262:
jimharris [Wed, 3 Jul 2013 23:29:40 +0000 (23:29 +0000)]
MFC r252262:

  For ATA_PASSTHROUGH commands, pretend isci(4) supports multiword DMA
  by treating it as UDMA.

  This fixes a problem introduced in r249933/r249939, where CAM sends
  ATA_DSM_TRIM to SATA devices using ATA_PASSTHROUGH_16.  scsi_ata_trim()
  sets protocol as DMA (not UDMA) which is for multi-word DMA, even
  though no such mode is selected for the device.  isci(4) would fail
  these commands which is the correct behavior but not consistent with
  other HBAs, namely LSI's.

  smh@ did some further testing on an LSI controller, which rejected
  ATA_PASSTHROUGH_16 commands with mode=UDMA_OUT, even though only
  a UDMA mode was selected on the device.  So this precludes adding
  any kind of mode detection in CAM to determine which mode to use on
  a per-device basis.

Sponsored by: Intel

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

10 years agoMFC r242726 (ambrisko):
markj [Wed, 3 Jul 2013 23:15:30 +0000 (23:15 +0000)]
MFC r242726 (ambrisko):
Add support for SCSI pass through devices to be attached and detached.

MFC r251172 (sbruno):
xpt_create_path() requires mfi_io_lock to be held, so do it.

mfi(4) doesn't panic on host startup now.

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

10 years agoReally MFC r252363 (sysconf(3) returns a long, not an int).
obrien [Wed, 3 Jul 2013 22:57:20 +0000 (22:57 +0000)]
Really MFC r252363 (sysconf(3) returns a long, not an int).

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

10 years agoMFC: r252348, r252363: sysconf(3) returns a long, not an int.
obrien [Wed, 3 Jul 2013 22:25:00 +0000 (22:25 +0000)]
MFC: r252348, r252363: sysconf(3) returns a long, not an int.

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

10 years agoMFC r251181: fork(2): #include <sys/types.h> is not needed.
jilles [Wed, 3 Jul 2013 22:14:12 +0000 (22:14 +0000)]
MFC r251181: fork(2): #include <sys/types.h> is not needed.

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

10 years agoMFC r248774: accept(2): Mention inheritance of O_ASYNC and signal
jilles [Wed, 3 Jul 2013 22:04:35 +0000 (22:04 +0000)]
MFC r248774: accept(2): Mention inheritance of O_ASYNC and signal
destination.

While almost nobody uses O_ASYNC, and rightly so, the inheritance of the
related properties across accept() is a portability issue like the
inheritance of O_NONBLOCK.

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

10 years agoMFC r248349: sh: Recognize "--" and explicitly reject options in wait
jilles [Wed, 3 Jul 2013 21:56:25 +0000 (21:56 +0000)]
MFC r248349: sh: Recognize "--" and explicitly reject options in wait
builtin.

If syntactically invalid job identifiers are to be taken as jobs that exited
with status 127, this should not apply to options, so that we can add
options later if need be.

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

10 years agoMFC r245383,245392,247190,249220,251180,251797: New sh testcases.
jilles [Wed, 3 Jul 2013 21:43:41 +0000 (21:43 +0000)]
MFC r245383,245392,247190,249220,251180,251797: New sh testcases.

These already work on stable/9.

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

10 years agoMFC r251763: sh(1): A subshell environment has its own rlimits (ulimit).
jilles [Wed, 3 Jul 2013 21:31:13 +0000 (21:31 +0000)]
MFC r251763: sh(1): A subshell environment has its own rlimits (ulimit).

This has always been the case and is intended (just like cd).

This matches Austin group issue #706.

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

10 years agoMFC r248870 by joel: Minor mdoc fix in previous commit.
jilles [Wed, 3 Jul 2013 21:25:46 +0000 (21:25 +0000)]
MFC r248870 by joel: Minor mdoc fix in previous commit.

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

10 years agoMFC r248692: sh(1): Mention possible ambiguities with $(( and ((.
jilles [Wed, 3 Jul 2013 21:22:47 +0000 (21:22 +0000)]
MFC r248692: sh(1): Mention possible ambiguities with $(( and ((.

In some other shells, things like $((a);(b)) are command substitutions.

Also, there are shells that have an extension ((ARITH)) that evaluates an
arithmetic expression and returns status 1 if the result is zero, 0
otherwise. This extension may lead to ambiguity with two subshells starting
in sequence.

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

10 years agoMFC r251209: test(1): List non-standard primaries.
jilles [Wed, 3 Jul 2013 21:14:57 +0000 (21:14 +0000)]
MFC r251209: test(1): List non-standard primaries.

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

10 years agoMFC r251078,r251433: sleep: Improve nanosleep() error handling:
jilles [Wed, 3 Jul 2013 21:11:56 +0000 (21:11 +0000)]
MFC r251078,r251433: sleep: Improve nanosleep() error handling:

 * Work around kernel bugs that cause a spurious [EINTR] return if a
   debugger (such as truss(1)) is attached.

 * Write an error message if an error other than [EINTR] occurs.

PR: bin/178664

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

10 years agoMFC r250982: sigreturn(2): Remove ancient compatibility warning about 4.2BSD
jilles [Wed, 3 Jul 2013 21:05:35 +0000 (21:05 +0000)]
MFC r250982: sigreturn(2): Remove ancient compatibility warning about 4.2BSD

The HISTORY subsection still says that sigreturn() was added in 4.3BSD.

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

10 years agoFix grammar in a comment.
dteske [Wed, 3 Jul 2013 20:54:25 +0000 (20:54 +0000)]
Fix grammar in a comment.

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

10 years agoMFC r252414:
mjg [Wed, 3 Jul 2013 20:24:37 +0000 (20:24 +0000)]
MFC r252414:
truss: recognize O_DIRECTORY, O_EXEC, O_TTY_INIT and O_CLOEXEC

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

10 years agoMFC: r238051:
obrien [Wed, 3 Jul 2013 19:12:35 +0000 (19:12 +0000)]
MFC: r238051:
     Add "hier" as an alternate spelling of "hierarchy" to match hier(9).

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

10 years agoMFC r252009:
ae [Wed, 3 Jul 2013 13:03:09 +0000 (13:03 +0000)]
MFC r252009:
  Use PIM6STAT_INC() and MRT6STAT_INC() macros for IPv6 multicast
  statistics accounting.

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

10 years agoMFC r252007:
ae [Wed, 3 Jul 2013 13:00:35 +0000 (13:00 +0000)]
MFC r252007:
  Use RIP6STAT_INC() macro for raw ip6 statistics accounting.

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

10 years agoMFC r251995:
ae [Wed, 3 Jul 2013 12:58:17 +0000 (12:58 +0000)]
MFC r251995:
  Use ICMP6STAT_INC() macro for ICMPv6 errors accounting.

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

10 years agoMFC/backport core kernel and userspace parts of r237263 (TCP_OFFLOAD
np [Wed, 3 Jul 2013 09:25:29 +0000 (09:25 +0000)]
MFC/backport core kernel and userspace parts of r237263 (TCP_OFFLOAD
rework).  MFC r237563, r239511, r243603, r245915, r245916, r245919,
r245921, r245922, r245924, r245925, r245932, r245934 too.

Build tested with make universe.

r237263:
- Updated TOE support in the kernel.
...

r237563:
Fix clang warning when compiling iw_cxgb.

r239511:
Correctly handle the case where an inp has already been dropped by the time
the TOE driver reports that an active open failed.  toe_connect_failed is
supposed to handle this but it should be provided the inpcb instead of the
tcpcb which may no longer be around.

r243603:
Make sure that tcp_timer_activate() correctly sees TCP_OFFLOAD (or not).

r245915:
Heed SO_NO_OFFLOAD.

r245916:
Teach toe_4tuple_check() to deal with IPv6 4-tuples too.

r245919:
Add TCP_OFFLOAD hook in syncache_respond for IPv6 too, just like the one
that exists for IPv4.

r245921:
There is no need to call into the TOE driver twice in pru_rcvd (tod_rcvd
and then tod_output right after that).

r245922:
Avoid NULL dereference in nd6_storelladdr when no mbuf is provided.  It
is called this way from a couple of places in the OFED code.  (toecore
calls it too but that's going to change shortly).

r245924:
Move lle_event to if_llatbl.h

lle_event replaced arp_update_event after the ARP rewrite and ended up
in if_ether.h simply because arp_update_event used to be there too.
IPv6 neighbor discovery is going to grow lle_event support and this is a
good time to move it to if_llatbl.h.

The two in-tree consumers of this event - OFED and toecore - are not
affected.

r245925:
Generate lle_event in the IPv6 neighbor discovery code too.

r245932:
Teach toe_l2_resolve to resolve IPv6 destinations too.

r245934:
Add checks for SO_NO_OFFLOAD in a couple of places that I missed earlier
in r245915.

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

10 years agoMFC r252471:
smh [Wed, 3 Jul 2013 08:39:18 +0000 (08:39 +0000)]
MFC r252471:
Remove forced timeout of in-flight commands from mfi_timeout.

While this prevents commands getting stuck forever there is no way to guarantee
that data from the command hasn't been committed to the device.

In addition older mfi firmware has a bug that would cause the controller to
frequently stall IO for over our timeout value, which when combined with
a forced timeout often resulted in panics in UFS; which would otherwise be
avoided when the command eventually completed if left alone.

For reference this timeout issue is resolved in Dell FW package 21.2.1-0000.
Fixed FW package version for none Dell controller will likely vary.

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

10 years agoMFC r252052:
lstewart [Wed, 3 Jul 2013 08:20:40 +0000 (08:20 +0000)]
MFC r252052:

Non-virtualised hhook points are supported as of r251732.

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

10 years agoMFC r251789:
lstewart [Wed, 3 Jul 2013 07:57:22 +0000 (07:57 +0000)]
MFC r251789:

Now that the necessary infrastructure is in place to ensure hhook points which
register after a khelp module will get hooked, move khelp module initialisation
to the earlier SI_SUB_KLD stage.

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

10 years agoMFC r251787:
lstewart [Wed, 3 Jul 2013 06:20:47 +0000 (06:20 +0000)]
MFC r251787:

Move hhook's per-vnet initialisation to an earlier SYSINIT SI_SUB stage to
ensure all per-vnet related hhook initialisation is completed prior to any
virtualised hhook points attempting registration.

vnet_register_sysinit() requires that a stage later than SI_SUB_VNET be chosen.
There are no per-vnet initialisors in the source tree at this time which run
earlier than SI_SUB_INIT_IF. A quick audit of non-virtualised SYSINITs indicates
there are no subsystems pre SI_SUB_MBUF that would likely be interested in
registering a virtualised hhook point.

Settle on SI_SUB_MBUF as hhook's per-vnet initialisation stage as it's the first
overtly network-related initilisation stage to run after SI_SUB_VNET. If a
subsystem that initialises earlier than SI_SUB_MBUF ends up wanting to register
virtualised hhook points in future, hhook's use of SI_SUB_MBUF will need to be
revisited and would probably warrant creating a dedicated SI_SUB_HHOOK which
runs immediately after SI_SUB_VNET.

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

10 years agoMFC r251778:
lstewart [Wed, 3 Jul 2013 05:58:51 +0000 (05:58 +0000)]
MFC r251778:

Cleanup and simplification in khelp_{register|deregister}_helper(). No
functional changes.

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

10 years agoMFC r251774:
lstewart [Wed, 3 Jul 2013 05:48:46 +0000 (05:48 +0000)]
MFC r251774:

Add a private KPI between hhook and khelp that allows khelp modules to insert
hook functions into hhook points which register after the modules were loaded -
potentially useful during boot or if hhook points are dynamically registered.

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

10 years agoMFC r251770:
lstewart [Wed, 3 Jul 2013 05:28:22 +0000 (05:28 +0000)]
MFC r251770:

Internalise handling of virtualised hook points inside
hhook_{add|remove}_hook_lookup() so that khelp (and other potential API
consumers) do not have to care when they attempt to (un)hook a particular hook
point identified by id and type.

Reviewed by: scottl

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

10 years agoMFC r251732,251752:
lstewart [Wed, 3 Jul 2013 04:20:36 +0000 (04:20 +0000)]
MFC r251732,251752:

Add support for non-virtualised hhook points, which are uniquely identified by
type and id, as compared to virtualised hook points which are now uniquely
identified by type, id and a vid (which for vimage is the pointer to the vnet
that the hhook resides in).

All hhook_head structs for both virtualised and non-virtualised hook points
coexist in hhook_head_list, and a separate list is maintained for hhook points
within each vnet to simplify some vimage-related housekeeping.

Reviewed by: scottl

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

10 years agoWhen a previous call to sbsndptr() leaves sb->sb_sndptroff at the start of an
lstewart [Wed, 3 Jul 2013 03:36:36 +0000 (03:36 +0000)]
When a previous call to sbsndptr() leaves sb->sb_sndptroff at the start of an
mbuf that was fully consumed by the previous call, the mbuf ptr returned by the
current call ends up being the previous mbuf in the sb chain to the one that
contains the data we want.

This does not cause any observable issues because the mbuf copy routines happily
walk the mbuf chain to get to the data at the moff offset, which in this case
means they effectively skip over the mbuf returned by sbsndptr().

We can't adjust sb->sb_sndptr during the previous call for this case because the
next mbuf in the chain may not exist yet. We therefore need to detect the
condition and make the adjustment during the current call.

Fix by detecting the special case of moff being at the start of the next mbuf in
the chain and adjust the required accounting variables accordingly.

Reviewed by: andre

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

10 years agoMFC r252380:
mm [Tue, 2 Jul 2013 19:44:02 +0000 (19:44 +0000)]
MFC r252380:
Unbreak "zfs jail" and "zfs unjail" (broken in stable/9 since r249643)

I missed to register zfs_ioc_jail and zfs_ioc_unjail as legacy ioctl's
with the new zfs_ioctl_register_legacy() function.

These operations do not modify pools or datasets so there is no need to
log them to pool history.

Reported by: Alexander Leidinger <netchild@FreeBSD.org> on current@

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

10 years agoMFC r248286 (pjd):
trociny [Tue, 2 Jul 2013 19:29:00 +0000 (19:29 +0000)]
MFC r248286 (pjd):

Removed redundant includes.

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

10 years agoMFC r248294, r248296:
trociny [Tue, 2 Jul 2013 19:27:07 +0000 (19:27 +0000)]
MFC r248294, r248296:

r248294 (pjd):

Delete requests can be larger than MAXPHYS.

r248296 (pjd):

Minor corrections.

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

10 years agoMFC r251961:
kib [Tue, 2 Jul 2013 04:45:51 +0000 (04:45 +0000)]
MFC r251961:
Disable wait for the retrace if KMS is activated.

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

10 years agoMFC r251960:
kib [Tue, 2 Jul 2013 04:42:32 +0000 (04:42 +0000)]
MFC r251960:
Since the gem pagefault handler relocks the vm object lock, other
thread might fault on the same GTT offset meantime and instantiate the
mapping.  Recheck that the mgt device object still does not have a
page at the current offset after relocking, and return a possibly
installed page.

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

10 years agoMFC all cxgbe(4) changes missing from stable/9:
np [Tue, 2 Jul 2013 04:27:16 +0000 (04:27 +0000)]
MFC all cxgbe(4) changes missing from stable/9:
r248925, r249368, r249370, r249376, r249382, r249383, r249385, r249391,
r249392, r249393, r249627, r249629, r250090, r250092, r250093, r250117,
r250218, r250221, r250614, r251213, r251317, r251358, r251434, r251518,
r251638, r252312, r252469, r252470, r250697(kib).

r248925:
Support for Chelsio's 40G Terminator 5 (aka T5) ASIC.
...

r249368:
Set and display the IP fragment bit correctly when dealing with
the filter mode.

r249370:
cxgbe(4): Ensure that the MOD_LOAD handler runs before either t4nex or
t5nex attach to their devices.

r249376:
- Explain clearly why a different firmware is being installed (if/when
  it is being installed).  Improve other error messages while here.

- Select special FPGA specific configuration profile when appropriate.

r249382:
There is no need for elaborate queries and error checking when trying to
set FW4MSG_ENCAP.

r249383:
Get rid of a couple of stray \n's.

r249385:
cxgbe/tom: Slight simplification of code that calculates options2.

r249391:
Auto-reduce the holdoff timers that are greater than the maximum value
allowed by the hardware.

r249392:
Cosmetic change (s/wrwc/wcwr/;s/WRWC/WCWR/).

r249393:
Add pciids of the T5 based cards.  The ones that I haven't tested with
cxgbe(4) are disabled for now.  This will change.

r249627:
cxgbe/tom: Update the CLIP table on the chip when there are changes
to the list of IPv6 addresses on the system.  The table is used for
TOE+IPv6 only.

r249629:
cxgbe(4): Refuse to install T5 firmwares on a T4 card (and vice versa).

r250090:
cxgbe(4): Some updates to shared code.

r250092:
- Provide accurate ifmedia information so that 40G ports/transceivers are
  displayed properly in ifconfig, etc.

- Use the same number of tx and rx queues for a 40G port as for a 10G port.

r250093:
Attach to the T580 (2 x 40G) card.

r250117:
Fix DDP breakage introduced in r248925.  Bitwise OR has higher
precedence than ternary conditional.

r250218:
cxgbe/tom: Do not use M_PROTO1 to mark rx zero-copy mbufs as special.
All the M_PROTOn flags are clobbered when an mbuf is appended to the
socket buffer.

r250221:
cxgbe: Switch to a better way to install firmware.

r250614:
Deal correctly with 40G ports that don't have any transceiver plugged
in.  Do not claim that they have unknown tranceivers.

r251213:
cxgbe(4): Some more debug sysctls.  These work on both T4 and T5 based
cards.

r251317:
cxgbe(4): t4fw_cfg must be explicitly loaded if the driver is being
loaded via loader.conf.

r251358:
cxgbe(4): Provide accurate hit count for filters on T5 cards.  The
location within the TCB and the size have both changed.

r251434:
cxgbe(4): Never install a firmware if hw.cxgbe.fw_install is 0.

r251518:
cxgbe/tom: Fix bad signed/unsigned mixup in the stid allocator.  This
fixes a panic when allocating a mixture of IPv6 and IPv4 stids.

r251638:
cxgbe/tom: Allow caller to select the queue (control or data) used to
send the CPL_SET_TCB_FIELD request in t4_set_tcb_field().

r252312:
Update T5 register ranges.  This is so that regdump skips over registers
with read side-effects.

r252469:
Add a sysctl to get the number of filters available.

sysctl dev.t4nex.<N>.nfilters
sysctl dev.t5nex.<N>.nfilters

r252470:
Count the number of hits for a filter by default.

r250697:
Add dependencies on the firmware, which allows the loading of the cxgb
and cxgbe modules.

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