]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoAdd initial testcases for bin/ls
ngie [Mon, 28 Sep 2015 03:36:15 +0000 (03:36 +0000)]
Add initial testcases for bin/ls

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

8 years agoinclude opt_wlan.h . Tsk adrian.
adrian [Mon, 28 Sep 2015 01:16:44 +0000 (01:16 +0000)]
include opt_wlan.h .  Tsk adrian.

8 years agoif_otus fixes; add fast-frames support.
adrian [Mon, 28 Sep 2015 01:09:48 +0000 (01:09 +0000)]
if_otus fixes; add fast-frames support.

Fast-frames:

* include opt_wlan.h ; tsk to not doing it earlier;
* add a tx pending tracking counter for seeing how deep
  the hardware TX queue is;
* add the frame aging code from if_ath;
* add fast-frames capability to the driver setup.

Bugs:

* free the buffers (and node references) before
  detaching net80211 state.  This prevents a use-after-free in
  the node free path where we've destroyed net80211 underneath it.

8 years agoMigrate the fast-frames transmit support away from using the txa_private
adrian [Mon, 28 Sep 2015 00:59:07 +0000 (00:59 +0000)]
Migrate the fast-frames transmit support away from using the txa_private
field and into a separate fast-frames staging pointer in ieee80211_node.

The A-MPDU TX path allows txa_private to be used by drivers.  So it will
clash with any attempt to use fast-frames.  Now, fast-frames is not really
anything special - it's just a custom ethernet frame type that contains
two MSDUs into one MPDU.  So all the NIC has to support doing is transmitting
up to a 4KiB frame with an arbitrary ethertype and bam! Fast-frames.
However, using txa_private means we can /either/ do fast-frames or A-MPDU TX,
so fast frames has been turned off in the Atheros HAL for 11n chipsets.
This is a bit silly - it actually means that 802.11 performance to/from
11abg Atheros chips is actually better than between an 11abg atheros device
and an 11n Atheros device.

So:

* create a new mbuf staging queue for fast frames.  It only queues a single
  frame in the staging queue (and there's a top-level ic staging queue
  used for expiry/tracking) so it's just an mbuf pointer per TID.

* Still use the ampdu TX packet counter to determine whether to do
  aggregation or not.  It'll double count if we start doing both A-MPDU TX
  and fast frames, but that's not all that important right now.

* Initialise the pps tracker so ticks isn't zero.  This ensures that
  fast-frames actually gets used - without it, the ticks math overflows
  and the pps math always sets txa_pps=0.  This is the same bug that
  plagued A-MPDU TX starting logic.

This actually allows fast-frames transmit to occur between the AR9331
(in 11n HT/20 mode) and AR9170 (if_otus) in 11bg mode.

Now, this is a great big no-op on atheros 11n hardware, so don't worry.
It may mean you start seeing more reliable fast-frames transmission on
11abg hardware which may expose some more amusing bugs.

TODO:

* further testing and debugging of all of this before flipping on
  fast-frames in if_ath (for 11n) and if_otus.

8 years agoComments, mostly to remind myself of what's going on and why.
adrian [Mon, 28 Sep 2015 00:51:24 +0000 (00:51 +0000)]
Comments, mostly to remind myself of what's going on and why.

8 years agoAbstract out the ampdu TX pps initialisation code so it can be reused
adrian [Mon, 28 Sep 2015 00:17:51 +0000 (00:17 +0000)]
Abstract out the ampdu TX pps initialisation code so it can be reused
in the superg fast-frames code.

This harks back to an earlier commit (r280349) where I found that
initialising the pps code with ticks=0 would cause hilariously bad
hz ticks wraparound failures, leading to never actually aggregating
traffic.  This is still true for the superg path and so I have to
do the same thing there.

This is a big no-op; a subsequent commit will flip this on so it
works with the fast-frames transmit path.

Tested:

* AR9170, otus(4) - STA mode, 11bg operation
* AR9331, AP mode

8 years agoFix whitespace error in ls(1) detected by igor
allanjude [Sun, 27 Sep 2015 22:05:20 +0000 (22:05 +0000)]
Fix whitespace error in ls(1) detected by igor

Approved by: bcr (mentor)
Sponsored by: EuroBSDCon DevSummit

8 years agoUse one fewer made up words in the ls(1) man page
allanjude [Sun, 27 Sep 2015 22:02:46 +0000 (22:02 +0000)]
Use one fewer made up words in the ls(1) man page

PR: 203337
Submitted by: Mike Dame <damemi@gmail.com>
Approved by: bcr (mentor)
Sponsored by: EuroBSDCon DevSummit

8 years agoSet the #address-cells and #size-cells for the I2C controllers in RPi2.
loos [Sun, 27 Sep 2015 18:21:22 +0000 (18:21 +0000)]
Set the #address-cells and #size-cells for the I2C controllers in RPi2.

This allows the use of I2C addresses in 'reg' property.

8 years agoAdd to CTL initial support for CDROMs and removable devices.
mav [Sun, 27 Sep 2015 13:47:28 +0000 (13:47 +0000)]
Add to CTL initial support for CDROMs and removable devices.

Relnotes: yes

8 years agofnmatch(): Remove exponential behaviour as in sh r229201.
jilles [Sun, 27 Sep 2015 12:52:18 +0000 (12:52 +0000)]
fnmatch(): Remove exponential behaviour as in sh r229201.

The old code was exponential in the number of asterisks in the pattern.
However, once a match has been found upto the next asterisk, the previous
asterisks are no longer relevant.

8 years agoFix what looks like a consistent copy&paste error.
bz [Sun, 27 Sep 2015 12:19:36 +0000 (12:19 +0000)]
Fix what looks like a consistent copy&paste error.
Don't make an integer to a boolean and then compare to a value which
needs an integer comparison.

Spotted by: reading kernel compile time log
MFC after: 2 weeks

8 years agoCompare the correct variable to see if memory allocation succeeded.
bz [Sun, 27 Sep 2015 12:17:03 +0000 (12:17 +0000)]
Compare the correct variable to see if memory allocation succeeded.
I don't even want to know where the symbol "version" comes from.

Spotted by: reading kernel compile time log
MFC after: 2 weeks

8 years agoAdd support to systat to display zfs arc cache status/info
mr [Sun, 27 Sep 2015 09:15:54 +0000 (09:15 +0000)]
Add support to systat to display zfs arc cache status/info

PR: 195460
Submitted by: ota

8 years agoReplace N #defines with nitems to simplify ifconfig code slightly
ngie [Sun, 27 Sep 2015 07:51:18 +0000 (07:51 +0000)]
Replace N #defines with nitems to simplify ifconfig code slightly

MFC after: 1 week

8 years agoEnable parallel subdirectory building with sys/modules/netgraph
ngie [Sun, 27 Sep 2015 07:40:19 +0000 (07:40 +0000)]
Enable parallel subdirectory building with sys/modules/netgraph

MFC after: 2 weeks

8 years agoMFV r288243: nc from OpenBSD 5.8.
delphij [Sun, 27 Sep 2015 07:04:16 +0000 (07:04 +0000)]
MFV r288243: nc from OpenBSD 5.8.

8 years agoEliminate nd6_nud_hint() and its TCP bindings.
melifaro [Sun, 27 Sep 2015 05:29:34 +0000 (05:29 +0000)]
Eliminate nd6_nud_hint() and its TCP bindings.

Initially function was introduced in r53541 (KAME initial commit) to
  "provide hints from upper layer protocols that indicate a connection
  is making "forward progress"" (quote from RFC 2461 7.3.1 Reachability
  Confirmation).
However, it was converted to do nothing (e.g. just return) in r122922
  (tcp_hostcache implementation) back in 2003. Some defines were moved
  to tcp_var.h in r169541. Then, it was broken (for non-corner cases)
  by r186119 (L2<>L3 split) in 2008 (NULL ifp in nd6_lookup). So,
  right now this code is broken and has no "real" base users.

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

8 years ago - Collapse vfs_vmio_truncate & vfs_vmio_release into a single function.
jeff [Sun, 27 Sep 2015 05:16:06 +0000 (05:16 +0000)]
 - Collapse vfs_vmio_truncate & vfs_vmio_release into a single function.
 - Allow vfs_vmio_invalidate() to free the pages, leaving us with a
   single loop and bufobj lock when B_NOCACHE/B_INVAL is used.
 - Eliminate the special B_ASYNC handling on free that has not been
   relevant for some time.
 - Remove the extraneous page busy from vfs_vmio_truncate().

Reviewed by: kib
Tested by: pho
Sponsored by: EMC / Isilon storage division

8 years agoRemove MLINKS to more non-existent mbuf(9) macros
ngie [Sun, 27 Sep 2015 04:55:43 +0000 (04:55 +0000)]
Remove MLINKS to more non-existent mbuf(9) macros

X-MFC with: r288295
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

8 years agortsock requests for deleting interface address lles started to return EPERM
melifaro [Sun, 27 Sep 2015 04:54:29 +0000 (04:54 +0000)]
rtsock requests for deleting interface address lles started to return EPERM
  instead of old "ignore-and-return 0" in r287789. This broke arp -da /
  ndp -cn behavior (they exit on rtsock command failure). Fix this by
  translating LLE_IFADDR to RTM_PINNED flag, passing it to userland and
  making arp/ndp ignore these entries in batched delete.

MFC after: 2 weeks

8 years agoPosthumously remove all references to MFREE(9)
ngie [Sun, 27 Sep 2015 04:40:54 +0000 (04:40 +0000)]
Posthumously remove all references to MFREE(9)

The macro was removed in r90227

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

8 years agoEnforce consistent limits of daemons run from rc.subr:
adrian [Sun, 27 Sep 2015 04:03:11 +0000 (04:03 +0000)]
Enforce consistent limits of daemons run from rc.subr:

* Allow the user to configure the login class to use in rc.conf
  by using {daemon}_login_class, which;
* Use the daemon class by default;
* .. and then use 'limits' to set the login class so it works both
  via init at startup (which runs this in 'daemon' class) and via
  whichever root environment (eg command line, other daemons, etc.)

Reviewed by: dteske
Differential Revision: https://reviews.freebsd.org/D3630

8 years agoTrack the command response code buffer size and verify it in the
adrian [Sun, 27 Sep 2015 03:46:55 +0000 (03:46 +0000)]
Track the command response code buffer size and verify it in the
receive path.

8 years agoThe conversion of kmem_alloc_attr() from operating on a vm map to a vmem
alc [Sat, 26 Sep 2015 22:57:10 +0000 (22:57 +0000)]
The conversion of kmem_alloc_attr() from operating on a vm map to a vmem
arena in r254025 introduced a bug in the case when an allocation is only
partially successful.  Specifically, the vm object lock was not being
acquired before freeing the allocated pages.  To address this bug, replace
the existing code by a call to kmem_unback().

Change the type of a variable in kmem_alloc_attr() so that an allocation
of two or more gigabytes won't fail.

Replace the error handling code in kmem_back() by a call to kmem_unback().

Reviewed by: kib (an earlier version)
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoRemove a check for a condition that is always false by a preceding KASSERT
markj [Sat, 26 Sep 2015 22:26:55 +0000 (22:26 +0000)]
Remove a check for a condition that is always false by a preceding KASSERT
that was added in r144704.

8 years agoFree the TX/RX list buffers /before/ tearing down net80211 state.
adrian [Sat, 26 Sep 2015 22:20:30 +0000 (22:20 +0000)]
Free the TX/RX list buffers /before/ tearing down net80211 state.

Otherwise buffers in the RX queue get freed with their parent vap
being gone and you end up with a juicy kernel panic.

8 years agoDocument the interface for applying advice up to the end of a file.
markj [Sat, 26 Sep 2015 22:20:11 +0000 (22:20 +0000)]
Document the interface for applying advice up to the end of a file.

MFC after: 3 days

8 years agoOops - commit the correct manpage content for otusfw.4.
adrian [Sat, 26 Sep 2015 22:19:07 +0000 (22:19 +0000)]
Oops - commit the correct manpage content for otusfw.4.

8 years agoFix argument ordering in vn_printf().
markj [Sat, 26 Sep 2015 22:16:54 +0000 (22:16 +0000)]
Fix argument ordering in vn_printf().

MFC after: 3 days

8 years agoRevert r288270 to fix the build
cem [Sat, 26 Sep 2015 20:26:05 +0000 (20:26 +0000)]
Revert r288270 to fix the build

Submitted by: bdrewery
Sponsored by: EMC / Isilon Storage Division

8 years agoExploit r288122 to address a cosmetic issue. Since the pages allocated
alc [Sat, 26 Sep 2015 17:45:10 +0000 (17:45 +0000)]
Exploit r288122 to address a cosmetic issue.  Since the pages allocated
by noobj_alloc() don't belong to a vm object, they can't be paged out.
Since they can't be paged out, they are never enqueued in a paging queue.
Nonetheless, passing PQ_INACTIVE to vm_page_unwire() creates the appearance
that these pages are being enqueued in the inactive queue.  As of r288122,
we can avoid giving this false impression by passing PQ_NONE.

Submitted by: kmacy
Differential Revision: https://reviews.freebsd.org/D1674

8 years agoFix spelling.
hselasky [Sat, 26 Sep 2015 16:48:25 +0000 (16:48 +0000)]
Fix spelling.

Submitted by: Maxime Soule <btik-fbsd@scoubidou.com>
PR: 203249
MFC after: 2 weeks

8 years agoIncrease group limit for kerberized NFSv4
jpaetzel [Sat, 26 Sep 2015 16:30:16 +0000 (16:30 +0000)]
Increase group limit for kerberized NFSv4

PR: 202659
Submitted by: matthew.l.dailey@dartmouth.edu
Reviewed by: rmacklem dfr
MFC after: 1 week
Sponsored by: iXsystems

8 years agoDocument bus_get_resource(9).
cem [Sat, 26 Sep 2015 14:52:47 +0000 (14:52 +0000)]
Document bus_get_resource(9).

Suggested by: Francois Tigeot
Obtained from: DragonFlyBSD 09301a2b29f3ae5edd39a858f909f8770372f71e
Sponsored by: EMC / Isilon Storage Division

8 years agoHookup mkcsmapper_static and mkesdb_static for all but install.
bdrewery [Sat, 26 Sep 2015 14:28:04 +0000 (14:28 +0000)]
Hookup mkcsmapper_static and mkesdb_static for all but install.

These are only handled as 'build-tools' in Makefile.inc1.  This causes
'make clean' from the top of the tree to not clean the directories.  It also
effectively has kept them disconnected and risks them bitrotting.  The
buildworld process never cleans them either.

Connect them so they will always be built, cleaned, etc, but never installed.

Discussed with: imp (briefly)
Sponsored by: EMC / Isilon Storage Division

8 years agoRevert r288268. Wrong change committed.
bdrewery [Sat, 26 Sep 2015 14:27:21 +0000 (14:27 +0000)]
Revert r288268.  Wrong change committed.

8 years agoHookup mkcsmapper_static and mkesdb_static for all but install.
bdrewery [Sat, 26 Sep 2015 14:26:08 +0000 (14:26 +0000)]
Hookup mkcsmapper_static and mkesdb_static for all but install.

These are only handled as 'build-tools' in Makefile.inc1.  This causes
'make clean' from the top of the tree to not clean the directories.  It also
effectively has kept them disconnected and risks them bitrotting.  The
buildworld process never cleans them either.

Connect them so they will always be built, cleaned, etc, but never installed.

Discussed with: imp (briefly)
Sponsored by: EMC / Isilon Storage Division

8 years agoRemove redundant .NOPATH.
bdrewery [Sat, 26 Sep 2015 14:15:01 +0000 (14:15 +0000)]
Remove redundant .NOPATH.

All of these are already in CLEANFILES which is added to .NOPATH in bsd.obj.mk.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd more SUBDIR_PARALLEL.
bdrewery [Sat, 26 Sep 2015 14:13:51 +0000 (14:13 +0000)]
Add more SUBDIR_PARALLEL.

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

8 years agoWait up to 10 seconds for late-initializing network interfaces to arrive.
ian [Sat, 26 Sep 2015 13:55:55 +0000 (13:55 +0000)]
Wait up to 10 seconds for late-initializing network interfaces to arrive.

Reviewed by: rmacklem

8 years agoAllow LOG SENSE command on non-disk devices.
mav [Sat, 26 Sep 2015 13:51:29 +0000 (13:51 +0000)]
Allow LOG SENSE command on non-disk devices.

8 years agoDon't duplicate checks; net80211 now does this for us.
adrian [Sat, 26 Sep 2015 13:22:44 +0000 (13:22 +0000)]
Don't duplicate checks; net80211 now does this for us.

Submitted by: s3erios@gmail.com

8 years agoRemove concept of control device.
mav [Sat, 26 Sep 2015 12:53:55 +0000 (12:53 +0000)]
Remove concept of control device.

8 years agoMove ioctl frontend defines where they belong.
mav [Sat, 26 Sep 2015 11:56:28 +0000 (11:56 +0000)]
Move ioctl frontend defines where they belong.

8 years agoRemove few more unused variables.
mav [Sat, 26 Sep 2015 11:39:54 +0000 (11:39 +0000)]
Remove few more unused variables.

8 years agoRemove some duplicate, legacy, dead and questionable code.
mav [Sat, 26 Sep 2015 11:28:45 +0000 (11:28 +0000)]
Remove some duplicate, legacy, dead and questionable code.

8 years agoMake the __bitcount*() functions unconditionally available, by moving
kib [Sat, 26 Sep 2015 07:30:45 +0000 (07:30 +0000)]
Make the __bitcount*() functions unconditionally available, by moving
them out of the #if _BSD_VISIBLE block.  Other headers may depend on
__bitcount().  The dependencies can be a header not specified by
POSIX, and then namespace restrictions by _XOPEN_SOURCE are not
applicable, as it was reported.  Or, we might grow an implementation
of some POSIX facility using __bitcount(), which also should work.

Reported by: Jason Schulz <schulz.j@gmail.com>
Discussed with: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years ago* Add 11n HT40 support - i needed to send both HTINFO and HTCAP fields
adrian [Sat, 26 Sep 2015 07:25:53 +0000 (07:25 +0000)]
* Add 11n HT40 support - i needed to send both HTINFO and HTCAP fields
  in the join message so the firmware would pick it up.

* Strip out the direct hardware fiddling for 40MHz mode - the firmware
  we're using doesn't require it (the rtl8712su firmware does; it
  is less 'fullmac' than what we're using.)

* Fix the mbuf handling during errors - rsu_tx shouldn't free mbufs;
  it's up to the caller to do so.  This brings it in line with
  what other drivers do or should be doing.

Tested:

* RTL8712, HT40 channel, STA mode (during this commit)

8 years agoExploit r288122 to address a cosmetic issue. Since PV chunk pages don't
alc [Sat, 26 Sep 2015 07:18:05 +0000 (07:18 +0000)]
Exploit r288122 to address a cosmetic issue.  Since PV chunk pages don't
belong to a vm object, they can't be paged out.  Since they can't be paged
out, they are never enqueued in a paging queue.  Nonetheless, passing
PQ_INACTIVE to vm_page_unwire() creates the appearance that these pages
are being enqueued in the inactive queue.  As of r288122, we can avoid
this false impression by passing PQ_NONE.

Submitted by: kmacy (an earlier version)
Differential Revision: https://reviews.freebsd.org/D1674

8 years agoFix a bug in the TX command handling - log when a too-large payload is
adrian [Sat, 26 Sep 2015 07:14:00 +0000 (07:14 +0000)]
Fix a bug in the TX command handling - log when a too-large payload is
sent, and fix a bug I found when doing so.

8 years agoAdd man pages for the AR9170 and AR9170 firmware.
adrian [Sat, 26 Sep 2015 07:09:46 +0000 (07:09 +0000)]
Add man pages for the AR9170 and AR9170 firmware.

8 years agoAdd an initial driver for the AR9170 series draft-11n hardware from
adrian [Sat, 26 Sep 2015 07:08:35 +0000 (07:08 +0000)]
Add an initial driver for the AR9170 series draft-11n hardware from
Atheros.

Thanks to OpenBSD for providing a driver based on the original
Atheros open source driver circa 2008.  This uses the early, pre-carl9170
atheros provided firmware.

It only supports 11bg at the moment.  I've not tested it with 11a
(and so the TX rate control logic may be slightly wrong!) so if
you do have the dual-band version of this hardware please do let me know.

Tested:

* AR9170, TP-Link WN821N 2GHz.

TODO:

* Hook this up to a non-module build.

8 years agoUpdate USB device IDs for the upcoming AR9170 support.
adrian [Sat, 26 Sep 2015 06:57:08 +0000 (06:57 +0000)]
Update USB device IDs for the upcoming AR9170 support.

8 years agoMETA_MODE: Make it easier to keep the bootstrap-tools args in sync.
bdrewery [Sat, 26 Sep 2015 04:22:18 +0000 (04:22 +0000)]
META_MODE: Make it easier to keep the bootstrap-tools args in sync.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd SUBDIR_PARALLEL.
bdrewery [Sat, 26 Sep 2015 01:28:50 +0000 (01:28 +0000)]
Add SUBDIR_PARALLEL.

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

8 years agoRemove disconnected directories.
bdrewery [Sat, 26 Sep 2015 01:24:35 +0000 (01:24 +0000)]
Remove disconnected directories.

These were added disconnected in 2005 in r145524.

Sponsored by: EMC / Isilon Storage Division

8 years agoPass to sobind() copy of the address, not the original.
mav [Sat, 26 Sep 2015 01:23:29 +0000 (01:23 +0000)]
Pass to sobind() copy of the address, not the original.

8 years agoAdd missing CLEANFILES.
bdrewery [Sat, 26 Sep 2015 01:04:52 +0000 (01:04 +0000)]
Add missing CLEANFILES.

MFC after: 1 week
X-MFC-With: r288199
Sponsored by: EMC / Isilon Storage Division

8 years agoPerform some rather amusing layering violations to add mbuf tags to the
adrian [Sat, 26 Sep 2015 00:53:37 +0000 (00:53 +0000)]
Perform some rather amusing layering violations to add mbuf tags to the
net80211 receive path.  This allows drivers (notably USB right now, but
anything/everything!) to optionally defer bulk RX of 802.11 frames until
/outside/ of the driver lock(s), rather than doing:

UNLOCK(sc);
ieee80211_input*()
LOCK(sc);

.. which is really stupid.

The existing API is maintaned - if ieee80211_input() / ieee80211_input_all()
is called then the RSSI/NF values are used.  If the MIMO versions are called
with a given rx status pointer then it's used. Else, it'll use whatever
is in the RX mbuf tag.

8 years agoCompare the newly allocated array elements to NULL in order to see
bz [Fri, 25 Sep 2015 23:07:17 +0000 (23:07 +0000)]
Compare the newly allocated array elements to NULL in order to see
if the malloc succeeded.

Spotted by: reading kernel compile time log
MFC after: 2 weeks

8 years agoRemove 'set -e' that are no longer needed as it is already default.
bdrewery [Fri, 25 Sep 2015 23:03:32 +0000 (23:03 +0000)]
Remove 'set -e' that are no longer needed as it is already default.

When bmake was initially imported at r241298 shell commands were no longer
ran with 'set -e' as they were before.  This was fixed in r254980 so they
again always use 'set -e'.

Sponsored by: EMC / Isilon Storage Division

8 years agoExplicitly enable .MAKE.ALWAYS_PASS_JOB_QUEUE for bmake.
bdrewery [Fri, 25 Sep 2015 22:51:30 +0000 (22:51 +0000)]
Explicitly enable .MAKE.ALWAYS_PASS_JOB_QUEUE for bmake.

This is a NOP as r254419 enabled this by default in bmake.  Add it here though
to ensure it is known that we are using this as a default and in case a
bmake import removes the default we have.

This tells bmake to always pass job tokens into sub-commands.  Otherwise
it would only do so if the target being built depended on the special
.MAKE target (which causes _all_ commands to be executed with -n as well)
or if the command matches '${MAKE}/${.MAKE}/$(MAKE)/$(.MAKE)/make' (before
expansion, so ${LIB32WMAKE} would not qualify).  Using '+' on a command
(which runs the command with -n) would not pass the job token even though it
is a documented way to achieve the .MAKE effect on a command.

Sponsored by: EMC / Isilon Storage Division

8 years agoProperly lock LUN in ctl_failover_lun().
mav [Fri, 25 Sep 2015 22:45:23 +0000 (22:45 +0000)]
Properly lock LUN in ctl_failover_lun().

8 years agoMFV c3ccd112: Correct off-by-ones in free_exception of emergency buffer
cem [Fri, 25 Sep 2015 22:29:21 +0000 (22:29 +0000)]
MFV c3ccd112: Correct off-by-ones in free_exception of emergency buffer

Note, this has been broken since import in r227825.

PR: https://github.com/pathscale/libcxxrt/issues/29
Reviewed by: emaste (earlier version), kan (informally)
Obtained from: Anton Rang
Relnotes: yes
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D3733

8 years agoRemove apostrophe from AP's for consistency (arm64 mp_machdep)
emaste [Fri, 25 Sep 2015 21:04:31 +0000 (21:04 +0000)]
Remove apostrophe from AP's for consistency (arm64 mp_machdep)

8 years agoAdd missing binutils ldscripts.
bdrewery [Fri, 25 Sep 2015 20:45:10 +0000 (20:45 +0000)]
Add missing binutils ldscripts.

Some of these are after the fix in r288230 to install them.

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

8 years agoFix subdir -j build after r287983 by adding missing dependencies.
bdrewery [Fri, 25 Sep 2015 20:31:04 +0000 (20:31 +0000)]
Fix subdir -j build after r287983 by adding missing dependencies.

Sponsored by: EMC / Isilon Storage Division

8 years agoBuild ofwdump(8) on MIPS too
emaste [Fri, 25 Sep 2015 20:26:59 +0000 (20:26 +0000)]
Build ofwdump(8) on MIPS too

It will be useful as FDT sees increasing usage on FreeBSD/mips.

Sponsored by: DARPA, AFRL

8 years agoxinstall: renumber UCB clauses to avoid skipping #3
emaste [Fri, 25 Sep 2015 20:25:18 +0000 (20:25 +0000)]
xinstall: renumber UCB clauses to avoid skipping #3

8 years agoFix emulation ldscripts not being installed since r131832.
bdrewery [Fri, 25 Sep 2015 20:21:45 +0000 (20:21 +0000)]
Fix emulation ldscripts not being installed since r131832.

For example, 32bit scripts on 64bit host.

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

8 years agoFix bit masks changed for the wrong commands in r288221.
mav [Fri, 25 Sep 2015 19:46:34 +0000 (19:46 +0000)]
Fix bit masks changed for the wrong commands in r288221.

8 years agoMETA_MODE: Remove DEP_MACHINE from Makefile.depend files.
bdrewery [Fri, 25 Sep 2015 19:44:01 +0000 (19:44 +0000)]
META_MODE: Remove DEP_MACHINE from Makefile.depend files.

This has not been needed since r246865 in projects/bmake.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA_MODE: Checkin a proper Makefile.depend.
bdrewery [Fri, 25 Sep 2015 19:33:38 +0000 (19:33 +0000)]
META_MODE: Checkin a proper Makefile.depend.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA_MODE: Remove DEP_RELDIR from Makefile.depend files.
bdrewery [Fri, 25 Sep 2015 19:26:08 +0000 (19:26 +0000)]
META_MODE: Remove DEP_RELDIR from Makefile.depend files.

This has not been needed since r284171 in projects/bmake.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd missing SVN keywords.
bdrewery [Fri, 25 Sep 2015 19:25:19 +0000 (19:25 +0000)]
Add missing SVN keywords.

Sponsored by: EMC / Isilon Storage Division

8 years agoConstify ctl_serialize_table.
mav [Fri, 25 Sep 2015 18:49:25 +0000 (18:49 +0000)]
Constify ctl_serialize_table.

8 years agosbuf: Process more than one char at a time
cem [Fri, 25 Sep 2015 18:37:14 +0000 (18:37 +0000)]
sbuf: Process more than one char at a time

Revamp sbuf_put_byte() to sbuf_put_bytes() in the obvious fashion and
fixup callers.

Add a thin shim around sbuf_put_bytes() with the old ABI to avoid ugly
changes to some callers.

Reviewed by: jhb, markj
Obtained from: Dan Sledz
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D3717

8 years agoRemove some dead code found by Clang analyzer.
mav [Fri, 25 Sep 2015 18:15:34 +0000 (18:15 +0000)]
Remove some dead code found by Clang analyzer.

8 years agoRemove stale comments and some excessive empty lines.
mav [Fri, 25 Sep 2015 16:34:59 +0000 (16:34 +0000)]
Remove stale comments and some excessive empty lines.

8 years agoThe bsd.progs.mk -> bsd.prog.mk rework did not pan out yet.
bdrewery [Fri, 25 Sep 2015 16:27:11 +0000 (16:27 +0000)]
The bsd.progs.mk -> bsd.prog.mk rework did not pan out yet.

It may still in the future but for now unmark this deprecated.  bsd.progs.mk
is less bad after r288158.

8 years agoPROGS: Let the parent run the children in parallel.
bdrewery [Fri, 25 Sep 2015 15:57:00 +0000 (15:57 +0000)]
PROGS: Let the parent run the children in parallel.

This seems to work fine.

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

8 years agoFix non-POSIX-compliant use of getaddrinfo in libfetch
grembo [Fri, 25 Sep 2015 14:24:23 +0000 (14:24 +0000)]
Fix non-POSIX-compliant use of getaddrinfo in libfetch

Submitted by: Boris Kolpackov <boris@codesynthesis.com>
Reviewed by: bapt
Approved by: bapt
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D3724

8 years agoUse per-cpu values for base and last in tc_cpu_ticks(). The values
kib [Fri, 25 Sep 2015 13:03:57 +0000 (13:03 +0000)]
Use per-cpu values for base and last in tc_cpu_ticks().  The values
are updated lockess, different CPUs write its own view of timecounter
state.  The critical section is done for safety, callers of
tc_cpu_ticks() are supposed to already enter critical section, or to
own a spinlock.

The change fixes sporadical reports of too high values reported for
the (W)CPU on platforms that do not provide cpu ticker and use
tc_cpu_ticks(), in particular, arm*.

Diagnosed and reviewed by: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoSwitch I/O time accounting from system time to uptime.
mav [Fri, 25 Sep 2015 10:14:39 +0000 (10:14 +0000)]
Switch I/O time accounting from system time to uptime.

While there, make num_dmas accounted independently of CTL_TIME_IO.

8 years agoCollect DMA statistics on secondary HA node.
mav [Fri, 25 Sep 2015 09:55:51 +0000 (09:55 +0000)]
Collect DMA statistics on secondary HA node.

8 years agoMake HA handle datamove and done in a universal way, using port methods.
mav [Fri, 25 Sep 2015 09:14:29 +0000 (09:14 +0000)]
Make HA handle datamove and done in a universal way, using port methods.

Now from primary node point of view requests transferred from secondary
node should look almost normal and always have valid port.

8 years agoFix two cases where "const" were washed off pointers with strchr(3)
phk [Fri, 25 Sep 2015 07:37:00 +0000 (07:37 +0000)]
Fix two cases where "const" were washed off pointers with strchr(3)

8 years agoRemove some control_softc references.
mav [Fri, 25 Sep 2015 07:27:23 +0000 (07:27 +0000)]
Remove some control_softc references.

8 years agoMETA_MODE: Fix staging not respecting _DIR overrides.
bdrewery [Fri, 25 Sep 2015 05:15:27 +0000 (05:15 +0000)]
META_MODE: Fix staging not respecting _DIR overrides.

This fixes atf-c.h not properly being installed to /usr/include/ (in
the stagedir) via its override of 'INCSDIR_atf-c.h= ${INCLUDEDIR}'.

This fixes building things that depend on atf.

Staging seems to ignore OWN/GRP/MODE settings and needs further exploration.

Sponsored by: EMC / Isilon Storage Division

8 years agoFix typo.
jpaetzel [Fri, 25 Sep 2015 03:46:06 +0000 (03:46 +0000)]
Fix typo.

Sponsored by: iXsystems

8 years agoAdd double size 16x32 VGA ROM font
emaste [Fri, 25 Sep 2015 02:52:54 +0000 (02:52 +0000)]
Add double size 16x32 VGA ROM font

This was created from vgarom-8x16.hex, and should be useful for higher
resolution displays.

Sponsored by: The FreeBSD Foundation

8 years agoMFV r288063: make dataset property de-registration operation O(1)
delphij [Fri, 25 Sep 2015 01:05:44 +0000 (01:05 +0000)]
MFV r288063: make dataset property de-registration operation O(1)

A change to a property on a dataset must be propagated to its descendants
in case that property is inherited. For datasets whose information is
not currently loaded into memory (e.g. a snapshot that isn't currently
mounted), there is nothing to do; the property change will take effect
the next time that dataset is loaded. To handle updates to datasets that
are in-core, ZFS registers a callback entry for each property of each
loaded dataset with the dsl directory that holds that dataset. There
is a dsl directory associated with each live dataset that references
both the live dataset and any snapshots of the live dataset. A property
change is effected by doing a traversal of the tree of dsl directories
for a pool, starting at the directory sourcing the change, and invoking
these callbacks.

The current implementation both registers and de-registers properties
individually for each loaded dataset. While registration for a property is
O(1) (insert into a list), de-registration is O(n) (search list and then
remove). The 'n' for de-registration, however, is not limited to the size
(number of snapshots + 1) of the dsl directory. The eviction portion
of the life cycle for the in core state of datasets is asynchronous,
which allows multiple copies of the dataset information to be in-core
at once. Only one of these copies is active at any time with the rest
going through tear down processing, but all copies contribute to the
cost of performing a dsl_prop_unregister().

One way to create multiple, in-flight copies of dataset information
is by performing "zfs list" operations from multiple threads
concurrently. In-core dataset information is loaded on demand and then
evicted when reference counts drops to zero. For datasets that are not
mounted, there is no persistent reference count to keep them resident.
So, a list operation will load them, compute the information required to
do the list operation, and then evict them. When performing this operation
from multiple threads it is possible that some of the in-core dataset
information will be reused, but also possible to lose the race and load
the dataset again, even while the same information is being torn down.

Compounding the performance issue further is a change made for illumos
issue 5056 which made dataset eviction single threaded. In environments
using automation to manage ZFS datasets, it is now possible to create
enough of a backlog of dataset evictions to consume excessive amounts
of kernel memory and to bog down the system.

The fix employed here is to make property de-registration O(1). With this
change in place, it is hoped that a single thread is more than sufficient
to handle eviction processing. If it isn't, the problem can be solved
by increasing the number of threads devoted to the eviction taskq.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_prop.h:
    Associate dsl property callback records with both the
    dsl directory and the dsl dataset that is registering the
    callback. Both connections are protected by the dsl directory's
    "dd_lock".

    When linking callbacks into a dsl directory, group them by
    the property type. This helps reduce the space penalty for the
    double association (the property name pointer is stored once
    per dsl_dir instead of in each record) and reduces the number of
    strcmp() calls required to do callback processing when updating
    a single property. Property types are stored in a linked list
    since currently ZFS registers a maximum of 10 property types
    for each dataset.

    Note that the property buckets/records associated with a dsl
    directory are created on demand, but only freed when the dsl
    directory is freed. Given the static nature of property types
    and their small number, there is no benefit to freeing the few
    bytes of memory used to represent the property record earlier.
    When a property record becomes empty, the dsl directory is either
    going to become unreferenced a little later in this thread of
    execution, or there is a high chance that another dataset is
    going to be loaded that would recreate the bucket anyway.

    Replace dsl_prop_unregister() with dsl_prop_unregister_all().
    All callers of dsl_prop_unregister() are trying to remove
    all property registrations for a given dsl dataset anyway. By
    changing the API, we can avoid doing any lookups of callbacks
    by property type and just traverse the list of all callbacks
    for the dataset and free each one.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c:
    Replace use of dsl_prop_unregister() with the new
    dsl_prop_unregister_all() API.

illumos/illumos-gate@03bad06fbb261fd4a7151a70dfeff2f5041cce1f
    Author: Justin Gibbs <gibbs@scsiguy.com>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Prakash Surya <prakash.surya@delphix.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Illumos issue:
    6171 dsl_prop_unregister() slows down dataset eviction
    https://www.illumos.org/issues/6171

MFC after: 2 weeks

8 years agoRemove EOL whitespace from Makefile.inc1
emaste [Fri, 25 Sep 2015 00:30:53 +0000 (00:30 +0000)]
Remove EOL whitespace from Makefile.inc1

8 years agoDon't recurse with cleanobj.
bdrewery [Fri, 25 Sep 2015 00:07:31 +0000 (00:07 +0000)]
Don't recurse with cleanobj.

bsd.obj.mk handles the needs fine.  When an objdir exists it will
just rm -Rf the objdir.  When it does not exist though it will
call 'clean' and 'cleandepend', which properly recurse in bsd.progs.mk.

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

8 years agoRemove unneeded dependency of '.o: .h' that bsd.prog.mk already handles.
bdrewery [Thu, 24 Sep 2015 23:23:58 +0000 (23:23 +0000)]
Remove unneeded dependency of '.o: .h' that bsd.prog.mk already handles.

MFC after: 2 weeks
X-MFC-With: r288198
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd missing CLEANFILES.
bdrewery [Thu, 24 Sep 2015 23:15:24 +0000 (23:15 +0000)]
Add missing CLEANFILES.

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

8 years agoRemove unneeded dependency line.
bdrewery [Thu, 24 Sep 2015 23:08:33 +0000 (23:08 +0000)]
Remove unneeded dependency line.

bsd.prog.mk adds 'ktutil-commands.o: ktutil-commands.h' already.

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

8 years agoRename ELFOSABI_SYSV to ELFOSABI_NONE to match current spec
emaste [Thu, 24 Sep 2015 21:04:48 +0000 (21:04 +0000)]
Rename ELFOSABI_SYSV to ELFOSABI_NONE to match current spec

Source: http://www.sco.com/developers/gabi/latest/ch4.eheader.html

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

8 years agoreadelf: Correct typo HPUS -> HPUX
emaste [Thu, 24 Sep 2015 18:53:20 +0000 (18:53 +0000)]
readelf: Correct typo HPUS -> HPUX

Submitted by: kib