Commit Graph

208020 Commits

Author SHA1 Message Date
Warner Losh
c8719df5f9 Add a comment about why at is turned off in the exception handler.
Only k0 and k1 may be touched until we save registers somewhere.

MFC After: 2 days
2016-01-26 18:39:23 +00:00
Ed Maste
4456b8f5cf Add STT_SPARC_REGISTER ELF definition
MFC after:	1 week
2016-01-26 18:20:25 +00:00
Andriy Voskoboinyk
798e1ce39b rtwn: do not start vap when initialization fails
- Start vap(s) (via ieee80211_start_all()) only when initialization
succeeds; stop the first vap otherwise (via ieee80211_stop());
- Do not try to stop a device multiple times
(move (sc->sc_flags & RTWN_RUNNING) check to urtwn_stop_locked()).

Tested by:	kevlo
Reviewed by:	kevlo
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5058
2016-01-26 16:50:59 +00:00
Andriy Voskoboinyk
5274f944ba rtwn: use ieee80211_restart_all() for device reset
Tested by:	kevlo
Reviewed by:	kevlo
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5057
2016-01-26 16:34:27 +00:00
Hiren Panchasara
0645c6049d Persist timers TCPTV_PERSMIN and TCPTV_PERSMAX are hardcoded with 5 seconds and
60 seconds, respectively. Turn them into sysctls that can be tuned live. The
default values of 5 seconds and 60 seconds have been retained.

Submitted by:		Jason Wolfe (j at nitrology dot com)
Reviewed by:		gnn, rrs, hiren, bz
MFC after:		1 week
Sponsored by:		Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D5024
2016-01-26 16:33:38 +00:00
Hans Petter Selasky
fe68f570d4 Update and add various macros to the LinuxKPI and resolve a macro
redefinition issue in the cxgb driver.

MFC after:	1 week
Sponsored by:	Mellanox Technologies
Reviewed by:	np @
2016-01-26 15:26:35 +00:00
Zbigniew Bodek
49b49cda41 Import Annapurna Labs Alpine HAL for networking
Files required for the NIC driver

Import from vendor-sys/alpine-hal/2.7
SVN rev.: 294828
HAL version: 2.7

Obtained from:  Semihalf
Sponsored by:   Annapurna Labs
2016-01-26 15:22:04 +00:00
Hans Petter Selasky
c7c96d1093 LinuxKPI list updates:
- Add some new hlist macros.
- Update existing hlist macros removing the need for a temporary
  iteration variable.
- Properly define the RCU hlist macros to be SMP safe with regard
  to RCU.
- Safe list macro arguments by adding a pair of parentheses.
- Prefix the _list_add() and _list_splice() functions with "linux"
  to reflect they are LinuxKPI internal functions.

Obtained from:	Linux
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-01-26 15:12:31 +00:00
Konstantin Belousov
2cd5358a66 Don't clear the software flow control flag before draining for last
close or assert the bug that it is clear when leaving.

Remove an unrelated rotted comment that was attached to the buggy
clearing.

Since draining is not done in more cases, flushing is needed in more
cases, so start fixing flushing:
- do a full flush in ttydisc_close().  State what POSIX requires more
  clearly.  This was missing ttydevsw_pktnotify() calls to tell the
  devsw layer to flush.  Hardware tty drivers don't actually flush
  since they don't understand this API.
- fix 2 missing wakeups in tty_flush().  Most of the wakeups here are
  unnecessary for last close.  But ttydisc_close() did one of the
  missing ones.

This flow control bug ameliorated the design bug of requiring
potentially unbounded waits in draining.  Software flow control is the
easiest way to get an unbounded wait, and a long wait is sometimes
actually useful.  Users can type the xoff character on the receiver
and (if ixon is set on the sender) expect the output to be held until
the user is ready for more.

Hardware flow control can also give the unbounded wait, and this bug
didn't affect hardware flow control.  Unbounded waits from hardware
flow control take a more unusual configuration.  E.g., a terminal
program that controls the modem status lines, or unplugging the cable
in a configuration where this doesn't break the connection.

The design bug is still ameliorated by a newer bug in draining for
last close -- the 1 second timeout.  E.g., if the user types the
xoff character and the sender reaches last close, then output is
not resumed and the wait times out after just 1 second.  This is
broken, but preferable to an unbounded wait.  Before this change,
the output was resumed immediately and usually completed.

Submitted by:	bde
MFC after:	2 weeks
2016-01-26 14:46:39 +00:00
Ruslan Bukin
faf51c558e Make libgcc compilable on RISC-V. 2016-01-26 14:45:21 +00:00
Ruslan Bukin
4bf1032a04 Add fenv.c for RISC-V. Copied from MIPS. 2016-01-26 14:40:41 +00:00
Hans Petter Selasky
e6ef991e5e Implement ether_addr_equal(), ether_addr_equal_64bits() and
random_ether_addr() for the LinuxKPI.

MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-01-26 14:36:16 +00:00
Ruslan Bukin
8f9bf0d661 Remove uathload from build due to issue with GCC 5.2.0:
"ld: --relax and -r may not be used together."
Requires fixing ld command line arguments and testing.
2016-01-26 14:34:40 +00:00
Hans Petter Selasky
f15ffb5e63 Implement is_vlan_dev() and vlan_dev_vlan_id() for the LinuxKPI.
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-01-26 14:33:20 +00:00
Hans Petter Selasky
e28297940b Implement bitmap_weight() and bitmap_equal() for the LinuxKPI.
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-01-26 14:31:20 +00:00
Hans Petter Selasky
d211177315 Add more network related macros and functions to the LinuxKPI.
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-01-26 14:29:50 +00:00
Hans Petter Selasky
4a19cc98b3 Add definition for the NETDEV_CHANGE event and tidy up the LinuxKPI
notifier header file a bit while at it.

MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-01-26 14:27:00 +00:00
Hans Petter Selasky
9f34efb9f4 Define __get_user() and __put_user() for the LinuxKPI.
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-01-26 14:21:30 +00:00
Hans Petter Selasky
a65ef21558 Add more LinuxKPI PCI related functions and defines.
Removed comments deriving from Linux.

MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-01-26 14:20:25 +00:00
Ruslan Bukin
390566702b Add the openssl header for RISC-V.
Copied from aarch64 as we can't generate it yet.
2016-01-26 14:17:39 +00:00
Svatopluk Kraus
b78e1f8a46 Make pmap_fault() return values vm subsystem compliant to
simplify their handling in abort_handler(). While here,
remove one extra initialization of pcb variable.
2016-01-26 13:50:44 +00:00
Alexander Motin
5a97f48082 MFV r294819: 6495 Fix mutex leak in dmu_objset_find_dp
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Albert Lee <trisk@omniti.com>
Author: Steven Hartland <steven.hartland@multiplay.co.uk>

illumos/illumos-gate@2bad22584d
2016-01-26 13:45:41 +00:00
Alexander Motin
b1f532a6b9 6495 Fix mutex leak in dmu_objset_find_dp
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Albert Lee <trisk@omniti.com>
Author: Steven Hartland <steven.hartland@multiplay.co.uk>

illumos/illumos-gate@2bad22584d
2016-01-26 13:44:47 +00:00
Alexander Motin
d17adec15f 6494 ASSERT supported zio_types for file and disk vdevs
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Albert Lee <trisk@omniti.com>
Author: Steven Hartland <steven.hartland@multiplay.co.uk>

illumos/illumos-gate@f693d300fb
2016-01-26 13:40:22 +00:00
Alexander Motin
1cb4625f18 MFV r294816: 4986 receiving replication stream fails if any snapshot
exceeds refquota

Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Gordon Ross <gordon.ross@nexenta.com>
Author: Dan McDonald <danmcd@omniti.com>

illumos/illumos-gate@5878fad70d
2016-01-26 13:37:30 +00:00
Alexander Motin
cfb45c466f 4986 receiving replication stream fails if any snapshot exceeds refquota
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Gordon Ross <gordon.ross@nexenta.com>
Author: Dan McDonald <danmcd@omniti.com>

illumos/illumos-gate@5878fad70d
2016-01-26 13:20:31 +00:00
Alexander Motin
75b810aee6 MFV r294814: 6393 zfs receive a full send as a clone
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Paul Dagnelie <pcd@delphix.com>

illumos/illumos-gate@68ecb2ec93

This allows to do a full (non-incremental send) and receive it as a clone
of an existing dataset. It can leverage nopwrite to share blocks with the
origin. This can be used to change the relationship of datasets on the
target. For example, maybe on the source you have:

A ---- B ---- C

And you have sent to the target a full of B, and the incremental B->C:

B ---- C

You later realize that you want to have A on the target. You will have to
do a full send of A, but nopwrite can save you space on the target if you
receive it as a clone of B, assuming that A and B have some blocks inxi
common:

B ---- C
 \
  A
2016-01-26 13:14:39 +00:00
Alexander Motin
cce747b2cb 6393 zfs receive a full send as a clone
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Paul Dagnelie <pcd@delphix.com>

illumos/illumos-gate@68ecb2ec93
2016-01-26 13:09:16 +00:00
Alexander Motin
d2385b31f5 MFV r294812: 6434 sa_find_sizes() may compute wrong SA header size
Reviewed-by: Ned Bass <bass6@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Andriy Gapon <avg@freebsd.org>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: James Pan <jiaming.pan@yahoo.com>

illumos/illumos-gate@3502ed6e7c
2016-01-26 13:03:01 +00:00
Alexander Motin
d1e5f965a6 6434 sa_find_sizes() may compute wrong SA header size
Reviewed-by: Ned Bass <bass6@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Andriy Gapon <avg@freebsd.org>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: James Pan <jiaming.pan@yahoo.com>

illumos/illumos-gate@3502ed6e7c
2016-01-26 13:02:16 +00:00
Alexander Motin
49b7f6ef02 MFV r294810: 6414 vdev_config_sync could be simpler
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Will Andrews <will@firepipe.net>

illumos/illumos-gate@eb5bb58421
2016-01-26 12:58:58 +00:00
Alexander Motin
81163b11f0 6414 vdev_config_sync could be simpler
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Will Andrews <will@firepipe.net>

illumos/illumos-gate@eb5bb58421
2016-01-26 12:55:43 +00:00
Alexander Motin
70c71b4722 MFV r294808: 6421 Add missing multilist_destroy calls to arc_fini
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Jorgen Lundman <lundman@lundman.net>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Prakash Surya <prakash.surya@delphix.com>

illumos/illumos-gate@57deb23282
2016-01-26 12:54:03 +00:00
Alexander Motin
1fea6b3fc8 6421 Add missing multilist_destroy calls to arc_fini
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Jorgen Lundman <lundman@lundman.net>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Prakash Surya <prakash.surya@delphix.com>

illumos/illumos-gate@57deb23282
2016-01-26 12:53:23 +00:00
Alexander Motin
6c941579b9 MFV r294806: 6388 Failure of userland copy should return EFAULT
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Richard Yao <ryao@gentoo.org>

illumos/illumos-gate@c71c00bbe8
2016-01-26 12:52:16 +00:00
Alexander Motin
ecc4acd3f9 6388 Failure of userland copy should return EFAULT
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Richard Yao <ryao@gentoo.org>

illumos/illumos-gate@c71c00bbe8
2016-01-26 12:51:41 +00:00
Alexander Motin
8ad8374efe MFV r294804: 6386 Fix function call with uninitialized value in vdev_inuse
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Richard Yao <ryao@gentoo.org>

illumos/illumos-gate@5bdd995ddb
2016-01-26 12:50:14 +00:00
Alexander Motin
c2893298c0 6386 Fix function call with uninitialized value in vdev_inuse
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Richard Yao <ryao@gentoo.org>

illumos/illumos-gate@5bdd995ddb
2016-01-26 12:49:31 +00:00
Alexander Motin
02404a5ad2 MFV r294802: 6334 Cannot unlink files when over quota
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Simon Klinkert <simon.klinkert@gmail.com>

illumos/illumos-gate@6575bca013
2016-01-26 12:48:10 +00:00
Alexander Motin
12269e5e63 6334 Cannot unlink files when over quota
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Simon Klinkert <simon.klinkert@gmail.com>

illumos/illumos-gate@6575bca013
2016-01-26 12:47:33 +00:00
Alexander Motin
2360c716f9 MFV r294800: 6385 Fix unlocking order in zfs_zget
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Andriy Gapon <avg@freebsd.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Richard Yao <ryao@gentoo.org>

illumos/illumos-gate@eaef6a96de
2016-01-26 12:44:49 +00:00
Alexander Motin
ad57dd3259 6385 Fix unlocking order in zfs_zget
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Andriy Gapon <avg@freebsd.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Richard Yao <ryao@gentoo.org>

illumos/illumos-gate@eaef6a96de
2016-01-26 12:39:07 +00:00
Alexander Motin
81754f9788 MFV r294798:
6292 exporting a pool while an async destroy is running can leave entries
in the deferred tree

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Andriy Gapon <avg@FreeBSD.org>
Reviewed by: Fabian Keil <fk@fabiankeil.de>
Approved by: Gordon Ross <gordon.ross@nexenta.com>

illumos/illumos-gate@a443cc80c7
2016-01-26 12:37:23 +00:00
Alexander Motin
a511264bcb 6292 exporting a pool while an async destroy is running can leave entries
in the deferred tree

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Andriy Gapon <avg@FreeBSD.org>
Reviewed by: Fabian Keil <fk@fabiankeil.de>
Approved by: Gordon Ross <gordon.ross@nexenta.com>

illumos/illumos-gate@a443cc80c7
2016-01-26 12:36:30 +00:00
Alexander Motin
82abccb272 MFV r294796: 6319 assertion failed in zio_ddt_write: bp->blk_birth == txg
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>

illumos/illumos-gate@b39b744be7

This is revert of 5693.
2016-01-26 12:33:58 +00:00
Alexander Motin
34cf92ad3b 6319 assertion failed in zio_ddt_write: bp->blk_birth == txg
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>

illumos/illumos-gate@b39b744be7

This is revert of 5693.
2016-01-26 12:32:46 +00:00
Steven Hartland
f2c4db545f ixgbe sysctl hardware defaults
Added hw.ix.flow_control which enables the default flow_control of all ix
interfaces to be set in loader.conf.

Added hw.ix.advertise_speed which enables the default advertised_speed of
all ix interfaces to be set in loader.conf.

Made enable_aim device independent based on hw.ix.enable_aim default.

Reviewed by:	erj
MFC after:	1 week
Sponsored by:	Multiplay
Differential Revision:	https://reviews.freebsd.org/D5060
2016-01-26 12:30:17 +00:00
Alexander Motin
27a8d05bd7 MFV r294793:
6367 spa_config_tryenter incorrectly handles the multiple-lock case

Reviewed by: Alek Pinchuk <alek.pinchuk@nexenta.com>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Reviewed by: Prashanth Sreenivasa <prashksp@gmail.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Steven Hartland <steven.hartland@multiplay.co.uk>
Approved by: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@e495b6e673
2016-01-26 12:28:53 +00:00
Alexander Motin
dc1e1595ce 6367 spa_config_tryenter incorrectly handles the multiple-lock case
Reviewed by: Alek Pinchuk <alek.pinchuk@nexenta.com>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Reviewed by: Prashanth Sreenivasa <prashksp@gmail.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Steven Hartland <steven.hartland@multiplay.co.uk>
Approved by: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@e495b6e673
2016-01-26 12:26:32 +00:00
Edward Tomasz Napierala
ed81020097 Fix the way RCTL handles rules' rrl_exceeded on credenials change.
Because of what this variable does, it was probably harmless - but
still incorrect.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-01-26 11:28:55 +00:00