]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoAdd support for usermode (vdso-like) gettimeofday(2) and
kib [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.
kib [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
hselasky [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.
hselasky [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
imp [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.
imp [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
arybchik [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
arybchik [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
arybchik [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
arybchik [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
arybchik [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
arybchik [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
arybchik [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.
imp [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
imp [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
ngie [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
imp [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
imp [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.
imp [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
imp [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
imp [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
imp [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
imp [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
smh [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
emaste [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
ngie [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
cem [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
cem [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:
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 [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
kevlo [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
ngie [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
ngie [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
ngie [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
nwhitehorn [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
ngie [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.
mav [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.
mav [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.
bdrewery [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
imp [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
arybchik [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
cem [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
imp [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.
kevlo [Sat, 5 Dec 2015 15:09:19 +0000 (15:09 +0000)]
Remove a duplicate definition.

8 years agourtwn: fix some regressions after r290630
avos [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 [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.
np [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 [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.
melifaro [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

8 years agoMove the check to see if we are tracing a function with the DTrace Function
andrew [Sat, 5 Dec 2015 09:32:36 +0000 (09:32 +0000)]
Move the check to see if we are tracing a function with the DTrace Function
Boundary Trace to assembly to reduce the overhead of these checks.

Submitted by: Howard Su <howard0su@gmail.com>
Relnotes: Yes
Differential Revision: https://reviews.freebsd.org/D4266

8 years agoIt seems that at least some KVM versions advertise support for EIO
kib [Sat, 5 Dec 2015 08:52:37 +0000 (08:52 +0000)]
It seems that at least some KVM versions advertise support for EIO
suppression but the version of the IOAPIC reported is 0x11 and neither
IOAPIC EOIR nor the Linux trick of temporal reprogramming of the pin
to edge-trigger mode to issue EOI work.

Disable eoi suppression if KVM is detected.  The mode can still be
forced with the tunable.

Reported and tested by: Roman Mamontov <mr.xanto@gmail.com>
Sponsored by: The FreeBSD Foundation

8 years agoIn the pmap_set_pg() function, which enables the global bit on the
kib [Sat, 5 Dec 2015 08:46:41 +0000 (08:46 +0000)]
In the pmap_set_pg() function, which enables the global bit on the
ptes mapping the kernel on CPUs where global TLB entries are
supported, revert to flushing only non-global entries, i.e. to the
pre-r291688 state.  There is no need to flush global TLB entries,
since only global entries created during the previous iterations of
the loop could exist at this moment.

Submitted by: alc
Differential revision: https://reviews.freebsd.org/D4368

8 years agosfxge: pick up the new TLV structures
arybchik [Sat, 5 Dec 2015 08:34:51 +0000 (08:34 +0000)]
sfxge: pick up the new TLV structures

The header is auto-generated from firmware sources.

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

8 years agosfxge: cleanup: remove set but not used trailer variable
arybchik [Sat, 5 Dec 2015 08:26:16 +0000 (08:26 +0000)]
sfxge: cleanup: remove set but not used trailer variable

Required to build with -Werror=unused-but-set-variable.

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

8 years agosfxge: cleanup: remove set but not used variable with parse error indication
arybchik [Sat, 5 Dec 2015 08:24:54 +0000 (08:24 +0000)]
sfxge: cleanup: remove set but not used variable with parse error indication

Required to build with -Werror=unused-but-set-variable.
Keep it under #if 0 as a reminder for parse error processing.

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

8 years agosfxge: cleanup: remove set but not used saved_spec variable
arybchik [Sat, 5 Dec 2015 08:21:45 +0000 (08:21 +0000)]
sfxge: cleanup: remove set but not used saved_spec variable

Required to build with -Werror=unused-but-set-variable.

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

8 years agosfxge: cleanup: remove SFL9122 "Huntington" PCI IDs
arybchik [Sat, 5 Dec 2015 08:10:32 +0000 (08:10 +0000)]
sfxge: cleanup: remove SFL9122 "Huntington" PCI IDs

The SFL9122 "Huntington" controller was never built.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: support for MCDI logging implemented
arybchik [Sat, 5 Dec 2015 07:04:11 +0000 (07:04 +0000)]
sfxge: support for MCDI logging implemented

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/D4355

8 years agoNew config files for embedded boards.
imp [Sat, 5 Dec 2015 04:43:56 +0000 (04:43 +0000)]
New config files for embedded boards.
Build with ../nanobsd.sh -c rpi.cfg, for example.
This can be done as a normal user.

This is a work in progress. It relies on the new nopriv
build stuff committed to nanobsd, but isn't complete yet.
Currently, one must copy files into the DOS partition
in the image. Also, ownership isn't preserved because
this doesn't use the new mtree-dedup.awk yet, but rather
some crazy mtree stuff. The image building bits will
move up into nanobsd when they are ready.

Also includes very preliminary support for building qemu
images for all platforms that we can for qemu. It is
missing aarch64, and we put the image on s2 instead of
s1 and mkimg can't mark s2 as active, so there's some
issues. Oh, and I didn't do it for arm.

Take a look, kick the tires, expect problems.

8 years agoInitialize errno to 0 in the nul testcase before testing it
ngie [Sat, 5 Dec 2015 04:10:15 +0000 (04:10 +0000)]
Initialize errno to 0 in the nul testcase before testing it

For some odd reason stable/10 requires this, otherwise it always fails
the errno == 0 check on line 196.

Sponsored by: EMC / Isilon Storage Division

8 years agoFix -Wformat issues and minor whitespace issues in surrounding areas
ngie [Sat, 5 Dec 2015 02:25:20 +0000 (02:25 +0000)]
Fix -Wformat issues and minor whitespace issues in surrounding areas

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

8 years agosplit.ih:
ngie [Sat, 5 Dec 2015 02:23:44 +0000 (02:23 +0000)]
split.ih:
- Create automatically generated include header for split.c

main.c:
- Use function definitions from debug.ih and split.ih instead of externs

Sponsored by: EMC / Isilon Storage Division

8 years agoUse `==` instead of `=` in the function comment above split(..) so mkh -p
ngie [Sat, 5 Dec 2015 02:18:36 +0000 (02:18 +0000)]
Use `==` instead of `=` in the function comment above split(..) so mkh -p
exposes split(..).

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

8 years agoUse ANSI C function prototypes/definitions instead of K&R style ones
ngie [Sat, 5 Dec 2015 02:07:55 +0000 (02:07 +0000)]
Use ANSI C function prototypes/definitions instead of K&R style ones

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

8 years agoAdd missing headers and sort #includes per style(9)
ngie [Sat, 5 Dec 2015 01:19:35 +0000 (01:19 +0000)]
Add missing headers and sort #includes per style(9)

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

8 years ago- Use ANSI C function prototypes/definitions instead of K&R style ones
ngie [Sat, 5 Dec 2015 01:13:18 +0000 (01:13 +0000)]
- Use ANSI C function prototypes/definitions instead of K&R style ones
- Add a missing return type for main(..)

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

8 years agoFix -Wformat warnings by using the correct format qualifiers
ngie [Sat, 5 Dec 2015 01:12:58 +0000 (01:12 +0000)]
Fix -Wformat warnings by using the correct format qualifiers

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

8 years agoAwk helper script that reads in a mtree METALOG file from installworld
imp [Sat, 5 Dec 2015 01:12:44 +0000 (01:12 +0000)]
Awk helper script that reads in a mtree METALOG file from installworld
(and soon augmented by nanobsd), performs the actions documented in
the script, and then spits out a new mtree file suitable for feeding
to makefs.

Discussed on: arch@

8 years agoSetting NANO_NOPRIV_BUILD will now add -DNO_ROOT and METALOG=xxxx as
imp [Sat, 5 Dec 2015 01:10:04 +0000 (01:10 +0000)]
Setting NANO_NOPRIV_BUILD will now add -DNO_ROOT and METALOG=xxxx as
appropriate. First step in supporting a build w/o root. More to
follow as actions by customization scripts are not (yet) recorded in
the metalog, and duplicate entries in it aren't removed.

8 years agoSRCCONF makes no sense in make.conf. Don't set it there. Rely on it
imp [Sat, 5 Dec 2015 00:54:43 +0000 (00:54 +0000)]
SRCCONF makes no sense in make.conf. Don't set it there. Rely on it
being in the environment. Also filter out the new SRC_ENV_CONF as
well. If you really need these set, set them in your config file,
not in the build environment used to launch nanobsd.

Pointed out by: bdrewery@

8 years agoMinor cleanup in how we run make:
imp [Sat, 5 Dec 2015 00:15:04 +0000 (00:15 +0000)]
Minor cleanup in how we run make:
o Move SRCCONF and __MAKE_CONF into the environment to cope with
  file paths with spaces in them better.
o Move the rest of the variable setting command line args into
  __MAKE_CONF files.
o Trace the commands that we're using to build so they appear at the
  top of the log.
o Be more consistent about quoting paths for cd and similar commands
  to better cope with paths with spaces in them, though some more
  work is likely needed.
o Add some comments about all this.
o Minor formatting tweaks in a couple places

Sponsored by: Netflix, Inc

8 years agoRemove commented out junk.
imp [Fri, 4 Dec 2015 23:44:34 +0000 (23:44 +0000)]
Remove commented out junk.

8 years agoioat(4): Add MODULE_VERSION so MODULE_DEPEND works
cem [Fri, 4 Dec 2015 23:31:32 +0000 (23:31 +0000)]
ioat(4): Add MODULE_VERSION so MODULE_DEPEND works

Suggested by: jhb
Review in progress: cc
Sponsored by: EMC / Isilon Storage Division

8 years agoSince this is an almost identical copy of ALIX_DSK, just include it
imp [Fri, 4 Dec 2015 23:22:07 +0000 (23:22 +0000)]
Since this is an almost identical copy of ALIX_DSK, just include it
and add the bits we need at the end.

8 years agoMake 16Gig chips to use new queue pointer registers.
mav [Fri, 4 Dec 2015 19:46:49 +0000 (19:46 +0000)]
Make 16Gig chips to use new queue pointer registers.

While 24xx-style ATIO and reply queue registers seems like still working,
request queue doesn't.  So instead of that use registers from PCI BAR(4).

8 years agoFix i386 build WITH_OFED=YES. Remove some redundant KASSERTs.
hselasky [Fri, 4 Dec 2015 18:20:55 +0000 (18:20 +0000)]
Fix i386 build WITH_OFED=YES. Remove some redundant KASSERTs.

Suggested by: kib, ian
Sponsored by: Mellanox Technologies
MFC after: 1 week

8 years agoAdd clang patch corresponding to r291701.
dim [Fri, 4 Dec 2015 17:23:19 +0000 (17:23 +0000)]
Add clang patch corresponding to r291701.

8 years agorc.subr: Check for running daemons before a custom start_cmd is executed.
jilles [Fri, 4 Dec 2015 16:32:29 +0000 (16:32 +0000)]
rc.subr: Check for running daemons before a custom start_cmd is executed.

Currently rc scripts implementing their own start_cmd do not enjoy the
benefits of rc.subr's own check for rc_pid.

This leads to around a third of ports with such a start_cmd not to check for
the process at all and two thirds of ports to re-implement this check
(sometimes wrongly).

This patch moves the check for rc_pid to before ${rc_arg}_cmd is executed.

Submitted by: Dirk Engling
Reviewed by: feld
MFC after: 1 week
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D4156

8 years agoAdd ahci_generic to the ahci module on arm64.
andrew [Fri, 4 Dec 2015 13:32:00 +0000 (13:32 +0000)]
Add ahci_generic to the ahci module on arm64.

Pointed out by: kib

8 years agoARC-1203 is supported since the latest driver update.
brueffer [Fri, 4 Dec 2015 10:34:58 +0000 (10:34 +0000)]
ARC-1203 is supported since the latest driver update.

8 years agoFix scope of bridge_header and bridge_pcix_cap in mthca_reset(..)
ngie [Fri, 4 Dec 2015 09:01:58 +0000 (09:01 +0000)]
Fix scope of bridge_header and bridge_pcix_cap in mthca_reset(..)

They're only used in the __linux__ case

Differential Revision: https://reviews.freebsd.org/D4332
MFC after: 1 week
Reported by: cppcheck
Reviewed by: hselasky
Sponsored by: EMC / Isilon Storage Division

8 years agoFix a bug where a stream reset request wasn't retranmitted when the
tuexen [Fri, 4 Dec 2015 08:49:27 +0000 (08:49 +0000)]
Fix a bug where a stream reset request wasn't retranmitted when the
peer indicated "In progress".

MFC after: 1 week

8 years agoFix 'install*' and many other missing targets with DIRDEPS_BUILD.
bdrewery [Fri, 4 Dec 2015 07:54:19 +0000 (07:54 +0000)]
Fix 'install*' and many other missing targets with DIRDEPS_BUILD.

My changes in r291635 broke 'make install*' for DIRDEPS_BUILD but also
revealed that some other targets were not guaranteed to be created if
there was a SUBDIR defined.  One example is 'installfiles' was never
defined if SUBDIR was not empty.

Sponsored by: EMC / Isilon Storage Division

8 years agoThe .if redirection on .WAIT is no longer needed with bmake.
bdrewery [Fri, 4 Dec 2015 07:54:16 +0000 (07:54 +0000)]
The .if redirection on .WAIT is no longer needed with bmake.

Sponsored by: EMC / Isilon Storage Division

8 years agoFix 'afterinstall' order not being respected after my changes in r291635.
bdrewery [Fri, 4 Dec 2015 07:54:13 +0000 (07:54 +0000)]
Fix 'afterinstall' order not being respected after my changes in r291635.

The problem was that 'afterinstall' was not coming after SUBDIRs were
installed which was the expectation at least in sys/modules for kldxref.

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

8 years agoRearrange some common logic.
bdrewery [Fri, 4 Dec 2015 07:54:04 +0000 (07:54 +0000)]
Rearrange some common logic.

8 years agosfxge: [EF10] support RxQ scattering control
arybchik [Fri, 4 Dec 2015 06:54:46 +0000 (06:54 +0000)]
sfxge: [EF10] support RxQ scattering control

If, for example, a VF is configured to use a 1500 byte MTU, but the port
it is attached to is set to 9000 bytes, overlength frames can be received
by the VF. As Huntington scatters by default, these overlength packets
would be scattered across several descriptors, with all except the last
having the CONT bit set.

To avoid this, disable scatter when creating RXQs if the firmware
supports doing so, which all recent versions do. Then we only get
a single descriptor from an overlength frame. This will have the CONT
bit set to indicate it was truncated, so we can discard it.

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

8 years agosfxge: add additional WRITESIZE value for NVRAM_INFO command
arybchik [Fri, 4 Dec 2015 06:51:37 +0000 (06:51 +0000)]
sfxge: add additional WRITESIZE value for NVRAM_INFO command

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

8 years agoRemove disconnected directory RETEST.
bdrewery [Fri, 4 Dec 2015 05:00:51 +0000 (05:00 +0000)]
Remove disconnected directory RETEST.

8 years agoCalculate MPATH for sys/modules to save 92% time in a basic 'obj' tree-walk.
bdrewery [Fri, 4 Dec 2015 04:27:21 +0000 (04:27 +0000)]
Calculate MPATH for sys/modules to save 92% time in a basic 'obj' tree-walk.

Sponsored by: EMC / Isilon Storage Division

8 years agoWe need to zero out the clustering variables in a freed vnode structure.
mckusick [Fri, 4 Dec 2015 03:54:18 +0000 (03:54 +0000)]
We need to zero out the clustering variables in a freed vnode structure.
For completeness add a VNASSERT that there are no threads waiting on a
range lock (this was previously checked on every vnode free).

Reported by; Rick Macklem
Fix from:    Mateusz Guzik
PR:          204949

8 years agoFix a style issue in g_disk_limit().
ken [Fri, 4 Dec 2015 03:44:12 +0000 (03:44 +0000)]
Fix a style issue in g_disk_limit().

Noticed by: bdrewery
MFC after: 1 week

8 years agoFix g_disk_vlist_limit() to work properly with deletes.
ken [Fri, 4 Dec 2015 03:38:35 +0000 (03:38 +0000)]
Fix g_disk_vlist_limit() to work properly with deletes.

Add a new bp argument to g_disk_maxsegs(), and add a new function,
g_disk_maxsize() tha will properly determine the maximum I/O size for a
delete or non-delete bio.

Submitted by: will
MFC after: 1 week
Sponsored by: Spectra Logic

8 years agoMove obscure lib/ installation of /usr/lib/include symlink to include/.
bdrewery [Fri, 4 Dec 2015 03:18:02 +0000 (03:18 +0000)]
Move obscure lib/ installation of /usr/lib/include symlink to include/.

This avoids the need for an afterinstall: hook and a check for LIBRARIES_ONLY.
It also now respects INCLUDEDIR.

This came in r249484.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd assertion for when LIBADD should be used rather than LDADD/DPADD.
bdrewery [Fri, 4 Dec 2015 03:17:59 +0000 (03:17 +0000)]
Add assertion for when LIBADD should be used rather than LDADD/DPADD.

Sponsored by: EMC / Isilon Storage Division

8 years agoFix LDADD/DPADD that should be LIBADD.
bdrewery [Fri, 4 Dec 2015 03:17:47 +0000 (03:17 +0000)]
Fix LDADD/DPADD that should be LIBADD.

Sponsored by: EMC / Isilon Storage Division

8 years agoRework unknown LIBADD assertion to be more clear and to not suggest adding
bdrewery [Fri, 4 Dec 2015 03:17:24 +0000 (03:17 +0000)]
Rework unknown LIBADD assertion to be more clear and to not suggest adding
DPADD/LDADD_<foo> variables that are a special case.

Sponsored by: EMC / Isilon Storage Division

8 years agoSupport all of the CDDL/ZFS libraries for LIBADD.
bdrewery [Fri, 4 Dec 2015 03:17:21 +0000 (03:17 +0000)]
Support all of the CDDL/ZFS libraries for LIBADD.

Sponsored by: EMC / Isilon Storage Division

8 years agoFor INTERNALLIB always add in the corresponding _DP_ and use LIBADD in
bdrewery [Fri, 4 Dec 2015 03:17:17 +0000 (03:17 +0000)]
For INTERNALLIB always add in the corresponding _DP_ and use LIBADD in
the real build file.

This lessens the need to define DPADD_<lib> and LDADD_<lib> to just very
special cases.

Sponsored by: EMC / Isilon Storage Division

8 years agoReplace ln -s calls with INSTALL_SYMLINK
bdrewery [Fri, 4 Dec 2015 03:17:14 +0000 (03:17 +0000)]
Replace ln -s calls with INSTALL_SYMLINK

Sponsored by: EMC / Isilon Storage Division