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

8 years agoNew sendfile(2) syscall. A joint effort of NGINX and Netflix from 2013 and
glebius [Fri, 8 Jan 2016 20:34:57 +0000 (20:34 +0000)]
New sendfile(2) syscall. A joint effort of NGINX and Netflix from 2013 and
up to now.

The new sendfile is the code that Netflix uses to send their multiple tens
of gigabits of data per second. The new implementation features asynchronous
I/O, when I/O operations are launched, but not awaited to be complete. An
explanation of why such behavior is beneficial compared to old one is
going to be too long for a commit message, so we will skip it here.

Additional features of new syscall are extra flags, which provide an
application more control over data sent. The SF_NOCACHE flag tells
kernel that data shouldn't be cached after it was sent. The SF_READAHEAD()
macro allows to specify readahead size in pages.

The new syscalls is a drop in replacement. No modifications are required
to applications. One can take nginx binary for stable/10 and run it
successfully on head. Although SF_NODISKIO lost its original sense, as now
sendfile doesn't block, and now means something completely different (tm),
using the new sendfile the old way is absolutely safe.

Celebrates: Netflix global launch!
Sponsored by: Nginx, Inc.
Sponsored by: Netflix
Relnotes: yes

8 years ago- Add a geom_raid3 specific cleanup function and trap on that function at
ngie [Fri, 8 Jan 2016 19:47:49 +0000 (19:47 +0000)]
- Add a geom_raid3 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 conf.sh file for executing common functions with gnop
ngie [Fri, 8 Jan 2016 19:43:18 +0000 (19:43 +0000)]
- Add a conf.sh file for executing common functions with gnop
- 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 conf.sh file for executing common functions with geli
ngie [Fri, 8 Jan 2016 19:38:59 +0000 (19:38 +0000)]
- Add a conf.sh file for executing common functions with geli
-- Use linear probing to find the first unique md(4) device, unlike the other
   code which uses attach_md, as geli(8) allocates the md(4) devices itself
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

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

8 years agoReduce libstand Makefile duplication
emaste [Fri, 8 Jan 2016 19:12:26 +0000 (19:12 +0000)]
Reduce libstand Makefile duplication

Userboot's copy of the libstand Makefile had more extensive changes
compared to the one in sys/boot/libstand32, but it turns out these are
not intentional and we can just include lib/libstand/Makefile as done
for libstand32 in r293040.

Reviewed by: imp, jhb
Tested by: allanjude
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4793

8 years ago- Use attach_md for memory disks so they can be tracked.
ngie [Fri, 8 Jan 2016 19:10:52 +0000 (19:10 +0000)]
- Use attach_md for memory disks so they can be tracked.
- Add a geom_concat specific cleanup function and trap on that function at
  exit so things are cleaned up properly
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

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

8 years agoMake it possible for sbappend() to preserve M_NOTREADY on mbufs, just like
glebius [Fri, 8 Jan 2016 19:03:20 +0000 (19:03 +0000)]
Make it possible for sbappend() to preserve M_NOTREADY on mbufs, just like
sbappendstream() does. Although, M_NOTREADY may appear only on SOCK_STREAM
sockets, due to sendfile(2) supporting only the latter, there is a corner
case of AF_UNIX/SOCK_STREAM socket, that still uses records for the sake
of control data, albeit being stream socket.

Provide private version of m_clrprotoflags(), which understands PRUS_NOTREADY,
similar to m_demote().

8 years agoAvoid unintended $FreeBSD$ expansion in generate-fat.sh
emaste [Fri, 8 Jan 2016 17:33:34 +0000 (17:33 +0000)]
Avoid unintended $FreeBSD$ expansion in generate-fat.sh

8 years agoRevert r293405: it breaks socket buffer INVARIANTS when sending control
glebius [Fri, 8 Jan 2016 17:27:23 +0000 (17:27 +0000)]
Revert r293405: it breaks socket buffer INVARIANTS when sending control
data over local sockets.

8 years agoAdd safety belt for boot1.efi file size
emaste [Fri, 8 Jan 2016 16:37:22 +0000 (16:37 +0000)]
Add safety belt for boot1.efi file size

Reviewed by: smh
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4833

8 years agoDo more fine-grained locking in rtrequest1_fib().
melifaro [Fri, 8 Jan 2016 16:25:11 +0000 (16:25 +0000)]
Do more fine-grained locking in rtrequest1_fib().

Last consumer using RTF_RNH_LOCKED flag was eliminated in r291643.
Restrict passing RTF_RNH_LOCKED to rtrequest1_fib() and do better
  locking for RTM_ADD / RTM_DELETE cases.

8 years agoMFV r293415:
delphij [Fri, 8 Jan 2016 15:53:48 +0000 (15:53 +0000)]
MFV r293415:

ntp 4.2.8p5

Reviewed by: cy, roberto
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D4828

8 years agoUpdate generated efi boot image templates
smh [Fri, 8 Jan 2016 13:58:36 +0000 (13:58 +0000)]
Update generated efi boot image templates

r279533 increased the boot1 size from 64k to 128k but didn't regenerate the
fat templates, hence the change was never activated.

With recent and upcoming changes the efi boot1 binary is now > 64k.

To avoid fat corruption in the created boot images regenerate the
templates to activate the boot1 size increase.

MFC after: 2 weeks
X-MFC-With: r293268

8 years agoFix issues found by mandoc -Tlint.
brueffer [Fri, 8 Jan 2016 13:33:22 +0000 (13:33 +0000)]
Fix issues found by mandoc -Tlint.

MFC after: 1 week

8 years agoLinuxKPI style changes:
hselasky [Fri, 8 Jan 2016 10:04:19 +0000 (10:04 +0000)]
LinuxKPI style changes:
- Properly prefix internal functions with "linux_" instead of only a
  single underscore to avoid future namespace collisions.
- Make some functions global instead of inline to ease debugging and
  to avoid unnecessary code duplication.
- Remove no longer existing kthread_create() function's prototype.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoVendor import of ntp-4.2.8p5.
delphij [Fri, 8 Jan 2016 08:06:14 +0000 (08:06 +0000)]
Vendor import of ntp-4.2.8p5.

8 years agoAdd support for ZFS Boot Environments to userboot (for bhyve and others)
allanjude [Fri, 8 Jan 2016 05:09:55 +0000 (05:09 +0000)]
Add support for ZFS Boot Environments to userboot (for bhyve and others)

While here, also fix a possible null pointer

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

8 years agoFor SOCK_STREAM socket use sbappendstream() instead of sbappend().
glebius [Fri, 8 Jan 2016 01:16:03 +0000 (01:16 +0000)]
For SOCK_STREAM socket use sbappendstream() instead of sbappend().

8 years agoRevert r293201, r293202 (rtld: populate DT_DEBUG iff DYNAMIC segment is writable)
emaste [Fri, 8 Jan 2016 00:56:41 +0000 (00:56 +0000)]
Revert r293201, r293202 (rtld: populate DT_DEBUG iff DYNAMIC segment is writable)

It turns out MIPS binaries may have other oddities that can trigger a
fault at startup.

PR: 206017
Reported by: ray

8 years agoMake sure that the /set directive gets put at the top of the file,
imp [Fri, 8 Jan 2016 00:05:47 +0000 (00:05 +0000)]
Make sure that the /set directive gets put at the top of the file,
instead of in sort order. Slash sorts after period.

8 years agoSetup /pkg as a spot for pkg to operate. This is for testing purposes
imp [Fri, 8 Jan 2016 00:05:28 +0000 (00:05 +0000)]
Setup /pkg as a spot for pkg to operate. This is for testing purposes
only. You need to remount / rw and export TMPDIR=/pkg/tmp. pkg will
then work. It's slow though: 15 minutes to pkg install git on an RPi 2
with a decently fast SD card. Since this is for testing, we set
DEFAULT_ALWAYS_YES and ASSUME_ALWAYS_YES to YES.

8 years agosh: Reduce size of options table.
jilles [Thu, 7 Jan 2016 23:13:20 +0000 (23:13 +0000)]
sh: Reduce size of options table.

8 years agoioat(4): Add ioat_acquire_reserve() KPI
cem [Thu, 7 Jan 2016 23:02:15 +0000 (23:02 +0000)]
ioat(4): Add ioat_acquire_reserve() KPI

ioat_acquire_reserve() is an extended version of ioat_acquire().  It
allows users to reserve space in the channel for some number of
descriptors.  If this succeeds, it guarantees that at least submission
of N valid descriptors will succeed.

Sponsored by: EMC / Isilon Storage Division

8 years agoBump copyright (forgotten part of r293340)
dteske [Thu, 7 Jan 2016 22:13:17 +0000 (22:13 +0000)]
Bump copyright (forgotten part of r293340)

MFC after: 3 days
X-MFC-to: stable/10
X-MFC-with: r293340

8 years agosh: Add a test for 'cd -'.
jilles [Thu, 7 Jan 2016 21:46:07 +0000 (21:46 +0000)]
sh: Add a test for 'cd -'.

Redirect 'cd -' output to /dev/null since POSIX requires it to write the new
directory name even if not interactive, but we currently only write it if
interactive.

8 years agoext2fs: reading mmaped file in Ext4 causes panic
pfg [Thu, 7 Jan 2016 21:43:43 +0000 (21:43 +0000)]
ext2fs: reading mmaped file in Ext4 causes panic

Always call brelse(path.ep_bp), fixing reading EXT4 files using mmap().

Patch by Damjan Jovanovic.

PR: 205938
MFC after: 1 week

8 years agoismt: fix ISMT_DESC_ADDR_RW macro
jimharris [Thu, 7 Jan 2016 21:16:44 +0000 (21:16 +0000)]
ismt: fix ISMT_DESC_ADDR_RW macro

Submitted by: Masanobu SAITOH <msaitoh@netbsd.org>
MFC after: 3 days

8 years agoAllow libnv to be built externally using GCC.
bdrewery [Thu, 7 Jan 2016 20:52:35 +0000 (20:52 +0000)]
Allow libnv to be built externally using GCC.

GCC does not define _VA_LIST_DECLARED.  It defines _VA_LIST_ and others.
This was causing the prototype to not be defined and leading to an error
later due to using nvlist_add_stringv(3) without a prototype in
nvlist_add_stringf(3).

This uses the same check as other va_list prototypes in the original
change in r279438.

8 years agosh: Ensure OPTIND=1 in subshell without forking does not affect outer env.
jilles [Thu, 7 Jan 2016 20:48:24 +0000 (20:48 +0000)]
sh: Ensure OPTIND=1 in subshell without forking does not affect outer env.

Command substitutions containing a single simple command and here-document
expansion are performed in a subshell environment, but may not fork. Any
modified state of the shell environment should be restored afterward.

The state that OPTIND=1 had been done was not saved and restored here.

Note that the other parts of shellparam need not be saved and restored,
since they are not modified in these situations (a fork is done before such
modifications).

8 years agoObsolete inetd related files when WITHOUT_INETD is set
garga [Thu, 7 Jan 2016 20:37:18 +0000 (20:37 +0000)]
Obsolete inetd related files when WITHOUT_INETD is set

Reviewed by: bapt
Approved by: gnn
MFC after: 1 week
Sponsored by: Rubiconn Communications (Netgate)
Differential Revision: https://reviews.freebsd.org/D4742

8 years agonvme: replace NVME_CEILING macro with howmany()
jimharris [Thu, 7 Jan 2016 20:35:26 +0000 (20:35 +0000)]
nvme: replace NVME_CEILING macro with howmany()

Suggested by: rpokala
MFC after: 3 days

8 years agonvme: add hw.nvme.min_cpus_per_ioq tunable
jimharris [Thu, 7 Jan 2016 20:32:04 +0000 (20:32 +0000)]
nvme: add hw.nvme.min_cpus_per_ioq tunable

Due to FreeBSD system-wide limits on number of MSI-X vectors
(https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199321),
it may be desirable to allocate fewer than the maximum number
of vectors for an NVMe device, in order to save vectors for
other devices (usually Ethernet) that can take better
advantage of them and may be probed after NVMe.

This tunable is expressed in terms of minimum number of CPUs
per I/O queue instead of max number of queues per controller,
to allow for a more even distribution of CPUs per queue.  This
avoids cases where some number of CPUs have a dedicated queue,
but other CPUs need to share queues.  Ideally the PR referenced
above will eventually be fixed and the mechanism implemented
here becomes obsolete anyways.

While here, fix a bug in the CPUs per I/O queue calculation to
properly account for the admin queue's MSI-X vector.

Reviewed by: gallatin
MFC after: 3 days
Sponsored by: Intel

8 years agoConvert sys/cam to use make_dev_s().
kib [Thu, 7 Jan 2016 20:22:55 +0000 (20:22 +0000)]
Convert sys/cam to use make_dev_s().

Reviewed by: hps, jhb
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks
Differential revision: https://reviews.freebsd.org/D4746

8 years agoConvert tty common code to use make_dev_s().
kib [Thu, 7 Jan 2016 20:15:09 +0000 (20:15 +0000)]
Convert tty common code to use make_dev_s().

Tty.c was untypical in that it handled the si_drv1 issue consistently
and correctly, by always checking for si_drv1 being non-NULL and
sleeping if NULL.  The removed code also illustrated unneeded
complications in drivers which are eliminated by the use of new KPI.

Reviewed by: hps, jhb
Discussed with: bde
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks
Differential revision: https://reviews.freebsd.org/D4746

8 years agoProvide yet another KPI for cdev creation, make_dev_s(9).
kib [Thu, 7 Jan 2016 20:08:02 +0000 (20:08 +0000)]
Provide yet another KPI for cdev creation, make_dev_s(9).

Immediate problem fixed by the new KPI is the long-standing race
between device creation and assignments to cdev->si_drv1 and
cdev->si_drv2, which allows the window where cdevsw methods might be
called with si_drv1,2 fields not yet set.  Devices typically checked
for NULL and returned spurious errors to usermode, and often left some
methods unchecked.

The new function interface is designed to be extensible, which should
allow to add more features to make_dev_s(9) without inventing yet
another name for function to create devices, while maintaining KPI and
even KBI backward-compatibility.

Reviewed by: hps, jhb
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks
Differential revision: https://reviews.freebsd.org/D4746

8 years agoDIRDEPS_BUILD: Update dependencies.
bdrewery [Thu, 7 Jan 2016 19:58:23 +0000 (19:58 +0000)]
DIRDEPS_BUILD: Update dependencies.

Sponsored by: EMC / Isilon Storage Division

8 years agoMove amd64 metadata.h to x86 and share with i386
emaste [Thu, 7 Jan 2016 19:47:26 +0000 (19:47 +0000)]
Move amd64 metadata.h to x86 and share with i386

MFC after: 1 week

8 years agoAlways try to upgrade to bmake if not already using it.
bdrewery [Thu, 7 Jan 2016 19:37:11 +0000 (19:37 +0000)]
Always try to upgrade to bmake if not already using it.

This is mostly targetting stable/10 which requires bmake to build and
has issues upgrading from <10.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
PR: 198062

8 years agoDon't install /usr/include/stand.h twice after r293040.
bdrewery [Thu, 7 Jan 2016 19:19:23 +0000 (19:19 +0000)]
Don't install /usr/include/stand.h twice after r293040.

Only install it from lib/libstand.

Sponsored by: EMC / Isilon Storage Division

8 years agoIncrease maximum buffer size for `-x cmd' value
dteske [Thu, 7 Jan 2016 18:50:02 +0000 (18:50 +0000)]
Increase maximum buffer size for `-x cmd' value

MFC after: 3 days
X-MFC-to: stable/10

8 years agonet80211 drivers: fix ieee80211_init_channels() usage
avos [Thu, 7 Jan 2016 18:41:03 +0000 (18:41 +0000)]
net80211 drivers: fix ieee80211_init_channels() usage

Fix out-of-bounds read (all) / write (11n capable) for drivers
that are using ieee80211_init_channels() to initialize channel list.

Tested with:
 * RTL8188EU, STA mode.
 * RTL8188CUS, STA mode.
 * WUSB54GC, HOSTAP mode.

Approved by: adrian (mentor)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D4818

8 years agoFix VF handling of VLANs.
sbruno [Thu, 7 Jan 2016 18:34:56 +0000 (18:34 +0000)]
Fix VF handling of VLANs.

This helps immensily with our ability to operate in the Amazon Cloud.

Discussed on Intel Networking Community call this morning.

Submitted by: Jarrod Petz(petz@nisshoko.net)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D4788

8 years agoFixup SFP module insertion on the 82599 when insertion happens after
sbruno [Thu, 7 Jan 2016 17:02:34 +0000 (17:02 +0000)]
Fixup SFP module insertion on the 82599 when insertion happens after
the system is booted and running.

Add PHY detection logic to ixgbe_handle_mod() and add locking to
ixgbe_handle_msf() as well.

PR: 150251
Submitted by: aboyer@averesystems.com
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D3188

8 years agoDisable the reuse of checksum offload context descriptors in the case
sbruno [Thu, 7 Jan 2016 16:48:47 +0000 (16:48 +0000)]
Disable the reuse of checksum offload context descriptors in the case
of multiple queues in em(4).  Document errata in the code.

MFC after: 2 weeks
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D3995

8 years agoSwitch em(4) to the extended RX descriptor format. This matches the
sbruno [Thu, 7 Jan 2016 16:42:48 +0000 (16:42 +0000)]
Switch em(4) to the extended RX descriptor format.  This matches the
e1000/e1000e split in linux.

Split rxbuffer and txbuffer apart to support the new RX descriptor format
structures. Move rxbuffer manipulation to em_setup_rxdesc() to unify the
new behavior changes.

Add a RSSKEYLEN macro for help in generating the RSSKEY data structures
in the card.

Change em_receive_checksum() to process the new rxdescriptor format
status bit.

MFC after: 2 weeks
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D3447

8 years agoWow, um ... sorry about that. The commit log for this code should have
sbruno [Thu, 7 Jan 2016 16:24:18 +0000 (16:24 +0000)]
Wow, um ... sorry about that.  The commit log for this code should have
read that it was for EM_MULTIQUEUE.  Revert this and try again.

8 years agoSwitch em(4) to the extended RX descriptor format. This matches the
sbruno [Thu, 7 Jan 2016 16:20:55 +0000 (16:20 +0000)]
Switch em(4) to the extended RX descriptor format.  This matches the
e1000/e1000e split in linux.

MFC after: 2 weeks
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D3447

8 years agonvme: do not revert o single I/O queue when per-CPU queues not possible
jimharris [Thu, 7 Jan 2016 16:18:32 +0000 (16:18 +0000)]
nvme: do not revert o single I/O queue when per-CPU queues not possible

Previously nvme(4) would revert to a signle I/O queue if it could not
allocate enought interrupt vectors or NVMe submission/completion queues
to have one I/O queue per core.  This patch determines how to utilize a
smaller number of available interrupt vectors, and assigns (as closely
as possible) an equal number of cores to each associated I/O queue.

MFC after: 3 days
Sponsored by: Intel

8 years agonvme: break out interrupt setup code into a separate function
jimharris [Thu, 7 Jan 2016 16:12:42 +0000 (16:12 +0000)]
nvme: break out interrupt setup code into a separate function

MFC after: 3 days
Sponsored by: Intel

8 years agonvme: do not pre-allocate MSI-X IRQ resources
jimharris [Thu, 7 Jan 2016 16:11:31 +0000 (16:11 +0000)]
nvme: do not pre-allocate MSI-X IRQ resources

The issue referenced here was resolved by other changes
in recent commits, so this code is no longer needed.

MFC after: 3 days
Sponsored by: Intel

8 years agonvme: remove per_cpu_io_queues from struct nvme_controller
jimharris [Thu, 7 Jan 2016 16:09:56 +0000 (16:09 +0000)]
nvme: remove per_cpu_io_queues from struct nvme_controller

Instead just use num_io_queues to make this determination.

This prepares for some future changes enabling use of multiple
queues when we do not have enough queues or MSI-X vectors
for one queue per CPU.

MFC after: 3 days
Sponsored by: Intel

8 years agonvme: simplify some of the nested ifs in interrupt setup code
jimharris [Thu, 7 Jan 2016 16:08:04 +0000 (16:08 +0000)]
nvme: simplify some of the nested ifs in interrupt setup code

This prepares for some follow-up commits which do more work in
this area.

MFC after: 3 days
Sponsored by: Intel

8 years agonvd: submit bios directly when BIO_ORDERED not set or in flight
jimharris [Thu, 7 Jan 2016 16:06:23 +0000 (16:06 +0000)]
nvd: submit bios directly when BIO_ORDERED not set or in flight

This significantly improves parallelism in the most common case.
The taskqueue is still used whenever BIO_ORDERED bios are in flight.

This patch is based heavily on a patch from gallatin@.

MFC after: 3 days
Sponsored by: Intel

8 years agonvd: break out submission logic into separate function
jimharris [Thu, 7 Jan 2016 15:59:51 +0000 (15:59 +0000)]
nvd: break out submission logic into separate function

This enables a future patch using this same logic to submit
I/O directly bypassing the taskqueue.

MFC after: 3 days
Sponsored by: Intel

8 years agonvd: skip BIO_ORDERED logic when bio fails submission
jimharris [Thu, 7 Jan 2016 15:58:44 +0000 (15:58 +0000)]
nvd: skip BIO_ORDERED logic when bio fails submission

This ensures the bio flags are not read after biodone().
The ordering will still be enforced, after the bio is
submitted successfully.

MFC after: 3 days
Sponsored by: Intel

8 years agonvd: do not wait for previous bios before submitting ordered bio
jimharris [Thu, 7 Jan 2016 15:57:17 +0000 (15:57 +0000)]
nvd: do not wait for previous bios before submitting ordered bio

Still wait until all in-flight bios (including the ordered bio)
complete before processing more bios from the queue.

MFC after: 3 days
Sponsored by: Intel

8 years agonvd: set DISKFLAG_DIRECT_COMPLETION
jimharris [Thu, 7 Jan 2016 15:55:41 +0000 (15:55 +0000)]
nvd: set DISKFLAG_DIRECT_COMPLETION

Submitted by: gallatin
MFC after: 3 days

8 years agoPrint curpmap in "show pcpu" command.
skra [Thu, 7 Jan 2016 12:31:49 +0000 (12:31 +0000)]
Print curpmap in "show pcpu" command.

Approved by: kib (mentor)

8 years agoDo not use 'struct route_in6' inside hash6_insert().
melifaro [Thu, 7 Jan 2016 12:22:29 +0000 (12:22 +0000)]
Do not use 'struct route_in6' inside hash6_insert().

rin6 was used only as sockaddr_in6 storage. Make rtalloc1_fib()
  use on-stack sin6 and return rtenry directly, instead of doing
  useless work with 'struct route_in6'.

8 years agoApply the changes from r293284 to one additional file.
jtl [Thu, 7 Jan 2016 11:54:20 +0000 (11:54 +0000)]
Apply the changes from r293284 to one additional file.

Discussed with: glebius

8 years agoMake cap_mkdb and services_mkdb file operations sync
garga [Thu, 7 Jan 2016 10:39:13 +0000 (10:39 +0000)]
Make cap_mkdb and services_mkdb file operations sync

Similar fix was done for passwd and group operations in r285050. When a
temporary file is created and then renamed to replace official file there
are no checks to make sure data was written to disk and if a power cycle
happens at this time, system can end up with a 0 length file

Approved by: bapt
MFC after: 1 week
Sponsored by: Netgate
Differential Revision: https://reviews.freebsd.org/D2982

8 years agoConvert pf(4) to the new routing API.
melifaro [Thu, 7 Jan 2016 10:20:03 +0000 (10:20 +0000)]
Convert pf(4) to the new routing API.

Differential Revision: https://reviews.freebsd.org/D4763

8 years agoRemove unused file.
hselasky [Thu, 7 Jan 2016 09:40:19 +0000 (09:40 +0000)]
Remove unused file.

8 years agoConvert cxgb/cxgbe to the new routing API.
melifaro [Thu, 7 Jan 2016 08:07:17 +0000 (08:07 +0000)]
Convert cxgb/cxgbe to the new routing API.

Discussed with: np

8 years agoMake additional parts of sys/geom/eli more usable in userspace
allanjude [Thu, 7 Jan 2016 05:47:34 +0000 (05:47 +0000)]
Make additional parts of sys/geom/eli more usable in userspace

The upcoming GELI support in the loader reuses parts of this code
Some ifdefs are added, and some code is moved outside of existing ifdefs

The HMAC parts of GELI are broken out into their own file, to separate
them from the kernel crypto/openssl dependant parts that are replaced
in the boot code.

Passed the GELI regression suite (tools/regression/geom/eli)
 Files=20 Tests=14996
 Result: PASS

Reviewed by: pjd, delphij
MFC after: 1 week
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D4699

8 years agoAllow /etc/exports to contain usernames/groups with spaces in them.
jpaetzel [Thu, 7 Jan 2016 05:34:39 +0000 (05:34 +0000)]
Allow /etc/exports to contain usernames/groups with spaces in them.

If you are getting your users/groups from a directory service such
as LDAP or AD it's possible for those usernames or groupnames to
contain spaces.

Submitted by: Sean E. Fagan
Reviewed by: rmacklem
MFC after: 1 week
Sponsored by: iXsystems

8 years agocache: ansify functions and fix some style issues
mjg [Thu, 7 Jan 2016 02:04:17 +0000 (02:04 +0000)]
cache: ansify functions and fix some style issues

No functional changes.

8 years agoUpdate dependencies after r292622 moved the ioctl script.
bdrewery [Thu, 7 Jan 2016 00:32:40 +0000 (00:32 +0000)]
Update dependencies after r292622 moved the ioctl script.

Sponsored by: EMC / Isilon Storage Division

8 years agoRevert r293286. It was not intended to come in yet.
bdrewery [Thu, 7 Jan 2016 00:20:47 +0000 (00:20 +0000)]
Revert r293286.   It was not intended to come in yet.

8 years agoAdd in DIRDEPS_BUILD support.
bdrewery [Thu, 7 Jan 2016 00:19:30 +0000 (00:19 +0000)]
Add in DIRDEPS_BUILD support.

Sponsored by: EMC / Isilon Storage Division

8 years agoMove the MAKEOBJDIRPREFIX value guard to sys.mk and expand to MAKEOBJDIR.
bdrewery [Thu, 7 Jan 2016 00:19:03 +0000 (00:19 +0000)]
Move the MAKEOBJDIRPREFIX value guard to sys.mk and expand to MAKEOBJDIR.

This will ensure that the variable was not set as a make override, in
make.conf, src.conf or src-env.conf.  It allows setting the value in
src-env.conf when using WITH_AUTO_OBJ since that case properly handles
changing .OBJDIR (except if MAKEOBJDIRPREFIX does not yet exist which is
being discussed to be changed).

This change allows setting a default MAKEOBJDIRPREFIX via local.sys.env.mk.

Sponsored by: EMC / Isilon Storage Division

8 years agoSwitch GNU ld to be installed as ld.bfd and linked as ld
emaste [Thu, 7 Jan 2016 00:15:02 +0000 (00:15 +0000)]
Switch GNU ld to be installed as ld.bfd and linked as ld

We intend to replace GNU ld with LLVM's lld, and on the path to there
we'll experiment with having lld installed or linked as /usr/bin/ld.
Thus, make ld.bfd the primary install target for GNU ld, to later
facilitate making the ld link optional.

Reviewed by: davide, dim
Differential Revision: https://reviews.freebsd.org/D4790

8 years agoHistorically we have two fields in tcpcb to describe sender MSS: t_maxopd,
glebius [Thu, 7 Jan 2016 00:14:42 +0000 (00:14 +0000)]
Historically we have two fields in tcpcb to describe sender MSS: t_maxopd,
and t_maxseg. This dualism emerged with T/TCP, but was not properly cleaned
up after T/TCP removal. After all permutations over the years the result is
that t_maxopd stores a minimum of peer offered MSS and MTU reduced by minimum
protocol header. And t_maxseg stores (t_maxopd - TCPOLEN_TSTAMP_APPA) if
timestamps are in action, or is equal to t_maxopd otherwise. That's a very
rough estimate of MSS reduced by options length. Throughout the code it
was used in places, where preciseness was not important, like cwnd or
ssthresh calculations.

With this change:

- t_maxopd goes away.
- t_maxseg now stores MSS not adjusted by options.
- new function tcp_maxseg() is provided, that calculates MSS reduced by
  options length. The functions gives a better estimate, since it takes
  into account SACK state as well.

Reviewed by: jtl
Differential Revision: https://reviews.freebsd.org/D3593

8 years agoProvide knob NO_INSTALLEXTRAKERNELS. If defined, extra kernels in KERNCONF
glebius [Wed, 6 Jan 2016 21:58:45 +0000 (21:58 +0000)]
Provide knob NO_INSTALLEXTRAKERNELS. If defined, extra kernels in KERNCONF
won't be installed, only the first one would.

8 years agoUse standard name for ASCII LF and FF control codes
emaste [Wed, 6 Jan 2016 21:47:49 +0000 (21:47 +0000)]
Use standard name for ASCII LF and FF control codes

PR: 205778
MFC after: 2 weeks

8 years agostyle(9) fixes for EFI boot
smh [Wed, 6 Jan 2016 20:48:29 +0000 (20:48 +0000)]
style(9) fixes for EFI boot

Fix some style(9) nits for EFI boot code, no functional changes.

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

8 years agoFix const conversion warning in lz4_decompress
smh [Wed, 6 Jan 2016 20:28:09 +0000 (20:28 +0000)]
Fix const conversion warning in lz4_decompress

Fix const conversion warning in lz4_decompress which shows when warnings
are enabled (to be done later).

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

8 years agoFix return from zfs_probe_dev
smh [Wed, 6 Jan 2016 20:25:41 +0000 (20:25 +0000)]
Fix return from zfs_probe_dev

Ensure zfs_probe_dev returns the correct value.

Also fix a style(9) trailing whitespace issue while here.

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

8 years agoFix _MSC_EXTENSIONS checks
smh [Wed, 6 Jan 2016 20:22:28 +0000 (20:22 +0000)]
Fix _MSC_EXTENSIONS checks

Use #ifdef instead of #if checks to prevent warnings generated by checks
to be enabled shortly.

MFC after: 2 weeks
Sponsored by: Multiplay

8 years agolibunwind: Include header for dl_unwind_find_exidx for ARM EHABI
emaste [Wed, 6 Jan 2016 19:41:06 +0000 (19:41 +0000)]
libunwind: Include header for dl_unwind_find_exidx for ARM EHABI

8 years agoloader.efi style(9) cleanup
emaste [Wed, 6 Jan 2016 19:18:43 +0000 (19:18 +0000)]
loader.efi style(9) cleanup

Submitted by: smh

8 years agoIntroduce and use new EFI_ERROR_CODE macro for EFI errors
emaste [Wed, 6 Jan 2016 19:15:16 +0000 (19:15 +0000)]
Introduce and use new EFI_ERROR_CODE macro for EFI errors

Submitted by: smh
MFC after: 1 week

8 years agoAdd fls() to libstand
emaste [Wed, 6 Jan 2016 17:33:32 +0000 (17:33 +0000)]
Add fls() to libstand

Although we don't use it in tree yet libstand is installed as user-
facing /usr/liblibstand.a, and some work in progress makes use of it.
Instead of conflicting with ongoing libstand Makefile deduplication,
just add it now.

8 years agoTry a little harder to remove firstboot and firstboot-reboot files in
imp [Wed, 6 Jan 2016 17:13:40 +0000 (17:13 +0000)]
Try a little harder to remove firstboot and firstboot-reboot files in
case they accidentally get created as directories or with flags that
prevent their removal. While I wouldn't normally go the extra mile
here and let the normal unix rules prevail, the effects of failure are
large enough that extra care is warranted.

8 years agoEnable the beastie menu for the UEFI console
emaste [Wed, 6 Jan 2016 15:50:21 +0000 (15:50 +0000)]
Enable the beastie menu for the UEFI console

As of r293233 the UEFI console includes basic terminal emulator support.

MFC after: 2 weeks
Relnotes: Yes

8 years agoloader.efi: add terminal emulation support
emaste [Wed, 6 Jan 2016 15:38:39 +0000 (15:38 +0000)]
loader.efi: add terminal emulation support

This is based on the vidconsole implementation.

Submitted by: Toomas Soome <tsoome@me.com>
Reviewed by: adrian
MFC after: 2 weeks
Relnotes: Yes
Differential Revision: https://reviews.freebsd.org/D4797