]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
6 years agoMFC r321812:
bapt [Tue, 8 Aug 2017 11:25:09 +0000 (11:25 +0000)]
MFC r321812:

Update pci_vendors to 2017.07.27

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

6 years agoMFC 321858: Add alternate Turkish keyboard layout F, submitted by Ufur Guler.
se [Tue, 8 Aug 2017 10:45:22 +0000 (10:45 +0000)]
MFC 321858: Add alternate Turkish keyboard layout F, submitted by Ufur Guler.
MFC 321859: While here, adjust a few file and path names in comments.

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

6 years agoMFC: r322076
jkim [Mon, 7 Aug 2017 22:30:18 +0000 (22:30 +0000)]
MFC: r322076

Detect hypervisor early so that we set lower hz on it.
> Description of fields to fill in above:                     76 columns --|
> PR:                       If and which Problem Report is related.
> Submitted by:             If someone else sent in the change.
> Reported by:              If someone else reported the issue.
> Reviewed by:              If someone else reviewed your modification.
> Approved by:              If you needed approval for this commit.
> Obtained from:            If the change is from a third party.
> MFC after:                N [day[s]|week[s]|month[s]].  Request a reminder email.
> MFH:                      Ports tree branch name.  Request approval for merge.
> Relnotes:                 Set to 'yes' for mention in release notes.
> Security:                 Vulnerability reference (one per line) or description.
> Sponsored by:             If the change was sponsored by an organization.
> Differential Revision:    https://reviews.freebsd.org/D### (*full* phabric URL needed).
> Empty fields above will be automatically removed.

_M   .
M    sys/amd64/amd64/machdep.c
M    sys/amd64/include/md_var.h
M    sys/i386/i386/machdep.c
M    sys/i386/include/md_var.h
M    sys/x86/x86/identcpu.c

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

6 years agoRemove r321216 entry, part of which was reverted.
gjb [Mon, 7 Aug 2017 19:45:33 +0000 (19:45 +0000)]
Remove r321216 entry, part of which was reverted.

Sponsored by: The FreeBSD Foundation

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

6 years agoDocument r321067, arcmsr(4) driver version 1.40.00.00.
gjb [Mon, 7 Aug 2017 19:45:32 +0000 (19:45 +0000)]
Document r321067, arcmsr(4) driver version 1.40.00.00.

Sponsored by: The FreeBSD Foundation

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

6 years agoDocument r320824, gdb(1)/kgdb(1) deprecation.
gjb [Mon, 7 Aug 2017 19:45:31 +0000 (19:45 +0000)]
Document r320824, gdb(1)/kgdb(1) deprecation.

Sponsored by: The FreeBSD Foundation

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

6 years agoDocument r320646, rcmds deprecation.
gjb [Mon, 7 Aug 2017 19:45:30 +0000 (19:45 +0000)]
Document r320646, rcmds deprecation.

Sponsored by: The FreeBSD Foundation

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

6 years agoDocument r321024, kern.features.linux{,64} addition.
gjb [Mon, 7 Aug 2017 19:45:29 +0000 (19:45 +0000)]
Document r321024, kern.features.linux{,64} addition.

Sponsored by: The FreeBSD Foundation

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

6 years agoDocument r321031, NFS 'pNFS commit' support.
gjb [Mon, 7 Aug 2017 19:45:29 +0000 (19:45 +0000)]
Document r321031, NFS 'pNFS commit' support.

Sponsored by: The FreeBSD Foundation

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

6 years agoDocument r321198, vt(4) maximum framebuffer increase.
gjb [Mon, 7 Aug 2017 19:45:28 +0000 (19:45 +0000)]
Document r321198, vt(4) maximum framebuffer increase.

Sponsored by: The FreeBSD Foundation

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

6 years agoDocument r321202, default EFI partition size increase.
gjb [Mon, 7 Aug 2017 19:45:27 +0000 (19:45 +0000)]
Document r321202, default EFI partition size increase.

Sponsored by: The FreeBSD Foundation

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

6 years agoDocument r321216, savecore(8) unit change.
gjb [Mon, 7 Aug 2017 19:45:26 +0000 (19:45 +0000)]
Document r321216, savecore(8) unit change.

Sponsored by: The FreeBSD Foundation

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

6 years agoMove the r321263 entry to 'userland-programs' for consistency.
gjb [Mon, 7 Aug 2017 19:45:25 +0000 (19:45 +0000)]
Move the r321263 entry to 'userland-programs' for consistency.

Sponsored by: The FreeBSD Foundation

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

6 years agoDocument r321234, syslogd(8) 'syslogd.d' directories.
gjb [Mon, 7 Aug 2017 19:45:24 +0000 (19:45 +0000)]
Document r321234, syslogd(8) 'syslogd.d' directories.

Sponsored by: The FreeBSD Foundation

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

6 years agoDocument r321242, cron(8) 'cron.d' directories.
gjb [Mon, 7 Aug 2017 19:45:24 +0000 (19:45 +0000)]
Document r321242, cron(8) 'cron.d' directories.

Sponsored by: The FreeBSD Foundation

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

6 years agoDocument r321263, newsyslog(8) RFC5424 logging format.
gjb [Mon, 7 Aug 2017 19:45:23 +0000 (19:45 +0000)]
Document r321263, newsyslog(8) RFC5424 logging format.

Sponsored by: The FreeBSD Foundation

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

6 years agoDocument r321304, libarchive 3.3.2.
gjb [Mon, 7 Aug 2017 19:45:13 +0000 (19:45 +0000)]
Document r321304, libarchive 3.3.2.

Sponsored by: The FreeBSD Foundation

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

6 years agoMFC r321782:
hselasky [Mon, 7 Aug 2017 13:25:57 +0000 (13:25 +0000)]
MFC r321782:
Remove some dead statistics related code and a structure field from the
mlx4en driver which is used by its Linux counterpart, but not under
FreeBSD.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r321772:
hselasky [Mon, 7 Aug 2017 13:16:38 +0000 (13:16 +0000)]
MFC r321772:
Fix broken usage of the mlx4_read_clock() function:
 - return value has too small width
 - cycle_t is unsigned and cannot be less than zero

Sponsored by: Mellanox Technologies

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

6 years agoMFC r321780:
hselasky [Mon, 7 Aug 2017 13:06:03 +0000 (13:06 +0000)]
MFC r321780:
Make sure on-stack buffer is properly aligned.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r321986:
hselasky [Mon, 7 Aug 2017 12:58:31 +0000 (12:58 +0000)]
MFC r321986:
Change reject message type when destroying cm_id in ibore.

This patch fixes an interopability issue between FreeBSD and non-FreeBSD
systems when the connection establishment is aborted. Refer to the
initial commit in Linux, drivers/infiniband/core/cm.c,
for a more detailed description.

Obtained from: Linux
Sponsored by: Mellanox Technologies

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

6 years agoMFC r321985:
hselasky [Mon, 7 Aug 2017 12:53:10 +0000 (12:53 +0000)]
MFC r321985:
Ticks are 32-bit in FreeBSD.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r312882, r321983 and r321984:
hselasky [Mon, 7 Aug 2017 12:49:30 +0000 (12:49 +0000)]
MFC r312882, r321983 and r321984:
Use the busdma API to allocate all DMA-able memory.

The MLX5 driver has four different types of DMA allocations which are
now allocated using busdma:

1) The 4K firmware DMA-able blocks. One busdma object per 4K allocation.
2) Data for firmware commands use the 4K firmware blocks split into four 1K blocks.
3) The 4K firmware blocks are also used for doorbell pages.
4) The RQ-, SQ- and CQ- DMA rings. One busdma object per allocation.

After this patch the mlx5en driver can be used with DMAR enabled in
the FreeBSD kernel.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r312881:
hselasky [Mon, 7 Aug 2017 12:45:26 +0000 (12:45 +0000)]
MFC r312881:
Add support for device surprise removal and other PCI errors.

- When device disappears from PCI indicate error device state and:
  1) Trigger command completion for all pending commands
  2) Prevent new commands from executing and return:
     - success for modify and remove/cleanup commands
     - failure for create/query commands
  3) When reclaiming pages for a device in error state don't ask FW to
     return all given pages, just release the allocated memory

Sponsored by: Mellanox Technologies

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

6 years agoMFC r312879:
hselasky [Mon, 7 Aug 2017 12:42:28 +0000 (12:42 +0000)]
MFC r312879:
Rename struct fw_page into struct mlx5_fw_page as a preparation step
for adding busdma support.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r312880:
hselasky [Mon, 7 Aug 2017 12:38:04 +0000 (12:38 +0000)]
MFC r312880:
Wait for all VFs pages to be reclaimed before closing EQ pages.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r312875:
hselasky [Mon, 7 Aug 2017 12:34:34 +0000 (12:34 +0000)]
MFC r312875:
Make fw_pages statistics counter 64-bit to avoid overflow.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r312877 and r312878:
hselasky [Mon, 7 Aug 2017 12:29:41 +0000 (12:29 +0000)]
MFC r312877 and r312878:
Minor code refactor as a preparation step for suprise removal of CX-4
PCI device(s), changes:
- alloc_entry() now clears bit for page slot entry aswell
- update of cmd->ent_arr[] is now under cmd->alloc_lock
- complete command if alloc_entry() fails

Sponsored by: Mellanox Technologies

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

6 years agoMFC r321794: Improve FHA locality control for NFS read/write requests.
mav [Mon, 7 Aug 2017 07:40:00 +0000 (07:40 +0000)]
MFC r321794: Improve FHA locality control for NFS read/write requests.

This change adds two new tunables, allowing to control serialization for
read and write NFS requests separately.  It does not change the default
behavior since there are too many factors to consider, but gives additional
space for further experiments and tuning.

The main motivation for this change is very low write speed in case of ZFS
with sync=always or when NFS clients requests sychronous operation, when
every separate request has to be written/flushed to ZIL, and requests are
processed one at a time.  Setting vfs.nfsd.fha.write=0 in that case allows
to increase ZIL throughput by several times by coalescing writes and cache
flushes.  There is a worry that doing it may increase data fragmentation
on disks, but I suppose it should not happen for pool with SLOG.

Sponsored by: iXsystems, Inc.

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

6 years agoMFC 321965
sephe [Mon, 7 Aug 2017 02:33:22 +0000 (02:33 +0000)]
MFC 321965
    hyperv/kvp: Use proper size macro for adapter id.

    Submitted by:   Christopher Ertl <Christopher.Ertl microsoft com>
    Sponsored by:   Microsoft

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

6 years agoMFC r321816:
mckusick [Mon, 7 Aug 2017 02:29:09 +0000 (02:29 +0000)]
MFC r321816:
Avoid reading a snapshot block when it is already in the cache.

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

6 years agoMFC 321836,321837
sephe [Mon, 7 Aug 2017 02:23:34 +0000 (02:23 +0000)]
MFC 321836,321837

321836
    hyperv/hn: Renaming and minor cleanup

    This prepares for the upcoming transparent VF support.

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

321837
    hyperv/hn: Add comment about ether_ifattach event subscription.

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

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

6 years agoMFC 321762
sephe [Mon, 7 Aug 2017 02:15:13 +0000 (02:15 +0000)]
MFC 321762
    hyperv: Add VF bringup scripts and devd rules.

    How network VF works with hn(4) on Hyper-V in non-transparent mode:

    - Each network VF has a cooresponding hn(4).
    - The network VF and the it's cooresponding hn(4) have the same hardware
      address.
    - Once the network VF is up, e.g. ifconfig VF up:
      o  All of the transmission should go through the network VF.
      o  Most of the reception goes through the network VF.
      o  Small amount of reception may go through the cooresponding hn(4).
         This reception will happen, even if the the cooresponding hn(4) is
         down.  The cooresponding hn(4) will change the reception interface
         to the network VF, so that network layer and application layer will
         be tricked into thinking that these packets were received by the
         network VF.
      o  The cooresponding hn(4) pretends the physical link is down.
    - Once the network VF is down or detached:
      o  All of the transmission should go through the cooresponding hn(4).
      o  All of the reception goes through the cooresponding hn(4).
      o  The cooresponding hn(4) fallbacks to the original physical link
         detection logic.

    All these features are mainly used to help live migration, during which
    the network VF will be detached, while the network communication to the
    VM must not be cut off.  In order to reach this level of live migration
    transparency, we use failover mode lagg(4) with the network VF and the
    cooresponding hn(4) attached to it.

    To ease user configuration for both network VF and non-network VF, the
    lagg(4) will be created by the following rules, and the configuration
    of the cooresponding hn(4) will be applied to the lagg(4) automatically.

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

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

6 years agoMFC: r321589
marius [Sun, 6 Aug 2017 16:12:56 +0000 (16:12 +0000)]
MFC: r321589

- Check the slot type capability, set SDHCI_SLOT_{EMBEDDED,NON_REMOVABLE}
  for embedded slots. Fail in the sdhci(4) initialization for slot type
  shared, which is completely unsupported by this driver at the moment. [1]
  For Intel eMMC controllers, taking the embedded slot type into account
  obsoltes setting SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE so remove these quirk
  entries.
- Hide the 1.8 V VDD capability when the slot is detected as non-embedded,
  as the SDHCI specification explicitly states that 1.8 V VDD is applicable
  to embedded slots only. [2]
- Define some easy bits of the SDHCI specification v4.20. [3]
- Don't leak bus_dma(9) resources in failure paths of sdhci_init_slot().

Obtained from: DragonFlyBSD 65704a46 [1], 7ba10b88 [2], 0df14648 [3]

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

6 years agoMFC: r319350, r320620, r321385, r321490, r321588, r321948
marius [Sun, 6 Aug 2017 16:07:34 +0000 (16:07 +0000)]
MFC: r319350, r320620, r321385, r321490, r321588, r321948

o Use SDHCI_CAN_DRIVE_TYPE_{A,C,D} to check for driver type support in
  SDHCI_CAPABILITIES2 instead of SDHCI_CTRL2_DRIVER_TYPE_{A,C,D} which
  are meant for setting the driver type in SDHCI_HOST_CONTROL2.

o Correct a typo in the comment part of r320577 (MFCed to stable/10 in
  r320899).

o Add support for eMMC HS200 and HS400 bus speed modes at 200 MHz to
  sdhci(4), mmc(4) and mmcsd(4).

  On the system where the addition of DDR52 support increased the read
  throughput to ~80 MB/s (from ~45 MB/s at high speed), HS200 yields
  ~154 MB/s and HS400 ~187 MB/s, i. e. performance now has more than
  quadrupled compared to pre-r315598 (pre-r318495 in stable/10).

  However, in fact this isn't a feature-only change; there are boards
  based on Intel Bay Trail where DDR52 is problematic and the suggested
  workaround is to use HS200 mode instead. So far exact details are
  unknown, however, i. e. whether that's due to a defect in these SoCs
  or on the boards.

  Moreover, due to the above changes requiring to be aware of possible
  MMC siblings in the fast path of mmc(4), corresponding information
  now is cached in mmc_softc. As a side-effect, mmc_calculate_clock(),
  now longer will trigger a panic in low memory situations and all of
  mmc(4) operate on the same set of child devices.

o Fix a bug in the failure reporting of mmcsd_delete() that could lead
  to a panic.

o Fix 2 bugs on resume, one in mmcsd(4) that could lead to a panic and
  another one in mmc(4) that could lead to devices no longer working.

o Fix a memory leak in mmcsd_ioctl() in case copyin(9) fails. [1]

o Fix missing variable initialization in mmc_switch_status(). [2]

o Fix R1_SWITCH_ERROR detection in mmc_switch_status(). [3]

o Handle the case of device_add_child(9) failing, for example due to
  a memory shortage, gracefully in mmc(4) and sdhci(4), including not
  leaking memory for the instance variables in case of mmc(4), also
  fixing [4].

o Correctly use the size of a pointer rather than that of a pointer to
  a pointer (this bug was present in head r321385 only, i. e. not in a
  stable branch). [5]

o Handle the case of an unknown SD CSD version in mmc_decode_csd_sd()
  gracefully instead of calling panic(9).

o Again, check and handle the return values of some additional function
  calls in mmc(4) instead of assuming that everything went right or mark
  non-fatal errors by casting the return value to void.

o Correct a typo in the Linux IOCTL compatibility; it should have been
  MMC_IOC_MULTI_CMD rather than MMC_IOC_CMD_MULTI.

o Now that we are reaching ever faster speeds (more improvement in this
  regard is to be expected when adding ADMA support to sdhci(4)), apply
  a few micro-optimizations to mmc(4), mmcsd(4) and sdhci(4).

o Correct confusing and error prone mix-ups between "br" or "bridge" in
  mmc(4) and mmcsd(4) where - according to the terminology outlined in
  comments of bridge.h and mmcbr_if.m around since their addition in
  r163516 - the bus is meant and used instead.

o Remove comment lines from bridge.h incorrectly suggesting that there
  would be a MMC bridge base class driver.

o Update comments in bridge.h regarding the star topology of SD and SDIO;
  since version 3.00 of the SDHCI specification, for eSD and eSDIO bus
  topologies are actually possible in form of so called "shared buses"
  (in some subcontext later on renamed to "embedded" buses).

Reported by: Coverity
CID: 1372612 [1], 1372624 [2], 1372594 [3], 1007069 [4],
1378432 [5]

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

6 years agoMFC r321720, r321856: Attach ichwd(4) only to ISA bus of the LPC bridge.
mav [Sun, 6 Aug 2017 08:15:21 +0000 (08:15 +0000)]
MFC r321720, r321856: Attach ichwd(4) only to ISA bus of the LPC bridge.

Resource allocation for parent device does not look good by itself, but
attempt to allocate them for unrelated device just does not end up good.
On Asus X99-E WS/USB3.1 system reporting ISA bridge via both PCI and ACPI
this reported to cause kernel panic on shutdown due to messed resources:
https://bugs.freenas.org/issues/25237.

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

6 years agoMFC r321915:
ngie [Sat, 5 Aug 2017 17:02:53 +0000 (17:02 +0000)]
MFC r321915:

Remove bogus bsd.subdir.mk .include

bsd.subdir.mk is included from bsd.obj.mk, which is included via bsd.lib.mk.

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

6 years agoRegenerate src.conf(5) per r322100
ngie [Sat, 5 Aug 2017 17:01:00 +0000 (17:01 +0000)]
Regenerate src.conf(5) per r322100

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

6 years agoMFC r320702,r320703:
ngie [Sat, 5 Aug 2017 16:55:07 +0000 (16:55 +0000)]
MFC r320702,r320703:

r320702:

Formalize LEAPSECONDS and OLDTIMEZONES in share/zoneinfo/... as
`MK_ZONEINFO_LEAPSECONDS_SUPPORT == yes` and
`MK_ZONEINFO_OLD_TIMEZONES_SUPPORT == yes`.

Keep `LEAPSECONDS` and `OLDTIMEZONES` for backwards compatibility,
but print out a warning notifying users that they should use the new
variables, in an effort to migrate them to the variables. This is being
done mostly for automated build tools, etc, that might rely on these
variables being set. The variables will be removed in the future on
^/head, e.g., after ^/stable/12 is cut.

Relnotes:       yes

r320703:

Add tests to help verify Links functionality for .../contrib/tzdata/backwards

MFC with: r320702

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

6 years agoFix a stable/10-specific mismerge in r322096; the MK_NCURSESW handling
marius [Sat, 5 Aug 2017 14:49:40 +0000 (14:49 +0000)]
Fix a stable/10-specific mismerge in r322096; the MK_NCURSESW handling
should be within the MK_DIALOG block as libncurses{,w} isn't required
when building tzsetup(8) without dialog(3) support.

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

6 years agoMFC: r274394, r274399, r307802
marius [Sat, 5 Aug 2017 12:54:07 +0000 (12:54 +0000)]
MFC: r274394, r274399, r307802

- Default `bsdconfig timezone' and `tzsetup' to `-s' in a VM.
- Hide dialog specific code behind HAVE_DIALOG. It allows to build a
  stripped down version (missing the dialog UI) but perfectly function
  tzsetup when world is built WITHOUT_DIALOG.

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

6 years agoRegenerate src.conf.5 after r322094.
marius [Sat, 5 Aug 2017 12:34:31 +0000 (12:34 +0000)]
Regenerate src.conf.5 after r322094.

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

6 years agoMFC: r306375
marius [Sat, 5 Aug 2017 12:33:00 +0000 (12:33 +0000)]
MFC: r306375

Add a WITHOUT_DIALOG src.conf(5) knob.

It also turns off dependencies (bsdinstall, bsdconfig, dpv, tzsetup).

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

6 years agoMFC r321685: Fix IORDY bits definition.
mav [Sat, 5 Aug 2017 08:37:38 +0000 (08:37 +0000)]
MFC r321685: Fix IORDY bits definition.

According to the ATA specs, IORDYDIS should be bit 10, IORDY -- bit 11.

PR:             221049
Submitted by:   aaron.styx@baesystems.com

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

6 years agoMFC r321921: Add compat shim part missed at r305197.
mav [Sat, 5 Aug 2017 08:36:04 +0000 (08:36 +0000)]
MFC r321921: Add compat shim part missed at r305197.

This fixes compatibility between old kernel and new ZFS tools.
It seems to be tradition to forget it.

PR: 221112

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

6 years agoMFH r321674:
mm [Fri, 4 Aug 2017 23:34:39 +0000 (23:34 +0000)]
MFH r321674:
Sync libarchive with vendor.

Relevant vendor changes:
  PR #926: ensure ar strtab is null terminated

PR: 220462

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

6 years agoMFC: r290156, r318354
marius [Fri, 4 Aug 2017 21:38:34 +0000 (21:38 +0000)]
MFC: r290156, r318354

pmap_change_attr: Only fixup DMAP for DMAPed ranges

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

6 years agoMFC r321838:
pfg [Fri, 4 Aug 2017 20:24:23 +0000 (20:24 +0000)]
MFC r321838:
sys/net8021: Add missing braces in setcurchan().

Also fix some indentation.

Obtained from: DragonFlyBSD (git c69e37d6)

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

6 years agoMFC r321349:
kib [Fri, 4 Aug 2017 08:27:34 +0000 (08:27 +0000)]
MFC r321349:
Improve publication of the newly allocated snapdata.

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

6 years agoMFC r321348:
kib [Fri, 4 Aug 2017 08:26:19 +0000 (08:26 +0000)]
MFC r321348:
Unlock correct lock in ffs_snapblkfree().

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

6 years agoMFC r321347:
kib [Fri, 4 Aug 2017 08:25:03 +0000 (08:25 +0000)]
MFC r321347:
Account for lock recursion when transfering snaplock to the vnode lock
in ffs_snapremove().

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

6 years agoMFC r321605:
cy [Thu, 3 Aug 2017 14:22:48 +0000 (14:22 +0000)]
MFC r321605:

As in r315225, discard 3072 bytes of RC4 bytestream instead of 1024.
(This implementation of arc4rand(9) is used by the userland ipftest
utility as it approximates ipfilter kernelspace in userspace.)

PR: 217920
Submitted by: codarren@hackers.mu
Reviewed by: emaste, cem
Approved by: so (implicit, in r315225)
Differential Revision: D11747
Patterned after: r315225

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

6 years agoMFC r312983:
hselasky [Thu, 3 Aug 2017 14:20:19 +0000 (14:20 +0000)]
MFC r312983:
Make "desc" pointer non-constant inside the mlx5_core_diagnostics_entry
structure. This fixes compilation with amd64-xtoolchain-gcc.

PR: 216588
Sponsored by: Mellanox Technologies

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

6 years agoMFC r312876:
hselasky [Thu, 3 Aug 2017 14:17:25 +0000 (14:17 +0000)]
MFC r312876:
Use ffs() to scan for first bit instead of using a for() loop.
Minor code refactor while at it.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r312872:
hselasky [Thu, 3 Aug 2017 14:14:13 +0000 (14:14 +0000)]
MFC r312872:
Add support for reading advanced diagnostic counters.

By default reading the diagnostic counters is disabled. The firmware
decides which counters are supported and only those supported show up
in the dev.mce.X.diagnostics sysctl tree.

To enable reading of diagnostic counters set one or more of the
following sysctls to one:

dev.mce.X.conf.diag_general_enable=1
dev.mce.X.conf.diag_pci_enable=1

Sponsored by: Mellanox Technologies

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

6 years agoMFC r312865:
hselasky [Thu, 3 Aug 2017 14:09:36 +0000 (14:09 +0000)]
MFC r312865:
Enforce reading the consumer and producer counters once to ensure
consistent return values from the mlx5e_sq_has_room_for()
function. The two counters are incremented by different threads under
different locks.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r312537:
hselasky [Thu, 3 Aug 2017 14:07:14 +0000 (14:07 +0000)]
MFC r312537:
Remove superfluous return statement.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r312536:
hselasky [Thu, 3 Aug 2017 14:05:03 +0000 (14:05 +0000)]
MFC r312536:
Allow transmit packet bufring in software to be disabled.

- Add new sysctl node to control the transmit packet bufring.

- Add optimised version of the transmit routine which output packets
directly to the DMA ring instead of using bufring in case the transmit
lock is congested. This can reduce the number of taskswitches which in
turn influence the overall system CPU usage, depending on the
workload.

- Add " TX" suffix to debug name for transmit mutexes to silence some
witness warnings about aquiring duplicate locks having same name.

Sponsored by: Mellanox Technologies
Suggested by: gallatin @

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

6 years agoMFC r312528:
hselasky [Thu, 3 Aug 2017 14:01:25 +0000 (14:01 +0000)]
MFC r312528:
Make draining a sendqueue more robust.

Add own state variable to track if a sendqueue is stopped or not.
This will prevent traffic from entering the sendqueue while it is
being destroyed.

Update drain function to wait for traffic to be transmitted before
returning when the link state is active.

Add extra checks in transmit path for stopped SQ's.

While at it:
- Use likely() for a mbuf pointer check.
- Remove redundant IFF_DRV_RUNNING check.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r312527:
hselasky [Thu, 3 Aug 2017 13:57:17 +0000 (13:57 +0000)]
MFC r312527:
Add runtime support for modifying the SQ and RQ completion event
moderation mode. The presence of this feature is indicated through the
firmware capabilities.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r312526:
hselasky [Thu, 3 Aug 2017 13:52:39 +0000 (13:52 +0000)]
MFC r312526:
Update firmware interface structures and definitions adding support
for new features and commands.

Sponsored by: Mellanox Technologies

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

6 years agoMFC r321722:
hselasky [Thu, 3 Aug 2017 07:56:39 +0000 (07:56 +0000)]
MFC r321722:
Properly range check length of parsed information elements in RSU driver.

Found by: Ilja van Sprundel <ivansprundel@ioactive.com>
Sponsored by: Mellanox Technologies

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

6 years agoMFC bmake-20170720
sjg [Thu, 3 Aug 2017 01:40:05 +0000 (01:40 +0000)]
MFC bmake-20170720

PR: 221023

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

6 years agoApply the other half of merges to sdhci_imx(4) and sdhci_fsl(4) that
marius [Wed, 2 Aug 2017 20:27:30 +0000 (20:27 +0000)]
Apply the other half of merges to sdhci_imx(4) and sdhci_fsl(4) that
somehow stayed local when committing r318198, probably due to the
associated tree conflicts.

While at it, register the dependency of sdhci_fsl(4) on sdhci(4) and
allow the former to be built.

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

6 years agoMFC r321622, r321623:
ken [Wed, 2 Aug 2017 20:24:28 +0000 (20:24 +0000)]
MFC r321622, r321623:

  ------------------------------------------------------------------------
  r321622 | ken | 2017-07-27 09:33:57 -0600 (Thu, 27 Jul 2017) | 44 lines

  Fix probing FC targets with hard addressing turned on.

  This largely reverts FreeBSD SVN change 289937 from October 25th, 2015.

  The intent of that change was to keep loop IDs persistent across
  chip reinits.

  The problem is that the change turned on the PREVLOOP /
  PREV_ADDRESS bit (bit 7 in Firmware Options 2), which tells the
  Qlogic chip to not participate in the loop if it can't get the
  requested loop address.  It also turned off soft addressing on 2400
  (4Gb) and newer controllers.

  The isp(4) driver defaults to loop address 0, and the tape drives
  I have tested default to loop address 0 if hard addressing is turned
  on.  So when hard loop addressing is turned on on the drive, the isp(4)
  driver just refuses to participate in the loop.

  The solution is to largely revert that change.  I left some elements
  in place that are related to virtual ports, since they were new.

  This does work with IBM tape drives with hard and soft addressing
  turned on.  I have tested it with 4Gb, 8Gb, and 16Gb controllers.

  sys/dev/isp.c:
   Largely revert FreeBSD SVN change 289937.  I left the
   ispmbox.h changes in place.

   Don't use the PREV_ADDRESS bit on initialization.  It tells
   the chip to not participate if it can't get the requested
   loop ID.

   Do use soft addressing on 2400 and newer chips.

   Use hard addressing when the user has requested a specific
   initiator ID.  (hint.isp.X.iid=N in /boot/loader.conf)

   Leave some of the virtual port options from that change in
   place, but don't turn on the PREV_ADDRESS bit.

  Reviewed by: mav
  Sponsored by: Spectra Logic

  ------------------------------------------------------------------------
  r321623 | ken | 2017-07-27 09:51:56 -0600 (Thu, 27 Jul 2017) | 6 lines

  Remove duplicate assignments from r321622.

  Submitted by: mav
  Sponsored by: Spectra Logic

  ------------------------------------------------------------------------

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

6 years agoMerge r316113,316184,316413 from head:
gavin [Wed, 2 Aug 2017 15:13:13 +0000 (15:13 +0000)]
Merge r316113,316184,316413 from head:
 - Remove #define PCIS_SERIALBUS_SMBUS_PROGIF, unused since r200091
 - Switch device_probe() from large case statement to a lookup table
 - Add several missing SMBus controllers

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

6 years agoMFC r320761:
delphij [Wed, 2 Aug 2017 05:47:26 +0000 (05:47 +0000)]
MFC r320761:

 - Use strlcat() instead of strncat().
 - Use asprintf() and handle allocation errors.

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

6 years agoMFC r321713:
delphij [Wed, 2 Aug 2017 05:17:47 +0000 (05:17 +0000)]
MFC r321713:

Bump copyright year.

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

6 years agoMFC: r281733, r298033, r301131
marius [Tue, 1 Aug 2017 21:41:14 +0000 (21:41 +0000)]
MFC: r281733, r298033, r301131

- Remove set but unused variable.
- Use NULL instead of 0 for pointers.
- Fix tzsetup not installing /etc/localtime for UTC.

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

6 years agoMFC r320807:
asomers [Tue, 1 Aug 2017 16:48:33 +0000 (16:48 +0000)]
MFC r320807:

stdbuf(1): Add buffer definition "B" to the usage message

This option has been missing from the usage message ever since the program
was first imported.

Submitted by: shivansh
Reviewed by: asomers
Sponsored by: Google, Inc (GSoC 2017)
Differential Revision: https://reviews.freebsd.org/D11529

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

6 years agoMFC r320737, r320914
asomers [Tue, 1 Aug 2017 16:00:21 +0000 (16:00 +0000)]
MFC r320737, r320914

r320737:
Fix cleanup in lib/libc/gen/setdomainname_test

ATF cleanup routines run in separate processes from the tests themselves, so
they can't share global variables.

Also, setdomainname_test needs to be is_exclusive because the test cases
access a global resource.

PR: 219967
Reviewed by: ngie
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D11188

r320914:
Remove an extraneous strlen from t_setdomainname.c

Reported by: Coverity
CID: 1377568
X-MFC-With: 320737
Sponsored by: Spectra Logic Corp

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

6 years agoMFC r320359:
trasz [Tue, 1 Aug 2017 15:51:16 +0000 (15:51 +0000)]
MFC r320359:

Add vfs.nfsd.nfsd_enable_uidtostring, which works just like
vfs.nfsd.nfsd_enable_stringtouid, but in reverse - when set to 1,
it forces the NFSv4 server to return numeric UIDs and GIDs instead
of "user@domain" strings. This helps with clients that can't
translate returned identifiers, eg when rerooting.

The same can be achieved by just never running nfsuserd(8),
but the sysctl is useful to toggle the behaviour back and forth
without rebooting.

MFC r320409:

Revert part of r320359, as suggested by rmacklem@.  That case is only used
for nfsuserd -manage-gids and shouldn't depend on sysctl.

MFC r321196:

Rename vfs.nfsd.enable_uidtostring to vfs.nfs.enable_uidtostring.
It applies to both NFS client and NFS server, and is useful for both.
This is different from vfs.nfsd.enable_stringtouid, which is specific
to server side.

Sponsored by: DARPA, AFRL

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

6 years agoMFC r320941: Fix GRE over IPv6 tunnels with IPFW
philip [Tue, 1 Aug 2017 13:15:30 +0000 (13:15 +0000)]
MFC r320941: Fix GRE over IPv6 tunnels with IPFW

Previously, GRE packets in IPv6 tunnels would be dropped by IPFW (unless
net.inet6.ip6.fw.deny_unknown_exthdrs was unset).

PR:           220640
Submitted by: Kun Xie <kxie@xiplink.com>

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

6 years agoMFC r320990, r321011:
pfg [Tue, 1 Aug 2017 01:25:18 +0000 (01:25 +0000)]
MFC r320990, r321011:

libthr: Avoid checking for negative values in usigned count.

Check for overflow instead.

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

6 years agoMFC r320269:
asomers [Mon, 31 Jul 2017 23:03:10 +0000 (23:03 +0000)]
MFC r320269:

style fixes in bin/echo/tests

Submitted by: shivansh
Reviewed by: asomers
X-MFC-With: 319626
Sponsored by: Google, Inc (GSoC 2017)
Differential Revision: https://reviews.freebsd.org/D11318

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

6 years agoClarify usage of aio(4) with kqueue(2)
asomers [Mon, 31 Jul 2017 22:36:03 +0000 (22:36 +0000)]
Clarify usage of aio(4) with kqueue(2)

Reviewed by: jhb
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D11299

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

6 years agoMFC r320165-r320166
asomers [Mon, 31 Jul 2017 22:28:33 +0000 (22:28 +0000)]
MFC r320165-r320166

r320165:
devd(8): Remove pidfile on shutdown

Sponsored by: Spectra Logic Corp

r320166:
Require devd to be running for its ATF tests to run

The ATF tests communicate with the system's running devd

PR: 220169
Reported by: gjb
Sponsored by: Spectra Logic Corp

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

6 years agoUpdate stable/10 from 10.3-STABLE to 10.4-PRERELEASE as part of
marius [Mon, 31 Jul 2017 22:19:39 +0000 (22:19 +0000)]
Update stable/10 from 10.3-STABLE to 10.4-PRERELEASE as part of
the 10.4 release cycle, also belatedly marking the official start
of the code slush.

Set the default mdoc(7) version to 10.4, and update the clang(1)
TARGET_TRIPLE to reflect 10.4. While at it, add missing FreeBSD
major versions to mdoc(7).

Approved by: re (implicit)

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

6 years agoMFC r320163:
asomers [Mon, 31 Jul 2017 21:52:08 +0000 (21:52 +0000)]
MFC r320163:

Fix usr.sbin/makefs/makefs_ffs_tests when /etc/fstab does not exist

dumpfs prints a harmless warning message (via ufs_disk_fillout(3) and
getfsfile(3)), when /etc/fstab does not exist.  We can ignore it.

PR: 220165
Reported by: gjb
Sponsored by: Spectra Logic Corp

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

6 years agoMFC r319854:
asomers [Mon, 31 Jul 2017 21:42:18 +0000 (21:42 +0000)]
MFC r319854:

bin/ln: Set umask appropriately before creating files for testing

These changes were missed in D11084

Submitted by: shivansh
Reviewed by: asomers
X-MFC-With: 319714
Sponsored by: Google, Inc (GSoC 2017)
Differential Revision: https://reviews.freebsd.org/D11158

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

6 years agoMFC r321436: ar: handle partial writes from archive_write_data
emaste [Mon, 31 Jul 2017 09:28:43 +0000 (09:28 +0000)]
MFC r321436: ar: handle partial writes from archive_write_data

libarchive may limit a single archive_write_data call to handling
0x7fffffff bytes. Add a loop to handle partial writes.

Sponsored by: The FreeBSD Foundation

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

6 years agoMFC 321409
sephe [Mon, 31 Jul 2017 06:53:43 +0000 (06:53 +0000)]
MFC 321409

    hyperv/hn: Ignore LINK_SPEED_CHANGE status.

    This status will be reported if the backend NIC is wireless; it's not
    useful.  Due to the high frequency of the reporting, this could be
    pretty annoying; ignore it.

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

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

6 years agoMFC 321408
sephe [Mon, 31 Jul 2017 06:40:09 +0000 (06:40 +0000)]
MFC 321408

    rndis: Add LINK_SPEED_CHANGE status

    Reviewed by:    hselasky
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D11650

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

6 years agoMFC 321407
sephe [Mon, 31 Jul 2017 06:27:43 +0000 (06:27 +0000)]
MFC 321407

    hyperv/hn: Export VF list and VF-HN mapping

    The VF-HN map will be used later on to implement "transparent VF".

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

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

6 years agoMFC r320491:
ngie [Mon, 31 Jul 2017 03:59:07 +0000 (03:59 +0000)]
MFC r320491:

atf-sh(3): document atf_init_test_cases(3) fully

The function was missing from the NAME/SYNOPSIS sections. Add a manpage link
to complete the documentation reference.

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

6 years agoMFC Note: ${FILES} documentation change omitted since r299094 will
ngie [Mon, 31 Jul 2017 03:57:45 +0000 (03:57 +0000)]
MFC Note: ${FILES} documentation change omitted since r299094 will
not be MFCed to ^/stable/10 .

MFC r320442:

share/examples/tests/{atf,plain}/Makefile: tweak example Makefile snippets

- Including bsd.own.mk isn't required since no MK_<foo> knobs are being
  manipulated.
- Update documentation to note that ${FILES} is installed via bsd.progs.mk,
  not bsd.prog.mk.

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

6 years agoMFC 321406
sephe [Mon, 31 Jul 2017 03:49:08 +0000 (03:49 +0000)]
MFC 321406

    ethernet: Add ethernet interface attached event and devctl notification.

    ifnet_arrival_event may not be adequate under certain situation; e.g.
    when the LLADDR is needed.  So the ethernet ifattach event is announced
    after all necessary bits are setup.

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

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

6 years agoMFC r321640:
markj [Mon, 31 Jul 2017 00:41:05 +0000 (00:41 +0000)]
MFC r321640:
Fix style bugs in ksyms.c.

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

6 years agoMFC r321639:
markj [Mon, 31 Jul 2017 00:39:22 +0000 (00:39 +0000)]
MFC r321639:
Restrict permissions on /dev/ksyms to 0400.

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

6 years agoMFC r321401:
avos [Sun, 30 Jul 2017 18:38:05 +0000 (18:38 +0000)]
MFC r321401:
net80211: do not allow to unload rate control module if it is still in use.

Keep 'nrefs' counter up-to-date, so 'kldunload wlan_amrr' with 1+ active
wlan(4) interface will not lead to kernel panic.

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

6 years agoRestore layout of struct vm_map_entry after r321717, same as was done
kib [Sun, 30 Jul 2017 10:49:13 +0000 (10:49 +0000)]
Restore layout of struct vm_map_entry after r321717, same as was done
in r320889 for stable/11.

Sponsored by: The FreeBSD Foundation

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

6 years agoMerge MAP_GUARD.
kib [Sun, 30 Jul 2017 10:36:20 +0000 (10:36 +0000)]
Merge MAP_GUARD.

MFC r316687 (by markj), r320314, r320317, r320338, r320339, r320344, r320430,
r320560 (by alc), r320801, r320843, r321173, r321230.

Tested by: pho
Sponsored by: The FreeBSD Foundation

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

6 years agoMFC r321371:
kib [Sat, 29 Jul 2017 08:24:51 +0000 (08:24 +0000)]
MFC r321371:
Do not allocate struct kinfo_vmobject on stack.

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

6 years agoMFC r321305:
dim [Fri, 28 Jul 2017 18:35:29 +0000 (18:35 +0000)]
MFC r321305:

Fix printf format warning in zfs_module.c

Clang 5.0.0 got better warnings about print format strings using %zd,
and this leads to the following -Werror warning on e.g. arm:

    sys/boot/efi/boot1/zfs_module.c:186:18: error: format specifies type 'ssize_t' (aka 'int') but the argument has type 'off_t' (aka 'long long') [-Werror,-Wformat]
                        "(%lu)\n", st.st_size, spa->spa_name, filepath, EFI_ERROR_CODE(status));
                                   ^~~~~~~~~~

Fix this by casting off_t arguments to intmax_t, and using %jd instead.

Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D11678

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

6 years agoMFC r320441:
ngie [Fri, 28 Jul 2017 03:33:09 +0000 (03:33 +0000)]
MFC r320441:

share/examples/tests/Makefile: clean up example snippets/documentation

- TESTSDIR doesn't need to be specified after r289158.
- Including bsd.own.mk isn't required since no MK_<foo> knobs are being
  manipulated.
- TESTS_SUBDIRS should be written out in an append format, one entry
  per line, to provide a better, more conflict resistant example.

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

6 years agoMFC r320443,r320444:
ngie [Fri, 28 Jul 2017 03:30:46 +0000 (03:30 +0000)]
MFC r320443,r320444:

r320443:

Add kyua TAP test integration examples

The examples are patterned loosely after the ATF examples, similar
to the plain test examples.

r320444:

Commit the corresponding mtree file change for the TAP test examples

MFC with: r320443

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

6 years agoMFC r320446:
ngie [Fri, 28 Jul 2017 03:26:05 +0000 (03:26 +0000)]
MFC r320446:

trailing_slash is a TAP-compliant testcase; mark it as such, instead
of calling is a plain testcase.

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

6 years agoMFC r320445:
ngie [Fri, 28 Jul 2017 03:24:57 +0000 (03:24 +0000)]
MFC r320445:

Don't hardcode path to file in /tmp; this violates the kyua sandbox

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

6 years agoMFC: r321314
rmacklem [Thu, 27 Jul 2017 23:15:24 +0000 (23:15 +0000)]
MFC: r321314
r320062 introduced a bug when doing NFSv4.1 mounts against some non-FreeBSD servers.

r320062 used nm_rsize, nm_wsize to set the maximum request/response sizes for
the NFSv4.1 session. If rsize,wsize are not specified as options, the
value of nm_rsize, nm_wsize is 0 at session creation, resulting in
values for request/response that are too small.
This patch fixes the problem. A workaround is to specify rsize=N,wsize=N
mount options explicitly, so they are set before session creation.
This bug only affects NFSv4.1 mounts against some non-FreeBSD servers.

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

6 years agoMFC: r321248
rmacklem [Thu, 27 Jul 2017 00:04:09 +0000 (00:04 +0000)]
MFC: r321248
Update the nfsv4 man page to reflect recent changes to support
the newer RFCs (5661 and 7530). The main man changes are for the
case of "numbers in strings" for user/groups that RFC7530 allows
and avoids use of nfsuserd(8).

This is a content change.

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