]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoAvoid -Wmissing-initializer
fanf [Thu, 3 Dec 2015 14:32:54 +0000 (14:32 +0000)]
Avoid -Wmissing-initializer

8 years agoUpdate to upstream version 2.11
fanf [Thu, 3 Dec 2015 14:21:55 +0000 (14:21 +0000)]
Update to upstream version 2.11

Improved #if expression evaluator and safer modify-in-place.

Obtained from: http://dotat.at/prog/unifdef
MFC after: 1 week

8 years agourtwn(4): move duplicate code from urtwn_(r92c/r88e)_dma_init()
avos [Thu, 3 Dec 2015 14:17:28 +0000 (14:17 +0000)]
urtwn(4): move duplicate code from urtwn_(r92c/r88e)_dma_init()
to urtwn_dma_init() (noop).

Reviewed by: kevlo
Approved by: adrian (mentor, implicit)
Differential Revision: https://reviews.freebsd.org/D4271

8 years agoUpdated the mlx4 and mlxen drivers to the latest version, v2.1.6:
hselasky [Thu, 3 Dec 2015 13:29:20 +0000 (13:29 +0000)]
Updated the mlx4 and mlxen drivers to the latest version, v2.1.6:
- Added support for dumping the SFP EEPROM content to dmesg.
- Fixed handling of network interface capability IOCTLs.
- Fixed race when loading and unloading the mlxen driver by applying
  appropriate locking.
- Removed two unused C-files.

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

8 years agoAdd some structures and defines which will be used when decoding small
hselasky [Thu, 3 Dec 2015 12:51:54 +0000 (12:51 +0000)]
Add some structures and defines which will be used when decoding small
form factor, SFF, standards compliant ethernet EEPROMs.

MFC after: 1 week
Obtained from: Linux
Sponsored by: Mellanox Technologies

8 years agoreadelf: add Xen ELF notes
emaste [Thu, 3 Dec 2015 12:21:18 +0000 (12:21 +0000)]
readelf: add Xen ELF notes

Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4356

8 years agonewvers: Honour SOURCE_DATE_EPOCH as a build reproducibility measure
emaste [Thu, 3 Dec 2015 12:17:09 +0000 (12:17 +0000)]
newvers: Honour SOURCE_DATE_EPOCH as a build reproducibility measure

One reason the kernel does not build reproducibly is that it includes
a timestamp in the version string. SOURCE_DATE_EPOCH provides a standard
method to address this: it should be set to the last modification time
of the source, and build processes use the specified timestamp instead
of the "current" date and time.

This change uses SOURCE_DATE_EPOCH if it is set; how it gets set needs
to be addressed elsewhere.

Reviewed by: bapt
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

8 years agoRemove incorrect defines. The proper version of these macros is
hselasky [Thu, 3 Dec 2015 11:45:12 +0000 (11:45 +0000)]
Remove incorrect defines. The proper version of these macros is
defined in linux/etherdevice.h.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoAdd support for a generic AHCI attachment. This allows us to attach to a
andrew [Thu, 3 Dec 2015 11:24:11 +0000 (11:24 +0000)]
Add support for a generic AHCI attachment. This allows us to attach to a
typically memory mapped bus, for example on the AMD Opteron A1100 the AHCI
device is mapped in the CPUs address space, and not through a PCI
controller.

Further work is needed for this to work with ACPI as this is expected to be
common on ARMv8 servers.

Reviewed by: mav, mmel
Obtained from: mmel, ABT Systems Ltd
Relnotes: yes
Sponsored by: SoftIron Inc
Differential Revision: https://reviews.freebsd.org/D4269

8 years agoFor amd64 non-PCID machines, and for i386 machines with support for
kib [Thu, 3 Dec 2015 11:14:14 +0000 (11:14 +0000)]
For amd64 non-PCID machines, and for i386 machines with support for
the PG_G global pte flag, pmap_invalidate_all() fails to flush global
TLB entries [*].  This is because TLB shootdown handler for such
configs reloads CR3, and on i386 pmap_invalidate_all() does the same
for the initiating CPU.  Note that current code does not issue total
invalidation requests for the kernel_pmap.

Rename amd64 function invltlb_globpcid() to invltlb_glob(), it is not
specific for PCID for quite some time, and implement the same
functionality for i386.  Use the function instead of invltlb() in
shootdown handlers and in i386 pmap_invalidate_all(), but only for the
kernel pmap (which maps pages with the PG_G attribute set), which
takes care of PG_G TLB entries on flush.

To detect the affected pmap in i386 TLB shootdown handler, pmap should
be passed to the smp_masked_invltlb() function, which makes amd64 and
i386 TLB shootdown code almost identical.  Merge the code under x86/.

Noted by: jhb [*]
Reviewed by: cem, jhb, pho
Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D4346

8 years agoIn the SandyBridge x2APIC workaround detection code, only fetch the
kib [Thu, 3 Dec 2015 10:59:10 +0000 (10:59 +0000)]
In the SandyBridge x2APIC workaround detection code, only fetch the
environment variable when SandyBridge CPU is detected.  Reduce code
duplication.

Sponsored by: The FreeBSD Foundation

8 years agoFix build for !TCP_OFFLOAD case.
kib [Thu, 3 Dec 2015 10:33:57 +0000 (10:33 +0000)]
Fix build for !TCP_OFFLOAD case.

8 years agoUpdate the mlx5en(4) manual page.
hselasky [Thu, 3 Dec 2015 10:17:01 +0000 (10:17 +0000)]
Update the mlx5en(4) manual page.

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

8 years agoAdd glue driver for Amlogic Meson Gigabit Ethernet Controller
ganbold [Thu, 3 Dec 2015 09:37:20 +0000 (09:37 +0000)]
Add glue driver for Amlogic Meson Gigabit Ethernet Controller
and enable it for Odroid C1 board.
Together with r291676 change, dwc(4) can receive packets now.

8 years agosfxge: regenerate MCDI headers
arybchik [Thu, 3 Dec 2015 08:06:10 +0000 (08:06 +0000)]
sfxge: regenerate MCDI headers

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agoFix a typo in a comment (spacial -> special)
ngie [Thu, 3 Dec 2015 07:42:00 +0000 (07:42 +0000)]
Fix a typo in a comment (spacial -> special)

Sponsored by: EMC / Isilon Storage Division

8 years agosfxge: remove internal register definitions that should not be used by host code
arybchik [Thu, 3 Dec 2015 07:28:57 +0000 (07:28 +0000)]
sfxge: remove internal register definitions that should not be used by host code

Submitted by:   Guido Barzini <gbarzini at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: add markers for autogenerated defines
arybchik [Thu, 3 Dec 2015 07:24:59 +0000 (07:24 +0000)]
sfxge: add markers for autogenerated defines

Move use defines outside.

Submitted by:   Guido Barzini <gbarzini at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: sync TLV layout headers with firmwaresrc for event merging config
arybchik [Thu, 3 Dec 2015 07:22:53 +0000 (07:22 +0000)]
sfxge: sync TLV layout headers with firmwaresrc for event merging config

Submitted by:   Tom Millington <tmillington at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: add MCDI logging support to common code
arybchik [Thu, 3 Dec 2015 07:13:13 +0000 (07:13 +0000)]
sfxge: add MCDI logging support to common code

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4331

8 years agoDisable EEE(Energy Efficient Ethernet) for RTL8211F PHY.
yongari [Thu, 3 Dec 2015 05:27:39 +0000 (05:27 +0000)]
Disable EEE(Energy Efficient Ethernet) for RTL8211F PHY.
It seems the EEE made RX MAC enter LPI(Low Power Idle) mode such
that dwc(4) was not able to receive packets.  Ideally dwc(4) should
be able to use EEE to save power during periods of low link
utilization(i.e. gating off clock).  Due to lack of dwc(4)
datasheet it's not easy to take required steps for EEE on LPI
enter/exit events.  Disabling EEE in PHY seems to be easy
workaround until dwc(4) supports EEE.

Updating EEE advertisement register on RTL8211F seems to have no
effect until reprogramming MII_ANAR, MII_100T2CR and MII_BMCR
with auto-negotiation. It's not clear whether it's related with
mii_phy_reset()'s BMCR_ISO handling for RTL8211F though.
It seems rgephy_reset() needs careful investigation for newer
RealTek PHYs.

Ganbold submitted working version based on NetBSD change and
tested lots of changes I made. Thanks a lot!

Submitted by: ganbold (initial version)
In collaboration with: ganbold

8 years agoWe need to zero out the union of pointers in a freed vnode structure.
mckusick [Thu, 3 Dec 2015 02:04:22 +0000 (02:04 +0000)]
We need to zero out the union of pointers in a freed vnode structure.

PR:        204949
Fix from:  Mateusz Guzik
Tested by: Jason Unovitch

8 years agoProvide support for ELFv2 userland if using a newer compiler (recent clang
nwhitehorn [Thu, 3 Dec 2015 00:10:57 +0000 (00:10 +0000)]
Provide support for ELFv2 userland if using a newer compiler (recent clang
or gcc) and binutils >= 2.24. Not enabled by default.

8 years agoClean up PowerPC bootloader compiler flags to fix the build with GCC 5.2
nwhitehorn [Thu, 3 Dec 2015 00:08:50 +0000 (00:08 +0000)]
Clean up PowerPC bootloader compiler flags to fix the build with GCC 5.2
and binutils 2.25.

8 years agoFix build on GCC 5.2 where, at least on PPC64, the compiler would "optimize"
nwhitehorn [Thu, 3 Dec 2015 00:06:59 +0000 (00:06 +0000)]
Fix build on GCC 5.2 where, at least on PPC64, the compiler would "optimize"
the malloc() + memset() in the local implementation of calloc() into a call
to calloc(), helpfully turning it into an infinite loop. Clean up some
unneeded flags on PPC64 while here.

MFC after: 1 month

8 years agoAdd support for configuring additional virtual interfaces (VIs) on a port.
jhb [Thu, 3 Dec 2015 00:02:01 +0000 (00:02 +0000)]
Add support for configuring additional virtual interfaces (VIs) on a port.

Each virtual interface has its own MAC address, queues, and statistics.
The dedicated netmap interfaces (ncxgbeX / ncxlX) were already implemented
as additional VIs on each port.  This change allows additional non-netmap
interfaces to be configured on each port.  Additional virtual interfaces
use the naming scheme vcxgbeX or vcxlX.

Additional VIs are enabled by setting the hw.cxgbe.num_vis tunable to a
value greater than 1 before loading the cxgbe(4) or cxl(4) driver.
NB: The first VI on each port is the "main" interface (cxgbeX or cxlX).

T4/T5 NICs provide a limited number of MAC addresses for each physical port.
As a result, a maximum of six VIs can be configured on each port (including
the "main" interface and the netmap interface when netmap is enabled).

One user-visible result is that when netmap is enabled, packets received
or transmitted via the netmap interface are no longer counted in the stats
for the "main" interface, but are not accounted to the netmap interface.

The netmap interfaces now also have a new-bus device and export various
information sysctl nodes via dev.n(cxgbe|cxl).X.

The cxgbetool 'clearstats' command clears the stats for all VIs on the
specified port along with the port's stats.  There is currently no way to
clear the stats of an individual VI.

Reviewed by: np
MFC after: 1 month
Sponsored by: Chelsio

8 years agoMinor cleanup. No functional change.
tuexen [Wed, 2 Dec 2015 22:44:42 +0000 (22:44 +0000)]
Minor cleanup. No functional change.

MFC after: 1 week

8 years agopw_checkname since the beginning if too strict on GECOS field,
bapt [Wed, 2 Dec 2015 22:35:25 +0000 (22:35 +0000)]
pw_checkname since the beginning if too strict on GECOS field,
relax it a bit so gecos can be used to store multibytes data.

This was unseen before FreeBSD 10.2 as this validation function was motly unused
since FreeBSD 10.2 the usage of this function has been generalized to improve
validation.

Reported by: des
MFC after: 1 week

8 years agoFix handling of numeric-only names with pw lock
bapt [Wed, 2 Dec 2015 22:01:37 +0000 (22:01 +0000)]
Fix handling of numeric-only names with pw lock
Add a regression test about it

PR: 204968
MFC after: 1 week

8 years agoAdd initial support for 16Gbps FC QLogic chips.
mav [Wed, 2 Dec 2015 20:22:50 +0000 (20:22 +0000)]
Add initial support for 16Gbps FC QLogic chips.

I still don't know how to read NVRAM there, so WWNs and other parameters
are incorrect, but other then that driver seems like attaching normally.

8 years agoThe cdevpriv_dtr_t typedef was not able to be used in a function prototype
jhb [Wed, 2 Dec 2015 18:27:30 +0000 (18:27 +0000)]
The cdevpriv_dtr_t typedef was not able to be used in a function prototype
like the various d_*_t typedefs since it declared a function pointer rather
than a function.  Add a new d_priv_dtor_t typedef that declares the function
and can be used as a function prototype.  The previous typedef wasn't
useful outside of the cdevpriv implementation, so retire it.

The name d_priv_dtor_t was chosen to be more consistent with cdev methods
since it is commonly used in place of d_close_t even though it is not a
direct pointer in struct cdevsw.

Reviewed by: kib, imp
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D4340

8 years agoAdjust the MTU when accepting an SCTP association using
tuexen [Wed, 2 Dec 2015 16:29:36 +0000 (16:29 +0000)]
Adjust the MTU when accepting an SCTP association using
UDP encapsulation.

MFC after: 1 week

8 years agoARM: Define PCI_RES_BUS resource for platforms having NEW_PCIB enabled.
mmel [Wed, 2 Dec 2015 14:24:14 +0000 (14:24 +0000)]
ARM: Define PCI_RES_BUS resource for platforms having NEW_PCIB enabled.

Approved by: kib (mentor)

8 years agoARM: Fix of detection of root interrupt controller.
mmel [Wed, 2 Dec 2015 14:22:58 +0000 (14:22 +0000)]
ARM: Fix of detection of root interrupt controller.
This fixes detection of root interrupt controller for cases,
when interrupt parent is not defined at all or it's not defined directly
in controller node.

Approved by: kib (mentor)

8 years agoOFW: Move code for searching interrupt parent into separate function.
mmel [Wed, 2 Dec 2015 14:21:16 +0000 (14:21 +0000)]
OFW: Move code for searching interrupt parent into separate function.
It can be used by interrupt controller drivers.

Approved by: kib (mentor)

8 years agoMove RTF_PINNED handling to generic route code.
melifaro [Wed, 2 Dec 2015 08:17:31 +0000 (08:17 +0000)]
Move RTF_PINNED handling to generic route code.
This eliminates last RTF_RNH_LOCKED rtrequest1_fib() user.

8 years agoAdd initial ar9300 HAL support for the spectral scan mode.
adrian [Wed, 2 Dec 2015 05:36:45 +0000 (05:36 +0000)]
Add initial ar9300 HAL support for the spectral scan mode.

8 years agoUpdate arcmsr(4) to 1.30.00.00 in order to add support of
delphij [Wed, 2 Dec 2015 05:35:04 +0000 (05:35 +0000)]
Update arcmsr(4) to 1.30.00.00 in order to add support of
ARC-1203 SATA RAID controllers.

Many thanks to Areca for continuing to support FreeBSD.

Submitted by: 黃清隆 <ching2048 areca com tw>
MFC after: 2 weeks

8 years agoMETA MODE: Connect MK_NAND directories.
bdrewery [Wed, 2 Dec 2015 05:31:01 +0000 (05:31 +0000)]
META MODE: Connect MK_NAND directories.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd LIBNANDFS.
bdrewery [Wed, 2 Dec 2015 05:23:12 +0000 (05:23 +0000)]
Add LIBNANDFS.

Sponsored by: EMC / Isilon Storage Division

8 years agoFix the memory leak that occurs when the nfscommon.ko module is unloaded.
rmacklem [Wed, 2 Dec 2015 02:47:13 +0000 (02:47 +0000)]
Fix the memory leak that occurs when the nfscommon.ko module is unloaded.
This leak was introduced by r291527.
Since the nfscommon.ko module is rarely unloaded, this leak would not
have been much of an issue.

MFC after: 2 weeks

8 years agoFix the build for non-amd64.
bdrewery [Wed, 2 Dec 2015 02:11:38 +0000 (02:11 +0000)]
Fix the build for non-amd64.

8 years agobsd.subdir.mk: Only recurse on called targets, rather than dependencies.
bdrewery [Wed, 2 Dec 2015 01:50:22 +0000 (01:50 +0000)]
bsd.subdir.mk: Only recurse on called targets, rather than dependencies.

This is to fix 'make all' causing it to recurse on both 'all' and 'buildconfig'
due to 'buildconfig' being in ALL_SUBDIR_TARGETS and being a dependency of
'all'.

This now adds all of the '*includes', '*files' targets as subdir targets,
allowing them to recurse.

This also removes the need for some 'realinstall' hacks in bsd.subdir.mk since
it no longer recurses; only 'install' will recurse and call the proper
'beforeinstall', 'realinstall', and 'afterinstall' in each sub-directory.

This fixes 'make includes' and 'make files' to not be a rerolled ${MAKE}
sub-shell but to rather just recurse on 'inclues' and 'files'.  This avoids
various issues such as the one fixed in r289462.  As such revert Makefile.inc1
back to using 'includes' which avoids an extra tree walk and parallelizes
the includes phases better.

Makefile.inc1 includes a guard so that 'make all' will not use SUBDIR_PARALLEL,
added in r289438.  This is so users do not get a probably broken build if they
run 'make all' from the top-level.  Before the change in this commit, the
workaround for 'make everything' was 'par-all' which would depend on 'all' and
cause a proper parallel recursion.  Now that will not work so a new
_PARALLEL_SUBUDIR_OK is used to allow it.

This is still part of an effort to combine bsd.(files|incs|confs).mk and move
some of its logic out of bsd.subdir.mk, as attempted in r289282 and reverted in
r289331.  This commit fixes the problems found there which was mostly double
recursing during 'includes' which would recurse on itself and 'buildincludes'
and 'installincludes', all in parallel.  The logic is still in bsd.subdir.mk
for now.

I've been cautious about this commit but have experienced no breakage on the
tree except for the 'par-all' case which was already a hack.  If something foo
is depending on something bar that should recurse, it is very likely that the
foo target is being recursed on already meaning that bar will still effectively
recurse once sub-directories call foo.

Discussed on: arch@
MFC after: never
Sponsored by: EMC / Isilon Storage Division

8 years agoRevert r291633. Some files were missed.
bdrewery [Wed, 2 Dec 2015 01:49:22 +0000 (01:49 +0000)]
Revert r291633. Some files were missed.

8 years agobsd.subdir.mk: Only recurse on called targets, rather than dependencies.
bdrewery [Wed, 2 Dec 2015 01:47:27 +0000 (01:47 +0000)]
bsd.subdir.mk: Only recurse on called targets, rather than dependencies.

This is to fix 'make all' causing it to recurse on both 'all' and 'buildconfig'
due to 'buildconfig' being in ALL_SUBDIR_TARGETS and being a dependency of
'all'.

This now adds all of the '*includes', '*files' targets as subdir targets,
allowing them to recurse.

This also removes the need for some 'realinstall' hacks in bsd.subdir.mk since
it no longer recurses; only 'install' will recurse and call the proper
'beforeinstall', 'realinstall', and 'afterinstall' in each sub-directory.

This fixes 'make includes' and 'make files' to not be a rerolled ${MAKE}
sub-shell but to rather just recurse on 'inclues' and 'files'.  This avoids
various issues such as the one fixed in r289462.  As such revert Makefile.inc1
back to using 'includes' which avoids an extra tree walk and parallelizes
the includes phases better.

Makefile.inc1 includes a guard so that 'make all' will not use SUBDIR_PARALLEL,
added in r289438.  This is so users do not get a probably broken build if they
run 'make all' from the top-level.  Before the change in this commit, the
workaround for 'make everything' was 'par-all' which would depend on 'all' and
cause a proper parallel recursion.  Now that will not work so a new
_PARALLEL_SUBUDIR_OK is used to allow it.

This is still part of an effort to combine bsd.(files|incs|confs).mk and move
some of its logic out of bsd.subdir.mk, as attempted in r289282 and reverted in
r289331.  This commit fixes the problems found there which was mostly double
recursing during 'includes' which would recurse on itself and 'buildincludes'
and 'installincludes', all in parallel.  The logic is still in bsd.subdir.mk
for now.

I've been cautious about this commit but have experienced no breakage on the
tree except for the 'par-all' case which was already a hack.  If something foo
is depending on something bar that should recurse, it is very likely that the
foo target is being recursed on already meaning that bar will still effectively
recurse once sub-directories call foo.

Discussed on: arch@
MFC after: never
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd assertions that capture invalid configurations for new libraries.
bdrewery [Wed, 2 Dec 2015 01:24:31 +0000 (01:24 +0000)]
Add assertions that capture invalid configurations for new libraries.

Fix current findings, which should fix cases of NO_SHARED not building
properly.

Given libfoo:
 - Ensure that a LIBFOO is set.  For INTERNALLIBS advise setting this in
   src.libnames.mk, otherwise bsd.libnames.mk.
 - Ensure that a LIBFOODIR is properly set.
 - Ensure that _DP_foo is set and matches the LIBADD in the build of foo's own
   Makefile

Sponsored by: EMC / Isilon Storage Division

8 years agoDon't overlink pthread to kerberos library consumers.
bdrewery [Wed, 2 Dec 2015 01:23:16 +0000 (01:23 +0000)]
Don't overlink pthread to kerberos library consumers.

I'm not sure why this was here, none of these use pthread themselves and
none of the consumers are broken with removing this.

Sponsored by: EMC / Isilon Storage Division

8 years agoDon't overlink pthread to libsqlite3 consumers.
bdrewery [Wed, 2 Dec 2015 01:17:09 +0000 (01:17 +0000)]
Don't overlink pthread to libsqlite3 consumers.

At least usr.bin/mandoc was overlink.

Sponsored by: EMC / Isilon Storage Division

8 years agoFix truncation of _DP_proc and add missing libelf.
bdrewery [Wed, 2 Dec 2015 00:54:05 +0000 (00:54 +0000)]
Fix truncation of _DP_proc and add missing libelf.

Sponsored by: EMC / Isilon Storage Division

8 years agoReduce overlinking of libdtrace consumers with libctf, libelf, libproc.
bdrewery [Wed, 2 Dec 2015 00:49:49 +0000 (00:49 +0000)]
Reduce overlinking of libdtrace consumers with libctf, libelf, libproc.

The proper place for this list is _DP_dtrace.

Due to removing the LDADD_dtrace, more LIBADD are needed in
cddl/usr.sbin/dtrace to prevent underlinking.

This fixes overlinking in cddl/usr.sbin/lockstat and
cddl/usr.sbin/plockstat.

Sponsored by: EMC / Isilon Storage Division

8 years agoFully connect cddl/usr.sbin/plockstat.
bdrewery [Wed, 2 Dec 2015 00:49:45 +0000 (00:49 +0000)]
Fully connect cddl/usr.sbin/plockstat.

There seems to be no reason to keep this so private.

Also add missing optional MK_CDDL files.

Sponsored by: EMC / Isilon Storage Division

8 years agoDon't overlink libmt consumers with libsbuf.
bdrewery [Wed, 2 Dec 2015 00:49:42 +0000 (00:49 +0000)]
Don't overlink libmt consumers with libsbuf.

This change came in r281332 which was reducing overlinking in mt(1) but
currently mt(1) is linked with sbuf when it does not need it due to the
LDADD_mt+=${LDADD_sbuf}.  Only libmt needs sbuf.

Add sbuf to _DP_mt so static linkage of libmt picks it up.

Sponsored by: EMC / Isilon Storage Division

8 years agolibssh uses libz even without MK_LDNS
bdrewery [Wed, 2 Dec 2015 00:49:39 +0000 (00:49 +0000)]
libssh uses libz even without MK_LDNS

Sponsored by: EMC / Isilon Storage Division

8 years agoRevert incomplete r291623.
bdrewery [Wed, 2 Dec 2015 00:17:13 +0000 (00:17 +0000)]
Revert incomplete r291623.

8 years agoAdd assertions that capture invalid configurations for new libraries.
bdrewery [Wed, 2 Dec 2015 00:01:09 +0000 (00:01 +0000)]
Add assertions that capture invalid configurations for new libraries.

Fix current findings.

Given libfoo:
 - Ensure that a LIBFOO is set.  For INTERNALLIBS advise setting this in
   src.libnames.mk, otherwise bsd.libnames.mk.
 - Ensure that a LIBFOODIR is properly set.
 - Ensure that _DP_foo is set and matches the LIBADD in the build of foo's own
   Makefile

Sponsored by: EMC / Isilon Storage Division

8 years agoFix build after r291620.
bdrewery [Tue, 1 Dec 2015 22:50:32 +0000 (22:50 +0000)]
Fix build after r291620.

  "don't know how to make /Versions.def. Stop"

This was trying to define a target in bsd.symver.mk based on LIBCDIR which was
not yet defined.  Switching the order of inclusion of bsd.prog.mk and
bsd.symver.mk fixes it and seems fine.

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

8 years agoDon't add LIBADD=ipf to libipf itself.
bdrewery [Tue, 1 Dec 2015 22:39:19 +0000 (22:39 +0000)]
Don't add LIBADD=ipf to libipf itself.

This had no real impact since libipf is a static INTERNALLIB.  It does conflict
with an assertion I am adding for LIBADD though.

Sponsored by: EMC / Isilon Storage Division

8 years agoDon't override LIB*DIR variables from src.libnames.mk.
bdrewery [Tue, 1 Dec 2015 22:20:04 +0000 (22:20 +0000)]
Don't override LIB*DIR variables from src.libnames.mk.

In some cases switch to the LIB*SRCDIR value.

These recently were defined in r291327 and r291619.

Sponsored by: EMC / Isilon Storage Division

8 years agoDefine a LIB*SRCDIR for all known _LIBRARIES.
bdrewery [Tue, 1 Dec 2015 22:19:17 +0000 (22:19 +0000)]
Define a LIB*SRCDIR for all known _LIBRARIES.

This is a follow-up to r291327 which added a LIB*DIR for all known
_LIBRARIES.

Sponsored by: EMC / Isilon Storage Division

8 years agoDon't override LIB*DIR variables from src.libnames.mk.
bdrewery [Tue, 1 Dec 2015 22:04:59 +0000 (22:04 +0000)]
Don't override LIB*DIR variables from src.libnames.mk.

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

8 years agoDon't override LIB*DIR variables from src.libnames.mk.
bdrewery [Tue, 1 Dec 2015 22:03:40 +0000 (22:03 +0000)]
Don't override LIB*DIR variables from src.libnames.mk.

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

8 years agoEnable libcrypt tests.
rodrigc [Tue, 1 Dec 2015 21:25:18 +0000 (21:25 +0000)]
Enable libcrypt tests.

kyua 0.12 has fix for https://github.com/jmmv/kyua/pull/148
which eliminates invalid XML characters from being written to test reports
with "kyua report-junit".

8 years agoHack test so that it works on FreeBSD.
rodrigc [Tue, 1 Dec 2015 21:22:29 +0000 (21:22 +0000)]
Hack test so that it works on FreeBSD.

8 years agoRestore cleaning of auto-generated kobj files after the recent MFILES
jhb [Tue, 1 Dec 2015 21:19:16 +0000 (21:19 +0000)]
Restore cleaning of auto-generated kobj files after the recent MFILES
changes.  Use the list of MFILES found by find to identify the set of
possible auto-generated files and add the intersection of this set and
SRCS to CLEANFILES.

Submitted by: imp (previous version), sbruno
Differential Revision: https://reviews.freebsd.org/D4336

8 years agoOnly include src.conf if _WITHOUT_SRCCONF not defined.
bdrewery [Tue, 1 Dec 2015 20:56:16 +0000 (20:56 +0000)]
Only include src.conf if _WITHOUT_SRCCONF not defined.

This does not really fix anything currently since _WITHOUT_SRCCONF must be
defined in the environment or local.sys.*.mk, but is proper and needed for
downstream fixes.  I am working towards reworking src.conf inclusion still.

Sponsored by: EMC / Isilon Storage Division

8 years agoSupport LOCAL_LIBRARIES for LIBADD.
bdrewery [Tue, 1 Dec 2015 20:50:14 +0000 (20:50 +0000)]
Support LOCAL_LIBRARIES for LIBADD.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd NO_INSTALLKERNEL to undo the assumption that the first KERNCONF will be
bdrewery [Tue, 1 Dec 2015 20:24:58 +0000 (20:24 +0000)]
Add NO_INSTALLKERNEL to undo the assumption that the first KERNCONF will be
installed as "kernel".  This is relevant for packaging of the kernel when
not wanting a default "kernel.txz".

Submitted by: Russell Cattelan <cattelan@thebarn.com>
MFC after: 2 weeks
Obtained from: OneFS
Sponsored by: EMC / Isilon Storage Division

8 years agoAllow storing package(world|kernel) tarballs into a different location at PACKAGEDIR.
bdrewery [Tue, 1 Dec 2015 19:58:08 +0000 (19:58 +0000)]
Allow storing package(world|kernel) tarballs into a different location at PACKAGEDIR.

Submitted by: Russell Cattelan <cattelan@thebarn.com>
Discussed with: gjb
MFC after: 2 weeks
Obtained from: OneFS
Sponsored by: EMC / Isilon Storage Division

8 years agoFix typos in error messages dealing with unknown groups/users
ngie [Tue, 1 Dec 2015 19:37:24 +0000 (19:37 +0000)]
Fix typos in error messages dealing with unknown groups/users

MFC after: 1 month
X-MFC with: r291447, r291452
Sponsored by: EMC / Isilon Storage Division

8 years agoFix spelling, as recommended by igor tool.
rodrigc [Tue, 1 Dec 2015 19:20:38 +0000 (19:20 +0000)]
Fix spelling, as recommended by igor tool.

8 years agoAdd more text to explain --libxo flag.
rodrigc [Tue, 1 Dec 2015 19:18:53 +0000 (19:18 +0000)]
Add more text to explain --libxo flag.

8 years agoFix errors being ignored in many phases of the build since the bmake integration.
bdrewery [Tue, 1 Dec 2015 19:00:43 +0000 (19:00 +0000)]
Fix errors being ignored in many phases of the build since the bmake integration.

Say it with me, "I will not chain commands with && in Makefiles"

This was originally fixed and explained quite well by bde@ in r36074.  The
initial bmake integration caused 'set -e' to stop being used which lead to
r252419.  Later 'set -e' expectations were fixed with bmake in r254980.

Because of the && here, errors would be ignored when building in parallel and
a dependency failed.  Such as bootstrap-tools since it builds everything in
parallel.  If any tool failed in obj/depend/all, it would just ignore the error
and continue to build.  This later would result in cascaded errors that only
confused the real issue.  This could also cause commands after the failed
command to still execute, leading to more confusion.

This should be fine if the command is in a sub-shell such as: (cmd1 && cmd2)

This reverts r252419.

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

8 years agoAdd missing LIB80211 entry for DPADD needs.
bdrewery [Tue, 1 Dec 2015 18:09:40 +0000 (18:09 +0000)]
Add missing LIB80211 entry for DPADD needs.

Sponsored by: EMC / Isilon Storage Division

8 years agoFix underlinking in lib80211 and define static dependencies in src.libnames.mk
bdrewery [Tue, 1 Dec 2015 17:38:52 +0000 (17:38 +0000)]
Fix underlinking in lib80211 and define static dependencies in src.libnames.mk
so NO_SHARED works properly.

Reported by: Manfred Antar <null@pozo.com>
Sponsored by: EMC / Isilon Storage Division

8 years agoNo trailing slash is needed here.
bdrewery [Tue, 1 Dec 2015 17:31:22 +0000 (17:31 +0000)]
No trailing slash is needed here.

8 years agoAllow loader to load 64-bit ELFv2 PowerPC kernels.
nwhitehorn [Tue, 1 Dec 2015 17:01:27 +0000 (17:01 +0000)]
Allow loader to load 64-bit ELFv2 PowerPC kernels.

8 years agoMissed header_supported call from r291020: make really, really sure the brand
nwhitehorn [Tue, 1 Dec 2015 17:00:31 +0000 (17:00 +0000)]
Missed header_supported call from r291020: make really, really sure the brand
likes the executable.

8 years agoModify the rctl rc script to add multiple rules in a single run.
trasz [Tue, 1 Dec 2015 16:42:39 +0000 (16:42 +0000)]
Modify the rctl rc script to add multiple rules in a single run.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoSome problems were introduced during the libxo-ification of vmstat, fix them
allanjude [Tue, 1 Dec 2015 16:31:07 +0000 (16:31 +0000)]
Some problems were introduced during the libxo-ification of vmstat, fix them

stop vmstat -i segfaulting
remove duplicate header from vmstat -i
do not pad the name of the interupt in encoded outputs
fix stray % and missing } in the header for vmstat -i
add outer container to vmstat -i
add missing xo_flush in vmstat -i (when run with an interval or delay)
add outer container to vmstat -m
do not pad the name of malloc areans
add outer container to vmstat -z
do not pad the name of memory zones

Reviewed by: rodrigc
Approved by: bapt (mentor)
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D4263

8 years agoCorrect r291591: Don't remove /usr/lib/libelf*, these are still installed.
bdrewery [Tue, 1 Dec 2015 16:16:40 +0000 (16:16 +0000)]
Correct r291591: Don't remove /usr/lib/libelf*, these are still installed.
Only the shared library moved to /lib.

X-MFC-With: r291566

8 years agoCorrect r291566 for defining SHLIBDIR.
bdrewery [Tue, 1 Dec 2015 16:08:38 +0000 (16:08 +0000)]
Correct r291566 for defining SHLIBDIR.

This must happen before including bsd.own.mk which sets the default to /usr/lib.

X-MFC-With: r291566
Reported by: Max N. Boyarov

8 years agoAt the time a destination or a gateway of `netstat -r'
ume [Tue, 1 Dec 2015 16:04:50 +0000 (16:04 +0000)]
At the time a destination or a gateway of `netstat -r'
protrudes its field, narrow the next field to raise
readability bit.

8 years agoFix removal of libelf.so.2 and add missing files for it.
bdrewery [Tue, 1 Dec 2015 15:55:20 +0000 (15:55 +0000)]
Fix removal of libelf.so.2 and add missing files for it.

X-MFC-With: r291566

8 years agosfxge: retry VF vAdaptor allocation if it fails because of no EVB port yet
arybchik [Tue, 1 Dec 2015 15:54:46 +0000 (15:54 +0000)]
sfxge: retry VF vAdaptor allocation if it fails because of no EVB port yet

After an MC reboot, a VF driver may reset before the PF driver has
finished bringing everything back up. This includes the VFs EVB port.
MC_CMD_VADAPTOR_ALLOC is the first MCDI call after an MC reboot to
require the EVB port, so if it fails with MC_CMD_ERR_NO_EVB_PORT,
retry the command a few times after waiting a while.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4333

8 years agoFAST_DEPEND: Actually use -MP from DEPEND_MP, completing r291554.
bdrewery [Tue, 1 Dec 2015 15:50:35 +0000 (15:50 +0000)]
FAST_DEPEND: Actually use -MP from DEPEND_MP, completing r291554.

X-MFC-With: r291554
MFC after: 1 week
Pointyhat to: bdrewery
Sponsored by: EMC / Isilon Storage Division

8 years agosfxge: add function to query link control privilege
arybchik [Tue, 1 Dec 2015 15:38:39 +0000 (15:38 +0000)]
sfxge: add function to query link control privilege

Make link control privilege visible to OS driver to guard updates to
flow control and PHY advertised capabilities.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4330

8 years agosfxge: FPGA and FPGA backup (diagnostic) partitions added to hunt_parttbl
arybchik [Tue, 1 Dec 2015 15:32:37 +0000 (15:32 +0000)]
sfxge: FPGA and FPGA backup (diagnostic) partitions added to hunt_parttbl

It allows manftest to program them.

Submitted by:   Paul Fox <pfox at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4329

8 years agosfxge: allow VFs to have locally administered MAC addresses
arybchik [Tue, 1 Dec 2015 15:29:51 +0000 (15:29 +0000)]
sfxge: allow VFs to have locally administered MAC addresses

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4328

8 years agosfxge: support MAC spoofing for 4.2.x firmare
arybchik [Tue, 1 Dec 2015 15:26:46 +0000 (15:26 +0000)]
sfxge: support MAC spoofing for 4.2.x firmare

Common code should infer other privileges from Admin privilege to
support firmware that pre-dates introduction of specific privilege
flags.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4327

8 years agosfxge: parse packets for TSO early in if_transmit
arybchik [Tue, 1 Dec 2015 14:55:24 +0000 (14:55 +0000)]
sfxge: parse packets for TSO early in if_transmit

Submitted by:   Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D4309

8 years agoFix rctl rule filters - eg the 'rctl -r :' case.
trasz [Tue, 1 Dec 2015 14:02:14 +0000 (14:02 +0000)]
Fix rctl rule filters - eg the 'rctl -r :' case.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoLoad our configuration before setting defaults, so local_unbound_workdir
des [Tue, 1 Dec 2015 13:20:21 +0000 (13:20 +0000)]
Load our configuration before setting defaults, so local_unbound_workdir
actually has an effect.

PR: 204931
Submitted by: Eugene Grosbein <eugen@grosbein.net>
MFC after: 1 week

8 years agoRework the exception entry/return functions to make them valid frames to be
andrew [Tue, 1 Dec 2015 12:37:04 +0000 (12:37 +0000)]
Rework the exception entry/return functions to make them valid frames to be
unwound through. For this we need the frame pointer (x29) to point to the
location on the stack where we stored the previous frame pointer, and link
register. To simplify this the stack pointer is only adjusted by addition
and subtraction, and not through the use of post increment on loads and
stores.

The updated frame layout is:

+------------+
| lr -- x30  |
+------------+
| fp -- x29  | <-- x29 points at this
+------------+
| Trap frame |
| ...        |
|            | <-- sp points at this
+------------+

The only difference is the first two items, and setting of x29.

Sponsored by: ABT Systems Ltd

8 years agoRework the atomic code to reduce the repetition. This merges some of the
andrew [Tue, 1 Dec 2015 12:27:36 +0000 (12:27 +0000)]
Rework the atomic code to reduce the repetition. This merges some of the
atomic functions where they are almost identical, or have acquire/release
semantics.

While here clean these function up. The cbnz instruction doesn't change
the condition flags so drop cc, however they should have memory added to the
clobber list.

Reviewed by: kib
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D4318

8 years agoIn the same way fix the problem described in r291578 for IGMPv3.
ae [Tue, 1 Dec 2015 11:24:30 +0000 (11:24 +0000)]
In the same way fix the problem described in r291578 for IGMPv3.

In case when router has a lot of multicast groups, the reply can take
several packets due to MTU limitation.
Also we have a limit IGMP_MAX_RESPONSE_BURST == 4, that limits the number
of packets we send in one shot. Then we recalculate the timer value and
schedule the remaining packets for sending.
The problem is that when we call igmp_v3_dispatch_general_query() to send
remaining packets, we queue new reply in the same mbuf queue. And when
number of packets is bigger than IGMP_MAX_RESPONSE_BURST, we get endless
reply of IGMPv3 reports.
To fix this, add the check for remaining packets in the queue.

MFC after: 1 week
Sponsored by: Yandex LLC

8 years agomld_v2_dispatch_general_query() is used by mld_fasttimo_vnet() to send
ae [Tue, 1 Dec 2015 11:17:41 +0000 (11:17 +0000)]
mld_v2_dispatch_general_query() is used by mld_fasttimo_vnet() to send
a reply to the MLDv2 General Query. In case when router has a lot of
multicast groups, the reply can take several packets due to MTU limitation.
Also we have a limit MLD_MAX_RESPONSE_BURST == 4, that limits the number
of packets we send in one shot. Then we recalculate the timer value and
schedule the remaining packets for sending.
The problem is that when we call mld_v2_dispatch_general_query() to send
remaining packets, we queue new reply in the same mbuf queue. And when
number of packets is bigger than MLD_MAX_RESPONSE_BURST, we get endless
reply of MLDv2 reports.
To fix this, add the check for remaining packets in the queue.

PR: 204831
MFC after: 1 week
Sponsored by: Yandex LLC

8 years agoPrint useful information when we hit a data abort we can't handle. This
andrew [Tue, 1 Dec 2015 09:52:41 +0000 (09:52 +0000)]
Print useful information when we hit a data abort we can't handle. This
prints the trap frame, along with the exception syndrome and fault address
registers. Even though esr is 64-bits here it is only 32-bits in hardware
so only print the valid 32-bits.

While here also print esr and far when appropriate after printing the trap
frame.

Sponsored by: ABT Systems Ltd

8 years agor221714 fixed the situation when the collapse scan improperly handled
kib [Tue, 1 Dec 2015 09:06:09 +0000 (09:06 +0000)]
r221714 fixed the situation when the collapse scan improperly handled
invalid (busy) page supposedly inserted by the vm_fault(), in the
OBSC_COLLAPSE_NOWAIT case.  As a continuation to r221714, fix a case
when invalid page is found by the object scan in OBSC_COLLAPSE_WAIT
case as well.  But, since this is waitable scan, we should wait for
the termination of the busy state and restart from the beginning of
the backing object' page queue. [*]

Do not free the shadow page swap space when the parent page is
invalid, otherwise this action potentially corrupts user data.

Combine all instances of the collapse scan sleep code fragments into
the new helper vm_object_backing_scan_wait().

Improve style compliance and comments.  Change the return type of
vm_object_backing_scan() to bool.

Initial submission by: cem, https://reviews.freebsd.org/D4103 [*]
Reviewed by: alc, cem
Tested by: cem
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D4146

8 years agoDisable mqueue test # 3 and # 4 until __mq_oshandle is properly publicized
ngie [Tue, 1 Dec 2015 07:52:41 +0000 (07:52 +0000)]
Disable mqueue test # 3 and # 4 until __mq_oshandle is properly publicized

This will unbreak the test script and make things green again after r291440

Sponsored by: EMC / Isilon Storage Division

8 years agosfxge: added setting TSO-related parameters
arybchik [Tue, 1 Dec 2015 06:29:11 +0000 (06:29 +0000)]
sfxge: added setting TSO-related parameters

Submitted by:   Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4308