Commit Graph

195763 Commits

Author SHA1 Message Date
Enji Cooper
098505f928 MFC r321915:
Remove bogus bsd.subdir.mk .include

bsd.subdir.mk is included from bsd.obj.mk, which is included via bsd.lib.mk.
2017-08-05 17:02:53 +00:00
Enji Cooper
eeed8f4920 Regenerate src.conf(5) per r322100 2017-08-05 17:01:00 +00:00
Enji Cooper
7a77457451 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
2017-08-05 16:55:07 +00:00
Marius Strobl
b720ac69fb 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.
2017-08-05 14:49:40 +00:00
Marius Strobl
89b9ef1838 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.
2017-08-05 12:54:07 +00:00
Marius Strobl
bf09215ad9 Regenerate src.conf.5 after r322094. 2017-08-05 12:34:31 +00:00
Marius Strobl
4b6e5cfbbf MFC: r306375
Add a WITHOUT_DIALOG src.conf(5) knob.

It also turns off dependencies (bsdinstall, bsdconfig, dpv, tzsetup).
2017-08-05 12:33:00 +00:00
Alexander Motin
2d1435452c 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
2017-08-05 08:37:38 +00:00
Alexander Motin
b699a53308 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
2017-08-05 08:36:04 +00:00
Martin Matuska
81793bf036 MFH r321674:
Sync libarchive with vendor.

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

PR:	220462
2017-08-04 23:34:39 +00:00
Marius Strobl
c750675e5f MFC: r290156, r318354
pmap_change_attr: Only fixup DMAP for DMAPed ranges
2017-08-04 21:38:34 +00:00
Pedro F. Giffuni
7da2c323ac MFC r321838:
sys/net8021: Add missing braces in setcurchan().

Also fix some indentation.

Obtained from:	DragonFlyBSD (git c69e37d6)
2017-08-04 20:24:23 +00:00
Konstantin Belousov
788f5ec98a MFC r321349:
Improve publication of the newly allocated snapdata.
2017-08-04 08:27:34 +00:00
Konstantin Belousov
4245c452b8 MFC r321348:
Unlock correct lock in ffs_snapblkfree().
2017-08-04 08:26:19 +00:00
Konstantin Belousov
da1e7cc445 MFC r321347:
Account for lock recursion when transfering snaplock to the vnode lock
in ffs_snapremove().
2017-08-04 08:25:03 +00:00
Cy Schubert
5cf06d48b4 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
2017-08-03 14:22:48 +00:00
Hans Petter Selasky
bcac0de960 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
2017-08-03 14:20:19 +00:00
Hans Petter Selasky
9459697070 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
2017-08-03 14:17:25 +00:00
Hans Petter Selasky
1a70ec282f 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
2017-08-03 14:14:13 +00:00
Hans Petter Selasky
0d9c5ab306 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
2017-08-03 14:09:36 +00:00
Hans Petter Selasky
51096eb488 MFC r312537:
Remove superfluous return statement.

Sponsored by:		Mellanox Technologies
2017-08-03 14:07:14 +00:00
Hans Petter Selasky
07a4a5c4c8 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 @
2017-08-03 14:05:03 +00:00
Hans Petter Selasky
8eca259f8c 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
2017-08-03 14:01:25 +00:00
Hans Petter Selasky
e01ec3bf45 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
2017-08-03 13:57:17 +00:00
Hans Petter Selasky
93fec6cd6e MFC r312526:
Update firmware interface structures and definitions adding support
for new features and commands.

Sponsored by:		Mellanox Technologies
2017-08-03 13:52:39 +00:00
Hans Petter Selasky
d661eab6a6 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
2017-08-03 07:56:39 +00:00
Simon J. Gerraty
3f392cf9f8 MFC bmake-20170720
PR: 221023
2017-08-03 01:40:05 +00:00
Marius Strobl
be7344cabe 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.
2017-08-02 20:27:30 +00:00
Kenneth D. Merry
267346b83a 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

  ------------------------------------------------------------------------
2017-08-02 20:24:28 +00:00
Gavin Atkinson
3b821f87e6 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
2017-08-02 15:13:13 +00:00
Xin LI
ed9e407bcd MFC r320761:
- Use strlcat() instead of strncat().
 - Use asprintf() and handle allocation errors.
2017-08-02 05:47:26 +00:00
Xin LI
d1491642ae MFC r321713:
Bump copyright year.
2017-08-02 05:17:47 +00:00
Marius Strobl
9718c1dcaf MFC: r281733, r298033, r301131
- Remove set but unused variable.
- Use NULL instead of 0 for pointers.
- Fix tzsetup not installing /etc/localtime for UTC.
2017-08-01 21:41:14 +00:00
Alan Somers
012a6e7c0a 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
2017-08-01 16:48:33 +00:00
Alan Somers
419eee7a3b 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
2017-08-01 16:00:21 +00:00
Edward Tomasz Napierala
cb4353e192 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
2017-08-01 15:51:16 +00:00
Philip Paeps
92d11c8e32 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>
2017-08-01 13:15:30 +00:00
Pedro F. Giffuni
a43ccc09d2 MFC r320990, r321011:
libthr: Avoid checking for negative values in usigned count.

Check for overflow instead.
2017-08-01 01:25:18 +00:00
Alan Somers
9189199095 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
2017-07-31 23:03:10 +00:00
Alan Somers
e831bec58b Clarify usage of aio(4) with kqueue(2)
Reviewed by:	jhb
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D11299
2017-07-31 22:36:03 +00:00
Alan Somers
6e9c0a8c31 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
2017-07-31 22:28:33 +00:00
Marius Strobl
0c27e55680 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)
2017-07-31 22:19:39 +00:00
Alan Somers
54d1d50537 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
2017-07-31 21:52:08 +00:00
Alan Somers
0978fc7245 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
2017-07-31 21:42:18 +00:00
Ed Maste
95056c44de 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
2017-07-31 09:28:43 +00:00
Sepherosa Ziehau
6df6eff1b7 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
2017-07-31 06:53:43 +00:00
Sepherosa Ziehau
2e9a193a77 MFC 321408
rndis: Add LINK_SPEED_CHANGE status

    Reviewed by:    hselasky
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D11650
2017-07-31 06:40:09 +00:00
Sepherosa Ziehau
af38806c5b 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
2017-07-31 06:27:43 +00:00
Enji Cooper
d6cf3d09bf 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.
2017-07-31 03:59:07 +00:00
Enji Cooper
9c8c109dd3 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.
2017-07-31 03:57:45 +00:00