]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoIn the passthru IOCTL path, the mfi command pool was freely accessible N times
Kashyap D Desai [Wed, 8 Oct 2014 09:37:47 +0000 (09:37 +0000)]
In the passthru IOCTL path, the mfi command pool was freely accessible N times
where as there are limited number(32) of mfi commands in the pool.
The mfi command pool is now restricted to 27 simultaneous accesses by using
a counting semaphore while calling the passthru function.

In the mrsas_cam.c source file there was a same function name mrsas_poll(),
which was same as the mrsas_poll() implemented in the mrsas.c file for the
polling interface.
To clearly distinguish the functionality by usage we have renamed the former
as mrsas_cam_poll().

In the passthru function let's say it has got an mfi command from the pool
but it has failed in one of the DMA function call which will lead to leak
an mfi command because in the ERROR case it directly returns and not freeing up
the occupied mfi command.

Reviewed by: ambrisko
MFC after: 2 weeks
Sponsored by: AVAGO Technologies

9 years agod_poll() callback function is the entry point for poll system call for the application.
Kashyap D Desai [Wed, 8 Oct 2014 09:35:52 +0000 (09:35 +0000)]
d_poll() callback function is the entry point for poll system call for the application.
It is meant to notify the applications which will be waiting for some
controller events to be occured.

Reviewed by: ambrisko
MFC after: 2 weeks
Sponsored by: AVAGO Technologies

9 years agoExtended MSI-x vectors support for Invader and Fury(12Gb/s HBA).
Kashyap D Desai [Wed, 8 Oct 2014 09:34:25 +0000 (09:34 +0000)]
Extended MSI-x vectors support for Invader and Fury(12Gb/s HBA).

This Driver will create multiple MSI-x vector depending upon what FW expose.
As of now 12 Gbp/s MR controller (Invader and Fury) expose 96 msix vector.
As of now 6 Gbp/s MR controller (Thunderbolt) expose 16 msix vector.

Reviewed by: ambrisko
MFC after: 2 weeks
Sponsored by: AVAGO Technologies

9 years agoFix the minor svn add issue. $FreeBSD$ expands at the time of
Kashyap D Desai [Wed, 8 Oct 2014 09:30:35 +0000 (09:30 +0000)]
Fix the minor svn add issue. $FreeBSD$ expands at the time of
snv add, so I have added $FreeBSD$ as comment.

This commit is contininous of last mrsas commit, so that compilation
does not break.

Obtained from: AVAGO Technologies
MFC after: 2 weeks

9 years agoThis is a feature provided to run 32-bit linux binaries on FreeBSD 64bit
Kashyap D Desai [Wed, 8 Oct 2014 09:19:35 +0000 (09:19 +0000)]
This is a feature provided to run 32-bit linux binaries on FreeBSD 64bit
machine, for which 32bit compatibilty code has been added.
As in linux there is only one device entry that is used to fire IOCTL commands,
a new device entry megaraid_sas_ioctl_node is added for solely this
purpose.

From one dev node i.e mrgaraid_sa_ioctl_node we have to find out the
controller instance in case of multicontroller, for which one management info
structure has been added.

Reviewed by: ambrisko
MFC after: 2 weeks
Sponsored by: AVAGO Technologies

9 years agoAlways wait 'command done' interrupt status bit before proceeding next command.
Ruslan Bukin [Wed, 8 Oct 2014 08:51:05 +0000 (08:51 +0000)]
Always wait 'command done' interrupt status bit before proceeding next command.

Sponsored by: DARPA, AFRL

9 years agoCurrent MegaRAID firmware and hence the driver only supported 64VDs.
Kashyap D Desai [Wed, 8 Oct 2014 08:48:18 +0000 (08:48 +0000)]
Current MegaRAID firmware and hence the driver only supported 64VDs.
E.g: If the user wants to create more than 64VD on a controller,
    it is not possible on current firmware/driver.

New feature and requirement to support upto 256VD, firmware/driver/apps need changes.
In addition to that, there must be a backward compatibility of the new driver with the
older firmware and vice versa.

RAID map is the interface between Driver and FW to fetch all required
fields(attributes) for each Virtual Drives.
In the earlier design driver was using the FW copy of RAID map where as
in the new design the Driver will keep the RAID map copy of its own; on which
it will operate for any raid map access in fast path.

Local driver raid map copy will provide ease of access through out the code
and provide generic interface for future FW raid map changes.

For the backward compatibility driver will notify FW that it supports 256VD
to the FW in driver capability field.
Based on the controller properly returned by the FW, the Driver will know
whether it supports 256VD or not and will copy the RAID map accordingly.

At any given time, driver will always have old or new Raid map.

Reviewed by : ambrisko
MFC after : 2 weeks
Sponsored by: AVAGO Technologies

9 years agoAdd support for WRITE ATOMIC (16) command and report SBC-4 compliance.
Alexander Motin [Wed, 8 Oct 2014 07:48:36 +0000 (07:48 +0000)]
Add support for WRITE ATOMIC (16) command and report SBC-4 compliance.

Atomic writes are only supported for ZVOLs in "dev" mode.  In other cases
atomicity can not be guarantied and so the command is blocked.

9 years agoAdd support for disabling USB enumeration in general or on selected
Hans Petter Selasky [Wed, 8 Oct 2014 07:00:50 +0000 (07:00 +0000)]
Add support for disabling USB enumeration in general or on selected
USB HUBs.

MFC after: 2 weeks

9 years agoOops, fix typo made in r272729.
Pyun YongHyeon [Wed, 8 Oct 2014 05:53:04 +0000 (05:53 +0000)]
Oops, fix typo made in r272729.

9 years agoDocument newly added controller AR816x/AR817x.
Pyun YongHyeon [Wed, 8 Oct 2014 05:49:10 +0000 (05:49 +0000)]
Document newly added controller AR816x/AR817x.

9 years agoAdd support for QAC AR816x/AR817x Gigabit/Fast Ethernet controllers.
Pyun YongHyeon [Wed, 8 Oct 2014 05:47:01 +0000 (05:47 +0000)]
Add support for QAC AR816x/AR817x Gigabit/Fast Ethernet controllers.
These controllers seem to have the same feature of AR813x/AR815x and
improved RSS support(4 TX queues and 8 RX queues).  alc(4) supports
all hardware features except RSS.  I didn't implement RX checksum
offloading for AR816x/AR817x just because I couldn't get
confirmation from the Vendor whether AR816x/AR817x corrected its
predecessor's RX checksum offloading bug on fragmented packets.
This change adds supports for the following controllers.
 o AR8161 PCIe Gigabit Ethernet controller
 o AR8162 PCIe Fast Ethernet controller
 o AR8171 PCIe Gigabit Ethernet controller
 o AR8172 PCIe Fast Ethernet controller
 o Killer E2200 Gigabit Ethernet controller

Tested by: Many
Relnotes: yes
MFC after: 2 weeks
HW donated by: Qualcomm Atheros Communications, Inc.

9 years agoAdd new quirk PCI_QUIRK_MSI_INTX_BUG to pci(4).
Pyun YongHyeon [Wed, 8 Oct 2014 05:34:39 +0000 (05:34 +0000)]
Add new quirk PCI_QUIRK_MSI_INTX_BUG to pci(4).
QAC AR816x/E2200 controller has a silicon bug that MSI interrupt
does not assert if PCIM_CMD_INTxDIS bit of command register is set.

Reviewed by: jhb

9 years agodon't reinvent the wheel: rely on basename(3)
Eitan Adler [Wed, 8 Oct 2014 05:04:31 +0000 (05:04 +0000)]
don't reinvent the wheel: rely on basename(3)

Reviewed by: nwhitehorn

9 years agoFix a long standing bug in MAC statistics register access. One
Pyun YongHyeon [Wed, 8 Oct 2014 01:03:32 +0000 (01:03 +0000)]
Fix a long standing bug in MAC statistics register access.  One
additional register was erroneously added in the MAC register set
such that 7 TX statistics counters were wrong.

9 years agoImplement PLPMTUD blackhole detection (RFC 4821), inspired by code
Sean Bruno [Tue, 7 Oct 2014 21:50:28 +0000 (21:50 +0000)]
Implement PLPMTUD blackhole detection (RFC 4821), inspired by code
from xnu sources.  If we encounter a network where ICMP is blocked
the Needs Frag indicator may not propagate back to us.  Attempt to
downshift the mss once to a preconfigured value.

Default this feature to off for now while we do not have a full PLPMTUD
implementation in our stack.

Adds the following new sysctl's for control:
net.inet.tcp.pmtud_blackhole_detection -- turns on/off this feature
net.inet.tcp.pmtud_blackhole_mss       -- mss to try for ipv4
net.inet.tcp.v6pmtud_blackhole_mss     -- mss to try for ipv6

Adds the following new sysctl's for monitoring:
-- Number of times the code was activated to attempt a mss downshift
net.inet.tcp.pmtud_blackhole_activated
-- Number of times the blackhole mss was used in an attempt to downshift
net.inet.tcp.pmtud_blackhole_min_activated
-- Number of times that we failed to connect after we downshifted the mss
net.inet.tcp.pmtud_blackhole_failed

Phabricator: https://reviews.freebsd.org/D506
Reviewed by: rpaulo bz
MFC after: 2 weeks
Relnotes: yes
Sponsored by: Limelight Networks

9 years agocxgbe/tom: don't leak resources tied to an active open request that
Navdeep Parhar [Tue, 7 Oct 2014 21:26:22 +0000 (21:26 +0000)]
cxgbe/tom: don't leak resources tied to an active open request that
cannot be sent to the chip because a prerequisite L2 resolution
failed.

Submitted by: Hariprasad at chelsio dot com (original version)
MFC after: 2 weeks.

9 years agoMake kern.nswbuf tunable from loader.
Jung-uk Kim [Tue, 7 Oct 2014 20:13:47 +0000 (20:13 +0000)]
Make kern.nswbuf tunable from loader.

MFC after: 1 week

9 years agoRemove call to access(2) which didn't serve any purpose, and make it more
Edward Tomasz Napierala [Tue, 7 Oct 2014 19:08:02 +0000 (19:08 +0000)]
Remove call to access(2) which didn't serve any purpose, and make it more
tolerant to errors.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoSupport the Vodafone R215 LET USB dongle, which is apparently a rebadged
Gavin Atkinson [Tue, 7 Oct 2014 19:07:50 +0000 (19:07 +0000)]
Support the Vodafone R215 LET USB dongle, which is apparently a rebadged
E5372 with different product IDs.

Interestingly, the standard E5372 IDs (12d1:1506) are currently listed in
u3g.c and are the same as the E3131.  However, the R215/E5372 is an NCM
device and works well with cdce(4) whereas the E3131 isn't.  More work
may be needed to better identify the other device IDs.

MFC after: 1 week

9 years agoAllow vt(4) to disable terminal bell with `sysctl kern.vt.bell_enable=0`,
Aleksandr Rybalko [Tue, 7 Oct 2014 18:47:53 +0000 (18:47 +0000)]
Allow vt(4) to disable terminal bell with `sysctl kern.vt.bell_enable=0`,
similar as syscons(4) do.

Submitted by: Tiwei Bie <btw@mail.ustc.edu.cn>
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

9 years agoSince introducing the extra mapping in r250103 for architectural performance
Bjoern A. Zeeb [Tue, 7 Oct 2014 18:00:34 +0000 (18:00 +0000)]
Since introducing the extra mapping in r250103 for architectural performance
events we have actually counted 'Branch Instruction Retired' when people
asked for 'Unhalted core cycles' using the 'unhalted-core-cycles' event mask
mnemonic.

Reviewed by: jimharris
Discussed with: gnn, rwatson
MFC after: 3 days
Sponsored by: DARPA/AFRL

9 years agoAdd driver for Synopsys DesignWare Mobile Storage Host Controller.
Ruslan Bukin [Tue, 7 Oct 2014 17:39:30 +0000 (17:39 +0000)]
Add driver for Synopsys DesignWare Mobile Storage Host Controller.

Sponsored by: DARPA, AFRL

9 years agoImplement the FLUSH operation in the virtio-block emulation.
Neel Natu [Tue, 7 Oct 2014 17:08:53 +0000 (17:08 +0000)]
Implement the FLUSH operation in the virtio-block emulation.

This gets rid of the following error message during FreeBSD guest bootup:
"vtbd0: hard error cmd=flush fsbn 0"

Reported by: rodrigc
Reviewed by: grehan

9 years agol2arc_write_buffers: reduce headroom value
Andriy Gapon [Tue, 7 Oct 2014 16:08:21 +0000 (16:08 +0000)]
l2arc_write_buffers: reduce headroom value

FreeBSD has ARC_BUFC_NUMMETADATALISTS metadata lists and ARC_BUFC_NUMDATALISTS
data lists (currently both are 16) while illumos has just a single list
of each kind.

headroom determines how much data is scanned on a single list
during each run of the l2arc feed thread.
Because FreeBSD has more lists we proportionally decrease the limit.

Reviewed by: Brendan Gregg (earlier version)
MFC after: 2 weeks
Sponsored by: HybridCluster

9 years agorevert r272702: wrong (earlier) change was committed
Andriy Gapon [Tue, 7 Oct 2014 16:06:10 +0000 (16:06 +0000)]
revert r272702: wrong (earlier) change was committed

9 years agoFix a bug introduced in
Michael Tuexen [Tue, 7 Oct 2014 16:01:17 +0000 (16:01 +0000)]
Fix a bug introduced in
https://svnweb.freebsd.org/base?view=revision&revision=272347

MFC after: 3 days

9 years agoreduce L2ARC_WRITE_SIZE on FreeBSD
Andriy Gapon [Tue, 7 Oct 2014 14:30:24 +0000 (14:30 +0000)]
reduce L2ARC_WRITE_SIZE on FreeBSD

FreeBSD has ARC_BUFC_NUMMETADATALISTS metadata lists and ARC_BUFC_NUMDATALISTS
data lists (currently both are 16) while illumos has just a single list
of each kind.

L2ARC_WRITE_SIZE determines the default value of l2arc_write_max which
defines limits on how much data is scanned and written to a cache device
during each run of the l2arc feed thread.  The limits are applied on the
per buffer list basis.
Because FreeBSD has more lists we proportionally reduce the limits.

Reviewed by: Brendan Gregg (earlier version)
MFC after: 2 weeks
Sponsored by: HybridCluster

9 years agomake userland __assfail from opensolaris compat honor 'aok' variable
Andriy Gapon [Tue, 7 Oct 2014 14:15:50 +0000 (14:15 +0000)]
make userland __assfail from opensolaris compat honor 'aok' variable

This should allow zdb -A option to actually make difference.

MFC after: 2 weeks

9 years agoOur packet filters use mbuf's rcvif pointer to determine incoming interface.
Andrey V. Elsukov [Tue, 7 Oct 2014 13:31:04 +0000 (13:31 +0000)]
Our packet filters use mbuf's rcvif pointer to determine incoming interface.
Change mbuf's rcvif to enc0 and restore it after pfil processing.

PR: 110959
Sponsored by: Yandex LLC

9 years agoFix compile warning when compiling with GCC.
Hans Petter Selasky [Tue, 7 Oct 2014 10:04:25 +0000 (10:04 +0000)]
Fix compile warning when compiling with GCC.

MFC after: 3 days
Sponsored by: Mellanox Technologies

9 years ago1) Fix the case we have less arguments for format string than we expected.
Andrey A. Chernov [Tue, 7 Oct 2014 06:34:05 +0000 (06:34 +0000)]
1) Fix the case we have less arguments for format string than we expected.
2) Return error on unsupported format specs.
(both according to POSIX)

PR:     93197

9 years agoBack out timegm error check from r272562.
Andrey A. Chernov [Tue, 7 Oct 2014 06:02:08 +0000 (06:02 +0000)]
Back out timegm error check from r272562.

POSIX treats negative time_t as undefined (i.e. may be valid too,
depends on system's policy we don't have) and we don't set EOVERFLOW
in mktime/timegm as POSIX requires to surely distinguish -1 return
as valid negative time from -1 as error return.

9 years agoAdd MLINK for explicit_bzero(3) and bump .Dd date.
Xin LI [Tue, 7 Oct 2014 04:59:11 +0000 (04:59 +0000)]
Add MLINK for explicit_bzero(3) and bump .Dd date.

MFC after: 2 weeks

9 years agoBump __FreeBSD_version for the addition of explicit_bzero(3).
Xin LI [Tue, 7 Oct 2014 04:54:47 +0000 (04:54 +0000)]
Bump __FreeBSD_version for the addition of explicit_bzero(3).

9 years agoAdd explicit_bzero(3) and its kernel counterpart.
Xin LI [Tue, 7 Oct 2014 04:54:11 +0000 (04:54 +0000)]
Add explicit_bzero(3) and its kernel counterpart.

Obtained from: OpenBSD
MFC after: 2 weeks

9 years agoTreat D keywords as identifiers in certain postfix expressions. This allows
Mark Johnston [Mon, 6 Oct 2014 21:52:40 +0000 (21:52 +0000)]
Treat D keywords as identifiers in certain postfix expressions. This allows
one to, for example, access the "provider" field of a struct g_consumer,
even though "provider" is a D keyword.

PR: 169657
MFC after: 2 months
Discussed with: Bryan Cantrill
Sponsored by: EMC / Isilon Storage Division

9 years agoInject #UD into the guest when it executes either 'MONITOR' or 'MWAIT'.
Neel Natu [Mon, 6 Oct 2014 20:48:01 +0000 (20:48 +0000)]
Inject #UD into the guest when it executes either 'MONITOR' or 'MWAIT'.

The hypervisor hides the MONITOR/MWAIT capability by unconditionally setting
CPUID.01H:ECX[3] to 0 so the guest should not expect these instructions to
be present anyways.

Discussed with: grehan

9 years agoProperly set the timeout in a query_state. The global query_timeout
John Baldwin [Mon, 6 Oct 2014 18:16:45 +0000 (18:16 +0000)]
Properly set the timeout in a query_state.  The global query_timeout
configuration value is an integer count of seconds, it is not a timeval.
Using memcpy() to copy a timeval from it put garbage into the tv_usec
field.

PR: 194025
Submitted by: David Shane Holden <dpejesh@yahoo.com>
MFC after: 1 week

9 years agoFix build for i386 kernels with out 'I686_CPU'.
John Baldwin [Mon, 6 Oct 2014 18:11:05 +0000 (18:11 +0000)]
Fix build for i386 kernels with out 'I686_CPU'.

PR: 193660
Submitted by: holger@freyther.de

9 years agoAdd netmap support to libpcap. Tcpdump and other native pcap application can now
Luigi Rizzo [Mon, 6 Oct 2014 15:48:28 +0000 (15:48 +0000)]
Add netmap support to libpcap. Tcpdump and other native pcap application can now
run directly on netmap ports using netmap:foo or valeXX:YY device names.
Modifications to existing code are small and trivial, the netmap-specific
code is all in a new file.

Please be aware that in netmap mode the physical interface is disconnected from
the host stack, so libpcap will steal the traffic not just make a copy.

For the full version of the code (including linux and autotools support) see
https://code.google.com/p/netmap-libpcap/

MFC after: 3 days

9 years agoCall initializecpucache() on the BSP for i386 in the !XEN case. This was
John Baldwin [Mon, 6 Oct 2014 15:43:57 +0000 (15:43 +0000)]
Call initializecpucache() on the BSP for i386 in the !XEN case.  This was
my bug in r271409 that I noticed while reviewing r272492.

9 years agoImport byacc 20141005 from vendor
Baptiste Daroussin [Mon, 6 Oct 2014 15:12:59 +0000 (15:12 +0000)]
Import byacc 20141005 from vendor

9 years agoFix comment and sort rights by name
Luigi Rizzo [Mon, 6 Oct 2014 15:03:08 +0000 (15:03 +0000)]
Fix comment and sort rights by name

MFC after: 3 days

9 years agoimport byacc 20141005
Baptiste Daroussin [Mon, 6 Oct 2014 14:55:38 +0000 (14:55 +0000)]
import byacc 20141005

9 years agoSet CAM_SIM_QUEUED flag before calling ctl_queue() to avoid race.
Alexander Motin [Mon, 6 Oct 2014 14:52:04 +0000 (14:52 +0000)]
Set CAM_SIM_QUEUED flag before calling ctl_queue() to avoid race.

PR: 194128
Submitted by: Scott M. Ferris <smferris@gmail.com>
MFC after: 3 days
Sponsored by: EMC/Isilon Storage Division

9 years agoMFV:
Craig Rodrigues [Mon, 6 Oct 2014 14:43:02 +0000 (14:43 +0000)]
MFV:
 use calloc in get_line() when allocating line to ensure it is fully initialized,
 fixes a later uninitialized value in copy_param() (FreeBSD #193499).

PR: 193499
Submitted by: Thomas E. Dickey  <tom@invisible-island.net>

9 years agoImprove r272609 (O_TCPOPTS).
Alexander V. Chernikov [Mon, 6 Oct 2014 12:29:06 +0000 (12:29 +0000)]
Improve r272609 (O_TCPOPTS).

MFC after: 3 dayes

9 years agoAdd support for MaxBurstLength and Expected Data transfer Length parameters.
Alexander Motin [Mon, 6 Oct 2014 12:20:46 +0000 (12:20 +0000)]
Add support for MaxBurstLength and Expected Data transfer Length parameters.

Before this change target could send R2T request for write transfer of any
size, that could violate iSCSI RFC, which allows initiator to limit maximum
R2T size by negotiating MaxBurstLength connection parameter.

Also report an error in case of write underflow, when initiator provides
less data than initiator expects.  Previously in such case our target
sent R2T request for non-existing data, violating the RFC, and confusing
some initiators.  SCSI specs don't explicitly define how write underflows
should be handled and there are different oppinions, but reporting error
is hopefully better then violating iSCSI RFC with unpredictable results.

MFC after: 2 weeks

9 years agoFix O_TCPOPTS processing.
Alexander V. Chernikov [Mon, 6 Oct 2014 11:15:11 +0000 (11:15 +0000)]
Fix O_TCPOPTS processing.

Obtained from: luigi

9 years agoImprove "reserved keywords" hack:
Alexander V. Chernikov [Mon, 6 Oct 2014 11:00:47 +0000 (11:00 +0000)]
Improve "reserved keywords" hack:

we can't easily predict (in current parsing model)
if the keyword is ipfw(8) reserved keyword or port name.
Checking proto database via getprotobyname() consumes a lot of
CPU and leads to tens of seconds for parsing large ruleset.
Use list of reserved keywords and check them as pre-requisite
before doing getprotobyname().

Obtained from: Yandex LLC

9 years agoUse r271207 optimization only for MSI-enabled HBAs.
Alexander Motin [Mon, 6 Oct 2014 10:58:54 +0000 (10:58 +0000)]
Use r271207 optimization only for MSI-enabled HBAs.

It was found that VirtualBox' AHCI does not allow nterrupt to be cleared
before the interrupt status register is read, causing interrupt storm.

AHCI specification allows to skip this register use when multi-vector MSI
is enabled and so interrupting port is known.  For single-vector MSI that
is not stated explicitly, but if the port is only one, it is obviously
known too.

9 years agoDisable generating vfp and NEON instructions in the arm kernel.
Andrew Turner [Mon, 6 Oct 2014 09:52:28 +0000 (09:52 +0000)]
Disable generating vfp and NEON instructions in the arm kernel.

9 years agoUse documented compat string for msm uart.
Ganbold Tsagaankhuu [Mon, 6 Oct 2014 09:00:53 +0000 (09:00 +0000)]
Use documented compat string for msm uart.
Whilst here use tab instead of spaces.

Approved by:    stas (mentor)

9 years agoMFV r272591:
Xin LI [Mon, 6 Oct 2014 07:29:17 +0000 (07:29 +0000)]
MFV r272591:

Use loaned ARC buffer for zfs receive to avoid copy.

Illumos issue:
    5162 zfs recv should use loaned arc buffer to avoid copy

MFC after: 2 weeks

9 years agodevfs: tidy up after 272596
Mateusz Guzik [Mon, 6 Oct 2014 07:22:48 +0000 (07:22 +0000)]
devfs: tidy up after 272596

This moves a var to an if statement, no functional changes.

MFC after: 1 week

9 years agoMFV r272588:
Xin LI [Mon, 6 Oct 2014 07:09:47 +0000 (07:09 +0000)]
MFV r272588:

Handle old format deadlist.

Illumos issue:
    5178 zdb -vvvvv on old-format pool fails in dump_deadlist()

MFC after: 2 weeks

9 years agoMFV r272585:
Xin LI [Mon, 6 Oct 2014 07:03:17 +0000 (07:03 +0000)]
MFV r272585:

Split the godfather zio into CPU number's to reduce lock
contention.

Illumos issue:
    5176 lock contention on godfather zio

MFC after: 2 weeks

9 years agoFix length of Extended INQUIRY Data VPD page.
Alexander Motin [Mon, 6 Oct 2014 07:01:32 +0000 (07:01 +0000)]
Fix length of Extended INQUIRY Data VPD page.

MFC after: 3 days

9 years agodevfs: don't take proctree_lock unconditionally in devfs_close
Mateusz Guzik [Mon, 6 Oct 2014 06:20:35 +0000 (06:20 +0000)]
devfs: don't take proctree_lock unconditionally in devfs_close

MFC after: 1 week

9 years agoMinor code styling.
Hans Petter Selasky [Mon, 6 Oct 2014 06:19:54 +0000 (06:19 +0000)]
Minor code styling.

Suggested by: glebius @

9 years ago5162 zfs recv should use loaned arc buffer to avoid copy
Xin LI [Mon, 6 Oct 2014 06:04:10 +0000 (06:04 +0000)]
5162 zfs recv should use loaned arc buffer to avoid copy
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Bayard Bell <Bayard.Bell@nexenta.com>
Reviewed by: Richard Elling <richard.elling@gmail.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@8a9047098ad8ce5afa38b6d012c8b509bb619f40

9 years ago5178 zdb -vvvvv on old-format pool fails in dump_deadlist()
Xin LI [Mon, 6 Oct 2014 06:00:50 +0000 (06:00 +0000)]
5178 zdb -vvvvv on old-format pool fails in dump_deadlist()
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Saso Kiselkov <skiselkov.ml@gmail.com>
Reviewed by: Richard Elling <richard.elling@gmail.com>
Reviewed by: Alek Pinchuk <alek.pinchuk@nexenta.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@90c76c66a2e21307c5370ae1bd3c7145a60c874f

9 years ago5176 lock contention on godfather zio
Xin LI [Mon, 6 Oct 2014 05:54:39 +0000 (05:54 +0000)]
5176 lock contention on godfather zio
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Alex Reece <alex.reece@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Richard Elling <richard.elling@gmail.com>
Reviewed by: Bayard Bell <Bayard.Bell@nexenta.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@6f834bc197c703a6568554c889157fb345bac079

9 years agoMFV r272501:
Xin LI [Mon, 6 Oct 2014 05:46:51 +0000 (05:46 +0000)]
MFV r272501:

Illumos issue:
    5177 remove dead code from dsl_scan.c

MFC after: 2 weeks

9 years agoMFV r272500:
Xin LI [Mon, 6 Oct 2014 05:42:20 +0000 (05:42 +0000)]
MFV r272500:

Don't inherit flags other than DS_FLAG_CI_DATASET and DS_FLAG_INCONSISTENT
when cloning.  This prevents DS_FLAG_DEFER_DESTROY being inherited from a
clone that is marked for deferred destroy, which causes snapshots of the
clone being destroyed when getting a hold or clone.

Illumos issue:
    5150 zfs clone of a defer_destroy snapshot causes strangeness

MFC after: 1 week

9 years agoConvert racct stubs to inline functions.
Mateusz Guzik [Mon, 6 Oct 2014 02:31:33 +0000 (02:31 +0000)]
Convert racct stubs to inline functions.

This saves some symbols and function calls for kernel without RACCT.

MFC after: 1 week

9 years agoBump .Dd missed in r271424
Bryan Drewery [Mon, 6 Oct 2014 00:25:10 +0000 (00:25 +0000)]
Bump .Dd missed in r271424

9 years ago- Add some tests for modifying groups
Brad Davis [Mon, 6 Oct 2014 00:16:23 +0000 (00:16 +0000)]
- Add some tests for modifying groups

Reviewed by: will

9 years agoFix dependency errors when linking libproc.
Mark Johnston [Sun, 5 Oct 2014 22:13:13 +0000 (22:13 +0000)]
Fix dependency errors when linking libproc.

Reported by: Oliver Hartmann
X-MFC-With: r272488

9 years agosh: Eliminate some gotos.
Jilles Tjoelker [Sun, 5 Oct 2014 21:51:36 +0000 (21:51 +0000)]
sh: Eliminate some gotos.

9 years agoseq_t needs to be visible to userspace
Mateusz Guzik [Sun, 5 Oct 2014 21:39:50 +0000 (21:39 +0000)]
seq_t needs to be visible to userspace

Pointy hat to: mjg
Reported by: bz
X-MFC: with r272567

9 years agoChange the UMA mutex into a rwlock
Bryan Venteicher [Sun, 5 Oct 2014 21:34:56 +0000 (21:34 +0000)]
Change the UMA mutex into a rwlock

Acquire the lock in read mode when just needed to ensure the stability
of the keg list. The UMA lock may be held for a long time (relatively
speaking) in uma_reclaim() on machines with lots of zones/kegs. If the
uma_timeout() would fire during that period, subsequent callouts on that
CPU may be significantly delayed.

Reviewed by: jhb

9 years agoVirtualize if_edsc(4).
Hiroki Sato [Sun, 5 Oct 2014 21:27:26 +0000 (21:27 +0000)]
Virtualize if_edsc(4).

9 years agoRemove unused MC_ALIGN macro as suggested by Robert.
Michael Tuexen [Sun, 5 Oct 2014 20:30:49 +0000 (20:30 +0000)]
Remove unused MC_ALIGN macro as suggested by Robert.

MFC after: 1 week

9 years agoVirtualize if_disc(4) cloner.
Hiroki Sato [Sun, 5 Oct 2014 19:46:52 +0000 (19:46 +0000)]
Virtualize if_disc(4) cloner.

9 years agoKeep struct filedescent comments within 80-char limit.
Mateusz Guzik [Sun, 5 Oct 2014 19:44:40 +0000 (19:44 +0000)]
Keep struct filedescent comments within 80-char limit.

9 years agoVirtualize if_bridge(4) cloner.
Hiroki Sato [Sun, 5 Oct 2014 19:43:37 +0000 (19:43 +0000)]
Virtualize if_bridge(4) cloner.

9 years agofiledesc: fix up breakage introduced in 272505
Mateusz Guzik [Sun, 5 Oct 2014 19:40:29 +0000 (19:40 +0000)]
filedesc: fix up breakage introduced in 272505

Include sequence counter supports incoditionally [1]. This fixes reprted build
problems with e.g. nvidia driver due to missing opt_capsicum.h.

Replace fishy looking sizeof with offsetof. Make fde_seq the last member in
order to simplify calculations.

Suggested by: kib [1]
X-MFC: with 272505

9 years agoOn error, sbuf_bcat() returns -1. Some callers returned this -1 to
Konstantin Belousov [Sun, 5 Oct 2014 17:35:59 +0000 (17:35 +0000)]
On error, sbuf_bcat() returns -1.  Some callers returned this -1 to
the upper layers, which interpret it as errno value, which happens to
be ERESTART.  The result was spurious restarts of the sysctls in loop,
e.g. kern.proc.proc, instead of returning ENOMEM to caller.

Convert -1 from sbuf_bcat() to ENOMEM, when returning to the callers
expecting errno.

In collaboration with: pho
Sponsored by: The FreeBSD Foundation (kib)
MFC after: 1 week

9 years agoFix format string warnings.
Andrey V. Elsukov [Sun, 5 Oct 2014 11:16:16 +0000 (11:16 +0000)]
Fix format string warnings.

9 years agoMerge the big-endian ARM targets together, and the little-endian ARM
Andrew Turner [Sun, 5 Oct 2014 11:06:22 +0000 (11:06 +0000)]
Merge the big-endian ARM targets together, and the little-endian ARM
targets. With this we assume any ARM target containing eb is big-endian,
otherwise it is little-endian.

9 years ago1) For %Z format, understand "UTC" name too.
Andrey A. Chernov [Sun, 5 Oct 2014 07:29:50 +0000 (07:29 +0000)]
1) For %Z format, understand "UTC" name too.
2) Return NULL if timegm() fails, because it means we can convert
what we have in GMT to local time needed.

9 years ago- Refactor defining variables.
Yoshihiro Takahashi [Sun, 5 Oct 2014 07:27:05 +0000 (07:27 +0000)]
- Refactor defining variables.
- Merge common modules both i386 and amd64 into one if-endif.
- Sort.
- There are no functional changes.

9 years agoAvoid unnecessary ppeers_lock acquisition in exit1.
Mateusz Guzik [Sun, 5 Oct 2014 07:21:41 +0000 (07:21 +0000)]
Avoid unnecessary ppeers_lock acquisition in exit1.

MFC after: 1 week

9 years agoEliminate use of M_EXT in IP6_EXTHDR_CHECK() by trimming a redundant
Robert Watson [Sun, 5 Oct 2014 06:28:53 +0000 (06:28 +0000)]
Eliminate use of M_EXT in IP6_EXTHDR_CHECK() by trimming a redundant
'if'/'else' case: it matches the simple 'else' case that follows.

This reduces awareness of external-storage mechanics outside of the
mbuf allocator.

Reviewed by: bz
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D900

9 years agoFix typo.
Andrey V. Elsukov [Sun, 5 Oct 2014 06:06:48 +0000 (06:06 +0000)]
Fix typo.

9 years agoRework bootparttest to use more code from sys/boot.
Andrey V. Elsukov [Sun, 5 Oct 2014 06:04:47 +0000 (06:04 +0000)]
Rework bootparttest to use more code from sys/boot.
Use disk_open() call to emulate loader behavior.

9 years agoAdd a bit more debug messages.
Andrey V. Elsukov [Sun, 5 Oct 2014 06:00:22 +0000 (06:00 +0000)]
Add a bit more debug messages.

9 years agoipfilter bug #537 NAT rules with sticky have incorrect hostmap IP address.
Cy Schubert [Sun, 5 Oct 2014 03:58:30 +0000 (03:58 +0000)]
ipfilter bug #537 NAT rules with sticky have incorrect hostmap IP address.
This fixes when an IP address mapping is put in the hostmap table for
sticky NAT rules, it ends up having the wrong byte order.

Obtained from: ipfilter CVS repo (r1.102), NetBSD CVS repo (r1.12)

9 years agoipfilter bug #534 destination list hashing not endian neutral
Cy Schubert [Sun, 5 Oct 2014 03:52:09 +0000 (03:52 +0000)]
ipfilter bug #534 destination list hashing not endian neutral

Obtained from: ipfilter CVS repo (r1.26), NetBSD CVS repo (r1.8)

9 years agoipfilter bug #538 ipf_p_dns_del should return void
Cy Schubert [Sun, 5 Oct 2014 03:48:09 +0000 (03:48 +0000)]
ipfilter bug #538 ipf_p_dns_del should return void

Obtained from: ipfilter cvs repo (r1.8)

9 years agoipfilter bug #554 Determining why a ipf rule matches is hard -- replace
Cy Schubert [Sun, 5 Oct 2014 03:45:19 +0000 (03:45 +0000)]
ipfilter bug #554 Determining why a ipf rule matches is hard -- replace
ipfilter rule compare with new ipf_rule_compare() function.

Obtained from: ipfilter CVS rep (r1.129)

9 years agoipfiler bug #550 filter rule list corrupted with inserted rules
Cy Schubert [Sun, 5 Oct 2014 03:41:47 +0000 (03:41 +0000)]
ipfiler bug #550 filter rule list corrupted with inserted rules

Obtained from: ipfilter CVS repo (r1.128); NetBSD CVS repo (r1.15)

9 years agoRemove stray uma_mtx lock/unlock in zone_drain_wait()
Bryan Venteicher [Sun, 5 Oct 2014 03:18:30 +0000 (03:18 +0000)]
Remove stray uma_mtx lock/unlock in zone_drain_wait()

Callers of zone_drain_wait(M_WAITOK) do not need to hold (and were not)
the uma_mtx, but we would attempt to unlock and relock the mutex if we
had to sleep because the zone was already draining. The M_NOWAIT callers
may hold the uma_mtx, but we do not sleep in that case.

Reviewed by: jhb
MFC after: 3 days

9 years agoUse printb() for boolean flags in ro_opts and actor_state for LACP.
Hiroki Sato [Sun, 5 Oct 2014 02:37:01 +0000 (02:37 +0000)]
Use printb() for boolean flags in ro_opts and actor_state for LACP.

9 years ago- Move L2 addr configuration for the primary port to a taskqueue. This fixes
Hiroki Sato [Sun, 5 Oct 2014 02:34:21 +0000 (02:34 +0000)]
- Move L2 addr configuration for the primary port to a taskqueue.  This fixes
  LOR of softc rmlock in iflladdr_event handlers.

- Call if_delmulti_ifma() after LACP_UNLOCK().  This fixes another LOR.

- Fix a panic in lacp_transit_expire().

- Fix a panic in lagg_input() upon shutting down a port.

9 years agoGet rid of crshared.
Mateusz Guzik [Sun, 5 Oct 2014 02:16:53 +0000 (02:16 +0000)]
Get rid of crshared.

9 years agoInclude urndis(4) in list of devices for which we generate hardware notes.
Gavin Atkinson [Sat, 4 Oct 2014 23:56:25 +0000 (23:56 +0000)]
Include urndis(4) in list of devices for which we generate hardware notes.

MFC after: 3 days

9 years agoSlightly reword comment. Move code, which is described by the
Konstantin Belousov [Sat, 4 Oct 2014 18:51:55 +0000 (18:51 +0000)]
Slightly reword comment.  Move code, which is described by the
comment, after it.

Discussed with: bde
Sponsored by: The FreeBSD Foundation
MFC after: 1 week