]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 04:36:28 +0000 (04:36 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 04:36:06 +0000 (04:36 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 04:35:49 +0000 (04:35 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 04:35:36 +0000 (04:35 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 04:35:18 +0000 (04:35 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 04:35:00 +0000 (04:35 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 04:34:34 +0000 (04:34 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 04:34:01 +0000 (04:34 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 04:33:45 +0000 (04:33 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 04:33:20 +0000 (04:33 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 04:32:36 +0000 (04:32 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 04:32:19 +0000 (04:32 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 04:31:19 +0000 (04:31 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 04:30:05 +0000 (04:30 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 04:29:23 +0000 (04:29 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 04:29:05 +0000 (04:29 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 04:28:41 +0000 (04:28 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 04:28:16 +0000 (04:28 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths
ngie [Fri, 20 Jan 2017 04:27:40 +0000 (04:27 +0000)]
Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 04:04:25 +0000 (04:04 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 04:03:55 +0000 (04:03 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 03:59:10 +0000 (03:59 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 03:58:50 +0000 (03:58 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 03:57:52 +0000 (03:57 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 03:57:24 +0000 (03:57 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 03:56:42 +0000 (03:56 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 03:56:10 +0000 (03:56 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 03:55:43 +0000 (03:55 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 03:55:21 +0000 (03:55 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 03:54:36 +0000 (03:54 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths
ngie [Fri, 20 Jan 2017 03:52:16 +0000 (03:52 +0000)]
Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 03:34:59 +0000 (03:34 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 03:31:50 +0000 (03:31 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after: 3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Fri, 20 Jan 2017 03:27:47 +0000 (03:27 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after: 3 weeks
Sponsored by: Dell EMC Isilon

7 years agoReplace dot-dot relative pathing with SRCTOP-relative paths where possible
ngie [Fri, 20 Jan 2017 03:23:24 +0000 (03:23 +0000)]
Replace dot-dot relative pathing with SRCTOP-relative paths where possible

This reduces build output, need for recalculating paths, and makes it clearer
which paths are relative to what areas in the source tree. The change in
performance over a locally mounted UFS filesystem was negligible in my testing,
but this may more positively impact other filesystems like NFS.

LIBC_SRCTOP was left alone so Juniper (and other users) can continue to
manipulate lib/libc/Makefile (and other Makefile.inc's under lib/libc) as
include Makefiles with custom options.

Discussed with: marcel, sjg
MFC after: 1 week
Reviewed by: emaste
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D9207

7 years agoRemove obsolete /usr/lib/debug/usr/lib/private dir
emaste [Fri, 20 Jan 2017 03:14:18 +0000 (03:14 +0000)]
Remove obsolete /usr/lib/debug/usr/lib/private dir

Missed in r282420

Reported by: dim

7 years agolibc: remove reference to nonexistent lib/locale directory
emaste [Fri, 20 Jan 2017 02:09:59 +0000 (02:09 +0000)]
libc: remove reference to nonexistent lib/locale directory

As far as I can tell this was introduced in r72406 and updated in several
subsequent revisions, but the lib/locale directory it referenced never
existed.

Reviewed by: ngie
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D9252

7 years agomppc - Finish pluging NETGRAPH_MPPC_COMPRESSION.
pfg [Fri, 20 Jan 2017 00:02:11 +0000 (00:02 +0000)]
mppc - Finish pluging NETGRAPH_MPPC_COMPRESSION.

There were several places where reference to compression were left
unfinished. Furthermore, KASSERTs contained references to MPPC_INVALID
which is not defined in the tree and therefore were sure to break with
INVARIANTS: comment them out.

Reported by: Eugene Grosbein
PR: 216265
MFC after: 3 days

7 years agoMerge ACPICA 20170119.
jkim [Thu, 19 Jan 2017 22:07:21 +0000 (22:07 +0000)]
Merge ACPICA 20170119.

7 years agoRework the debug print API. Event printing no longer gets special handling.
scottl [Thu, 19 Jan 2017 21:47:50 +0000 (21:47 +0000)]
Rework the debug print API. Event printing no longer gets special handling.
All of the printing from the tables file now has wrappers so that the
handling is cleaner and it's possible to print something out (say, during
development) without having to fight the global debug flags. This re-org
will also make it easier to have the tables be compiled out at build time
if desired.

Other than fixing some minor bugs, there are no user-visible changes from
this change

Sponsored by: Netflix, Inc.
Differential Revision: D9238

7 years agoRemove mistakenly merged field.
kib [Thu, 19 Jan 2017 20:03:26 +0000 (20:03 +0000)]
Remove mistakenly merged field.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoAdjust gtaskqueue startup again so that we catch the !SMP case and
sbruno [Thu, 19 Jan 2017 19:58:08 +0000 (19:58 +0000)]
Adjust gtaskqueue startup again  so that we catch the !SMP case and
users that choose not to use EARLY_AP_STARTUP.

There is still an initialization issue/panic with !SMP and !EARLY_AP_STARTUP
that we have yet to resolve.

Submitted by: bde

7 years agoAdd mount option for tmpfs(5) to not use namecache.
kib [Thu, 19 Jan 2017 19:46:49 +0000 (19:46 +0000)]
Add mount option for tmpfs(5) to not use namecache.

The option "nonc" disables using of namecache for the created mount,
by default namecache is used.  The rationale for the option is that
namecache duplicates the information which is already kept in memory
by tmpfs.  Since it believed that namecache scales better than tmpfs,
or will scale better, do not enable the option by default.  On the
other hand, smaller machines may benefit from lesser namecache
pressure.

Discussed with: mjg
Tested by: pho (as part of larger patch)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

7 years agoImplement VOP_VPTOCNP() for tmpfs.
kib [Thu, 19 Jan 2017 19:29:13 +0000 (19:29 +0000)]
Implement VOP_VPTOCNP() for tmpfs.

For directories, node->tn_spec.tn_dir.tn_parent pointer to the parent
is used.  For non-directories, the implementation is naive, all
directory nodes are scanned to find a dirent linking the specified
node.  This can be significantly improved by maintaining tn_parent for
all nodes, later.

Tested by: pho (as part of larger patch)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

7 years agoVNON nodes cannot exist.
kib [Thu, 19 Jan 2017 19:25:42 +0000 (19:25 +0000)]
VNON nodes cannot exist.

Tested by: pho (as part of larger patch)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

7 years agoRefcount tmpfs nodes and mount structures.
kib [Thu, 19 Jan 2017 19:15:21 +0000 (19:15 +0000)]
Refcount tmpfs nodes and mount structures.

On dotdot lookup and fhtovp operations, it is possible for the file
represented by tmpfs node to be removed after the thread calculated
the pointer.  In this case, tmpfs_alloc_vp() accesses freed memory.

Introduce the reference count on the nodes.  The allnodes list from
tmpfs mount owns 1 reference, and threads performing unlocked
operations on the node, add one transient reference.  Similarly, since
struct tmpfs_mount maintains the list where nodes are enlisted,
refcount it by one reference from struct mount and one reference from
each node on the list.  Both nodes and tmpfs_mounts are removed when
refcount goes to zero.

Note that this means that nodes and tmpfs_mounts might survive some
time after the node is deleted or tmpfs_unmount() finished.  The
tmpfs_alloc_vp() in these cases returns error either due to node
removal (tn_nlinks == 0) or because of insmntque1(9) error.

Tested by: pho (as part of larger patch)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

7 years agoe1000: Add support for Kaby Lake generation i219 (4) and i219 (5) devices
erj [Thu, 19 Jan 2017 18:52:38 +0000 (18:52 +0000)]
e1000: Add support for Kaby Lake generation i219 (4) and i219 (5) devices

MFC after: 1 week
Sponsored by: Intel Corporation

7 years agofix a thread preemption regression in schedulers introduced in r270423
avg [Thu, 19 Jan 2017 18:46:41 +0000 (18:46 +0000)]
fix a thread preemption regression in schedulers introduced in r270423

Commit r270423 fixed a regression in sched_yield() that was introduced
in earlier changes.  Unfortunately, at the same time it introduced an
new regression.  The problem is that SWT_RELINQUISH (6), like all other
SWT_* constants and unlike SW_* flags, is not a bit flag.  So, (flags &
SWT_RELINQUISH) is true in cases where that was not really indended,
for example, with SWT_OWEPREEMPT (2) and SWT_REMOTEPREEMPT (11).

A straight forward fix would be to use (flags & SW_TYPE_MASK) ==
SWT_RELINQUISH, but my impression is that the switch types are designed
mostly for gathering statistics, not for influencing scheduling
decisions.

So, I decided that it would be better to check for SW_PREEMPT flag
instead.  That's also the same flag that was checked before r239157.
I double-checked how that flag is used and I am confident that the flag
is set only in the places where we really have the preemption:
- critical_exit + td_owepreempt
- sched_preempt in the ULE scheduler
- sched_preempt in the 4BSD scheduler

Reviewed by: kib, mav
MFC after: 4 days
Sponsored by: Panzura
Differential Revision: https://reviews.freebsd.org/D9230

7 years agoMake tmpfs directory cursor available outside tmpfs_subr.c.
kib [Thu, 19 Jan 2017 18:38:58 +0000 (18:38 +0000)]
Make tmpfs directory cursor available outside tmpfs_subr.c.

Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoFix problem with suspend and resume when using Skylake chipsets. Make
hselasky [Thu, 19 Jan 2017 18:33:27 +0000 (18:33 +0000)]
Fix problem with suspend and resume when using Skylake chipsets. Make
sure the XHCI controller is reset after halting it. The problem is
clearly a BIOS bug as the suspend and resume is failing without
loading the XHCI driver. The same happens when using Linux and the
XHCI driver is not loaded.

Submitted by: Yanko Yankulov <yanko.yankulov@gmail.com>
PR: 216261
MFC after: 1 week

7 years agoRefresh tmpfs(5) man page.
kib [Thu, 19 Jan 2017 18:26:06 +0000 (18:26 +0000)]
Refresh tmpfs(5) man page.

Provide more useful explanation of features and quirks.

Reviewed by: emaste, vangyzen
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D9211

7 years agoOnly conditionally add in hyperv support if we're building amd64
ngie [Thu, 19 Jan 2017 18:07:24 +0000 (18:07 +0000)]
Only conditionally add in hyperv support if we're building amd64

This unbreaks the build because the assembly is written for x64.

MFC after: 3 weeks
X-MFC with: r312418
Pointyhat to: ngie
Reported by: Jenkins (i386 job)
Sponsored by: Dell EMC Isilon

7 years agoAdd manpage for mlx4ib(4)
ngie [Thu, 19 Jan 2017 17:09:11 +0000 (17:09 +0000)]
Add manpage for mlx4ib(4)

This manpage isn't differentiated from mlx4en except where necessary,
replacing eth/ETH with ib/IB.

Eventually the manpages will be split and the common bits be placed
in a manpage named "mlx4.4".

MFC after: 3 weeks
Reviewed by: hselasky
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D9241

7 years agoConditionalize hyperv support in gettimeofday(2) based on MK_HYPERV
ngie [Thu, 19 Jan 2017 17:03:45 +0000 (17:03 +0000)]
Conditionalize hyperv support in gettimeofday(2) based on MK_HYPERV

The effect at runtime is negligible as the hyperv timer isn't available
except when hyperv is loaded.

This is a prerequisite for conditionalizing the header build/install out
of the build

MFC after: 3 weeks
Reviewed by: sephe
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D9242

7 years agoFix build of devd with GCC 4.2
asomers [Thu, 19 Jan 2017 16:59:55 +0000 (16:59 +0000)]
Fix build of devd with GCC 4.2

Reported by: olivier
Pointy-hat-to: asomers
MFC after: 27 days
X-MFC-with: 312395
Sponsored by: Spectra Logic Corp

7 years agoffs_vnops: Simplify extattr access
cem [Thu, 19 Jan 2017 16:46:05 +0000 (16:46 +0000)]
ffs_vnops: Simplify extattr access

As suggested in r167010, use the structure type and macros to access and
modify UFS2 extended attributes.  Add assertions that pointers are
aligned in places where we now access the data through a structure
pointer, instead of character-by-character.

PR: 216127
Reported by: dewayne at heuristicsystems.com.au
Reviewed by: kib@
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D9225

7 years agoRename tmpfs_mount member allnode_lock to include namespace prefix.
kib [Thu, 19 Jan 2017 16:01:36 +0000 (16:01 +0000)]
Rename tmpfs_mount member allnode_lock to include namespace prefix.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoProtect macro argument.
kib [Thu, 19 Jan 2017 15:06:18 +0000 (15:06 +0000)]
Protect macro argument.

Requested by: hselasky
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoHandle the set capabilities ioctl, letting the hardware checksum be
loos [Thu, 19 Jan 2017 14:58:55 +0000 (14:58 +0000)]
Handle the set capabilities ioctl, letting the hardware checksum be
disabled (Hi netmap!).

Only remove the CRC bytes from packets when the hardware tell us to do so.

Fixes the 'discard frame w/o leading ethernet header' issues.

Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agoRework some tmpfs lock assertions.
kib [Thu, 19 Jan 2017 14:49:55 +0000 (14:49 +0000)]
Rework some tmpfs lock assertions.

Remove TMPFS_ASSERT_ELOCKED().  Its claims are already stated by other
asserts nearby and by VFS guarantees.
Change TMPFS_ASSERT_LOCKED() and one inlined place to use
ASSERT_VOP_(E)LOCKED() instead of hand-rolled imprecise asserts.

Tested by: pho (as part of the larger patch)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoStyle fixes and comment updates.
kib [Thu, 19 Jan 2017 14:27:37 +0000 (14:27 +0000)]
Style fixes and comment updates.

Edit comments which explain no longer relevant details, and add
locking annotations to the struct tmpfs_node members.

Tested by: pho (as part of the larger patch)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoThe port number and the to_port_en flag are valid only on SOP descriptor.
loos [Thu, 19 Jan 2017 14:05:49 +0000 (14:05 +0000)]
The port number and the to_port_en flag are valid only on SOP descriptor.

Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agoRemove unused union member, fifos on tmpfs are implemented in common code.
kib [Thu, 19 Jan 2017 13:35:14 +0000 (13:35 +0000)]
Remove unused union member, fifos on tmpfs are implemented in common code.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoUse S_ISREG instead of manual & (also it's better to compare the
delphij [Thu, 19 Jan 2017 08:01:35 +0000 (08:01 +0000)]
Use S_ISREG instead of manual & (also it's better to compare the
result from & and the pattern instead of just assuming it's one bit
value).

Pointed out by Tianjie Mao <tjmao tjmao com>.

MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D4827

7 years agoFix an unchecked return value in zfsd
asomers [Wed, 18 Jan 2017 22:10:18 +0000 (22:10 +0000)]
Fix an unchecked return value in zfsd

It's pretty unlikely to actually hit this, but good to check it anyway

Reported by: Coverity
CID: 1362018
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

7 years agoFix several Coverity CIDs in devd
asomers [Wed, 18 Jan 2017 20:24:37 +0000 (20:24 +0000)]
Fix several Coverity CIDs in devd

CID 13620551362054: File descriptor leaks during shutdown
CID 1362013: Potential null-termination fail with long network device names
CID 1362097: Uncaught exception during memory pressure
CID 13620171362016: Unchecked errors, possibly resulting in weird behavior
if two devd instances start at the same time.
CID 1362015: Unchecked error that will probably never fail

Reported by: Coverity
CID: 1362055 1362054 1362013 1362097 1362017 1362016 1362015
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

7 years agorestore(8): Handle extended attribute names correctly
cem [Wed, 18 Jan 2017 18:16:57 +0000 (18:16 +0000)]
restore(8): Handle extended attribute names correctly

UFS2 extended attribute names are not NUL-terminated.  Handle
appropriately.

Correct the EXTATTR_BASE_LENGTH() macro, which handled ea_namelength ==
one (mod eight) extended attributes incorrectly.

PR: 216127
Reported by: dewayne at heuristicsystems.com.au
Reviewed by: kib@
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D9208

7 years agoUse SRCTOP instead of .CURDIR-relative path in .PATH directive
ngie [Wed, 18 Jan 2017 18:14:50 +0000 (18:14 +0000)]
Use SRCTOP instead of .CURDIR-relative path in .PATH directive

MFC after: 3 weeks
Sponsored by: Dell EMC Isilon

7 years agoufs/extattr.h: Fix documentation of ea_name termination
cem [Wed, 18 Jan 2017 17:55:49 +0000 (17:55 +0000)]
ufs/extattr.h: Fix documentation of ea_name termination

The ea_name string is not nul-terminated.  Correct the documentation.

Because the subsequent field is padded to 8 bytes, and the padding is
zeroed, the ea_name string will appear to be nul-terminated whenever the
length isn't exactly one (mod eight).

This was introduced in r167010 (2007).

Additionally, mark the length fields as unsigned.  This particularly
matters for the single byte ea_namelength field, which can represent
extended attribute names up to 255 bytes long.

No functional change.

PR: 216127
Reported by: dewayne at heuristicsystems.com.au
Reviewed by: kib@
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D9206

7 years agosx: reduce lock accesses similarly to r311172
mjg [Wed, 18 Jan 2017 17:55:08 +0000 (17:55 +0000)]
sx: reduce lock accesses similarly to r311172

Discussed with: jhb
Tested by: pho (previous version)

7 years agorwlock: reduce lock accesses similarly to r311172
mjg [Wed, 18 Jan 2017 17:53:57 +0000 (17:53 +0000)]
rwlock: reduce lock accesses similarly to r311172

Discussed with:     jhb
Tested by: pho (previous version)

7 years agoFormat and sort MSG_* flags, to prevent misedits in future. There is no
glebius [Wed, 18 Jan 2017 17:21:28 +0000 (17:21 +0000)]
Format and sort MSG_* flags, to prevent misedits in future.  There is no
functional change.

7 years agoFix regression from r311568: collision of MSG_NOSIGNAL with MSG_MORETOCOME
glebius [Wed, 18 Jan 2017 17:09:22 +0000 (17:09 +0000)]
Fix regression from r311568: collision of MSG_NOSIGNAL with MSG_MORETOCOME
lead to delayed send of data sent with sendto(MSG_NOSIGNAL).

Submitted by: rrs

7 years agoRemove empty ranges property so beri_simplebus can be attached again.
br [Wed, 18 Jan 2017 14:41:59 +0000 (14:41 +0000)]
Remove empty ranges property so beri_simplebus can be attached again.

Sponsored by: DARPA, AFRL

7 years agough, device_t not device_t *
sbruno [Wed, 18 Jan 2017 14:23:43 +0000 (14:23 +0000)]
ugh, device_t not device_t *

Reported by: hps

7 years agoChange device type to unbreak drm-next testing and builds.
sbruno [Wed, 18 Jan 2017 13:57:29 +0000 (13:57 +0000)]
Change device type to unbreak drm-next testing and builds.

Submitted by: Matt Macy <mmacy@nextbsd.org>

7 years agoImplement kernel support for hardware rate limited sockets.
hselasky [Wed, 18 Jan 2017 13:31:17 +0000 (13:31 +0000)]
Implement kernel support for hardware rate limited sockets.

- Add RATELIMIT kernel configuration keyword which must be set to
enable the new functionality.

- Add support for hardware driven, Receive Side Scaling, RSS aware, rate
limited sendqueues and expose the functionality through the already
established SO_MAX_PACING_RATE setsockopt(). The API support rates in
the range from 1 to 4Gbytes/s which are suitable for regular TCP and
UDP streams. The setsockopt(2) manual page has been updated.

- Add rate limit function callback API to "struct ifnet" which supports
the following operations: if_snd_tag_alloc(), if_snd_tag_modify(),
if_snd_tag_query() and if_snd_tag_free().

- Add support to ifconfig to view, set and clear the IFCAP_TXRTLMT
flag, which tells if a network driver supports rate limiting or not.

- This patch also adds support for rate limiting through VLAN and LAGG
intermediate network devices.

- How rate limiting works:

1) The userspace application calls setsockopt() after accepting or
making a new connection to set the rate which is then stored in the
socket structure in the kernel. Later on when packets are transmitted
a check is made in the transmit path for rate changes. A rate change
implies a non-blocking ifp->if_snd_tag_alloc() call will be made to the
destination network interface, which then sets up a custom sendqueue
with the given rate limitation parameter. A "struct m_snd_tag" pointer is
returned which serves as a "snd_tag" hint in the m_pkthdr for the
subsequently transmitted mbufs.

2) When the network driver sees the "m->m_pkthdr.snd_tag" different
from NULL, it will move the packets into a designated rate limited sendqueue
given by the snd_tag pointer. It is up to the individual drivers how the rate
limited traffic will be rate limited.

3) Route changes are detected by the NIC drivers in the ifp->if_transmit()
routine when the ifnet pointer in the incoming snd_tag mismatches the
one of the network interface. The network adapter frees the mbuf and
returns EAGAIN which causes the ip_output() to release and clear the send
tag. Upon next ip_output() a new "snd_tag" will be tried allocated.

4) When the PCB is detached the custom sendqueue will be released by a
non-blocking ifp->if_snd_tag_free() call to the currently bound network
interface.

Reviewed by: wblock (manpages), adrian, gallatin, scottl (network)
Differential Revision: https://reviews.freebsd.org/D3687
Sponsored by: Mellanox Technologies
MFC after: 3 months

7 years agoUse the kernel stack in the ARM FBT DTrace provider. This is used to find
andrew [Wed, 18 Jan 2017 13:27:24 +0000 (13:27 +0000)]
Use the kernel stack in the ARM FBT DTrace provider. This is used to find
the fifth argument to functions being traced, however there was an error
where the userspace stack was being used. This may be invalid leading to
a kernel panic if this address is unmapped.

Submitted by: Graeme Jenkinson <graeme.jenkinson@cl.cam.ac.uk>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D9229

7 years agoloader: efi devpath api usage should be more aware of NULL pointers
tsoome [Wed, 18 Jan 2017 08:18:07 +0000 (08:18 +0000)]
loader: efi devpath api usage should be more aware of NULL pointers

As the efi_devpath_last_node() and efi_devpath_trim() can return NULL
pointers, the consumers of this API should check the the NULL pointers.

Same for efinet_dev_init() using calloc().

Reported by: Robert Mustacchi <rm@joyent.com>
Reviewed by: jhb, allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D9203

7 years agoUse the explicit expanded form of cmp.
jhibbits [Wed, 18 Jan 2017 03:42:21 +0000 (03:42 +0000)]
Use the explicit expanded form of cmp.

Clang apparently requires the explicit form of this instruction, and rejects
uses which ignore the optional cmpD register.  This was the only use of the
shorthand form of the instruction, so just fix it up to match the others.

PR: kern/215681
Submitted by: Mark Millard
Reported by: Mark Millard <markmi _AT_ dsl-only.net>
MFC after: 2 weeks

7 years agocxgbe/tom: Fix a case where do_pass_accept_req wasn't properly restoring
np [Wed, 18 Jan 2017 03:35:42 +0000 (03:35 +0000)]
cxgbe/tom: Fix a case where do_pass_accept_req wasn't properly restoring
the VNET.  This should have been in r311949.

MFC after: 2 days

7 years agoCatch up with changes to structure member names.
ed [Tue, 17 Jan 2017 22:05:52 +0000 (22:05 +0000)]
Catch up with changes to structure member names.

Pointer/length pairs are now always named ${name} and ${name}_len.

7 years agoRegenerate sources based on the system call tables.
ed [Tue, 17 Jan 2017 22:05:01 +0000 (22:05 +0000)]
Regenerate sources based on the system call tables.

7 years agoSync in the latest CloudABI generated source files.
ed [Tue, 17 Jan 2017 22:03:08 +0000 (22:03 +0000)]
Sync in the latest CloudABI generated source files.

Languages like C++17 and Go provide direct support for slice types:
pointer/length pairs. The CloudABI generator now has more complete for
this, meaning that for the C binding, pointer/length pairs now use an
automatic naming scheme of ${name} and ${name}_len.

Apart from this change and some reformatting, the ABI definitions are
identical. Binary compatibility is preserved entirely.

7 years agoDon't compute MPATH during install.
bdrewery [Tue, 17 Jan 2017 21:12:21 +0000 (21:12 +0000)]
Don't compute MPATH during install.

This saves time when building over NFS.  Nothing should be building during
this phase anyhow.

Sponsored by: Dell EMC Isilon

7 years agoRemove writing 'residual' field of struct ctl_scsiio.
mav [Tue, 17 Jan 2017 18:32:47 +0000 (18:32 +0000)]
Remove writing 'residual' field of struct ctl_scsiio.

This field has no practical use and never readed.  Initiators already
receive respective residual size from frontends.  Removed field had
different semantics, which looks useless, and was never passed through
by any frontend.

While there, fix kern_data_resid field support in case of HA, missed in
r312291.

MFC after: 13 days

7 years agoThe write-protect is not wired on uFW, disable it to allow writes to SD
loos [Tue, 17 Jan 2017 18:04:13 +0000 (18:04 +0000)]
The write-protect is not wired on uFW, disable it to allow writes to SD
card.

Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agoSet the the wp_disabled flag when asked to.
loos [Tue, 17 Jan 2017 17:41:14 +0000 (17:41 +0000)]
Set the the wp_disabled flag when asked to.

While here, add the missing new line.

MFC after: 3 days
Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agoAdd 4k quirk for Micron 5100 and Intel S3610 SSDs
sbruno [Tue, 17 Jan 2017 14:52:48 +0000 (14:52 +0000)]
Add 4k quirk for Micron 5100 and Intel S3610 SSDs

Submitted by: Jason Wolfe <j@nitrology.com>
MFH: 1 week
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D9209

7 years agoImprove error message on duplicate iSCSI port.
mav [Tue, 17 Jan 2017 14:13:14 +0000 (14:13 +0000)]
Improve error message on duplicate iSCSI port.

MFC after: 2 weeks

7 years agoInitialize IPFW static rules rmlock with RM_RECURSE flag.
ae [Tue, 17 Jan 2017 10:50:28 +0000 (10:50 +0000)]
Initialize IPFW static rules rmlock with RM_RECURSE flag.

This lock was replaced from rwlock in r272840. But unlike rwlock, rmlock
doesn't allow recursion on rm_rlock(), so at this time fix this with
RM_RECURSE flag. Later we need to change ipfw to avoid such recursions.

PR: 216171
Reported by: Eugene Grosbein
MFC after: 1 week

7 years agoAdd USB audio support for S/PDIF output with C-Media CM6206 devices.
hselasky [Tue, 17 Jan 2017 08:15:10 +0000 (08:15 +0000)]
Add USB audio support for S/PDIF output with C-Media CM6206 devices.

Submitted by: Julien Nadeau <vedge@hypertriton.com>
PR: 216131
MFC after: 1 week

7 years agoMFV r312333: zlib 1.2.11.
delphij [Tue, 17 Jan 2017 05:55:47 +0000 (05:55 +0000)]
MFV r312333: zlib 1.2.11.

MFC after: 1 month

7 years agoUse SRCTOP where possible and use :H to manipulate .CURDIR to get rid of
ngie [Tue, 17 Jan 2017 03:58:37 +0000 (03:58 +0000)]
Use SRCTOP where possible and use :H to manipulate .CURDIR to get rid of
unnecessarily long relative path .PATH values with make

MFC after: 1 days
Sponsored by: Dell EMC Isilon

7 years agoFix regression from r310655, which broke operation of bsnmpd if it is bound
glebius [Tue, 17 Jan 2017 03:52:57 +0000 (03:52 +0000)]
Fix regression from r310655, which broke operation of bsnmpd if it is bound
to a non-wildcard address.  As documented in ip(4), doing sendmsg(2) with
IP_SENDSRCADDR on a socket that is bound to non-wildcard address is
completely different to using this control message on a wildcard one.

A fix is to add a bool to mark whether we did setsockopt(IP_RECVDSTADDR)
on the socket, and use IP_SENDSRCADDR control message only if we did.

While here, garbage collect absolutely useless udp_recv() function that
establishes some structures on stack to never use them later.

7 years agoAdd smilint target to subdir targets so "make smilint" here will run
ngie [Tue, 17 Jan 2017 03:44:45 +0000 (03:44 +0000)]
Add smilint target to subdir targets so "make smilint" here will run
the smilint target in subdirs

While here, convert a path that's .CURDIR relative to SRCTOP

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoRemove ad hoc smilint targets made standard in bsd.snmpmod.mk in r312328
ngie [Tue, 17 Jan 2017 03:41:23 +0000 (03:41 +0000)]
Remove ad hoc smilint targets made standard in bsd.snmpmod.mk in r312328

MFC after: 1 week
X-MFC with: r312328
Sponsored by: Dell EMC Isilon

7 years agoAdd a make target (smilint) for running smilint tool against BMIBS
ngie [Tue, 17 Jan 2017 03:38:49 +0000 (03:38 +0000)]
Add a make target (smilint) for running smilint tool against BMIBS

Running smilint against MIB definitions is useful in finding
functional problems with MIB definitions/descriptions.

This is inspired by the smilint targets defined in
usr.sbin/bsnmpd/modules/{snmp_hostres,snmp_mibII}/Makefile

Document all of the variables that are involved in running the
smilint target, as well as all of the prerequisites to running
it.

MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D9099

7 years agoAdd sys/dev/rtwn/rtl8821a/usb/r21au_dfs.c into sys/conf/files
avos [Tue, 17 Jan 2017 00:48:02 +0000 (00:48 +0000)]
Add sys/dev/rtwn/rtl8821a/usb/r21au_dfs.c into sys/conf/files

Reported by: adrian

7 years ago[zynq] Fix panic on USB PHY initialization failure
gonzo [Tue, 17 Jan 2017 00:39:09 +0000 (00:39 +0000)]
[zynq] Fix panic on USB PHY initialization failure

The Zedboard has a hardware bug where initialization of the USB PHY
occasionally fails on boot-up. Fix regression in -CURRENT when
kernel panics on such occasion. 11-RELEASE branch works fine

PR: 215862
Submitted by: Thomas Skibo <thoma555-bsd@yahoo.com>