]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
7 years agoMFC r308687:
kib [Tue, 22 Nov 2016 09:47:22 +0000 (09:47 +0000)]
MFC r308687:
Update hint to utilize user variable.

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

7 years agoMFC r307978:
mckusick [Tue, 22 Nov 2016 00:27:19 +0000 (00:27 +0000)]
MFC r307978:
Bug 180894 reports that rm -rf on a directory causes kernel panic and reboot.
Return EINVAL rather than panic for low directory link count.

PR: 180894

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

7 years agoMFC r308642:
kib [Mon, 21 Nov 2016 10:47:38 +0000 (10:47 +0000)]
MFC r308642:
Initialize reserved bytes in struct mq_attr.

PR: 214488

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

7 years agoMFC r308089: zfsbootcfg: a simple tool to set next boot (one time)
avg [Mon, 21 Nov 2016 10:14:36 +0000 (10:14 +0000)]
MFC r308089: zfsbootcfg: a simple tool to set next boot (one time)
options for zfsboot

There is a branch-specific change in sbin/zfsbootcfg/Makefile because of
LIBADD vs LDADD/DPADD.

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

7 years agoMFC r307755: swapoff: Remove only late devices with -aL.
jilles [Sun, 20 Nov 2016 13:44:27 +0000 (13:44 +0000)]
MFC r307755: swapoff: Remove only late devices with -aL.

Currently, '/etc/rc.d/swaplate stop' removes all swap devices. This can be
very slow and may not even be possible if there is a lot of swap space in
use. However, removing swap devices is only needed for late swap devices
that may depend on daemons that subsequent shutdown steps stop. Normal swap
devices such as hard disk partitions will remain available throughout the
shutdown process and need not be removed.

In swapoff, interpret -aL to remove late swap devices only, and use this in
etc/rc.d/swaplate. The meaning of -aL in swapon remains unchanged (add all
swap devices, both normal and late).

PR: 187081

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

7 years agoMFC r306585: swapon(8): Update to reality: swapoff ignores -L and the late
jilles [Sat, 19 Nov 2016 20:03:59 +0000 (20:03 +0000)]
MFC r306585: swapon(8): Update to reality: swapoff ignores -L and the late
option in fstab.

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

7 years agoMFC r307752
asomers [Fri, 18 Nov 2016 22:23:01 +0000 (22:23 +0000)]
MFC r307752

Close some file descriptor leaks in pw

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

7 years agoMFC r306740, r307150: groff: use changelog date in man pages
emaste [Fri, 18 Nov 2016 16:05:32 +0000 (16:05 +0000)]
MFC r306740, r307150: groff: use changelog date in man pages

r306740:

groff: use changelog date rather than file modification date in man pages

The source checkout date is not particularly relevant, and this makes
groff man pages build reproducibly.

r307150:

Avoid using 'head' in generating groff doc date

It may not be available in certain cross build cases.

Note that this is a slight change in functionality, in that now only the
first line of the source ChangeLog file is processed. This is acceptable
as groff will be retired and we won't encounter a possibly-different
ChangeLog format.

Sponsored by: The FreeBSD Foundation

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

7 years agoMFC r282824: crunchide: remove EOL whitespace
emaste [Fri, 18 Nov 2016 16:01:23 +0000 (16:01 +0000)]
MFC r282824: crunchide: remove EOL whitespace

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

7 years agoMFC r308538:
kib [Fri, 18 Nov 2016 09:03:31 +0000 (09:03 +0000)]
MFC r308538:
Increase the max allowed size of the microcode update blob for x86.

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

7 years agoMFC r308040,308479: nap time between pats is forced to be at most half
avg [Thu, 17 Nov 2016 15:25:26 +0000 (15:25 +0000)]
MFC r308040,308479: nap time between pats is forced to be at most half
of the timeout

Note that in this branch the default nap period is 1 second unlike
the head where the period is 10 seconds.

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

7 years agoRevert r308753: some unrelated changes were included into the commit
avg [Thu, 17 Nov 2016 15:22:55 +0000 (15:22 +0000)]
Revert r308753: some unrelated changes were included into the commit

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

7 years agoMFC r308247: MFV r308222: 6051 lzc_receive: allow the caller to read the
avg [Thu, 17 Nov 2016 15:19:33 +0000 (15:19 +0000)]
MFC r308247: MFV r308222: 6051 lzc_receive: allow the caller to read the
begin record

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

7 years agoMFC r308218: Add support for microcode update on newer AMD CPUs (10h+)
avg [Thu, 17 Nov 2016 15:17:01 +0000 (15:17 +0000)]
MFC r308218: Add support for microcode update on newer AMD CPUs (10h+)

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

7 years agoMFC r308101: hwpmc: fix a race between amd_stop_pmc and amd_intr
avg [Thu, 17 Nov 2016 15:14:59 +0000 (15:14 +0000)]
MFC r308101: hwpmc: fix a race between amd_stop_pmc and amd_intr

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

7 years agoMFC r307195: convert iicsmb to use iicbus_transfer for all operations
avg [Thu, 17 Nov 2016 15:13:20 +0000 (15:13 +0000)]
MFC r307195: convert iicsmb to use iicbus_transfer for all operations

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

7 years agoMFC r308040,308479: nap time between pats is forced to be at most half
avg [Thu, 17 Nov 2016 15:10:33 +0000 (15:10 +0000)]
MFC r308040,308479: nap time between pats is forced to be at most half
of the timeout

Note that in this branch the default nap period is 1 second unlike the
head where the period is 10 seconds.

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

7 years agoMFC r308464, r308471: Add some device IDs found in my new laptop.
mav [Wed, 16 Nov 2016 18:39:26 +0000 (18:39 +0000)]
MFC r308464, r308471: Add some device IDs found in my new laptop.

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

7 years agoMFC r308348:
hrs [Wed, 16 Nov 2016 03:54:41 +0000 (03:54 +0000)]
MFC r308348:

  Add link-layer address option in RA even for IFT_L2VLAN and IFT_BRIDGE.

  Reported by:  philip

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

7 years agoMFC r308347:
hrs [Wed, 16 Nov 2016 03:51:15 +0000 (03:51 +0000)]
MFC r308347:

  Fix an infinite loop at an non-responding hop when other echo replies
  are kept arriving in the waittime time window.

  Submitted by: Denny Page
  PR:           210286

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

7 years agoMFC r308416:
hselasky [Tue, 15 Nov 2016 09:00:01 +0000 (09:00 +0000)]
MFC r308416:
Add timer to watch the RQ when we are out of mbufs.

The firmware/hardware does not generate additional completion
events unless we post new buffers. Use a timer to try to post
more buffers in case we are temporarily out of mbufs. Else
the receive schedule completely stops.

Sponsored by: Mellanox Technologies

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

7 years agoMFC r308414:
hselasky [Tue, 15 Nov 2016 08:58:51 +0000 (08:58 +0000)]
MFC r308414:
Add more firmware related structures and update existing ones in the
MLX5 core module. Update the set and query diagnostics counter API.

Sponsored by: Mellanox Technologies

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

7 years agoMFC r308413:
hselasky [Tue, 15 Nov 2016 08:58:12 +0000 (08:58 +0000)]
MFC r308413:
Query flow table capabilities according to the correct capability bit
for infiniband.

Sponsored by: Mellanox Technologies

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

7 years agoMFC r308412:
hselasky [Tue, 15 Nov 2016 08:57:36 +0000 (08:57 +0000)]
MFC r308412:
Correct checksum fields in the "mlx5_mini_cqe8" structure. The fields
in question are currently not used.

Sponsored by: Mellanox Technologies

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

7 years agoMFC r308411:
hselasky [Tue, 15 Nov 2016 08:56:59 +0000 (08:56 +0000)]
MFC r308411:
Ensure the firmware is notified of any host memory allocation
failures. Else firmware commands may time out waiting for host
memory.

Sponsored by: Mellanox Technologies

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

7 years agoMFC r308409:
hselasky [Tue, 15 Nov 2016 08:56:18 +0000 (08:56 +0000)]
MFC r308409:
When a firmware command times out do not free the command structure to
avoid use after free.

Sponsored by: Mellanox Technologies

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

7 years agoMFC r308133, r308134: Fix wrong copy/paste in error message.
mav [Mon, 14 Nov 2016 18:42:12 +0000 (18:42 +0000)]
MFC r308133, r308134: Fix wrong copy/paste in error message.

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

7 years agoMFC r308173:
mav [Sat, 12 Nov 2016 23:58:07 +0000 (23:58 +0000)]
MFC r308173:
Fix ZIL records ordering when ZVOL opened both with and without FSYNC.

Before this an earlier writes to a ZVOL opened without FSYNC could get to
ZIL after later writes to the same ZVOL opened with FSYNC.  Fix this by
replicating functionality of ZPL (zv_sync_cnt equivalent to z_sync_cnt),
marking all log records sync if anybody opened the ZVOL with FSYNC.

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

7 years agoMFC r308169:
mav [Sat, 12 Nov 2016 23:52:39 +0000 (23:52 +0000)]
MFC r308169:
Pass to zvol_log_truncate() same sync values as to zvol_log_write().

Surplus marking of TX_TRUNCATE records as sync could result in putting them
into ZIL before previous writes if ones were async.

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

7 years agoMFC r308055: Add vdev_reopening support to vdev_geom.
mav [Sat, 12 Nov 2016 23:40:40 +0000 (23:40 +0000)]
MFC r308055: Add vdev_reopening support to vdev_geom.

It allows to avoid extra GEOM providers flapping without significant need.
Since GEOM got resize support, we don't need to reopen provider to get new
size.  If provider was orphaned and no longer valid, ZFS should already
know that, and in such case reopen should be done in full as expected.

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

7 years agoMFC r308051: Matching GUIDs, handle possible race on vdev detach.
mav [Sat, 12 Nov 2016 23:38:04 +0000 (23:38 +0000)]
MFC r308051: Matching GUIDs, handle possible race on vdev detach.

In case of vdev detach, causing top level mirror vdev destruction, leaf
vdev changes its GUID to one of the destroyed mirror, that creates race
condition when GUID in vdev label may not match one in the pool config.

This change replicates logic nuance of vdev_validate() by adding special
exception, matching the vdev GUID against the top level vdev GUID.
Since this exception is not completely reliable (may give false positives
if we fail to erase label on detached vdev), use it only as last resort.

Quick way to reproduce this scenario now is detach vdev from a pool with
enabled autoextend.  During vdev detach autoextend logic tries to reopen
remaining vdev, that always fails now since in-memory configuration is
already updated, while on-disk labels are not yet.

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

7 years agoMFC r308049: Improve few debugging log messages.
mav [Sat, 12 Nov 2016 23:36:27 +0000 (23:36 +0000)]
MFC r308049: Improve few debugging log messages.

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

7 years agoMFC r307318: MFV r307314:
mav [Sat, 12 Nov 2016 23:32:00 +0000 (23:32 +0000)]
MFC r307318: MFV r307314:
6988 spa_sync() spends half its time in dmu_objset_do_userquota_updates

Using a benchmark which creates 2 million files in one TXG, I observe
that the thread running spa_sync() is on CPU almost the entire time we
are syncing, and therefore can be a performance bottleneck. About 50% of
the time in spa_sync() is in dmu_objset_do_userquota_updates().

The problem is that dmu_objset_do_userquota_updates() calls
zap_increment_int(DMU_USERUSED_OBJECT) once for every file that was
modified (or created). In this benchmark, all the files are owned by the
same user/group, so all 2 million calls to zap_increment_int() are
modifying the same entry in the zap. The same issue exists for the
DMU_GROUPUSED_OBJECT.

We should keep an in-memory map from user to space delta while we are
syncing, and when we finish, iterate over the in-memory map and modify
the ZAP once per entry. This reduces the number of calls to
zap_increment_int() from "number of objects modified" to "number of
owners/groups of modified files".

This reduced the time spent in spa_sync() in the file create benchmark
by ~33%, from 11 seconds to 7 seconds.

Closes #107

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
Reviewed by: Ned Bass <bass6@llnl.gov>
Reviewed by: Jinshan Xiong <jinshan.xiong@intel.com>
Author: Matthew Ahrens <mahrens@delphix.com>

openzfs/openzfs@5fc46359c569369d87728ca09f8705cdff6cc8e2

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

7 years agoMFC r308437 and r308461:
hselasky [Sat, 12 Nov 2016 17:30:55 +0000 (17:30 +0000)]
MFC r308437 and r308461:
Range check the jitter values to avoid bogus sample rate adjustments.
The expected deviation should not be more than 1Hz per second. The USB
v2.0 specification also mandates this requirement. Refer to chapter
5.12.4.2 about feedback.

Allow higher sample rates to have more jitter than lower ones.

PR: 208791

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

7 years agoMFC r308025:
kib [Fri, 11 Nov 2016 20:08:45 +0000 (20:08 +0000)]
MFC r308025:
Enable vn_io_fault() deadlock avoidance for msdosfs.

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

7 years agoMFC r308024:
kib [Fri, 11 Nov 2016 20:06:07 +0000 (20:06 +0000)]
MFC r308024:
Ensure that cluster allocations never allocate clusters outside the
volume limits.

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

7 years agoMFC r308023:
kib [Fri, 11 Nov 2016 20:04:19 +0000 (20:04 +0000)]
MFC r308023:
If the fatchain() call in chainalloc() returned an error, revert
marking the cluster run as in-use.

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

7 years agoMFC r308022:
kib [Fri, 11 Nov 2016 20:01:56 +0000 (20:01 +0000)]
MFC r308022:
Use symbolic name for the value of fully free word in pm_inusemap.

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

7 years agoMFC r308021:
kib [Fri, 11 Nov 2016 19:59:42 +0000 (19:59 +0000)]
MFC r308021:
Use symbolic name for the free cluster number.

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

7 years agoMFC r308020:
kib [Fri, 11 Nov 2016 19:58:25 +0000 (19:58 +0000)]
MFC r308020:
Fix comment formatting.

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

7 years agoMFC r308019:
kib [Fri, 11 Nov 2016 19:57:10 +0000 (19:57 +0000)]
MFC r308019:
Remove useless NULL check.

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

7 years agoMFC 308201
sephe [Fri, 11 Nov 2016 08:04:24 +0000 (08:04 +0000)]
MFC 308201

    hyperv/kvp: Don't mix message status codes and function return values.

    While I'm here, move message status codes to hv_utilreg.h, since they
    will be used by the upcoming VSS stuffs.

    Submitted by:   Hongjiang Zhang <honzhan microsoft com>
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8391

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

7 years agoMFC 308194
sephe [Fri, 11 Nov 2016 07:52:29 +0000 (07:52 +0000)]
MFC 308194

    hyperv: GC unused functions.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8406

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

7 years agoMFC 308168
sephe [Fri, 11 Nov 2016 07:45:03 +0000 (07:45 +0000)]
MFC 308168

    hyperv/vmbus: Avoid extra header copy.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8395

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

7 years agoMFC 308166,308167
sephe [Fri, 11 Nov 2016 07:41:38 +0000 (07:41 +0000)]
MFC 308166,308167

308166
    hyperv/hn: Move TSO packet fixup to an earlier place for if_transmit.

    While TSO packet header may be still cache-hot.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8393

308167
    hyperv/hn: Directly fill chimney sending buffer for small packets.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8394

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

7 years agoMFC 308164
sephe [Fri, 11 Nov 2016 07:33:44 +0000 (07:33 +0000)]
MFC 308164

    hyperv/hn: Regroup if_start related functions.

    And put them under HN_IFSTART_SUPPORT, which is by default on until
    we whack the if_start related bits from base system.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8392

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

7 years agoMFC 308163
sephe [Fri, 11 Nov 2016 07:25:14 +0000 (07:25 +0000)]
MFC 308163

    hyperv/hn: Rename cleaned up file.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8390

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

7 years agoMFC 308162
sephe [Fri, 11 Nov 2016 07:13:17 +0000 (07:13 +0000)]
MFC 308162

    hyperv/hn: Cosmetic cleanup; no functional changes.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8389

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

7 years agoMFC 308117-308120
sephe [Fri, 11 Nov 2016 07:01:50 +0000 (07:01 +0000)]
MFC 308117-308120

308117
    hyperv/hn: Rework temporary channel packet buffer expanding.

    And use large default temporary channel packer buffer; we really
    don't want it to be expanded at run time.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8367

308118
    hyperv/hn: Cleanup RXBUF ack processing.

    - Increase the # of retries.
    - Add comment.
    - Log error, if RXBUF ack fails.
    - Add stat for RXBUF ack failures.

    RXBUF ack really should _not_ fail...

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8368

308119
    hyperv/hn: Reset do_lro, if the hash types are not TCP related.

    Mainly because the host side only set TCPCS and IPCS even for
    UDP datagrams.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8369

308120
    hyperv/hn: Don't start shared TX taskq, if the hypervisor is not Hyper-V.

    - Move the SYSINIT to DRIVER/SECOND, i.e. after the vm_guest becomes
      determistic.
    - Minor style changes.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8370

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

7 years agoMFC 308018,308116
sephe [Fri, 11 Nov 2016 06:42:46 +0000 (06:42 +0000)]
MFC 308018,308116

308018
    hyeprv/hn: Rename cleaned up RNDIS header file.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8360

308116
    hyperv/hn: Rename cleaned up RNDIS source file.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8361

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

7 years agohyperv/hn: Fix i386 build; if_baudrate is 32bits on i386 on stable/10
sephe [Fri, 11 Nov 2016 06:26:34 +0000 (06:26 +0000)]
hyperv/hn: Fix i386 build; if_baudrate is 32bits on i386 on stable/10

This is a direct commit.

Sponsored by: Microsoft

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

7 years agoMFC 308013-308017
sephe [Fri, 11 Nov 2016 06:23:01 +0000 (06:23 +0000)]
MFC 308013-308017

308013
    hyperv/hn: Nuke unnecessary indirection.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8355

308014
    hyperv/hn: Reorganize RX path; mainly pull non-control code path up

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8356

308015
    hyperv/hn: Pull data path code up.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8357

308016
    hyperv/hn: Cleanup RNDIS related files.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8358

308017
    hyperv/hn: Change header guardian; in preparation for the upcoming rename.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8359

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

7 years agoMFC 308011,308012
sephe [Fri, 11 Nov 2016 05:53:58 +0000 (05:53 +0000)]
MFC 308011,308012

308011
    hyperv/hn: Rename cleaned up NVS header file.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8353

308012
    hyperv/hn: Rename cleaned up NVS source file.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8354

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

7 years agoMFC 307989-307991,308010
sephe [Fri, 11 Nov 2016 05:37:04 +0000 (05:37 +0000)]
MFC 307989-307991,308010

307989
    hyperv/hn: Move hn_softc to if_hnvar.h

    While I'm here, use consistent macro names.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8345

307990
    hyperv/hn: Move send context to NVS domain.

    Since all sends are encapsulated in NVS messages.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8346

307991
    hyperv/hn: NVS inclusion cleanup and forward declare functions.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8347

308010
    hyperv/hn: Change header guardian; in preparation for the upcoming rename.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8352

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

7 years agoMFC 307985-307988
sephe [Fri, 11 Nov 2016 05:17:03 +0000 (05:17 +0000)]
MFC 307985-307988

307985
    hyperv/hn: Nuke unnecessary M_NETVSC

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8340

307986
    hyperv/hn: Move %b format string for capabilities near their definition.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8341

307987
    hyperv/hn: Define empty packet filter.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8342

307988
    hyperv/hn: Shuffle chimney sending buffer alloc/free around.

    This paves way for more chimney sending buffer reorganization.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8343

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

7 years agoMFC 307983
sephe [Fri, 11 Nov 2016 05:07:25 +0000 (05:07 +0000)]
MFC 307983

    hyperv/hn: Properly configure RSS according to RSS capabilities

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8338

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

7 years agoMFC 307952,307953,308278
sephe [Fri, 11 Nov 2016 04:39:02 +0000 (04:39 +0000)]
MFC 307952,307953,308278

307952
    hyperv/vmbus: Add missing white space.

    Submitted by:   QianYue You <t-youqi microsoft com>
    Sponsored by:   Microsoft

307953
    hyperv/vmbus: Implement vmbus_chan_printf.

    And use it for vmbus channel logging, which can log the channel
    owner's name properly, instead of vmbus0.

    Submitted by:   QianYue You <t-youqi microsoft com>
    Sponsored by:   Microsoft

308278
    hyperv/vmbus: Reset ch_dev, once the child is deleted.

    So it will not be mis-used later on, e.g. in vmbus_chan_printf().

    Submitted by:   dexuan
    Reported by:    dexuan
    Sponsored by:   Microsoft

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

7 years agoMFC 307893
sephe [Fri, 11 Nov 2016 04:33:43 +0000 (04:33 +0000)]
MFC 307893

    hyperv/hn: Set baudrate properly

    PR:             208931
    Submitted by:   Eugene Grosbein <ports grosbein net>
    Reported by:    Eugene Grosbein <ports grosbein net>
    Sponsored by:   Microsoft

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

7 years agoMFC 307845
sephe [Fri, 11 Nov 2016 03:43:06 +0000 (03:43 +0000)]
MFC 307845

    hyperv/ic: Rework framework/message version negotiation.

    Submitted by:   Hongjiang Zhang <honzhan microsoft com>
    Modified by:    sephe
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8280

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

7 years agoMFC 307844
sephe [Fri, 11 Nov 2016 03:41:36 +0000 (03:41 +0000)]
MFC 307844

    hyperv/hn: Nuke unused forward declaration.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8314

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

7 years agoMFC 307843
sephe [Fri, 11 Nov 2016 03:22:22 +0000 (03:22 +0000)]
MFC 307843

    hyperv/hn: Fix RX filter settings.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8313

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

7 years agoMFC 307840,307842
sephe [Fri, 11 Nov 2016 03:15:52 +0000 (03:15 +0000)]
MFC 307840,307842

307840
    hyperv/hn: Properly handle synthetic parts reattach failure.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8310

307842
    hyperv/hn: Start link status check, if no network changes were pending.

    Link status check is much more lightweight than network change detection.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8311

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

7 years agoMFC 307838,307839
sephe [Fri, 11 Nov 2016 03:09:15 +0000 (03:09 +0000)]
MFC 307838,307839

307838
    hyperv/hn: Move chimney buffer index and size to txdesc.

    All RNDIS control messages have used SG list for a while.  This makes
    the send context suitable for further refactoring.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8308

307839
    hyperv/hn: Fix chimney sending buffer leakage upon NVS sending failure.

    This will not happen in real world, since TX consumption of the vmbus
    TX bufring is limitted.  Better safe than sorry.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8309

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

7 years agoMFC 307710-307712,307714
sephe [Fri, 11 Nov 2016 03:03:54 +0000 (03:03 +0000)]
MFC 307710-307712,307714

307710
    hyperv/hn: Always query RSS capabilities.

    - This avoid distributing NDIS version check.
    - Only NDIS 6.20 required (earlier NDIS uses different indirect table
      format).

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8291

307711
    hyperv/hn: Check NVS version for HASHVAL pktinfo on sending path.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8293

307712
    hyperv/hn: Add network change support.

    Currently the network change is simulated by link status changes.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8295

307714
    hyperv/hn: Function renaming; consistent w/ hardware capabilities query.

    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8296

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

7 years agoMFC r307624
sephe [Fri, 11 Nov 2016 02:40:44 +0000 (02:40 +0000)]
MFC r307624

    hyperv/vmbus: Expose channel management taskqueue for driver to use.

    Sponsored by:   Microsoft

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

7 years agoMFC r308225: dev/cpuctl: put debug output under CPUCTL_DEBUG rather than DEBUG
avg [Thu, 10 Nov 2016 11:14:51 +0000 (11:14 +0000)]
MFC r308225: dev/cpuctl: put debug output under CPUCTL_DEBUG rather than DEBUG

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

7 years agoMFC r308228:
kib [Wed, 9 Nov 2016 17:19:50 +0000 (17:19 +0000)]
MFC r308228:
Remove remnants of the recursive sleep support.

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

7 years agoMFC r308211:
kib [Wed, 9 Nov 2016 17:07:45 +0000 (17:07 +0000)]
MFC r308211:
Remove tautological casts.

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

7 years agoMFC: r307891
rmacklem [Tue, 8 Nov 2016 21:47:00 +0000 (21:47 +0000)]
MFC: r307891
Fix the man page to reflect the change done by r307890 to mountd.c
so that the "-n" option uses the sysctl for the correct NFS server.
This is a content change.

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

7 years agoMFC: r307890
rmacklem [Tue, 8 Nov 2016 21:39:15 +0000 (21:39 +0000)]
MFC: r307890
mountd(8) was erroneously setting the sysctl for the old NFS server
when the new/default NFS server was running, for the "-n" option.

This patch fixes the problem for stable/10 and stable/9.
Since the new NFS server uses vfs.nfsd.nfs_privport == 0 by default,
there wouldn't have been many users affected by the code not setting
it to 0 when the "-n" option was specified.

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

7 years agoMFC r307857: Fix panic after ZVOL renamed to name invalid for DEVFS.
mav [Tue, 8 Nov 2016 20:58:25 +0000 (20:58 +0000)]
MFC r307857: Fix panic after ZVOL renamed to name invalid for DEVFS.

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

7 years agoMFC r307903,307904,308039,308050: vmm/svm: iopm_bitmap and msr_bitmap
avg [Tue, 8 Nov 2016 07:18:39 +0000 (07:18 +0000)]
MFC r307903,307904,308039,308050: vmm/svm: iopm_bitmap and msr_bitmap
must be contiguous in physical memory

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

7 years agoMFC r307518:
hselasky [Mon, 7 Nov 2016 09:19:04 +0000 (09:19 +0000)]
MFC r307518:
Fix device delete child function.

When detaching device trees parent devices must be detached prior to
detaching its children. This is because parent devices can have
pointers to the child devices in their softcs which are not
invalidated by device_delete_child(). This can cause use after free
issues and panic().

Device drivers implementing trees, must ensure its detach function
detaches or deletes all its children before returning.

While at it remove now redundant device_detach() calls before
device_delete_child() and device_delete_children(), mostly in
the USB controller drivers.

Tested by: Jan Henrik Sylvester <me@janh.de>
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D8070

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

7 years agoMFC r308031:
hselasky [Mon, 7 Nov 2016 08:24:29 +0000 (08:24 +0000)]
MFC r308031:
Fix indentation and remove duplicate queue stopped stats increment.

Found by: Ryan Stone <rysto32@gmail.com>
Sponsored by: Mellanox Technologies

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

7 years agoMFC r308144 and r308165:
hselasky [Mon, 7 Nov 2016 08:15:58 +0000 (08:15 +0000)]
MFC r308144 and r308165:
Fixes for virtual T-axis buttons.

Make sure the virtual T-axis buttons gets cleared for USB mice which has
less than 6 buttons.

Make sure the virtual T-axis buttons generate button release event(s)
for continuous tilting.

PR: 213919
PR: 213957

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

7 years agoMFC r288990:
avos [Sun, 6 Nov 2016 16:44:33 +0000 (16:44 +0000)]
MFC r288990:
Fix regression from r248371. We need to copy packet header to new
mbuf. Unlike in the pre-r248371 code, assert that M_PKTHDR is set
only on a first mbuf.

PR: 195074

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

7 years agoMFC r307768: jedec_ts: a driver for thermal sensors on memory modules
avg [Sun, 6 Nov 2016 13:56:34 +0000 (13:56 +0000)]
MFC r307768: jedec_ts: a driver for thermal sensors on memory modules

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

7 years agoMFC r307348: aibs / atk0110: add support for querying sensors via GGRP and GITM
avg [Sun, 6 Nov 2016 13:51:50 +0000 (13:51 +0000)]
MFC r307348: aibs / atk0110: add support for querying sensors via GGRP and GITM

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

7 years agoMFC r283636:
avos [Sun, 6 Nov 2016 13:50:54 +0000 (13:50 +0000)]
MFC r283636:
- Don't request BUS_DMA_ALLOCNOW for dma tags, that requires enormous
amount of memory.
- Don't request segsize of BUS_SPACE_MAXSIZE_32BIT, when maxsize is
MCLBYTES.

With this change bwi_attach() can succeed on i386.

PR: 214235
Submitted by: scottl

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

7 years agoMFC r308114:
kib [Sun, 6 Nov 2016 13:40:03 +0000 (13:40 +0000)]
MFC r308114:
Change remained internal uses of boolean_t to bool in vm/vm_fault.c.

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

7 years agoMFC r308113:
kib [Sun, 6 Nov 2016 13:37:33 +0000 (13:37 +0000)]
MFC r308113:
Remove vm_pager_has_page() declaration.

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

7 years agoMFC r308109:
kib [Sun, 6 Nov 2016 13:35:20 +0000 (13:35 +0000)]
MFC r308109:
Remove vnode_locked label and goto.

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

7 years agoMFC r304053, r304054:
markj [Sat, 5 Nov 2016 20:14:23 +0000 (20:14 +0000)]
MFC r304053, r304054:
Initialize busy lock state and strengthen busy lock assertions.

Tested by: Oliver Pinter

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

7 years agoMFC r307800, r307801
cy [Sat, 5 Nov 2016 17:02:38 +0000 (17:02 +0000)]
MFC r307800, r307801

r307800:

  Sources from the "current" build tree and generated sources in the
  object tree should be used instead of sources and headers from the
  already installed source tree on the build host.

  This was noticed while addressing issues in the upcoming amd update.

r307801:

  Align whitespace.

  r307801 is related to r307800 however it was a separate commit to
  HEAD in order to maintain a separation between the functional change
  and a correction of style.

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

7 years agoMFC r308094:
kib [Sat, 5 Nov 2016 10:22:51 +0000 (10:22 +0000)]
MFC r308094:
Add unlock_vp() helper.

MFC r308095 (by markj):
Add one more use of unlock_vp().

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

7 years agoMFC 302313:
jhb [Fri, 4 Nov 2016 22:03:41 +0000 (22:03 +0000)]
MFC 302313:
cxgbe(4): Avoid a NULL dereference while dumping the L2 table.  Entries
used by switching filters that rewrite L2 information do not have any
associated ifnet.

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

7 years agoMFC 301516,301520,301531,301535,301540,301542,301628: Traffic scheduling
jhb [Fri, 4 Nov 2016 21:59:27 +0000 (21:59 +0000)]
MFC 301516,301520,301531,301535,301540,301542,301628: Traffic scheduling
updates.

301516:
cxgbetool: Allow max-rate > 10Gbps for rate-limited traffic.

301520:
cxgbe(4): Create a reusable struct type for scheduling class parameters.

301531:
cxgbe(4): Break up set_sched_class.  Validate the channel number and
min/max rates against their actual limits (which are chip and port
specific) instead of hardcoded constants.

301535:
cxgbe(4): Track the state of the hardware traffic schedulers in the
driver.  This works as long as everyone uses set_sched_class_params
to program them.

301540:
cxgbe(4): Provide information about traffic classes in the sysctl mib.

301542:
cxgbe(4): A couple of fixes to set_sched_queue.

- Validate the scheduling class against the actual limit (which is chip
  specific) instead of a magic number.

- Return an error if an attempt is made to manipulate the tx queues of a
  VI that hasn't been initialized.

301628:
cxgbe(4): Add a sysctl to manage the binding of a txq to a traffic class.

Sponsored by: Chelsio Communications

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

7 years agoMFC 297883:
jhb [Fri, 4 Nov 2016 21:52:48 +0000 (21:52 +0000)]
MFC 297883:
cxgbe(4): Always dispatch all work requests that have been written to the
descriptor ring before leaving drain_wrq_wr_list.

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

7 years agoMFC 297875: cxgbe(4): Always read the entire mailbox into the reply buffer.
jhb [Fri, 4 Nov 2016 21:48:22 +0000 (21:48 +0000)]
MFC 297875: cxgbe(4): Always read the entire mailbox into the reply buffer.

The size of the reply can be different from the size of the command in
case a debug firmware asserts.  fw_asrt() needs the entire reply in
order to decode the location of the assert.

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

7 years agoMFC 297776,297777,297779: Add DDB commands to cxgbe(4).
jhb [Fri, 4 Nov 2016 21:43:10 +0000 (21:43 +0000)]
MFC 297776,297777,297779: Add DDB commands to cxgbe(4).

297776:
Add a function to lookup a device_t object by name.

This just walks the global list of devices looking for one with the
requested name.  The one use case outside of devctl2's implementation
is for DDB commands that wish to lookup devices by name.

297777:
Add a 'show t4 tcb <nexus> <tid>' command to dump a TCB from DDB.

This allows the contents of a TCB to be extracted from a T4/T5 card in
DDB after a panic.

297779:
Add a 'show t4 devlog <nexus>' DDB command.

This command displays the adapter's firmware device log similar to the
dev.<nexus>.misc.devlog sysctl.

Sponsored by: Chelsio Communications

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

7 years agoMFC 297194:
jhb [Fri, 4 Nov 2016 21:02:33 +0000 (21:02 +0000)]
MFC 297194:
cxgbe(4): Be consistent and call ETHER_BPF_MTAP before writing anything
to the descriptor ring no matter what path the frame takes within the
driver's tx.

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

7 years agoMFC 296975: cxgbe(4): Tidy up PAUSE frame accounting.
jhb [Fri, 4 Nov 2016 20:56:28 +0000 (20:56 +0000)]
MFC 296975: cxgbe(4): Tidy up PAUSE frame accounting.

Figure out if the chip is counting PAUSE frames in the "normal" stats
and take them out if it is.  This fixes a bug in the tx stats because
the default hardware behavior is different for Tx and Rx but the driver
was treating both the same way.  The result was that OPACKETS, OBYTES,
and OMCASTS were under-reported (if tx_pause > 0) before this change.

Note that the mac_stats sysctl still gives you the raw value of these
statistics straight from the device registers.

Sponsored by: Chelsio Communications

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

7 years agoMFC 296950,296951: Configuration updates.
jhb [Fri, 4 Nov 2016 20:38:26 +0000 (20:38 +0000)]
MFC 296950,296951: Configuration updates.

296950:
cxgbe(4): Update some register settings in the default configuration
files to match the "uwire" configuration.

296951:
cxgbe(4): Enable additional capabilities in the default configuration
files.  All features with FreeBSD drivers of some kind are now in the
default configuration.

Sponsored by: Chelsio Communications

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

7 years agoMFC 296018,296640,296641,296689,296735,296949: Fixes for sysctl handlers.
jhb [Fri, 4 Nov 2016 20:30:15 +0000 (20:30 +0000)]
MFC 296018,296640,296641,296689,296735,296949: Fixes for sysctl handlers.

296018:
cxgbe(4): Add a sysctl to retrieve the maximum speed/bandwidth supported by a
port.

dev.cxgbe.<n>.max_speed
dev.cxl.<n>.max_speed

296640:
cxgbe(4): Add a sysctl for the event capture mask of the TP block's
logic analyzer.

dev.t5nex.<n>.misc.tp_la_mask
dev.t4nex.<n>.misc.tp_la_mask

296641:
cxgbe(4): Add sysctls to display the TP microcode version and the
expansion rom version (if there's one).

trantor:~# sysctl dev.t4nex dev.t5nex | grep _version
dev.t4nex.0.firmware_version: 1.15.28.0
dev.t4nex.0.tp_version: 0.1.9.4
dev.t5nex.0.firmware_version: 1.15.28.0
dev.t5nex.0.exprom_version: 1.0.0.68
dev.t5nex.0.tp_version: 0.1.4.9

296689:
cxgbe(4): sysctls to display the TOE's TCP timers.

cask:~# sysctl -d dev.t5nex.0.toe
dev.t5nex.0.toe.finwait2_timer: FINWAIT2 timer (us)
dev.t5nex.0.toe.initial_srtt: Initial SRTT (us)
dev.t5nex.0.toe.keepalive_intvl: Keepidle interval (us)
dev.t5nex.0.toe.keepalive_idle: Keepidle idle timer (us)
dev.t5nex.0.toe.persist_max: Persist timer max (us)
dev.t5nex.0.toe.persist_min: Persist timer min (us)
dev.t5nex.0.toe.rexmt_max: Retransmit max (us)
dev.t5nex.0.toe.rexmt_min: Retransmit min (us)
dev.t5nex.0.toe.dack_timer: DACK timer (us)
dev.t5nex.0.toe.dack_tick: DACK tick (us)
dev.t5nex.0.toe.timestamp_tick: TCP timestamp tick (us)
dev.t5nex.0.toe.timer_tick: TP timer tick (us)
...

cask:~# sysctl dev.t5nex.0.toe
dev.t5nex.0.toe.finwait2_timer: 9765440
dev.t5nex.0.toe.initial_srtt: 244128
dev.t5nex.0.toe.keepalive_intvl: 73240800
dev.t5nex.0.toe.keepalive_idle: 7031116800
dev.t5nex.0.toe.persist_max: 9765440
dev.t5nex.0.toe.persist_min: 976544
dev.t5nex.0.toe.rexmt_max: 9765440
dev.t5nex.0.toe.rexmt_min: 244128
dev.t5nex.0.toe.dack_timer: 19520
dev.t5nex.0.toe.dack_tick: 32.768
dev.t5nex.0.toe.timestamp_tick: 1048.576
dev.t5nex.0.toe.timer_tick: 32.768
...

296735:
Fix the following gcc warnings on sparc64, when TCP_OFFLOAD is not
defined:

    sys/dev/cxgbe/t4_main.c:7474: warning: 'sysctl_tp_tick' defined but not used
    sys/dev/cxgbe/t4_main.c:7505: warning: 'sysctl_tp_dack_timer' defined but not used
    sys/dev/cxgbe/t4_main.c:7519: warning: 'sysctl_tp_timer' defined but not used

This just adds a bunch of #ifdef TCP_OFFLOAD in the right places.

296949:
cxgbe(4): Remove a couple of pointless assignments in sysctl_meminfo.
Do not display range if start = stop (this is a workaround for some
unused regions).

Sponsored by: Chelsio Communications

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

7 years agoMFC 296552,296596,296603,296624,296627: Fixes related to memory windows.
jhb [Fri, 4 Nov 2016 19:07:12 +0000 (19:07 +0000)]
MFC 296552,296596,296603,296624,296627: Fixes related to memory windows.

296552:
cxgbe(4): Rename regwin_lock to reg_lock.  It is used to protect access
to indirect registers only.

296596:
cxgbe(4): Allow the addr/len pair that is being validated in
validate_mem_range to span multiple memory types.  Update
validate_mt_off_len to use validate_mem_range.

296603:
cxgbe(4): Add general purpose routines that offer safe access to the
chip's memory windows.  Convert existing users of these windows to the
new routines.

296624:
cxgbe(4): Fix bug in r296603.  The memory window needs to be
repositioned if the start address isn't in the window already.  One
of the bounds check used the end address instead.

296627:
cxgbe(4): Improvements to the code that deals with the firmware's log.

- Query the location of the log very early during attach.  Refresh the
  location later after establishing contact with the firmware.
- Save the log's location as a flat address in devlog_params.
- Use a memory window instead of backdoor access to the EDC/MC to read
  the log.

Sponsored by: Chelsio Communications

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

7 years agoMFC 295778,296249,296333,296383,296471,296478,296481,296485,296488-296491,
jhb [Fri, 4 Nov 2016 18:45:06 +0000 (18:45 +0000)]
MFC 295778,296249,296333,296383,296471,296478,296481,296485,296488-296491,
296493-296496,296544,296710-296711,297863,299685: Catch up to changes to
the internal shared code.

Note that this merge includes two different firmware updates, but the
effective change is to update to the last version (1.15.37.0).  As such,
I've trimmed the log message of the first update (1.15.28.0).

In addition, the M_WAIT macro added in t4_regs.h had to be renamed to
CXGBE_M_WAIT to avoid a collision on 10.x that is not present on 11.

295778:
cxgbe: catch up with the latest hardware-related definitions.

296249:
cxgbe(4): Update T5 and T4 firmwares to 1.15.28.0.

296333:
cxgbe(4): First of many changes to reduce diffs with internal shared
code:

- Rename some CamelCase variables.
- s/t4_link_start/t4_link_l1cfg/g
- Pull in t4_get_port_type_description.
- Move t4_wait_op_done to t4_hw.c.
- Flip the order of the RDMA stats.
- Remove unsused function t4_iq_start_stop.
- Move t4_wait_op_done and t4_wait_op_done_val to t4_hw.c

296383:
cxgbe(4): Very basic T6 awareness.  This is part of ongoing work to
update to the latest internal shared code.

- Add a chip_params structure to keep track of hardware constants for
  all generations of Terminators handled by cxgbe.
- Update t4_hw_pci_read_cfg4 to work with T6.
- Update the hardware debug sysctls (hidden within dev.<tNnex>.<n>.misc.*) to
  work with T6.  Most of the changes are in the decoders for the CIM
  logic analyzer and the MPS TCAM.
- Acquire the regwin lock around indirect register accesses.

296471:
cxgbe(4): Updated register dumps.

- Get the list of registers to read during a regdump from the shared
  code instead of the OS specific code.  This follows a similar move
  internally.  The shared code includes the list for T6.

- Update cxgbetool to be able to decode T5 VF, T6, and T6 VF register
  dumps (and catch up with some updates to T4 and T5 register decode).

296478:
cxgbe(4): Add a struct sge_params to store per-adapter SGE parameters.
Move the code that reads all the parameters to t4_init_sge_params in the
shared code.  Use these per-adapter values instead of globals.

296481:
cxgbe(4): Overhaul the shared code that deals with the chip's TP block,
which is responsible for filtering and RSS.

Add the ability to use filters that match on PF/VF (aka "VNIC id") while
here.  This is mutually exclusive with filtering on outer VLAN tag with
Q-in-Q.

296485:
cxgbe(4): Update the interrupt handlers for hardware errors.

296488:
cxgbe(4): Updates to mailbox routines in the shared code.

296489:
cxgbe(4): Updates to the shared routines that deal with the serial EEPROM,
flash, and VPD.

296490:
cxgbe(4): Remove __devinit and SPEED_<foo> as part of catch up with
internal shared code.

296491:
cxgbe(4): Updates to shared routines that get/set various parameters via
the firmware.

296493:
cxgbe(4): Use t4_link_down_rc_str in shared code to decode the reason
the link is down, instead of doing it in OS specific code.

296494:
cxgbe(4): Many new functions in the shared code, unused at this time.

296495:
cxgbe(4): Fix t4_tp_get_rdma_stats.

296496:
cxgbe(4): Minor updates to the shared routines that deal with firmware images.

296544:
cxgbe(4): Reshuffle and rototill t4_hw.c, solely to reduce diffs with
the internal shared code.

296710:
cxgbe(4): Catch up with the latest list of card capabilities as reported
by the firmware.

296711:
cxgbe(4): Fix typo in previous commit.

297863:
Rename the 'M_B' macro in t4_regs.h to 'CXGBE_M_B'.

This fixes a conflict with the M_B macro in powerpc's
<machine/db_machdep.h> exposed by the recent addition of DDB commands
to the cxgbe driver.

299685:
cxgbe(4): Update T5 and T4 firmwares to 1.15.37.0.

These firmwares were obtained from the "Chelsio T5/T4 Unified Wire
v2.12.0.3 for Linux" release.  Changes since 1.14.4.0 (which is the
firmware in -STABLE branches) are in the "Release Notes" accompanying
the Unified Wire release and are copy-pasted here as well.

22.1. T5 Firmware
+++++++++++++++++++++++++++++++++

Version : 1.15.37.0
Date    : 04/27/2016
================================================================================

FIXES
-----

BASE:
 - Fixed an issue in FW_RSS_VI_CONFIG_CMD handling where the default ingress
   queue was ignored.
 - Fixed an issue where adapter failed to load fw by adjusting DRAM frequency.
 - Fixed an issue in watchdog which was causing VM bring-up failure after reboot.
 - Fixed 40G link failures with some switches when auto-negotiation enabled.
 - Fixed to improve on link bring-up time.
 - Per port buffer groups size doubled to improve performance.
 - Fixed an issue where bogus d3hot bits were set causing traffic stall.
 - Fixed an issue where sometimes adapter was not seen after reboot.
 - Fixed an issue where iWARP was crashing in conjunction with traffic management.
 - Fixed an issue where link failed to come up after removing twinax cable and
   inserting optical module.

ETH
 - Fixed a link flap issue on T580-CR.

OFLD
 - Fixed a potential iSCSI data corruption issue by disabling RxFragEn flag.

FOiSCSI
 - Fixed an issue in recovery path where connection was getting closed before
   recovery processing was done.
 - Fixed an issue in TCP port reuse.
 - Fixed an issue in recovery path when large number (>64) of iSCSI connections
   were in use.
 - Returned ENETUNREACH if IP was not been provisioned yet and driver tried to
   use given inerface.
 - Fixed an issue where fw was sending ENETUNREACH event for normal tcp
   disconnection.

DCBX
 - Fixed an issue where iscsi tlv is sent incorrectly to host. (DCBX CEE)
 - Fixed an issue where apply bit set for APP id was affecting the ETS and PFC
  settings.(DCBX IEEE)
 - Fixed an issue where app priority values are not handled correctly in fw.
  (DCBX IEEE)
 - Fixed an issue where enable/disable dcbx can cause crash. (DCBX CEE,DCBX IEEE)

FOFCoE
 - Removed BB6 support.

ENHANCEMENTS
------------

BASE:
 - Added new interface to program DCA settings in SGE contexts; allow 32-byte
   IQE size
 - Added PTP interface fw_ptp_ts to support PTP Frequeny and Offset adjustment.
 - Added MPS raw interface.

ETH:
 - New mailbox command FW_DCB_IEEE_CMD api added for IEEE dcbx.

OFLD:
 - WR opcode is returned to host in cqe error response.

22.2. T4 Firmware
+++++++++++++++++

Version : 1.15.37.0
Date    : 04/27/2016
================================================================================

FIXES
-----

BASE:
 - Fixed an issue in FW_RSS_VI_CONFIG_CMD handling where default ingress queue
   was ignored.
 - Fixed an issue in watchdog which was causing VM bring-up failure after reboot.
 - Per port buffer groups size doubled to improve performance.
 - Fixed an issue where iWARP was crashing in conjunction with traffic management.

FOiSCSI:
 - Fixed an issue in recovery path where connection was getting closed before
   recovery processing was done.
 - Fixed an issue in TCP port reuse.
 - Fixed an issue in recovery path when large number (>64) of iSCSI connections
   were in use.
 - Returned ENETUNREACH if IP had not been provisioned yet and driver tried to
   use given inerface.

DCBX
 - Fixed an issue where iscsi tlv is sent incorrectly to host.(DCBX CEE)
 - Fixed an issue where enable/disable dcbx can cause crash in firmware.(DCBX CEE)

FOiSCSI
 - Fixes an issue where fw was sending ENETUNREACH event for normal tcp
   disconnection.

FOFCoE
 - Removed BB6 support.

ENHANCEMENTS
------------

BASE:
 - Added MPS raw interface.

ETH:
 - New mailbox command FW_DCB_IEEE_CMD api added for IEEE dcbx.
================================================================================

Sponsored by: Chelsio Communications

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

7 years agoMFC 287297,296236: Cleanups to cxgbetool.
jhb [Fri, 4 Nov 2016 18:16:00 +0000 (18:16 +0000)]
MFC 287297,296236: Cleanups to cxgbetool.

287297:
- Replace N(a)/N(i)/N(T)/LEN(a)/ARRAY_SIZE(a) with nitems()
- Add missing <err.h> for err() and <sys/sysctl.h> for sysctlbyname()
- NULL -> 0 for 5th parameter of sysctlbyname()

Note, the original commit touched several files under tools/tools, but
this commit only includes changes to cxgbetool.

296236:
Fix some whitespace nits in cxgbetool.c.  No functional change.

Sponsored by: Chelsio Communications

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

7 years agoMFC r308270:
gjb [Fri, 4 Nov 2016 17:55:50 +0000 (17:55 +0000)]
MFC r308270:
 MFV r308265: Update tzdata to 2016i.

Sponsored by: The FreeBSD Foundation

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

7 years agoMFC r297207:
trasz [Fri, 4 Nov 2016 14:06:21 +0000 (14:06 +0000)]
MFC r297207:

Make the autofs(5) -hosts map more robust, primarily to make it correctly
handle NFS shares containing whitespace. This also adds the -E parameter
to showmount(8).

PR: 207596
Differential Revision: https://reviews.freebsd.org/D5649

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

7 years agoMFC r287032:
trasz [Fri, 4 Nov 2016 13:59:57 +0000 (13:59 +0000)]
MFC r287032:

Tweak the "rctl_enable" description to not give the impression
of being disabled by default.

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