]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoahci_generic.c needs ofw_bus_if.h, add it to the module.
Andrew Turner [Tue, 8 Dec 2015 20:05:27 +0000 (20:05 +0000)]
ahci_generic.c needs ofw_bus_if.h, add it to the module.

8 years agoRemove historical GNUC test
Ed Maste [Tue, 8 Dec 2015 19:32:58 +0000 (19:32 +0000)]
Remove historical GNUC test

The requirement is for a GCC-compatible compiler and not necessarily
GCC itself. However, we currently expect any compiler used for building
the whole of FreeBSD to be GCC-compatible and many things will break if
not; there's no longer a need to have an explicit test for this in csu.

Sponsored by: The FreeBSD Foundation

8 years agoAdd comment explaining aarch64's BROKEN_OPTIONS
Ed Maste [Tue, 8 Dec 2015 19:19:26 +0000 (19:19 +0000)]
Add comment explaining aarch64's BROKEN_OPTIONS

In-tree bintuils and GCC do not support aarch64 or other recent
architectures.

8 years agoDon't use 0 for pointer comparison
Steven Hartland [Tue, 8 Dec 2015 18:38:33 +0000 (18:38 +0000)]
Don't use 0 for pointer comparison

Use NULL instead of 0 for comparison with panicstr.

MFC after: 1 week
Sponsored by: Multiplay

8 years agoMETA MODE: Define a STAGE_TARGET_OBJTOP and export it alone with
Bryan Drewery [Tue, 8 Dec 2015 17:56:40 +0000 (17:56 +0000)]
META MODE: Define a STAGE_TARGET_OBJTOP and export it alone with
STAGE_OBJTOP and STAGE_HOST_OBJTOP.

These will always be overridden in sub-makes when building in-tree, but
are exported for the benefit of hooking in external builds, such as
ports.

Sponsored by: EMC / Isilon Storage Division

8 years agoUpdate after r291955, build/install userland debug by default
Ed Maste [Tue, 8 Dec 2015 17:40:42 +0000 (17:40 +0000)]
Update after r291955, build/install userland debug by default

Sponsored by: The FreeBSD Foundation

8 years agoFix some makeman issues.
Bryan Drewery [Tue, 8 Dec 2015 17:09:17 +0000 (17:09 +0000)]
Fix some makeman issues.

- Don't bother looking up REVISION/BRANCH/etc from release/, or the
  CPUTYPE check, as these are not used for makeman and wastes time.  The also
  invokes auto.obj.mk after I reverted auto.obj.mk ignoring -V in r291312.
- Don't modify CC or PATH when WITH_CCACHE_BUILD or WITH_META_MODE is enabled
  as it leads to bsd.compiler.mk errors.

Sponsored by: EMC / Isilon Storage Division

8 years agoresolver: fix the build of some ports, broken by r289315
Eric van Gyzen [Tue, 8 Dec 2015 16:09:48 +0000 (16:09 +0000)]
resolver: fix the build of some ports, broken by r289315

r289315 required time_t and struct timespec to be defined before
including <resolv.h>.  This broke the build of net-mgmt/sx, at least.

Include <sys/timespec.h> in resolv.h to fix this with minimal pollution.

Reported by: Raphael Kubo da Costa <rakuco>
MFC after: 3 days
Sponsored by: Dell Inc.

8 years agoMerge helper fib* functions used for basic lookups.
Alexander V. Chernikov [Tue, 8 Dec 2015 10:50:03 +0000 (10:50 +0000)]
Merge helper fib* functions used for basic lookups.

Vast majority of rtalloc(9) users require only basic info from
route table (e.g. "does the rtentry interface match with the interface
  I have?". "what is the MTU?", "Give me the IPv4 source address to use",
  etc..).
Instead of hand-rolling lookups, checking if rtentry is up, valid,
  dealing with IPv6 mtu, finding "address" ifp (almost never done right),
  provide easy-to-use API hiding all the complexity and returning the
  needed info into small on-stack structure.

This change also helps hiding route subsystem internals (locking, direct
  rtentry accesses).
Additionaly, using this API improves lookup performance since rtentry is not
  locked.
(This is safe, since all the rtentry changes happens under both radix WLOCK
  and rtentry WLOCK).

Sponsored by: Yandex LLC

8 years agoFix make depend
Ulrich Spörlein [Tue, 8 Dec 2015 07:39:39 +0000 (07:39 +0000)]
Fix make depend

8 years agosfxge: [3/6] rework MCDI response handling
Andrew Rybchenko [Tue, 8 Dec 2015 06:25:52 +0000 (06:25 +0000)]
sfxge: [3/6] rework MCDI response handling

Required for MCDI proxy authorization support.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D4420

8 years agoAdd missing stdlib.h header
Enji Cooper [Tue, 8 Dec 2015 05:27:22 +0000 (05:27 +0000)]
Add missing stdlib.h header

Apply some minor style(9) fixes

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

8 years agoFix compilation warnings by adding unistd.h #include and missing return
Enji Cooper [Tue, 8 Dec 2015 05:24:06 +0000 (05:24 +0000)]
Fix compilation warnings by adding unistd.h #include and missing return
statements

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

8 years agoSkip the MAC portacl tests if MAC_PORTACL support is missing instead of
Enji Cooper [Tue, 8 Dec 2015 05:17:22 +0000 (05:17 +0000)]
Skip the MAC portacl tests if MAC_PORTACL support is missing instead of
marking them failed

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

8 years agoDelete bogus freeing of uninitialized data
Enji Cooper [Tue, 8 Dec 2015 04:51:21 +0000 (04:51 +0000)]
Delete bogus freeing of uninitialized data

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

8 years agoAdd missing va_ends for corresponding va_starts to clean up variable arguments
Enji Cooper [Tue, 8 Dec 2015 04:45:44 +0000 (04:45 +0000)]
Add missing va_ends for corresponding va_starts to clean up variable arguments
initialized in _test_fmt(..)

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

8 years agoUnbreak compiling getnetgrent.c with -DDEBUG after r236402 by adding a
Enji Cooper [Tue, 8 Dec 2015 04:40:03 +0000 (04:40 +0000)]
Unbreak compiling getnetgrent.c with -DDEBUG after r236402 by adding a
missing "}"

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

8 years agoMerge bmake-20151201
Simon J. Gerraty [Tue, 8 Dec 2015 01:29:07 +0000 (01:29 +0000)]
Merge bmake-20151201

8 years agoo DragonFly 4.4.1 release added.
Maxim Konovalov [Tue, 8 Dec 2015 01:16:53 +0000 (01:16 +0000)]
o DragonFly 4.4.1 release added.

8 years agolocal.meta.sys.mk already defines TARGET_ARCHES_arm
Bryan Drewery [Tue, 8 Dec 2015 00:22:24 +0000 (00:22 +0000)]
local.meta.sys.mk already defines TARGET_ARCHES_arm

8 years agoDIRDEPS_BUILD: Update dependencies.
Bryan Drewery [Mon, 7 Dec 2015 23:53:01 +0000 (23:53 +0000)]
DIRDEPS_BUILD: Update dependencies.

Sponsored by: EMC / Isilon Storage Division

8 years agoImport bmake-20151201
Simon J. Gerraty [Mon, 7 Dec 2015 22:51:25 +0000 (22:51 +0000)]
Import bmake-20151201

8 years agoActually add the proc_rwmem(9) man page, missed in r291961.
Mark Johnston [Mon, 7 Dec 2015 22:08:12 +0000 (22:08 +0000)]
Actually add the proc_rwmem(9) man page, missed in r291961.

8 years agoFix a couple misspellings of "environment."
Mark Johnston [Mon, 7 Dec 2015 22:00:13 +0000 (22:00 +0000)]
Fix a couple misspellings of "environment."

MFC after: 3 days

8 years agoAdd a trailing newline to the expected output for tst.walltimestamp.ksh.
Mark Johnston [Mon, 7 Dec 2015 21:59:10 +0000 (21:59 +0000)]
Add a trailing newline to the expected output for tst.walltimestamp.ksh.

MFC after: 1 week

8 years agoFix a discrepancy in r291738.
Mark Johnston [Mon, 7 Dec 2015 21:57:36 +0000 (21:57 +0000)]
Fix a discrepancy in r291738.

The script that generates these makefiles was changed to modify LIBADD
rather than LDADD/DPADD, but the makefile itself was also changed in a
slightly different way.

8 years agoUpdate DTrace test suite makefiles after r291963.
Mark Johnston [Mon, 7 Dec 2015 21:51:50 +0000 (21:51 +0000)]
Update DTrace test suite makefiles after r291963.

8 years agoMFV r289003:
Mark Johnston [Mon, 7 Dec 2015 21:49:32 +0000 (21:49 +0000)]
MFV r289003:
6271 dtrace caused excessive fork time

Author: Bryan Cantrill <bryan@joyent.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Gordon Ross <gwr@nexenta.com>

illumos/illumos-gate@7bd3c1d12d0c764e1517c3aca62c634409356764

8 years agoModify DTRACEHIOC_ADDDOF to copy the DOF section from the target process.
Mark Johnston [Mon, 7 Dec 2015 21:44:05 +0000 (21:44 +0000)]
Modify DTRACEHIOC_ADDDOF to copy the DOF section from the target process.

r281257 added support for lazyload mode by allowing dtrace(1) to register
a DOF section on behalf of a traced process. This was implemented by
having libdtrace copy the DOF section into a heap-allocated buffer and
passing its address to the ioctl handler. However, DTrace uses the DOF
section address as a lookup key in certain cases, so the ioctl handler
should be given the target process' DOF section address instead. This
change modifies the ADDDOF handler to copy the DOF section in from the
target process, rather than from dtrace(1).

8 years agoAdd helper functions proc_readmem() and proc_writemem().
Mark Johnston [Mon, 7 Dec 2015 21:33:15 +0000 (21:33 +0000)]
Add helper functions proc_readmem() and proc_writemem().

These helper functions can be used to read in or write a buffer from or to
an arbitrary process' address space. Without them, this can only be done
using proc_rwmem(), which requires the caller to fill out a uio. This is
onerous and results in code duplication; the new functions provide a simpler
interface which is sufficient for most existing callers of proc_rwmem().

This change also adds a manual page for proc_rwmem() and the new functions.

Reviewed by: jhb, kib
Differential Revision: https://reviews.freebsd.org/D4245

8 years agoThe ccb_xflags enumeration was removed from FreeBSD/head in
Kenneth D. Merry [Mon, 7 Dec 2015 21:04:27 +0000 (21:04 +0000)]
The ccb_xflags enumeration was removed from FreeBSD/head in
r259397 (it contained the CAM_EXTLUN_VALID bit) and I added the
same type name with a different set of values back in r291716.

The old ccb_xflags enumeration still exists in FreeBSD stable/10.
Shift all of the new values by one bit to avoid compatibility
issues when merged to stable/10.

MFC after: 3 days
Sponsored by: Spectra Logic

8 years agoFix ls -l alignement with new locales
Baptiste Daroussin [Mon, 7 Dec 2015 20:48:28 +0000 (20:48 +0000)]
Fix ls -l alignement with new locales

Latest update of locales introduced abbreviated month that follows the regionale
rules meaning that they can be of variable length instead of being arbitrary
truncated to top 3 characters.

To fix alignement, ls now computes the visible length of the abbreviated month,
pads the shorter month with spaces in order to make sure everything is properly
aligned

Reviewed by: ache, ed, jilles
Differential Revision: https://reviews.freebsd.org/D4239

8 years agoelfcopy: exclude extension when converting from binary
Ed Maste [Mon, 7 Dec 2015 20:21:12 +0000 (20:21 +0000)]
elfcopy: exclude extension when converting from binary

When converting from binary to ELF, elfcopy creates symbols
_binary_<filename>_start_, _binary_<filename>_end, and
_binary_<filename>_size. For compatibility with GNU objcopy (and to
produce sensible symbol names) the extension must be stripped off.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4238

8 years agoFix a comment typo in the code example.
Christian Brueffer [Mon, 7 Dec 2015 19:21:08 +0000 (19:21 +0000)]
Fix a comment typo in the code example.

PR: 203497
Submitted by: chadf@triularity.org
MFC after: 1 week

8 years agoBuild and install userland .debug files by default
Ed Maste [Mon, 7 Dec 2015 19:15:52 +0000 (19:15 +0000)]
Build and install userland .debug files by default

Debug data files are now built by default with 'make buildworld' and
installed with 'make installworld'. This facilitates debugging but
requires more disk space both during the build and for the installed
world. Debug files may be disabled by setting WITHOUT_DEBUG_FILES=yes
in src.conf(5).

Reviewed by: bdrewery, eadler, vangyzen
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4018

8 years agoAdd an MLINK for m_collapse.
Christian Brueffer [Mon, 7 Dec 2015 19:08:33 +0000 (19:08 +0000)]
Add an MLINK for m_collapse.

PR: 204205
Submitted by: avos
MFC after: 1 week

8 years agoWhen setting up VLANs on a Raspberry Pi ethernet port, the MTU drops
Hans Petter Selasky [Mon, 7 Dec 2015 18:55:33 +0000 (18:55 +0000)]
When setting up VLANs on a Raspberry Pi ethernet port, the MTU drops
from 1500 to 1496 bytes. The MTU should remain at 1500, extending the
frame size as per IEEE 802.3. Adding IFCAP_VLAN_MTU to the
if_capabilities field in the smsc driver solves the problem.  The
datasheet for the LAN9512 chip, section 3.2.3 states that the chip
supports the extended frame.

Submitted by: rpp@ci.com.au
MFC after: 1 week
PR: 205050

8 years agoFix spelling of internal hack.
Bryan Drewery [Mon, 7 Dec 2015 18:45:55 +0000 (18:45 +0000)]
Fix spelling of internal hack.

Reported by: ngie

8 years agoReplace magic value ELF note type with NT_FREEBSD_ABI_TAG
Ed Maste [Mon, 7 Dec 2015 18:43:27 +0000 (18:43 +0000)]
Replace magic value ELF note type with NT_FREEBSD_ABI_TAG

As of r291909 elf_common.h provides a definition.

Suggested by: kib
Sponsored by: The FreeBSD Foundation

8 years agoFix a typo in the CPUTYPE list.
Christian Brueffer [Mon, 7 Dec 2015 18:39:38 +0000 (18:39 +0000)]
Fix a typo in the CPUTYPE list.

PR: 205099
Submitted by: xxjack12xx@gmail.com
MFC after: 1 week

8 years agoMerge common parts of i386 and amd64 md_var.h and smp.h into
Konstantin Belousov [Mon, 7 Dec 2015 17:41:20 +0000 (17:41 +0000)]
Merge common parts of i386 and amd64 md_var.h and smp.h into
new headers x86/include x86_var.h and x86_smp.h.

Reviewed by: emaste, jhb
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D4358

8 years agoUse ANSI C definition.
Konstantin Belousov [Mon, 7 Dec 2015 17:24:55 +0000 (17:24 +0000)]
Use ANSI C definition.

MFC after: 1 week

8 years agoSet %esp correctly in the extended TSS.
John Baldwin [Mon, 7 Dec 2015 16:27:11 +0000 (16:27 +0000)]
Set %esp correctly in the extended TSS.

The pcb is saved at the top of the kernel stack on x86 platforms.
The initial kenrel stack pointer is set in the TSS so that the trapframe
from user -> kernel transitions begins directly below the pcb and grows
down.

The XSAVE changes moved the FPU save area out of the pcb and into a
variable-sized area after the pcb.  This required updating the expressions
to calculate the initial stack pointer from 'stacktop - sizeof(pcb)' to
'stacktop - sizeof(pcb) + FPU save area size'.

The i386_set_ioperm() system call allows user applications to access
individual I/O ports via the I/O port permission bitmap in the TSS.
On FreeBSD this requires allocating a custom per-process TSS instead of
using the shared per-CPU TSS.

The expression to initialize the initial kernel stack pointer in the
per-process TSS created for i386_set_ioperm() was not properly updated
after the XSAVE changes.  Processes that used i386_set_ioperm() would
trash the trapframe during subsequent context switches resulting in
panics from memory corruption.

This changes fixes the kernel stack pointer calculation for the per-process
TSS.

Reviewed by: kib, n_hibma
Reported by: n_hibma
MFC after: 1 week

8 years agoGarbage collect removed directories.
Bryan Drewery [Mon, 7 Dec 2015 16:08:26 +0000 (16:08 +0000)]
Garbage collect removed directories.

Sponsored by: EMC / Isilon Storage Division

8 years agoFAST_DEPEND: Only pass -MF if we care about the object being compiled.
Bryan Drewery [Mon, 7 Dec 2015 16:08:22 +0000 (16:08 +0000)]
FAST_DEPEND: Only pass -MF if we care about the object being compiled.

This will save time generating dependency files that we didn't expect
due to cases where SRCS!=OBJS or for building custom targetted objects
in Makefiles that do not end up in the DEPENDOBJS list.

This uses a bmake trick to modify CFLAGS based on ${.TARGET}.  A
.PARSEDIR check is done for the sake of MFC safety.

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

8 years agoFAST_DEPEND: Move handling code below yacc/lex/dtrace code that modified SRCS.
Bryan Drewery [Mon, 7 Dec 2015 16:08:19 +0000 (16:08 +0000)]
FAST_DEPEND: Move handling code below yacc/lex/dtrace code that modified SRCS.

This fixes some of those newly added SRCS not having their depend files
included.

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

8 years agoFAST_DEPEND: Only try to use dependencies from C/C++ SRCS as mkdep did.
Bryan Drewery [Mon, 7 Dec 2015 16:08:16 +0000 (16:08 +0000)]
FAST_DEPEND: Only try to use dependencies from C/C++ SRCS as mkdep did.

Rather than try to guess at all of the OBJS variables just use SRCS
using the same patterns that mkdep does.  This also fixes a mistake
where dependencies were being generated with FAST_DEPEND when they were
not for mkdep.  This happens when OBJS!=SRCS as is the case in
gnu/lib/csu where SRCS has 1 file and OBJS has several other files that
does not even contain the 1 SRCS file.  Generally in these cases the
OBJS have custom dependencies defined in their Makefile.  If we generate
dependencies for those and then load a .depend file, then .IMPSRC may
contain duplicate sources and lead to errors such as:
  cc: error: cannot specify -o when generating multiple output files

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

8 years agoAdd missing CLEANFILES.
Bryan Drewery [Mon, 7 Dec 2015 16:08:13 +0000 (16:08 +0000)]
Add missing CLEANFILES.

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

8 years agoReplace unneeded manual dependency on header by adding it to SRCS.
Bryan Drewery [Mon, 7 Dec 2015 16:08:09 +0000 (16:08 +0000)]
Replace unneeded manual dependency on header by adding it to SRCS.

bsd.lib.mk and bsd.prog.mk already depend all objs on headers in SRCS if
there is not yet a depend file.  The headers in SRCS are never built or
installed.  After 'make depend' the header was already added as a proper
dependency on the objects where needed.

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

8 years agoUpdate the mlx5 shared driver code to the latest version, which
Hans Petter Selasky [Mon, 7 Dec 2015 13:16:48 +0000 (13:16 +0000)]
Update the mlx5 shared driver code to the latest version, which
include the following list of changes:

- Added eswitch ACL table management
  Introduce API for managing ACL table.
  This API include the following features:
  1) vlan filter - for VST/VGT+ support.
  2) spoofcheck.
  3) robust functionality to allow/drop general untagged/tagged traffic.
  4) support for both ingress and egress ACL types.

- Added loopback filter to the vacl table.

- Added multicast list set in the vPort context

- Added promiscuous mode set in the vPort context

- Set the vlan list in vPort context
  1) Check caps if VLAN list is not longer than FW supports
  2) Set MODIFY_NIC_VPORT_CONTEXT command

- Changed MLX5_EEPROM_MAX_BYTES from 48 to 32 so that a single EEPROM
  reading cannot cross the 128-byte boundary. Previously reading the
  MCIA register was done in batches of 48 bytes. The third reading
  would then by-pass the 127th byte, which means that part of the low
  page and part of the high page would be read at the same time, which
  created a bug:
    1st: 0-47 bytes
    2nd: 48-95 bytes
    3rd: 96-143 bytes

MFC after: 1 week
Sponsored by: Mellanox Technologies
Differential Revision: https://reviews.freebsd.org/D4411

8 years agoAdd full support for Receive Side Scaling, RSS, to the mlx5en
Hans Petter Selasky [Mon, 7 Dec 2015 12:38:51 +0000 (12:38 +0000)]
Add full support for Receive Side Scaling, RSS, to the mlx5en
driver. This includes binding all interrupt and worker threads
according to the RSS configuration, setting up correct Toeplitz
hashing keys as given by RSS and setting the correct mbuf
hashtype for all received traffic.

MFC after: 1 week
Sponsored by: Mellanox Technologies
Differential Revision: https://reviews.freebsd.org/D4410

8 years agoAdd support for usermode (vdso-like) gettimeofday(2) and
Konstantin Belousov [Mon, 7 Dec 2015 12:20:26 +0000 (12:20 +0000)]
Add support for usermode (vdso-like) gettimeofday(2) and
clock_gettime(2) on ARMv7 and ARMv8 systems which have architectural
generic timer hardware. It is similar how the RDTSC timer is used in
userspace on x86.

Fix a permission problem where generic timer access from EL0 (or
userspace on v7) was not properly initialized on APs.

For ARMv7, mark the stack non-executable. The shared page is added for
all arms (including ARMv8 64bit), and the signal trampoline code is
moved to the page.

Reviewed by: andrew
Discussed with: emaste, mmel
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D4209

8 years agoUpdate ctime when atime or birthtime are updated.
Konstantin Belousov [Mon, 7 Dec 2015 12:09:04 +0000 (12:09 +0000)]
Update ctime when atime or birthtime are updated.

Cleanup setting of ctime/mtime/birthtime: do not set IN_ACCESS or
IN_UPDATE, then clear them with ufs_itimes(), making transient
(possibly inconsistent) change to the times, and then copy
user-supplied times into the inode.  Instead, directly clear IN_ACCESS
or IN_UPDATE when user supplied the time, and copy the value into the
inode.

Minor inconsistency left is that the inode ctime is updated even when
birthtime update attempt is performed on a UFS1 volume.

Submitted by: bde
MFC after: 2 weeks

8 years agoAdd support for setting the TX moderation mode via a sysctl entry. TX
Hans Petter Selasky [Mon, 7 Dec 2015 11:04:50 +0000 (11:04 +0000)]
Add support for setting the TX moderation mode via a sysctl entry. TX
completion events can be moderated in the same way like RX completion
events. Expose this functionality by a sysctl variable.

MFC after: 1 week
Sponsored by: Mellanox Technologies
Differential Revision: https://reviews.freebsd.org/D4409

8 years agoThe firmware no longer supports setting a port MTU of zero bytes.
Hans Petter Selasky [Mon, 7 Dec 2015 10:57:42 +0000 (10:57 +0000)]
The firmware no longer supports setting a port MTU of zero bytes.
Set the port MTU and then query it and report if any problems instead.

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

8 years agoStart to split apart the different image formats that we need to
Warner Losh [Mon, 7 Dec 2015 10:24:40 +0000 (10:24 +0000)]
Start to split apart the different image formats that we need to
make. Add support for generating powerpc64 qemu images. We
can generate them, but there's something wrong booting them.
This also simplifies the user config files a bit, and removes
bits no longer true.

8 years agoMake sure to quote the arg after -n and -z tests.
Warner Losh [Mon, 7 Dec 2015 10:24:38 +0000 (10:24 +0000)]
Make sure to quote the arg after -n and -z tests.

8 years agosfxge: [2/6] rework MCDI response polling
Andrew Rybchenko [Mon, 7 Dec 2015 07:22:21 +0000 (07:22 +0000)]
sfxge: [2/6] rework MCDI response polling

Required to support MCDI proxy authorization.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D4418

8 years agosfxge: [1/6] add common code MCDI proxy auth build option
Andrew Rybchenko [Mon, 7 Dec 2015 07:20:49 +0000 (07:20 +0000)]
sfxge: [1/6] add common code MCDI proxy auth build option

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D4417

8 years agosfxge: fix pointer parameter/value signedness mismatch warnings
Andrew Rybchenko [Mon, 7 Dec 2015 06:07:01 +0000 (06:07 +0000)]
sfxge: fix pointer parameter/value signedness mismatch warnings

TLV routines use 'uint8_t *', NVRAM code uses caddr_t. Just cast to
required type to fix the warning.

Required to build with -Werror=pointer-signg.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4391

8 years agosfxge: fix name conflict with crc32_table from sys/crc32.h
Andrew Rybchenko [Mon, 7 Dec 2015 06:05:23 +0000 (06:05 +0000)]
sfxge: fix name conflict with crc32_table from sys/crc32.h

The header is not present on FreeBSD, but exists on OmniOS where sfxge
common code is used as well.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4390

8 years agosfxge: switch to TxQ creation specific flags
Andrew Rybchenko [Mon, 7 Dec 2015 06:04:24 +0000 (06:04 +0000)]
sfxge: switch to TxQ creation specific flags

It is better do not mix TxQ creation and receive event flags since only
checksum flags are applicable to TxQ.
Also it will allow to add a new TxQ creation specific flags.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after: 2    days
Differential Revision: https://reviews.freebsd.org/D4389

8 years agosfxge: [Sorrento] support writing of MUM firmware
Andrew Rybchenko [Mon, 7 Dec 2015 06:01:14 +0000 (06:01 +0000)]
sfxge: [Sorrento] support writing of MUM firmware

When writing the MUM firmware the chunk size must be equal to the erase
size.

Submitted by:   Laurence Evans <levans at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4388

8 years agosfxge: support PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED flag
Andrew Rybchenko [Mon, 7 Dec 2015 05:59:24 +0000 (05:59 +0000)]
sfxge: support PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED flag

Use flag on vadapter alloc when reported as a supported capability.
Use the slow device reset only when the capability is missing.

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

8 years agoDocument the different config files.
Warner Losh [Mon, 7 Dec 2015 05:13:29 +0000 (05:13 +0000)]
Document the different config files.
Document how to run qemu for the ones I've run.
Use qcow2 for all qemu images.

8 years agoImprove cam tracing a little by including the function code in the
Warner Losh [Mon, 7 Dec 2015 04:14:29 +0000 (04:14 +0000)]
Improve cam tracing a little by including the function code in the
traces for xpt_action. Note up-calls (down-calls?) to the SIM as well.

Differential Review: https://reviews.freebsd.org/D4382

8 years agoEnable bin/ls testcases disabled previously because of issues with how
Enji Cooper [Mon, 7 Dec 2015 04:03:01 +0000 (04:03 +0000)]
Enable bin/ls testcases disabled previously because of issues with how
kyua 0.11's version of report-junit was rendering non-printable characters

Upgrade to kyua 0.12 to obtain a fixed version of the command

Output verified with python 2.7.10's xml.dom.minidom module

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

8 years agoNow that we have dedup of mtree elements in nanobsd, remove the
Warner Losh [Mon, 7 Dec 2015 04:02:59 +0000 (04:02 +0000)]
Now that we have dedup of mtree elements in nanobsd, remove the
primitive attempt we made here.

8 years agoFix up mtree with additional entries written to it by
Warner Losh [Mon, 7 Dec 2015 04:02:52 +0000 (04:02 +0000)]
Fix up mtree with additional entries written to it by
nanobsd. implement support for NanoBSD touching a file (and possibly
recording that fact) as well as replacing a directory with a symlink.
Also specify the default uname and gname for files and use that as a
/set command at the top of the generated METALOG file.

8 years agoDisable /entropy by default. /var/db/entropy should be enough.
Warner Losh [Mon, 7 Dec 2015 04:02:42 +0000 (04:02 +0000)]
Disable /entropy by default. /var/db/entropy should be enough.
# This eliminates the warning message at boot, but more work may be
# needed.

8 years agoimported patch dedup
Warner Losh [Mon, 7 Dec 2015 04:02:34 +0000 (04:02 +0000)]
imported patch dedup

8 years agoAllow the .cfg files to specify the ultimate format for the images
Warner Losh [Mon, 7 Dec 2015 04:02:32 +0000 (04:02 +0000)]
Allow the .cfg files to specify the ultimate format for the images
created.

8 years agoGenerally use shorter, more idiomatic sh expressions in a bunch of
Warner Losh [Mon, 7 Dec 2015 04:02:31 +0000 (04:02 +0000)]
Generally use shorter, more idiomatic sh expressions in a bunch of
places.

8 years agoDefault serial connection to 115200. Hardly anybody uses slower these
Warner Losh [Mon, 7 Dec 2015 04:02:19 +0000 (04:02 +0000)]
Default serial connection to 115200. Hardly anybody uses slower these
days, and those that do can use NANO_BOOT2CFG to change it.

8 years agoFix panic on shutdown due to iscsi event priority
Steven Hartland [Mon, 7 Dec 2015 02:56:08 +0000 (02:56 +0000)]
Fix panic on shutdown due to iscsi event priority

iscsi's shutdown_pre_sync prio was SHUTDOWN_PRI_FIRST which caused it to
run before other high priority handlers such as filesystems e.g. ZFS.

This meant the iscsi sessions where removed before the ZFS geom consumer
was closed, resulting in a panic from g_access calls on debug kernels
due to negative acr.

Instead use the same as the old iscsi_initiator SHUTDOWN_PRI_DEFAULT-1
which allows it to run before dashutdown etc but after filesystems.

MFC after: 2 weeks
Sponsored by: Multiplay

8 years agoAdd definitions for ELF note types used in executables
Ed Maste [Sun, 6 Dec 2015 21:16:01 +0000 (21:16 +0000)]
Add definitions for ELF note types used in executables

Sponsored by: The FreeBSD Foundation

8 years agoFix leak in mkfs_msdos(..) by initializing img to NULL and free'ing at the end
Enji Cooper [Sun, 6 Dec 2015 21:07:33 +0000 (21:07 +0000)]
Fix leak in mkfs_msdos(..) by initializing img to NULL and free'ing at the end
of the function

Differential Revision: https://reviews.freebsd.org/D4405
MFC after: 1 week
PR: 204943
Reviewed by: emaste, jilles
Reported by: David Binderman <dcb314@hotmail.com>
Sponsored by: EMC / Isilon Storage Division

8 years agovm_fault_hold: handle vm_page_rename failure
Conrad Meyer [Sun, 6 Dec 2015 17:46:12 +0000 (17:46 +0000)]
vm_fault_hold: handle vm_page_rename failure

On vm_page_rename failure, fix a missing object unlock and a double free of
a page.

First remove the old page, then rename into other page into first_object,
then free the old page.  This avoids the problem on rename failure.  This is
a little ugly but seems to be the most straightforward solution.

Tested with:
  $ sysctl debug.fail_point.uma_zalloc_arg="1%return"
  $ kyua test -k /usr/tests/sys/Kyuafile

Submitted by: Ryan Libby <rlibby@gmail.com>
Reviewed by: kib
Seen by: alc
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D4326

8 years agopmap_invalidate_range: For very large ranges, flush the whole TLB
Conrad Meyer [Sun, 6 Dec 2015 17:39:13 +0000 (17:39 +0000)]
pmap_invalidate_range: For very large ranges, flush the whole TLB

Typical TLBs have 40-512 entries available.  At some point, iterating
every single page in a requested invalidation range and issuing invlpg
on it is more expensive than flushing the TLB and allowing it to reload
on demand.

Broadwell CPUs have 1536 L2 TLB entries, so I've picked the arbitrary
number 4096 entries as a hueristic at which point we flush TLB rather
than invalidating every single potential page.

Reviewed by: alc
Feedback from: jhb, kib
MFC notes: Depends on r291688
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D4280

8 years agoFix the allocation of outgoing streams:
Michael Tuexen [Sun, 6 Dec 2015 16:17:57 +0000 (16:17 +0000)]
Fix the allocation of outgoing streams:
* When processing a cookie, use the number of
  streams announced in the INIT-ACK.
* When sending an INIT-ACK for an existing
  association, use the value from the association,
  not from the end-point.

MFC after: 1 week

8 years agosh: Add limited test for ${#@} and ${#*}.
Jilles Tjoelker [Sun, 6 Dec 2015 14:09:31 +0000 (14:09 +0000)]
sh: Add limited test for ${#@} and ${#*}.

POSIX leaves the result of expanding ${#@} and ${#*} unspecified, but ensure
it is numeric.

8 years ago- Fix Tx queues to USB endpoints mapping
Kevin Lo [Sun, 6 Dec 2015 14:07:57 +0000 (14:07 +0000)]
- Fix Tx queues to USB endpoints mapping
- Merge urtwn_r92c_dma_init() and urtwn_r88e_dma_init() into one

Reviewed by: adrian, avos
Differential Revision: https://reviews.freebsd.org/D4381

8 years agoRemove unused atf.test.mk variables
Enji Cooper [Sun, 6 Dec 2015 07:30:18 +0000 (07:30 +0000)]
Remove unused atf.test.mk variables

- ATF_BUILD_CC
- ATF_BUILD_CPP
- ATF_BUILD_CXX
- ATF_SHELL
- ATF_PREFIX

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

8 years agoRemove redundant default TESTSDIR that is already defined in bsd.test.mk
Enji Cooper [Sun, 6 Dec 2015 07:00:23 +0000 (07:00 +0000)]
Remove redundant default TESTSDIR that is already defined in bsd.test.mk
after r289158

MFC after: 1 week
X-MFC with: r289158
Sponsored by: EMC / Isilon Storage Division

8 years agoUse .Fx instead of explicitly spelling out FreeBSD
Enji Cooper [Sun, 6 Dec 2015 06:53:37 +0000 (06:53 +0000)]
Use .Fx instead of explicitly spelling out FreeBSD

Fix several warnings reported by igor

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

8 years agoAdapt to new wireless scheme where base wlan interfaces do not show up in
Nathan Whitehorn [Sun, 6 Dec 2015 00:20:45 +0000 (00:20 +0000)]
Adapt to new wireless scheme where base wlan interfaces do not show up in
ifconfig anymore.

8 years agoRemove stray unescaped `%` in `Booting from ...` informational message
Enji Cooper [Sat, 5 Dec 2015 23:59:30 +0000 (23:59 +0000)]
Remove stray unescaped `%` in `Booting from ...` informational message

PR: 204944
MFC after: 1 week
X-MFC with: r291164
Reported by: David Binderman <dcb314@hotmail.com>
Sponsored by: EMC / Isilon Storage Division

8 years agoThere is no priority request queue on 16Gig chips.
Alexander Motin [Sat, 5 Dec 2015 22:07:02 +0000 (22:07 +0000)]
There is no priority request queue on 16Gig chips.

8 years agoRework WWNs generation to make cards without NVRAM more useful.
Alexander Motin [Sat, 5 Dec 2015 21:38:04 +0000 (21:38 +0000)]
Rework WWNs generation to make cards without NVRAM more useful.

8 years agoFix regression in r291738: This really wants -lssp.
Bryan Drewery [Sat, 5 Dec 2015 18:56:21 +0000 (18:56 +0000)]
Fix regression in r291738: This really wants -lssp.

The normal LIBADD is ssp_nonshared.  This also had a DPADD on LIBSSP which
does not actually exist, it is blank.

Sponsored by: EMC / Isilon Storage Division

8 years agoWhen building no-priv, chmod etc/defaults/rc.conf before appending to
Warner Losh [Sat, 5 Dec 2015 17:40:11 +0000 (17:40 +0000)]
When building no-priv, chmod etc/defaults/rc.conf before appending to
it and then chmod back.  There's no chmod -push / chmod -pop so hard
code 444 as the right permissions here.

Also, fix more stray detritus that crept in (out?) while re-arranging
the deck chairs.

8 years agosfxge: erase nvram partitions in chunks equal to their erase size
Andrew Rybchenko [Sat, 5 Dec 2015 17:11:14 +0000 (17:11 +0000)]
sfxge: erase nvram partitions in chunks equal to their erase size

The erase size is reported by the nvram info command.

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

8 years agostyle.9: Add a small blurb about allowing bool
Conrad Meyer [Sat, 5 Dec 2015 17:01:38 +0000 (17:01 +0000)]
style.9: Add a small blurb about allowing bool

It was allowed before, but make it very explicit it is allowed now.  And
prefer 'bool' to older types that were used for the same purpose -- int and
boolean_t.

Like with the C99 fixed-width types, use common sense when changing old
code.

No igor regressions.

Suggested by: bde <20151205031713.T3286@besplex.bde.org>
Reviewed by: glebius, davide, bapt (earlier versions)
Reviewed by: imp
Feedback from: julian
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D4384

8 years agoStupid last minute changes: Add missing } and fi
Warner Losh [Sat, 5 Dec 2015 16:28:14 +0000 (16:28 +0000)]
Stupid last minute changes: Add missing } and fi

Pointed out by: Howard Su

8 years agoRemove a duplicate definition.
Kevin Lo [Sat, 5 Dec 2015 15:09:19 +0000 (15:09 +0000)]
Remove a duplicate definition.

8 years agourtwn: fix some regressions after r290630
Andriy Voskoboinyk [Sat, 5 Dec 2015 15:08:01 +0000 (15:08 +0000)]
urtwn: fix some regressions after r290630

- Restore R92C_TXDW4_HWSEQ_EN bit - it is used by non-8188EU chips.
- Fix DRVRATE bit usage.

Tested with:
 - RTL8188EU, STA mode.
 - RTL8188CUS, STA mode.

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

8 years agosh: Link tests/parameters/positional8.0 to the build.
Jilles Tjoelker [Sat, 5 Dec 2015 12:55:34 +0000 (12:55 +0000)]
sh: Link tests/parameters/positional8.0 to the build.

This was forgotten in r291025.

8 years agoFix RSS build.
Navdeep Parhar [Sat, 5 Dec 2015 10:10:18 +0000 (10:10 +0000)]
Fix RSS build.

Reported by: arybchik@

8 years agoAllow the artificial profile frames to be adjusted as needed by the user.
Andrew Turner [Sat, 5 Dec 2015 10:00:01 +0000 (10:00 +0000)]
Allow the artificial profile frames to be adjusted as needed by the user.
While here update for armv6 to a tested value.

Submitted by: Howard Su <howard0su@gmail.com>
Reviewed by: stat
Differential Revision: https://reviews.freebsd.org/D4315

8 years agoRemove LLE read lock from IPv4 fast path.
Alexander V. Chernikov [Sat, 5 Dec 2015 09:50:37 +0000 (09:50 +0000)]
Remove LLE read lock from IPv4 fast path.

LLE structure is mostly unchanged during its lifecycle.
To be more specific, there are 2 things relevant for fast path
  lookup code:
1) link-level address change. Since r286722, these updates are performed
  under AFDATA WLOCK.
2) Some sort of feedback indicating that this particular entry is used so
  we re-send arp request to perform reachability verification instead of
  expiring entry. The only signal that is needed from fast path is something
  like binary yes/no.

The latter is solved by the following changes:
1) introduce special r_skip_req field which is read lockless by fast path,
  but updated under (new) req_mutex mutex. If this field is non-zero, then
  fast path will acquire lock and set it back to 0.
2) introduce simple state machine: incomplete->reachable<->verify->deleted.
  Before that we implicitely had incomplete->reachable->deleted state machine,
  with V_arpt_keep between "reachable" and "deleted". Verification was performed
  in runtime 5 seconds before V_arpt_keep expire.
  This is changed to "change state to verify 5 seconds before V_arpt_keep,
  set r_skip_req to non-zero value and check it every second". If the value
  is zero - then send arp verification probe.
These changes do not introduce any signifficant control plane overhead:
  typically lle callout timer would fire 1 time more each V_arpt_keep (1200s)
  for used lles and up to arp_maxtries (5) for dead lles.

As a result, all packets towards "reachable" lle are handled by fast path without
acquiring lle read lock.

Additional "req_mutex" is needed because callout / arpresolve_slow() or eventhandler
  might keep LLE lock for signifficant amount of time, which might not be feasible
  for fast path locking (e.g. having rmlock as ether AFDATA or lltable own lock).

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