]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
7 years agoMFC r310716
arybchik [Mon, 2 Jan 2017 09:25:21 +0000 (09:25 +0000)]
MFC r310716

sfxge(4): add UEFI ROM support to the common code

Submitted by:   Andrew Lee <alee at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310715
arybchik [Mon, 2 Jan 2017 09:24:19 +0000 (09:24 +0000)]
MFC r310715

sfxge(4): fix GET_RXDP_CONFIG usage for multi-PF on Medford

On Medford, using MC_CMD_GET_RXDP_CONFIG to query the RX end
padding setting is in the ADMIN group, and so fails for
unprivileged functions. In that case, assume the largest size
supported by Medford hardware (256bytes) to prevent overrun.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310714
arybchik [Mon, 2 Jan 2017 09:23:40 +0000 (09:23 +0000)]
MFC r310714

sfxge(4): support Medford bootcfg partition layout in common code

For Siena and Huntington, the per-port bootcfg (aka expcfg) is
stored in a dedicated 4Kbyte partition for each port.

For Medford, the per-PF bootcfg is stored in a 2Kbyte sector
within a single shared partition. Update the common code to support
the new bootcfg layout.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310713
arybchik [Mon, 2 Jan 2017 09:22:41 +0000 (09:22 +0000)]
MFC r310713

sfxge(4): add possibility to control event queue performance profile

It is ignored on SFN5xxx/6xxx (aka Siena).

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310709
arybchik [Mon, 2 Jan 2017 09:19:29 +0000 (09:19 +0000)]
MFC r310709

sfxge(4): fix invalid type of eft_unicst_filter_count

Found by clang when boolean_t is defined as bool for DPDK PMD.

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310708
arybchik [Mon, 2 Jan 2017 09:18:16 +0000 (09:18 +0000)]
MFC r310708

sfxge(4): do not initialize enumerated type variable to another type

Fix build warning generated by ICC.

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310704
arybchik [Mon, 2 Jan 2017 09:17:29 +0000 (09:17 +0000)]
MFC r310704

sfxge(4): translate MC_CMD_ERR_ERANGE to host errno value

This is needed because MCDI command MC_CMD_REKEY can return
MC_CMD_ERR_ERANGE.

Submitted by:   Tom Millington <tmillington at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310699
arybchik [Mon, 2 Jan 2017 09:16:23 +0000 (09:16 +0000)]
MFC r310699

sfxge(4): rename hunt_bist_* methods to ef10_bist_*

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310696
arybchik [Mon, 2 Jan 2017 09:15:16 +0000 (09:15 +0000)]
MFC r310696

sfxge(4): cleanup: improve prefast annotations

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310695
arybchik [Mon, 2 Jan 2017 09:14:15 +0000 (09:14 +0000)]
MFC r310695

sfxge(4): fix defined-but-not-used warning if neither VPD nor NVRAM opt enabled

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310694
arybchik [Mon, 2 Jan 2017 09:13:13 +0000 (09:13 +0000)]
MFC r310694

sfxge(4): cleanup: add missing spaces

Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310693
arybchik [Mon, 2 Jan 2017 09:12:06 +0000 (09:12 +0000)]
MFC r310693

sfxge(4): cleanup: avoid unspecified unsigned

Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310692
arybchik [Mon, 2 Jan 2017 09:10:37 +0000 (09:10 +0000)]
MFC r310692

sfxge(4): enclose macro complex value in parenthesis

Found by DPDK checkpatches.sh

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310691
arybchik [Mon, 2 Jan 2017 09:09:46 +0000 (09:09 +0000)]
MFC r310691

sfxge(4): make strings array pointer itself immutable

Found by DPDK checkpatches.sh

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310690
arybchik [Mon, 2 Jan 2017 09:09:05 +0000 (09:09 +0000)]
MFC r310690

sfxge(4): cleanup: add const qualifier to const array pointer

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310689
arybchik [Mon, 2 Jan 2017 09:08:04 +0000 (09:08 +0000)]
MFC r310689

sfxge(4): cleanup: avoid spaces before TAB

Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310688
arybchik [Mon, 2 Jan 2017 09:05:02 +0000 (09:05 +0000)]
MFC r310688

sfxge(4): cleanup: avoid space just before TAB in efx_types.h

Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310687
arybchik [Mon, 2 Jan 2017 09:04:22 +0000 (09:04 +0000)]
MFC r310687

sfxge(4): cleanup: use TAB to indent

Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310686
arybchik [Mon, 2 Jan 2017 08:58:51 +0000 (08:58 +0000)]
MFC r310686

sfxge(4): cleanup: add missing space between type and pointer symbol

Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310685
arybchik [Mon, 2 Jan 2017 08:58:16 +0000 (08:58 +0000)]
MFC r310685

sfxge(4): cleanup: open brace should be on a type name line

Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310684
arybchik [Mon, 2 Jan 2017 08:56:34 +0000 (08:56 +0000)]
MFC r310684

sfxge(4): cleanup: remove trailing whitespaces

Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310683
arybchik [Mon, 2 Jan 2017 08:53:53 +0000 (08:53 +0000)]
MFC r310683

sfxge(4): cleanup: pointer symbol should go together with struct member name

Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310682
arybchik [Mon, 2 Jan 2017 08:51:28 +0000 (08:51 +0000)]
MFC r310682

sfxge(4): cleanup: avoid C99 // comments

Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310616:
kib [Mon, 2 Jan 2017 08:31:29 +0000 (08:31 +0000)]
MFC r310616:
Remove redundancy in vmtotal().

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

7 years agoMFC r310613:
kib [Mon, 2 Jan 2017 08:28:37 +0000 (08:28 +0000)]
MFC r310613:
Style.

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

7 years agoMFC r309300,r309363,r309405,r309523,r309590,r310185,r310623:
mm [Mon, 2 Jan 2017 01:43:11 +0000 (01:43 +0000)]
MFC r309300,r309363,r309405,r309523,r309590,r310185,r310623:

Sync libarchive with vendor.

Fixed vendor issues (relevant to FreeBSD)
#825, #832: Add sanity check of tar "uid, "gid" and "mtime" fields
#830, #831, #833, #846: Spelling fixes
#850: Fix issues with reading certain jar files

Fixed issues found by Google OSS-Fuzz:
OSS-Fuzz #15: Fix heap-buffer-overflow in archive_le16dec()
OSS-Fuzz #16: Fix possible hang in uudecode_filter_read()
OSS-Fuzz #139, #145, #152: Fix heap-buffer-overflow in uudecode_bidder_bid()
OSS-Fuzz #220: Reject an 'ar' filename table larger than 1GB or a filename
               larger than 1MB
OSS-Fuzz #227, #230, #239: Fix possible memory leak in archive_read_free()
OSS-Fuzz #237: Fix heap buffer overflow when reading invalid ar archives
OSS-Fuzz #286: Bugfix in archive_strncat_l()

More information:
https://github.com/libarchive/libarchive/issues/[libarchive_issue_number]
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=[oss_fuzz_issue_number]

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

7 years agoRemove stray blank line added due to mismerge.
kib [Sun, 1 Jan 2017 12:35:41 +0000 (12:35 +0000)]
Remove stray blank line added due to mismerge.

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

7 years agoMFC r310554:
kib [Sun, 1 Jan 2017 12:19:58 +0000 (12:19 +0000)]
MFC r310554:
Some optimizations for kqueue timers.

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

7 years agoMFC r310552:
kib [Sun, 1 Jan 2017 12:03:41 +0000 (12:03 +0000)]
MFC r310552:
Some style.

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

7 years agoMFstable/11 r310997:
ngie [Sun, 1 Jan 2017 04:48:38 +0000 (04:48 +0000)]
MFstable/11 r310997:

MFC r310996:

Look for list.h in ${.CURDIR} to unbreak the build with a ports-based copy
of llvm38 on ^/stable/11 (oh, the bugs you find when you set CC,CXX,CPP
manually and it skips the bootstrap stage for the toolchain...)

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

7 years agoMFstable/11 r310992:
ngie [Sun, 1 Jan 2017 00:43:20 +0000 (00:43 +0000)]
MFstable/11 r310992:

MFC r310763:

Use uint32_t instead of u_int32_t for or_last_change and services in "struct systemg"

This is being done to match "struct systemg" in snmpmod(3)

No functional change

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

7 years agoMFstable/11 r310990:
ngie [Sun, 1 Jan 2017 00:40:34 +0000 (00:40 +0000)]
MFstable/11 r310990:

MFC r310498,r310591:

r310498:

Allow SNMPv3 authNoPriv and noAuthNoPriv protocols to discover snmpEngineTime
as discussed in RFC-5343

This fixes interoperability with net-snmp.

Tested with the following invocations of snmpwalk (from net-snmp):

- noAuthNoPriv:

  % snmpwalk -v 3 -n '' -u public localhost snmpEngineTime

- authNoPriv:

  % snmpwalk -v 3 -n '' -u bsnmp -A bsnmptest -l authNoPriv -a sha localhost \
    localhost snmpEngineTime

- authPriv:

  % snmpwalk -v 3 -n '' -u bsnmp -A bsnmptest -l authPriv -a sha -x des \
    -X bsnmptest localhost snmpEngineTime

Obtained from: Isilon OneFS (5ec6d772cacbc, with minor tweaks)

r310591:

Update engine time using update_snmpd_engine_time(..)

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

7 years agoMFC r285706,r303562,r303563,r303584,r303643,r303652,r303655,r303707:
mjg [Sat, 31 Dec 2016 16:57:05 +0000 (16:57 +0000)]
MFC r285706,r303562,r303563,r303584,r303643,r303652,r303655,r303707:

(by markj)
    Don't increment the spin count until after the first attempt to acquire a
    rwlock read lock. Otherwise the lockstat:::rw-spin probe will fire
    spuriously.

==

    rwlock: s/READER/WRITER/ in wlock lockstat annotation

==

    sx: increment spin_cnt before cpu_spinwait in xlock

    The change is a no-op only done for consistency with the rest of the file.

==

    locks: change sleep_cnt and spin_cnt types to u_int

    Both variables are uint64_t, but they only count spins or sleeps.
    All reasonable values which we can get here comfortably hit in 32-bit range.

==

    Implement trivial backoff for locking primitives.

    All current spinning loops retry an atomic op the first chance they get,
    which leads to performance degradation under load.

    One classic solution to the problem consists of delaying the test to an
    extent. This implementation has a trivial linear increment and a random
    factor for each attempt.

    For simplicity, this first thouch implementation only modifies spinning
    loops where the lock owner is running. spin mutexes and thread lock were
    not modified.

    Current parameters are autotuned on boot based on mp_cpus.

    Autotune factors are very conservative and are subject to change later.

==

    locks: fix up ifdef guards introduced in r303643

    Both sx and rwlocks had copy-pasted ADAPTIVE_MUTEXES instead of the correct
    define.

==

    locks: fix compilation for KDTRACE_HOOKS && !ADAPTIVE_* case

==

    locks: fix sx compilation on mips after r303643

    The kernel.h header is required for the SYSINIT macro, which apparently
    was present on amd64 by accident.

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

7 years agoMFC r301157:
mjg [Sat, 31 Dec 2016 16:37:47 +0000 (16:37 +0000)]
MFC r301157:

    Microoptimize locking primitives by avoiding unnecessary atomic ops.

    Inline version of primitives do an atomic op and if it fails they fallback to
    actual primitives, which immediately retry the atomic op.

    The obvious optimisation is to check if the lock is free and only then proceed
    to do an atomic op.

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

7 years agoMFC r303583:
mjg [Sat, 31 Dec 2016 13:23:28 +0000 (13:23 +0000)]
MFC r303583:

    amd64: implement pagezero using rep stos

    The current implementation uses non-temporal writes. This turns out to
    be detrimental to performance if the page is used shortly after, which
    is the typical case with page faults.

    Switch to rep stos.

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

7 years agoBump copyright year.
bapt [Sat, 31 Dec 2016 12:52:58 +0000 (12:52 +0000)]
Bump copyright year.

Happy New Year 2017!

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

7 years agoMFstable/11 r310897:
ngie [Sat, 31 Dec 2016 10:48:19 +0000 (10:48 +0000)]
MFstable/11 r310897:

MFC r310728:

Install {asn1,bsnmpagent,bsnmpclient,bsnmplib}.3 as all of the APIs
they document

Also, alphabetically sort MAN

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

7 years agoMFstable/11 r310896:
ngie [Sat, 31 Dec 2016 10:47:21 +0000 (10:47 +0000)]
MFstable/11 r310896:

MFC r310654:

Install snmpmod.3 as all of the bsnmpd APIs it documents

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

7 years agoMFstable/11 r310902:
ngie [Sat, 31 Dec 2016 10:45:01 +0000 (10:45 +0000)]
MFstable/11 r310902:

MFC r310669:

style(9): clean up whitespace

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

7 years agoMFstable/11 r310911:
ngie [Sat, 31 Dec 2016 10:43:32 +0000 (10:43 +0000)]
MFstable/11 r310911:

MFC r310668:

style(9) fixes: clean up leading whitespace

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

7 years agoMFstable/11 r310909:
ngie [Sat, 31 Dec 2016 10:40:59 +0000 (10:40 +0000)]
MFstable/11 r310909:

MFC r310500,r310660:

r310500:

Minor style(9) fixes

- Trailing whitespace cleanup
- Sort variables in snmp_dialog(..) by alignment

No functional change

r310660:

style(9): fix whitespace in pdu_encode_secparams(..)

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

7 years agoMFstable/11 r310905:
ngie [Sat, 31 Dec 2016 10:38:58 +0000 (10:38 +0000)]
MFstable/11 r310905:

MFC r310667:

style(9) fixes: clean up leading whitespace

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

7 years agoMFstable/11 r310904:
ngie [Sat, 31 Dec 2016 10:37:50 +0000 (10:37 +0000)]
MFstable/11 r310904:

MFC r310662,r310663:

r310662:

style(9): snmp_send_packet(..): fix whitespace

r310663:

style(9): ip_get(..): clean up whitespace

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

7 years agoMFstable/11 r310901:
ngie [Sat, 31 Dec 2016 10:34:09 +0000 (10:34 +0000)]
MFstable/11 r310901:

MFC r310648:

style(9): clean up trailing whitespace

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

7 years agoMFstable/11 r310899:
ngie [Sat, 31 Dec 2016 10:30:56 +0000 (10:30 +0000)]
MFstable/11 r310899:

MFC r310666,r310675:

r310666:

style(9) fixes

- Clean up trailing whitespace
- Fix variable type alignment in storage_OS_get_swap(..)

r310675:

Fix the build by moving the initializers for len/nswapdev down below the
declarations

Pointyhat to: ngie

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

7 years agoMFstable/11 r310877:
ngie [Sat, 31 Dec 2016 00:01:21 +0000 (00:01 +0000)]
MFstable/11 r310877:

MFC r310455:

Clarify failure in snmp_output(..) with call to snmp_pdu_decode

- Explicitly test snmp_pdu_encode against SNMP_CODE_OK instead of assuming
  any non-zero value is bad.
- Print out the code before calling abort() to give the end-user something
  actionable to debug without having to recompile the binary, since the
  core might not have these details.

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

7 years agoMFstable/11 r310875:
ngie [Fri, 30 Dec 2016 23:59:43 +0000 (23:59 +0000)]
MFstable/11 r310875:

MFC r310458,r310466:

r310458:

Group all loadable modules in the %default section

This will allow new users to uncomment the modules and have things work
with less head scratching, in the event they decide to uncomment any
of the section separators, e.g. %usm or %vcm, as the module loading is
only effective in the %default section.

r310466:

Don't hardcode $(securityModelUSM) (3) in the authPriv example under the %vacm
section

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

7 years agoMFC r310681
arybchik [Fri, 30 Dec 2016 18:02:12 +0000 (18:02 +0000)]
MFC r310681

sfxge(4): cleanup: remove unnecessary spaces

Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310680
arybchik [Fri, 30 Dec 2016 17:57:14 +0000 (17:57 +0000)]
MFC r310680

sfxge(4): cleanup: use spaces around binary arithmetic operations

Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310679
arybchik [Fri, 30 Dec 2016 17:47:09 +0000 (17:47 +0000)]
MFC r310679

sfxge(4): cleanup: fix wrong indent

Found by DPDK checkpatch.sh

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310678
arybchik [Fri, 30 Dec 2016 17:42:05 +0000 (17:42 +0000)]
MFC r310678

sfxge(4): cleanup: remove trailing whitespace

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310677
arybchik [Fri, 30 Dec 2016 17:35:03 +0000 (17:35 +0000)]
MFC r310677

sfxge(4): cleanup: fix typo in siena_mac_loopback_set() instrumentation

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r310627
arybchik [Fri, 30 Dec 2016 17:24:28 +0000 (17:24 +0000)]
MFC r310627

sfxge(4): do not limit driver RSS table to RSS channels max

Specification of entire RSS table in the driver allows to spread traffic
more equally across CPUs/RSS channels if number of RSS channels is not
power of 2.

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC 309874,309875
sephe [Fri, 30 Dec 2016 02:18:34 +0000 (02:18 +0000)]
MFC 309874,309875

309874
    hyperv/vmbus: Add channel polling support.

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

309875
    hyperv/hn: Add polling support

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

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

7 years agoMFC 309705
sephe [Fri, 30 Dec 2016 02:13:21 +0000 (02:13 +0000)]
MFC 309705

    hyperv/timesync: Support "sent TC" to improve accuracy.

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

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

7 years agoMFC 309704
sephe [Fri, 30 Dec 2016 02:02:00 +0000 (02:02 +0000)]
MFC 309704

    hyperv/vmbus: Utilize vmbus_chan_run_task()

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

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

7 years agoMFC 309346,309348
sephe [Fri, 30 Dec 2016 01:59:19 +0000 (01:59 +0000)]
MFC 309346,309348

309346
    hyperv/hn: Add HN_DEBUG kernel option.

    If bufring is used for per-TX ring descs, don't update "available"
    counter, which is only used to help debugging.

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

309348
    hyperv/hn: Don't hold txdesc, if no BPFs are attached.

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

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

7 years agoMFC 309320,309726,309728
sephe [Thu, 29 Dec 2016 09:10:37 +0000 (09:10 +0000)]
MFC 309320,309726,309728

309320
    hyperv/storvsc: Don't use timedwait.

    The timeout is unnecessary.

    Reviewed by:    jhb
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8656

309726
    hyperv/storvsc: Fix the SCSI disk attachment issue.

    On pre-WS2016 Hyper-V, if the only LUNs > 7 are used, then all disks
    fails to attach.  Mainly because those versions of Hyper-V do not set
    SRB_STATUS properly and deliver junky INQUERY responses.

    Submitted by:   Hongjiang Zhang <honzhan microsoft com>
    Reported by:    Hongxiong Xian <v-hoxian microsoft com>
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8724

309728
    hyperv/storvsc: Minor style changes; no functional changes.

    Reported by:    rpokala
    Sponsored by:   Microsoft

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

7 years agoMFC 309310,309311,309316,309318
sephe [Thu, 29 Dec 2016 09:02:49 +0000 (09:02 +0000)]
MFC 309310,309311,309316,309318

309310
    hyperv/hn: Nuke the unused TX taskqueue CPU binding tunable.

    It was an experimental tunable, and is now deemed to be road blocker
    for further changes.  Time to retire it.

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

309311
    hyperv/hn: Allow multiple TX taskqueues.

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

309316
    hyperv/vmbus: Add DEVMETHOD to map cpu to event taskq.

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

309318
    hyperv/hn: Allow TX to share event taskqueues.

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

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

7 years agoMFC 309240,309242,309244,309245,309319,309670
sephe [Thu, 29 Dec 2016 07:27:13 +0000 (07:27 +0000)]
MFC 309240,309242,309244,309245,309319,309670

309240
    hyperv/vmbus: Add result polling support for xact API.

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

309242
    hyperv/vmbus: Add result polling support for message Hypercall API.

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

309244
    hyperv/vmbus: Add exec cancel support for message Hypercall API.

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

309245
    hyperv/vmbus: Use poll/cancel APIs to wait for the CHOPEN response.

    Since hypervisor does not respond CHOPEN to a revoked channel.

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

309319
    hypver/vmbus: Remove extra assertion.

    It is asserted by vmbus_chan_gpadl_connect() now.

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

309670
    hyperv/vmbus: Use pause if possible.

    This makes booting on Hyper-V w/ small # of vCPUs work properly.

    Reported by:    Hongxiong Xian <v-hoxian microsoft com>, Hongjiang Zhang <honzhan microsoft com>
    Sponsored by:   Microsoft

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

7 years agoMFC 309236,309237
sephe [Thu, 29 Dec 2016 07:11:20 +0000 (07:11 +0000)]
MFC 309236,309237

309236
    hyperv/vmbus: Make sure that the allocated GPADL is not zero.

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

309237
    hyperv/vmbus: Stringent GPADL parameter assertion.

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

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

7 years agoMFC 309226-309231,309235
sephe [Thu, 29 Dec 2016 07:07:16 +0000 (07:07 +0000)]
MFC 309226-309231,309235

309226
    hyperv/hn: Utilize vmbus_chan_xact_wait

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

309227
    hyperv/hn: Fix detach error handling.

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

309228
    hyperv/hn: Fix multi-packet RNDIS message aggregation size setting.

    Just in case that no chimney sending buffer can be used.

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

309229
    hyperv/hn: Fix attach error handling

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

309230
    hyperv/hn: Enable multi-packet RNDIS message support by default.

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

309231
    hyperv/hn: Fix vmbus_chan_subidx usage.

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

309235
    hyperv/hn: Simplify RSS indirect table fixup API

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

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

7 years agoMFC 309128,309129,309131-309136,309138-309140,309224,309225
sephe [Thu, 29 Dec 2016 06:59:24 +0000 (06:59 +0000)]
MFC 309128,309129,309131-309136,309138-309140,309224,309225

309128
    hyperv/vmbus: Commit the GPADL id only after the connection succeeds.

    Minor style change.

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

309129
    hyperv/vmbus: Minor style changes.

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

309131
    hyperv/vmbus: Fix sysctl tree leakage, if channel open fails.

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

309132
    hyperv/vmbus: Don't close unopened channels.

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

309133
    hyperv/vmbus: GPADL disconnect error on a revoked channel is benign.

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

309134
    hyperv/vmbus: No stranded bufring GPADL is allowed.

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

309135
    hyperv/vmbus: Return EISCONN if the bufring GPADL can't be disconnected.

    So that the callers of vmbus_chan_open_br() could handle the passed in
    bufring memory properly.

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

309136
    hyperv/vmbus: Don't free the bufring if its GPADL can't be disconnected.

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

309138
    hyperv/vmbus: Always try disconnect/free bufring memory upon channel close

    While I'm here, minor wording and style changes.

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

309139
    hyperv/vmbus: Propagate close error.

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

309140
    hyperv/vmbus: Add a simplified version of channel close.

    So that the caller can know the channel close error and react accordingly.

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

309224
    hyperv/vmbus: Zero out GPADL if error happens.

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

309225
    hyperv/vmbus: Add supportive transaction wait function.

    This function supports channel revocation properly.

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

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

7 years agoMFC 309085
sephe [Thu, 29 Dec 2016 06:48:10 +0000 (06:48 +0000)]
MFC 309085

    hyperv/hn: Fix primary channel revocation

    Since hypervisor will not drain the TX bufring, once the channels are
    revoked:
    - Setup vmbus orphan handler properly.
    - Make sure that suspension will not wait the TX bufring draining
      forever.
    - GC the pending TX descs on detach path, before freeing the busdma
      stuffs.

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

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

7 years agoMFC 309030,309039,309080,309081,309083
sephe [Thu, 29 Dec 2016 06:45:36 +0000 (06:45 +0000)]
MFC 309030,309039,309080,309081,309083

309030
    hyperv/vmbus: Set a mark on the revoked channel.

    This will be used to fix device detach DEVMETHOD for revoked primary
    channel.

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

309039
    hyperv/vmbus: Merge free/active locks.

    These functions are only used by management stuffs, so there are
    no needs to introduce extra complexity.

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

309080
    hyperv/vmbus: Implement orphan support for transaction API

    It will be used to fix the primary channel revocation support.

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

309081
    hyperv/vmbus: Fix the primary channel revoking on vmbus side.

    Drivers can now use vmbus_chan_{is_revoked,set_orphan,unset_orphan}() and
    vmbus_xact_ctx_orphan() to fix their attach/detach DEVMETHODs for revoked
    primary channels.

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

309083
    hyperv/vmbus: Fix the multi-channel revoking on vmbus side.

    - Reference count the sub-channel when channel offer message is
      processed, so that immediate rescind message on the same channel
      will not race sub-channel open on driver side.
    - Drop the above reference when sub-channel is closed, this closely
      mimics the hypervisor's reaction when primary channel is closed
      on the VM side.  No drivers use sub-channel after primary channel
      is closed.

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

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

7 years agoMFC 308908,308909
sephe [Thu, 29 Dec 2016 06:34:19 +0000 (06:34 +0000)]
MFC 308908,308909

308908
    hyperv/hn: Allow enabling IPv6 TX checksum offloading and IPv6 TSO.

    They are still disabled by default.

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

308909
    hyperv/hn: Don't abuse hn_{tx,rx}_ring_inuse.

    Just in case, the # of TX/RX rings is changed upon synthetic parts
    re-attach.

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

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

7 years agoMFC 308907
sephe [Thu, 29 Dec 2016 06:13:00 +0000 (06:13 +0000)]
MFC 308907

    hyperv/hn: Fix WITNESS warnings

    And re-enable SIOCADDMULTI/SIOCDELMULTI, after WITNESS warning is fixed.

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

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

7 years agoMFC 308906
sephe [Thu, 29 Dec 2016 06:10:38 +0000 (06:10 +0000)]
MFC 308906

    hyperv/vmbus: Support transction result busy-wait.

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

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

7 years agoMFC 308905
sephe [Thu, 29 Dec 2016 06:06:05 +0000 (06:06 +0000)]
MFC 308905

    hyperv/hn: Implement RNDIS multi-packet message support.

    Currently, it is only applied to packet sent through chimney sending
    buffers.  Not enabled by default yet.

    This one gives 20%~30% performance boost for non-TSO usage in both
    bit/packet rate tests and nginx performance test.

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

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

7 years agoMFC 308664,308742,308743
sephe [Thu, 29 Dec 2016 05:32:34 +0000 (05:32 +0000)]
MFC 308664,308742,308743

308664
    hyperv/vss: Add driver and tools for VSS

    VSS stands for "Volume Shadow Copy Service".  Unlike virtual machine
    snapshot, it only takes snapshot for the virtual disks, so both
    filesystem and applications have to aware of it, and cooperate the
    whole VSS process.

    This driver exposes two device files to the userland:

        /dev/hv_fsvss_dev

        Normally userland programs should _not_ mess with this device file.
        It is currently used by the hv_vss_daemon(8), which freezes and
        thaws the filesystem.  NOTE: currently only UFS is supported, if
        the system mounts _any_ other filesystems, the hv_vss_daemon(8)
        will veto the VSS process.

        If hv_vss_daemon(8) was disabled, then this device file must be
        opened, and proper ioctls must be issued to keep the VSS working.

        /dev/hv_appvss_dev

        Userland application can opened this device file to receive the
        VSS freeze notification, hold the VSS for a while (mainly to flush
        application data to filesystem), release the VSS process, and
        receive the VSS thaw notification i.e. applications can run again.

        The VSS will still work, even if this device file is not opened.
        However, only filesystem consistency is promised, if this device
        file is not opened or is not operated properly.

    hv_vss_daemon(8) is started by devd(8) by default.  It can be disabled
    by editting /etc/devd/hyperv.conf.

    Submitted by:   Hongjiang Zhang <honzhan microsoft com>
    Reviewed by:    kib, mckusick
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D8224

308742
    hyperv/vss: Nuke unused variables.

    Submitted by:   markj
    Reported by:    markj
    Sponsored by:   Microsoft

308743
    hyperv/vss: Install the userland daemon to /usr/sbin instead of /

    Submitted by:   markj
    Reported by:    markj
    Sponsored by:   Microsoft

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

7 years agoMFstable/11 r310732:
ngie [Thu, 29 Dec 2016 00:26:27 +0000 (00:26 +0000)]
MFstable/11 r310732:

MFC r310574:

Fix style(9)

- Sort #includes
- Delete trailing whitespace

No functional change

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

7 years agoMFstable/11 r310730:
ngie [Thu, 29 Dec 2016 00:24:58 +0000 (00:24 +0000)]
MFstable/11 r310730:

MFC r310592:

style(9): fix trailing whitespace

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

7 years agoMFstable/11 r310672:
ngie [Wed, 28 Dec 2016 06:16:55 +0000 (06:16 +0000)]
MFstable/11 r310672:

MFC r310499:

Sort #includes

No functional change

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

7 years agoMFstable/11 r310670:
ngie [Wed, 28 Dec 2016 06:15:39 +0000 (06:15 +0000)]
MFstable/11 r310670:

MFC r310503:

style(9): delete stray trailing whitespace after break statement

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

7 years agoMFC 309581,309582,310424: Document T6 support.
jhb [Tue, 27 Dec 2016 20:06:26 +0000 (20:06 +0000)]
MFC 309581,309582,310424: Document T6 support.

309581:
Document support for Terminator 6 adapters in cxgbe(4) and cxgbev(4).

309582:
Bump Dd for addition of T6.

310424:
Replace passive voice with active voice and other tweaks.

- Drop uses of 'will'.
- Replace 'to use' with active voice.
- Tidy language around interrupt types and clarify that INTx doesn't
  work on VFs.
- Drop leading articles from sysctl/tunable descriptions.
- Tweak the wording of several sysctl/tunable descriptions.

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

7 years agoMFC r309957: Add tests for reaper receiving SIGCHLD (r309886).
jilles [Mon, 26 Dec 2016 17:26:25 +0000 (17:26 +0000)]
MFC r309957: Add tests for reaper receiving SIGCHLD (r309886).

PR: 213928

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

7 years agoMFC r310367:
pfg [Mon, 26 Dec 2016 16:43:39 +0000 (16:43 +0000)]
MFC r310367:
pax(1): Fix a bug with archives smaller than 512 bytes.

The problem here is that the archive is too short (< 512 bytes). The
buffer routines, try to read at least 512 bytes, even when we try to
determine what format file we have, which is wrong.

Obtained from: NetBSD (CVS rev 1.26)

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

7 years agoMFC r309886:
kib [Mon, 26 Dec 2016 10:16:05 +0000 (10:16 +0000)]
MFC r309886:
When a zombie gets reparented due to the parent exit, send SIGCHLD to
the reaper.

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

7 years agoMFC r310302:
kib [Mon, 26 Dec 2016 10:13:53 +0000 (10:13 +0000)]
MFC r310302:
Do not clear KN_INFLUX when not owning influx state.

PR: 214923

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

7 years agoMFstable/11 r310571:
ngie [Mon, 26 Dec 2016 06:33:43 +0000 (06:33 +0000)]
MFstable/11 r310571:

MFC r310459:

Sort #includes per style(9)

No functional change

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

7 years agoMFstable/11 r310569:
ngie [Mon, 26 Dec 2016 06:25:39 +0000 (06:25 +0000)]
MFstable/11 r310569:

MFC r309869:

Merge changes from vendor to address several Coverity issues with
contrib/libarchive's tests

Obtained from: libarchive (ebe29c, fd0ea2, f9e3de)

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

7 years agoMFstable/11 r310567:
ngie [Mon, 26 Dec 2016 06:11:43 +0000 (06:11 +0000)]
MFstable/11 r310567:

MFC r310457:

Clean up trailing whitespace

No functional change

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

7 years agoMFstable/11 r310565:
ngie [Mon, 26 Dec 2016 06:09:09 +0000 (06:09 +0000)]
MFstable/11 r310565:

MFC r310202:

Clean up trailing and leading whitespace

Fix variable type alignment in snmp_dialog(..)

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

7 years agoMFstable/11 r310563:
ngie [Mon, 26 Dec 2016 06:06:55 +0000 (06:06 +0000)]
MFstable/11 r310563:

MFC r310196:

Fix some minor typos with begemotBridgeTpLearnedEntryDiscards and
begemotBridgeTpMaxAddresses

Bump LAST-UPDATED for the MIB, per the change

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

7 years agoMFstable/11 r310561:
ngie [Mon, 26 Dec 2016 06:04:10 +0000 (06:04 +0000)]
MFstable/11 r310561:

MFC r310203:

Clean up parse_ip(..)

- Clean up trailing whitespace
- Fix variable alignment

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

7 years agoMFC r309836: Add some tests for reaper functionality (in procctl()).
jilles [Sun, 25 Dec 2016 22:32:16 +0000 (22:32 +0000)]
MFC r309836: Add some tests for reaper functionality (in procctl()).

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

7 years agoMFC r308530: iicsmb: SMB_MAXBLOCKSIZE can be used again
avg [Sat, 24 Dec 2016 14:48:28 +0000 (14:48 +0000)]
MFC r308530: iicsmb: SMB_MAXBLOCKSIZE can be used again

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

7 years agoMFC r309250: MFV r309249: 3821 Race in rollback, zil close, and zil flush
avg [Sat, 24 Dec 2016 14:25:25 +0000 (14:25 +0000)]
MFC r309250: MFV r309249: 3821 Race in rollback, zil close, and zil flush

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

7 years agoMFC r309099: MFV r308990: 7181 race between zfs_mount and zfs_ioc_rollback
avg [Sat, 24 Dec 2016 14:23:14 +0000 (14:23 +0000)]
MFC r309099: MFV r308990: 7181 race between zfs_mount and zfs_ioc_rollback

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

7 years agoMFC r309098: MFV r308988: 7199, 7200 dsl_dataset_rollback_sync may try
avg [Sat, 24 Dec 2016 14:17:50 +0000 (14:17 +0000)]
MFC r309098: MFV r308988: 7199, 7200 dsl_dataset_rollback_sync may try
to free already free blocks

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

7 years agoMFC r309097: MFV r308987: 7180 potential race between
avg [Sat, 24 Dec 2016 14:13:21 +0000 (14:13 +0000)]
MFC r309097: MFV r308987: 7180 potential race between
zfs_suspend_fs+zfs_resume_fs and zfs_ioc_rename

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

7 years agodefine Maxmem for ia64, the only platform that didn't have it
avg [Sat, 24 Dec 2016 13:28:39 +0000 (13:28 +0000)]
define Maxmem for ia64, the only platform that didn't have it

This is a direct commit to stable/10 as the platform was removed
in the newer branches.

Maxmem is required for compiling fwohci(4) on ia64 since commit
r310081, MFC of r277511.
It was easier to add Maxmem than to make a special case for ia64
in fwohci.

Reported by: jhb, gjb
Discussed with: kib, jhb

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

7 years agoMFstable/11 r310506:
ngie [Sat, 24 Dec 2016 13:00:19 +0000 (13:00 +0000)]
MFstable/11 r310506:

MFC r309837:

Change the process limits for RLIMIT_MEMLOCK to RLIM_INFINITY when
executing :mincore_resid

The default process limits in FreeBSD is 64kB for unprivileged users,
which empirically is too low to run the :mincore_resid testcase.

Process limits are inherited, so even though the default limit for
root users is RLIM_INFINITY, the inherited limit with "sudo" with the
default login.conf will be 64kB.

Use setrlimit to set rlim_max for RLIMIT_MEMLOCK to RLIM_INFINITY to
avoid ENOMEM issues when calling mlock to wire the mmap'ed address
space.

setrlimit requires root access to increase rlim_max, so require root
privileges when running the test

Discovered when executing the tests with sudo, e.g.
"sudo kyua test -k /usr/tests/lib/libc/sys/Kyuafile mincore_test"

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

7 years agoMFC r308493, r308619: Update amd from am-utils 6.1.5 to 6.2.
cy [Fri, 23 Dec 2016 22:42:14 +0000 (22:42 +0000)]
MFC r308493, r308619: Update amd from am-utils 6.1.5 to 6.2.

Used extensively on my network over the past ten weeks.

Reviewed by:    pfg, brooks
Suggested by:   pfg
Obtained from:  ftp://ftp.am-utils.org/pub/am-utils/
Relnotes:       yes
Differential Revision:  D8405

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

7 years agoMFC 309588: Don't attach to Host-PCI bridges with a bad bus number.
jhb [Fri, 23 Dec 2016 19:42:17 +0000 (19:42 +0000)]
MFC 309588: Don't attach to Host-PCI bridges with a bad bus number.

If the bus number assigned to a Host-PCI bridge doesn't match the first
bus number in the associated producer range from _CRS, print a warning and
fail to attach rather than panicking due to an assertion failure.

At least one single-socket Dell machine leaves a "ghost" Host-PCI bridge
device in the ACPI namespace that seems to correspond to the I/O hub in
the second socket of a two-socket machine.  However, the BIOS doesn't
configure the settings for this "ghost" bridge correctly, nor does it have
any PCI devices behind it.

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

7 years agoMFC 308820,308821: Fixes for fatal page faults on x86.
jhb [Fri, 23 Dec 2016 19:28:15 +0000 (19:28 +0000)]
MFC 308820,308821: Fixes for fatal page faults on x86.

308820:
Report page faults due to reserved bits in PTEs as a separate fault type.

Rather than reporting a page fault due to a bad PTE as a protection
violation with the "rsv" flag, treat these faults as a separate type of
fault altogether.

308821:
MFamd64: Various fatal page fault fixes.

- If a page fault is triggered due to reserved bits in a PTE, treat it
  as a fatal fault and panic.
- If PG_NX is in use, report whether a fatal page fault is due to an
  instruction fetch or a data access.
- If a fatal page fault is due to reserved bits in a PTE, report that as
  the page fault type rather than a protection violation.

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

7 years agoMFC, r310338:
ken [Fri, 23 Dec 2016 18:29:10 +0000 (18:29 +0000)]
MFC, r310338:
  ------------------------------------------------------------------------
  r310338 | ken | 2016-12-20 14:17:07 -0700 (Tue, 20 Dec 2016) | 37 lines

  Turn on FC-Tape by default in the isp(4) driver.

  FC-Tape provides additional link level error recovery, and is
  highly recommended for tape devices.  It will only be turned on for
  a given target if the target supports it.

  Without this setting, we default to whatever FC-Tape setting is in
  NVRAM on the card.

  This can be overridden by setting the following loader tunable, for
  example for isp0:

  hint.isp.0.nofctape=1

  sys/conf/options:
   Add a new kernel config option, ISP_FCTAPE_OFF, that
   defaults the FC-Tape configuration to off.

  sys/dev/isp/isp_pci.c:
   If ISP_FCTAPE_OFF is defined, turn off FC-Tape.  Otherwise,
   turn it on if the card supports it.

  share/man/man4/isp.4:
   Add a description of FC-Tape to the isp(4) man page.

   Add descriptions of the fctape and nofctape options, as well as the
   ISP_FCTAPE_OFF kernel configuration option.

   Add the ispfw module and kernel drivers to the suggested
   configurations at the top of the man page so that users are less
   likely to leave it out.  The driver works well with the included
   firmware, but may not work at all with whatever firmware the user
   has flashed on their card.

  Sponsored by: Spectra Logic

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

Sponsored by: Spectra Logic

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

7 years agoMFH (r309269): use malloc()ed buffers instead of stack buffers
des [Fri, 23 Dec 2016 15:05:41 +0000 (15:05 +0000)]
MFH (r309269): use malloc()ed buffers instead of stack buffers

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

7 years agoMFC r310182:
kib [Fri, 23 Dec 2016 09:39:50 +0000 (09:39 +0000)]
MFC r310182:
In swp_pager_meta_free_all(), fix type of the index variable.  Style.

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

7 years agoMFC r310159:
kib [Fri, 23 Dec 2016 09:35:39 +0000 (09:35 +0000)]
MFC r310159:
Switch from stdatomic.h to atomic.h for kernel.

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