andrew [Wed, 22 Oct 2014 13:50:38 +0000 (13:50 +0000)]
MFC r273088:
Add support for the __aeabi_c*cmp* functions. These are similar to the
existing functions with the exception they use the condition flags to
store the result.
kib [Wed, 22 Oct 2014 09:06:36 +0000 (09:06 +0000)]
MFC r273130:
Change the deadfs poll VOP to return POLLIN|POLLRDNORM if the caller
is interested in i/o state. Return POLLNVAL for invalid bits, similar
to poll_no_poll().
bryanv [Wed, 22 Oct 2014 04:09:47 +0000 (04:09 +0000)]
MFC r272573:
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.
bryanv [Wed, 22 Oct 2014 04:01:27 +0000 (04:01 +0000)]
MFC r272796:
Add M_FLOWID to M_COPYFLAGS
The M_FLOWID flag should be propagated to the new mbuf pkthdr in
m_move_pkthdr() and m_dup_pkthdr(). The new mbuf already got the
existing flowid value, but would be ignored since the flag was
not set.
gjb [Tue, 21 Oct 2014 21:27:13 +0000 (21:27 +0000)]
MFC r273402:
Fix an issue where a FreeBSD virtual machine provisioned in
the Microsoft Azure service does not recognize the second
attached disk on the system.
PR: 194376
Insta-MFC OK: re (rodrigc)
Sponsored by: The FreeBSD Foundation
yongari [Tue, 21 Oct 2014 04:48:49 +0000 (04:48 +0000)]
MFC r272730,273018:
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
yongari [Tue, 21 Oct 2014 01:48:19 +0000 (01:48 +0000)]
MFC r272729,272732:
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.
yongari [Tue, 21 Oct 2014 01:14:56 +0000 (01:14 +0000)]
MFC r272721:
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.
delphij [Mon, 20 Oct 2014 18:58:45 +0000 (18:58 +0000)]
MFC r272504: MFV r272494:
Make space_map_truncate() always do space_map_reallocate(). Without
this, setting space_map_max_blksz would cause panic for existing pool,
as dmu_objset_set_blocksize would fail if the object have multiple blocks.
Illumos issues:
5164 space_map_max_blksz causes panic, does not work
5165 zdb fails assertion when run on pool with recently-enabled
spacemap_histogram feature
mav [Mon, 20 Oct 2014 08:03:23 +0000 (08:03 +0000)]
MFC r272978: Improve and document `ctladm portlist` subcommand.
Make this subcommand less FC-specific, reporting target and port addresses
in more generic way. Also make it report list of connected initiators in
unified way, working for both FC and iSCSI, and potentially others.
mav [Mon, 20 Oct 2014 07:57:07 +0000 (07:57 +0000)]
MFC r272938: Filter out duplicate AC_PATH_REGISTERED async events.
Queued async events handling in CAM opened race, that may lead to duplicate
AC_PATH_REGISTERED events delivery during boot. That was not happening
before r272935 because the driver was initialized later. After that change
it started create duplicate ports in CTL.
mav [Mon, 20 Oct 2014 07:52:48 +0000 (07:52 +0000)]
MFC r272935: Mark CTL frontend's CAM driver as CAM_PERIPH_DRV_EARLY.
Target mode operation does not depend on the initiator mode scan process.
This change allows the target driver to attach earlier and receive some
async events (like AC_CONTRACT) that could be lost otherwise.
mav [Mon, 20 Oct 2014 07:41:37 +0000 (07:41 +0000)]
MFC r272911:
Make ctld start even if some LUNs are unable to open backing storage.
Such LUNs will be visible to initiators, but return "not ready" status
on media access commands. If backing storage become available later,
`ctladm modify ...` or `service ctld reload` can trigger its reopen.
mav [Mon, 20 Oct 2014 07:35:46 +0000 (07:35 +0000)]
MFC r272812: Make iSCSI connection close somewhat less aggressive.
It allows to push out some final data from the send queue to the socket
before its close. In particular, it increases chances for logout response
to be delivered to the initiator.
mav [Mon, 20 Oct 2014 07:32:33 +0000 (07:32 +0000)]
MFC r272613:
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.
yongari [Mon, 20 Oct 2014 07:25:57 +0000 (07:25 +0000)]
MFC r271073:
Do not blindly announce 1000baseT half-duplex capability in
autonegotiation. Some controllers like cgem(4) do not support
half-duplex at gigabit speeds.
rpaulo [Mon, 20 Oct 2014 04:42:28 +0000 (04:42 +0000)]
MFC r271975:
Improvements to asmc(4):
1. changed the code so that 2**16 keys are supported
2. changed the number of possible fans in a system from 2 to 6
3. added write support for some fan sysctls
4. added a new sysctl which shows the ID of the fan
5. added four more apple models with their temperature keys
6. changed the maxnumber of temperature keys from 36 to 80
7. replaced several fixed buf sizes to sizeof buf
emaste [Mon, 20 Oct 2014 00:22:08 +0000 (00:22 +0000)]
MFC r273178: Update vt(4) for UEFI defaults and special keys
vt(4) is the default console for UEFI boot [1], and the bitmapped
kern.vt.spclkeys sysctl has been replaced with individual kern.vt.kbd_*
enable sysctls.
ache [Sun, 19 Oct 2014 21:16:24 +0000 (21:16 +0000)]
MFC r272562,r272678,r272679
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)
3) For %Z format, understand "UTC" name too.
tuexen [Sun, 19 Oct 2014 11:31:23 +0000 (11:31 +0000)]
MFC 273168:
Fix the reported streams in a SCTP_STREAM_RESET_EVENT, if a
sent incoming stream reset request was responded with failed
or denied.
Thanks to Peter Bostroem from Google for reporting the issue.
hselasky [Sat, 18 Oct 2014 07:07:34 +0000 (07:07 +0000)]
MFC r273135:
Update the OFED Linux compatibility layer and
Mellanox hardware driver(s):
- Properly name an inclusion guard
- Fix compile warnings regarding unsigned enums
- Add two new sysctl nodes
- Remove all empty linux header files
- Make an error printout more verbose
- Use "mod_delayed_work()" instead of
cancelling and starting a timeout.
- Implement more Linux scatterlist
functions.
adrian [Sat, 18 Oct 2014 01:02:30 +0000 (01:02 +0000)]
MFC r273112: Set the DROP_EN bit before the RX queue is brought up and active.
He noticed issues setting this bit in SRRCTL after the queue was up,
so doing it from the sysctl handler isn't enough and may not actually
work correctly.
This commit doesn't remove the sysctl path or try to change its
behaviour. I'll talk with others about how to finish fixing that
before I tackle that.
PR: kern/194311
Submitted by: luigi
MFC after: 3 days
Sponsored by: Norse Corp, Inc
jhb [Fri, 17 Oct 2014 20:03:01 +0000 (20:03 +0000)]
MFC 268369,268817,272771,272772:
Rewrite timeout(9) to be callout(9)-centric instead. Move the description
of timeout(9) to the end and mark it prominently as deprecated. Document
somewhat how times are specified for the 'sbt' variants. Better explain
how using callout_init_*() to associate a lock with a callout resolves
common races.
jhb [Fri, 17 Oct 2014 19:55:12 +0000 (19:55 +0000)]
MFC 272668:
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.
emaste [Fri, 17 Oct 2014 16:23:36 +0000 (16:23 +0000)]
MFC r257302 by rea:
binutils/bfd: fix printf-like format strings for "bfd *" arguments
There is a special format argument '%B' that directly handles values
of type 'bfd *', they must be used instead of '%s'. Manifestations
of this bug can be seen in ld(1) error messages, for example,
http://lists.freebsd.org/pipermail/freebsd-current/2013-August/043580.html
http://lists.freebsd.org/pipermail/freebsd-current/2013-October/045404.html
jhb [Fri, 17 Oct 2014 15:29:47 +0000 (15:29 +0000)]
MFC 272182:
Don't panic if a resource is allocated twice. Instead, print a warning and
fail the allocation request. Allocations of "reserved" resources such as
PCI BARs already fail the request instead of panic'ing in this case.
gjb [Thu, 16 Oct 2014 23:16:26 +0000 (23:16 +0000)]
MFC r273093, r273096:
r273093:
Merge the following from ^/projects/release-vmimage:
r272436, r272437, r272792:
r272436:
Remove the first argument to panic(), which was initially
intended to be the exit code, however when a non-zero exit
code was returned to release/Makefile, this would prevent
any remaining (and possibly successful) stages from being
attempted.
r272437:
If the vm-base target fails, prevent the vm-image target
from being run since it cannot possibly succeed.
r272792:
Add /usr/local/bin and /usr/local/sbin to PATH, needed
if third-party software needs to use utilities outside
of the base system during post-install stages (indexinfo
is one culprit).
r273096:
Merge the following from ^/projects/release-vmimage:
r273076, r273077, r273079, r273095:
r273076:
Add a separate make(1) target to release/Makefile to
build FreeBSD virtual machine disk images for use on
the Microsoft Azure service.
For now, this target is not directly connected to the
build, however can be manually invoked.
The 'vm-azure' target invokes {amd64,i386}/mk-azure.sh,
which does the heavy lifting to produce proper VHDs.
mk-azure.sh uses a configuration file, defaulting to
tools/azure.conf if otherwise unset.
r273077:
Clear VM_RC_LIST.
r273079:
Fix signal list to trigger umount(8).
r273095:
Output an informational message when mkimg(1) runs, so it
does not appear that the process has stopped while waiting
for a 'y/n' response when waagent is deprovisioned.
Relnotes: yes
Sponsored by: The FreeBSD Foundation
delphij [Thu, 16 Oct 2014 22:44:30 +0000 (22:44 +0000)]
MFC r272583: 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
delphij [Thu, 16 Oct 2014 22:12:23 +0000 (22:12 +0000)]
MFV r273060:
Use write_psize instead of write_asize when doing vdev_space_update.
Without this change the accounting of L2ARC usage would be wrong and
give 16EB free space because the number became negative and overflows.
glebius [Thu, 16 Oct 2014 20:46:02 +0000 (20:46 +0000)]
Merge r272385 by melifaro from head:
Free radix mask entries on main radix destroy.
This is temporary commit to be merged to 10.
Other approach (like hash table) should be used
to store different masks.
kib [Wed, 15 Oct 2014 14:07:24 +0000 (14:07 +0000)]
MFC r272761:
Add an argument to the x86 pmap_invalidate_cache_range() to request
forced invalidation of the cache range regardless of the presence of
self-snoop feature.
kib [Wed, 15 Oct 2014 13:39:00 +0000 (13:39 +0000)]
MFC r272070:
Expand the libthr(3) manpage to document knobs accepted by libthr.so
and explain some internal working of the library, neccessary to
understand the knobs effects.
MFC r272153 (by pluknet):
Fix description of mutex acquisition.
kib [Wed, 15 Oct 2014 13:36:01 +0000 (13:36 +0000)]
MFC r272069:
Switch the defaults to not split the RLIMIT_STACK-sized initial thread
stack into the stacks of the created threads. Add knob
LIBPTHREAD_SPLITSTACK_MAIN to restore the older behaviour.
pfg [Tue, 14 Oct 2014 23:16:52 +0000 (23:16 +0000)]
MFC r267851:
Continue the crusade towards a dev_clone()-free kernel, removing its
usage from dtrace. The dtrace code already uses cdevpriv(9) since FreeBSD
8, so this change is quite harmless.
gjb [Tue, 14 Oct 2014 16:44:15 +0000 (16:44 +0000)]
Revert r273084:
In the stable/ branches, release.prev intentionally points to the
previous version, in addition to a number of intentional version
mappings for the errata.html page, that this commit breaks.
Reported by: hrs
Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation
r272234:
Initial commit to include virtual machine images as part
of the FreeBSD release builds.
This adds a make(1) environment variable requirement,
WITH_VMIMAGES, which triggers the virtual machine image
targets when not defined to an empty value.
Relevant user-driven variables include:
o VMFORMATS: The virtual machine image formats to create.
Valid formats are provided by running 'mkimg --formats'
o VMSIZE: The size of the resulting virtual machine
image. Typical compression is roughly 140Mb, regardless
of the target size (10GB, 15GB, 20GB, 40GB sizes have been
tested with the same result).
o VMBASE: The prefix of the virtual machine disk images.
The VMBASE make(1) environment variable is suffixed with
each format in VMFORMATS for each individual disk image, as
well as '.img' for the source UFS filesystem passed to
mkimg(1).
This also includes a new script, mk-vmimage.sh, based on how
the VM images for 10.0-RELEASE, 9.3-RELEASE, and 10.1-RELEASE
were created (mk-vmimage.sh in ^/user/gjb/thermite/).
With the order in which the stages need to occur, as well as
sanity-checking error cases, it makes much more sense to
execute a shell script called from make(1), using env(1) to
set specific parameters for the target image than it does to
do this in make(1) directly.
r272236:
Use VMBASE in place of a hard-coded filename in the CLEANFILES
list.
r272262:
Remove a 'set -x' that snuck in during testing.
r272264:
release/Makefile:
Connect the virtual machine image build to the release
target if WITH_VMIMAGES is set to a non-empty value.
release/release.sh:
Add WITH_VMIMAGES to RELEASE_RMAKEFLAGS.
release/release.conf.sample:
Add commented entries for tuning the release build if the
WITH_VMIMAGES make(1) environment variable is set to
a non-empty value.
r272269:
release/Makefile:
Include .OBJDIR in DESTDIR in the vm-base target.
release/release.sh:
Provide the full path to mddev.
r272271:
Fix UFS label for the root filesystem.
r272272:
Remove comments left in accidentally while testing, so the
VM /etc/fstab is actually created.
r272277:
Remove the UFS label from the root filesystem since it is added
by mkimg(1) as a gpt label, consistent with the fstab(5) entry.
r272279:
Comment cleanup in panic() message when mkimg(1) does not support
the requested disk image format.
r272376:
Separate release/scripts/mk-vmimage.sh to machine-specific
scripts, making it possible to mimic the functionality for
non-x86 targets.
Move echo output if MAKEFLAGS is empty outside of usage().
Remove TARGET/TARGET_ARCH evaluation.
r272380:
Avoid using env(1) to set values passed to mk-vmimage.sh,
and instead pass the values as arguments to the script,
making it easier to run this by hand, without 'make release'.
Add usage_vm_base() and usage_vm_image() usage helpers.
r272381:
After evaluating WITH_VMIMAGES is non-empty, ensure
the mk-vmimage.sh script exists before running it.
r272392:
Add WITH_COMPRESSED_VMIMAGES variable, which when set enables
xz(1) compression of the virtual machine images.
This is intentionally separate to allow more fine-grained
tuning over which images are compressed, especially in cases
where compressing 20GB sparse images can take hours.
r272412:
Document the new 'vm-image' target, and associated release.conf
variables.
r272413:
Remove two stray comments added during the initial iterations
of testing, no longer needed.
mav [Tue, 14 Oct 2014 12:13:01 +0000 (12:13 +0000)]
MFC r271588: Update CAM CCB accounting for the new status quo.
devq_openings counter lost its meaning after allocation queues has gone.
held counter is still meaningful, but problematic to update due to separate
locking of CCB allocation and queuing.
To fix that replace devq_openings counter with allocated counter. held is
now calculated on request as difference between number of allocated, queued
and active CCBs.