]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoMerge OpenSSL 1.0.2d.
jkim [Fri, 30 Oct 2015 20:51:33 +0000 (20:51 +0000)]
Merge OpenSSL 1.0.2d.

8 years agoMinor (and incomplete) style cleanup.
kib [Fri, 30 Oct 2015 20:47:42 +0000 (20:47 +0000)]
Minor (and incomplete) style cleanup.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoUpdate ls -l tests to use mtime, not birthtime
emaste [Fri, 30 Oct 2015 20:14:32 +0000 (20:14 +0000)]
Update ls -l tests to use mtime, not birthtime

PR: 204155
Reviewed by: ngie, rodrigc
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4040

8 years agoAlso mark compat32 umtx op table as constant.
kib [Fri, 30 Oct 2015 19:32:30 +0000 (19:32 +0000)]
Also mark compat32 umtx op table as constant.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoUse C99 array initialization, which also makes the code
kib [Fri, 30 Oct 2015 19:20:40 +0000 (19:20 +0000)]
Use C99 array initialization, which also makes the code
self-documented, and eases addition of new ops.

For the similar reasons, eliminate UMTX_OP_MAX.  nitems() handles the
only use of the symbol.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoDo not FALLTHROUGH for SIOC{ADD,DEL}MULTI
sjg [Fri, 30 Oct 2015 17:12:15 +0000 (17:12 +0000)]
Do not FALLTHROUGH for SIOC{ADD,DEL}MULTI

ifmedia_ioctl() returns EINVAL

Differential Revision: 3897
Submitted by: aronen@juniper.net
Reviewed by: marcel

8 years agoNot all targets support by clang have a tested or enabled ubsan yet.
sbruno [Fri, 30 Oct 2015 17:05:52 +0000 (17:05 +0000)]
Not all targets support by clang have a tested or enabled ubsan yet.

Only enable h_raw on x86 targets for today so that a buildworld runs to
completion for clang enabled targets that are not x86.  This should be
removed when validation of the sanitizer has occured for all targets
supported by FreeBSD and clang.

8 years agonvd, nvme: report stripesize through GEOM disk layer
jimharris [Fri, 30 Oct 2015 16:35:18 +0000 (16:35 +0000)]
nvd, nvme: report stripesize through GEOM disk layer

MFC after: 3 days
Sponsored by: Intel

8 years agonvme: fix race condition in split bio completion path
jimharris [Fri, 30 Oct 2015 16:06:34 +0000 (16:06 +0000)]
nvme: fix race condition in split bio completion path

Fixes race condition observed under following circumstances:

1) I/O split on 128KB boundary with Intel NVMe controller.
   Current Intel controllers produce better latency when
   I/Os do not span a 128KB boundary - even if the I/O size
   itself is less than 128KB.
2) Per-CPU I/O queues are enabled.
3) Child I/Os are submitted on different submission queues.
4) Interrupts for child I/O completions occur almost
   simultaneously.
5) ithread for child I/O A increments bio_inbed, then
   immediately is preempted (rendezvous IPI, higher priority
   interrupt).
6) ithread for child I/O B increments bio_inbed, then completes
   parent bio since all children are now completed.
7) parent bio is freed, and immediately reallocated for a VFS
   or gpart bio (including setting bio_children to 1 and
   clearing bio_driver1).
8) ithread for child I/O A resumes processing.  bio_children
   for what it thinks is the parent bio is set to 1, so it
   thinks it needs to complete the parent bio.

Result is either calling a NULL callback function, or double freeing
the bio to its uma zone.

PR: 203746
Reported by: Drew Gallatin <gallatin@netflix.com>,
Marc Goroff <mgoroff@quorum.net>
Tested by: Drew Gallatin <gallatin@netflix.com>
MFC after: 3 days
Sponsored by: Intel

8 years agoAfter r290196, the kernel won't wait for stuff like gmirror nodes
trasz [Fri, 30 Oct 2015 15:52:10 +0000 (15:52 +0000)]
After r290196, the kernel won't wait for stuff like gmirror nodes
if they are not required for mounting rootfs.  However, it's possible
that some setups try to mount them in mountcritlocal (ie from fstab).

Export the list of current root mount holds using a new sysctl,
vfs.root_mount_hold, and make mountcritlocal retry if "mount -a" fails
and the list is not empty.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3709

8 years agoMake root mount wait mechanism smarter, by making it wait only if the root
trasz [Fri, 30 Oct 2015 15:35:04 +0000 (15:35 +0000)]
Make root mount wait mechanism smarter, by making it wait only if the root
device doesn't yet exist.

Reviewed by: kib@, marcel@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3709

8 years agoReduce the DWC OTG interrupt load by not reading all the host channel
hselasky [Fri, 30 Oct 2015 14:50:29 +0000 (14:50 +0000)]
Reduce the DWC OTG interrupt load by not reading all the host channel
status registers for every interrupt. Check a common host channel
status interrupt register first, then conditionally read the
individual host channel status registers.

Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de>
MFC after: 1 week

8 years agoUse PCB/LR from PCB rather from stack on armv7-gdb
zbb [Fri, 30 Oct 2015 12:37:40 +0000 (12:37 +0000)]
Use PCB/LR from PCB rather from stack on armv7-gdb

The kernel dump does not store these values on the stack.
Use PCB structure to resolve PC and LR properly.

Submitted by:  Wojciech Macek <wma@semihalf.com>
Reviewed by:   jhb, kib
Obtained from: Semihalf
Sponsored by:  Juniper Networks Inc.
Differential Revision: https://reviews.freebsd.org/D4013

8 years agoWorkaround KGDB issues on ARM by ignoring ARM EABI version higher than 5
zbb [Fri, 30 Oct 2015 12:21:37 +0000 (12:21 +0000)]
Workaround KGDB issues on ARM by ignoring ARM EABI version higher than 5

To make KGDB working, it needs to understand kernel ELF image.
By default it is compiled using EABI_5, which is not supported
on the gdb-6. As a workaround, treat these images as EABI_2 because
they share a lot of things in common.

This workaround does not guarantee ALL funtionalities
to work.

Submitted by:  Wojciech Macek <wma@semihalf.com>
Reviewed by:   jhb
Obtained from: Semihalf
Sponsored by:  Juniper Networks Inc.
Differential Revision: https://reviews.freebsd.org/D4012

8 years agol2arc: do not call trim_map_free() for blocks with zero b_asize
avg [Fri, 30 Oct 2015 12:00:34 +0000 (12:00 +0000)]
l2arc: do not call trim_map_free() for blocks with zero b_asize

b_asize can be zero if the block is compressed into an empty block
(ZIO_COMPRESS_EMPTY) and the trim code asserts that meaningless
zero-sized trimming is not attempted.
The logic for calling trim_map_free() is extracted into a new function
l2arc_trim() to minimize code duplication.

PR: 203473
Reported by: Willem Jan Withagen <wjw@digiware.nl>
Tested by: Willem Jan Withagen <wjw@digiware.nl>
MFC after: 11 days

8 years agoFix compiler warnings with open_to_operation.c
ngie [Fri, 30 Oct 2015 10:09:04 +0000 (10:09 +0000)]
Fix compiler warnings with open_to_operation.c

Other sidenotes:
- Remove unused variables with main(..)
- Convert errx/exit with -1 to errx/exit with 1
- Fix a bogus test in try_directory_open
  (expected_errno == expected_errno -> errno == expected_errno) [*]
- Fix some warnings related to discarded qualifiers
- Remove a bogus else-statement at the end of check_mmap_exec(..) in the
  successful case. mmap(2), POSIX, Linux, etc all don't state what the
  behavior is when mixing O_WRONLY + PROT_EXEC, so assume success for now to
  get the test program to pass again.

PR: 201286 [*]
MFC after: 1 week
Submitted by: David Binderman <dcb314@hotmail.com>
Sponsored by: EMC / Isilon Storage Division

8 years agoThe prefix for CLFLUSHOPT is 0x66. It was right on amd64.
kib [Fri, 30 Oct 2015 09:53:33 +0000 (09:53 +0000)]
The prefix for CLFLUSHOPT is 0x66.  It was right on amd64.

Sponsored by: The FreeBSD Foundation

8 years agoMake truss work for CloudABI processes on aarch64.
ed [Fri, 30 Oct 2015 08:11:37 +0000 (08:11 +0000)]
Make truss work for CloudABI processes on aarch64.

This change copies over amd64-cloudabi64.c to aarch64-cloudabi.c and
adjusts it to fetch the proper registers on aarch64. To reduce the
amount of shared code, the errno conversion function is moved into a
separate source file.

Reviewed by: jhb, andrew
Differential Revision: https://reviews.freebsd.org/D4023

8 years agoDisable h_raw/h_read with gcc
ngie [Fri, 30 Oct 2015 08:06:24 +0000 (08:06 +0000)]
Disable h_raw/h_read with gcc

I forgot that these testcases fail with gcc 4.2.1; add a note to that effect

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

8 years agoFix a set but not used variable warning flagged by gcc 4.9 with
ngie [Fri, 30 Oct 2015 08:01:53 +0000 (08:01 +0000)]
Fix a set but not used variable warning flagged by gcc 4.9 with
lib/libc/ssp/h_readlink

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

8 years ago- Re-enable h_raw with clang 3.7.0+
ngie [Fri, 30 Oct 2015 07:48:03 +0000 (07:48 +0000)]
- Re-enable h_raw with clang 3.7.0+
- Fix the compiler check to allow the test to be compiled for gcc

PR: 196430
MFC after: never
Sponsored by: EMC / Isilon Storage Division

8 years agoFix rtsold's usage message
ngie [Fri, 30 Oct 2015 07:36:43 +0000 (07:36 +0000)]
Fix rtsold's usage message

- Remove -a from the usage message example dealing with specific
  interfaces. -a only makes sense when not specifying an interface,
  such that it's to be run on all interfaces
- Fix the pidfile option (it's -p, not -P)
- Change `interfaces` to `interface` to match the manpage

MFC after: 3 days
PR: 173744
Sponsored by: EMC / Isilon Storage Division

8 years agoUnbreak bsd.progs.mk with PROGS (but not PROGS_CXX) and when invoking the
ngie [Fri, 30 Oct 2015 06:07:41 +0000 (06:07 +0000)]
Unbreak bsd.progs.mk with PROGS (but not PROGS_CXX) and when invoking the
"one of many" targets, e.g. `make hello_world`, where hello_world is a C
program

Tested with: PROGS and PROGS_CXX
MFC after: 1 week
X-MFC with: r289289
Sponsored by: EMC / Isilon Storage Division

8 years agoFollow up to roundup feature addition in r289203
ngie [Fri, 30 Oct 2015 05:55:56 +0000 (05:55 +0000)]
Follow up to roundup feature addition in r289203

- Rename -r to -R to avoid the clash with makefs -r in NetBSD
- Note that -R is an FFS-specific option because it's not implemented
  in cd9660 today
- Rename the roundup variable to "roundup-size" in the manpage and help
  text for consistency with other variables.
- Bump .Dd (missed in r289203)

PR: 203707
MFC after: 1 week
X-MFC with: r289203
Differential Revision: https://reviews.freebsd.org/D3959
Reviewed by: adrian (earlier patch), emaste
Sponsored by: EMC / Isilon Storage Division

8 years agoRemove a set but unused variable in __getgroupmembership to fix a gcc 4.9+ warning
ngie [Fri, 30 Oct 2015 05:50:05 +0000 (05:50 +0000)]
Remove a set but unused variable in __getgroupmembership to fix a gcc 4.9+ warning

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

8 years agoFix GOST engine cipher linkage by adding e_gost_err.c to SRCS so it
ngie [Fri, 30 Oct 2015 05:33:38 +0000 (05:33 +0000)]
Fix GOST engine cipher linkage by adding e_gost_err.c to SRCS so it
picks up undefined symbols, like "ERR_load_GOST_strings"

MFC after: 3 days
PR: 184805
Submitted by: Ivan IvanZhdanov <ivan.zhdanov@gmail.com>
Sponsored by: EMC / Isilon Storage Division

8 years agoIntegrate contrib/netbsd-tests/lib/libc/rpc into the FreeBSD test suite
ngie [Fri, 30 Oct 2015 03:28:00 +0000 (03:28 +0000)]
Integrate contrib/netbsd-tests/lib/libc/rpc into the FreeBSD test suite
as lib/libc/rpc

This testcase requires rpcbind be up in running; otherwise the testcases
will time out and be skipped

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

8 years agoFix BULK read transfer if destination buffer is not cache line-aligned.
gonzo [Fri, 30 Oct 2015 01:19:04 +0000 (01:19 +0000)]
Fix BULK read transfer if destination buffer is not cache line-aligned.

We can't use copyout because destination memory is userland address
in another process but we have reference to respective page so map
the page into kernel address space and copy fragments there

8 years agocxgbe/tom: decide whether to shove segments or not only if there is
np [Fri, 30 Oct 2015 01:18:07 +0000 (01:18 +0000)]
cxgbe/tom: decide whether to shove segments or not only if there is
payload to transmit.

MFC after: 1 week

8 years agoIn pw_userlock, set 'name' to NULL when we encounter an all number string
delphij [Fri, 30 Oct 2015 00:46:52 +0000 (00:46 +0000)]
In pw_userlock, set 'name' to NULL when we encounter an all number string
because it is also used as an indicator of whether a name or an UID is
being used and we may have undefined results as 'name' may contain
uninitialized stack contents.

MFC after: 2 weeks

8 years agoUse strlcpy().
delphij [Fri, 30 Oct 2015 00:33:03 +0000 (00:33 +0000)]
Use strlcpy().

MFC after: 2 weeks

8 years agoFix framebuffer compatibility with new RPi firmware. Framebuffer driver
gonzo [Fri, 30 Oct 2015 00:24:37 +0000 (00:24 +0000)]
Fix framebuffer compatibility with new RPi firmware. Framebuffer driver
receives video memory address from VideoCore through property mailbox
channel. Older versions of firmware (and the one that is currently part
of sysutils/u-boot-rpi and sysutils/u-boot-rpi2) returned real physical
address, newer one returns VideoCore bus address, so we need to convert
it to actual physical address. this version works with both older and
newer interface.

8 years agoRemove unneeded NULL as this is initialized with M_ZERO.
bdrewery [Thu, 29 Oct 2015 23:56:34 +0000 (23:56 +0000)]
Remove unneeded NULL as this is initialized with M_ZERO.

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

8 years agoUse memmove(3) to avoid overlapping copy.
bdrewery [Thu, 29 Oct 2015 23:06:33 +0000 (23:06 +0000)]
Use memmove(3) to avoid overlapping copy.

Reported by: valgrind
MFC after: 2 weeks
X-MFC-With: r290168

8 years agoFix several memory leaks, and crashes, in iconvlist(3).
bdrewery [Thu, 29 Oct 2015 23:02:34 +0000 (23:02 +0000)]
Fix several memory leaks, and crashes, in iconvlist(3).

- Both curitem and curitem (via the names list) was always leaked.
- malloc(3) failures lead to some leaks.
- __bsd___iconv_get_list() failure lead to a crash since its error was not
  handles and __bsd___iconv_free_list() is not NULL-safe.

I have slightly refactored this to avoid extra malloc and free logic in cases
of malloc(3) failing.

There are still bad assumptions here that I did not deal with.  One of which is
that the data will always have a '/' so the strchr(3) will not return NULL.

Coverity CID: 1130055 1130054 1130053

8 years agoFix LEAVE_HYP macro: spsr is not guaranteed to contain valid value at this
gonzo [Thu, 29 Oct 2015 22:12:03 +0000 (22:12 +0000)]
Fix LEAVE_HYP macro: spsr is not guaranteed to contain valid value at this
point, e.g. on RaspberryPi 2 when control is passed from loader to kernel
it contains garbage. So we use cpsr as a base for new cpsr value: if we
have reached this point it means current value is OK

Reviewed by: andrew

8 years agoInstall myself as src committer.
skra [Thu, 29 Oct 2015 21:40:32 +0000 (21:40 +0000)]
Install myself as src committer.

Approved by: kib (mentor)

8 years agoSet the proper direction to check for policies in this one case.
gnn [Thu, 29 Oct 2015 21:26:32 +0000 (21:26 +0000)]
Set the proper direction to check for policies in this one case.

Pointed out by: eri
Sponsored by: Rubicon Communications (Netgate)

8 years agoUse movw instead of movl (or plain mov) when moving segment registers
jhb [Thu, 29 Oct 2015 21:25:46 +0000 (21:25 +0000)]
Use movw instead of movl (or plain mov) when moving segment registers
into memory.  This is a nop on clang's assembler, but some assemblers
complain if the size suffix is incorrect.

Submitted by: bde

8 years agoIgnore per-mdN settings in mdconfig[2] startup
dteske [Thu, 29 Oct 2015 21:12:57 +0000 (21:12 +0000)]
Ignore per-mdN settings in mdconfig[2] startup

PR: base/189696
Submitted by: ganael.laplanche@martymac.org
MFC after: 3 days
X-MFC-to: stable/10 stable/9

8 years agoAdd myself (jtl) and my mentor to the committers-src.dot file.
jtl [Thu, 29 Oct 2015 21:00:11 +0000 (21:00 +0000)]
Add myself (jtl) and my mentor to the committers-src.dot file.

Approved by: gnn (mentor)
Differential Revision: https://reviews.freebsd.org/D4029

8 years agopf: Fix IPv6 checksums with route-to.
kp [Thu, 29 Oct 2015 20:45:53 +0000 (20:45 +0000)]
pf: Fix IPv6 checksums with route-to.

When using route-to (or reply-to) pf sends the packet directly to the output
interface. If that interface doesn't support checksum offloading the checksum
has to be calculated in software.
That was already done in the IPv4 case, but not for the IPv6 case. As a result
we'd emit packets with pseudo-header checksums (i.e. incorrect checksums).

This issue was exposed by the changes in r289316 when pf stopped performing full
checksum calculations for all packets.

Submitted by: Luoqi Chen
MFC after: 1 week

8 years agoRemove some unneeded code.
mav [Thu, 29 Oct 2015 20:43:13 +0000 (20:43 +0000)]
Remove some unneeded code.

8 years agoRemove reset delays for which I see neither explanation nor need.
mav [Thu, 29 Oct 2015 20:34:01 +0000 (20:34 +0000)]
Remove reset delays for which I see neither explanation nor need.

8 years agontb: Revert r290130 now that r290156 has landed
cem [Thu, 29 Oct 2015 19:35:01 +0000 (19:35 +0000)]
ntb: Revert r290130 now that r290156 has landed

Nagged by: vangyzen
Sponsored by: EMC / Isilon Storage Division

8 years agoCheck archive_entry_new() result.
bdrewery [Thu, 29 Oct 2015 19:28:21 +0000 (19:28 +0000)]
Check archive_entry_new() result.

Coverity CID: 1331341

8 years agopmap_change_attr: Only fixup DMAP for DMAPed ranges
cem [Thu, 29 Oct 2015 19:07:00 +0000 (19:07 +0000)]
pmap_change_attr: Only fixup DMAP for DMAPed ranges

pmap_change_attr must change the memory type of both the requested KVA
and the corresponding DMAP mappings (if such mappings exist), to satisfy
an Intel requirement that two or more mappings to the same physical
pages must have the same memory type.

However, not all kernel mapped pages have corresponding DMAP mappings --
for example, 64-bit BARs.  Skip fixing up the DMAP for out-of-bounds
addresses.

Submitted by: Steve Wahl <steve_wahl@dell.com>
Reviewed by: alc, jhb
Sponsored by: Dell Compellent
Differential Revision: https://reviews.freebsd.org/D4030

8 years agogetnewbuf: Initialize bp to avoid uninitialized pointer dereference and brelse().
bdrewery [Thu, 29 Oct 2015 19:02:24 +0000 (19:02 +0000)]
getnewbuf: Initialize bp to avoid uninitialized pointer dereference and brelse().

This came in recently in r289279.

Coverity CID: 1331561

8 years agoAvoid passing an uninitialized 'i'. Currently nothing was depending on it
bdrewery [Thu, 29 Oct 2015 18:58:18 +0000 (18:58 +0000)]
Avoid passing an uninitialized 'i'.  Currently nothing was depending on it
anyhow.

Coverity CID: 1331562

8 years agoFix unlikely memory leak.
bdrewery [Thu, 29 Oct 2015 18:29:28 +0000 (18:29 +0000)]
Fix unlikely memory leak.

It is unlikely since the first check in the function is that dir[0] is '/',
but later code changes may make it real.

Coverity CID: 1332104

8 years agoPC Card and Cardbus are now in extended maintenance mode. No need to
imp [Thu, 29 Oct 2015 16:50:28 +0000 (16:50 +0000)]
PC Card and Cardbus are now in extended maintenance mode. No need to
have them cluttering up MAINTAINERS.

8 years agoFix and improve error masking and reporting.
mav [Thu, 29 Oct 2015 16:48:12 +0000 (16:48 +0000)]
Fix and improve error masking and reporting.

8 years agoUpdate for LINUX32 rename. The assembler didn't complain about undefined
jhb [Thu, 29 Oct 2015 15:20:47 +0000 (15:20 +0000)]
Update for LINUX32 rename.  The assembler didn't complain about undefined
symbols but just used 0 after the rename.

8 years agoFix build with DEBUG defined.
jhb [Thu, 29 Oct 2015 15:16:47 +0000 (15:16 +0000)]
Fix build with DEBUG defined.

Reported by: hselasky

8 years agoAdd missing NULL check in physio().
hselasky [Thu, 29 Oct 2015 13:53:37 +0000 (13:53 +0000)]
Add missing NULL check in physio().

When destroying a character device the si_devsw field is set to NULL
before all references are gone, to indicate the character device is
going away. This can cause a NULL-dereference fault inside physio().

The callers of physio() should own a thread reference on the cdev and
if si_devsw is seen as non-NULL, it is usable during the execution of
the function. Else an ENXIO error code is returned.

Reviewed by: kib
MFC after: 2 weeks

8 years agoSome minor additions to r290138,
mav [Thu, 29 Oct 2015 10:31:44 +0000 (10:31 +0000)]
Some minor additions to r290138,

8 years agoSome updates to isp(4) manual page.
mav [Thu, 29 Oct 2015 09:50:48 +0000 (09:50 +0000)]
Some updates to isp(4) manual page.

8 years agoAdd myself to MAINTAINERS.
hselasky [Thu, 29 Oct 2015 08:45:56 +0000 (08:45 +0000)]
Add myself to MAINTAINERS.

8 years agoFinish process of moving the LinuxKPI module into the default kernel build.
hselasky [Thu, 29 Oct 2015 08:28:39 +0000 (08:28 +0000)]
Finish process of moving the LinuxKPI module into the default kernel build.

- Move all files related to the LinuxKPI into sys/compat/linuxkpi and
  its subfolders.
- Update sys/conf/files and some Makefiles to use new file locations.
- Added description of COMPAT_LINUXKPI to sys/conf/NOTES which in turn
  adds the LinuxKPI to all LINT builds.
- The LinuxKPI can be added to the kernel by setting the
  COMPAT_LINUXKPI option. The OFED kernel option no longer builds the
  LinuxKPI into the kernel. This was done to keep the build rules for
  the LinuxKPI in sys/conf/files simple.
- Extend the LinuxKPI module to include support for USB by moving the
  Linux USB compat from usb.ko to linuxkpi.ko.
- Bump the FreeBSD_version.
- A universe kernel build has been done.

Reviewed by: np @ (cxgb and cxgbe related changes only)
Sponsored by: Mellanox Technologies

8 years agoRemove the static function declaration.
kevlo [Thu, 29 Oct 2015 04:51:27 +0000 (04:51 +0000)]
Remove the static function declaration.

8 years ago- Add a missing prototype
kevlo [Thu, 29 Oct 2015 04:21:34 +0000 (04:21 +0000)]
- Add a missing prototype
- Fix typos

8 years agoioat_test: Handled forced hardware resets gracefully
cem [Thu, 29 Oct 2015 04:16:52 +0000 (04:16 +0000)]
ioat_test: Handled forced hardware resets gracefully

Sponsored by: EMC / Isilon Storage Division

8 years agoioat: Drain/quiesce the device less racily
cem [Thu, 29 Oct 2015 04:16:39 +0000 (04:16 +0000)]
ioat: Drain/quiesce the device less racily

On detach and during a forced HW reset.

Sponsored by: EMC / Isilon Storage Division

8 years agontb: Do not attempt to set write-combining on MWs
cem [Thu, 29 Oct 2015 04:16:28 +0000 (04:16 +0000)]
ntb: Do not attempt to set write-combining on MWs

AMD64 pmap assumes ranges will be in the DMAP, which isn't necessarily
true for NTB memory windows (especially 64-bit BARs).

Suggested by: pmap_change_attr_locked -> kassert_panic
Sponsored by: EMC / Isilon Storage Division

8 years agoioatcontrol(8): Add and document "raw" testing mode
cem [Thu, 29 Oct 2015 04:16:16 +0000 (04:16 +0000)]
ioatcontrol(8): Add and document "raw" testing mode

Allows DMA from/to arbitrary KVA or physical address.  /dev/ioat_test
must be enabled by root and is only R/W root, so this is approximately
as dangerous as /dev/mem and /dev/kmem.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd MLINKS for if_otus(4), if_rsu(4) and if_urtwn(4).
kevlo [Thu, 29 Oct 2015 03:28:28 +0000 (03:28 +0000)]
Add MLINKS for if_otus(4), if_rsu(4) and if_urtwn(4).

8 years agoXref otus(4).
kevlo [Thu, 29 Oct 2015 03:22:27 +0000 (03:22 +0000)]
Xref otus(4).

8 years agoFix regression from using .USEBEFORE in _SUBDIR in r289705.
bdrewery [Thu, 29 Oct 2015 00:41:03 +0000 (00:41 +0000)]
Fix regression from using .USEBEFORE in _SUBDIR in r289705.

Using .USEBEFORE had the unintended side-effect of changing the directory for
the real target ran in the current directory.  For example this meant that
the 'make clean' would run in one of the SUBDIR.

Sponsored by: EMC / Isilon Storage Division
Pointyhat to: bdrewery

8 years agoOops - use the wrong array offset.
adrian [Wed, 28 Oct 2015 23:39:33 +0000 (23:39 +0000)]
Oops - use the wrong array offset.

8 years agoCalculate the correct amount of bytes that are in-flight for a connection as
hiren [Wed, 28 Oct 2015 22:57:51 +0000 (22:57 +0000)]
Calculate the correct amount of bytes that are in-flight for a connection as
suggested by RFC 6675.

Currently differnt places in the stack tries to guess this in suboptimal ways.
The main problem is that current calculations don't take sacked bytes into
account. Sacked bytes are the bytes receiver acked via SACK option. This is
suboptimal because it assumes that network has more outstanding (unacked) bytes
than the actual value and thus sends less data by setting congestion window
lower than what's possible which in turn may cause slower recovery from losses.

As an example, one of the current calculations looks something like this:
snd_nxt - snd_fack + sackhint.sack_bytes_rexmit
New proposal from RFC 6675 is:
snd_max - snd_una - sackhint.sacked_bytes + sackhint.sack_bytes_rexmit
which takes sacked bytes into account which is a new addition to the sackhint
struct. Only thing we are missing from RFC 6675 is isLost() i.e. segment being
considered lost and thus adjusting pipe based on that which makes this
calculation a bit on conservative side.

The approach is very simple. We already process each ack with sack info in
tcp_sack_doack() and extract sack blocks/holes out of it. We'd now also track
this new variable sacked_bytes which keeps track of total sacked bytes reported.

One downside to this approach is that we may get incorrect count of sacked_bytes
if the other end decides to drop sack info in the ack because of memory pressure
or some other reasons. But in this (not very likely) case also the pipe
calculation would be conservative which is okay as opposed to being aggressive
in sending packets into the network.

Next step is to use this more accurate pipe estimation to drive congestion
window adjustments.

In collaboration with: rrs
Reviewed by: jason_eggnet dot com, rrs
MFC after: 2 weeks
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D3971

8 years agoDefine endianness for non-x86 platforms.
jkim [Wed, 28 Oct 2015 22:49:37 +0000 (22:49 +0000)]
Define endianness for non-x86 platforms.

MFC after: 3 days

8 years agoRetire pmap_dmap_iscurrent(). It is only a wrapper around pmap_is_current(), and...
jah [Wed, 28 Oct 2015 21:17:38 +0000 (21:17 +0000)]
Retire pmap_dmap_iscurrent().  It is only a wrapper around pmap_is_current(), and is no longer called.

8 years agoBUS_ADD_CHILD calls device_add_child. device_add_child does not call
imp [Wed, 28 Oct 2015 19:11:06 +0000 (19:11 +0000)]
BUS_ADD_CHILD calls device_add_child. device_add_child does not call
BUS_ADD_CHILD. Make it explicit since it follows the command paradigm
rather than the callback paradigm. Add other clarifying notes as well.

8 years agoChange the way how target mode is enabled on 23xx chips.
mav [Wed, 28 Oct 2015 19:08:51 +0000 (19:08 +0000)]
Change the way how target mode is enabled on 23xx chips.

Without docs I am not completely sure about this, but on my tests new
method works better then previous, at least with our latest firmware.

8 years agoAdd a note to the effect that BUS_ADD_CHILD calls
imp [Wed, 28 Oct 2015 18:53:18 +0000 (18:53 +0000)]
Add a note to the effect that BUS_ADD_CHILD calls
device_add_child_ordered to add the child. device_add_child_ordered
doesn't call BUS_ADD_CHILD.

8 years agoCheck the size of data available in mbuf, before using them.
ae [Wed, 28 Oct 2015 17:55:37 +0000 (17:55 +0000)]
Check the size of data available in mbuf, before using them.

PR: 202667
MFC after: 1 week

8 years agoInclude libutil's headers directly from src to avoid recording a dirdeps
bdrewery [Wed, 28 Oct 2015 16:31:04 +0000 (16:31 +0000)]
Include libutil's headers directly from src to avoid recording a dirdeps
dependency for META MODE.

8 years agoConnect mpsutil for META MODE.
bdrewery [Wed, 28 Oct 2015 16:22:00 +0000 (16:22 +0000)]
Connect mpsutil for META MODE.

8 years agoFix spelling and grammer in tools/test/README.
vangyzen [Wed, 28 Oct 2015 15:00:21 +0000 (15:00 +0000)]
Fix spelling and grammer in tools/test/README.

Reviewed by: gnn

8 years agoAdd _flags2 per jhb@ suggestion since no room left in _flags.
ache [Wed, 28 Oct 2015 14:40:02 +0000 (14:40 +0000)]
Add _flags2 per jhb@ suggestion since no room left in _flags.
Rewrite O_APPEND flag checking using new __S2OAP flag.

MFC after:      3 weeks

8 years agoRemove the s3c2xx0 code, it's no longer used. As far as I know I as the
andrew [Wed, 28 Oct 2015 13:14:16 +0000 (13:14 +0000)]
Remove the s3c2xx0 code, it's no longer used. As far as I know I as the
main user of this code, however I haven't used it in over two years, and
don't expect to in the future.

8 years agoStart to remove support for the XScale i80321. As far as I can tell nobody
andrew [Wed, 28 Oct 2015 13:07:56 +0000 (13:07 +0000)]
Start to remove support for the XScale i80321. As far as I can tell nobody
uses this which makes it difficult to support.

8 years agoImprove/fix loop scanning routine.
mav [Wed, 28 Oct 2015 12:34:59 +0000 (12:34 +0000)]
Improve/fix loop scanning routine.

For the most of chips (except anscient ones) port handlers have no relation
to port IDs.  In such situation old code scanning first 125 handlers was
quite naive.  Instead of doing that, send to chip single request to get full
list of port handlers available on specific virtual port and scan only them.

Old code had problems with case of several virtual ports enabled, when port
handlers allocated from global address space could easily go above 125.
This change was successfully tested on 23xx, 24xx and 25xx chips in loop
mode with 4 virtual initiator ports, each seing 50 virtual target ports.

8 years agoConnect mpsutil(8) to the build
bapt [Wed, 28 Oct 2015 12:31:29 +0000 (12:31 +0000)]
Connect mpsutil(8) to the build

Sponsored by: Gandi.net

8 years agoMerge mpsutil(8) branch
bapt [Wed, 28 Oct 2015 12:30:29 +0000 (12:30 +0000)]
Merge mpsutil(8) branch

mpsutil(8)/mprutil(8) are new utilities for managing LSI Fusion-MPT
2/3 controllers (mps(4) and mpr(4))

For now only informational commands have been implemented.

This utility has been written by scottl@ [1] and polished by myself[2]

Submitted by: scottl
Discussed with: scottl
Relnotes: yes
Sponsored by: Netflix [1]
Sponsored by: Gandi.net [2]

8 years agoBuild fix for i386/XBOX and pc98/GENERIC.
hselasky [Wed, 28 Oct 2015 12:10:01 +0000 (12:10 +0000)]
Build fix for i386/XBOX and pc98/GENERIC.

Reviewed by: kib

8 years agoMerge from head
bapt [Wed, 28 Oct 2015 11:58:18 +0000 (11:58 +0000)]
Merge from head

Sponsored by: Gandi.net

8 years agoFix a typo in the comment about the include guard
bapt [Wed, 28 Oct 2015 11:29:58 +0000 (11:29 +0000)]
Fix a typo in the comment about the include guard

Sponsored by: Gandi.net

8 years agoRemove more of the mptutil unused code
bapt [Wed, 28 Oct 2015 11:28:46 +0000 (11:28 +0000)]
Remove more of the mptutil unused code

Sponsored by: Gandi.net

8 years agoRemove some unused code from the mptutil(8)
bapt [Wed, 28 Oct 2015 11:25:28 +0000 (11:25 +0000)]
Remove some unused code from the mptutil(8)

The code from mptutil living in the same source tree the day those functions
will be implemented in the mpsutil(8) it can be copy/paste easily

Sponsored by: Gandi.net

8 years agoReduce overlinking, for now neither cam nor libutil are needed
bapt [Wed, 28 Oct 2015 11:20:55 +0000 (11:20 +0000)]
Reduce overlinking, for now neither cam nor libutil are needed

Sponsored by: Gandi.net

8 years agoDo enforce "-g", DEBUG_FLAGS can be user if one want to set it
bapt [Wed, 28 Oct 2015 11:18:43 +0000 (11:18 +0000)]
Do enforce "-g", DEBUG_FLAGS can be user if one want to set it

Sponsored by: Gandi.net

8 years agoReplace the manpage with one that actually describes the utility
bapt [Wed, 28 Oct 2015 11:06:04 +0000 (11:06 +0000)]
Replace the manpage with one that actually describes the utility

Sponsored by: Gandi.net

8 years agoAdd some debugging code (under ARGE_DEBUG) that counts each interrupt source.
adrian [Wed, 28 Oct 2015 05:11:06 +0000 (05:11 +0000)]
Add some debugging code (under ARGE_DEBUG) that counts each interrupt source.

This should make it easier to track down interrupt storms from arge.

Tested:

* AP135 (QCA955x) SoC - defaults to ARGE_DEBUG enabled
* Carambola2 (AR9331 SoC) - defaults to ARGE_DEBUG disabled

8 years agoAdd a test for the listen queue using two test programs,
gnn [Wed, 28 Oct 2015 03:43:24 +0000 (03:43 +0000)]
Add a test for the listen queue using two test programs,
listen, and connect.  The listen program is a simple server that
accepts and closes sockets, until a fixed limit, then sets the listen
queue to 0 and counts how many remaining connections it processes.

The connect program repeatedly opens connections and closes them
serving as the driver for the listen program.

Sponsored by: Limelight Networks

8 years agoUpdate the README to describe all the current tests in this directory.
gnn [Wed, 28 Oct 2015 03:39:18 +0000 (03:39 +0000)]
Update the README to describe all the current tests in this directory.

8 years agoioat: Define DMACAPABILITY bits
cem [Wed, 28 Oct 2015 02:37:24 +0000 (02:37 +0000)]
ioat: Define DMACAPABILITY bits

Check for BFILL capability before initiating blockfill operations.

Sponsored by: EMC / Isilon Storage Division

8 years agoUse proper CONFDIR after r289148
bdrewery [Tue, 27 Oct 2015 23:49:32 +0000 (23:49 +0000)]
Use proper CONFDIR after r289148

8 years agoStart to remove support for the Samsung s3c24x0 SoCs by removing the kernel
andrew [Tue, 27 Oct 2015 23:37:54 +0000 (23:37 +0000)]
Start to remove support for the Samsung s3c24x0 SoCs by removing the kernel
config, and support from NOTES.

8 years agoRemove unneeded NAME override.
bdrewery [Tue, 27 Oct 2015 23:35:08 +0000 (23:35 +0000)]
Remove unneeded NAME override.

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