]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoUpdate llvm, clang and lldb to trunk r257626, and update build glue.
dim [Thu, 14 Jan 2016 17:42:46 +0000 (17:42 +0000)]
Update llvm, clang and lldb to trunk r257626, and update build glue.

8 years agoMerge ^/head r293686 through r293849.
dim [Wed, 13 Jan 2016 20:16:53 +0000 (20:16 +0000)]
Merge ^/head r293686 through r293849.

8 years agoVendor import of lldb trunk r257626:
dim [Wed, 13 Jan 2016 20:06:56 +0000 (20:06 +0000)]
Vendor import of lldb trunk r257626:
https://llvm.org/svn/llvm-project/lldb/trunk@257626

8 years agoVendor import of llvm trunk r257626:
dim [Wed, 13 Jan 2016 19:58:01 +0000 (19:58 +0000)]
Vendor import of llvm trunk r257626:
https://llvm.org/svn/llvm-project/llvm/trunk@257626

8 years agodrm/i915: Further reduce the diff with Linux 3.8
dumbbell [Wed, 13 Jan 2016 19:52:25 +0000 (19:52 +0000)]
drm/i915: Further reduce the diff with Linux 3.8

There is no functional change. The goal is to ease the future update to
Linux 3.8's i915 driver.

8 years agoRemove dead code when the target processor has POPCNT instruction.
jkim [Wed, 13 Jan 2016 19:19:50 +0000 (19:19 +0000)]
Remove dead code when the target processor has POPCNT instruction.

8 years agoImprove non-interactive forth cmd error reporting
smh [Wed, 13 Jan 2016 18:33:12 +0000 (18:33 +0000)]
Improve non-interactive forth cmd error reporting

Non-interactive forth command errors where silent even for critical issues
e.g. failing to load a required kernel module or mfs_root.

This resulted in later unexplained and hard to trace errors such as mount
root failures.

This introduces additional command return codes that are treated
appropriately by the non-interactive command processor (bf_command).
* CMD_CRIT = print error
* CMD_FATAL = panic

Also fix minor style(9) issues with command_load return codes.

MFC after: 2 weeks
X-MFC-With: r293268
Sponsored by: Multiplay

8 years agoRemove some unneeded headers
bapt [Wed, 13 Jan 2016 17:59:12 +0000 (17:59 +0000)]
Remove some unneeded headers

8 years agoFix Coverity warnings regarding r293229
asomers [Wed, 13 Jan 2016 17:33:50 +0000 (17:33 +0000)]
Fix Coverity warnings regarding r293229

rpcbind/check_bound.c
Fix CID1347798, a memory leak in mergeaddr.

rpcbind/tests/addrmerge_test.c
Fix CID1347800 through CID1347803, memory leaks in ATF tests.  They
are harmless because each ATF test case runs in its own process, but
they are trivial to fix.  Fix a few other leaks that Coverity didn't
detect, too.

Coverity CID: 13477981347800134780113478021347803
MFC after: 2 weeks
X-MFC-With: 293229
Sponsored by: Spectra Logic Corp

8 years agoRemove the compat code to handle the kernel passing us an unalinged
andrew [Wed, 13 Jan 2016 15:54:17 +0000 (15:54 +0000)]
Remove the compat code to handle the kernel passing us an unalinged
stackpointer. Userland expects the kernel to pass it an aligned sp and
pass a pointer to the arguments in x0. The kernel side was updated in
r289502, 3 months ago.

Sponsored by: ABT Systems Ltd

8 years agoIncrease efiboot.img size used in ISO creation
smh [Wed, 13 Jan 2016 14:47:13 +0000 (14:47 +0000)]
Increase efiboot.img size used in ISO creation

Due to recent and upcoming changes to add additional functionality to
the EFI loader its now bigger than the space allocates for efiboot.img
so increase this in line with boot1.efifat.

MFC after: 2 weeks
X-MFC-With: r293268
Sponsored by: Multiplay

8 years agoFix the spelling of fueword* to eliminate compile warnings about mismatched
ian [Wed, 13 Jan 2016 14:39:39 +0000 (14:39 +0000)]
Fix the spelling of fueword* to eliminate compile warnings about mismatched
begin/end symbols when the warning level is turned up.

Submitted by: Steve Kiernan <stevek@juniper.net>

8 years agoRemove RTF_RNH_LOCKED support from rtalloc1_fib().
melifaro [Wed, 13 Jan 2016 14:32:48 +0000 (14:32 +0000)]
Remove RTF_RNH_LOCKED support from rtalloc1_fib().

Last caller using it was eliminated in r293471.

Sponsored by: Yandex LLC

8 years agoStore the timer type for logging, because the timer can be freed
tuexen [Wed, 13 Jan 2016 14:28:12 +0000 (14:28 +0000)]
Store the timer type for logging, because the timer can be freed
during processing the timerout.

MFC after: 3 days

8 years agoMake devfs_fpdrop() static. It was not a public KPI, and it has no
kib [Wed, 13 Jan 2016 14:03:06 +0000 (14:03 +0000)]
Make devfs_fpdrop() static.  It was not a public KPI, and it has no
reason to remain exported for some time.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoMove the funsetown(9) call from audit_pipe_close() to cdevpriv
kib [Wed, 13 Jan 2016 14:02:07 +0000 (14:02 +0000)]
Move the funsetown(9) call from audit_pipe_close() to cdevpriv
destructor.  As result, close method becomes trivial and removed.
Final cdevsw close method might be called without file
context (e.g. in vn_open_vnode() if the vnode is reclaimed meantime),
which leaves ap_sigio registered for notification, despite cdevpriv
destructor frees the memory later.

Call destructor instead of doing a cleanup inline, for
devfs_set_cdevpriv() failure in open.  This adds missed funsetown(9)
call and locks ap to satisfy audit_pipe_free() invariants.

Reported and tested by: pho (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoSwitch legacy pty clone handler to use make_dev_s(9). Add
kib [Wed, 13 Jan 2016 12:01:28 +0000 (12:01 +0000)]
Switch legacy pty clone handler to use make_dev_s(9).  Add
MAKEDEV_CHECKNAME flag to the call, this is required to not panic on
race between the clone and destructing the closed master.

Reported by and discussed with: bde
Tested by: pho (as part of the larger patch)
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks

8 years agoIntegrate
ngie [Wed, 13 Jan 2016 09:14:27 +0000 (09:14 +0000)]
Integrate
tools/regression/geom_{concat,eli,gate,mirror,nop,raid3,shsec,stripe,uzip}
in to the FreeBSD test suite as
tests/sys/geom/class/{concat,eli,gate,mirror,nop,raid3,shsec,stripe,uzip}

The tools/regression/geom and tools/regression/geom_part testcases are being
left alone because both test sets are both currently broken.

The majority of this work was done on ^/user/ngie/more-tests2 . The differences
are as follows:
- tests/sys/geom/class/Makefile.inc is not present; it was
  inlined into the class's Makefiles for explicitness.
- The testcases officially require root via kyua
- The geom_gate(4) tests don't use the pidfile changes proposed in
  https://reviews.freebsd.org/D4836 .

MFC after: 1 month
Sponsored by: EMC / Isilon Storage Division

8 years agosfxge: cleanup: fix return code types
arybchik [Wed, 13 Jan 2016 08:09:28 +0000 (08:09 +0000)]
sfxge: cleanup: fix return code types

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: cleanup: fix typo in unused EFX_QWORD_IS_SET64
arybchik [Wed, 13 Jan 2016 07:55:47 +0000 (07:55 +0000)]
sfxge: cleanup: fix typo in unused EFX_QWORD_IS_SET64

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: cleanup: prefast fixes in common code
arybchik [Wed, 13 Jan 2016 07:46:21 +0000 (07:46 +0000)]
sfxge: cleanup: prefast fixes in common code

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

8 years agoMFhead @ r293815
ngie [Wed, 13 Jan 2016 07:44:58 +0000 (07:44 +0000)]
MFhead @ r293815

8 years agoAdd conf.sh file missed in r293621
ngie [Wed, 13 Jan 2016 07:31:59 +0000 (07:31 +0000)]
Add conf.sh file missed in r293621

MFC after: 16 days
Sponsored by: EMC / Isilon Storage Division

8 years agosfxge: cleanup: simplify EFX header includes
arybchik [Wed, 13 Jan 2016 07:25:51 +0000 (07:25 +0000)]
sfxge: cleanup: simplify EFX header includes

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

8 years agosfxge: define FATSOv2 option descriptors
arybchik [Wed, 13 Jan 2016 07:11:43 +0000 (07:11 +0000)]
sfxge: define FATSOv2 option descriptors

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: add Medford firmware subtypes definitions
arybchik [Wed, 13 Jan 2016 06:47:47 +0000 (06:47 +0000)]
sfxge: add Medford firmware subtypes definitions

Pulled firmware_ids.h from firmwaresrc and applied genfwdef script.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4897

8 years agosfxge: support MC_CMD_GET_CAPABILITIES_V2
arybchik [Wed, 13 Jan 2016 06:45:05 +0000 (06:45 +0000)]
sfxge: support MC_CMD_GET_CAPABILITIES_V2

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4896

8 years agosfxge: simplify conversion of NVRAM types to/from partition ids
arybchik [Wed, 13 Jan 2016 06:44:05 +0000 (06:44 +0000)]
sfxge: simplify conversion of NVRAM types to/from partition ids

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4895

8 years agosfxge: simplify MCDI request start
arybchik [Wed, 13 Jan 2016 06:42:51 +0000 (06:42 +0000)]
sfxge: simplify MCDI request start

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4894

8 years agosfxge: note VI_SHIFT reported in ALLOC_VIS response
arybchik [Wed, 13 Jan 2016 06:41:39 +0000 (06:41 +0000)]
sfxge: note VI_SHIFT reported in ALLOC_VIS response

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4892

8 years agosfxge: rework RX prefix handling in the common code
arybchik [Wed, 13 Jan 2016 06:40:00 +0000 (06:40 +0000)]
sfxge: rework RX prefix handling in the common code

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4889

8 years agosfxge: remove unused common code EFSYS_OPT_RX_HDR_SPLIT
arybchik [Wed, 13 Jan 2016 06:37:45 +0000 (06:37 +0000)]
sfxge: remove unused common code EFSYS_OPT_RX_HDR_SPLIT

The EFSYS_OPT_RX_HDR_SPLIT optional feature in the common code
implemented the Lookahead Split feature of Windows. This split
received packets at a preconfigured byte offset, and delivered
the header and payload portions to separate receive queues.

Now the common code interface has no callers, so remove it.

Note that this should not be confused with the Header Data Split
feature of Windows, which splits packets at a header boundary.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4888

8 years agosfxge: rename common hunt NIC methods to ef10
arybchik [Wed, 13 Jan 2016 06:34:51 +0000 (06:34 +0000)]
sfxge: rename common hunt NIC methods to ef10

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4880

8 years agoypldap(8) is a feature ready to be used to translate nis(8) database to ldap(3).
araujo [Wed, 13 Jan 2016 01:49:35 +0000 (01:49 +0000)]
ypldap(8) is a feature ready to be used to translate nis(8) database to ldap(3).

This commit, fix a core dump on ypldap(8) related with memory allocation.
Also an example of how to set the ypldap.conf(5) properly is added to
examples files.

A new user _ypldap is required to be able to run ypldap(8) as well as
in a chroot mode.

Reviewed by: rodrigc (mentor), bjk
Approved by: bapt (mentor)
Relnotes: Yes
Sponsored by: gandi.net
Differential Revision: https://reviews.freebsd.org/D4744

8 years agoFix typo in libefi.c
smh [Wed, 13 Jan 2016 00:37:28 +0000 (00:37 +0000)]
Fix typo in libefi.c

Fix a typo in libefl.c (removal or L) introduced by r293724

MFC after: 2 weeks
X-MFC-With: r293268
Sponsored by: Multiplay

8 years agoGo back to using uintptr_t, because code that actually compiles is
ian [Wed, 13 Jan 2016 00:22:12 +0000 (00:22 +0000)]
Go back to using uintptr_t, because code that actually compiles is
infinitely less buggy than code that is theoretically correct in some
alternate universe.

The uintfptr_t type is apparently a freebsd invention, and exists only when
compiling the kernel.  It's a little hard to say for sure, since it doesn't
seem to be documented anywhere except in email advice to unsuspecting and
overly-trusting souls, who then get to wear the pointy hat for blindly
following advice without investigating or testing it first.

8 years agoUpdate futimens/utimensat for MFC to stable/10:
jilles [Tue, 12 Jan 2016 20:53:57 +0000 (20:53 +0000)]
Update futimens/utimensat for MFC to stable/10:

* Fix __FreeBSD_version check.
* Update history section in man page.

An MFC of this commit to stable/10 will allow using the new system calls
instead of the fallback.

MFC after: 3 days

8 years agoRestore uart PPS signal capture polarity to its historical norm, and add an
ian [Tue, 12 Jan 2016 18:42:00 +0000 (18:42 +0000)]
Restore uart PPS signal capture polarity to its historical norm, and add an
option to invert the polarity in software. Also add an option to capture
very narrow pulses by using the hardware's MSR delta-bit capability of
latching line state changes.

This effectively reverts the mistake I made in r286595 which was based on
empirical measurements made on hardware using TTL-level signaling, in which
the logic levels are inverted from RS-232. Thus, this re-syncs the polarity
with the requirements of RFC 2783, which is writen in terms of RS-232
signaling.

Narrow-pulse mode uses the ability of most ns8250 and similar chips to
provide a delta indication in the modem status register. The hardware is
able to notice and latch the change when the pulse width is shorter than
interrupt latency, which results in the signal no longer being asserted by
time the interrupt service code runs. When running in this mode we get
notified only that "a pulse happened" so the driver synthesizes both an
ASSERT and a CLEAR event (with the same timestamp for each). When the pulse
width is about equal to the interrupt latency the driver may intermittantly
see both edges of the pulse. To prevent generating spurious events, the
driver implements a half-second lockout period after generating an event
before it will generate another.

Differential Revision: https://reviews.freebsd.org/D4477

8 years agoCast using uintfptr_t and eliminate the cast to uint64_t which is uneeded
ian [Tue, 12 Jan 2016 16:31:07 +0000 (16:31 +0000)]
Cast using uintfptr_t and eliminate the cast to uint64_t which is uneeded
because rounding down cannot increase the number of bits needed to express
the result.

I had no idea there was such a thing as uintfptr_t.

Requested by: bde

8 years agosfxge: regenerate MCDI header
arybchik [Tue, 12 Jan 2016 16:21:34 +0000 (16:21 +0000)]
sfxge: regenerate MCDI header

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: remove obsolete lookahead split RXQ support
arybchik [Tue, 12 Jan 2016 15:35:00 +0000 (15:35 +0000)]
sfxge: remove obsolete lookahead split RXQ support

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4891

8 years agosfxge: pass context type and num_queues to efx_mcdi_rss_context_alloc
arybchik [Tue, 12 Jan 2016 15:33:48 +0000 (15:33 +0000)]
sfxge: pass context type and num_queues to efx_mcdi_rss_context_alloc

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4890

8 years agoFix local macro for early KVA allocation.
skra [Tue, 12 Jan 2016 15:31:32 +0000 (15:31 +0000)]
Fix local macro for early KVA allocation.

Only crashdumpmap allocation was affected which is used for temporary
mappings during panic dump.

Approved by: kib (mentor)

8 years agosfxge: cleanup: use consistent types for NVRAM partitions
arybchik [Tue, 12 Jan 2016 15:31:20 +0000 (15:31 +0000)]
sfxge: cleanup: use consistent types for NVRAM partitions

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4887

8 years agosfxge: fix interrupt handling for Medford
arybchik [Tue, 12 Jan 2016 15:28:59 +0000 (15:28 +0000)]
sfxge: fix interrupt handling for Medford

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4886

8 years agosfxge: update NVRAM partition lookup for Medford
arybchik [Tue, 12 Jan 2016 15:28:10 +0000 (15:28 +0000)]
sfxge: update NVRAM partition lookup for Medford

Prior to Medford, option ROM config was stored with one partition
per network port. Medford stores option ROM config in a single
partition (as an array of configurations, one per PF).

Update the EFXname /port to MCDI partition mapping for this.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4885

8 years agosfxge: cleanup: improve consistency in efx_check.h
arybchik [Tue, 12 Jan 2016 15:27:11 +0000 (15:27 +0000)]
sfxge: cleanup: improve consistency in efx_check.h

Make error messages consistent, and remove redundant checks.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4884

8 years agosfxge: remove obsolete efx_mac_hash_set() from common code
arybchik [Tue, 12 Jan 2016 15:26:17 +0000 (15:26 +0000)]
sfxge: remove obsolete efx_mac_hash_set() from common code

This API has been replaced by efx_mac_multicast_list_set()
and has no callers.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4883

8 years agosfxge: rework MCDI header version handling
arybchik [Tue, 12 Jan 2016 15:25:03 +0000 (15:25 +0000)]
sfxge: rework MCDI header version handling

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4882

8 years agosfxge: rename hunt filter methods, types etc. to ef10 and use for Medford
arybchik [Tue, 12 Jan 2016 15:24:13 +0000 (15:24 +0000)]
sfxge: rename hunt filter methods, types etc. to ef10 and use for Medford

New filters types may be added, but the same machinery should be able to
handle them.

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4881

8 years agosfxge: add definitions for compressed satellite images to common code headers
arybchik [Tue, 12 Jan 2016 15:21:52 +0000 (15:21 +0000)]
sfxge: add definitions for compressed satellite images to common code headers

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4878

8 years agosfxge: add new MCDI sensors to common code
arybchik [Tue, 12 Jan 2016 15:20:53 +0000 (15:20 +0000)]
sfxge: add new MCDI sensors to common code

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4877

8 years agosfxge: remove unnecessary pulling out of soft bits from RX events
arybchik [Tue, 12 Jan 2016 15:20:03 +0000 (15:20 +0000)]
sfxge: remove unnecessary pulling out of soft bits from RX events

These bigs are changed on Medford.

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4876

8 years agosfxge: remove obsolete common code PKTFILTER module
arybchik [Tue, 12 Jan 2016 13:42:27 +0000 (13:42 +0000)]
sfxge: remove obsolete common code PKTFILTER module

The pktfilter module has been obsolete for some time, as
it was replaced by newer features in filter module. With
the removal of the storport driver, this module has no
users and can be removed.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4875

8 years agosfxge: rename hunt MCDI methods to ef10 and use for Medford
arybchik [Tue, 12 Jan 2016 13:39:25 +0000 (13:39 +0000)]
sfxge: rename hunt MCDI methods to ef10 and use for Medford

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4874

8 years agosfxge: rename hunt nvram methods and use for Medford
arybchik [Tue, 12 Jan 2016 13:37:58 +0000 (13:37 +0000)]
sfxge: rename hunt nvram methods and use for Medford

Some new partitions have been added, but they shouldn't need to be
handled any differently.

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4873

8 years agosfxge: rename Huntington VPD methods to ef10 and use for Medford
arybchik [Tue, 12 Jan 2016 13:36:21 +0000 (13:36 +0000)]
sfxge: rename Huntington VPD methods to ef10 and use for Medford

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4872

8 years agosfxge: rename hunt RX methods to ef10 and use for Medford
arybchik [Tue, 12 Jan 2016 13:34:55 +0000 (13:34 +0000)]
sfxge: rename hunt RX methods to ef10 and use for Medford

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4871

8 years agosfxge: rename hunt TX methods to ef10 and use for Medford
arybchik [Tue, 12 Jan 2016 13:33:16 +0000 (13:33 +0000)]
sfxge: rename hunt TX methods to ef10 and use for Medford

Rename all except hunt_tx_qdesc_tso_create(), which creates a
fw-assisted TSO v1 descriptor which isn't supported on Medford.

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4870

8 years agosfxge: rename hunt ev methods to ef10 and use for Medford
arybchik [Tue, 12 Jan 2016 13:32:04 +0000 (13:32 +0000)]
sfxge: rename hunt ev methods to ef10 and use for Medford

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4869

8 years agosfxge: rename hunt interrupt methods to ef10 and use on Medford
arybchik [Tue, 12 Jan 2016 13:30:42 +0000 (13:30 +0000)]
sfxge: rename hunt interrupt methods to ef10 and use on Medford

All of these apply to both Huntington and Medford.

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4868

8 years agosfxge: update SRAM methods to be no-ops on Medford as well
arybchik [Tue, 12 Jan 2016 13:29:05 +0000 (13:29 +0000)]
sfxge: update SRAM methods to be no-ops on Medford as well

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4867

8 years agosfxge: use NIC config in place of some Huntington specific PIO constants
arybchik [Tue, 12 Jan 2016 13:27:46 +0000 (13:27 +0000)]
sfxge: use NIC config in place of some Huntington specific PIO constants

This should allow these functions to work for Medford as well.

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4866

8 years agosfxge: change hunt specific fields of efx_nic_t to ef10
arybchik [Tue, 12 Jan 2016 13:26:04 +0000 (13:26 +0000)]
sfxge: change hunt specific fields of efx_nic_t to ef10

All these fields will be used in shared ef10 code, so put them in an
ef10 member of a per-architecture union, rather that in the per-chip
union.

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4865

8 years agoDocument etherswitch and drivers using this framework.
brueffer [Tue, 12 Jan 2016 10:19:56 +0000 (10:19 +0000)]
Document etherswitch and drivers using this framework.

MFC after: 2 weeks

8 years agoAdd a basic bhyvectl manpage.
brueffer [Tue, 12 Jan 2016 10:16:15 +0000 (10:16 +0000)]
Add a basic bhyvectl manpage.

Reviewed by: neel
MFC after: 2 weeks

8 years agosfxge: update autogenerated monitors lists
arybchik [Tue, 12 Jan 2016 09:52:38 +0000 (09:52 +0000)]
sfxge: update autogenerated monitors lists

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

8 years agoEnable "EC2 Enhanced Networking" (aka. SR-IOV networking) when creating
cperciva [Tue, 12 Jan 2016 09:42:21 +0000 (09:42 +0000)]
Enable "EC2 Enhanced Networking" (aka. SR-IOV networking) when creating
EC2 images.

X-MFC after: if/when the driver fixes get MFCed
Relnotes: FreeBSD now supports EC2 Enhanced Networking

8 years agosfxge: add medford_impl.h, medford_nic.c, ef10_impl.h
arybchik [Tue, 12 Jan 2016 08:32:53 +0000 (08:32 +0000)]
sfxge: add medford_impl.h, medford_nic.c, ef10_impl.h

Creating some files together to do the build system changes in one go.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4859

8 years agosfxge: add Medford sensor support
arybchik [Tue, 12 Jan 2016 06:37:42 +0000 (06:37 +0000)]
sfxge: add Medford sensor support

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4858

8 years agosfxge: use MCDIv2 on Medford
arybchik [Tue, 12 Jan 2016 06:34:45 +0000 (06:34 +0000)]
sfxge: use MCDIv2 on Medford

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4857

8 years agosfxge: add Medford PCI IDs to common code
arybchik [Tue, 12 Jan 2016 06:32:56 +0000 (06:32 +0000)]
sfxge: add Medford PCI IDs to common code

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4856

8 years agosfxge: add sanity checking for EFX_OPT_MEDFORD build option to efx_check.h
arybchik [Tue, 12 Jan 2016 06:29:17 +0000 (06:29 +0000)]
sfxge: add sanity checking for EFX_OPT_MEDFORD build option to efx_check.h

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4854

8 years agoEnable warnings in EFI boot code
smh [Tue, 12 Jan 2016 02:17:39 +0000 (02:17 +0000)]
Enable warnings in EFI boot code

Set WARNS if not set for EFI boot code and fix the issues highlighted by
setting it.

Most components are set to WARNS level 6 with few being left at lower
levels due to the amount of changes needed to fix at higher levels.

Error types fixed:
* Missing / invalid casts
* Missing inner structs
* Unused vars
* Missing static for internal only funcs
* Missing prototypes
* Alignment changes
* Use of uninitialised vars
* Unknown pragma (intrinsic)
* Missing types etc due to missing includes
* printf formatting types

Reviewed by: emaste (in part)
MFC after: 2 weeks
X-MFC-With: r293268
Sponsored by: Multiplay
Differential Revision: https://reviews.freebsd.org/D4839

8 years agohyperv/hn: Removed unused netvsc_init()
sephe [Tue, 12 Jan 2016 01:55:57 +0000 (01:55 +0000)]
hyperv/hn: Removed unused netvsc_init()

Submitted by: Dexuan Cui <decui microsoft com>
Reviewed by: me, adrian, royger,
Hongjiang Zhang <honzhan microsoft com>
Approved by: adrian (mentor)
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D4594

8 years agohyperv/hn: Avoid mbuf cluster allocation, if the packet is small.
sephe [Tue, 12 Jan 2016 01:50:56 +0000 (01:50 +0000)]
hyperv/hn: Avoid mbuf cluster allocation, if the packet is small.

This one mainly avoids mbuf cluster allocation for TCP ACKs during
TCP sending tests.  And it gives me ~200Mbps improvement (4.7Gbps
-> 4.9Gbps), when running iperf3 TCP sending test w/ 16 connections.

While I'm here, nuke the unnecessary zeroing out pkthdr.csum_flags.

Reviewed by: adrain
Approved by: adrian (mentor)
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D4853

8 years agohyperv/hn: Implement SIOC[SG]IFMEDIA support
sephe [Tue, 12 Jan 2016 01:41:34 +0000 (01:41 +0000)]
hyperv/hn: Implement SIOC[SG]IFMEDIA support

Many applications and kernel modules (e.g. bridge) rely on the ifmedia
status report; give them what they want.

Submitted by: Dexuan Cui <decui microsoft com>
Reviewed by: Jun Su <junsu microsoftc com>, me, adrian
Modified by: me (minor)
Original differential: https://reviews.freebsd.org/D4611
Differential Revision: https://reviews.freebsd.org/D4852
Approved by: adrian (mentor)
Sponsored by: Microsoft OSTC

8 years agohyperv/hn: Implement LRO
sephe [Tue, 12 Jan 2016 01:30:51 +0000 (01:30 +0000)]
hyperv/hn: Implement LRO

- Implement the LRO using tcp_lro APIs, and LRO is enabled by default.
- Add several stats sysctl nodes.
- Check IP/TCP length before sending the packet to tcp_lro_rx(), if host
  does not provide RX csum information (*); and add an option through
  sysctl to always trust host TCP segment csum checks (default is off).
- Add sysctl to control the LRO entry depth; it is disabled by default.
  It is used to avoid holding too much TCP segments in driver.  Limiting
  the LRO entry depth helps a lot in a one/two streams RX test.

This one 3x the RX performance on my local test (3Gbps -> 10Gbps), and
~2x the RX performance over a directly connected 40Ge network (5Gbps ->
9Gbps).

(*) It seems the host stops supplying csum information, once the network
load is high.  This still needs investigation...

Reviewed by: Hongjiang Zhang <honzhan microsoft com>,
Dexuan Cui <decui microsoft com>,
Jun Su <junsu microsoft com>,
delphij
Tested by: me (local),
Hongjiang Zhang <honzhan microsoft com>
(directly connected 40Ge)
Approved by: delphij (mentor), adrian (mentor, no objection)
With feedback from: delphij, Hongjiang Zhang <honzhan microsoft com>
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D4824

8 years agowpi, iwn: implement ic_getradiocaps method
avos [Tue, 12 Jan 2016 00:24:40 +0000 (00:24 +0000)]
wpi, iwn: implement ic_getradiocaps method

This will allow to restore channel list after switching interface
to more restrictive regdomain.

Tested with Intel 3945BG (wpi) only.

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4863

8 years agoFix a mismerge from NetBSD in r162194 with `xdr_rpcb_entry_list_ptr(..)`
ngie [Tue, 12 Jan 2016 00:20:57 +0000 (00:20 +0000)]
Fix a mismerge from NetBSD in r162194 with `xdr_rpcb_entry_list_ptr(..)`

This fixes the potential NULL pointer dereference properly, and also fixes
memory leaks encountered in the process of iterating through `*rp`.

MFC after: 1 week
Found by: Valgrind
Reported by: Dan Roberts <dan.roberts@isilon.com>
Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>
Sponsored by: EMC / Isilon Storage Division

8 years agortwn: import r290022 (do not filter out control frames in the RX path)
avos [Tue, 12 Jan 2016 00:12:18 +0000 (00:12 +0000)]
rtwn: import r290022 (do not filter out control frames in the RX path)

Tested by: kevlo
Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4838

8 years agoFix importing l2arc device by guid
asomers [Mon, 11 Jan 2016 22:15:46 +0000 (22:15 +0000)]
Fix importing l2arc device by guid

After r292066, vdev_geom verifies both the vdev and pool guids of device
labels during open. However, spare and l2arc devices don't have pool guids,
so opening them by guid will fail (opening by path, when the pathname is
known, still succeeds). This change allows a vdev to be opened by guid if
the label contains no pool_guid, which is the case for inactive spares and
l2arc devices.

PR: 292066
Reported by: delphij
Reviewed by: delphij, smh
MFC after: 2 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D4861

8 years agoSimilar to r293704, fix theoretical leak of netconfig(3) resources in
ngie [Mon, 11 Jan 2016 22:01:33 +0000 (22:01 +0000)]
Similar to r293704, fix theoretical leak of netconfig(3) resources in
__rpcbind_is_up(..) if getnetconfig(3) is partly successful in allocating
resources, but not completely successful by moving the endnetconfig(3) call
up before we return from the function if nconf == NULL.

MFC after: 1 week
Reported by: Coverity
Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>
Sponsored by: EMC / Isilon Storage Division

8 years agoFix theoretical leak of netconfig(3) resources in svcunix_create(..)
ngie [Mon, 11 Jan 2016 21:56:53 +0000 (21:56 +0000)]
Fix theoretical leak of netconfig(3) resources in svcunix_create(..)

In the event that the getconfig(3) call in svcunix_create is partly successful,
some of the netconfig(3) resources allocated might be leaked if the call returns
NULL as endnetconfig(3) wasn't called explicitly in that case. Ensure that the
resources are fully cleaned up by going to the `done` label, which will call
endnetconfig(3) for us.

MFC after: 1 week
Reported by: Coverity
Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>
Sponsored by: EMC / Isilon Storage Division

8 years agoDisable building the csqrt_test test on arm64, it hits an assert in
andrew [Mon, 11 Jan 2016 21:29:36 +0000 (21:29 +0000)]
Disable building the csqrt_test test on arm64, it hits an assert in
llvm 3.8.

8 years agoAdd two more assertions to catch busdma problems. Each segment provided
cperciva [Mon, 11 Jan 2016 21:02:30 +0000 (21:02 +0000)]
Add two more assertions to catch busdma problems.  Each segment provided
by busdma to the blkfront driver must be an integer number of sectors,
and must be aligned in memory on a "sector" boundary.

Having these assertions yesterday would have made finding the bug fixed
in r293698 somewhat easier.

8 years agoFix a bug introduced in r291716:
cperciva [Mon, 11 Jan 2016 20:38:39 +0000 (20:38 +0000)]
Fix a bug introduced in r291716:

"The problem with the approach taken both in _bus_dmamap_load_pages and
bus_dmamap_load_ma_triv is that they split the request buffer into
arbitrary chunks based on page boundaries, creating segments that no
longer have a size that's a multiple of the sector size. This breaks
drivers like blkfront (and probably other stuff)." [1]

This was most easily triggered by running `fsck /` on a system running
in Xen (e.g. Amazon EC2) but also showed up via growfs(8) and probably
many other userland tools which access the disk directly.

Patch by: royger [1]
"Thinks this should be fine" by: ken

8 years agoCorrect a comment.
bdrewery [Mon, 11 Jan 2016 20:27:05 +0000 (20:27 +0000)]
Correct a comment.

Submitted by: jhb

8 years agoMerge ^/head r293430 through r293685.
dim [Mon, 11 Jan 2016 19:36:44 +0000 (19:36 +0000)]
Merge ^/head r293430 through r293685.

8 years agoAfter upstream llvm trunk r252903 and clang trunk r252904, -mcpu=xscale
dim [Mon, 11 Jan 2016 19:29:12 +0000 (19:29 +0000)]
After upstream llvm trunk r252903 and clang trunk r252904, -mcpu=xscale
was not recognized anymore for arm targets.  Fix this by adding the
correct sub-arch to the xscale definition in ARMTargetParser.def.  This
fix (from Andrew Turner) has also been submitted upstream.

8 years agoext4: mount panic from freeing invalid pointers
pfg [Mon, 11 Jan 2016 19:25:43 +0000 (19:25 +0000)]
ext4: mount panic from freeing invalid pointers

Initialize the struct with those fields to zeroes on allocation,
preventing the panic.

Patch by: Damjan Jovanovic.

PR: 206056
MFC after: 3 days

8 years agoext4: add support for reading sparse files
pfg [Mon, 11 Jan 2016 19:14:55 +0000 (19:14 +0000)]
ext4: add support for reading sparse files

Add support for sparse files in ext4. Also implement read-ahead, which
greatly increases the performance when transferring files from ext4.

Both features implemented by Damjan Jovanovic.

PR: 205816
MFC after: 1 week

8 years agoChange the type of newsize argument in the smbfs_smb_setfsize() function
ae [Mon, 11 Jan 2016 18:11:06 +0000 (18:11 +0000)]
Change the type of newsize argument in the smbfs_smb_setfsize() function
from int to int64.
MSDN says that SMB_SET_FILE_END_OF_FILE_INFO uses signed 64-bit integer
to specify offset, but since smbfs_smb_setfsize() has used plain int,
a value was truncated in case when offset was larger than 2G.
https://msdn.microsoft.com/en-us/library/ff469975.aspx

In particular, now `truncate -s 10G` will work correctly on the mounted
SMB share.

Reported and tested by: Eugene Grosbein <eugen at grosbein dot net>
MFC after: 1 week

8 years agoUpdate ismt(4) man page to reflect inclusion in upcoming 10.3 release.
jimharris [Mon, 11 Jan 2016 17:57:49 +0000 (17:57 +0000)]
Update ismt(4) man page to reflect inclusion in upcoming 10.3 release.

MFC after: 3 days
Sponsored by: Intel

8 years agoRecord physical path information in ZFS Vdevs
asomers [Mon, 11 Jan 2016 17:57:26 +0000 (17:57 +0000)]
Record physical path information in ZFS Vdevs

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c:
If available, record the physical path of a vdev in ZFS meta-data.
Do this both when opening the vdev, and when receiving an attribute
change notification from GEOM.

Make vdev_geom_close() synchronous instead of deferring its work to
a GEOM event handler. There is no benefit to deferring the work and
this prevents a future open call from referencing a consumer that is
scheduled for destruction. The close followed by an immediate open
will occur during a vdev reprobe triggered by any type of I/O error.

Consolidate vdev_geom_close() and vdev_geom_detach() into
vdev_geom_close() and vdev_geom_close_locked(). This also moves the
cross linking operations between vdev and GEOM consumer into a
single place (linking in vdev_geom_attach() and unlinking in
vdev_geom_close_locked()).

Submitted by: gibbs, asomers
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D4524

8 years agocxgbe: bind the ithreads that handle NIC rx to the correct CPU if the kernel
np [Mon, 11 Jan 2016 17:52:42 +0000 (17:52 +0000)]
cxgbe: bind the ithreads that handle NIC rx to the correct CPU if the kernel
is built with option RSS.

8 years agoDIOCGSECTORSIZE expects to write to a u_int, but struct zfs_probe_args
allanjude [Mon, 11 Jan 2016 15:35:29 +0000 (15:35 +0000)]
DIOCGSECTORSIZE expects to write to a u_int, but struct zfs_probe_args
member secsz was a uint16_t

sys/boot/zfs/zfs.c has a probe args structure member, secsz, that is a
uint16_t for media sector size; it is used as an argument for ioctl()
at line 484. however, this ioctl writes 32 bits of data (u_int *) and
therefore this ioctl will overwrite and corrupt 16 bits of memory.
other use cases seem to use correct u_int type for secsz.

PR: 204358
Submitted by: Toomas Soome <tsoome at me.com>
Reviewed by: asomers, delphij, smh
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D4811

8 years agoClose iSCSI sessions on shutdown
smh [Mon, 11 Jan 2016 10:24:30 +0000 (10:24 +0000)]
Close iSCSI sessions on shutdown

Ensure that all iSCSI sessions are correctly terminated during shutdown.

* Enhances the changes done by r286226 (D3052).
* Add shutdown post sync event to run after filesystem shutdown
  (SHUTDOWN_PRI_FIRST) but before CAM shutdown (SHUTDOWN_PRI_DEFAULT).
* Changes iscsi_maintenance_thread to processes terminate in preference to
  reconnect.

Reviewed by: trasz
MFC after: 2 weeks
Sponsored by: Multiplay
Differential Revision: https://reviews.freebsd.org/D4429

8 years agosfxge: add Medford build option disabled by default
arybchik [Mon, 11 Jan 2016 09:15:25 +0000 (09:15 +0000)]
sfxge: add Medford build option disabled by default

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

8 years agoBring RADIX_MPATH support to new routing KPI to ease migration.
melifaro [Mon, 11 Jan 2016 08:45:28 +0000 (08:45 +0000)]
Bring RADIX_MPATH support to new routing KPI to ease migration.

Move actual rte selection process from rtalloc_mpath_fib()
  to the rt_path_selectrte() function. Add public
  rt_mpath_select() to use in fibX_lookup_ functions.