]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agohyperv/vmbus: Create channel synchronously.
Sepherosa Ziehau [Mon, 11 Jul 2016 07:45:31 +0000 (07:45 +0000)]
hyperv/vmbus: Create channel synchronously.

The device probe/attach has been move to a different thread, so the
reasons to create the channel asynchronously are no longer valid.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6862

8 years agohyperv/vmbus: Use post message Hypercall APIs for unload
Sepherosa Ziehau [Mon, 11 Jul 2016 07:28:15 +0000 (07:28 +0000)]
hyperv/vmbus: Use post message Hypercall APIs for unload

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6861

8 years agoDon't test for xpt not being NULL before calling svc_xprt_free(..)
Enji Cooper [Mon, 11 Jul 2016 07:24:56 +0000 (07:24 +0000)]
Don't test for xpt not being NULL before calling svc_xprt_free(..)

svc_xprt_alloc(..) will always return initialized memory as it uses
mem_alloc(..) under the covers, which uses malloc(.., M_WAITOK, ..).

MFC after: 1 week
Reported by: Coverity
CID: 1007341
Sponsored by: EMC / Isilon Storage Division

8 years agoConvert `svc_xprt_alloc(..)` and `svc_xprt_free(..)`'s prototypes to
Enji Cooper [Mon, 11 Jul 2016 07:17:52 +0000 (07:17 +0000)]
Convert `svc_xprt_alloc(..)` and `svc_xprt_free(..)`'s prototypes to
ANSI C style prototypes

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

8 years agoDeobfuscate cleanup path in clnt_vc_create(..)
Enji Cooper [Mon, 11 Jul 2016 07:07:15 +0000 (07:07 +0000)]
Deobfuscate cleanup path in clnt_vc_create(..)

Similar to r300836, r301800, and r302550, cl and ct will always
be non-NULL as they're allocated using the mem_alloc routines,
which always use `malloc(..., M_WAITOK)`.

MFC after: 1 week
Reported by: Coverity
CID: 1007342
Sponsored by: EMC / Isilon Storage Division

8 years agoDeobfuscate cleanup path in clnt_dg_create(..)
Enji Cooper [Mon, 11 Jul 2016 06:58:24 +0000 (06:58 +0000)]
Deobfuscate cleanup path in clnt_dg_create(..)

Similar to r300836 and r301800, cl and cu will always be non-NULL as they're
allocated using the mem_alloc routines, which always use
`malloc(..., M_WAITOK)`.

Deobfuscating the cleanup path fixes a leak where if cl was NULL and
cu was not, cu would not be free'd, and also removes a duplicate test for
cl not being NULL.

MFC after: 1 week
Reported by: Coverity
CID: 10070331007344
Sponsored by: EMC / Isilon Storage Division

8 years agohyperv/vmbus: Add sysctl to expose vmbus version.
Sepherosa Ziehau [Mon, 11 Jul 2016 06:55:02 +0000 (06:55 +0000)]
hyperv/vmbus: Add sysctl to expose vmbus version.

Requested by: Hongxiong Xian <v-hoxian microsoft com>
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6860

8 years agoBelatedly remove CSUM_IP_FRAGS and CSUM_FRAGMENT offloading
Pyun YongHyeon [Mon, 11 Jul 2016 06:49:56 +0000 (06:49 +0000)]
Belatedly remove CSUM_IP_FRAGS and CSUM_FRAGMENT offloading
capabilities.  It was removed in r243624 and r254804/r271006
respectively.
This file and mbuf(9) needs updates for other offloading
capabilities(i.e. CSUM_SCTP and CSUM_TSO).

8 years agohyperv/vmbus: Explicitly assign channel message process array.
Sepherosa Ziehau [Mon, 11 Jul 2016 06:37:04 +0000 (06:37 +0000)]
hyperv/vmbus: Explicitly assign channel message process array.

While I'm here, remove the useless message type from message process
array, which is not used and serves no purposes at all.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6858

8 years agoImplement right shift/ctl, and convert the VNC/xorg scancode
Peter Grehan [Mon, 11 Jul 2016 06:31:15 +0000 (06:31 +0000)]
Implement right shift/ctl, and convert the VNC/xorg scancode
of 0xff03 into right-alt.

Reported by: lme@
MFC after: 1 week

8 years agohyperv/vmbus: Function renaming.
Sepherosa Ziehau [Mon, 11 Jul 2016 06:29:56 +0000 (06:29 +0000)]
hyperv/vmbus: Function renaming.

And pass vmbus_softc to vmbus_doattach()

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6842

8 years agohyperv/hn: Add tunable to allow tcp_lro_queue_mbuf()
Sepherosa Ziehau [Mon, 11 Jul 2016 06:23:01 +0000 (06:23 +0000)]
hyperv/hn: Add tunable to allow tcp_lro_queue_mbuf()

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6841

8 years agohyperv/vmbus: Use post message Hypercall APIs for channel request
Sepherosa Ziehau [Mon, 11 Jul 2016 06:11:24 +0000 (06:11 +0000)]
hyperv/vmbus: Use post message Hypercall APIs for channel request

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6831

8 years agoUse _PATH_DEVNULL instead of hardcoding.
Xin LI [Mon, 11 Jul 2016 05:44:58 +0000 (05:44 +0000)]
Use _PATH_DEVNULL instead of hardcoding.

MFC after: 2 weeks

8 years agohyperv/stor: Fix the INQUIRY checks
Sepherosa Ziehau [Mon, 11 Jul 2016 05:17:48 +0000 (05:17 +0000)]
hyperv/stor: Fix the INQUIRY checks

Don't check the area that the host has not filled.

PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209443
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210425
Submitted by: Hongjiang Zhang <honzhan microsoft com>
Reviewed by: sephe, Dexuan Cui <decui microsoft com>
MFC after: 3 days
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6955

8 years agohyperv/vmbus: Implement a new set of APIs for post message Hypercall
Sepherosa Ziehau [Mon, 11 Jul 2016 04:52:11 +0000 (04:52 +0000)]
hyperv/vmbus: Implement a new set of APIs for post message Hypercall

And use this new APIs for Initial Contact post message Hypercall.
More post message Hypercalls will be converted.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6830

8 years agoDo not allow whitespace in macro names.
Marcelo Araujo [Mon, 11 Jul 2016 03:34:32 +0000 (03:34 +0000)]
Do not allow whitespace in macro names.

Obtained from: OpenBSD (r1.19).

8 years agoAllow - in distribution names. This is needed for freebsd-update to work
Xin LI [Mon, 11 Jul 2016 03:31:12 +0000 (03:31 +0000)]
Allow - in distribution names.  This is needed for freebsd-update to work
with 11.0+, where the debugging symbols use a new naming scheme for release
distribution files.

Errata candidate.

Approved by: cperciva
Differential Revision: https://reviews.freebsd.org/D7170

8 years agomail(1): Fix a comment.
Pedro F. Giffuni [Mon, 11 Jul 2016 00:03:39 +0000 (00:03 +0000)]
mail(1): Fix a comment.

Obtained from: NetBSD (CVS Rev 1.29)

8 years agoCorrect OLD_LIBS change done in r298840
Enji Cooper [Sun, 10 Jul 2016 20:42:18 +0000 (20:42 +0000)]
Correct OLD_LIBS change done in r298840

libkvm.so lives in /lib, not /usr/lib

MFC after: 3 days
X-MFC note: ^/stable/11 only
X-MFC with: r298840
Submitted by: Herbert J. Skuhra <herbert@mailbox.org>
Sponsored by: EMC / Isilon Storage Division

8 years agoRevert odd change, setting limit registers before base.
Alexander Motin [Sun, 10 Jul 2016 20:22:04 +0000 (20:22 +0000)]
Revert odd change, setting limit registers before base.

I don't know what errata is mentioned there, I was unable to find it, but
setting limit before the base simply does not work at all.  According to
specification attempt to set limit out of the present window range resets
it to zero, effectively disabling it.  And that is what I see in practice.

Fixing this properly disables access for remote side to our memory until
respective xlat is negotiated and set.  As I see, Linux does the same.

8 years agoFix wrong copy/paste in r302510.
Alexander Motin [Sun, 10 Jul 2016 19:52:26 +0000 (19:52 +0000)]
Fix wrong copy/paste in r302510.

8 years agoRemove callout_reset(link_work) from ntb_transport_attach().
Alexander Motin [Sun, 10 Jul 2016 19:15:29 +0000 (19:15 +0000)]
Remove callout_reset(link_work) from ntb_transport_attach().

At that point link is quite likely not established yet, so messing with
scratch registers is premature there.  Original commit message mentioned
code diff reduction from Linux, but this line is not present in Linux now.

8 years agoEXTRES: Add OF node as argument to all <foo>_get_by_ofw_<bar>() functions.
Michal Meloun [Sun, 10 Jul 2016 18:28:15 +0000 (18:28 +0000)]
EXTRES: Add OF node as argument to all <foo>_get_by_ofw_<bar>() functions.
In some cases, the driver must handle given properties located in
specific OF subnode. Instead of creating duplicate set of function, add
'node' as argument to existing functions, defaulting it to device OF node.

MFC after: 3 weeks

8 years agoIn process-descriptor close(2) and fstat(2), audit target process
Robert Watson [Sun, 10 Jul 2016 14:17:36 +0000 (14:17 +0000)]
In process-descriptor close(2) and fstat(2), audit target process
information.  pgkill(2) already audits target process ID.

MFC after: 3 days
Sponsored by: DARPA, AFRL

8 years agoDo allow auditing of read(2) and write(2) system calls, by assigning
Robert Watson [Sun, 10 Jul 2016 13:42:33 +0000 (13:42 +0000)]
Do allow auditing of read(2) and write(2) system calls, by assigning
those system calls audit event identifiers AUE_READ and AUE_WRITE.
While auditing file-descriptor I/O is not required by the Common
Criteria, in practice this proves useful for both live and forensic
analysis.

NB: freebsd32 already assigns AUE_READ and AUE_WRITE to read(2) and
write(2).

MFC after: 3 days
Sponsored by: DARPA, AFRL

8 years agoWhen mmap(2) is used with a vnode, capture vnode attributes in the
Robert Watson [Sun, 10 Jul 2016 11:49:10 +0000 (11:49 +0000)]
When mmap(2) is used with a vnode, capture vnode attributes in the
audit trail.  This was not required for Common Criteria auditing
(which requires only that the intent to read or write be audited
at the time of open(2)), but is useful for contemporary live
analysis and forensics.

MFC after: 3 days
Sponsored by: DARPA, AFRL

8 years agoAdd clk_get_by_ofw_node_index, which is like clk_get_by_ofw_index but
Jared McNeill [Sun, 10 Jul 2016 10:53:50 +0000 (10:53 +0000)]
Add clk_get_by_ofw_node_index, which is like clk_get_by_ofw_index but
operates on a specific OF node instead of the pass in device's OF node.

Reviewed by: andrew, mmel
Differential Revision: https://reviews.freebsd.org/D6957

8 years agoAlign descriptors and data buffers to 32 bits. This restriction is
Jared McNeill [Sun, 10 Jul 2016 10:38:28 +0000 (10:38 +0000)]
Align descriptors and data buffers to 32 bits. This restriction is
described in the A20 (and later) user manuals.

8 years agoIn the absence of a bus-width property, default to 4-bit bus width instead
Jared McNeill [Sun, 10 Jul 2016 10:21:22 +0000 (10:21 +0000)]
In the absence of a bus-width property, default to 4-bit bus width instead
of 1-bit.

8 years agoReplace NTB man page with more detailed and up to date.
Alexander Motin [Sun, 10 Jul 2016 10:17:38 +0000 (10:17 +0000)]
Replace NTB man page with more detailed and up to date.

Sponsored by: iXsystems, Inc.

8 years agoAudit the file-descriptor number argument for openat(2). Remove a comment
Robert Watson [Sun, 10 Jul 2016 09:50:21 +0000 (09:50 +0000)]
Audit the file-descriptor number argument for openat(2).  Remove a comment
about the desirability of auditing the number, as it was in fact in the
wrong place (in the common path for open(2) and openat(2), and only the
latter accepts a file-descriptor argument).  Where other ABIs support
openat(2), it may be necessary to do additional argument auditing as it is
not performed in kern_openat(9).

MFC after: 3 days
Sponsored by: DARPA, AFRL

8 years agoAdd linux_mmap.c to the appropriate conf/files.
Dmitry Chagin [Sun, 10 Jul 2016 08:38:10 +0000 (08:38 +0000)]
Add linux_mmap.c to the appropriate conf/files.

Reported by: kib@
MFC after: 1 week

8 years agoFix a copy/paste bug introduced during X86_64 Linuxulator work.
Dmitry Chagin [Sun, 10 Jul 2016 08:22:04 +0000 (08:22 +0000)]
Fix a copy/paste bug introduced during X86_64 Linuxulator work.
FreeBSD support NX bit on X86_64 processors out of the box, for i386 emulation
use READ_IMPLIES_EXEC flag, introduced in r302515.

While here move common part of mmap() and mprotect() code to the files in compat/linux
to reduce code dupcliation between Linuxulator's.

Reported by:    Johannes Jost Meixner, Shawn Webb

MFC after: 1 week
XMFC with: r302515, r302516

8 years agoRegen for r302215 (Linux personality).
Dmitry Chagin [Sun, 10 Jul 2016 08:17:16 +0000 (08:17 +0000)]
Regen for r302215 (Linux personality).

8 years agoImplement Linux personality() system call mainly due to READ_IMPLIES_EXEC flag.
Dmitry Chagin [Sun, 10 Jul 2016 08:15:50 +0000 (08:15 +0000)]
Implement Linux personality() system call mainly due to READ_IMPLIES_EXEC flag.
In Linux if this flag is set, PROT_READ implies PROT_EXEC for mmap().
Linux/i386 set this flag automatically if the binary requires executable stack.

READ_IMPLIES_EXEC flag will be used in the next Linux mmap() commit.

8 years agoAudit file-descriptor arguments to I/O system calls such as
Robert Watson [Sun, 10 Jul 2016 08:04:02 +0000 (08:04 +0000)]
Audit file-descriptor arguments to I/O system calls such as
read(2), write(2), dup(2), and mmap(2).  This auditing is not
required by the Common Criteria (and hence was not being
performed), but is valuable in both contemporary live analysis
and forensic use cases.

MFC after: 3 days
Sponsored by: DARPA, AFRL

8 years agoRemove broken support for collation in [a-z] type ranges.
Andrey A. Chernov [Sun, 10 Jul 2016 03:49:38 +0000 (03:49 +0000)]
Remove broken support for collation in [a-z] type ranges.
Only first 256 wide chars are considered currently, all other are just
dropped from the range. Proper implementation require reverse tables
database lookup, since objects are really big as max UTF-8 (1114112
code points), so just the same scanning as it was for 256 chars will
slow things down.

POSIX does not require collation for [a-z] type ranges and does not
prohibit it for non-POSIX locales. POSIX require collation for ranges
only for POSIX (or C) locale which is equal to ASCII and binary for
other chars, so we already have it.

No other *BSD implements collation for [a-z] type ranges.

Restore ABI compatibility with unused now __collate_range_cmp() which
is visible from outside (will be removed later).

8 years agomail(1): Invert calloc(3) argument order.
Pedro F. Giffuni [Sun, 10 Jul 2016 02:46:20 +0000 (02:46 +0000)]
mail(1): Invert calloc(3) argument order.

calloc(3) is documented to have first a number and then a size.

Obtained from: OpenBSD (through NetBSD)

8 years agoSimplify MSIX MW BAR xlat setup, and don't forget to unlock its limit.
Alexander Motin [Sun, 10 Jul 2016 01:09:16 +0000 (01:09 +0000)]
Simplify MSIX MW BAR xlat setup, and don't forget to unlock its limit.

The last fixes SB01BASE_LOCKUP workaround after driver reload.

8 years agoFix heap overflow in bhnd(4) SPROM parsing.
Landon J. Fuller [Sun, 10 Jul 2016 00:08:40 +0000 (00:08 +0000)]
Fix heap overflow in bhnd(4) SPROM parsing.

The bus_region_* APIs accept the number of data items to be read, while
the code was passing the total number of bytes, resulting in an overflow
of the SPROM parser's buffer.

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D7168

8 years agoDisable SB01BASE_LOCKUP workaround when split BARs disabled.
Alexander Motin [Sat, 9 Jul 2016 23:22:44 +0000 (23:22 +0000)]
Disable SB01BASE_LOCKUP workaround when split BARs disabled.

For some reason hack with sending MSI-X interrupts by writing to remote
LAPIC memory works only for 32-bit BARs, that are available only if split
BARs mode is enabled in BIOS.  If it is not, complain loudly and fall back
to less efficient workaround.

8 years agoAvoid truncating the return value of DTrace predicates.
Mark Johnston [Sat, 9 Jul 2016 22:41:21 +0000 (22:41 +0000)]
Avoid truncating the return value of DTrace predicates.

Predicates are DIF objects whose return value is compared with zero to
determine whether the corresponding probe body is to be executed. The return
value itself is the contents of a 64-bit DIF register, but it was being
truncated to an int before the comparison. This meant that a predicate such
as /0x100000000/ would evaluate to false.

Reported by: rwatson
MFC after: 3 days

8 years agoRemove HZ=<various> from all armv6 configs, put HZ=1000 in std.armv6.
Ian Lepore [Sat, 9 Jul 2016 21:14:59 +0000 (21:14 +0000)]
Remove HZ=<various> from all armv6 configs, put HZ=1000 in std.armv6.
All armv6 processors are plenty fast enough for HZ=1000.

No changes are made for older arm systems, because some chips are a bit
wimpy for 1000 while others do fine, so it has to be set on a per-config
basis.

8 years agoConsolidate debugging options from all arm kernel configs to std.arm[v6].
Ian Lepore [Sat, 9 Jul 2016 20:42:57 +0000 (20:42 +0000)]
Consolidate debugging options from all arm kernel configs to std.arm[v6].

8 years agoAdd emulation for Intel e1000 (e82545) network adapter.
Alexander Motin [Sat, 9 Jul 2016 20:41:59 +0000 (20:41 +0000)]
Add emulation for Intel e1000 (e82545) network adapter.

The code was successfully tested with FreeBSD, Linux, Solaris and Windows
guests.  This interface is predictably slower (about 2x) then virtio-net,
but it is very helpful for guests not supporting virtio-net by default.

Thanks to Jeremiah Lott and Peter Grehan for doing original heavy lifting.

8 years agoFix ctld(8) to not exit when reloading configuration with invalid
Edward Tomasz Napierala [Sat, 9 Jul 2016 20:01:07 +0000 (20:01 +0000)]
Fix ctld(8) to not exit when reloading configuration with invalid
initiator-portal clause.

MFC after: 3 days

8 years agoCorrect syntax errors that only show up when compiled with INVARIANTS.
Ian Lepore [Sat, 9 Jul 2016 18:43:15 +0000 (18:43 +0000)]
Correct syntax errors that only show up when compiled with INVARIANTS.

8 years agodd(1): Enable access to SIZE_T_MAX character devices
Conrad Meyer [Sat, 9 Jul 2016 17:11:54 +0000 (17:11 +0000)]
dd(1): Enable access to SIZE_T_MAX character devices

On machines where SIZE_T_MAX exceeds OFF_MAX (signed 64-bit), permit seeking
character devices to negative off_t values.  This enables dd(1) to interact
with kernel KVA in /dev/kmem on amd64, for example.

Sponsored by: EMC / Isilon Storage Division

8 years agoImprove checksum "offload" support.
Alexander Motin [Sat, 9 Jul 2016 14:59:16 +0000 (14:59 +0000)]
Improve checksum "offload" support.

For compatibility reasons make driver not report any checksum offload by
default, since there is indeed none.  But if administrator knows that
interface is used only for local traffic, he can enable fake checksum
offload manually on both sides to save some CPU cycles, since the data
are already protected by CRC32 of PCIe link.

Sponsored by: iXsystems, Inc.

8 years agoRemove an unneeded call to fdt_get_unit, the return value is unused.
Andrew Turner [Sat, 9 Jul 2016 13:27:14 +0000 (13:27 +0000)]
Remove an unneeded call to fdt_get_unit, the return value is unused.

MFC after: 1 month
Sponsored by: ABT Systems Ltd

8 years agopf: Map hook returns onto the correct error values
Kristof Provost [Sat, 9 Jul 2016 12:17:01 +0000 (12:17 +0000)]
pf: Map hook returns onto the correct error values

pf returns PF_PASS, PF_DROP, ... in the netpfil hooks, but the hook callers
expect to get E<foo> error codes.
Map the returns values. A pass is 0 (everything is OK), anything else means
pf ate the packet, so return EACCES, which tells the stack not to emit an ICMP
error message.

PR: 207598

8 years agoRewrite if_ntb to use modern interface KPIs and features.
Alexander Motin [Sat, 9 Jul 2016 12:10:08 +0000 (12:10 +0000)]
Rewrite if_ntb to use modern interface KPIs and features.

It includes: link state, if_transmit, buf_ring, multiple queues, bpf, etc.

Sponsored by: iXsystems, Inc.

8 years agoImprove memory allocation errors handling on receive.
Alexander Motin [Sat, 9 Jul 2016 12:00:04 +0000 (12:00 +0000)]
Improve memory allocation errors handling on receive.

8 years agoSynchronize MTU code with Linux.
Alexander Motin [Sat, 9 Jul 2016 11:58:59 +0000 (11:58 +0000)]
Synchronize MTU code with Linux.

It is mandatory for transport compatibility.

8 years agoReimplement doorbell register emulation for NTB_SB01BASE_LOCKUP.
Alexander Motin [Sat, 9 Jul 2016 11:57:21 +0000 (11:57 +0000)]
Reimplement doorbell register emulation for NTB_SB01BASE_LOCKUP.

This allows at least first three doorbells to work very close to normal
hardware, properly signaling events to upper layers without spurious or
lost events.  Doorbells above the first three may still report spurious
events due to lack of reliable information, but they are rarely used.

8 years agoBring some more order into link and qp state handling.
Alexander Motin [Sat, 9 Jul 2016 11:48:57 +0000 (11:48 +0000)]
Bring some more order into link and qp state handling.

Do not touch scratchpad registers until link is reported up.
Mask and do not handle doorbell events until respective qp is up.

8 years agoSwitch ctx_lock from mutex to rmlock.
Alexander Motin [Sat, 9 Jul 2016 11:47:52 +0000 (11:47 +0000)]
Switch ctx_lock from mutex to rmlock.

It is odd idea to serialize different MSI-X vectors.  Use of rmlocks
here allows them to execute in parallel, but still protects ctx.
If upper layers require any additional serialization -- they can
do it by themselves.

8 years agoCreate separate RX taskqueue for each qp.
Alexander Motin [Sat, 9 Jul 2016 11:46:32 +0000 (11:46 +0000)]
Create separate RX taskqueue for each qp.

8 years agoRemove rx_completion_task taskqueue.
Alexander Motin [Sat, 9 Jul 2016 11:45:18 +0000 (11:45 +0000)]
Remove rx_completion_task taskqueue.

It is not needed after RX lock removed in previous commit.

8 years agoRemove unneeded RX lock, and make TX lock per-qp.
Alexander Motin [Sat, 9 Jul 2016 11:43:51 +0000 (11:43 +0000)]
Remove unneeded RX lock, and make TX lock per-qp.

8 years agoReduce code divergence from Linux, preparing for DMA support.
Alexander Motin [Sat, 9 Jul 2016 11:40:59 +0000 (11:40 +0000)]
Reduce code divergence from Linux, preparing for DMA support.

8 years agoFix operation with multiple qps.
Alexander Motin [Sat, 9 Jul 2016 11:36:09 +0000 (11:36 +0000)]
Fix operation with multiple qps.

8 years agoAdd myself (tcberner) as ports committer, and update mentor/mentee relationships.
Tobias C. Berner [Sat, 9 Jul 2016 11:22:11 +0000 (11:22 +0000)]
Add myself (tcberner) as ports committer, and update mentor/mentee relationships.

Approved by: rakuco (mentor)

8 years agoNewBus'ify NTB subsystem.
Alexander Motin [Sat, 9 Jul 2016 11:20:42 +0000 (11:20 +0000)]
NewBus'ify NTB subsystem.

This follows NTB subsystem modularization in Linux, tuning it to FreeBSD
native NewBus interfaces.  This change allows to support different types
of hardware with different drivers, support multiple NTB instances in a
system, ntb_transport module use for needs other then if_ntb, etc.

Sponsored by: iXsystems, Inc.

8 years agoRemove some dead code found by Clang static analyzer.
Alexander Motin [Sat, 9 Jul 2016 09:47:11 +0000 (09:47 +0000)]
Remove some dead code found by Clang static analyzer.

8 years agoFix NTB_SDOORBELL_LOCKUP workaround.
Alexander Motin [Sat, 9 Jul 2016 09:34:24 +0000 (09:34 +0000)]
Fix NTB_SDOORBELL_LOCKUP workaround.

Since SBARxSZ register can be write-once, it can be unusable for disabling
the SBAR.  For such case also set SBARxBASE to zero to not intersect with
config BAR.

8 years agoRevert the change from errx/strerror to errc to appease gcc 4.2
Baptiste Daroussin [Sat, 9 Jul 2016 06:52:55 +0000 (06:52 +0000)]
Revert the change from errx/strerror to errc to appease gcc 4.2

8 years agoAdd -P to pathchk usage
Eitan Adler [Sat, 9 Jul 2016 04:56:28 +0000 (04:56 +0000)]
Add -P to pathchk usage

8 years agong_mppc(4):: basic readability cleanups.
Pedro F. Giffuni [Sat, 9 Jul 2016 02:33:45 +0000 (02:33 +0000)]
ng_mppc(4):: basic readability cleanups.

In particular use __unreachable() to appease static analyzers.
No functional change.

CID: 1356591
MFC after: 3 days

8 years agolibunwind: limit stack usage in unwind cursor
Ed Maste [Sat, 9 Jul 2016 00:35:20 +0000 (00:35 +0000)]
libunwind: limit stack usage in unwind cursor

This may be reworked upstream but in the interim should address the
stack usage issue reported in the PR.

PR: 206384
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

8 years agoOn FreeBSD there is a setsockopt option SO_USER_COOKIE which allows
George V. Neville-Neil [Fri, 8 Jul 2016 23:44:09 +0000 (23:44 +0000)]
On FreeBSD there is a setsockopt option SO_USER_COOKIE which allows
setting a 32 bit value on each socket. This can be used by applications
and DTrace as a rendezvous point so that an applicaton's data can
more easily be captured at run time. Expose the user cookie via
DTrace by updating the translator in tcp.d and add a quick test
program, a TCP server, that sets the cookie on each connection
accepted.

Reviewed by: hiren
MFC after: 1 week
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D7152

8 years agoSync usage between program and man page. Increase column width. [1]
Baptiste Daroussin [Fri, 8 Jul 2016 23:40:25 +0000 (23:40 +0000)]
Sync usage between program and man page. Increase column width. [1]
Simplifay the usage() function
Replace errx/strerror with errc

Submitted by: wiz@NetBSD.org [1]
Obtained from: NetBSD

8 years agoAdd support for Allwinner A13.
Emmanuel Vadot [Fri, 8 Jul 2016 23:38:25 +0000 (23:38 +0000)]
Add support for Allwinner A13.

Reviewed by: jmcneill
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D6809

8 years agoAdd RCS Id. Sort options in SYNOPSIS. Fix macro usage. Fix Dd.
Baptiste Daroussin [Fri, 8 Jul 2016 23:10:55 +0000 (23:10 +0000)]
Add RCS Id. Sort options in SYNOPSIS. Fix macro usage. Fix Dd.

Submitted by: wiz@NetBSD.org
Obtained from: NetBSD

8 years agoCheck that the pin function exists before setting it.
Emmanuel Vadot [Fri, 8 Jul 2016 23:08:59 +0000 (23:08 +0000)]
Check that the pin function exists before setting it.
This is needed for Allwinner A13 which has gpio pins with only "out" function.

8 years agoAllow to install various components of the locales independantly
Baptiste Daroussin [Fri, 8 Jul 2016 23:07:48 +0000 (23:07 +0000)]
Allow to install various components of the locales independantly

8 years ago[ath_hal] add in locationing timer support and capabilities.
Adrian Chadd [Fri, 8 Jul 2016 22:59:15 +0000 (22:59 +0000)]
[ath_hal] add in locationing timer support and capabilities.

* add support to read the timer and capability
* add support to enable/disable the location timer.

On AR9380 at least, enabling the location timer is required to make
the timer tick, otherwise location packets return a timestamp of 0.
However, it then makes /all/ RX packets use the RX location timestamp
instead of the TSF timestamp.

So, unless I find another magical way to do location timestamping,
we will have to dynamically switch things on/off and ensure the
TX/RX path handles the "different" timestamps correctly.

Tested:

* AR9380, STA mode

8 years ago[ath_hal] add locationing / tx-beamforming RX status descriptor decoding.
Adrian Chadd [Fri, 8 Jul 2016 22:39:37 +0000 (22:39 +0000)]
[ath_hal] add locationing / tx-beamforming RX status descriptor decoding.

* LOC_INFO is mostly just "did this packet come with a locationing
  timestamp instead of TSF";
* Decode not-sounding, uploaded-data, data-valid, data type and
  number of extension spatial streams.

8 years ago[ath_hal] Add setting positioning bit and clear sounding-disable bit.
Adrian Chadd [Fri, 8 Jul 2016 22:37:52 +0000 (22:37 +0000)]
[ath_hal] Add setting positioning bit and clear sounding-disable bit.

* If fast_ts is set then the TX timestamp is the fast timestamp, not
  normal TSF.
* If the TX descriptor has the position bit set then request locationing
  and clear sounding-disable.  This way we (a) get the response with
  the TX timestamp from the location side of things, and (b) we get
  a CSI dump of the response ACK, which we will eventually use in the
  locationing path.

8 years agoRemove extra 0x before %p format strings introduced by r296182
Oleksandr Tymoshenko [Fri, 8 Jul 2016 22:32:03 +0000 (22:32 +0000)]
Remove extra 0x before %p format strings introduced by r296182

8 years ago[ath] add a new buf flag, marking a buffer as involved with ToA/ToD positioning.
Adrian Chadd [Fri, 8 Jul 2016 22:20:35 +0000 (22:20 +0000)]
[ath] add a new buf flag, marking a buffer as involved with ToA/ToD positioning.

8 years ago[ath_hal] add capability bit for querying/controlling the ToA/ToD positioning code.
Adrian Chadd [Fri, 8 Jul 2016 21:37:04 +0000 (21:37 +0000)]
[ath_hal] add capability bit for querying/controlling the ToA/ToD positioning code.

8 years ago[ath] include ath_hal accessor macro changes.
Adrian Chadd [Fri, 8 Jul 2016 21:35:44 +0000 (21:35 +0000)]
[ath] include ath_hal accessor macro changes.

I missed this in the previous commit.

8 years ago[ath_hal] retire a "long RX desc" flag, store/use the TX/RX timestamp length.
Adrian Chadd [Fri, 8 Jul 2016 21:34:39 +0000 (21:34 +0000)]
[ath_hal] retire a "long RX desc" flag, store/use the TX/RX timestamp length.

* the code already stored the length of the RX desc, which I never used.
  So, use that and retire the new flag I introduced a while ago.
* Introduce a TX timestamp length field and capability.

8 years agoAdd emulation for multiple (up to 16) MSI vectors for AHCI.
Alexander Motin [Fri, 8 Jul 2016 21:30:18 +0000 (21:30 +0000)]
Add emulation for multiple (up to 16) MSI vectors for AHCI.

It was useless before, but may improve performance now if multiple devices
are configured and guest supports this feature.

Sponsored by: iXsystems, Inc.

8 years agoAllow AHCI controller to support up to 32 arbitrary devices.
Alexander Motin [Fri, 8 Jul 2016 21:25:37 +0000 (21:25 +0000)]
Allow AHCI controller to support up to 32 arbitrary devices.

While old syntax is still supported, new syntax looks like this:

-s 3,ahci,hd:/dev/zvol/XXX,hd:/dev/zvol/YYY,cd:/storage/ZZZ.iso

Sponsored by: iXsystems, Inc.

8 years agolibunwind: enable only the native unwinder by default
Ed Maste [Fri, 8 Jul 2016 21:17:24 +0000 (21:17 +0000)]
libunwind: enable only the native unwinder by default

This significantly reduces stack space requirements, and runtimes
require only native unwinding.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

8 years agoAdd missing PORTS_OPTS to two make commands
Poul-Henning Kamp [Fri, 8 Jul 2016 20:33:20 +0000 (20:33 +0000)]
Add missing PORTS_OPTS to two make commands

8 years agolibunwind: update to upstream snapshot r272680
Ed Maste [Fri, 8 Jul 2016 20:20:46 +0000 (20:20 +0000)]
libunwind: update to upstream snapshot r272680

The key improvement is that it may be built without cross-unwinding
support, which significantly reduces the stack space requirement.

MFC after: 1 week
Relnotes: yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D7123

8 years agoUse TARGET here to fix check/delete-old after r302391.
Bryan Drewery [Fri, 8 Jul 2016 20:15:58 +0000 (20:15 +0000)]
Use TARGET here to fix check/delete-old after r302391.

usr.bin/Makefie.arm is used to install ofwdump so TARGET=arm should cover
all of the cases.

MFC after: now
Sponsored by: EMC / Isilon Storage Division

8 years agoDon't forget to set sa->narg for CloudABI system calls.
Ed Schouten [Fri, 8 Jul 2016 20:09:21 +0000 (20:09 +0000)]
Don't forget to set sa->narg for CloudABI system calls.

It turns out that this value is not used within the system call code
under normal conditions, except when using tracing tools like ktrace.
If we forget to set this value, it is set to random garbage. This may
cause ktrace to hang indefinitely, making it impossible to kill.

Reported by: Michael Plass
PR: 210800
MFC before: 11.0-RELEASE

8 years ago[ath_hal] extend the TX/RX descriptor layout to include location/beamforming fields.
Adrian Chadd [Fri, 8 Jul 2016 19:16:50 +0000 (19:16 +0000)]
[ath_hal] extend the TX/RX descriptor layout to include location/beamforming fields.

* extend the TX timestamp to 32 bits, as the AR5416 and later does a full
  32 bit TX timestamp instead of 15 or 16 bits.
* add RX descriptor fields for PHY uploaded information (coming soon)
* add flags for RX/TX fast timestamp, hardware upload, etc
* add a flag for TX to request ToD/ToA location information.

8 years agocxgbe(4): Add sysctl to display the RSS indirection table size for an
Navdeep Parhar [Fri, 8 Jul 2016 18:13:23 +0000 (18:13 +0000)]
cxgbe(4): Add sysctl to display the RSS indirection table size for an
interface.

dev.cxl.<n>.rss_size
dev.vcxl.<n>.rss_size

MFC after: 3 days

8 years agoiflib: Fix typo in 'iflib_rx_miss_bufs' sysctl name
Conrad Meyer [Fri, 8 Jul 2016 17:04:21 +0000 (17:04 +0000)]
iflib: Fix typo in 'iflib_rx_miss_bufs' sysctl name

It looks like these sysctls were copy-pasted from netmap.  Most were changed
from 'ixl_' prefix to 'iflib_', but this one was missed.

Fix the "can't re-use a leaf (ixl_rx_miss_bufs)!" warning.

Reported by: dim@ and others
Sponsored by: EMC / Isilon Storage Division

8 years agoRevert r302403
Enji Cooper [Fri, 8 Jul 2016 16:29:45 +0000 (16:29 +0000)]
Revert r302403

lang/gcc{48,49,5} lacks -fformat-extensions support (causing build errors, which
is what prompted r302403 to be committed). devel/amd64-gcc on the other hand
(which is used by Jenkins), has the support.

This fixes the Jenkins failure emails due to excessive warnings being produced
with "make buildkernel".

Discussed with: lwhsu
Reported by: Jenkins (FreeBSD_HEAD_amd64_gcc job)
Sponsored by: EMC / Isilon Storage Division

8 years agoDocument 300291, Enable NEW_PCIB on arm64.
Steven Kreuzer [Fri, 8 Jul 2016 13:29:47 +0000 (13:29 +0000)]
Document 300291, Enable NEW_PCIB on arm64.

Approved by: re (gjb, implicit, relnotes)

8 years agoDocument 301973, Add bsdconfig `wifi' (aka `wireless' or `wlan') module
Steven Kreuzer [Fri, 8 Jul 2016 13:26:17 +0000 (13:26 +0000)]
Document 301973, Add bsdconfig `wifi' (aka `wireless' or `wlan') module

Approved by: re (gjb, implicit, relnotes)

8 years agoDocument 300436, bsdinstall/zfsboot GPT+BIOS+GELI installs make use of GELIBOOT
Steven Kreuzer [Fri, 8 Jul 2016 13:21:51 +0000 (13:21 +0000)]
Document 300436, bsdinstall/zfsboot GPT+BIOS+GELI installs make use of GELIBOOT

Approved by: re (gjb, implicit, relnotes)

8 years agoDocument 293190, Update less to v481
Steven Kreuzer [Fri, 8 Jul 2016 13:12:24 +0000 (13:12 +0000)]
Document 293190, Update less to v481

Approved by: re (gjb, implicit, relnotes)