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

8 years agoReturn call to init_zfs_bootenv to its previous location
allanjude [Sat, 9 Jan 2016 19:13:25 +0000 (19:13 +0000)]
Return call to init_zfs_bootenv to its previous location

When called to early, new_currdev->d_type was not yet set
zfs_fmtdev() would then return null

While here, guard call to init_zfs_bootenv with if d_type == DEVT_ZFS

Reported by: tsoome at me.com
MFC after: 3 days
Sponsored by: ScaleEngine Inc.

8 years agoFix userland build broken by r293470.
melifaro [Sat, 9 Jan 2016 18:42:12 +0000 (18:42 +0000)]
Fix userland build broken by r293470.

Pointy hat to: melifaro

8 years agoFinish r275196: do not dereference rtentry in if_output() routines.
melifaro [Sat, 9 Jan 2016 16:34:37 +0000 (16:34 +0000)]
Finish r275196: do not dereference rtentry in if_output() routines.

The only piece of information that is required is rt_flags subset.

In particular, if_loop() requires RTF_REJECT and RTF_BLACKHOLE flags
  to check if this particular mbuf needs to be dropped (and what
  error should be returned).
Note that if_loop() will always return EHOSTUNREACH for "reject" routes
  regardless of RTF_HOST flag existence. This is due to upcoming routing
  changes where RTF_HOST value won't be available as lookup result.

All other functions require RTF_GATEWAY flag to check if they need
  to return EHOSTUNREACH instead of EHOSTDOWN error.

There are 11 places where non-zero 'struct route' is passed to if_output().
For most of the callers (forwarding, bpf, arp) does not care about exact
  error value. In fact, the only place where this result is propagated
  is ip_output(). (ip6_output() passes NULL route to nd6_output_ifp()).

Given that, add 3 new 'struct route' flags (RT_REJECT, RT_BLACKHOLE and
  RT_IS_GW) and inline function (rt_update_ro_flags()) to copy necessary
  rte flags to ro_flags. Call this function in ip_output() after looking up/
  verifying rte.

Reviewed by: ae

8 years ago- Add the definition of CHARCLASS_NAME_MAX, as per POSIX.1-2001.
kevlo [Sat, 9 Jan 2016 14:53:23 +0000 (14:53 +0000)]
- Add the definition of CHARCLASS_NAME_MAX, as per POSIX.1-2001.
- Avoid namespace pollution and move definitions of _POSIX2_CHARCLASS_NAME_MAX
  and _POSIX2_COLL_WEIGHTS_MAX into the .2001 section.
  With input from bde.

Submitted by bde

8 years agoRemove prefix check from in6_addroute().
melifaro [Sat, 9 Jan 2016 11:41:37 +0000 (11:41 +0000)]
Remove prefix check from in6_addroute().

This check was added in initial? netinet6/ import
  back in 1999 (r53541).
It effectively became unnecessary after 'address/prefix clean-ups'
  KAME commit 90ff8792e676132096a440dd787f99a5a5860ee8 (github) in 2001
  (merged to FreeBSD in r78064) where prefix check was added to
  nd6_prefix_onlink(). Similar IPv4 check (in_addroute() was added
  in r137628).
Additionally, the right plance for this (or similar) check is the prefix
  addition code (nd6_prefix_onlink(), nd6_prefix_onlink_rtrequest(),
  in_addprefix() or rtinit()), but not the generic radix insert routine.

8 years agoRemove sys/eventhandler.h from net/route.h
melifaro [Sat, 9 Jan 2016 09:34:39 +0000 (09:34 +0000)]
Remove sys/eventhandler.h from net/route.h

Reviewed by: ae

8 years agoFix version number.
delphij [Sat, 9 Jan 2016 09:33:24 +0000 (09:33 +0000)]
Fix version number.

8 years agoMake tohex() work as expected.
ae [Sat, 9 Jan 2016 08:04:29 +0000 (08:04 +0000)]
Make tohex() work as expected.

8 years agoFix a typo.
ae [Sat, 9 Jan 2016 08:02:35 +0000 (08:02 +0000)]
Fix a typo.

PR: 205722

8 years ago(Temporarily) remove route_redirect_event eventhandler.
melifaro [Sat, 9 Jan 2016 06:26:40 +0000 (06:26 +0000)]
(Temporarily) remove route_redirect_event eventhandler.

Such handler should pass different set of variables, instead
  of directly providing 2 locked route entries.
Given that it hasn't been really used since at least 2012, remove
  current code.
Will re-add it after finishing most major routing-related changes.

Discussed with: np

8 years agoPlease Coverity by removing unneccessary check (rt_key() is always set).
melifaro [Sat, 9 Jan 2016 05:39:06 +0000 (05:39 +0000)]
Please Coverity by removing unneccessary check (rt_key() is always set).

Coverity CID: 1347797

8 years agoRemove hidden "Not ufs" printfs from boot code
smh [Sat, 9 Jan 2016 03:30:33 +0000 (03:30 +0000)]
Remove hidden "Not ufs" printfs from boot code

Remove the printf("Not ufs\n") from the boot code which was hidden by the
local printf implementations, allowing these to have that code removed too.

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

8 years agoSwitch EFT boot1 to use libstand
smh [Sat, 9 Jan 2016 03:20:01 +0000 (03:20 +0000)]
Switch EFT boot1 to use libstand

ARM and i386 already required libstand so switch to using it for all
patforms, allowing the removal of custom print and memory methods.

This is also a pre-cursor to enabling WARNS which highlighted a number
of issues with the removed methods.

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

8 years agoAdd netmap support for bhyve
gnn [Sat, 9 Jan 2016 03:08:21 +0000 (03:08 +0000)]
Add netmap support for bhyve

Submitted by: btw
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D4826

8 years agoPrevent cv_waiters wraparound.
markj [Sat, 9 Jan 2016 01:56:46 +0000 (01:56 +0000)]
Prevent cv_waiters wraparound.

r282971 attempted to fix this problem by decrementing cv_waiters after
waking up from sleeping on a condition variable, but this can result in
a use-after-free if the CV is freed before all woken threads have had a
chance to run. Instead, avoid incrementing cv_waiters past INT_MAX, and
have cv_signal() explicitly check for sleeping threads once cv_waiters has
reached this bound.

Reviewed by: jhb
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D4822

8 years agoOnly call init_zfs_bootenv() when the system was booted with ZFS
allanjude [Sat, 9 Jan 2016 00:54:08 +0000 (00:54 +0000)]
Only call init_zfs_bootenv() when the system was booted with ZFS

Add a few other safeguards to ensure things do not break when the
boot device cannot be determined

Reported by: flo
MFC after: 3 days
Sponsored by: ScaleEngine Inc.

8 years agoRegen after r293450
emaste [Sat, 9 Jan 2016 00:47:01 +0000 (00:47 +0000)]
Regen after r293450

8 years agoSet FORCE_PKG_REGISTER=1 when installing packages to avoid failures
gjb [Sat, 9 Jan 2016 00:45:38 +0000 (00:45 +0000)]
Set FORCE_PKG_REGISTER=1 when installing packages to avoid failures
when re-using build chroot(8) environments.

This is based on the patch in the PR referenced below, but instead
of using 'reinstall' in two locations (one of which already uses
FORCE_PKG_REGISTER=1), changes the non-embedded behavior.

PR: 205998
Submitted by: ngie
MFC after: 5 days
Sponsored by: The FreeBSD Foundation

8 years agoUpdate dependencies.
bdrewery [Sat, 9 Jan 2016 00:43:11 +0000 (00:43 +0000)]
Update dependencies.

Sponsored by: EMC / Isilon Storage Division

8 years agoSupport use of LLVM's libunwind for exception unwinding
emaste [Sat, 9 Jan 2016 00:42:07 +0000 (00:42 +0000)]
Support use of LLVM's libunwind for exception unwinding

It is built in libgcc_s.so and libgcc_eh.a to simplify transition.

It is enabled by default on arm64 (where we previously had no other
unwinder) and may be enabled for testing on other platforms by setting
WITH_LLVM_LIBUNWIND in src.conf(5).

Also add compiler-rt's __gcc_personality_v0 implementation for use with
the LLVM unwinder.

Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4787

8 years agoChase r292622: Update path to ioctl.c for incremental build hack.
bdrewery [Fri, 8 Jan 2016 22:59:49 +0000 (22:59 +0000)]
Chase r292622: Update path to ioctl.c for incremental build hack.

Sponsored by: EMC / Isilon Storage Division

8 years ago- Move functions that might be used in class-specific cleanup functions
ngie [Fri, 8 Jan 2016 21:47:41 +0000 (21:47 +0000)]
- Move functions that might be used in class-specific cleanup functions
  (geom_test_cleanup, etc) down so the testcases don't emit noise when
  bailing
- Conform to the TAP protocol better when dealing with classes that can't
  be loaded and with temporary files that can't be allocated for tracking
  md(4) devices.

MFC after: 2 weeks
X-MFC with: r293028, r293029, r293048
Sponsored by: EMC / Isilon Storage Division

8 years ago- Make test-1.sh into a TAP testable testcase
ngie [Fri, 8 Jan 2016 21:38:26 +0000 (21:38 +0000)]
- Make test-1.sh into a TAP testable testcase
- Delete test-2.sh as it was an incomplete testcase, and the contents were
  basically a subset of test-1.sh
- Add a conf.sh file for executing common functions with geom_uzip
- Use attach_md for attaching md(4) devices
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

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

8 years ago- Add a geom_stripe specific cleanup function and trap on that function at
ngie [Fri, 8 Jan 2016 21:28:09 +0000 (21:28 +0000)]
- Add a geom_stripe specific cleanup function and trap on that function at
  exit so things are cleaned up properly
- Use attach_md for attaching md(4) devices
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

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

8 years ago- Add a geom_shsec specific cleanup function and trap on that function at
ngie [Fri, 8 Jan 2016 21:25:27 +0000 (21:25 +0000)]
- Add a geom_shsec specific cleanup function and trap on that function at
  exit so things are cleaned up properly
- Use attach_md for attaching md(4) devices
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

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

8 years agoFix upgrading from OSVERSION 1000002-1000032 after r288829.
bdrewery [Fri, 8 Jan 2016 21:07:34 +0000 (21:07 +0000)]
Fix upgrading from OSVERSION 1000002-1000032 after r288829.

r288829 states that lex requires the latest m4, but was not always building it.
Move lex to the same logic as m4 since they are closely tied now.

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
Reported by: Slawa Olhovchenkov <slw@zxy.spb.ru>