]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
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 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 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.

8 years agoDo not rewrite all ro_flags.
melifaro [Mon, 11 Jan 2016 08:00:13 +0000 (08:00 +0000)]
Do not rewrite all ro_flags.

8 years agohyperv/kvp_daemon: Make poll(2) block indefinitely
sephe [Mon, 11 Jan 2016 03:30:16 +0000 (03:30 +0000)]
hyperv/kvp_daemon: Make poll(2) block indefinitely

Submitted by: Jun Su <junsu microsoft com>
Reviewed by: Dexuan Cui <decui microsoft com>, me, adrain
Approved by: adrian
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D4762

8 years agoUse -mlong-calls to build crt1.o and gcrt1.o. This tells the compiler to
andrew [Sun, 10 Jan 2016 23:41:31 +0000 (23:41 +0000)]
Use -mlong-calls to build crt1.o and gcrt1.o. This tells the compiler to
generate code to branch based on an address in a register. This allows us
to have binaries larger than the 32MiB limit of a branch instruction.

The main use of this is with clang. Clang 3.8.0 has been shown to be larger
than the above limit.

8 years agoFix bhyve(1) operation on vmnet devices, broken in r293459.
glebius [Sun, 10 Jan 2016 20:10:34 +0000 (20:10 +0000)]
Fix bhyve(1) operation on vmnet devices, broken in r293459.

8 years ago- Add support for Advantech PCI-1602 Rev. B1 and PCI-1603 cards. [1]
marius [Sun, 10 Jan 2016 18:11:23 +0000 (18:11 +0000)]
- Add support for Advantech PCI-1602 Rev. B1 and PCI-1603 cards. [1]
- Add a description of Advantech PCI-1602 Rev. A boards. [1]
- Properly set up REG_ACR also for PCI-1602 Rev. A based on what the
  Advantech-supplied Linux driver does.
- Additionally use the macros of <dev/ic/ns16550.h> to replace existing
  magic values and get rid of trivial comments.
- Fix the style of some comments.

PR: 205359 [1]
Submitted by: Jan Mikkelsen (original patch) [1]

8 years agoRemove dead code and dead comments, most notably the implemenation of the
nwhitehorn [Sun, 10 Jan 2016 18:00:01 +0000 (18:00 +0000)]
Remove dead code and dead comments, most notably the implemenation of the
now-obsolete setfault(). No NetBSD code exists in the AIM locore files, so
update the copyrights there.

8 years agoFix the domain iterator to not try the first-touch / fixed domain
adrian [Sun, 10 Jan 2016 17:53:43 +0000 (17:53 +0000)]
Fix the domain iterator to not try the first-touch / fixed domain
more than once when doing round-robin.

This lead to a panic because the iterator was trying the same domain
twice and not trying one of the other domains.

Reported by: pho
Tested by: pho

8 years agoUse setjmp() instead of the identical-except-for-having-a-wrong-prototype
nwhitehorn [Sun, 10 Jan 2016 16:42:14 +0000 (16:42 +0000)]
Use setjmp() instead of the identical-except-for-having-a-wrong-prototype
setfault() when testing for faults. This should also help the compiler
do the right thing with this complicated-to-optimize function.

8 years agosh: Update associated state when restoring locals while leaving a function.
jilles [Sun, 10 Jan 2016 16:31:28 +0000 (16:31 +0000)]
sh: Update associated state when restoring locals while leaving a function.

Some variables like PATH call a function when modified. Make sure to call
this also when leaving a function where such a variable was made local.

Make sure to restore local variables before shellparam, so getopts state is
not clobbered.

8 years agoSplit in6_selectsrc() into in6_selectsrc_addr() and in6_selectsrc_socket().
melifaro [Sun, 10 Jan 2016 13:40:29 +0000 (13:40 +0000)]
Split in6_selectsrc() into in6_selectsrc_addr() and in6_selectsrc_socket().

in6_selectsrc() has 2 class of users: socket-based one (raw/udp/pcb/etc) and
  socket-less (ND code). The main reason for that change is inability to
  specify non-default FIB for callers w/o socket since (internally) inpcb
  is used to determine fib.

As as result, add 2 wrappers for in6_selectsrc() (making in6_selectsrc()
  static):
1) in6_selectsrc_socket() for the former class. Embed scope_ambiguous check
  along with returning hop limit when needed.
2) in6_selectsrc_addr() for the latter case. Add 'fibnum' argument and
  pass IPv6 address  w/ explicitly specified scope as separate argument.

Reviewed by: ae (previous version)

8 years agoDo not hold ifaddr reference for the whole icmp6_reflect() exec time.
melifaro [Sun, 10 Jan 2016 11:59:55 +0000 (11:59 +0000)]
Do not hold ifaddr reference for the whole icmp6_reflect() exec time.

Copy source address, calculate hlim and release refcount instead.

8 years agocommitter-src.dot: Add {adrian,delphij}->me
sephe [Sun, 10 Jan 2016 08:41:01 +0000 (08:41 +0000)]
committer-src.dot: Add {adrian,delphij}->me

Approved by: adrian (mentor)

8 years agoInitialize error value ta_lookup_kfib() by default to please compiler.
melifaro [Sun, 10 Jan 2016 08:37:00 +0000 (08:37 +0000)]
Initialize error value ta_lookup_kfib() by default to please compiler.

8 years agoInitialize error after r293626 in case neither INET nor INET6 is
bz [Sun, 10 Jan 2016 08:14:25 +0000 (08:14 +0000)]
Initialize error after r293626 in case neither INET nor INET6 is
compiled into the kernel.  Ideally lots more code would just not
be called (or compiled in) in that case but that requires a lot
more surgery.  For now try to make IP-less kernels compile again.

8 years agoConvert ipfilter to the new routing KPI.
melifaro [Sun, 10 Jan 2016 07:50:35 +0000 (07:50 +0000)]
Convert ipfilter to the new routing KPI.

Differential Revision: D4764

8 years agoUnlock process lock when return error from getrobustlist call and add
dchagin [Sun, 10 Jan 2016 07:36:43 +0000 (07:36 +0000)]
Unlock process lock when return error from getrobustlist call and add
an forgotten dtrace probe when return the same error.

MFC after: 3 days
XMFC with: r292743

8 years agoMake ipfw addr:kfib lookup algo use new routing KPI.
melifaro [Sun, 10 Jan 2016 06:43:43 +0000 (06:43 +0000)]
Make ipfw addr:kfib lookup algo use new routing KPI.

8 years agoUse already pre-calculated number of entries instead of tc->count.
melifaro [Sun, 10 Jan 2016 00:28:44 +0000 (00:28 +0000)]
Use already pre-calculated number of entries instead of tc->count.

8 years agoRemove Makefile now that the testcases are all TAP based and
ngie [Sat, 9 Jan 2016 23:46:52 +0000 (23:46 +0000)]
Remove Makefile now that the testcases are all TAP based and
prove -rv can be used on them

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division

8 years ago- Delete non-TAP testcases
ngie [Sat, 9 Jan 2016 23:45:25 +0000 (23:45 +0000)]
- Delete non-TAP testcases
- Add a conf.sh file for executing common functions with geom_gate
- Use attach_md for attaching md(4) devices
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox
- Add/increase sleeps to try and improve synchronization
- Add debug output for when checksums fail

test-1.t:
- Use pkill for killing ggated

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoFix improper duration for f_dialog_pause() API
dteske [Sat, 9 Jan 2016 23:13:43 +0000 (23:13 +0000)]
Fix improper duration for f_dialog_pause() API

MFC after: 3 days
X-MFC-to: stable/10

8 years agortwn: fix sequence number assignment (part of r290630)
avos [Sat, 9 Jan 2016 21:45:21 +0000 (21:45 +0000)]
rtwn: fix sequence number assignment (part of r290630)

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

8 years agoMake graphical consoles work under PowerKVM. Without using hypercalls, it is
nwhitehorn [Sat, 9 Jan 2016 21:28:56 +0000 (21:28 +0000)]
Make graphical consoles work under PowerKVM. Without using hypercalls, it is
not possible to write the framebuffer before pmap is up. Solve this by
deferring initialization until that happens, like on PS3.

MFC after: 1 week

8 years agoImplement vsyscall hack. Prior to 2.13 glibc uses vsyscall
dchagin [Sat, 9 Jan 2016 20:18:53 +0000 (20:18 +0000)]
Implement vsyscall hack. Prior to 2.13 glibc uses vsyscall
instead of vdso. An upcoming linux_base-c6 needs it.

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

Reviewed by: kib, trasz
MFC after: 1 week