]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoPrepare for 11n - get the number of endpoints and whether 11n is available.
adrian [Thu, 17 Sep 2015 03:08:02 +0000 (03:08 +0000)]
Prepare for 11n - get the number of endpoints and whether 11n is available.

8 years agoBump RX_LIST_COUNT so we don't fall behind during active traffic.
adrian [Thu, 17 Sep 2015 03:01:55 +0000 (03:01 +0000)]
Bump RX_LIST_COUNT so we don't fall behind during active traffic.

8 years agoUse DELAY() rather than usb_pause_mtx() - the latter releases the lock
adrian [Thu, 17 Sep 2015 03:01:19 +0000 (03:01 +0000)]
Use DELAY() rather than usb_pause_mtx() - the latter releases the lock
before waiting, which prevents the lock from really acting like
a hardware serialiser.  Sigh.

8 years agoMETA_MODE: Don't define the default MAKEOBJDIR twice. Just expand the default.
bdrewery [Thu, 17 Sep 2015 00:17:32 +0000 (00:17 +0000)]
META_MODE: Don't define the default MAKEOBJDIR twice. Just expand the default.

Sponsored by: EMC / Isilon Storage Division

8 years agoFix kqueue write events for files > 2GB
smh [Thu, 17 Sep 2015 00:03:55 +0000 (00:03 +0000)]
Fix kqueue write events for files > 2GB

Due to the use of int's for file offsets in the VOP_WRITE_(PRE|POST)
macros, kqueue write events for files greater 2GB where never fired.

This caused tail -f on a file greater 2GB to never see updates.

MFC after: 1 week
Relnotes: YES
Sponsored by: Multiplay

8 years agoUpdate META_MODE architectures for universe
bdrewery [Wed, 16 Sep 2015 23:59:53 +0000 (23:59 +0000)]
Update META_MODE architectures for universe

8 years agoBlock secondary ITS instances from attaching on ARM64
zbb [Wed, 16 Sep 2015 23:59:45 +0000 (23:59 +0000)]
Block secondary ITS instances from attaching on ARM64

Currently FreeBSD supports only single PIC controller. Some systems
that have more than one (like ThunderX dual-socket) fails to boot.
Disable other PICes until proper handling is implemented in the
generic interrupt code.

Reviewed by:   imp
Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3682

8 years agoRelease memory for CPUs that fail to init on ARM64
zbb [Wed, 16 Sep 2015 23:46:20 +0000 (23:46 +0000)]
Release memory for CPUs that fail to init on ARM64

cpu_init_fdt will now release memory allocated for structures
serving CPUs that have failed to init.

Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3297

8 years agoAdd domain support to PCI bus allocation
zbb [Wed, 16 Sep 2015 23:34:51 +0000 (23:34 +0000)]
Add domain support to PCI bus allocation

When the system has more than a single PCI domain, the bus numbers
are not unique, thus they cannot be used for "pci" device numbering.
Change bus numbers to -1 (i.e. to-be-determined automatically)
wherever the code did not care about domains.

Reviewed by:   jhb
Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3406

8 years agoIf forwarders were specified on the command line, create an empty
des [Wed, 16 Sep 2015 23:09:31 +0000 (23:09 +0000)]
If forwarders were specified on the command line, create an empty
resolvconf.conf so that resolvconf won't replace the manually configured
forwarders with dynamically configured ones the next time the lease is
renewed.

8 years agoMETA_MODE: Don't create obj directories automatically when running make -V.
bdrewery [Wed, 16 Sep 2015 23:01:16 +0000 (23:01 +0000)]
META_MODE: Don't create obj directories automatically when running make -V.

Sponsored by: EMC / Isilon Storage Division

8 years agoFix reading after end of file for file-backed LUNs.
mav [Wed, 16 Sep 2015 21:43:51 +0000 (21:43 +0000)]
Fix reading after end of file for file-backed LUNs.

If backing file is smaller then the LUN size, we have to explicitly clear
the rest of the buffer to not leak some random data from previous I/Os.

8 years agoIn tcp_ctlinput() separate the (ip == NULL) block from the rest of the
glebius [Wed, 16 Sep 2015 21:42:33 +0000 (21:42 +0000)]
In tcp_ctlinput() separate the (ip == NULL) block from the rest of the
function to reduce so many levels of indentation.  Style the lines that
got now indentation reduced.  No functional change.

Checked with: md5

8 years agoMETA_MODE: Fix OBJROOT ending in two // when it does not yet exist.
bdrewery [Wed, 16 Sep 2015 20:58:43 +0000 (20:58 +0000)]
META_MODE: Fix OBJROOT ending in two // when it does not yet exist.

This would lead to the 2nd build (after the first with a missing OBJROOT) to
always rebuild everything as the 'command' would have changed due to the path
changing from having // to only /.

Sponsored by: EMC / Isilon Storage Division

8 years agoAlways clear TDB_USERWR before fetching system call arguments. The
jhb [Wed, 16 Sep 2015 20:55:00 +0000 (20:55 +0000)]
Always clear TDB_USERWR before fetching system call arguments.  The
TDB_USERWR flag may still be set after a debugger detaches from a
process via PT_DETACH.  Previously the flag would never be cleared
forcing a double fetch of the system call arguments for each system
call.  Note that the flag cannot be cleared at PT_DETACH time in case
one of the threads in the process is currently stopped in
syscallenter() and the debugger has modified the arguments for that
pending system call before detaching.

Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D3678

8 years agoFix check from r287867 for valid MAKEOBJDIR from top-level builds.
bdrewery [Wed, 16 Sep 2015 19:58:04 +0000 (19:58 +0000)]
Fix check from r287867 for valid MAKEOBJDIR from top-level builds.

MAKEOBJDIR is based on OBJTOP so cannot be expanded until OBJTOP is set.

Reported by: Nikolai Lifanov <lifanov@mail.lifanov.com>
Sponsored by: EMC / Isilon Storage Division

8 years agoMake COMPARE AND WRITE report offset of difference.
mav [Wed, 16 Sep 2015 18:33:04 +0000 (18:33 +0000)]
Make COMPARE AND WRITE report offset of difference.

8 years agoError and give better feedback for invalid MAKEOBJDIR settings.
bdrewery [Wed, 16 Sep 2015 18:02:04 +0000 (18:02 +0000)]
Error and give better feedback for invalid MAKEOBJDIR settings.

Submitted by: sjg

8 years agoFix fixed sense writing when passed more data then it can fit.
mav [Wed, 16 Sep 2015 17:56:24 +0000 (17:56 +0000)]
Fix fixed sense writing when passed more data then it can fit.

MFC after: 1 week

8 years agoIgnore CCACHE_DIR for meta mode decisions.
bdrewery [Wed, 16 Sep 2015 17:44:45 +0000 (17:44 +0000)]
Ignore CCACHE_DIR for meta mode decisions.

Sponsored by: EMC / Isilon Storage Division

8 years agoWhen a process group leader exits, all of the processes in the group are
jhb [Wed, 16 Sep 2015 16:40:07 +0000 (16:40 +0000)]
When a process group leader exits, all of the processes in the group are
sent SIGHUP and SIGCONT if any of the processes are stopped.  Currently this
behavior is triggered for any type of process stop including ptrace() stops
and transient stops for single threading during exit() and execve().
Thus, if a debugger is attached to a process in a group when the leader
exits, the entire group can be HUPed.  Instead, only send the signals if a
process in the group is stopped due to SIGSTOP.

PR: 201149
Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D3681

8 years agoFix build broken by r287861.
melifaro [Wed, 16 Sep 2015 15:40:08 +0000 (15:40 +0000)]
Fix build broken by r287861.

Spotted by: zb

8 years agoSimplify the way of attaching IPv6 link-layer header.
melifaro [Wed, 16 Sep 2015 14:26:28 +0000 (14:26 +0000)]
Simplify the way of attaching IPv6 link-layer header.

Problem description:
How do we currently perform layer 2 resolution and header imposition:

For IPv4 we have the following chain:
  ip_output() -> (ether|atm|whatever)_output() -> arpresolve()

Lookup is done in proper place (link-layer output routine) and it is possible
  to provide cached lle data.

For IPv6 situation is more complex:
  ip6_output() -> nd6_output() -> nd6_output_ifp() -> (whatever)_output() ->
    nd6_storelladdr()

We have ip6_ouput() which calls nd6_output() instead of link output routine.
nd6_output() does the following:
  * checks if lle exists, creates it if needed (similar to arpresolve())
  * performes lle state transitions (similar to arpresolve())
  * calls nd6_output_ifp() which pushes packets to link output routine along
    with running SeND/MAC hooks regardless of lle state
    (e.g. works as run-hooks placeholder).

After that, iface output routine like ether_output() calls nd6_storelladdr()
  which performs lle lookup once again.

As a result, we perform lookup twice for each outgoing packet for most types
  of interfaces. We also need to maintain runtime-checked table of 'nd6-free'
  interfaces (see nd6_need_cache()).

Fix this behavior by eliminating first ND lookup. To be more specific:
  * make all nd6_output() consumers use nd6_output_ifp() instead
  * rename nd6_output[_slow]() to nd6_resolve_[slow]()
  * convert nd6_resolve() and nd6_resolve_slow() to arpresolve() semantics,
    e.g. copy L2 address to buffer instead of pushing packet towards lower
    layers
  * Make all nd6_storelladdr() users use nd6_resolve()
  * eliminate nd6_storelladdr()

The resulting callchain is the following:
  ip6_output() -> nd6_output_ifp() -> (whatever)_output() -> nd6_resolve()

Error handling:
Currently sending packet to non-existing la results in ip6_<output|forward>
  -> nd6_output() -> nd6_output _lle() which returns 0.
In new scenario packet is propagated to <ether|whatever>_output() ->
  nd6_resolve() which will return EWOULDBLOCK, and that result
  will be converted to 0.

(And EWOULDBLOCK is actually used by IB/TOE code).

Sponsored by: Yandex LLC
Differential Revision: https://reviews.freebsd.org/D1469

8 years agoFrontends don't need to set errors themselves.
mav [Wed, 16 Sep 2015 13:25:35 +0000 (13:25 +0000)]
Frontends don't need to set errors themselves.

8 years agoUse KASSERT for some checks, that are late to do.
ae [Wed, 16 Sep 2015 13:17:00 +0000 (13:17 +0000)]
Use KASSERT for some checks, that are late to do.

Discussed with: melifaro, glebius

8 years agoConstantify lookup key in several nd6_* functions.
melifaro [Wed, 16 Sep 2015 11:06:07 +0000 (11:06 +0000)]
Constantify lookup key in several nd6_* functions.

8 years agoRemove superfluous m_freem().
oleg [Wed, 16 Sep 2015 10:07:45 +0000 (10:07 +0000)]
Remove superfluous m_freem().

MFC after: 1 month

8 years agoDon't flap the HA link if sysctl is reset to the same value.
mav [Wed, 16 Sep 2015 09:59:05 +0000 (09:59 +0000)]
Don't flap the HA link if sysctl is reset to the same value.

8 years agoUse M_WAITOK rather than M_NOWAIT since it's not used within
kevlo [Wed, 16 Sep 2015 07:26:18 +0000 (07:26 +0000)]
Use M_WAITOK rather than M_NOWAIT since it's not used within
interrupt context.

8 years agoFix a debug message which didn't quite get it right about eeprom version.
kevlo [Wed, 16 Sep 2015 07:18:54 +0000 (07:18 +0000)]
Fix a debug message which didn't quite get it right about eeprom version.

8 years agoRemove checks for a NULL return value from M_WAITOK allocations.
kevlo [Wed, 16 Sep 2015 07:16:21 +0000 (07:16 +0000)]
Remove checks for a NULL return value from M_WAITOK allocations.

8 years agoUnify loopback route switching:
melifaro [Wed, 16 Sep 2015 06:23:15 +0000 (06:23 +0000)]
Unify loopback route switching:
* prepare gateway before insertion
* use RTM_CHANGE instead of explicit find/change route
* Remove fib argument from ifa_switch_loopback_route added in r264887:
  if old ifp fib differes from new one, that the caller
  is doing something wrong
* Make ifa_*_loopback_route call single ifa_maintain_loopback_route().

8 years agoSimilar to r287844, create 'symlinks' cookie in proper place with -j and META_MODE.
bdrewery [Wed, 16 Sep 2015 04:27:12 +0000 (04:27 +0000)]
Similar to r287844, create 'symlinks' cookie in proper place with -j and META_MODE.

Sponsored by: EMC / Isilon Storage Division

8 years agoCreate 'copies' cookie in proper place in META_MODE.
bdrewery [Wed, 16 Sep 2015 04:07:39 +0000 (04:07 +0000)]
Create 'copies' cookie in proper place in META_MODE.

With -j the cookie would be created in CURDIR/sys/teken rather than OBJDIR.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd a number of models to the bsdinstall GPT hack blacklist
allanjude [Wed, 16 Sep 2015 03:32:27 +0000 (03:32 +0000)]
Add a number of models to the bsdinstall GPT hack blacklist

PR: 194359
Approved by: bapt (mentor)
MFC after: 2 weeks
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D3525

8 years agoMake ifconfig always exit with an error code if an important ioctl fails
allanjude [Wed, 16 Sep 2015 03:03:19 +0000 (03:03 +0000)]
Make ifconfig always exit with an error code if an important ioctl fails

PR: 203062
Arm Twisting by: Kristof Provost
Reviewed by: kp
Approved by: bapt (mentor)
MFC after: 2 weeks
Relnotes: yes
Sponsored by: ScaleEngine Inc.
Sponsored by: vBSDCon
Differential Revision: https://reviews.freebsd.org/D3644

8 years agoAdd ASUS Sandybridge laptops to the similar x2apic disable logic
adrian [Wed, 16 Sep 2015 01:44:11 +0000 (01:44 +0000)]
Add ASUS Sandybridge laptops to the similar x2apic disable logic
that was recently added for Lenovo laptops.

This is a prime candidate for conversion into a table and also
checking other fields like "product".

Tested:

* ASUS UX31E

8 years agoEnsure that the MAD agent's delayed taskqueue is completely stopped
markj [Tue, 15 Sep 2015 23:56:31 +0000 (23:56 +0000)]
Ensure that the MAD agent's delayed taskqueue is completely stopped
before proceeding. Otherwise, nothing prevents it from running after the
MAD agent struct has been been freed, and this results in a use-after-free
when the task's ta_pending count is incremented in the callout handler.

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

8 years agoarm64: add kbd.c to the build for ukbd to fix the build
emaste [Tue, 15 Sep 2015 23:44:19 +0000 (23:44 +0000)]
arm64: add kbd.c to the build for ukbd to fix the build

Pointy hat to: emaste

8 years agosysctl: switch sysctllock to a sleepable rmlock, take 2
mjg [Tue, 15 Sep 2015 23:06:56 +0000 (23:06 +0000)]
sysctl: switch sysctllock to a sleepable rmlock, take 2

This restores r285125. Previous attempt was reverted due to a bug in rmlocks,
which is fixed since r287833.

8 years agoThreads holding a read lock of a sleepable rm lock are not permitted
jhb [Tue, 15 Sep 2015 22:16:21 +0000 (22:16 +0000)]
Threads holding a read lock of a sleepable rm lock are not permitted
to sleep.  The rmlock implementation enforces this by disabling
sleeping when a read lock is acquired. To simplify the implementation,
sleeping is disabled for most of the duration of rm_rlock.  However,
it doesn't need to be disabled until the lock is acquired.  If a
sleepable rm lock is contested, then rm_rlock may need to acquire the
backing sx lock.  This tripped the overly-broad assertion.  Fix by
relaxing the assertion around the call to sx_xlock().

Reported by: mjg
Reviewed by: kib, mjg
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D3324

8 years agoRemove redundant 'man page'
brd [Tue, 15 Sep 2015 21:16:45 +0000 (21:16 +0000)]
Remove redundant 'man page'

Reviewed by: allanjude

8 years agokevent(2): Note DOOMED vnodes with NOTE_REVOKE
cem [Tue, 15 Sep 2015 20:22:30 +0000 (20:22 +0000)]
kevent(2): Note DOOMED vnodes with NOTE_REVOKE

In poll mode, check for and wake VBAD vnodes.  (Vnodes that are VBAD at
registration will never be woken by the RECLAIM trigger.)

Add post-VOP_RECLAIM hook to trigger notes on vnode reclamation.  (Vnodes that
were fine at registration but are vgoned while being monitored should signal
waiters.)

Reviewed by: kib
Approved by: markj (mentor)
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D3675

8 years agoRemove unnecessary tcp state transition call.
hiren [Tue, 15 Sep 2015 20:04:30 +0000 (20:04 +0000)]
Remove unnecessary tcp state transition call.

Differential Revision: D3451
Reviewed by: markj
MFC after: 2 weeks
Sponsored by: Limelight Networks

8 years agoarm64: add xhci driver and umass/ukbd to GENERIC for Cavium ThunderX
emaste [Tue, 15 Sep 2015 19:59:35 +0000 (19:59 +0000)]
arm64: add xhci driver and umass/ukbd to GENERIC for Cavium ThunderX

Sponsored by: The FreeBSD Foundation

8 years agoAdd support for Sierra MC7355 card
garga [Tue, 15 Sep 2015 18:21:56 +0000 (18:21 +0000)]
Add support for Sierra MC7355 card

Submitted by: Jeremy Porter <jporter@netgate.com>
Approved by: loos
Obtained from: pfSense
MFC after: 1 week
Sponsored by: Rubicon Communications (Netgate)

8 years agoAdd a way to specify stripesize and stripeoffset to gnop(8). This makes
trasz [Tue, 15 Sep 2015 18:01:59 +0000 (18:01 +0000)]
Add a way to specify stripesize and stripeoffset to gnop(8). This makes
it possible to "simulate" 4K media, to eg test alignment handling.

Reviewed by: mav@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3664

8 years agoSimplify nd6_cache_lladdr:
melifaro [Tue, 15 Sep 2015 17:16:31 +0000 (17:16 +0000)]
Simplify nd6_cache_lladdr:
* Move isRouter calculation code to separate nd6_is_router() function.
* Make nd6_cache_lladdr() return void: its return value hasn't been used
  since r53541 KAME import in 1999.

Sponsored by: Yandex LLC

8 years agoAdd Cavium ThunderX xHCI controller PCI ID
emaste [Tue, 15 Sep 2015 16:08:25 +0000 (16:08 +0000)]
Add Cavium ThunderX xHCI controller PCI ID

There is an issue with interrupts at the moment, but it works with
polling mode set (hw.usb.xhci.use_polling=1).

Reviewed by: hselasky
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3665

8 years agoFix grammer in an error message
brd [Tue, 15 Sep 2015 14:24:19 +0000 (14:24 +0000)]
Fix grammer in an error message

PR: 202310
Submitted by: Chris Petrik <chris@bsdjunk.com>
Approved by: will

8 years agoAdd ctl-lun config option for consistency in HA setups.
mav [Tue, 15 Sep 2015 13:37:48 +0000 (13:37 +0000)]
Add ctl-lun config option for consistency in HA setups.

8 years agoBump .Dd.
pluknet [Tue, 15 Sep 2015 13:24:52 +0000 (13:24 +0000)]
Bump .Dd.

8 years agoDocument NGM_PPPOE_SETMAXP.
glebius [Tue, 15 Sep 2015 12:19:01 +0000 (12:19 +0000)]
Document NGM_PPPOE_SETMAXP.

Submitted by: Dmitry Luhtionov <dmitryluhtionov gmail.com>

8 years agoPerform I2C transmission in a single burst when mode is "none" or not set
zbb [Tue, 15 Sep 2015 11:21:16 +0000 (11:21 +0000)]
Perform I2C transmission in a single burst when mode is "none" or not set

Some more automated I2C controllers cannot explicitly create
START/STOP/etc. conditions on the bus.
Instead, the correct condition is set automatically according
to the pending transfer status.
This particular behavior can cause trouble if some I2C slave
requires sending address offset within the chip followed by
the actual data or command. In that case we cannot assume that
the driver will not STOP immediately after sending
offset.

To avoid that, do not split offset transfer from data transfer
for default transmission modes and do exactly that if requested
in command line (stop-start and repeated-start modes).
This more generic approach should cover special cases like
the one described.

Reviewed by:   imp
Submitted by:  Marcin Mazurek <mma@semihalf.com>
Obtained from: Semihalf

8 years agoMake CAM log errors that make it wait.
mav [Tue, 15 Sep 2015 10:57:16 +0000 (10:57 +0000)]
Make CAM log errors that make it wait.

Waiting can take minutes, and it would be good for user to know what is
going on.

MFC after: 2 weeks

8 years agoFix completion/error status reporting.
mav [Tue, 15 Sep 2015 10:42:53 +0000 (10:42 +0000)]
Fix completion/error status reporting.

8 years agoClose potential race between datamove and HA failover.
mav [Tue, 15 Sep 2015 09:36:46 +0000 (09:36 +0000)]
Close potential race between datamove and HA failover.

8 years ago* Improve logging invalid arp messages
melifaro [Tue, 15 Sep 2015 08:50:44 +0000 (08:50 +0000)]
* Improve logging invalid arp messages
* Remove redundant check in ip_arpinput

Suggested by: glebius
MFC after: 2 weeks

8 years ago* Require explicitl lle unlink prior to calling llentry_delete().
melifaro [Tue, 15 Sep 2015 06:48:19 +0000 (06:48 +0000)]
* Require explicitl lle unlink prior to calling llentry_delete().
  This one slightly decreases time of holding afdata wlock.
* While here, make nd6_free() return void. No one has used its return value
  since r186119.

8 years agoRemove an unneeded typedef of ip6_t from the DTrace ip provider library.
markj [Tue, 15 Sep 2015 05:16:26 +0000 (05:16 +0000)]
Remove an unneeded typedef of ip6_t from the DTrace ip provider library.
It causes an error when ipfilter is enabled, since ipl.ko contains an
identical typedef.

PR: 203092
MFC after: 1 week

8 years agoPreserve the device queue status before retrying a sense request in
markj [Tue, 15 Sep 2015 05:09:17 +0000 (05:09 +0000)]
Preserve the device queue status before retrying a sense request in
chdone(). Previously, the retry could clear the CAM_DEV_QFRZN bit in the
CCB status, leaving the queue frozen.

Submitted by: Jeff Miller <Jeff.Miller@isilon.com>
Reviewed by: ken
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoUnconditionally build CTF tools in the bootstrap-tools phase of the build.
markj [Tue, 15 Sep 2015 05:01:44 +0000 (05:01 +0000)]
Unconditionally build CTF tools in the bootstrap-tools phase of the build.

Stale CTF tools are a frequent source of DTrace issues, and they compile
quickly enough that the increase in build time is negligible.

Reviewed by: emaste, imp
Differential Revision: https://reviews.freebsd.org/D3670

8 years agoReplace the scan event input path hack with the new rx-stats based method.
adrian [Tue, 15 Sep 2015 03:01:40 +0000 (03:01 +0000)]
Replace the scan event input path hack with the new rx-stats based method.
This allows for arbitrary channel info to be placed in the input call rather
than the totally gross hack of overriding ic_curchan.

Without this I'm sure ic_curchan setting was racing with the scan code
setting the channel itself..

8 years agoFix code typo (no functional change)
dteske [Mon, 14 Sep 2015 21:26:48 +0000 (21:26 +0000)]
Fix code typo (no functional change)

MFC after: 3 days
X-MFC-to: stable/10

8 years agoRegression: fix usershow -7
bapt [Mon, 14 Sep 2015 19:23:00 +0000 (19:23 +0000)]
Regression: fix usershow -7

Submitted by: Dan McGregor (via IRC)
MFC after: 2 days

8 years agoFix the handling of IPv6 On-Link Redirects.
vangyzen [Mon, 14 Sep 2015 19:17:25 +0000 (19:17 +0000)]
Fix the handling of IPv6 On-Link Redirects.

On receipt of a redirect message, install an interface route for the
redirected destination.  On removal of the corresponding Neighbor Cache
entry, remove the interface route.

This requires changes in rtredirect_fib() to cope with an AF_LINK
address for the gateway and with the absence of RTF_GATEWAY.

This fixes the "Redirected On-Link" test cases in the Tahi IPv6 Ready Logo
Phase 2 test suite.

Unrelated to the above, fix a recursion on the radix node head lock
triggered by the Tahi Redirected to Alternate Router test cases.

When I first wrote this patch in October 2012, all Section 2
(Neighbor Discovery) test cases passed on 10-CURRENT, 9-STABLE,
and 8-STABLE.  cem@ recently rebased the 10.x patch onto head and reported
that it passes Tahi.  (Thanks!)

These other test cases also passed in 2012:

* the RTF_MODIFIED case, with IPv4 and IPv6 (using a
  RTF_HOST|RTF_GATEWAY route for the destination)

* the redirected-to-self case, with IPv4 and IPv6

* a valid IPv4 redirect

All testing in 2012 was done with WITNESS and INVARIANTS.

Tested by:    EMC / Isilon Storage Division via Conrad Meyer (cem) in 2015,
              Mark Kelley <mark_kelley@dell.com> in 2012,
              TC Telkamp <terence_telkamp@dell.com> in 2012
PR:           152791
Reviewed by:  melifaro (current rev), bz (earlier rev)
Approved by:  kib (mentor)
MFC after:    1 month
Relnotes:     yes
Sponsored by: Dell Inc.
Differential Revision: https://reviews.freebsd.org/D3602

8 years agoUse unsigned variables in a few places.
rodrigc [Mon, 14 Sep 2015 18:59:01 +0000 (18:59 +0000)]
Use unsigned variables in a few places.

Eliminates gcc 4.9 warnings.

8 years agoUse ANSI C prototypes.
rodrigc [Mon, 14 Sep 2015 18:44:13 +0000 (18:44 +0000)]
Use ANSI C prototypes.

Eliminates gcc 4.9 warnings.

8 years ago* Do more fine-grained locking: call eventhandlers/free_entry
melifaro [Mon, 14 Sep 2015 16:48:19 +0000 (16:48 +0000)]
* Do more fine-grained locking: call eventhandlers/free_entry
  without holding afdata wlock
* convert per-af delete_address callback to global lltable_delete_entry() and
  more low-level "delete this lle" per-af callback
* fix some bugs/inconsistencies in IPv4/IPv6 ifscrub procedures

Sponsored by: Yandex LLC
Differential Revision: https://reviews.freebsd.org/D3573

8 years agoMake it clear that 'swapuse' is swap reservation and not actual swap usage.
trasz [Mon, 14 Sep 2015 15:37:19 +0000 (15:37 +0000)]
Make it clear that 'swapuse' is swap reservation and not actual swap usage.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoImplement data/status aggregation for secondary HA node.
mav [Mon, 14 Sep 2015 15:21:23 +0000 (15:21 +0000)]
Implement data/status aggregation for secondary HA node.

For short read requests this reduces latency by 30%, reporting command
completion after two interlink roundtrips instead of full three.

8 years agoImplement data/status aggregation for camsim backend.
mav [Mon, 14 Sep 2015 15:15:32 +0000 (15:15 +0000)]
Implement data/status aggregation for camsim backend.

This is almost pointless for primary HA node, but useful for secondary,
where between fe_datamove and fe_done calls goes another link roundtrip.

8 years agoAdd missing BINDIR variable.
hselasky [Mon, 14 Sep 2015 12:25:45 +0000 (12:25 +0000)]
Add missing BINDIR variable.

8 years agoImplement callout_drain_async(), inspired by the projects/hps_head
hselasky [Mon, 14 Sep 2015 10:52:26 +0000 (10:52 +0000)]
Implement callout_drain_async(), inspired by the projects/hps_head
branch.

This function is used to drain a callout via a callback instead of
blocking the caller until the drain is complete. Refer to the
callout_drain_async() manual page for a detailed description.

Limitation: If a lock is used with the callout, the callout can only
be drained asynchronously one time unless the callout_init_mtx()
function is called again. This limitation is not present in
projects/hps_head and will require more invasive changes to the
timeout code, which was not in the scope of this patch.

Differential Revision: https://reviews.freebsd.org/D3521
Reviewed by: wblock
MFC after: 1 month

8 years ago* Improve error checking for arp messages.
melifaro [Mon, 14 Sep 2015 10:28:47 +0000 (10:28 +0000)]
* Improve error checking for arp messages.
* Clean stale headers from if_ether.c.

Reported by: rozhuk.im at gmail.com
Reviewed by: ae
MFC after: 2 weeks

8 years agoRemove CTL_PRIV_LBA_LEN from HA messages.
mav [Mon, 14 Sep 2015 09:56:01 +0000 (09:56 +0000)]
Remove CTL_PRIV_LBA_LEN from HA messages.

Previously it was used for statistics, but now just a 16 extra bytes.

8 years agoUpdate TSO limits to include all headers.
hselasky [Mon, 14 Sep 2015 08:36:22 +0000 (08:36 +0000)]
Update TSO limits to include all headers.

To make driver programming easier the TSO limits are changed to
reflect the values used in the BUSDMA tag a network adapter driver is
using. The TCP/IP network stack will subtract space for all linklevel
and protocol level headers and ensure that the full mbuf chain passed
to the network adapter fits within the given limits.

Implementation notes:

If a network adapter driver needs to fixup the first mbuf in order to
support VLAN tag insertion, the size of the VLAN tag should be
subtracted from the TSO limit. Else not.

Network adapters which typically inline the complete header mbuf could
technically transmit one more segment. This patch does not implement a
mechanism to recover the last segment for data transmission. It is
believed when sufficiently large mbuf clusters are used, the segment
limit will not be reached and recovering the last segment will not
have any effect.

The current TSO algorithm tries to send MTU-sized packets, where the
MTU typically is 1500 bytes, which gives 1448 bytes of TCP data
payload per packet for IPv4. That means if the TSO length limitiation
is set to 65536 bytes, there will be a data payload remainder of
(65536 - 1500) mod 1448 bytes which is equal to 324 bytes. Trying to
recover total TSO length due to inlining mbuf header data will not
have any effect, because adding or removing the ETH/IP/TCP headers
to or from 324 bytes will not cause more or less TCP payload to be
TSO'ed.

Existing network adapter limits will be updated separately.

Differential Revision: https://reviews.freebsd.org/D3458
Reviewed by: rmacklem
MFC after: 2 weeks

8 years agoImplement QUERY TASK, QUERY TASK SET and QUERY ASYNC EVENT.
mav [Mon, 14 Sep 2015 08:01:05 +0000 (08:01 +0000)]
Implement QUERY TASK, QUERY TASK SET and QUERY ASYNC EVENT.

Now we support most of SAM-5 task management.

8 years agoAdd missing file to build.
hselasky [Mon, 14 Sep 2015 07:11:53 +0000 (07:11 +0000)]
Add missing file to build.

8 years agoCorrect PCI ID.
hselasky [Mon, 14 Sep 2015 07:08:29 +0000 (07:08 +0000)]
Correct PCI ID.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after: 1 month
PR: 202807

8 years agoMFV r286224: 5695 dmu_sync'ed holes do not retain birth time
delphij [Mon, 14 Sep 2015 06:10:49 +0000 (06:10 +0000)]
MFV r286224: 5695 dmu_sync'ed holes do not retain birth time
(userland portion that was not merged in r286677)

Update zdb to also print ltime, type, and level information
for these new style holes. Previously, only the logical birth
time would be printed.

8 years agoMFV r277429:
delphij [Mon, 14 Sep 2015 06:00:50 +0000 (06:00 +0000)]
MFV r277429:

Document -S option when zfs inherit fails on quota and
in manual pages.

Illumos ZFS issues:

    5410 Document -S option to zfs inherit
    https://illumos.org/issues/5410

    5412 Mention -S option when zfs inherit fails on quota
    https://illumos.org/issues/5412

illumos/illumos-gate@5ff8cfa92ec8ea0f8593ad21aa2a04829b0ef5ea

MFC after: 2 weeks

8 years agoAdd preliminary support for RTL8168H, tested by Sreenath Battalahalli.
marius [Sun, 13 Sep 2015 22:22:30 +0000 (22:22 +0000)]
Add preliminary support for RTL8168H, tested by Sreenath Battalahalli.

MFC after: 1 week

8 years ago- Sanity check that the parent ranges given in the "ranges" property
marius [Sun, 13 Sep 2015 21:59:56 +0000 (21:59 +0000)]
- Sanity check that the parent ranges given in the "ranges" property
  of PCI-EBus-bridges actually match the BARs as specified in and
  required by [1, p. 113 f.]. Doing so earlier would have simplified
  diagnosing a bug in QEMU/OpenBIOS getting the mapping of child
  addresses wrong, which still needs to be fixed there.
  In theory, we could try to change the BARs accordingly if we hit
  this problem. However, at least with real machines changing the
  decoding likely won't work, especially if the PCI-EBus-bridge is
  beneath an APB one. So implementing such functionality generally
  is rather pointless.
- Actually change the allocation type of EBus resources if they
  change from SYS_RES_MEMORY to SYS_RES_IOPORT when mapping them
  to PCI ranges in ebus_alloc_resource() and passing them up to
  bus_activate_resource(9). This may happen with the QEMU/OpenBIOS
  PCI-EBus-bridge but not real ones. Still, this is only cleans up
  the code and the result of resource allocation and activation is
  unchanged.
- Change the remainder of printf(9) to device_printf(9) calls and
  canonicalize their wording.

MFC after: 1 week

Peripheral Component Interconnect Input Output Controller,
Part No.: 802-7837-01, Sun Microelectronics, March 1997 [1]

8 years agoAdd negotiation of iSCSIProtocolLevel to 2 (RFC7144).
mav [Sun, 13 Sep 2015 20:58:22 +0000 (20:58 +0000)]
Add negotiation of iSCSIProtocolLevel to 2 (RFC7144).

We may need to pass negotiated value to kernel level, but so far it is
not necessary, since it does not use any new features without request.

8 years agoMap CLEAR TASK SET and I_T NEXUS RESET for iSCSI.
mav [Sun, 13 Sep 2015 20:40:00 +0000 (20:40 +0000)]
Map CLEAR TASK SET and I_T NEXUS RESET for iSCSI.

The last should not be called without iSCSIProtocolLevel negotiation.

8 years agoImplement iSCSI TARGET COLD RESET task management function.
mav [Sun, 13 Sep 2015 20:22:18 +0000 (20:22 +0000)]
Implement iSCSI TARGET COLD RESET task management function.

Implement it as CTL_TASK_TARGET_RESET plus termination of all sessions.

8 years agoDisable mgmt frame sending in if_rsu.
adrian [Sun, 13 Sep 2015 19:17:26 +0000 (19:17 +0000)]
Disable mgmt frame sending in if_rsu.

The firmware in this NIC sends management frames.  So far I'm not sure which
ones it handles and which ones it doesn't handle - but this is what openbsd
does.

The association messages are handled by the firmware; the key negotiation
for 802.1x and WPA are done as raw frames, not management frames.

This successfully allows it to associate to my home networks whereas it didn't
work beforehand.

Tested:

* RTL8712, cut 3, STA mode

TODO:

* The firmware does send a join response with a status code; that should be
  logged in a more obvious way to assist with debugging.  Ie, the firmware
  is the thing that is saying "couldn't join, sorry!", not net80211.

8 years agoUpdate em(4) with D3162 after testing further on hardware that failed
sbruno [Sun, 13 Sep 2015 18:26:05 +0000 (18:26 +0000)]
Update em(4) with D3162 after testing further on hardware that failed
to attach with the last version of this commit. This commit fixes
attach failures on "ICH8" class devices via modifications to
e1000_init_nvm_params_ich8lan()

-   Fix compiler warning in 80003es2lan.c
-   Add return value handler for e1000_*_kmrn_reg_80003es2lan
-   Fix usage of DEBUGOUT
-   Remove unnecessary variable initializations.
-   Removed unused variables (complaints from gcc).
-   Edit defines in 82571.h.
-   Add workaround for igb hw errata.
-   Shared code changes for Skylake/I219 support.
-   Remove unused OBFF and LTR functions.

Tested by some of the folks that reported breakage in previous incarnation.
Thanks to AllanJude, gjb, gnn, tijl for tempting fate with their machines.

Submitted by: erj@freebsd.org
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D3162

8 years agodb/recno: Open with close-on-exec like btree and hash do.
jilles [Sun, 13 Sep 2015 17:17:52 +0000 (17:17 +0000)]
db/recno: Open with close-on-exec like btree and hash do.

8 years agoImprove read-only support.
mav [Sun, 13 Sep 2015 16:49:41 +0000 (16:49 +0000)]
Improve read-only support.

8 years agodd DTrace probe points, translators and a corresponding script
gnn [Sun, 13 Sep 2015 15:50:55 +0000 (15:50 +0000)]
dd DTrace probe points, translators and a corresponding script
to provide the TCPDEBUG functionality with pure DTrace.

Reviewed by: rwatson
MFC after: 2 weeks
Sponsored by: Limelight Networks
Differential Revision: D3530

8 years agoReannounce port to HA peer if LUN map changed after online.
mav [Sun, 13 Sep 2015 15:31:55 +0000 (15:31 +0000)]
Reannounce port to HA peer if LUN map changed after online.

8 years agoWhen updating port, apply only change of LUN map, not whole.
mav [Sun, 13 Sep 2015 15:08:06 +0000 (15:08 +0000)]
When updating port, apply only change of LUN map, not whole.

8 years agoReport INQUIRY DATA HAS CHANGED for related LUNs on port on-/offline.
mav [Sun, 13 Sep 2015 14:52:31 +0000 (14:52 +0000)]
Report INQUIRY DATA HAS CHANGED for related LUNs on port on-/offline.

8 years agoReport CTL_UA_LUN_CHANGE on LUN map change.
mav [Sun, 13 Sep 2015 14:04:42 +0000 (14:04 +0000)]
Report CTL_UA_LUN_CHANGE on LUN map change.

8 years agosetuid(2): Suggest O_CLOEXEC instead of fcntl(F_SETFD).
jilles [Sun, 13 Sep 2015 14:00:49 +0000 (14:00 +0000)]
setuid(2): Suggest O_CLOEXEC instead of fcntl(F_SETFD).

8 years agoMake TARGET RESET respect LUN mapping.
mav [Sun, 13 Sep 2015 13:00:20 +0000 (13:00 +0000)]
Make TARGET RESET respect LUN mapping.

8 years agoAdd ID for Intel Panther Point KT Controller
mav [Sun, 13 Sep 2015 12:08:25 +0000 (12:08 +0000)]
Add ID for Intel Panther Point KT Controller

Found on ASUS P8Q77-M motherboard.

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

8 years agoMFV r287623: 5997 FRU field not set during pool creation and never
delphij [Sun, 13 Sep 2015 07:15:14 +0000 (07:15 +0000)]
MFV r287623: 5997 FRU field not set during pool creation and never
updated

ZFS already supports storing the vdev FRU in a vdev property.  There
is code in libzfs to work with this property, and there is code in
the zfs-retire FMA module that looks for that information.  But there
is no code actually setting or updating the FRU.

To address this, ZFS is changed to send a handful of new events
whenever a vdev is added, attached, cleared, or onlined, as well
as when a pool is created or imported.

Note that syseventd is not currently available on FreeBSD and thus
some work is needed to actually support the new ZFS events (e.g. in
zfsd) to actually use this capability, this changeset is mostly a
diff reduction from upstream.

illumos/illumos-gate@1437283407f89cab03860accf49408f94559bc34

Illumos issues:

    5997 FRU field not set during pool creation and never updated
    https://www.illumos.org/issues/5997