freebsd.git
8 years agoRemove unsupported ia64.
bdrewery [Thu, 19 Nov 2015 22:54:37 +0000 (22:54 +0000)]
Remove unsupported ia64.

Sponsored by: EMC / Isilon Storage Division

8 years agoif_ntb: Initialize if_mtu to the correct MTU
cem [Thu, 19 Nov 2015 19:53:19 +0000 (19:53 +0000)]
if_ntb: Initialize if_mtu to the correct MTU

Lower the payload data (IP) portion of the MTU from 0x10000 to
IP_MAXPACKET (0xFFFF) to avoid panicing the IP stack.

Sponsored by: EMC / Isilon Storage Division

8 years agoif_ntb: Add Xeon link watchdog register writes
cem [Thu, 19 Nov 2015 19:53:09 +0000 (19:53 +0000)]
if_ntb: Add Xeon link watchdog register writes

This feature is disabled by default.  To enable it, tune
hw.if_ntb.enable_xeon_watchdog to non-zero.

If enabled, writes an unused NTB register every second to demonstrate to
a hardware watchdog that the NTB device is still alive.  Most machines
with NTB will not need this -- you know who you are.

Sponsored by: EMC / Isilon Storage Division

8 years agoRename checked-in 'includes' to 'includes.sh' to avoid colliding with share/mk
bdrewery [Thu, 19 Nov 2015 17:57:31 +0000 (17:57 +0000)]
Rename checked-in 'includes' to 'includes.sh' to avoid colliding with share/mk
target 'make includes'.

The file is still installed to /usr/libexec/bsdconfig/includes/includes.

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

8 years agoAnother round of port scanner rewrite.
mav [Thu, 19 Nov 2015 17:43:47 +0000 (17:43 +0000)]
Another round of port scanner rewrite.

This change simplifies and unifies port adding/updating for loop and
fabric scanners.  It also fixes problems with scanning restarts due to
concurrent port databases changes.  It also fixes many cosmetic issues.

8 years agoAdd arm CPUTYPE values typically used on FreeBSD.
imp [Thu, 19 Nov 2015 17:06:12 +0000 (17:06 +0000)]
Add arm CPUTYPE values typically used on FreeBSD.

8 years agoFix a bug where an SCTP association was moved back to SHUTDOWN_SENT
tuexen [Thu, 19 Nov 2015 16:46:00 +0000 (16:46 +0000)]
Fix a bug where an SCTP association was moved back to SHUTDOWN_SENT
state when the user issued a shutdown() call.

MFC after:  1 week

8 years agoConsistently enforce the restriction against calling malloc/free when in a
jtl [Thu, 19 Nov 2015 14:04:53 +0000 (14:04 +0000)]
Consistently enforce the restriction against calling malloc/free when in a
critical section.

uma_zalloc_arg()/uma_zalloc_free() may acquire a sleepable lock on the
zone. The malloc() family of functions may call uma_zalloc_arg() or
uma_zalloc_free().

The malloc(9) man page currently claims that free() will never sleep.
It also implies that the malloc() family of functions will not sleep
when called with M_NOWAIT. However, it is more correct to say that
these functions will not sleep indefinitely. Indeed, they may acquire
a sleepable lock. However, a developer may overlook this restriction
because the WITNESS check that catches attempts to call the malloc()
family of functions within a critical section is inconsistenly
applied.

This change clarifies the language of the malloc(9) man page to clarify
the restriction against calling the malloc() family of functions
while in a critical section or holding a spin lock. It also adds
KASSERTs at appropriate points to make the enforcement of this
restriction more consistent.

PR: 204633
Differential Revision: https://reviews.freebsd.org/D4197
Reviewed by: markj
Approved by: gnn (mentor)
Sponsored by: Juniper Networks

8 years agoIf a NIS server has long entries on its database that is bigger than
araujo [Thu, 19 Nov 2015 13:36:53 +0000 (13:36 +0000)]
If a NIS server has long entries on its database that is bigger than
1024 specified on YPMAXRECORD the ypmatch can get in an infinite retry
loop when is requesting the information from the NIS server.

The ypmatch(1) will return an error until the command receives an
kill(1).

To avoid this problem, we check the MAX_RETRIES that is by default set
to 20 and avoid get in infinet loop at the client side.

NOTE: FreeBSD nis(8) server doesn't present this issue.

Submitted by: Ravi Pokala <rpokala@panasas.com>,
Lakshmi N. Sundararajan <lakshmi.n@msystechnologies.com>,
Lewis, Fred <flewis@panasas.com>,
Pushkar Kothavade <pushkar.kothavade@msystechnologies.com>
Approved by: bapt (mentor)
MFC after: 1 month
Differential Revision: D4095

8 years agoAdd the mlx5 and mlx5en modules to the i386 and amd64 kernel builds by
hselasky [Thu, 19 Nov 2015 12:55:43 +0000 (12:55 +0000)]
Add the mlx5 and mlx5en modules to the i386 and amd64 kernel builds by
default and add a manual page for mlx5en. The mlx5 module contains
shared code for both infiniband and ethernet. The mlx5en module
contains specific code for ethernet functionality only. A mlx5ib
module is in the works for infiniband support.

Supported hardware:
- ConnectX-4: 10/20/25/40/50/56/100Gb/s speeds.
- ConnectX-4 LX: 10/25/40/50Gb/s speeds (low power consumption)

Refer to the mlx5en(4) manual page for a comprehensive list.

The team porting the mlx5 driver(s) to FreeBSD:
- Hans Petter Selasky <hselasky@freebsd.org>
- Oded Shanoon <odeds@mellanox.com>
- Meny Yossefi <menyy@mellanox.com>
- Shany Michaely <shanim@mellanox.com>
- Shahar Klein <shahark@mellanox.com>
- Daria Genzel <dariaz@mellanox.com>
- Mark Bloch <markb@mellanox.com>

Differential Revision: https://reviews.freebsd.org/D4163
Submitted by: Mark Block <markb@mellanox.com>
Sponsored by: Mellanox Technologies
Reviewed by: gnn @
MFC after: 3 days

8 years agoFix zfs(8) set options
smh [Thu, 19 Nov 2015 12:03:11 +0000 (12:03 +0000)]
Fix zfs(8) set options

Fix zfs(8) not formatting due to wrong macro (Oc) in the syntax for the new
zfs set multiple dataset properties option.

PR: 204631
Submitted by: Thomas Eberhardt
Sponsored by: Multiplay

8 years agoStyle changes, mostly automated.
hselasky [Thu, 19 Nov 2015 10:28:51 +0000 (10:28 +0000)]
Style changes, mostly automated.

Differential Revision: https://reviews.freebsd.org/D4179
Submitted by: Daria Genzel <dariaz@mellanox.com>
Sponsored by: Mellanox Technologies
MFC after: 3 days

8 years agoAccumulate out of RX buffers into a 64-bit value and subtract out of
hselasky [Thu, 19 Nov 2015 10:23:10 +0000 (10:23 +0000)]
Accumulate out of RX buffers into a 64-bit value and subtract out of
RX buffers from number of received packets.

Differential Revision: https://reviews.freebsd.org/D4178
Submitted by: Drew Gallatin <gallatin@freebsd.org>
Sponsored by: Mellanox Technologies
MFC after: 3 days

8 years agoMaintain the "hw_lro" configuration variable correctly.
hselasky [Thu, 19 Nov 2015 10:18:13 +0000 (10:18 +0000)]
Maintain the "hw_lro" configuration variable correctly.

Setting sysctl dev....conf.hw_lro may fail if the net device lro is
turned off. Due to the nature of our sysctl handler we need to set the
values back to 0 and issue an error.

Differential Revision: https://reviews.freebsd.org/D4177
Submitted by: Shahar Klein <shahark@mellanox.com>
Sponsored by: Mellanox Technologies
MFC after: 3 days

8 years agoPrint cable name, if cable type is not recognized.
hselasky [Thu, 19 Nov 2015 10:10:52 +0000 (10:10 +0000)]
Print cable name, if cable type is not recognized.

Differential Revision: https://reviews.freebsd.org/D4180
Submitted by: Mark Bloch <markb@mellanox.com>
Sponsored by: Mellanox Technologies
MFC after: 3 days

8 years agoImprove locking of sg_threadcount.
mav [Thu, 19 Nov 2015 08:04:05 +0000 (08:04 +0000)]
Improve locking of sg_threadcount.

MFC after: 1 week

8 years agoRemove a commented-out debug print.
markj [Thu, 19 Nov 2015 05:58:51 +0000 (05:58 +0000)]
Remove a commented-out debug print.

MFC after: 1 week

8 years agoAdd support for a configurable output channel to witness(4).
markj [Thu, 19 Nov 2015 05:56:59 +0000 (05:56 +0000)]
Add support for a configurable output channel to witness(4).

This is useful in environments where system configuration is performed by
automated interaction with the system console, since unexpected witness
output makes such automation difficult. With this change, the new
debug.witness.output_channel sysctl allows one to specify that witness
output is to be printed to the kernel log (using log(9)) rather than the
console.

Reviewed by: cem, jhb
MFC after: 2 weeks
Relnotes: yes
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D4183

8 years agoAdd vlog(9).
markj [Thu, 19 Nov 2015 05:50:22 +0000 (05:50 +0000)]
Add vlog(9).

Reviewed by: cem, jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D4183

8 years agoFix a bug in the amd64 dtrace_getarg() implementation: when unwinding the
markj [Thu, 19 Nov 2015 05:33:15 +0000 (05:33 +0000)]
Fix a bug in the amd64 dtrace_getarg() implementation: when unwinding the
stack, take into account the copy of rsi pushed between the breakpoint
trapframe and the dtrace_invop frame. Prior to r287644, this was covered
by the fact that sizeof(struct amd64_frame) was 24 rather than 16.

Reported by: smh

8 years agoRevert r291009 until rman changes go in.
jhibbits [Thu, 19 Nov 2015 04:41:16 +0000 (04:41 +0000)]
Revert r291009 until rman changes go in.

Pointy-hat to: jhibbits

8 years agoFix missing endif.
imp [Thu, 19 Nov 2015 03:55:44 +0000 (03:55 +0000)]
Fix missing endif.

8 years agoFix mips CPUTYPE so that we can pass it through to gcc.
imp [Thu, 19 Nov 2015 03:11:20 +0000 (03:11 +0000)]
Fix mips CPUTYPE so that we can pass it through to gcc.
Keep old CPUTYPEs around for compatibility. Also include
a list of typical values for FreeBSD.

# Split out from other changes in D4155

Differential Revision: https://reviews.freebsd.org/D4155

8 years agoRemove clauses 3 and 4 from makefs newfs_extern.h
emaste [Thu, 19 Nov 2015 02:39:46 +0000 (02:39 +0000)]
Remove clauses 3 and 4 from makefs newfs_extern.h

Obtained from: NetBSD

8 years agoMark the mostly redundant kernels that just pull
imp [Thu, 19 Nov 2015 01:58:12 +0000 (01:58 +0000)]
Mark the mostly redundant kernels that just pull
in something from _BASE as NO_UNIVERSE

Differential Revision: https://reviews.freebsd.org/D4200

8 years agoThe Linux kexec boot loader doesn't need a font built in to it. This got
nwhitehorn [Thu, 19 Nov 2015 01:57:23 +0000 (01:57 +0000)]
The Linux kexec boot loader doesn't need a font built in to it. This got
copied-and-pasted from the PS3 loader.

8 years agoDon't leak work if __mlx4_register_vlan(..) fails in
ngie [Thu, 19 Nov 2015 01:08:16 +0000 (01:08 +0000)]
Don't leak work if __mlx4_register_vlan(..) fails in
mlx4_master_immediate_activate_vlan_qos(..)

MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D4203
Submitted by: Miles Olrich <miles.olrich@isilon.com>
Sponsored by: EMC / Isilon Storage Division

8 years agoFAST_DEPEND: Similar to r290629, do always depend on headers if 'make depend'
bdrewery [Thu, 19 Nov 2015 00:45:36 +0000 (00:45 +0000)]
FAST_DEPEND: Similar to r290629, do always depend on headers if 'make depend'
has not ran yet.

This fixes building objects directly, or skipping 'make depend', not generating
required headers first.  This case did work without FAST_DEPEND so there's no
reason it should not work here as well.

An example of this can be seen building in gnu/usr.bin/binutils/libbfd
without running 'make depend' first to generate config.h.

Sponsored by: EMC / Isilon Storage Division
MFC after: 3 weeks
X-MFC-With: r290433

8 years agoin6_mc_get: Fix recursion on if_addr_lock on malloc failure
cem [Thu, 19 Nov 2015 00:27:26 +0000 (00:27 +0000)]
in6_mc_get: Fix recursion on if_addr_lock on malloc failure

Analogously to r291040, in6_mc_get recurses on if_addr_lock if the
M_NOWAIT allocation fails.  The fix is the same.

Suggested by: Andrey V. Elsukov
Reviewed by: jhb (ip4 version)
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D4138 (ip4 version)

8 years agoUse print as a function for Python 3 [PEP 3105]
rodrigc [Thu, 19 Nov 2015 00:01:52 +0000 (00:01 +0000)]
Use print as a function for Python 3 [PEP 3105]

Import print_function from the __future__ module
to activate this for Python 2.  This works as far back as Python 2.6.0a2:
   https://docs.python.org/2/library/__future__.html

[PEP 3105] https://www.python.org/dev/peps/pep-3105/

8 years agoin_getmulti: Fix recursion on if_addr_lock on malloc failure
cem [Wed, 18 Nov 2015 23:53:13 +0000 (23:53 +0000)]
in_getmulti: Fix recursion on if_addr_lock on malloc failure

When the M_NOWAIT allocation fails, we recurse the if_addr_lock trying
to clean up.  Reorder the cleanup after dropping the if_addr_lock.  The
obvious race is already possible between if_addmulti and IF_ADDR_WLOCK
above, so it must be ok.

Submitted by: Ryan Libby <rlibby@gmail.com>
Reviewed by: jhb
Found with: M_NOWAIT failure injection testing
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D4138

8 years agoDo not print out errno if the call succeeded unexpectedly; this was a mistake
ngie [Wed, 18 Nov 2015 23:42:44 +0000 (23:42 +0000)]
Do not print out errno if the call succeeded unexpectedly; this was a mistake
made in r290868

MFC after: 4 days
X-MFC with: r290563, r290868
Reported by: jilles
Sponsored by: EMC / Isilon Storage Division

8 years agoUse 'in' instead of 'has_key()' for testing dictionary membership.
rodrigc [Wed, 18 Nov 2015 23:32:29 +0000 (23:32 +0000)]
Use 'in' instead of 'has_key()' for testing dictionary membership.

In PEP 0290, has_key() was deprecated in Python 2.2 and higher:
https://www.python.org/dev/peps/pep-0290/#testing-dictionary-membership
https://docs.python.org/2.2/whatsnew/node4.html

In Python 3, dict.has_key() was removed:
https://docs.python.org/3.0/whatsnew/3.0.html#builtins

8 years agoThe problem report was for a crash that happened when smbfs was
rmacklem [Wed, 18 Nov 2015 23:04:01 +0000 (23:04 +0000)]
The problem report was for a crash that happened when smbfs was
trying to do a mount. Given the backtrace,
it appears that the crash occurred when smb_vc_create() failed and then
called smb_vc_put() with vcp->vc_iod == NULL. smb_vc_put() subsequently
called smb_vc_disconnect() with vcp->vc_iod == NULL, causing the crash.
This patch adds a check for vcp->vc_iod != NULL in smb_vc_disconnect() to
avoid the crash. It also fixes the case in smb_vc_create() where
kproc_create() fails so that it destroys the mutexes and sets
vcp->vc_iod == NULL before free()'ing the iod structure.
The person who reported the PR tested the patch, but was not able
to reproduce the crash with or without the patch.

PR: 201912
Reviewed by: jhb
MFC after: 2 weeks

8 years agoif_ntb: Reuse receive buffers correctly
cem [Wed, 18 Nov 2015 22:20:49 +0000 (22:20 +0000)]
if_ntb: Reuse receive buffers correctly

Discard the unused rx_free_q.  Instead, reuse inputed packets by putting
them back on the *pend* queue after reinitialization.

If tx or rx handlers are unavailable, free mbufs rather than leaking
them.

With this change, if_ntb can receive more than 100
(NTB_QP_DEF_NUM_ENTRIES) packets.

Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: Expose 32-bit BAR limits to consumers
cem [Wed, 18 Nov 2015 22:20:40 +0000 (22:20 +0000)]
NTB: Expose 32-bit BAR limits to consumers

32-bit BARs can only address memory mapped in the low 32 bits of
physical RAM.  Expose this as a 'plimit' out parameter from
ntb_mw_get_range().

Fix if_ntb to allocate memory within this limit.

Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: Mask off the low 12 bits of address/range registers
cem [Wed, 18 Nov 2015 22:20:31 +0000 (22:20 +0000)]
NTB: Mask off the low 12 bits of address/range registers

Sometimes they'll read spurious values (observed: 0xc on Broadwell-DE),
failing link negotiation.

Discussed with: Dave Jiang, Allen Hubbe
Sponsored by: EMC / Isilon Storage Division

8 years agontb_hw: Add programmatic interface to enable/disable WC
cem [Wed, 18 Nov 2015 22:20:21 +0000 (22:20 +0000)]
ntb_hw: Add programmatic interface to enable/disable WC

Enable users to enable/disable WC on memory windows programmatically.

Sponsored by: EMC / Isilon Storage Division

8 years agontb_hw: Add tunable to disable write-combining
cem [Wed, 18 Nov 2015 22:20:13 +0000 (22:20 +0000)]
ntb_hw: Add tunable to disable write-combining

The tunable 'hw.ntb.enable_writecombine' may be set to zero to
administratively disable write combining the mapped NTB region.

Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: Fix 32-bit BAR size validation
cem [Wed, 18 Nov 2015 22:20:04 +0000 (22:20 +0000)]
NTB: Fix 32-bit BAR size validation

Sponsored by: EMC / Isilon Storage Division

8 years agoif_ntb: Diff reduce with Linux
cem [Wed, 18 Nov 2015 22:19:55 +0000 (22:19 +0000)]
if_ntb: Diff reduce with Linux

Use bus_space_write instead of (non-volatile) C pointer writes via an
iowrite32() shim in the same places as the Dual BSD/GPL Linux driver.

Update some types to fixed 32-bit sizes.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: Fix changing what "MACHINE=host" means when computing dirdeps for include/.
bdrewery [Wed, 18 Nov 2015 21:39:58 +0000 (21:39 +0000)]
META MODE: Fix changing what "MACHINE=host" means when computing dirdeps for include/.

The _SKIP_BUILD is used while computing DIRDEPS.  If MACHINE=host is passed in
then this logic was replacing 'MACHINE' with a literal value of the host arch,
which then caused the dirdeps graph to be wrong since it no longer had the
literal 'host' for any of include's dependencies.

This is a NOP currently since include/ is not usually built with MACHINE=host.

Sponsored by: EMC / Isilon Storage Division

8 years agoRemove unneeded libmd from bootstrap-tools (reverting r246784).
bdrewery [Wed, 18 Nov 2015 21:37:46 +0000 (21:37 +0000)]
Remove unneeded libmd from bootstrap-tools (reverting r246784).

The bootstrap-tools are supposed to be host tools, which in most cases, use
host headers and libraries.  As such, directly including the src tree's headers
for libmd here causes the need to link libmd in since it will be built with
the new symbols (which /usr/lib/libmd.so) won't have unless it is new enough.
During the target build in buildworld the target headers are staged into
WORLDTMP and used via --sysroot, allowing the target xinstall to be built with
the new/target libmd.

The .PATH here was also not doing anything since xinstall does not use libmd
source files.

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

8 years agosh: Fix ""$@, which should not use the special case for "$@".
jilles [Wed, 18 Nov 2015 21:09:03 +0000 (21:09 +0000)]
sh: Fix ""$@, which should not use the special case for "$@".

"$@" should expand to no words if there are no positional parameters, but
""$@ should always expand to at least an empty word.

8 years agoxen: fix dropping bitmap IPIs during resume
royger [Wed, 18 Nov 2015 18:11:19 +0000 (18:11 +0000)]
xen: fix dropping bitmap IPIs during resume

Current Xen resume code clears all pending bitmap IPIs on resume, which is
not correct. Instead re-inject bitmap IPI vectors on resume to all CPUs in
order to acknowledge any pending bitmap IPIs.

Sponsored by: Citrix Systems R&D
MFC after: 2 weeks

8 years agoxen/intr: properly dispose event channels on resume
royger [Wed, 18 Nov 2015 18:10:28 +0000 (18:10 +0000)]
xen/intr: properly dispose event channels on resume

All event channels are torn down when performing a migration on Xen, make
sure all handlers are also removed and the event channel structure is
properly disposed so it can be reused.

Sponsored by: Citrix Systems R&D
MFC after: 2 weeks

8 years agox86/intr: allow mutex recursion in intr_remove_handler
royger [Wed, 18 Nov 2015 18:09:49 +0000 (18:09 +0000)]
x86/intr: allow mutex recursion in intr_remove_handler

This is needed so interrupt handlers can be removed while the PIC is
resuming, it was previously not possible due to intr_resume holding the
intr_table_lock and intr_remove_handler recursing on it.

Sponsored by: Citrix Systems R&D
Reviewed by: kib (previous version)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D4114

8 years agoConvert to SUBDIR.yes format.
bdrewery [Wed, 18 Nov 2015 17:52:38 +0000 (17:52 +0000)]
Convert to SUBDIR.yes format.

Reviewed by: imp
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D4182

8 years agoExtend r270123 to run the brand info's header_supported() routine for
nwhitehorn [Wed, 18 Nov 2015 17:03:22 +0000 (17:03 +0000)]
Extend r270123 to run the brand info's header_supported() routine for
branded as well as unbranded binaries. This will be required to add
support for the new ELFv2 ABI on powerpc64, which is distinguished from
ELFv1 by the contents of the ELF header's flags field.

Reviewed by: imp
MFC after: 2 weeks

8 years agoRecommend only to remove the content of /usr/share/locale/ and not the directory
bapt [Wed, 18 Nov 2015 16:52:19 +0000 (16:52 +0000)]
Recommend only to remove the content of /usr/share/locale/ and not the directory
Add a missing full stop

8 years agoARM: Fix dma_dcache_sync() for early allocated memory.
mmel [Wed, 18 Nov 2015 16:07:01 +0000 (16:07 +0000)]
ARM: Fix dma_dcache_sync() for early allocated memory.
Drivers can request DMA to buffers that are not in memory represented
in the vm page arrays. Because of this, store KVA of already mapped
buffer to synclist and use it in dma_dcache_sync().

Reviewed by: jah
Approved by: kib (mentor)
Differential Revision: https://reviews.freebsd.org/D4120

8 years agoFix the date on the pmcstat(8) man page from r291016.
jtl [Wed, 18 Nov 2015 15:12:24 +0000 (15:12 +0000)]
Fix the date on the pmcstat(8) man page from r291016.

Approved by: gnn (mentor)
MFC after: 1 month
X-MFC with: r291016
Pointy hat to: jtl

8 years agoSupport a wider history counter in pmcstat(8) gmon output
jtl [Wed, 18 Nov 2015 14:52:01 +0000 (14:52 +0000)]
Support a wider history counter in pmcstat(8) gmon output

pmcstat(8) contains an option to output sampling data in a gmon format
compatible with gprof(1). Currently, it uses the default histcounter,
which is an (unsigned short). With large sets of sampling data, it
is possible to overflow the maximum value provided by an (unsigned
short).

This change adds the -e argument to pmcstat. If -e and -g are both
specified, pmcstat will use a histcounter type of uint64_t.

Differential Revision: https://reviews.freebsd.org/D4151
Reviewed by: jhb, bjk
Approved by: gnn (mentor)
MFC after: 1 month
Sponsored by: Juniper Networks

8 years agoTemporarily comment out the libcrypt tests.
rodrigc [Wed, 18 Nov 2015 13:19:34 +0000 (13:19 +0000)]
Temporarily comment out the libcrypt tests.

They are emitting characters which are triggering
a kyua bug which causes kyua to emit invalid XML.
This invalid XML is causing false failures in Jenkins.

On a separate note, kyua needs to be fixed with this:
  https://github.com/jmmv/kyua/pull/148
or something similar.

8 years agoSimplify fabric tasting code.
mav [Wed, 18 Nov 2015 12:39:20 +0000 (12:39 +0000)]
Simplify fabric tasting code.

Except cosmetic changes this removes fabric ports from our port database.
It is always firmware duty to manage them, so driver don't need to worry.

8 years agoRemove some confusions between loopid and nphdl.
mav [Wed, 18 Nov 2015 11:14:59 +0000 (11:14 +0000)]
Remove some confusions between loopid and nphdl.

Modern cards in most cases operate abstract port handles, that have no
any relation to real loop IDs.  Leave loopid used only where it really
goes about local loop IDs.

While there, fix few more cases where LUNs were still printed in decimal.

8 years agoDocument loader(8) dumpdev option
smh [Wed, 18 Nov 2015 09:42:36 +0000 (09:42 +0000)]
Document loader(8) dumpdev option

Add an entry for dumpdev environment variable to loader(8).

MFC after: 1 week
Sponsored by: Multiplay

8 years agoAdd the QCA9533 base configuration file and an example configuration
adrian [Wed, 18 Nov 2015 06:25:25 +0000 (06:25 +0000)]
Add the QCA9533 base configuration file and an example configuration
for the AP143.

Wifi doesn't work on the QCA9533 board, but basic ethernet/ethernet
and ethernet switch support does work.

The AP143 has 32MB RAM and 4MB flash, so this was tested with a USB
rootfs.

Tested:

* QCA9533v2, AP143 reference design board.

8 years agouart(4) - make the 8250 uart baudrate tolerance build time tweakable.
adrian [Wed, 18 Nov 2015 06:24:21 +0000 (06:24 +0000)]
uart(4) - make the 8250 uart baudrate tolerance build time tweakable.

It turns out on a 16550 w/ a 25MHz SoC reference clock you get a little
over 3% error at 115200 baud, which causes this to fail.

Just .. cope. Things cope these days.

Default to 30 (3.0%) as before, but allow UART_DEV_TOLERANCE_PCT to be
set at build time to change that.

8 years agoPhysical addresses for e500mc/e5500 are 36-bits, e6500 is 40-bits.
jhibbits [Wed, 18 Nov 2015 02:18:14 +0000 (02:18 +0000)]
Physical addresses for e500mc/e5500 are 36-bits, e6500 is 40-bits.

Increase BUS_SPACE_MAXADDR to allow for this.

Sponsored by: Alex Perez/Inertial Computing

8 years agoAdd support for new LAW registers in QorIQ SoCs.
jhibbits [Wed, 18 Nov 2015 01:54:19 +0000 (01:54 +0000)]
Add support for new LAW registers in QorIQ SoCs.

QorIQ SoCs (e5500 core, P5 family) have 2 BARs for local access windows, while
MPC85XX, and P1/P2 families use only a single BAR register.

This also adds the QORIQ_DPAA option, mutually exclusive to MPC85XX, to handle
this difference.

Obtained from: Semihalf
Sponsored by: Alex Perez/Inertial Computing

8 years agoAdd a kernel config for the Onion Omega
allanjude [Tue, 17 Nov 2015 21:02:27 +0000 (21:02 +0000)]
Add a kernel config for the Onion Omega

Small $25 IoT device, 400mhz Atheros cpu, Atheros WiFi and Ethernet
18 GPIOs, and support for Relay, Servo, and OLED expansion
https://onion.io/omega/

Reviewed by: adrian
Approved by: bapt (mentor)
Relnotes: yes
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D4188

8 years agoFix early kernel dump via dumpdev env
smh [Tue, 17 Nov 2015 20:55:50 +0000 (20:55 +0000)]
Fix early kernel dump via dumpdev env

Setting the dumpdev via env e.g. loader.conf provides the ability to
configure the kernel dump device during early boot. When using this
g_io_getattr was returning EPERM due to cp->acr == 0.

Fix this by calling g_access to ensure we're a read consumer prior
to calling g_dev_setdumpdev.

MFC after: 2 weeks
Sponsored by: Multiplay

8 years agoSimplify man-makefile-update target.
jkim [Tue, 17 Nov 2015 20:47:16 +0000 (20:47 +0000)]
Simplify man-makefile-update target.

8 years agompsutil/mprutil: add flash subcommand
bapt [Tue, 17 Nov 2015 20:42:59 +0000 (20:42 +0000)]
mpsutil/mprutil: add flash subcommand

the flash subcommand allows to save/update firmware and bios for LSI Fusion-MPT
2/3 controllers (mps(4) and mpr(4))

Tested by: allanjude
Reviewed by: wblock (manpage)
Relnotes: yes
Sponsored by: Gandi.net
Differential Revision: https://reviews.freebsd.org/D4026

8 years agoFix dynamic IPv6 rules showing junk for non-specified address masks.
bdrewery [Tue, 17 Nov 2015 20:42:08 +0000 (20:42 +0000)]
Fix dynamic IPv6 rules showing junk for non-specified address masks.

For example:
  00002      0         0 (19s) PARENT 1 tcp 10.10.0.5 0 <-> 0.0.0.0 0
  00002      4       412 (1s) LIMIT tcp 10.10.0.5 25848 <-> 10.10.0.7 22
  00002     10       777 (1s) LIMIT tcp 2001:894:5a24:653::503:1 52023 <-> 2001:894:5a24:653:ca0a:a9ff:fe04:3978 22
  00002      0         0 (17s) PARENT 1 tcp 2001:894:5a24:653::503:1 0 <-> 80f3:70d:23fe:ffff:1005:: 0

Fix this by zeroing the unused address, as is done for IPv4:
  00002     0         0 (18s) PARENT 1 tcp 10.10.0.5 0 <-> 0.0.0.0 0
  00002    36     14952 (1s) LIMIT tcp 10.10.0.5 25848 <-> 10.10.0.7 22
  00002     0         0 (0s) PARENT 1 tcp 2001:894:5a24:653::503:1 0 <-> :: 0
  00002     4       345 (274s) LIMIT tcp 2001:894:5a24:653::503:1 34131 <-> 2001:470:1f11:262:ca0a:a9ff:fe04:3978 22

MFC after: 2 weeks

8 years agoRegister our FC4 Features in SNS.
mav [Tue, 17 Nov 2015 19:57:49 +0000 (19:57 +0000)]
Register our FC4 Features in SNS.

8 years agoFix two spelling errors
eadler [Tue, 17 Nov 2015 19:43:40 +0000 (19:43 +0000)]
Fix two spelling errors

8 years agoFix typo
bapt [Tue, 17 Nov 2015 19:40:48 +0000 (19:40 +0000)]
Fix typo

Submitted by: ngie

8 years agoMove recently added entry above the "old" line.
jhb [Tue, 17 Nov 2015 19:03:55 +0000 (19:03 +0000)]
Move recently added entry above the "old" line.

8 years agoFix 'make depend'
uqs [Tue, 17 Nov 2015 18:28:56 +0000 (18:28 +0000)]
Fix 'make depend'

8 years agoCosmetic addition to r290993.
mav [Tue, 17 Nov 2015 16:46:05 +0000 (16:46 +0000)]
Cosmetic addition to r290993.

8 years agoUnify and cleanup FC ports scan.
mav [Tue, 17 Nov 2015 16:33:46 +0000 (16:33 +0000)]
Unify and cleanup FC ports scan.

8 years agoMake native page table access endian-safe. Even on CPUs running in
nwhitehorn [Tue, 17 Nov 2015 16:09:26 +0000 (16:09 +0000)]
Make native page table access endian-safe. Even on CPUs running in
little-endian mode, the hardware page table is big-endian. This is a
no-op on all currently supported systems.

MFC after: 1 month

8 years agoWhere appropriate, use the endian-flipping OF_getencprop() instead of
nwhitehorn [Tue, 17 Nov 2015 16:07:43 +0000 (16:07 +0000)]
Where appropriate, use the endian-flipping OF_getencprop() instead of
OF_getprop() to get encode-int encoded values from the OF tree. This is
a no-op at present, since all existing PowerPC ports are big-endian, but
it is a correctness improvement and will be required if we have a
little-endian kernel at some future point.

Where it is totally impossible for the code ever to be used on a
little-endian system (much of powerpc/powermac, for instance), I have not
necessarily made the appropriate changes.

MFC after: 1 month

8 years agoImplement the sadb_x_policy_priority field as it is done in Linux:
fabient [Tue, 17 Nov 2015 14:39:33 +0000 (14:39 +0000)]
Implement the sadb_x_policy_priority field as it is done in Linux:
lower priority policies are inserted first.

Submitted by: Emeric Poupon <emeric.poupon@stormshield.eu>
Reviewed by: ae
Sponsored by: Stormshield

8 years agoOff-by-one correctiont to r290980.
mav [Tue, 17 Nov 2015 14:22:56 +0000 (14:22 +0000)]
Off-by-one correctiont to r290980.

8 years agoMake firmware handle virtual ports SNS logins for us.
mav [Tue, 17 Nov 2015 14:13:55 +0000 (14:13 +0000)]
Make firmware handle virtual ports SNS logins for us.

8 years agoMake PCB structure binary compatible for old and new PMAP on ARM
zbb [Tue, 17 Nov 2015 13:09:51 +0000 (13:09 +0000)]
Make PCB structure binary compatible for old and new PMAP on ARM

This structure must be binary compatible regardless of PMAP
version being used. Create reserved section for NEW_PMAP to
make other variables be placed exactly in the same memory
addresses. This fixes kgdb/gdb behavoiur, which uses pcb.h stuctures.
The NEW_PMAP is kernel flag, so it does not propagate to the buildworld,
what makes the tools using pcb.h unable to parse PCB data.

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

8 years agoAdd real initial support for RQSTYPE_RPT_ID_ACQ.
mav [Tue, 17 Nov 2015 13:02:44 +0000 (13:02 +0000)]
Add real initial support for RQSTYPE_RPT_ID_ACQ.

8 years agoFix buffer overflow in exynos5_ehci
zbb [Tue, 17 Nov 2015 12:50:45 +0000 (12:50 +0000)]
Fix buffer overflow in exynos5_ehci

Use proper size of exynos_ehci_softc, not the generic one.

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

8 years agoinstall(1) is following symlinks when installing a files, which result in
bapt [Tue, 17 Nov 2015 12:18:57 +0000 (12:18 +0000)]
install(1) is following symlinks when installing a files, which result in
inconsistency when installing new locales and may also result in failures
when reinstalling after having run make delete-old (due to previous
inconsistencies) for now recommand removing all locales until install(1) is
fixed

8 years agoJSON doesn't permit a hexadecimal notation of an integer.
ume [Tue, 17 Nov 2015 12:09:57 +0000 (12:09 +0000)]
JSON doesn't permit a hexadecimal notation of an integer.

8 years agoMake pl310_print_config static, it's not called out of pl310.c
andrew [Tue, 17 Nov 2015 11:26:35 +0000 (11:26 +0000)]
Make pl310_print_config static, it's not called out of pl310.c

Sponsored by: ABT Systems Ltd

8 years agoTake maintainership of nis(8) and yp(8), Pre-commit review
araujo [Tue, 17 Nov 2015 01:45:24 +0000 (01:45 +0000)]
Take maintainership of nis(8) and yp(8), Pre-commit review
requested.

Approved by: bapt (mentor)
Differential Revision: D4118

8 years agomnt_stat.f_iosize (which is used to set bo_bsize) must be set to
rmacklem [Tue, 17 Nov 2015 01:44:26 +0000 (01:44 +0000)]
mnt_stat.f_iosize (which is used to set bo_bsize) must be set to
the largest size of buffer cache block or the mapping of the buffer
is bogus. When a mount with rsize=4096,wsize=4096 was done, f_iosize
would be set to 4096. This resulted in corrupted directory data, since
the buffer cache block size for directories is NFS_DIRBLKSIZ (8192).
This patch fixes the code so that it always sets f_iosize to at least
NFS_DIRBLKSIZ.

Tested by: krichy@cflinux.hu
PR: 177971
MFC after: 2 weeks

8 years ago- Fix directory name for pf.
glebius [Tue, 17 Nov 2015 01:01:03 +0000 (01:01 +0000)]
- Fix directory name for pf.
- Recommend my reviews for CARP.

8 years agoUse -n to ln(1) which is compatible with GNU ln(1).
bdrewery [Mon, 16 Nov 2015 23:27:44 +0000 (23:27 +0000)]
Use -n to ln(1) which is compatible with GNU ln(1).

Sponsored by: EMC / Isilon Storage Division

8 years agoWhen the smbfs iod thread (smb_iod_thread()) is shutting down, smb_iod_destroy()
rmacklem [Mon, 16 Nov 2015 23:19:53 +0000 (23:19 +0000)]
When the smbfs iod thread (smb_iod_thread()) is shutting down, smb_iod_destroy()
would call smb_iod_request(). This call could return as soon as the
wakeup(evp) in smb_iod_main() call is done and then could destroy
the mutexes. This caused a race with the rest of smb_iod_main()s
use of these mutexes.
A crash reported on freebsd-stable@ by Christian Kratzer was
diagnosed as a use of one of these mutexes after it was destroyed.
This patch moves destruction of the mutexes from smb_iod_destroy()
to the end of smb_iod_thread(), so that they aren't destroyed before
the thread is done with them. Christian comfirmed that the patch
stopped the crashes from happening.

Reported by: ck-lists@cksoft.de (Christian Kratzer)
Tested by: ck-lists@cksoft.de (Christian Kratzer)
Diagnosed by: jhb
Reviewed by: jhb
MFC after: 2 weeks

8 years ago- Unbreak dumpsys(9) on sparc64 after r276772
marius [Mon, 16 Nov 2015 23:02:33 +0000 (23:02 +0000)]
- Unbreak dumpsys(9) on sparc64 after r276772
- While at it, arrange #ifndefs in kern_dump.c more intelligently; it's
  rather confusing to have multiple competing and/or unused functions in
  the kernel.

8 years agoDefault MK_META_MODE from MK_DIRDEPS_BUILD
sjg [Mon, 16 Nov 2015 22:50:23 +0000 (22:50 +0000)]
Default MK_META_MODE from MK_DIRDEPS_BUILD

This allows most of the build to simply consider MK_META_MODE

Update to latest dirdeps.mk so we can do:

make -f dirdeps.mk bin/cat.i386

Reviewed by: bdrewery

8 years agoRemove redundant copies of CDDL_CFLAGS.
imp [Mon, 16 Nov 2015 22:37:28 +0000 (22:37 +0000)]
Remove redundant copies of CDDL_CFLAGS.

8 years agoI'm still interested in reviewing any code changes to lpr & friends
gad [Mon, 16 Nov 2015 22:08:49 +0000 (22:08 +0000)]
I'm still interested in reviewing any code changes to lpr & friends
    (lpc, lpd, lpq, etc).

8 years agowpi(4): import r289674
avos [Mon, 16 Nov 2015 21:55:11 +0000 (21:55 +0000)]
wpi(4): import r289674

Switch PCI register reads from using magic numbers to using the names
defined in pcireg.h

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

8 years agoOnly use a power of 2 for the number of receive and transmit queues.
jhb [Mon, 16 Nov 2015 21:36:50 +0000 (21:36 +0000)]
Only use a power of 2 for the number of receive and transmit queues.
Using other values causes VMXNET3_CMD_ENABLE to fail.  The Linux
driver also enforces this restriction.

Reviewed by: bryanv
MFC after: 1 week
Sponsored by: Norse
Differential Revision: https://reviews.freebsd.org/D4139

8 years agoRemove duplicate manual pages.
jkim [Mon, 16 Nov 2015 21:36:15 +0000 (21:36 +0000)]
Remove duplicate manual pages.

Reported by: brd

8 years agoWith r290566 in place it turned out that WOL previously only worked by
marius [Mon, 16 Nov 2015 21:13:57 +0000 (21:13 +0000)]
With r290566 in place it turned out that WOL previously only worked by
accident with RTL8168G and later chips when the interface actually was
brought up. This is due to the fact that with these MAC variants, RXDV
gate needs be disabled for WOL to work. So do just that in re_setwol()
when IFCAP_WOL is requested.
Reported and tested by: dhw

MFC after: 3 days

8 years agoRevert r290944. It was wrong.
bdrewery [Mon, 16 Nov 2015 21:05:38 +0000 (21:05 +0000)]
Revert r290944. It was wrong.

8 years agoFix error case for bmake to echo 0.
bdrewery [Mon, 16 Nov 2015 20:31:00 +0000 (20:31 +0000)]
Fix error case for bmake to echo 0.

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

8 years agoAvoid FSCHG for INSTALL_AS_USER as well.
bdrewery [Mon, 16 Nov 2015 20:18:38 +0000 (20:18 +0000)]
Avoid FSCHG for INSTALL_AS_USER as well.

PR: 194189
X-MFC-With: r290628
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division