Commit Graph

218124 Commits

Author SHA1 Message Date
Gleb Smirnoff
169170209c Provide counter_ratecheck(), a MP-friendly substitution to ppsratecheck().
When rated event happens at a very quick rate, the ppsratecheck() is not
only racy, but also becomes a performance bottleneck.

Together with:	rrs, jtl
2016-12-09 17:58:34 +00:00
Michael Tuexen
ebecdad811 Don't bundle a SACK chunk with a SHUTDOWN chunk if it is not required.
MFC after:	1 week
2016-12-09 17:58:07 +00:00
Michael Tuexen
8d0a31e19c Don't send multiple SHUTDOWN chunks in a single packet.
Thanks to Felix Weinrank for making me aware of this issue.

MFC after:	1 week
2016-12-09 17:57:17 +00:00
Ruslan Bukin
d9121bf564 Add registers for jz4780 audio and PDMA controllers.
Sponsored by:	DARPA, AFRL
2016-12-09 17:16:09 +00:00
Dag-Erling Smørgrav
3af3efd115 More debugging code I missed in r309051.
Reported by:	jbeich, jkim
2016-12-09 16:14:55 +00:00
Hans Petter Selasky
12af734d32 Add more LinuxKPI PCI definitions.
Obtained from:	kmacy @
Sponsored by:	Mellanox Technologies
MFC after:	1 week
2016-12-09 15:05:09 +00:00
Hans Petter Selasky
1724ded49c Prefer function macros over regular macros in the LinuxKPI.
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-12-09 15:01:37 +00:00
Bartek Rutkowski
2a65657fc8 Capsicum support for dd(1)
Adds Capsicum sandboxing to dd utility.

Submitted by:	Pawel Biernacki <pawel.biernacki@gmail.com>
Reviewed by:	allanjude, emaste, oshogbo
Approved by:	oshogbo
Sponsored by:	Mysterious Code Ltd.
Differential Revision:	https://reviews.freebsd.org/D8543
2016-12-09 14:51:05 +00:00
Hans Petter Selasky
be48ab92ac Avoid malloc() warnings when using the LinuxKPI by zero-checking
the allocation flags.

Obtained from:		kmacy @
Sponsored by:           Mellanox Technologies
MFC after:		1 week
2016-12-09 14:06:22 +00:00
Hans Petter Selasky
0a61267a99 MSIX can support more than 256 IRQs. Make sure the invalid IRQ number
set in the LinuxKPI is big enough.

Sponsored by:           Mellanox Technologies
MFC after:		1 week
2016-12-09 13:53:31 +00:00
Hans Petter Selasky
e996b07c72 Prefix some _pci_xxx() functions in the Linux KPI with linux_ and make
sure the IRQ number used by these functions is unsigned.

Sponsored by:           Mellanox Technologies
MFC after:		1 week
2016-12-09 13:47:50 +00:00
Hans Petter Selasky
7fdce5c42b Prefix the Linux KPI's kmem_xxx() functions with linux_ to avoid
conflict with the opensolaris kernel module.

This patch solves a problem where the kernel linker will incorrectly
resolve opensolaris kmem_xxx() functions as linuxkpi ones, which leads
to a panic when these functions are used.

Submitted by:		gallatin @
Sponsored by:           Mellanox Technologies
MFC after:		1 week
2016-12-09 13:41:26 +00:00
Sepherosa Ziehau
4b167c2b4d hyperv/storvsc: Minor style changes; no functional changes.
Reported by:	rpokala
MFC after:	1 week
Sponsored by:	Microsoft
2016-12-09 06:18:12 +00:00
Sepherosa Ziehau
692cb24f10 hyperv/storvsc: Fix the SCSI disk attachment issue.
On pre-WS2016 Hyper-V, if the only LUNs > 7 are used, then all disks
fails to attach.  Mainly because those versions of Hyper-V do not set
SRB_STATUS properly and deliver junky INQUERY responses.

Submitted by:	Hongjiang Zhang <honzhan microsoft com>
Reported by:	Hongxiong Xian <v-hoxian microsoft com>
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8724
2016-12-09 03:16:36 +00:00
Navdeep Parhar
b8c1ffef80 cxgbe(4): netmap does not set IFCAP_NETMAP in an ifnet's if_capabilities
any more (since r307394).  Do it in the driver instead.

MFC after:	1 week
2016-12-09 02:21:27 +00:00
Rick Macklem
df3e1050ff Patch the nfsd so that it doesn't register with rpcbind for an NFSv4 only
server.

This patch uses the sysctl vfs.nfsd.server_min_nfsvers to determine
if/what versions of NFS service should be registered with rpcbind.
For NFSv4 only, it does not register at all, since NFSv4 always uses 2049
and does not require rpcbind.
For NFSv3 minimum, it registers NFSv3 but not NFSv2.

Tested by:	jmader2@gmu.edu
Submitted by:	jmader2@gmu.edu (earlier version)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D8696
2016-12-08 23:29:56 +00:00
Dimitry Andric
3157e69de7 Pull in r281586 from upstream llvm trunk (by Wei Mi):
Add some shortcuts in LazyValueInfo to reduce compile time of
  Correlated Value Propagation.

  The patch is to partially fix PR10584. Correlated Value Propagation
  queries LVI to check non-null for pointer params of each callsite. If
  we know the def of param is an alloca instruction, we know it is
  non-null and can return early from LVI. Similarly, CVP queries LVI to
  check whether pointer for each mem access is constant. If the def of
  the pointer is an alloca instruction, we know it is not a constant
  pointer. These shortcuts can reduce the cost of CVP significantly.

  Differential Revision: https://reviews.llvm.org/D18066

This significantly reduces memory usage and compilation time when
compiling a particular C++ source file of the graphics/colmap port.

PR:		215136
MFC after:	3 days
2016-12-08 21:02:34 +00:00
Andriy Voskoboinyk
e1b3ed8f32 rsu: fix incorrect register addresses. 2016-12-08 20:54:54 +00:00
Devin Teske
f18789d787 Functions in their own section 2016-12-08 19:28:12 +00:00
Devin Teske
3d2b0857bf Remove unnecessary trailing backslashes 2016-12-08 19:26:22 +00:00
Mark Johnston
d78e7e3b58 err.D_PROC_CREATEFAIL.many.d passes, so remove the EFAIL annotation.
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2016-12-08 18:56:35 +00:00
Luiz Otavio O Souza
8f1c8ade60 Fix the typos and style(9) in comment.
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC (Netgate)
2016-12-08 18:18:48 +00:00
Devin Teske
3220bdd85c Add support for "hidden" Wi-Fi networks
PR:		bin/214933
Submitted by:	Maxim Filimonov <che@bein.link>
Reviewed by:	dteske, allanjude, adrian
MFC after:	6 days
X-MFC-with:	Follow-up commit for style
2016-12-08 16:41:18 +00:00
Ruslan Bukin
4b3fae2c2d Add jz4780 internal codec initialization driver.
Sponsored by:	DARPA, AFRL
2016-12-08 16:28:34 +00:00
Alexander Motin
9373759d13 Fix spa_alloc_tree sorting by offset in r305331.
Original commit "7090 zfs should improve allocation order" declares alloc
queue sorted by time and offset.  But in practice io_offset is always zero,
so sorting happened only by time, while order of writes with equal time was
completely random.  On Illumos this did not affected much thanks to using
high resolution timestamps.  On FreeBSD due to using much faster but low
resolution timestamps it caused bad data placement on disks, affecting
further read performance.

This change switches zio_timestamp_compare() from comparing uninitialized
io_offset to really populated io_bookmark values.  I haven't decided yet
what to do with timestampts, but on simple tests this change gives the
same peformance results by just making code to work as declared.

MFC after:	1 week
2016-12-08 15:58:03 +00:00
Konstantin Belousov
29edde94ac Use the populate() driver paging method for i915 driver.
In particular, the fault access type is accounted for when the
aperture page is moved to GTT domain.  On the other hand, the current
pager structure is left intact, most important, only one page is
instantiated per populate call.

Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	3 weeks
2016-12-08 11:39:08 +00:00
Konstantin Belousov
ed01d9894e Implement the populate() pager method for phys pager.
It allows to provide configurable agressive prefaulting and useful
hints to page daemon about memory allocations, on faults for pages
managed by phys pager.  In fact, this implementation is superior to
the MAP_SHARED_PHYS hack from my Postgresql paper, while giving
similar benefits of reducing the page faults numbers on SysV shared
memory mappings.

Reviewed by:	alc
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	3 weeks
2016-12-08 11:35:53 +00:00
Konstantin Belousov
c42b43a054 Add a new populate() pager method and extend device pager ops vector
with cdev_pg_populate() to provide device drivers access to it.  It
gives drivers fine control of the pages ownership and allows drivers
to implement arbitrary prefault policies.

The populate method is called on a page fault and is supposed to
populate the vm object with the page at the fault location and some
amount of pages around it, at pager's discretion.  VM provides the
pager with the hints about current range of the object mapping, to
avoid instantiation of immediately unused pages, if pager decides so.
Also, VM passes the fault type and map entry protection to the pager,
allowing it to force the optimal required ownership of the mapped
pages.

Installed pages must contiguously fill the returned region, be fully
valid and exclusively busied.  Of course, the pages must be compatible
with the object' type.

After populate() successfully returned, VM fault handler installs as
many instantiated pages into the process page tables as it sees
reasonable, while still obeying the correct semantic for COW and vm
map locking.

The method is opt-in, pager sets OBJ_POPULATE flag to indicate that
the method can be called.  If pager' vm objects can be shadowed, pager
must implement the traditional getpages() method in addition to the
populate().  Populate() might fall back to the getpages() on per-call
basis as well, by returning VM_PAGER_BAD error code.

For now for device pagers, the populate() method is only allowed to be
used by the managed device pagers, but the limitation is only made
because there is no unmanaged fault handlers which could use it right
now.

KPI designed together with, and reviewed by:	alc
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	3 weeks
2016-12-08 11:26:11 +00:00
Konstantin Belousov
dc5401d240 Move map_generation snapshot value into struct faultstate.
Reviewed by:	alc
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-12-08 10:29:41 +00:00
Konstantin Belousov
272cc3c4d0 Style.
Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-12-08 10:28:51 +00:00
Adrian Chadd
4869f5945e [net80211] add a field for storing a 64 bit TSC. 2016-12-08 07:57:16 +00:00
Adrian Chadd
36c8d0de0f [net80211] begin fleshing out support for channel survey information to be
pushed back up into net80211.
2016-12-08 07:56:25 +00:00
Sepherosa Ziehau
096d83feb9 hyperv/timesync: Support "sent TC" to improve accuracy.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8723
2016-12-08 05:37:39 +00:00
Sepherosa Ziehau
98cb13b6cc hyperv/vmbus: Utilize vmbus_chan_run_task()
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8686
2016-12-08 05:15:00 +00:00
Alan Cox
e94965d82e Previously, vm_radix_remove() would panic if the radix trie didn't
contain a vm_page_t at the specified index.  However, with this
change, vm_radix_remove() no longer panics.  Instead, it returns NULL
if there is no vm_page_t at the specified index.  Otherwise, it
returns the vm_page_t.  The motivation for this change is that it
simplifies the use of radix tries in the amd64, arm64, and i386 pmap
implementations.  Instead of performing a lookup before every remove,
the pmap can simply perform the remove.

Reviewed by:	kib, markj
Differential Revision:	https://reviews.freebsd.org/D8708
2016-12-08 04:29:29 +00:00
Mark Johnston
3c606f671e Use the correct path to date(1).
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2016-12-07 23:38:18 +00:00
Mark Johnston
058f5a9a47 Use the native data model instead of forcing ILP32 in tst.provregex3.ksh.
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2016-12-07 23:37:51 +00:00
Mark Johnston
6b91eae9d2 Run DTrace test scripts with "tst" set to the test script file name.
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2016-12-07 23:36:15 +00:00
Andriy Voskoboinyk
83faf8fc96 net80211: remove obsolete comment.
The described LOR should be fixed in r302283.
2016-12-07 23:33:59 +00:00
Gleb Smirnoff
faf19a69a6 Address regressions in SA-16:37.libc.
PR:		215105
Submitted by:	<jtd2004a sbcglobal.net>
2016-12-07 23:18:00 +00:00
Gavin Atkinson
109005cc14 Switch if_run.c to use a bitmap for debug levels rather than arbitrary
values. This more closely matches other wifi drivers in the tree.
The bitmap levels have been based closely on other drivers (primarily
[u]rtwn(4)) in the hope that one day these can be unified into a shared
wifi-debug framework.

This is the first step of several pieces of work I'm planning on doing
with the run(4) driver. I may well adjust and refine some of the debug
bitmaps at a later date.

Reviewed by:	adrian, avos
Differential Revision:	https://reviews.freebsd.org/D8704
2016-12-07 22:52:12 +00:00
Andriy Voskoboinyk
4a19d71238 net80211 + drivers: convert to ieee80211_crypto_get_key_wepidx().
Proposed by:	adrian
2016-12-07 22:16:07 +00:00
Michael Tuexen
b594081bdf Silence a warning produced by newer versions of gcc.
MFC after:	1 week
2016-12-07 22:01:09 +00:00
Warner Losh
f1b276bec8 Fix Typo 2016-12-07 21:47:14 +00:00
Michael Tuexen
159efc33a8 Fix a bug in sctp_sendmsgx(), where the sid provided by the user
was hot honored.

MFC after:	3 days
2016-12-07 21:24:49 +00:00
Michael Tuexen
49656eefc8 Cleanup the names of SSN, SID, TSN, FSN, PPID and MID.
This made a couple of bugs visible in handling SSN wrap-arounds
when using DATA chunks. Now bulk transfer seems to work fine...
This fixes the issue reported in
https://github.com/sctplab/usrsctp/issues/111

MFC after:	1 week
2016-12-07 19:30:59 +00:00
Conrad Meyer
7dc45d65e3 readelf(1) -S: Include zero index and match binutils' no-name
Include the SHN_UNDEF (zero) index special section in extended-attribute
ELF files, like GNU binutils' readelf.

Additionally, print "<no-name>" for sections without names, like GNU
binutils.

Reviewed by:	kaiw@
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D8707
2016-12-07 18:33:40 +00:00
Robert Watson
52b42f6287 Regnerate system-call definitions following r309677 correcting a whitespace
glitch in syscalls.master.
2016-12-07 16:12:27 +00:00
Robert Watson
82d8d2b8bc Replace spaces with tabs in definition of SCTP system calls, for consistency
with the remainder of the syscalls.master file.  This problem does not occur
in the freebsd32 version of the same system calls.
2016-12-07 16:11:55 +00:00
Eric van Gyzen
3d32d4a7c9 Export the whole thread name in kinfo_proc
kinfo_proc::ki_tdname is three characters shorter than
thread::td_name.  Add a ki_moretdname field for these three
extra characters.  Add the new field to kinfo_proc32, as well.
Update all in-tree consumers to read the new field and assemble
the full name, except for lldb's HostThreadFreeBSD.cpp, which
I will handle separately.  Bump __FreeBSD_version.

Reviewed by:	kib
MFC after:	1 week
Relnotes:	yes
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D8722
2016-12-07 15:04:22 +00:00