]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoMerge -fstandalone-debug from Clang r198655:
emaste [Wed, 7 May 2014 00:51:24 +0000 (00:51 +0000)]
Merge -fstandalone-debug from Clang r198655:

  Implement a new -fstandalone-debug option. rdar://problem/15685848
  It controls everything that -flimit-debug-info used to, plus the
  vtable type optimization. The old -fno-limit-debug-info option is now an
  alias to -fstandalone-debug and vice versa.

  Standalone is the default on Darwin until dtrace is updated to work with
  non-standalone debug info (rdar://problem/15758808).

  Note: I kept the LimitedDebugInfo name in CodeGenOptions::DebugInfoKind
  because NoStandaloneDebugInfo sounded even more confusing.

10 years agoBump the default C-state to Cmax, rather than the kernel default
adrian [Tue, 6 May 2014 23:28:37 +0000 (23:28 +0000)]
Bump the default C-state to Cmax, rather than the kernel default
of C1.

This may not stay through 11.0-RELEASE, but at least having it
on by default in -HEAD will expose (more) issues with broken hardware.

Note: I have no plans or desire to MFC this to stable/10.

10 years agoChange the device name for mpr(4) from /dev/mpr_N to /dev/mprN.
ken [Tue, 6 May 2014 22:13:38 +0000 (22:13 +0000)]
Change the device name for mpr(4) from /dev/mpr_N to /dev/mprN.

This is more consistent with the existing mps(4) behavior.

Reviewed by: Steve McConnell <stephen.mcconnell@avagotech.com>
MFC after: 3 days

10 years agodd(1) uses gettimeofday(2) to compute the throughput statistics. However,
asomers [Tue, 6 May 2014 22:06:39 +0000 (22:06 +0000)]
dd(1) uses gettimeofday(2) to compute the throughput statistics.  However,
gettimeofday returns the system clock, which may jump forward or back,
especially if NTP is in use.  If the time jumps backwards, then dd will see
negative elapsed time, round it up to 1usec, and print an absurdly fast
transfer rate.

The solution is to use clock_gettime(2) with CLOCK_MONOTONIC_PRECISE as the
clock_id.  That clock advances steadily, regardless of changes to the system
clock.

Reviewed by: delphij
MFC after: 3 days
Sponsored by: Spectra Logic

10 years agoAdd mkimg_write() which combines lseek(2) and write(2) and uses
marcel [Tue, 6 May 2014 21:54:05 +0000 (21:54 +0000)]
Add mkimg_write() which combines lseek(2) and write(2) and uses
sector granularity for both offset and length. Have all schemes
use mkimg_write() instead of mkimg_seek() followed by write(2).

Now that schemes don't use lseek(2) nor write(2) directly, it's
easier to support output formats other than raw disks.

10 years agoAdd missing svn:keywords property.
marcel [Tue, 6 May 2014 21:51:16 +0000 (21:51 +0000)]
Add missing svn:keywords property.

10 years agoDon't reply monlist request when it's not enabled.
delphij [Tue, 6 May 2014 21:34:01 +0000 (21:34 +0000)]
Don't reply monlist request when it's not enabled.

No objection from: roberto (but all bugs are mine)
MFC after: 2 weeks

10 years agoSort .ALLSRC before concatenating files together. This makes sure that the
delphij [Tue, 6 May 2014 21:30:58 +0000 (21:30 +0000)]
Sort .ALLSRC before concatenating files together.  This makes sure that the
file are always built the same.

(Note that Header and Localstuff must appear first and in that order, the
sorting does not affect as a coincident effect).

Submitted by: sjg
MFC after: 3 days

10 years agoDue to reasons unknown at this time, the system can be forced to write
scottl [Tue, 6 May 2014 20:40:16 +0000 (20:40 +0000)]
Due to reasons unknown at this time, the system can be forced to write
a journal block even when there are no journal entries to be written.
Until the root cause is found, handle this case by ensuring that a
valid journal segment is always written.

Second, the data buffer used for writing journal entries was never
being scrubbed of old data.  Fix this.

Submitted by: Takehara Mikihito
Obtained from: Netflix, Inc.
MFC after: 3 days

10 years agoIn apm_write(), both fd and imgsz are referenced, so don't mark the
marcel [Tue, 6 May 2014 20:34:21 +0000 (20:34 +0000)]
In apm_write(), both fd and imgsz are referenced, so don't mark the
arguments as unused.

10 years agoImport George Wilson's change for Illumos #4730:
delphij [Tue, 6 May 2014 19:03:04 +0000 (19:03 +0000)]
Import George Wilson's change for Illumos #4730:

4730 metaslab group taskq should be destroyed in metaslab_group_destroy()
Reviewed by: Alex Reece <alex.reece@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>

Original author: George Wilson

MFC after: 3 days

10 years agoAdd a postinit debugger hook to rtld. This will be used by dtrace(1) to halt
markj [Tue, 6 May 2014 18:07:58 +0000 (18:07 +0000)]
Add a postinit debugger hook to rtld. This will be used by dtrace(1) to halt
the victim process before its entry point is called, at which point probes
and DOF data are registered with the kernel. The r_debug_state hook cannot
be used for this purpose, as it is called before the program's init routines
are invoked and in particular before DOF data is registered (via drti.o).

Reviewed by: kib
MFC after: 2 weeks

10 years agoRemove unused code. This is triggered by the bugreport of Sylvestre Ledru
tuexen [Tue, 6 May 2014 16:51:07 +0000 (16:51 +0000)]
Remove unused code. This is triggered by the bugreport of Sylvestre Ledru
which deal with useless code in the user land stack:
https://bugzilla.mozilla.org/show_bug.cgi?id=1003929

MFC after: 3 days

10 years ago- Allow foot shooting with the resetconfig command via the -f option.
marius [Tue, 6 May 2014 16:29:02 +0000 (16:29 +0000)]
- Allow foot shooting with the resetconfig command via the -f option.
- Fix typos preventing -f to actually work with the create command.
- Initialize flags to zero rather than using stack garbage when handling
  the grow command.

MFC after: 3 days
Sponsored by: Bally Wulff Games & Entertainment GmbH

10 years agoNo need to install man pages for bootstrapping new make. Some
imp [Tue, 6 May 2014 15:44:46 +0000 (15:44 +0000)]
No need to install man pages for bootstrapping new make. Some
environments (that I can't reproduce locally, but that others have
reported) seem to get tripped up by this man page install. There's
really no need to do it, so turn off the man pages using the most
portable method. We can't just directly set MK_MAN=no here because
we're bootstrapping in the host environment and such a setting was
forbidden until very recently. NO_MAN= can produce a warning, but for
now the warning is benign.

10 years agoTime to prune entries for RELENG_7 and stable/8. They are still in
imp [Tue, 6 May 2014 15:44:41 +0000 (15:44 +0000)]
Time to prune entries for RELENG_7 and stable/8. They are still in
svn, for the historically minded.

10 years agoAdd helpful note about possible workarounds for (as yet) unknown
imp [Tue, 6 May 2014 15:44:34 +0000 (15:44 +0000)]
Add helpful note about possible workarounds for (as yet) unknown
breakage. Also fix typo.

10 years agoFix the upgrade path for fmake by allowing the include of src.opts.mk
imp [Tue, 6 May 2014 14:33:18 +0000 (14:33 +0000)]
Fix the upgrade path for fmake by allowing the include of src.opts.mk
to fail and falling back on the conservative testing of variables
already in place. This should stop the tide of tinderbox mail.

10 years agoEnable PL310 power-saving modes and tune the cache ram latencies for imx6.
ian [Tue, 6 May 2014 14:26:24 +0000 (14:26 +0000)]
Enable PL310 power-saving modes and tune the cache ram latencies for imx6.

10 years agoAdd a public routine to set the L2 cache ram latencies. This can be
ian [Tue, 6 May 2014 14:19:54 +0000 (14:19 +0000)]
Add a public routine to set the L2 cache ram latencies.  This can be
called by platform init routines to fine-tune cache performance.

10 years agoAdd defines for the bits in the PL310 debug control register.
ian [Tue, 6 May 2014 14:08:42 +0000 (14:08 +0000)]
Add defines for the bits in the PL310 debug control register.

This should have been part of r265444.

10 years agoCall platform_pl310_init() before enabling the controller, and handle the
ian [Tue, 6 May 2014 14:03:35 +0000 (14:03 +0000)]
Call platform_pl310_init() before enabling the controller, and handle the
case where the controller is already enabled.

Some of the pl310 configuration registers cannot be changed while the
controller is active, so if there is any platform-specific init to be done
it must happen before enabling the controller.

The controller should not be enabled upon entry to the kernel, but u-boot
has recently developed the bad habit of leaving caches enabled when
launching the kernel, and since we have no control over that source code
we have to do our best to cope with it.  The PL310 manual doesn't document
a safe sequence for disabling the controller, but the sequence used here
(force write-through mode and disable linefill allocations, then clean and
invalidate the current contents before disabling the hardware) appears to
be sound both by analysis and empirical testing.

These changes were developed and tested in collaboration with
Svatopluk Kraus <onwahe@gmail.com>.

Reviewed by: cognet@

10 years agoRevert r265436, since it is not the correct fix.
se [Tue, 6 May 2014 14:01:48 +0000 (14:01 +0000)]
Revert r265436, since it is not the correct fix.

10 years agoImplement KDMKTONE ioctl.
ray [Tue, 6 May 2014 13:52:13 +0000 (13:52 +0000)]
Implement KDMKTONE ioctl.

Submitted by: Matthew D.Fuller <fullermd@over-yonder.net> (original version)
MFC: 7 days
PR: kern/189170

Sponsored by: The FreeBSD Foundation

10 years agoBreak out the code that figures out the L2 cache geometry to its own
ian [Tue, 6 May 2014 13:46:36 +0000 (13:46 +0000)]
Break out the code that figures out the L2 cache geometry to its own
routine, so that it can be called from multiple places in upcoming changes.

10 years agoMove the pl310.enabled tunable to hw.pl310.enabled. Clean up a few minor
ian [Tue, 6 May 2014 13:38:34 +0000 (13:38 +0000)]
Move the pl310.enabled tunable to hw.pl310.enabled.  Clean up a few minor
style(9) nits.  Use DEVMETHOD_END.

10 years agoFix include statement to accept src.opts.mk from a source directory
se [Tue, 6 May 2014 12:31:17 +0000 (12:31 +0000)]
Fix include statement to accept src.opts.mk from a source directory
instead of from /usr/share/mk.

I'm not sure that this will let buildworld complete on a system with
no installed src.opts.mk (make buildworld is still running), but the
tinderbox builds are all failing earlyon without this patch.

10 years agoFix buildkernel breakage, which was fall-out from the move of options to
se [Tue, 6 May 2014 11:12:56 +0000 (11:12 +0000)]
Fix buildkernel breakage, which was fall-out from the move of options to
src.opts.mk.

10 years agoSpell raccdt in a more conventional way in a comment.
rwatson [Tue, 6 May 2014 10:53:51 +0000 (10:53 +0000)]
Spell raccdt in a more conventional way in a comment.

MFC after: 3 days

10 years agoReduce the number of interrupts in USB host mode for the DWC OTG
hselasky [Tue, 6 May 2014 09:12:32 +0000 (09:12 +0000)]
Reduce the number of interrupts in USB host mode for the DWC OTG
controller driver by piggybacking the SOF interrupt when issuing new
and checking old transfers. Number of interrupts was reduced by 30%
when doing Isochronous transfers.

Use correct GINTMSK_XXX macros when accessing the DWC OTG interrupt
mask register.

Add code to adjust the frame interval register which influences the
SOF rate.

MFC after: 2 weeks

10 years agoFix a problem with async notifications in the mpr(4) driver.
ken [Tue, 6 May 2014 06:18:43 +0000 (06:18 +0000)]
Fix a problem with async notifications in the mpr(4) driver.

This problem only occurs on versions of FreeBSD prior to the recent CAM
locking changes.  (i.e. stable/9 and older versions of stable/10)  This
change should be a no-op for head and stable/10.

If a path isn't specified, xpt_register_async() will create a fully
wildcarded path and acquire a lock (the XPT lock in older versions,
and via xpt_path_lock() in newer versions) to call xpt_action() for the
XPT_SASYNC_CB CCB.  It will then drop the lock and if the requested event
includes AC_FOUND_DEVICE or AC_PATH_REGISTERED, it will get the caller up
to date with any device arrivals or path registrations.

The issue is that before the locking changes, each SIM lock would get
acquired in turn during the EDT tree traversal process.  If a path is
specified for xpt_register_async(), it won't acquire and drop its own lock,
but instead expects the caller to hold its own SIM lock.  That works for
the first part of xpt_register_async(), but causes a recursive lock
acquisition once the EDT traversal happens and it comes to the SIM in
question.  And it isn't possible to call xpt_action() without holding a SIM
lock.

The locking changes fix this by using the XPT topology lock for EDT
traversal, so it is no longer an issue to hold the SIM lock while calling
xpt_register_async().

The solution for FreeBSD versions before the locking changes is to request
notification of all device arrivals (so we pass a NULL path into
xpt_register_async()) and then filter out the arrivals that are not ours.

MFC After: 3 days
Sponsored by: Spectra Logic Corporation

10 years agoRemove support for WITHOUT_BMAKE. bmake is now the only make that can
imp [Tue, 6 May 2014 04:22:37 +0000 (04:22 +0000)]
Remove support for WITHOUT_BMAKE. bmake is now the only make that can
build world, so it is the only make we build or install. fmake is
still in the tree, but disconnected, and upgrades from older systems
that still have bmake has not been removed, but its state has not been
tested (it should work given how minimal the work to upgrade to bmake
is).

10 years agoDocument src.opts.mk changes and the decoupling of /etc/src.conf from
imp [Tue, 6 May 2014 04:22:29 +0000 (04:22 +0000)]
Document src.opts.mk changes and the decoupling of /etc/src.conf from
anything but the source tree.

10 years agoUse src.opts.mk in preference to bsd.own.mk except where we need stuff
imp [Tue, 6 May 2014 04:22:01 +0000 (04:22 +0000)]
Use src.opts.mk in preference to bsd.own.mk except where we need stuff
from the latter.

10 years agoMove the /usr/src specific options to src.opts.mk. Move inclusion of
imp [Tue, 6 May 2014 04:21:48 +0000 (04:21 +0000)]
Move the /usr/src specific options to src.opts.mk. Move inclusion of
/etc/src.conf to this file as well. Now, it will only affect builds of
/usr/src and not others that use the bsd.*.mk files. Specifically
don't install src.opts.mk so we can catch when it 'leaks' into
bsd.*.mk again and have there be errors when this happens. Future
commits will move to including src.opts.mk instead of bsd.own.mk when
all that's needed is one of the MK_FOO options from src.opts.mk.
Future options should be placed here, unless they directly affect a
bsd.*.mk file, in which case they should be placed in bsd.opts.mk.

10 years agoPrior to r254304, a separate function, vm_pageout_page_stats(), was used to
alc [Tue, 6 May 2014 03:42:04 +0000 (03:42 +0000)]
Prior to r254304, a separate function, vm_pageout_page_stats(), was used to
periodically update the reference status of the active pages.  This function
was called, instead of vm_pageout_scan(), when memory was not scarce.  The
objective was to provide up to date reference status for active pages in
case memory did become scarce and active pages needed to be deactivated.

The active page queue scan performed by vm_pageout_page_stats() was
virtually identical to that performed by vm_pageout_scan(), and so r254304
eliminated vm_pageout_page_stats().  Instead, vm_pageout_scan() is
called with the parameter "pass" set to zero.  The intention was that when
pass is zero, vm_pageout_scan() would only scan the active queue.  However,
the variable page_shortage can still be greater than zero when memory is not
scarce and vm_pageout_scan() is called with pass equal to zero.
Consequently, the inactive queue may be scanned and dirty pages laundered
even though that was not intended by r254304.  This revision fixes that.

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

10 years agoModify Copyright information to reflect Qlogic Corporation's purchase
davidcs [Tue, 6 May 2014 02:32:27 +0000 (02:32 +0000)]
Modify Copyright information to reflect Qlogic Corporation's purchase
of Broadcom's NetXtreme business

Submitted by:David C Somayajulu (davidcs@freebsd.org) QLogic Corporation
MFC after:5 days

10 years agoModify the RX path to keep the previous RX descriptor around once it's
adrian [Tue, 6 May 2014 01:15:42 +0000 (01:15 +0000)]
Modify the RX path to keep the previous RX descriptor around once it's
used.

It turns out that the RX DMA engine does the same last-descriptor-link-
pointer-re-reading trick that the TX DMA engine.  That is, the hardware
re-reads the link pointer before it moves onto the next descriptor.
Thus we can't free a descriptor before we move on; it's possible the
hardware will need to re-read the link pointer before we overwrite
it with a new one.

Tested:

* AR5416, STA mode

TODO:

* more thorough AP and STA mode testing!
* test on other pre-AR9380 NICs, just to be sure.
* Break out the RX descriptor grabbing bits from the RX completion
  bits, like what is done in the RX EDMA code, so ..
* .. the RX lock can be held during ath_rx_proc(), but not across
  packet input.

10 years ago- Remove net.inet.tcp.reass.overflows sysctl. It counts exactly
glebius [Tue, 6 May 2014 00:00:07 +0000 (00:00 +0000)]
- Remove net.inet.tcp.reass.overflows sysctl. It counts exactly
  same events that tcpstat's tcps_rcvmemdrop counter counts.
- Rename tcps_rcvmemdrop to tcps_rcvreassfull and improve its
  description in netstat(1) output.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

10 years agoDisable the 'uart_drain()' callback when the emulated receive FIFO is full.
neel [Mon, 5 May 2014 23:54:13 +0000 (23:54 +0000)]
Disable the 'uart_drain()' callback when the emulated receive FIFO is full.

Failing to do this will cause the kevent(2) notification to trigger
continuously and the bhyve(8) mevent thread will hog the cpu until the
characters on the backend tty device are drained.

Also, make the uart backend file descriptor non-blocking to avoid a
select(2) before every byte read from that backend.

Reviewed by: grehan

10 years agoUse 'return' instead of 'exit' in main(), since the script exits
gjb [Mon, 5 May 2014 23:36:46 +0000 (23:36 +0000)]
Use 'return' instead of 'exit' in main(), since the script exits
with the last returned exit code.

Sponsored by: The FreeBSD Foundation

10 years agoAdd a helper script for parsing 'svn log' for the
gjb [Mon, 5 May 2014 23:01:01 +0000 (23:01 +0000)]
Add a helper script for parsing 'svn log' for the
'Relnotes:' tag in case 'yes' is not explicitly
the first string value following the tab.

As it turns out, a number of commits have bypassed
my filters (both email and 'svn log --search'), and
this script returns the results I want when doing
these searches.

Sponsored by: The FreeBSD Foundation

10 years agoSwitch vga drivers to use names and new vt(4) driver probe method.
ray [Mon, 5 May 2014 22:12:46 +0000 (22:12 +0000)]
Switch vga drivers to use names and new vt(4) driver probe method.

Sponsored by: The FreeBSD Foundation

10 years agoRevert r264997 and r265026. It is not required anymore.
ray [Mon, 5 May 2014 22:10:31 +0000 (22:10 +0000)]
Revert r264997 and r265026. It is not required anymore.

Sponsored by: The FreeBSD Foundation

10 years agoSimplify use of the semi-bogus EARLY_BUILD variable. Also, simplify
imp [Mon, 5 May 2014 22:03:08 +0000 (22:03 +0000)]
Simplify use of the semi-bogus EARLY_BUILD variable. Also, simplify
use of semi-bogus NO_WARNS variable. Both of these, in this case,
should collapse to WITHOUT_WARNS in a future commit.

10 years agoIntroduce CWARNFLAGS.${COMPILER_TYPE} and use that to simplify the
imp [Mon, 5 May 2014 22:03:01 +0000 (22:03 +0000)]
Introduce CWARNFLAGS.${COMPILER_TYPE} and use that to simplify the
thicket of .if ${COMPILER_TYPE} == "clang" that controls
warnings. Also, use CFLAGS.clang in a couple places in preference to
having a similar construct that's related to the CWARNFLAGS changes.

10 years ago[1] Make WITHOUT_FOO alway trump WITH_FOO, regardless of the system
imp [Mon, 5 May 2014 22:02:48 +0000 (22:02 +0000)]
[1] Make WITHOUT_FOO alway trump WITH_FOO, regardless of the system
    default. This restores more of the historical expectations that
    were broken when we started disallowing both WITH_FOO and
    WITHOUT_FOO to be defined.
[2] Document this new behavior, and improve the documentation in
    general here.

Submitted by: sjg@ [1].

10 years agoAdd vt(4) driver name for ofwfb driver.
ray [Mon, 5 May 2014 21:49:31 +0000 (21:49 +0000)]
Add vt(4) driver name for ofwfb driver.

Sponsored by: The FreeBSD Foundation

10 years agoSwitch fb and efifb drivers to use names and new vt(4) driver probe method.
ray [Mon, 5 May 2014 21:48:19 +0000 (21:48 +0000)]
Switch fb and efifb drivers to use names and new vt(4) driver probe method.

Sponsored by: The FreeBSD Foundation

10 years agoGarbage collect two more unused sysinit subsystems: SI_SUB_KVM_RSRC and
rwatson [Mon, 5 May 2014 21:46:10 +0000 (21:46 +0000)]
Garbage collect two more unused sysinit subsystems: SI_SUB_KVM_RSRC and
SI_SUB_CLISTS.

MFC after: 3 days

10 years agoSet of updates to vt(4) core part.
ray [Mon, 5 May 2014 21:44:53 +0000 (21:44 +0000)]
Set of updates to vt(4) core part.
o Declare vt(4) drivers dataset.
o Create single static structures for all early drivers.
o Add vt(4) to be by default in the kernel consoles list.
o Create one more sysinit point, to be able to initialize memory and lock
requirement of early drivers.
o Implement early drivers select. (Only best available will be selected).
o Fix one missed "return (0)" for VTYLOCK.
o Improve locking for cases when one driver replace another.
o Make driver replacement notification less debug-look-like.

Minor spell fixes.

Sponsored by: The FreeBSD Foundation

10 years agoThe tcp_log_addrs() uses th pointer, which points into the mbuf, thus we
glebius [Mon, 5 May 2014 21:33:20 +0000 (21:33 +0000)]
The tcp_log_addrs() uses th pointer, which points into the mbuf, thus we
can not free the mbuf before tcp_log_addrs().

Sponsored by: Nginx, Inc.
Sponsored by: Netflix

10 years agoCreate dataset for vt(4) drivers.
ray [Mon, 5 May 2014 21:31:00 +0000 (21:31 +0000)]
Create dataset for vt(4) drivers.

Sponsored by: The FreeBSD Foundation

10 years agoDefine a new method for probing vt(4) driver before attach it at early stage.
ray [Mon, 5 May 2014 21:29:56 +0000 (21:29 +0000)]
Define a new method for probing vt(4) driver before attach it at early stage.

Sponsored by: The FreeBSD Foundation

10 years agoAdjust #if statements inside mprsas_send_smpcmd() to more accurately
ken [Mon, 5 May 2014 19:53:03 +0000 (19:53 +0000)]
Adjust #if statements inside mprsas_send_smpcmd() to more accurately
reflect when unmapped I/O support was added.

For FreeBSD 10, it arrived just prior to __FreeBSD_version 1000028.
For FreeBSD 9, it arrived just prior to __FreeBSD_version 902001.

Also, fix compiler warnings in mprsas_send_smpcmd() that happen in the
i386 PAE build for non-unmapped I/O builds.  These were fixed in mps(4)
in revision 241145, but didn't make it into the mpr(4) driver.  This
change should only affect FreeBSD versions outside the above revisions,
and thus doesn't affect head.

MFC after: 3 days
Sponsored by: Spectra Logic Corporation

10 years agoRemove the ifconfig test added in rev 263445. After discussion with
asomers [Mon, 5 May 2014 19:38:29 +0000 (19:38 +0000)]
Remove the ifconfig test added in rev 263445.  After discussion with
melifaro, we agreed that ifconfig's behavior was not a bug.  The main
motivation for bin/187551 was to partially resolve kern/187549, but we
resolved kern/187549 in a different way instead.

ObsoleteFiles.inc
etc/mtree/BSD.tests.dist
sbin/ifconfig/tests/fibs_test.sh
sbin/ifconfig/tests/Makefile
sbin/ifconfig/Makefile
Remove /usr/tests/sbin/ifconfig

PR: bin/187551
MFC after: 3 days
Sponsored by: Spectra Logic

10 years agoModify the "-p" option to be more flexible when associating a 'vcpu' with
neel [Mon, 5 May 2014 18:06:35 +0000 (18:06 +0000)]
Modify the "-p" option to be more flexible when associating a 'vcpu' with
a 'hostcpu'. The new format of the argument string is "vcpu:hostcpu".

This allows pinning a subset of the vcpus if desired.

It also allows pinning a vcpu to more than a single 'hostcpu'.

Submitted by: novel (initial version)

10 years agoRevert r265367:
pfg [Mon, 5 May 2014 18:04:57 +0000 (18:04 +0000)]
Revert r265367:
Use of calloc instead of malloc in regex (from OpenBSD).

In this case the change makes no sense since we are using realloc() later.

Reported by: ache

10 years agoFill in csum_data only for UDP or TCP packets. This fixes a bug where
tuexen [Mon, 5 May 2014 17:30:05 +0000 (17:30 +0000)]
Fill in csum_data only for UDP or TCP packets. This fixes a bug where
SCTP were reported to have always a correct checksum if they don't
contain any ethernet padding.

MFC after: 3 days

10 years agoWake up the hardware before calling ath_mode_init() in the ioctl() path.
adrian [Mon, 5 May 2014 17:06:40 +0000 (17:06 +0000)]
Wake up the hardware before calling ath_mode_init() in the ioctl() path.

Tested:

* AR5416, STA + powersave

10 years agoregex: Use calloc instead of malloc.
pfg [Mon, 5 May 2014 16:41:15 +0000 (16:41 +0000)]
regex: Use calloc instead of malloc.

Mostly to reduce differences with OpenBSD.

Obtained from: OpenBSD (CVS rev. 1.17)
MFC after: 3 days

10 years agoRemove misleading "addcpu" in an error message emitted by fbsdrun_deletecpu().
neel [Mon, 5 May 2014 16:35:37 +0000 (16:35 +0000)]
Remove misleading "addcpu" in an error message emitted by fbsdrun_deletecpu().

Pointed out by: novel

10 years agoRe-adding an event to a kqueue modifies the parameters of the original event.
neel [Mon, 5 May 2014 16:30:03 +0000 (16:30 +0000)]
Re-adding an event to a kqueue modifies the parameters of the original event.
However, if the original knote had been disabled then it is not automatically
re-enabled.

Fix this by using EV_ADD to create an mevent and EV_ENABLE to enable it.

Adding a kevent for the first time implicitly enables it so existing callers
of mevent_add() don't need to change.

Reviewed by: grehan

10 years agoVirtual machine halt detection is turned on by default. Allow it to be
neel [Mon, 5 May 2014 16:19:24 +0000 (16:19 +0000)]
Virtual machine halt detection is turned on by default. Allow it to be
disabled via the tunable 'hw.vmm.halt_detection'.

10 years agoAvoid unsigned integer overflow which can cause
truckman [Mon, 5 May 2014 15:59:31 +0000 (15:59 +0000)]
Avoid unsigned integer overflow which can cause
rman_reserve_resource_bound() to return incorrect results.

Continue the initial search until the first viable region is found.

Add a comment to explain the search termination test.

PR: kern/188534
Reviewed by: jhb (previous version)
MFC after: 1 week

10 years agoMention the axge(4) driver in the hardware notes.
brueffer [Mon, 5 May 2014 14:57:38 +0000 (14:57 +0000)]
Mention the axge(4) driver in the hardware notes.

MFC after: 1 week

10 years agoRemove stray comma.
brueffer [Mon, 5 May 2014 14:50:44 +0000 (14:50 +0000)]
Remove stray comma.

MFC after: 3 days

10 years agoBuild the kernel sound module without ISA DMA support for ARM and MIPS
hselasky [Mon, 5 May 2014 14:31:34 +0000 (14:31 +0000)]
Build the kernel sound module without ISA DMA support for ARM and MIPS
platforms, because these platforms do not implement the ISA DMA
API. Else the sound modules cannot be loaded when running these
platforms.

MFC after: 2 weeks

10 years agoImprove DWC OTG USB host side support for isochronous FULL and HIGH
hselasky [Mon, 5 May 2014 11:50:52 +0000 (11:50 +0000)]
Improve DWC OTG USB host side support for isochronous FULL and HIGH
speed data traffic going directly to a USB device or through a
so-called USB transaction translator.

Add checks that we are not overusing the TX FIFO.

MFC after: 2 weeks

10 years agoMake r242379 - the fix for UFS labels disappearing after resizing
trasz [Mon, 5 May 2014 09:20:30 +0000 (09:20 +0000)]
Make r242379 - the fix for UFS labels disappearing after resizing
the provider - also apply to UFS1 filesystems.  This should help with
resizing filesystems created by makefs(8), which still uses UFS1.

Tested by: jmg@
Sponsored by: The FreeBSD Foundation

10 years agoBreak out the multicast programming into its own hardware specific
adrian [Mon, 5 May 2014 08:12:21 +0000 (08:12 +0000)]
Break out the multicast programming into its own hardware specific
call, which assumes the hardware is awake.

Turn ath_update_mcast() into a routine that's only called from the
net80211 layer - and it forces the hardware awake first.

This fixes a LOR from the EDMA RX path which calls ath_mode_init()
with the RX lock held - the driver lock can't also be grabbed.
This path assumes that the ath_mode_init() callers all wake up
the NIC first.

Tested:

* AR9485, STA mode, powersave

10 years agoQuieten the RX/TX descriptor and FIFO setup debugging.
adrian [Mon, 5 May 2014 08:00:50 +0000 (08:00 +0000)]
Quieten the RX/TX descriptor and FIFO setup debugging.

Tested:

* AR9485, STA mode

10 years agoAdd Atheros AR1111 support to the HAL.
adrian [Mon, 5 May 2014 07:58:05 +0000 (07:58 +0000)]
Add Atheros AR1111 support to the HAL.

This seems to probe/attach as an AR9485 and thus nothing else besides
adding the device id seems to be required.

ath0: <Atheros AR1111> mem 0xf4800000-0xf487ffff irq 19 at device 0.0 on pci5
ath0: [HT] enabling HT modes
ath0: [HT] enabling short-GI in 20MHz mode
ath0: [HT] 1 stream STBC receive enabled
ath0: [HT] 1 RX streams; 1 TX streams
ath0: AR9485 mac 576.1 RF5110 phy 1926.8
ath0: 2GHz radio: 0x0000; 5GHz radio: 0x0000

The NIC I have here is a 1 antenna, 2GHz only device.

Thankyou to Jim Thompson <jim@netgate.com> for the AR1111 NIC.

Tested:

* AR1111 (pretending not to be an AR9485, but failing miserably);
  STA mode with powersave.

Relnotes: yes
Sponsored by: Netgate

10 years agolindev(4): add to ObsoleteFiles
eadler [Mon, 5 May 2014 01:47:05 +0000 (01:47 +0000)]
lindev(4): add to ObsoleteFiles

- add man page
- past removals did not add the .ko so don't add it this time either

Reported by: gleb

10 years agoThe FreeBSD-SA-14:08.tcp was a lesson on not doing acrobatics with
glebius [Sun, 4 May 2014 23:25:32 +0000 (23:25 +0000)]
The FreeBSD-SA-14:08.tcp was a lesson on not doing acrobatics with
mixing on stack memory and UMA memory in one linked list.

Thus, rewrite TCP reassembly code in terms of memory usage. The
algorithm remains unchanged.

We actually do not need extra memory to build a reassembly queue.
Arriving mbufs are always packet header mbufs. So we got the length
of data as pkthdr.len. We got m_nextpkt for linkage. And we need
only one pointer to point at the tcphdr, use PH_loc for that.

In tcpcb the t_segq fields becomes mbuf pointer. The t_segqlen
field now counts not packets, but bytes in the queue. This gives
us more precision when comparing to socket buffer limits.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

10 years agoAdd an advice what to do when partition was automatically resized.
ae [Sun, 4 May 2014 20:00:08 +0000 (20:00 +0000)]
Add an advice what to do when partition was automatically resized.

X-MFC after: r256690

10 years agoFix typo: s/null/full
gjb [Sun, 4 May 2014 17:53:01 +0000 (17:53 +0000)]
Fix typo: s/null/full

Spotted by: jilles
Sponsored by: The FreeBSD Foundation

10 years agoAdd better error description for case when we are doing resize and
ae [Sun, 4 May 2014 16:55:51 +0000 (16:55 +0000)]
Add better error description for case when we are doing resize and
scheme-specific method returns EBUSY.

MFC after: 1 week

10 years agoPrevent an unexpected shrinking on resizing due to alignment for MBR,
ae [Sun, 4 May 2014 16:43:57 +0000 (16:43 +0000)]
Prevent an unexpected shrinking on resizing due to alignment for MBR,
PC98 and VTOC8 schemes.

Reported by: jmg
MFC after: 1 week

10 years agoDisable ACPI and P4TCC throttling by default, following discussion on
nwhitehorn [Sun, 4 May 2014 16:38:21 +0000 (16:38 +0000)]
Disable ACPI and P4TCC throttling by default, following discussion on
freebsd-current. These CPU speed control techniques are usually unhelpful
at best. For now, continue building the relevant code into GENERIC so that
it can trivially be re-enabled at runtime if anyone wants it.

MFC after: 1 month

10 years agoProvide better descriptions for 'struct ctl_scsiio' fields; based mostly
trasz [Sun, 4 May 2014 15:35:04 +0000 (15:35 +0000)]
Provide better descriptions for 'struct ctl_scsiio' fields; based mostly
on emails from ken@.

10 years agoUse a zio flag to prevent recursion of vdev_queue_io_done which can
smh [Sun, 4 May 2014 14:05:14 +0000 (14:05 +0000)]
Use a zio flag to prevent recursion of vdev_queue_io_done which can
cause stack overflow for IO's which return ZIO_PIPELINE_CONTINUE
from the zio_vdev_io_start stage and hence don't suspend and complete
in a different thread.

This prevents double fault panic on slow machines running ZFS on
GELI volumes which return EOPNOTSUPP directly to BIO_DELETE requests.

MFC after: 1 month
X-MFC-With: r265152

10 years agoExpand PGET_WANTREAD. Language fixes.
pluknet [Sun, 4 May 2014 12:32:37 +0000 (12:32 +0000)]
Expand PGET_WANTREAD.  Language fixes.

Submitted by: jmg

10 years agoTreat the '-' as meaning standard input.
pluknet [Sun, 4 May 2014 12:20:40 +0000 (12:20 +0000)]
Treat the '-' as meaning standard input.

Obtained from: NetBSD

10 years agoFor schemes that do an automatic partition aligning move this code to
ae [Sun, 4 May 2014 10:14:25 +0000 (10:14 +0000)]
For schemes that do an automatic partition aligning move this code to
separate function.

MFC after: 1 week

10 years agoMove gpiobus routines to dev/gpio. Avoid polluting ofw_bus with bus
loos [Sun, 4 May 2014 04:01:26 +0000 (04:01 +0000)]
Move gpiobus routines to dev/gpio.  Avoid polluting ofw_bus with bus
specific parts.

Requested by: nwhitehorn

10 years agoRemove a duplicate definition.
markj [Sun, 4 May 2014 03:37:39 +0000 (03:37 +0000)]
Remove a duplicate definition.

MFC after: 3 days

10 years agoIf the traced process stops because it received a signal, libproc needs
markj [Sun, 4 May 2014 03:34:32 +0000 (03:34 +0000)]
If the traced process stops because it received a signal, libproc needs
to ensure that the signal is forwarded when proc_continue() is called.

MFC after: 3 weeks

10 years agoDocument r265229[1], r265249[2]:
gjb [Sun, 4 May 2014 01:33:02 +0000 (01:33 +0000)]
Document r265229[1], r265249[2]:
 '-J' flag added to ps(1) [1], and top(1) [2].

Sponsored by: The FreeBSD Foundation

10 years agoDocument r264601, addition of if_nf10bmac(4) (with no
gjb [Sun, 4 May 2014 01:33:00 +0000 (01:33 +0000)]
Document r264601, addition of if_nf10bmac(4) (with no
corresponding manual page, so <literal> tags are used).

Sponsored by: The FreeBSD Foundation

10 years agoWrap lindev(4) references in <literal> tags.
gjb [Sun, 4 May 2014 01:32:59 +0000 (01:32 +0000)]
Wrap lindev(4) references in <literal> tags.

Sponsored by: The FreeBSD Foundation

10 years agoDereference man.lindev.4 macros, since the device is removed.
gjb [Sun, 4 May 2014 01:32:57 +0000 (01:32 +0000)]
Dereference man.lindev.4 macros, since the device is removed.

Sponsored by: The FreeBSD Foundation

10 years agoDocument r265132, addition of full(4).
gjb [Sun, 4 May 2014 01:32:55 +0000 (01:32 +0000)]
Document r265132, addition of full(4).

Sponsored by: The FreeBSD Foundation

10 years agoReally sort out the headers.
loos [Sat, 3 May 2014 20:33:00 +0000 (20:33 +0000)]
Really sort out the headers.

sys/systm.h must always come after sys/param.h.

Remove sys/types.h which should never be included together with sys/param.h.

Add sys/malloc.h for correctness even if it seems to don't be needed.

Remove more unused headers found by unusedinc (from bde@) and tested with a
universe build.

Reported by: bde

10 years agoFix panic on IPv4 address removal introduced in r265279.
melifaro [Sat, 3 May 2014 20:22:13 +0000 (20:22 +0000)]
Fix panic on IPv4 address removal introduced in r265279.

Reported by: Trond Endrestøl
MFC with: r265279

10 years agoFix SYNOPSIS ("device if_vtnet" -> "device vtnet").
bryanv [Sat, 3 May 2014 19:57:17 +0000 (19:57 +0000)]
Fix SYNOPSIS ("device if_vtnet" -> "device vtnet").

Obtained from: DragonFlyBSD
MFC after: 3 days

10 years agoDocumented the pget(9) system kernel interface.
pluknet [Sat, 3 May 2014 18:50:47 +0000 (18:50 +0000)]
Documented the pget(9) system kernel interface.

Reviewed by: trociny, kib
MFC after: 1 week

10 years agoFix sysctl_ifmalist() broken in r265019.
melifaro [Sat, 3 May 2014 17:57:06 +0000 (17:57 +0000)]
Fix sysctl_ifmalist() broken in r265019.

Reported by: Olivier Cochard-LabbĂ©
MFC with: r265019

10 years agoRemove additional fib checks from rtalloc1_fib.
melifaro [Sat, 3 May 2014 16:38:05 +0000 (16:38 +0000)]
Remove additional fib checks from rtalloc1_fib.
It looks like current consumers are either unaware
of MRT (and uses RT_DEFAULT_FIB implicitly) or
know what thay are doing, In latter case they
will be either hit by KASSERT or ESCRH will be returned
due to NULL rnh.

10 years agoPass radix head ptr along with rte to rtexpunge().
melifaro [Sat, 3 May 2014 16:28:54 +0000 (16:28 +0000)]
Pass radix head ptr along with rte to rtexpunge().
Rename rtexpunge to rt_expunge().