freebsd.git
9 years agoMFV r260710 + 275532:
delphij [Sat, 6 Dec 2014 01:01:51 +0000 (01:01 +0000)]
MFV r260710 + 275532:

Add a new method, nvlist_print_json to allow libnvpair to emit JSON.

MFC after: 1 month

9 years agocxgbe(4): Allow for different pad and pack boundaries for different
np [Sat, 6 Dec 2014 00:13:56 +0000 (00:13 +0000)]
cxgbe(4): Allow for different pad and pack boundaries for different
adapters.  Set the pack boundary for T5 cards to be the same as the
PCIe max payload size.  The chip likes it this way.

In this revision the driver allocate rx buffers that align on both
boundaries.  This is not a strict requirement and a followup commit
will switch the driver to a more relaxed allocation strategy.

MFC after: 2 weeks

9 years agoUpdate OpenBSD CVS revision for our r255232.
pfg [Fri, 5 Dec 2014 23:08:39 +0000 (23:08 +0000)]
Update OpenBSD CVS revision for our r255232.

This is a no-op to make it easier to track changes from OpenBSD

MFC after: 3 days

9 years agoUse %d instead of %u for error number. This way we see ERESTART as -1
delphij [Fri, 5 Dec 2014 22:56:10 +0000 (22:56 +0000)]
Use %d instead of %u for error number.  This way we see ERESTART as -1
not 4294967295 when doing DTrace.

MFC after: 2 weeks

9 years agoSwitch to a .cpu directive. These will work when clang 3.5 is imported
andrew [Fri, 5 Dec 2014 19:23:51 +0000 (19:23 +0000)]
Switch to a .cpu directive. These will work when clang 3.5 is imported
where the .arch directive is a nop.

MFC after: 1 week
Sponsored by: ABT Systems Ltd

9 years agoSwitch to an armv6k cpu, without this clang 3.5 complains "bx lr" is
andrew [Fri, 5 Dec 2014 19:19:17 +0000 (19:19 +0000)]
Switch to an armv6k cpu, without this clang 3.5 complains "bx lr" is
unsupported as it needs a newer cpu.

MFC after: 1 week
Sponsored by: ABT Systems Ltd

9 years agoPlace the literal pool after a RET otherwise clang 3.5 tries to put it too
andrew [Fri, 5 Dec 2014 19:14:05 +0000 (19:14 +0000)]
Place the literal pool after a RET otherwise clang 3.5 tries to put it too
far away from a ldr psuedo instruction. With this clang will place the
literal value here where it's close enough to be loaded.

MFC after: 1 week
Sponsored by: ABT Systems Ltd

9 years agoSet the alignment to 4-bytes after a string as clang 3.5 can switch to
andrew [Fri, 5 Dec 2014 19:11:25 +0000 (19:11 +0000)]
Set the alignment to 4-bytes after a string as clang 3.5 can switch to
thumb mode if this is incorrect.

MFC after: 1 week
Sponsored by: ABT Systems Ltd

9 years agoUse the unified syntax in a few more assembly files
andrew [Fri, 5 Dec 2014 19:08:36 +0000 (19:08 +0000)]
Use the unified syntax in a few more assembly files

MFC after: 1 week
Sponsored by: ABT Systems Ltd

9 years agoAdd missing END macros to some of the xscale functions.
andrew [Fri, 5 Dec 2014 19:04:08 +0000 (19:04 +0000)]
Add missing END macros to some of the xscale functions.

MFC after: 1 week
Sponsored by: ABT Systems Ltd

9 years agoUpdate the constants associated with the evaluation of j0f(x)
kargl [Fri, 5 Dec 2014 19:00:55 +0000 (19:00 +0000)]
Update the constants associated with the evaluation of j0f(x)
for |x| small.

While here, remove the explicit cast of 0.25 to float.  Replace
a multiplication involving 0.25 by a division using an integer
constant 4.  Make a similar change in j0() to minimize the diff.

Suggested by: bde

9 years agoFix a regression introduced in r274337 (large block support)
delphij [Fri, 5 Dec 2014 18:29:01 +0000 (18:29 +0000)]
Fix a regression introduced in r274337 (large block support)

In dsl_dataset_hold_obj() we used zap_contains(.., DS_FIELD_LARGE_BLOCKS)
to determine whether the extensible (zapifyed) dataset have large blocks.
The code expects the result be either 0 (found) or ENOENT (not found),
however reused the variable 'err' which later code expects to be 0.

Fix this by adopting similar code construct that is used later for
DS_FIELD_BOOKMARK_NAMES, which uses a temporary variable zaperr to catch
errors from zap_* rountines.

Reported by: Peter J. Creath (on FreeNAS; FreeNAS bug #6848)
Illumos issue: 5393 spurious failures from dsl_dataset_hold_obj()
Reviewed by: mahrens
Sponsored by: iXsystems, Inc.
X-MFC with: r274337

9 years agoAlways ignore the deprecated MAP_RENAME and MAP_NORESERVE flags to mmap().
jhb [Fri, 5 Dec 2014 15:24:42 +0000 (15:24 +0000)]
Always ignore the deprecated MAP_RENAME and MAP_NORESERVE flags to mmap().
Some old libraries may be used even with newer binaries (specifically the
Nvidia driver libraries).

Differential Revision: https://reviews.freebsd.org/D1262
Reviewed by: kib

9 years agoWhen the last reference on the vnode' vm object is dropped, read the
kib [Fri, 5 Dec 2014 15:02:30 +0000 (15:02 +0000)]
When the last reference on the vnode' vm object is dropped, read the
vp->v_vflag without taking vnode lock and without bypass.  We do know
that vp is the lowest level in the stack, since the pointer is
obtained from the object' handle.  Stale VV_TEXT flag read can only
happen if parallel execve() is performed and not yet activated the
image, since process takes reference for text mapping.  In this case,
the execve() code manages the VV_TEXT flag on its own already.

It was observed that otherwise read-only sendfile(2) requires
exclusive vnode lock and contending on it on some loads for VV_TEXT
handling.

Reported by: glebius, scottl
Tested by: glebius, pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoIn addition to r275481 allow threshold notifications work without UNMAP.
mav [Fri, 5 Dec 2014 13:30:45 +0000 (13:30 +0000)]
In addition to r275481 allow threshold notifications work without UNMAP.

While without UNMAP support there is not much initiator can do about it,
the administrator still better be notified about the storage overflow.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

9 years agoMove iscsi.conf.5 from sbin/iscontrol/ to usr.bin/iscsictl/, as the
trasz [Fri, 5 Dec 2014 12:38:01 +0000 (12:38 +0000)]
Move iscsi.conf.5 from sbin/iscontrol/ to usr.bin/iscsictl/, as the
former is obsolete.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

9 years agoOptimise bit searching loop by using the ffs() function.
hselasky [Fri, 5 Dec 2014 12:07:53 +0000 (12:07 +0000)]
Optimise bit searching loop by using the ffs() function.
Make some related bit shifts unsigned while at it.

9 years agoDefine the ffs() function in the USB bootloader's global and
hselasky [Fri, 5 Dec 2014 12:04:47 +0000 (12:04 +0000)]
Define the ffs() function in the USB bootloader's global and
independent header file.

9 years agoAvoid unneeded malloc/memcpy/free if there is no metadata on disk.
mav [Fri, 5 Dec 2014 10:23:18 +0000 (10:23 +0000)]
Avoid unneeded malloc/memcpy/free if there is no metadata on disk.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after: 2 weeks

9 years agoThis is the SCTP specific companion of
tuexen [Thu, 4 Dec 2014 21:17:50 +0000 (21:17 +0000)]
This is the SCTP specific companion of
https://svnweb.freebsd.org/changeset/base/275358
which was provided by Hans Petter Selasky.

9 years agoDocument r275481 changes.
mav [Thu, 4 Dec 2014 19:08:05 +0000 (19:08 +0000)]
Document r275481 changes.

MFC after: 2 weeks

9 years agoAdd to CTL support for threshold notifications for file-backed LUNs.
mav [Thu, 4 Dec 2014 18:37:42 +0000 (18:37 +0000)]
Add to CTL support for threshold notifications for file-backed LUNs.

Previously it was supported only for ZVOL-backed LUNs, but now should work
for file-backed LUNs too.  Used value in this case is a space occupied by
the backing file, while available value is an available space on file
system.  Pool thresholds are still not implemented in this case.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

9 years agoAdd MLINKs for all functions described in the libxo manpages.
brueffer [Thu, 4 Dec 2014 18:23:13 +0000 (18:23 +0000)]
Add MLINKs for all functions described in the libxo manpages.

9 years agoSwap resource count scopes for used/available space.
mav [Thu, 4 Dec 2014 17:36:29 +0000 (17:36 +0000)]
Swap resource count scopes for used/available space.

Used count should be reported as per-LUN, while available should not.

MFC after: 1 week

9 years agoPull in r174303 from upstream gcc trunk (by Jason Merrill):
dim [Thu, 4 Dec 2014 17:26:04 +0000 (17:26 +0000)]
Pull in r174303 from upstream gcc trunk (by Jason Merrill):

  PR c++/48211
  * name-lookup.h (cp_class_binding): Make base a pointer.
  * name-lookup.c (new_class_binding): Adjust.
  (poplevel_class): Adjust.

This fixes a potential segfault when compiling gold, a part of the
devel/binutils port, with gcc.  See also the upstream bug report:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48211

Thanks to Jason Merrill, Tom Callaway and Red Hat legal for approving
the use of this patch under the GNU GPL, version 2 or later.

MFC after: 1 week

9 years agoFix a 20+ year bug by using an appropriate constant for
kargl [Thu, 4 Dec 2014 15:57:58 +0000 (15:57 +0000)]
Fix a 20+ year bug by using an appropriate constant for
the transition from one asymptotic approximation to another
for the zeroth order Bessel and Neumann functions.

Reviewed by: bde

9 years agoDecode some binary fields of Intel metadata.
mav [Thu, 4 Dec 2014 15:54:45 +0000 (15:54 +0000)]
Decode some binary fields of Intel metadata.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after: 2 weeks

9 years agoAdd GET LBA STATUS command support to CTL.
mav [Thu, 4 Dec 2014 11:34:19 +0000 (11:34 +0000)]
Add GET LBA STATUS command support to CTL.

It is implemented for LUNs backed by ZVOLs in "dev" mode and files.
GEOM has no such API, so for LUNs backed by raw devices all LBAs will
be reported as mapped/unknown.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

9 years agoFix style(9) and remove m_freem(NULL).
ae [Thu, 4 Dec 2014 05:02:12 +0000 (05:02 +0000)]
Fix style(9) and remove m_freem(NULL).
Add XXX comment, it looks incorrect, because m_pkthdr.len is already
incremented by M_PREPEND().

Sponsored by: Yandex LLC

9 years agoSwitch is an 8316, so make the comments say that.
sbruno [Wed, 3 Dec 2014 23:37:23 +0000 (23:37 +0000)]
Switch is an 8316, so make the comments say that.

Delete extraneous comment line that manifested itself from cut-n-pasting.

Sponsored by: Nicholas Esborn <nick@desert.net>

9 years agoConst poison in a few places to ensure we don't modify things
imp [Wed, 3 Dec 2014 22:14:13 +0000 (22:14 +0000)]
Const poison in a few places to ensure we don't modify things
through the module data pointer.

9 years agoOptimise the bit searching loops, by quickly skipping the 16 first set
hselasky [Wed, 3 Dec 2014 21:55:44 +0000 (21:55 +0000)]
Optimise the bit searching loops, by quickly skipping the 16 first set
bits if all the 16 first bits are set. This way the worst case
searching time is reduced from 32 to 16 cycles.

9 years agoWorkaround for possible bug in the SAF1761 chip. Wait 125us before
hselasky [Wed, 3 Dec 2014 21:48:30 +0000 (21:48 +0000)]
Workaround for possible bug in the SAF1761 chip. Wait 125us before
re-using a hardware propritary transfer descriptor, PTD, in USB host
mode. If the PTD's are recycled too quickly, it has been observed that
the hardware simply fails to schedule the requested job or resets
completely disconnecting all devices.

9 years agoThere is only one argemdio device on this board.
sbruno [Wed, 3 Dec 2014 19:41:49 +0000 (19:41 +0000)]
There is only one argemdio device on this board.

Sponsored by: Nicholas Esborn <nick@desert.net>

9 years agoAdd libcuse and libxo.
brueffer [Wed, 3 Dec 2014 18:14:21 +0000 (18:14 +0000)]
Add libcuse and libxo.

9 years agoAssign argemdio0 to the correct base address and assign argemdio1 to its
sbruno [Wed, 3 Dec 2014 18:08:39 +0000 (18:08 +0000)]
Assign argemdio0 to the correct base address and assign argemdio1 to its
proper place *after* argemdio0

Correctly place arge0 and arge1 on their respective bus positions.

Sponsored by: Nicholas Esborn <nick@desert.net>

9 years agoIncrease CTL ports limit from 128 to 256 and LUNs limit from 256 to 1024.
mav [Wed, 3 Dec 2014 16:04:01 +0000 (16:04 +0000)]
Increase CTL ports limit from 128 to 256 and LUNs limit from 256 to 1024.

After recent optimizations this change is no longer blocked by CTL memory
consumption.  Those limits are still not free, but much cheaper now.

MFC after: 1 week
Relnotes: yes
Sponsored by: iXsystems, Inc.

9 years agoRevert device_getenv_int() for now as it duplicates resource_int_value().
jhb [Wed, 3 Dec 2014 15:29:53 +0000 (15:29 +0000)]
Revert device_getenv_int() for now as it duplicates resource_int_value().
We should perhaps implement a device_getenv_*() and device_setenv_*() API
as a convenience wrapper on top of resource_*_value() and resource_set_*().

9 years agoUnify function names after r275458.
mav [Wed, 3 Dec 2014 15:19:38 +0000 (15:19 +0000)]
Unify function names after r275458.

MFC after: 1 month

9 years agoDo not pre-allocate UNIT ATTENTIONs storage for every possible initiator.
mav [Wed, 3 Dec 2014 15:16:18 +0000 (15:16 +0000)]
Do not pre-allocate UNIT ATTENTIONs storage for every possible initiator.

Abusing ability of major UAs cover minor ones we may not account UAs for
inactive ports.  Allocate UAs storage for port and start accounting only
after some initiator from that port fetched its first POWER ON OCCURRED.

This reduces per-LUN CTL memory usage from >1MB to less then 100K.

MFC after: 1 month

9 years agoIncrease BERI loader section alignment to 16
emaste [Wed, 3 Dec 2014 14:04:57 +0000 (14:04 +0000)]
Increase BERI loader section alignment to 16

The .text, .bss, and .data sections claimed 16-byte alignment, but were
only aligned to 8 by the linker script.

Discovered with strip(1) from elftoolchain, which performs validation
absent from the binutils strip(1).

Sponsored by: DARPA, AFRL

9 years agoRemove some unused code.
mav [Wed, 3 Dec 2014 10:39:47 +0000 (10:39 +0000)]
Remove some unused code.

9 years agoDo not corrupt the listen string when parsing it.
mav [Wed, 3 Dec 2014 09:32:51 +0000 (09:32 +0000)]
Do not corrupt the listen string when parsing it.

This fixes problem with ctld reload when it is configured to listen on two
portals with same IP, but different ports.

MFC after: 1 week

9 years agoDo not pre-allocate reservation keys memory for every possible initiator.
mav [Wed, 3 Dec 2014 09:05:53 +0000 (09:05 +0000)]
Do not pre-allocate reservation keys memory for every possible initiator.

In configurations with many ports, like iSCSI, each LUN is typically
accessed only by limited subset of ports.  Allocating that memory on
demand allows to reduce CTL memory usage from 5.3MB/LUN to 1.3MB/LUN.

MFC after: 1 month

9 years agoPlug memory leaks on UNMAP and XCOPY with invalid parameters.
mav [Wed, 3 Dec 2014 08:25:41 +0000 (08:25 +0000)]
Plug memory leaks on UNMAP and XCOPY with invalid parameters.

MFC after: 1 week

9 years agoRemove __P() macro.
ae [Wed, 3 Dec 2014 04:08:41 +0000 (04:08 +0000)]
Remove __P() macro.

Suggested by: kevlo
Sponsored by: Yandex LLC

9 years agoANSIfy function declarations.
ae [Wed, 3 Dec 2014 03:50:54 +0000 (03:50 +0000)]
ANSIfy function declarations.

Sponsored by: Yandex LLC

9 years agoSwitch gpioctl(8) to LIBADD.
rpaulo [Wed, 3 Dec 2014 03:05:15 +0000 (03:05 +0000)]
Switch gpioctl(8) to LIBADD.

9 years agoAdd sleep(1) to /rescue. This adds 664 bytes to the binary on amd64 but
delphij [Wed, 3 Dec 2014 01:34:24 +0000 (01:34 +0000)]
Add sleep(1) to /rescue.  This adds 664 bytes to the binary on amd64 but
it's pretty useful for shell scripts.

MFC after: 1 month
Sponsored by: iXsystems, Inc.

9 years agoRemove unused PCMCIA_CARD* macros.
imp [Wed, 3 Dec 2014 00:47:05 +0000 (00:47 +0000)]
Remove unused PCMCIA_CARD* macros.

Always include the card human readable name. We support ~270 cards and
at ~20 bytes each, this bloats things by only ~5k. Retain the
PCMCIA_CARD vs PCMCIA_CARD_D distinction, though, in case this is
intolerable.

9 years agoRevert r274953, r274934
bapt [Tue, 2 Dec 2014 23:33:37 +0000 (23:33 +0000)]
Revert r274953, r274934

mandoc(1) is now able to display correctly the vanilla version

9 years agoUpdate to mandoc cvs version as of 20141201
bapt [Tue, 2 Dec 2014 23:24:57 +0000 (23:24 +0000)]
Update to mandoc cvs version as of 20141201
- Compatiblity with existing manpages has been improved
- Now support ".so" directive with compressed manpages (which fixes a regression
we have since we have new man(1))

9 years agoRevert r275136, it was not approved, it was sloppy, if a feature
jfv [Tue, 2 Dec 2014 23:02:57 +0000 (23:02 +0000)]
Revert r275136, it was not approved, it was sloppy, if a feature
like this is needed please resubmit for Intel's approval.

9 years agolibelf: Fix cross-endian ELF note file / memory conversion
emaste [Tue, 2 Dec 2014 22:35:43 +0000 (22:35 +0000)]
libelf: Fix cross-endian ELF note file / memory conversion

The namesz and descsz variables need to be used in native endianness.
The sizes are in native order after swapping in the file to memory case,
and before swapping in the memory to file case.

This issue was identified for r273443, but the change was applied to the
wrong case. Revert r273443 to fix the to-memory case, and apply the
equivalent change to the to-file case.

Sponsored by: DARPA, AFRL
Reviewed by: adrian, brooks, marcel
Differential Revision: https://reviews.freebsd.org/D1257

9 years agoDo the renaming of sb_cc to sb_ccc in a way with less code changes by
tuexen [Tue, 2 Dec 2014 20:29:29 +0000 (20:29 +0000)]
Do the renaming of sb_cc to sb_ccc in a way with less code changes by
using a macro.
This is an alternate approach to
https://svnweb.freebsd.org/changeset/base/275326
which is easier to handle upstream.

Discussed with: rrs, glebius

9 years agoThis configuration file removes several debugging options, including
gnn [Tue, 2 Dec 2014 19:55:43 +0000 (19:55 +0000)]
This configuration file removes several debugging options, including
WITNESS and INVARIANTS checking, which are known to have significant
performance impact on running systems.  When benchmarking new features
this kernel should be used instead of the standard GENERIC.
This kernel configuration should never appear outside of the HEAD
of the FreeBSD tree.

9 years agogpioctl: don't print the command line arguments.
rpaulo [Tue, 2 Dec 2014 19:41:25 +0000 (19:41 +0000)]
gpioctl: don't print the command line arguments.

PR: 195330
Submitted by: Scott Ellis jumpnowtek at gmail.com
MFC after: 3 days

9 years agoSwitch to unified syntax so these can be built with clang 3.5.
andrew [Tue, 2 Dec 2014 18:37:04 +0000 (18:37 +0000)]
Switch to unified syntax so these can be built with clang 3.5.

MFC after: 1 week
Sponsored by: ABT Systems Ltd

9 years agoUse the APSR_nzcv format of mrc. The clang integrated assembler doesn't
andrew [Tue, 2 Dec 2014 18:35:34 +0000 (18:35 +0000)]
Use the APSR_nzcv format of mrc. The clang integrated assembler doesn't
support the old usage of r15.

Sponsored by: ABT Systems Ltd

9 years agoFix the name of the coprocessor to include the "p" prefix, the clang
andrew [Tue, 2 Dec 2014 18:20:53 +0000 (18:20 +0000)]
Fix the name of the coprocessor to include the "p" prefix, the clang
integrated assembler expects this.

MFC after: 1 Week
Sponsored by: ABT Systems Ltd

9 years agoAllow the UAL APSR_nzcv format for the mrc and mrc2 instructions. The clang
andrew [Tue, 2 Dec 2014 18:12:16 +0000 (18:12 +0000)]
Allow the UAL APSR_nzcv format for the mrc and mrc2 instructions. The clang
integrated assembler only allows these forms so binutils will need to
support them.

MFC after: 1 Week
Sponsored by: AB Systems Ltd

9 years agoThe runtime linker needs to include a path to itself in the link map
jhb [Tue, 2 Dec 2014 16:22:08 +0000 (16:22 +0000)]
The runtime linker needs to include a path to itself in the link map
it exports to the debugger.  It currently has two choices: it can use
a compiled-in path (/libexec/ld-elf.so.1) or it can use the path stored
in the interpreter path in the binary being executed.  The runtime linker
currently prefers the second.  However, this is usually wrong for compat32
binaries since the binary specifies the path of rtld on a 32-bit system
(/libexec/ld-elf.so.1) instead of the actual path (/libexec/ld-elf32.so.1).
For now, always assume the compiled in path (/libexec/ld-elf32.so.1) as
the rtld path and ignore the path in the binary for the 32-bit runtime
linker.

Differential Revision: https://reviews.freebsd.org/D1236
Reviewed by: kib

9 years agoMFi386: r275305 (by rdivacky)
nyan [Tue, 2 Dec 2014 14:48:21 +0000 (14:48 +0000)]
MFi386: r275305 (by rdivacky)

  Unbreak the code for non-digits below '0' by casting the expression
  to unsigned int.

9 years agoAdd missing Makefile defines so that the program in question can be
hselasky [Tue, 2 Dec 2014 13:58:57 +0000 (13:58 +0000)]
Add missing Makefile defines so that the program in question can be
built as part of buildworld.

9 years agoConvert persis_offset from global variable to softc field.
mav [Tue, 2 Dec 2014 12:38:22 +0000 (12:38 +0000)]
Convert persis_offset from global variable to softc field.

9 years agoReduce code duplication by creating ctl_set_res_ua() helper.
mav [Tue, 2 Dec 2014 12:31:28 +0000 (12:31 +0000)]
Reduce code duplication by creating ctl_set_res_ua() helper.

9 years agoRemoved unused variable and unify some names.
mav [Tue, 2 Dec 2014 12:05:44 +0000 (12:05 +0000)]
Removed unused variable and unify some names.

9 years agozfs_putpages: actually update mtime and ctime
avg [Tue, 2 Dec 2014 11:44:56 +0000 (11:44 +0000)]
zfs_putpages: actually update mtime and ctime

Reported by: Paul Koch <paul.koch@akips.com>
Tested by: Paul Koch <paul.koch@akips.com>
MFC after: 2 weeks

9 years agoFix null pointer dereference.
trasz [Tue, 2 Dec 2014 07:42:25 +0000 (07:42 +0000)]
Fix null pointer dereference.

MFC after: 2 weeks
Coverity CID: 1256497
Sponsored by: The FreeBSD Foundation

9 years agoImport CVS version of mandoc as of 20141201
bapt [Tue, 2 Dec 2014 07:34:06 +0000 (07:34 +0000)]
Import CVS version of mandoc as of 20141201

9 years agoFix an off-by-one in gpio_pin_list().
rpaulo [Tue, 2 Dec 2014 06:24:45 +0000 (06:24 +0000)]
Fix an off-by-one in gpio_pin_list().

Coverity CID: 1256495

9 years agoRewrite parts of gpioctl(8) to use the gpio(3) library.
rpaulo [Tue, 2 Dec 2014 06:11:32 +0000 (06:11 +0000)]
Rewrite parts of gpioctl(8) to use the gpio(3) library.

9 years agoRemove unneded check. No need to do m_pullup to the size that we prepended.
ae [Tue, 2 Dec 2014 05:41:03 +0000 (05:41 +0000)]
Remove unneded check. No need to do m_pullup to the size that we prepended.

MFC after: 1 week
Sponsored by: Yandex LLC

9 years agoRemove unneded check. No need to do m_pullup to the size that we prepended.
ae [Tue, 2 Dec 2014 05:28:40 +0000 (05:28 +0000)]
Remove unneded check. No need to do m_pullup to the size that we prepended.

Sponsored by: Yandex LLC

9 years agoRemove route chaching support from ipsec code. It isn't used for some time.
ae [Tue, 2 Dec 2014 04:20:50 +0000 (04:20 +0000)]
Remove route chaching support from ipsec code. It isn't used for some time.
* remove sa_route_union declaration and route_cache member from struct secashead;
* remove key_sa_routechange() call from ICMP and ICMPv6 code;
* simplify ip_ipsec_mtu();
* remove #include <net/route.h>;

Sponsored by: Yandex LLC

9 years agoRemove unused structure declarations.
ae [Tue, 2 Dec 2014 02:41:44 +0000 (02:41 +0000)]
Remove unused structure declarations.

Sponsored by: Yandex LLC

9 years agoRemove unused declartations.
ae [Tue, 2 Dec 2014 02:32:28 +0000 (02:32 +0000)]
Remove unused declartations.

Sponsored by: Yandex LLC

9 years agoRegenerate src.conf(5) after r275373
emaste [Tue, 2 Dec 2014 02:16:30 +0000 (02:16 +0000)]
Regenerate src.conf(5) after r275373

9 years agoAdd elfcopy and man page to OptionalObsoleteFiles
emaste [Tue, 2 Dec 2014 02:11:09 +0000 (02:11 +0000)]
Add elfcopy and man page to OptionalObsoleteFiles

9 years agoLet GNU ld be less obscure about missing symbols and DSOs. If the BFD
dim [Tue, 2 Dec 2014 01:30:53 +0000 (01:30 +0000)]
Let GNU ld be less obscure about missing symbols and DSOs.  If the BFD
object looks like a typical shared library, suggest adding '-l<foo>',
where <foo> has the 'lib' prefix and '.so<bar>' or '.a' suffix removed.

Otherwise, suggest adding '-l:<foo>', where <foo> is the full DT_SONAME.

Submitted by: Conrad Meyer <conrad.meyer@isilon.com>
Sponsored by: EMC / Isilon storage division
Reviewed by: emaste
PR: 194296
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D1152

9 years agoSync the svn template with the one from ports
bapt [Tue, 2 Dec 2014 00:23:26 +0000 (00:23 +0000)]
Sync the svn template with the one from ports

9 years agoMake this work with pkgng, and allow PORTS_OPTS to be passed in
phk [Mon, 1 Dec 2014 22:39:35 +0000 (22:39 +0000)]
Make this work with pkgng, and allow PORTS_OPTS to be passed in

9 years agoUse the floating-point instruction on ARMv7 as the clang 3.5 integrated
andrew [Mon, 1 Dec 2014 21:13:47 +0000 (21:13 +0000)]
Use the floating-point instruction on ARMv7 as the clang 3.5 integrated
assembler doesn't allow these two instructions to use co-processor 11.

MFC after: 1 Week
Sponsored by: ABT Systems Ltd

9 years agoSet the correct architecture when targeting ARMv7
andrew [Mon, 1 Dec 2014 21:07:36 +0000 (21:07 +0000)]
Set the correct architecture when targeting ARMv7

MFC after: 1 Week
Sponsored by: ABT Systems Ltd

9 years agoPull in the NetBSD global offset table handling code. Clang 3.5 creates
andrew [Mon, 1 Dec 2014 21:04:26 +0000 (21:04 +0000)]
Pull in the NetBSD global offset table handling code. Clang 3.5 creates
relocations the linker complains about.

Obtained from: NetBSD
MFC after: 1 Week

9 years agoFix inverted logic introduced in r272154.
delphij [Mon, 1 Dec 2014 20:51:01 +0000 (20:51 +0000)]
Fix inverted logic introduced in r272154.

Noticed by: trasz
MFC after: 2 weeks

9 years agoAllow multiple devices to mmap. It's impossible to prevent this with
rpaulo [Mon, 1 Dec 2014 19:48:23 +0000 (19:48 +0000)]
Allow multiple devices to mmap.  It's impossible to prevent this with
checks on the open/close functions.

MFC after: 1 week

9 years agoDocument ISP 2532 support and hint.isp.0.vports tunable.
mav [Mon, 1 Dec 2014 17:51:16 +0000 (17:51 +0000)]
Document ISP 2532 support and hint.isp.0.vports tunable.

MFC after: 1 week

9 years agoBuild infrastructure for elftoolchain tools
emaste [Mon, 1 Dec 2014 17:49:42 +0000 (17:49 +0000)]
Build infrastructure for elftoolchain tools

Set WITH_ELFTOOLCHAIN_TOOLS in src.conf to use the elftoolchain version
of the following tools:

 * addr2line
 * elfcopy (strip / mcs)
 * nm
 * size
 * strings

Reviewed by: bapt (earlier version)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1224

9 years agoDisable recursion for the process spinlock.
kib [Mon, 1 Dec 2014 17:36:10 +0000 (17:36 +0000)]
Disable recursion for the process spinlock.

Tested by: pho
Discussed with: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 month

9 years agoTrack libarchive API change
emaste [Mon, 1 Dec 2014 16:10:44 +0000 (16:10 +0000)]
Track libarchive API change

9 years agoTemporarily disable non-FreeBSD NT_ note types
emaste [Mon, 1 Dec 2014 16:10:03 +0000 (16:10 +0000)]
Temporarily disable non-FreeBSD NT_ note types

9 years agoFix elftoolchain tools in-tree build
emaste [Mon, 1 Dec 2014 16:07:31 +0000 (16:07 +0000)]
Fix elftoolchain tools in-tree build

 * make variables static
 * add header for uint*_t typedefs

9 years agoWhen passing LUN IDs through treat ASCII values as fixed-length, not
mav [Mon, 1 Dec 2014 15:21:54 +0000 (15:21 +0000)]
When passing LUN IDs through treat ASCII values as fixed-length, not
interpreating NULLs as EOLs, but converting them to spaces.

SPC-4 does not tell that T10-based IDs should be NULL-terminated/padded.
And while it tells that it should include only ASCII chars (0x20-0x7F),
there are some USB sticks (SanDisk Ultra Fit), that have NULLs inside
the value.  Treating NULLs as EOLs there made those LUN IDs non-unique.

MFC after: 1 week

9 years agoPull in r209785 from upstream libc++ trunk (by Marshall Clow):
dim [Mon, 1 Dec 2014 15:02:49 +0000 (15:02 +0000)]
Pull in r209785 from upstream libc++ trunk (by Marshall Clow):

  Fix a problem exposed by r208825, which caused bind (and other bits of
  libc++) to stop working. And tests

This fix is needed to support clang 3.5.0 and higher, which are more
strict about forming pointer-to-function types with cv-qualifiers or
ref-qualifiers.  See also the upstream PR <http://llvm.org/PR19742> and
<http://llvm.org/viewvc/llvm-project?rev=208825&view=rev>

Reported by: amdmi3
MFC after: 3 days

9 years agoMove ctlfe_onoffline() out of lock to let it sleep when needed.
mav [Mon, 1 Dec 2014 13:55:45 +0000 (13:55 +0000)]
Move ctlfe_onoffline() out of lock to let it sleep when needed.

Do some more other polishing while there.

MFC after: 2 weeks

9 years agoDisable the vxlan code until the people reponsible for it can come up with
des [Mon, 1 Dec 2014 12:59:16 +0000 (12:59 +0000)]
Disable the vxlan code until the people reponsible for it can come up with
new command names that don't conflict with existing commands.

Pointy hat to: bryanv

9 years agoThe early-late divider was originally set to mountcritlocal. Since that
des [Mon, 1 Dec 2014 12:29:59 +0000 (12:29 +0000)]
The early-late divider was originally set to mountcritlocal.  Since that
service does not run in jails, it was necessary to change it to something
else when jailed, and NETWORKING was arbitrarily chosen.  The divider was
later moved to FILESYSTEMS when it was introduced, but the logic to change
it to NETWORKING when jailed remained.  Remove it, as it no longer serves
any purpose.

PR: 194975
MFC after: 1 week

9 years agoAllow load_rc_config to be called without a service name.
des [Mon, 1 Dec 2014 12:17:42 +0000 (12:17 +0000)]
Allow load_rc_config to be called without a service name.

MFC after: 1 week

9 years agoStart process of removing the use of the deprecated "M_FLOWID" flag
hselasky [Mon, 1 Dec 2014 11:45:24 +0000 (11:45 +0000)]
Start process of removing the use of the deprecated "M_FLOWID" flag
from the FreeBSD network code. The flag is still kept around in the
"sys/mbuf.h" header file, but does no longer have any users. Instead
the "m_pkthdr.rsstype" field in the mbuf structure is now used to
decide the meaning of the "m_pkthdr.flowid" field. To modify the
"m_pkthdr.rsstype" field please use the existing "M_HASHTYPE_XXX"
macros as defined in the "sys/mbuf.h" header file.

This patch introduces new behaviour in the transmit direction.
Previously network drivers checked if "M_FLOWID" was set in "m_flags"
before using the "m_pkthdr.flowid" field. This check has now now been
replaced by checking if "M_HASHTYPE_GET(m)" is different from
"M_HASHTYPE_NONE". In the future more hashtypes will be added, for
example hashtypes for hardware dedicated flows.

"M_HASHTYPE_OPAQUE" indicates that the "m_pkthdr.flowid" value is
valid and has no particular type. This change removes the need for an
"if" statement in TCP transmit code checking for the presence of a
valid flowid value. The "if" statement mentioned above is now a direct
variable assignment which is then later checked by the respective
network drivers like before.

Additional notes:
- The SCTP code changes will be committed as a separate patch.
- Removal of the "M_FLOWID" flag will also be done separately.
- The FreeBSD version has been bumped.

MFC after: 1 month
Sponsored by: Mellanox Technologies