Commit Graph

207484 Commits

Author SHA1 Message Date
Marcelo Araujo
3bf7d9a6eb 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
2016-01-13 01:49:35 +00:00
Steven Hartland
1b383bfca2 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
2016-01-13 00:37:28 +00:00
Ian Lepore
d45f99dee1 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.
2016-01-13 00:22:12 +00:00
Jilles Tjoelker
b956ae7c20 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
2016-01-12 20:53:57 +00:00
Ian Lepore
fdfbb3f5b1 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
2016-01-12 18:42:00 +00:00
Ian Lepore
c1f892e0d1 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
2016-01-12 16:31:07 +00:00
Andrew Rybchenko
16b3294e2f sfxge: regenerate MCDI header
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-12 16:21:34 +00:00
Andrew Rybchenko
1759d5d5e7 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
2016-01-12 15:35:00 +00:00
Andrew Rybchenko
219e008793 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
2016-01-12 15:33:48 +00:00
Svatopluk Kraus
339d7dad7a 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)
2016-01-12 15:31:32 +00:00
Andrew Rybchenko
8eea4a0acb 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
2016-01-12 15:31:20 +00:00
Andrew Rybchenko
0c24a07e20 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
2016-01-12 15:28:59 +00:00
Andrew Rybchenko
f5969609b9 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
2016-01-12 15:28:10 +00:00
Andrew Rybchenko
3d385f4e51 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
2016-01-12 15:27:11 +00:00
Andrew Rybchenko
74bb0ed8b9 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
2016-01-12 15:26:17 +00:00
Andrew Rybchenko
14d6f73e33 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
2016-01-12 15:25:03 +00:00
Andrew Rybchenko
1289fe72c4 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
2016-01-12 15:24:13 +00:00
Andrew Rybchenko
1fa702a261 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
2016-01-12 15:21:52 +00:00
Andrew Rybchenko
8b286d1c57 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
2016-01-12 15:20:53 +00:00
Andrew Rybchenko
5a2680acd4 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
2016-01-12 15:20:03 +00:00
Andrew Rybchenko
dae248ee46 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
2016-01-12 13:42:27 +00:00
Andrew Rybchenko
ead1c5dfe5 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
2016-01-12 13:39:25 +00:00
Andrew Rybchenko
de9775ad34 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
2016-01-12 13:37:58 +00:00
Andrew Rybchenko
5311abfa25 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
2016-01-12 13:36:21 +00:00
Andrew Rybchenko
b627be989d 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
2016-01-12 13:34:55 +00:00
Andrew Rybchenko
cc62e811f9 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
2016-01-12 13:33:16 +00:00
Andrew Rybchenko
ad8a32cb5d 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
2016-01-12 13:32:04 +00:00
Andrew Rybchenko
15f20ea67d 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
2016-01-12 13:30:42 +00:00
Andrew Rybchenko
3c5bf8f1c2 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
2016-01-12 13:29:05 +00:00
Andrew Rybchenko
b026a4006f 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
2016-01-12 13:27:46 +00:00
Andrew Rybchenko
e7119ad9ae 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
2016-01-12 13:26:04 +00:00
Christian Brueffer
f45757caea Document etherswitch and drivers using this framework.
MFC after:	2 weeks
2016-01-12 10:19:56 +00:00
Christian Brueffer
799d68c024 Add a basic bhyvectl manpage.
Reviewed by:	neel
MFC after:	2 weeks
2016-01-12 10:16:15 +00:00
Andrew Rybchenko
435c201468 sfxge: update autogenerated monitors lists
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-12 09:52:38 +00:00
Colin Percival
4d6b637675 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
2016-01-12 09:42:21 +00:00
Andrew Rybchenko
5f5c71cc13 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
2016-01-12 08:32:53 +00:00
Andrew Rybchenko
b13ad4deb6 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
2016-01-12 06:37:42 +00:00
Andrew Rybchenko
19bc938f5a 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
2016-01-12 06:34:45 +00:00
Andrew Rybchenko
34f6ea2980 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
2016-01-12 06:32:56 +00:00
Andrew Rybchenko
8883918d66 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
2016-01-12 06:29:17 +00:00
Steven Hartland
022e692a47 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
2016-01-12 02:17:39 +00:00
Sepherosa Ziehau
4f8f2d4274 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
2016-01-12 01:55:57 +00:00
Sepherosa Ziehau
c48d20d7c7 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
2016-01-12 01:50:56 +00:00
Sepherosa Ziehau
da949700f2 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
2016-01-12 01:41:34 +00:00
Sepherosa Ziehau
39863fbd98 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
2016-01-12 01:30:51 +00:00
Andriy Voskoboinyk
1c6b43df0a 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
2016-01-12 00:24:40 +00:00
Enji Cooper
c16d674c2d 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
2016-01-12 00:20:57 +00:00
Andriy Voskoboinyk
6420fb29aa 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
2016-01-12 00:12:18 +00:00
Alan Somers
53f6862723 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
2016-01-11 22:15:46 +00:00
Enji Cooper
7f3159edc5 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
2016-01-11 22:01:33 +00:00