]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoXref iwm(4).
brueffer [Mon, 10 Aug 2015 10:54:35 +0000 (10:54 +0000)]
Xref iwm(4).

8 years agoAdd iwm(4) to the hardware notes.
brueffer [Mon, 10 Aug 2015 10:41:40 +0000 (10:41 +0000)]
Add iwm(4) to the hardware notes.

8 years agoHook up iwm.4 and iwmfw.4 to the build.
brueffer [Mon, 10 Aug 2015 10:36:08 +0000 (10:36 +0000)]
Hook up iwm.4 and iwmfw.4 to the build.

8 years agoMFV r277426: 5408 managing ZFS cache devices requires lots of RAM
mav [Mon, 10 Aug 2015 10:34:23 +0000 (10:34 +0000)]
MFV r277426: 5408 managing ZFS cache devices requires lots of RAM
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Don Brady <dev.fs.zfs@gmail.com>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Chris Williamson <Chris.Williamson@delphix.com>

illumos/illumos-gate@89c86e32293a30cdd7af530c38b2073fee01411c

Currently, every buffer cached in the L2ARC is accompanied by a 240-byte
header in memory, leading to very high memory consumption when using very
large cache devices. These changes significantly reduce this overhead.

Currently:

L1-only header = 176 bytes
L1 + L2 or L2-only header = 176 bytes + 32 byte checksum + 32 byte l2hdr
    = 240 bytes

Memory-optimized:

L1-only header = 176 bytes
L1 + L2 header = 176 bytes + 32 byte checksum = 208 bytes
L2-only header = 96 bytes + 32 byte checksum = 128 bytes

So overall:

          Trunk  Optimized
        +-----------------+
L1-only | 176 B  | 176 B  | (same)
        +-----------------+
L1 & L2 | 240 B  | 208 B  | (saved 32 bytes)
        +-----------------+
L2-only | 240 B  | 128 B  | (saved 116 bytes)
        +-----------------+

For an average blocksize of 8KB, this means that for the L2ARC, the ratio
of metadata to data has gone down from about 2.92% to 1.56%.  For a
'storage optimized' EC2 instance with 1600GB of SSD and 60GB of RAM, this
means that we expect a completely full L2ARC to use (1600 GB * 0.0156) /
60GB = 41% of the available memory, down from 78%.

8 years agoRather than hardcoding a string and limiting the comparison to these
bz [Mon, 10 Aug 2015 10:29:32 +0000 (10:29 +0000)]
Rather than hardcoding a string and limiting the comparison to these
characters use the defined constant so that in case of change this
would not break.

Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D3340
MFC after: 2 weeks

8 years agoRemove mps_request_polled(), it's redundant to mps_wait_command()
scottl [Mon, 10 Aug 2015 09:02:34 +0000 (09:02 +0000)]
Remove mps_request_polled(), it's redundant to mps_wait_command()

Obtained from: Netflix, Inc.

8 years agoRemove some unused code.
scottl [Mon, 10 Aug 2015 08:57:34 +0000 (08:57 +0000)]
Remove some unused code.

Obtained from: Netflix, Inx.

8 years agoRemove bad call to shutdown().
ed [Mon, 10 Aug 2015 07:45:13 +0000 (07:45 +0000)]
Remove bad call to shutdown().

The socket created by rtsol/rtsold is not a connection-based socket,
meaning that we should not attempt to call shutdown() on it.

Reported by: kan

8 years agoFinish reverting r286410 for now.
adrian [Mon, 10 Aug 2015 06:12:53 +0000 (06:12 +0000)]
Finish reverting r286410 for now.

8 years agoCommit more of the reversion of r286410 . Sorry.
adrian [Mon, 10 Aug 2015 06:12:24 +0000 (06:12 +0000)]
Commit more of the reversion of r286410 . Sorry.

8 years agoFinish reverting r286410 - sorry, I somehow missed this with svn commit.
adrian [Mon, 10 Aug 2015 06:11:10 +0000 (06:11 +0000)]
Finish reverting r286410 - sorry, I somehow missed this with svn commit.

8 years agoAdd a #ifndef around the HAVE_ICONV settings since it is supplied
peter [Mon, 10 Aug 2015 00:53:45 +0000 (00:53 +0000)]
Add a #ifndef around the HAVE_ICONV settings since it is supplied
by the Makefile.

8 years agoDon't assume iconv is enabled. I didn't realize there was a configuration
peter [Mon, 10 Aug 2015 00:46:24 +0000 (00:46 +0000)]
Don't assume iconv is enabled.  I didn't realize there was a configuration
control to turn it off and it wasn't being respected.

Pointed out by: gshapiro

8 years agoMFV 286555: Avoid 128K kmem allocations in mzap_upgrade()
mav [Sun, 9 Aug 2015 20:41:44 +0000 (20:41 +0000)]
MFV 286555: Avoid 128K kmem allocations in mzap_upgrade()

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: George Wilson <george@delphix.com>
Reviewed by: Steven Hartland <killing@multiplay.co.uk>
Approved by: Rich Lowe <richlowe@richlowe.net>

illumos/illumos-gate@be3e2ab906b80af79c7b22885f279e45ad8fb995

8 years agoMFV 286553: 5769 Cast 'zfs bad bloc' to ULL for x86
mav [Sun, 9 Aug 2015 20:32:30 +0000 (20:32 +0000)]
MFV 286553: 5769 Cast 'zfs bad bloc' to ULL for x86

Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <paul.dagnelie@delphix.com>
Reviewed by: Richard PALO <richard@NetBSD.org>
Approved by: Dan McDonald <danmcd@omniti.com>

illumos/illumos-gate@8c76e0763bcf0029556e106377da859f6492a7ee

8 years agoMFV 286550: 5694 traverse_prefetcher does not prefetch enough
mav [Sun, 9 Aug 2015 20:23:35 +0000 (20:23 +0000)]
MFV 286550: 5694 traverse_prefetcher does not prefetch enough

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Alex Reece <alex@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Reviewed by: Bayard Bell <buffer.g.overflow@gmail.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: George Wilson <george.wilson@delphix.com>

illumos/illumos-gate@34d7ce052c4565b078f73b95ccbd49274e98edaa

8 years agoMFV 286548:
mav [Sun, 9 Aug 2015 20:08:38 +0000 (20:08 +0000)]
MFV 286548:
5693 ztest fails in dbuf_verify: buf[i] == 0, due to dedup and bp_override

Reviewed by: George Wilson <george@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: Bayard Bell <buffer.g.overflow@gmail.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@7f7ace370074e350853da254c65688fd43ddc695

8 years agoMFV 286546:
mav [Sun, 9 Aug 2015 20:02:16 +0000 (20:02 +0000)]
MFV 286546:
5661 ZFS: "compression = on" should use lz4 if feature is enabled

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Reviewed by: Xin LI <delphij@freebsd.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Justin T. Gibbs <justing@spectralogic.com>

illumos/illumos-gate@db1741f555ec79def5e9846e6bfd132248514ffe

8 years agoMFV 286544:
mav [Sun, 9 Aug 2015 19:35:39 +0000 (19:35 +0000)]
MFV 286544:
5630 stale bonus buffer in recycled dnode_t leads to data corruption

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george@delphix.com>
Reviewed by: Will Andrews <will@freebsd.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Justin T. Gibbs <justing@spectralogic.com>

8 years agoMFV 286542: 5592 NULL pointer dereference in dsl_prop_notify_all_cb()
mav [Sun, 9 Aug 2015 19:29:10 +0000 (19:29 +0000)]
MFV 286542: 5592 NULL pointer dereference in dsl_prop_notify_all_cb()

Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george@delphix.com>
Reviewed by: Will Andrews <will@freebsd.org>
Approved by: Robert Mustacchi <rm@joyent.com>

illumos/illumos-gate@9d47dec0481d8cd53b2c1053c96bfa3f78357d6a

8 years agoMFV 286540: 5531 NULL pointer dereference in dsl_prop_get_ds()
mav [Sun, 9 Aug 2015 19:26:21 +0000 (19:26 +0000)]
MFV 286540: 5531 NULL pointer dereference in dsl_prop_get_ds()

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: George Wilson <george@delphix.com>
Reviewed by: Bayard Bell <buffer.g.overflow@gmail.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Justin T. Gibbs <justing@spectralogic.com>

illumos/illumos-gate@e57a022b8f718889ffa92adbde47a8f08abcdb25

8 years agoMFV 286538:
mav [Sun, 9 Aug 2015 19:17:59 +0000 (19:17 +0000)]
MFV 286538:
5562 ZFS sa_handle's violate kmem invariants, debug kernels panic on boot

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Robert Mustacchi <rm@fingolfin.org>
Reviewed by: George Wilson <george@delphix.com>
Reviewed by: Rich Lowe <richlowe@richlowe.net>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Justin T. Gibbs <justing@spectralogic.com>

illumos/illumos-gate@0fda3cc5c1c5a1d9bdea6d52637bef6e781549c9

8 years agotcp_reass_zone is not a VNET variable.
kp [Sun, 9 Aug 2015 19:07:24 +0000 (19:07 +0000)]
tcp_reass_zone is not a VNET variable.

This fixes a panic during 'sysctl -a' on VIMAGE kernels.

The tcp_reass_zone variable is not VNET_DEFINE() so we can not mark it as a VNET
variable (with CTLFLAG_VNET).

8 years agocmp and cp are used by the kerberos install, so need to be imclided in
imp [Sun, 9 Aug 2015 18:15:33 +0000 (18:15 +0000)]
cmp and cp are used by the kerberos install, so need to be imclided in
ITOOLS. They are tiny enough that I'm not making conditional: the
minuscule savings in disk space isn't worth the obfuscation of
Makefile.inc1.

8 years agocdefs: reduce code duplication
pfg [Sun, 9 Aug 2015 15:38:32 +0000 (15:38 +0000)]
cdefs: reduce code duplication

8 years agoProperly sort
bapt [Sun, 9 Aug 2015 14:46:18 +0000 (14:46 +0000)]
Properly sort

8 years agoAdd missing entry
bapt [Sun, 9 Aug 2015 14:45:29 +0000 (14:45 +0000)]
Add missing entry

Reported by: antroine

8 years agoAdd a new group named 'video' with the id of 44. And make drm create
kwm [Sun, 9 Aug 2015 12:58:56 +0000 (12:58 +0000)]
Add a new group named 'video' with the id of 44. And make drm create
devices in /dev/dri/ with this new group.

This will allow ports and users to more easily access to these devices
for OpenGL and OpenCL support.

Reviewed by: dumbbell@
Approved by: dumbbell@
Differential Revision: https://reviews.freebsd.org/D1260

8 years agoIn GNU as, avoid left-shifting negative integers, which is undefined.
dim [Sun, 9 Aug 2015 11:06:40 +0000 (11:06 +0000)]
In GNU as, avoid left-shifting negative integers, which is undefined.

MFC after: 3 days

8 years agoDocument kern.cam.ctl.debug sysctl.
mav [Sun, 9 Aug 2015 10:11:04 +0000 (10:11 +0000)]
Document kern.cam.ctl.debug sysctl.

MFC after: 1 week

8 years agoIn libm's exp2(3), avoid left-shifting a negative integer, which is
dim [Sun, 9 Aug 2015 10:00:13 +0000 (10:00 +0000)]
In libm's exp2(3), avoid left-shifting a negative integer, which is
undefined.  Replace it with the intended value, in a defined way.

Reviewed by: bde
MFC after: 3 days

8 years agoRemove verbose CTL messages.
mav [Sun, 9 Aug 2015 09:54:29 +0000 (09:54 +0000)]
Remove verbose CTL messages.

Reporting SCSI errors to console is often useless, pollutes logs and may
affect performance.  For debugging there is kern.cam.ctl.debug sysctl

MFC after: 1 week

8 years agoRevise the text about the atomicity of the defined operations across
alc [Sun, 9 Aug 2015 07:45:15 +0000 (07:45 +0000)]
Revise the text about the atomicity of the defined operations across
multiple processors.  In particular, clearly state that the operations
are always atomic when they are applied to the default memory type
that is used by the kernel (and applications).

Reviewed by: kib, jhb (an earlier version)
MFC after: 1 week

8 years agoMake some debug printf's into DPRINTF's to reduce noise on attach/detahh
ngie [Sun, 9 Aug 2015 06:58:06 +0000 (06:58 +0000)]
Make some debug printf's into DPRINTF's to reduce noise on attach/detahh

Similar reasoning to what was done in r286367 with geom_uzip(4)

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

8 years agoMove the USE_PREAD configuration knob out of the middle of the autoconf
peter [Sun, 9 Aug 2015 05:54:53 +0000 (05:54 +0000)]
Move the USE_PREAD configuration knob out of the middle of the autoconf
generated ones.  It is easy to mistake as an option that has gone away
when it's actually a control that was explicitly turned on for FreeBSD.

8 years agoUpdate the private sqlite3 from 3.8.9 to 3.8.11.1 (used by svnlite and
peter [Sun, 9 Aug 2015 05:44:57 +0000 (05:44 +0000)]
Update the private sqlite3 from 3.8.9 to 3.8.11.1 (used by svnlite and
kerberos)

8 years agoFix typo introduced in r275079
peter [Sun, 9 Aug 2015 05:38:31 +0000 (05:38 +0000)]
Fix typo introduced in r275079

8 years agoUpdate svnlite from 1.8.10 to 1.8.14. This is mostly for client-side bug
peter [Sun, 9 Aug 2015 05:22:53 +0000 (05:22 +0000)]
Update svnlite from 1.8.10 to 1.8.14.  This is mostly for client-side bug
fixes and quality of life improvements.
While there are security issues in this time frame that affect usage as a
server (eg: linked into apache), this isn't possible here.

8 years agoUpdate serf from 1.3.7 to 1.3.8. Mostly disables sslv2 and sslv3.
peter [Sun, 9 Aug 2015 05:16:14 +0000 (05:16 +0000)]
Update serf from 1.3.7 to 1.3.8.  Mostly disables sslv2 and sslv3.

8 years agoUpdate apr-util config - I don't believe this part is used by svn, but
peter [Sun, 9 Aug 2015 05:15:28 +0000 (05:15 +0000)]
Update apr-util config - I don't believe this part is used by svn, but
if it were, use shm_* instead of sysvshm.

8 years agoUpdate apr-1.5.1 to 1.5.2
peter [Sun, 9 Aug 2015 05:14:25 +0000 (05:14 +0000)]
Update apr-1.5.1 to 1.5.2

8 years agoAdd myself into the src graph.
araujo [Sun, 9 Aug 2015 02:10:20 +0000 (02:10 +0000)]
Add myself into the src graph.

Approved by: bapt (mentor)
Differential Revision: D3294

8 years agoAdd rodrigc@ to the committers graph.
araujo [Sun, 9 Aug 2015 02:08:28 +0000 (02:08 +0000)]
Add rodrigc@ to the committers graph.

Approved by: bapt (mentor)
Differential Revision: D3288

8 years agoRemove 5 and 6 bytes sequences which are illegal in UTF-8 space. (part2)
bapt [Sun, 9 Aug 2015 00:06:56 +0000 (00:06 +0000)]
Remove 5 and 6 bytes sequences which are illegal in UTF-8 space. (part2)

Per rfc3629 value greater than 0x10ffff should be rejected

Suggested by: jilles

8 years agoRemove 5 and 6 bytes sequences which are illegal in UTF-8 space.
bapt [Sat, 8 Aug 2015 23:59:15 +0000 (23:59 +0000)]
Remove 5 and 6 bytes sequences which are illegal in UTF-8 space.

Per rfc3629 value greater than 0x10ffff should be rejected

Suggested by: jilles

8 years agoCorrect return type of booke_init() prototype.
jhibbits [Sat, 8 Aug 2015 23:13:53 +0000 (23:13 +0000)]
Correct return type of booke_init() prototype.

8 years agoTreat internal bridge as subtractive on ThunderX ARM64
zbb [Sat, 8 Aug 2015 21:46:38 +0000 (21:46 +0000)]
Treat internal bridge as subtractive on ThunderX ARM64

Internal bridges in Cavium ThunderX SoC behave as subtractive,
but they are unable to be identified. Force setting an appropriate
flag.

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

8 years agoFix compilation after r286458.
marius [Sat, 8 Aug 2015 21:42:15 +0000 (21:42 +0000)]
Fix compilation after r286458.

8 years agoFix compilation after r286457 w/o INVARIANTS or INVARIANT_SUPPORT.
marius [Sat, 8 Aug 2015 21:41:59 +0000 (21:41 +0000)]
Fix compilation after r286457 w/o INVARIANTS or INVARIANT_SUPPORT.

8 years agoAdd support for external PCIe (PEM) on Cavium's ThunderX
zbb [Sat, 8 Aug 2015 21:32:03 +0000 (21:32 +0000)]
Add support for external PCIe (PEM) on Cavium's ThunderX

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

8 years agoBuild the iwm and iwmfw modules by default on x86.
rpaulo [Sat, 8 Aug 2015 21:09:41 +0000 (21:09 +0000)]
Build the iwm and iwmfw modules by default on x86.

8 years agoiwm: use the proper include path for iwm headers.
rpaulo [Sat, 8 Aug 2015 21:08:35 +0000 (21:08 +0000)]
iwm: use the proper include path for iwm headers.

8 years agosys/conf/files: add iwm and iwmfw.
rpaulo [Sat, 8 Aug 2015 21:08:10 +0000 (21:08 +0000)]
sys/conf/files: add iwm and iwmfw.

8 years agoAdd Ethernet and block device drivers to ARM64 GENERIC
zbb [Sat, 8 Aug 2015 20:56:30 +0000 (20:56 +0000)]
Add Ethernet and block device drivers to ARM64 GENERIC

8 years agoAdd nodevice iwmfw to WITHOUT_SOURCELESS_UCODE.
rpaulo [Sat, 8 Aug 2015 20:45:47 +0000 (20:45 +0000)]
Add nodevice iwmfw to WITHOUT_SOURCELESS_UCODE.

8 years agosys/conf/options: add IWM_DEBUG.
rpaulo [Sat, 8 Aug 2015 20:45:12 +0000 (20:45 +0000)]
sys/conf/options: add IWM_DEBUG.

8 years agoIntroduce support for internal PCIe for Cavium's ThunderX
zbb [Sat, 8 Aug 2015 20:34:55 +0000 (20:34 +0000)]
Introduce support for internal PCIe for Cavium's ThunderX

This driver supports internal PCIe Root Complex on
Cavium ThunderX Pass 1.1 hardware.

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

8 years agoProvide the tty-layer mutex when initializing the pps api. This allows
ian [Sat, 8 Aug 2015 20:11:47 +0000 (20:11 +0000)]
Provide the tty-layer mutex when initializing the pps api.  This allows
time_pps_fetch() to be used in blocking mode.

Also, don't init the pps api for system devices (consoles) that provide a
custom attach routine.  The device may actually be a keyboard or other non-
tty device.  If it wants to do pps processing (unlikely) it must handle
everything for itself.  (In reality, only a sun keyboard uses a custom
attach routine, and it doesn't make a good pps device.)

8 years agoiwm: fix a KASSERT: s/ds_size/ds_len/.
rpaulo [Sat, 8 Aug 2015 20:07:25 +0000 (20:07 +0000)]
iwm: fix a KASSERT: s/ds_size/ds_len/.

8 years agoRefactor early stages of security negotiation.
mav [Sat, 8 Aug 2015 19:04:37 +0000 (19:04 +0000)]
Refactor early stages of security negotiation.

MFC after: 2 weeks

8 years agofix regression in xargs -Px (introduced in r286289) and add regression tests
allanjude [Sat, 8 Aug 2015 18:37:20 +0000 (18:37 +0000)]
fix regression in xargs -Px (introduced in r286289) and add regression tests

PR: 202152
Submitted by: jbeich (original),  Nikolai Lifanov (final)
Reviewed by: jbeich
Approved by: bapt (mentor)
Differential Revision: https://reviews.freebsd.org/D3330

8 years agoMFP r274295:
melifaro [Sat, 8 Aug 2015 18:14:59 +0000 (18:14 +0000)]
MFP r274295:

* Move interface route cleanup to route.c:rt_flushifroutes()
* Convert most of "for (fibnum = 0; fibnum < rt_numfibs; fibnum++)" users
  to use new rt_foreach_fib() instead of hand-rolling cycles.

8 years agoMFP r274553:
melifaro [Sat, 8 Aug 2015 17:48:54 +0000 (17:48 +0000)]
MFP r274553:
* Move lle creation/deletion from lla_lookup to separate functions:
  lla_lookup(LLE_CREATE) -> lla_create
  lla_lookup(LLE_DELETE) -> lla_delete
lla_create now returns with LLE_EXCLUSIVE lock for lle.
* Provide typedefs for new/existing lltable callbacks.

Reviewed by: ae

8 years agoRemove some code duplication.
mav [Sat, 8 Aug 2015 16:39:28 +0000 (16:39 +0000)]
Remove some code duplication.

MFC after: 1 week

8 years agoSimplify ip[6] simploop:
melifaro [Sat, 8 Aug 2015 15:58:35 +0000 (15:58 +0000)]
Simplify ip[6] simploop:
Do not pass 'dst' sockaddr to ip[6]_mloopback:
  - We have explicit check for AF_INET in ip_output()
  - We assume ip header inside passed mbuf in ip_mloopback
  - We assume ip6 header inside passed mbuf in ip6_mloopback

8 years agoAdd missing files to sendmail obsolete files list
garga [Sat, 8 Aug 2015 15:51:29 +0000 (15:51 +0000)]
Add missing files to sendmail obsolete files list

Approved by: gshapiro
MFC after: 3 days
Sponsored by: Netgate
Differential Revision: https://reviews.freebsd.org/D3302

8 years agoAdd const-qualifiers for source mbuf argument in m_dup(), m_copym(),
melifaro [Sat, 8 Aug 2015 15:50:46 +0000 (15:50 +0000)]
Add const-qualifiers for source mbuf argument in m_dup(), m_copym(),
  m_dup_pkthdr() and m_tag_copy_chain().

8 years agoDisable 32-bit PIO for 6Gbit/s Intel SATA controllers.
mav [Sat, 8 Aug 2015 11:48:11 +0000 (11:48 +0000)]
Disable 32-bit PIO for 6Gbit/s Intel SATA controllers.

For some reason 32-bit PIO writes are not working on 6Gbit/s Intel SATA
ports, while 16/32-bit PIO reads and 16-bit PIO writes are working fine.
3Gbit/s ports on the same controllers have no this problem.

Workaround this by disabling 32-bit PIO for all Intel controllers that may
have 6Gbit/s ports.  It halves PIO performance from 6MB/s to 3MB/s, but
who bother about speed of such rare and slow mode, which is also highly
discouraged by SATA specifications?

MFC after: 2 weeks

8 years agoDon't panic if disk lost TRIM support due to switching to PIO mode.
mav [Sat, 8 Aug 2015 11:22:45 +0000 (11:22 +0000)]
Don't panic if disk lost TRIM support due to switching to PIO mode.

MFC after: 1 week

8 years agoFix interaction between libedit initialization and Capsicum
trasz [Sat, 8 Aug 2015 10:38:37 +0000 (10:38 +0000)]
Fix interaction between libedit initialization and Capsicum
in units(1). The most visible is the removal of libedit warnings
about being unable to open termcap database.

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

8 years agoAllow to disable BIO_DELETE passthru in fstab for swap-on-geli devices by
pjd [Sat, 8 Aug 2015 09:57:38 +0000 (09:57 +0000)]
Allow to disable BIO_DELETE passthru in fstab for swap-on-geli devices by
passing 'notrim' option.

PR: 198863
Submitted by: Matthew D. Fuller fullermd at over-yonder dot net

8 years agoEnable BIO_DELETE passthru in GELI, so TRIM/UNMAP can work as expected when
pjd [Sat, 8 Aug 2015 09:51:38 +0000 (09:51 +0000)]
Enable BIO_DELETE passthru in GELI, so TRIM/UNMAP can work as expected when
GELI is used on a SSD or inside virtual machine, so that guest can tell
host that it is no longer using some of the storage.

Enabling BIO_DELETE passthru comes with a small security consequence - an
attacker can tell how much space is being really used on encrypted device and
has less data no analyse then. This is why the -T option can be given to the
init subcommand to turn off this behaviour and -t/T options for the configure
subcommand can be used to adjust this setting later.

PR: 198863
Submitted by: Matthew D. Fuller fullermd at over-yonder dot net

This commit also includes a fix from Fabian Keil freebsd-listen at
fabiankeil.de for 'configure' on onetime providers which is not strictly
related, but is entangled in the same code, so would cause conflicts if
separated out.

8 years agoFix a kernel assertion issue introduced with r286227:
jch [Sat, 8 Aug 2015 08:40:36 +0000 (08:40 +0000)]
Fix a kernel assertion issue introduced with r286227:
Avoid too strict INP_INFO_RLOCK_ASSERT checks due to
tcp_notify() being called from in6_pcbnotify().

Reported by: Larry Rosenman <ler@lerctr.org>
Submitted by: markj, jch

8 years agoiwmfw: fix the path to the firmware file.
rpaulo [Sat, 8 Aug 2015 06:08:20 +0000 (06:08 +0000)]
iwmfw: fix the path to the firmware file.

8 years agoImport OpenBSD's iwm WiFi driver for Intel 3160/7260/7265.
rpaulo [Sat, 8 Aug 2015 06:06:48 +0000 (06:06 +0000)]
Import OpenBSD's iwm WiFi driver for Intel 3160/7260/7265.

There are still several bugs, but I've been using it for a while now.
Thanks to all the testers and to Adrian for his help with this
driver.

This driver isn't connected to the build yet, but it will be soon.

There's no MFC planned because the driver isn't very stable yet.

Reviewed by: adrian
Obtained from: https://github.com/rpaulo/iwm
Tested by: adrian, gjb, dumbbell (others that I forgot).
Relnotes: yes

8 years agoDocument the application interface.
marcel [Sat, 8 Aug 2015 04:59:27 +0000 (04:59 +0000)]
Document the application interface.

8 years agoRevert the wifi ifnet changes until things are more baked and tested.
adrian [Sat, 8 Aug 2015 01:10:17 +0000 (01:10 +0000)]
Revert the wifi ifnet changes until things are more baked and tested.

* 286410
* 286413
* 286416

The initial commit broke a variety of debug and features that aren't
in the GENERIC kernels but are enabled in other platforms.

8 years agoOnly process the PPS event types currently enabled in pps_params.mode.
ian [Fri, 7 Aug 2015 23:31:31 +0000 (23:31 +0000)]
Only process the PPS event types currently enabled in pps_params.mode.

This makes the PPS API behave correctly, but isn't ideal -- we still end
up capturing PPS data for non-enabled edges, we just don't process the
data into an event that becomes visible outside of kern_tc.  That's because
the event type isn't passed to pps_capture(), so it can't do the filtering.
Any solution for capture filtering is going to require touching every driver.

8 years agoRFC 2783 requires a status of ETIMEDOUT, not EWOULDBLOCK, on a timeout.
ian [Fri, 7 Aug 2015 21:14:19 +0000 (21:14 +0000)]
RFC 2783 requires a status of ETIMEDOUT, not EWOULDBLOCK, on a timeout.

8 years ago- Use an explicit "depends_on module kernel" guard in DTrace libraries that
markj [Fri, 7 Aug 2015 19:56:22 +0000 (19:56 +0000)]
- Use an explicit "depends_on module kernel" guard in DTrace libraries that
  reference types defined in the kernel. Otherwise dtrace(1) expects to find
  CTF definitions for all referenced types, which is not very reasonable
  when it is being used in a build environment. This was previously worked
  around by adding "-x nolibs" to dtrace -h or -G invocations, but as of
  r283025, dtrace(1) actually handles dependencies properly, so this is no
  longer necessary.
- Remove "pragma ident" directives from DTrace libraries, as they're being
  phased out upstream as well.

Submitted by: Krister Johansen <Krister.Johansen@isilon.com> [1]
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
> Description of fields to fill in above:                     76 columns --|
> PR:                       If a GNATS PR is affected by the change.
> Submitted by:             If someone else sent in the change.
> Reviewed by:              If someone else reviewed your modification.
> Approved by:              If you needed approval for this commit.
> Obtained from:            If the change is from a third party.
> MFC after:                N [day[s]|week[s]|month[s]].  Request a reminder email.
> MFH:                      Ports tree branch name.  Request approval for merge.
> Relnotes:                 Set to 'yes' for mention in release notes.
> Security:                 Vulnerability reference (one per line) or description.
> Sponsored by:             If the change was sponsored by an organization.
> Differential Revision:    https://reviews.freebsd.org/D### (*full* phabric URL needed).
> Empty fields above will be automatically removed.

M    libdtrace/io.d
M    libdtrace/ip.d
M    libdtrace/nfs.d
M    libdtrace/nfssrv.d
M    libdtrace/psinfo.d
M    libdtrace/regs_x86.d
M    libdtrace/sched.d
M    libdtrace/siftr.d
M    libdtrace/tcp.d
M    libdtrace/udp.d

8 years agoFix typo introduced in previous commit.
marcel [Fri, 7 Aug 2015 18:40:44 +0000 (18:40 +0000)]
Fix typo introduced in previous commit.

Pointed out by: Nikolai Lifanov <lifanov at mail.lifanov.com>

8 years agoipv4_is_zeronet() and ipv4_is_loopback() expect an address in network
markj [Fri, 7 Aug 2015 18:30:11 +0000 (18:30 +0000)]
ipv4_is_zeronet() and ipv4_is_loopback() expect an address in network
order, but IN_ZERONET and IN_LOOPBACK expect it in host order.

Submitted by: Tao Liu <Tao.Liu@isilon.com>
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoo Fix a typo.
marcel [Fri, 7 Aug 2015 17:22:37 +0000 (17:22 +0000)]
o  Fix a typo.
o  Describe the file formats mkimg can create.

8 years agoFix mtx_assert() argument.
glebius [Fri, 7 Aug 2015 16:23:16 +0000 (16:23 +0000)]
Fix mtx_assert() argument.

8 years agoAdd unmapped I/O support to ata(4) driver.
mav [Fri, 7 Aug 2015 14:38:26 +0000 (14:38 +0000)]
Add unmapped I/O support to ata(4) driver.

Main problem there was PIO mode support, that required KVA mapping.
Handle that case using recently added pmap_quick_enter_page(9) KPI,
mapping data pages to KVA one at a time.

8 years agoAdd more ifdefs to fix build with GCC after r286406.
mav [Fri, 7 Aug 2015 14:12:51 +0000 (14:12 +0000)]
Add more ifdefs to fix build with GCC after r286406.

8 years agoFix !MWL_DEBUG build.
glebius [Fri, 7 Aug 2015 12:34:20 +0000 (12:34 +0000)]
Fix !MWL_DEBUG build.

8 years agoCreate man page for pmap_quick_enter_page(9) and pmap_quick_remove_page(9)
jah [Fri, 7 Aug 2015 12:13:15 +0000 (12:13 +0000)]
Create man page for pmap_quick_enter_page(9) and pmap_quick_remove_page(9)

Reviewed by: kib, brueffer, wblock
Approved by: kib (mentor)
Differential Revision: https://reviews.freebsd.org/D3312

8 years agoChange KPI of how device drivers that provide wireless connectivity interact
glebius [Fri, 7 Aug 2015 11:43:14 +0000 (11:43 +0000)]
Change KPI of how device drivers that provide wireless connectivity interact
with the net80211 stack.

Historical background: originally wireless devices created an interface,
just like Ethernet devices do. Name of an interface matched the name of
the driver that created. Later, wlan(4) layer was introduced, and the
wlanX interfaces become the actual interface, leaving original ones as
"a parent interface" of wlanX. Kernelwise, the KPI between net80211 layer
and a driver became a mix of methods that pass a pointer to struct ifnet
as identifier and methods that pass pointer to struct ieee80211com. From
user point of view, the parent interface just hangs on in the ifconfig
list, and user can't do anything useful with it.

Now, the struct ifnet goes away. The struct ieee80211com is the only
KPI between a device driver and net80211. Details:

- The struct ieee80211com is embedded into drivers softc.
- Packets are sent via new ic_transmit method, which is very much like
  the previous if_transmit.
- Bringing parent up/down is done via new ic_parent method, which notifies
  driver about any changes: number of wlan(4) interfaces, number of them
  in promisc or allmulti state.
- Device specific ioctls (if any) are received on new ic_ioctl method.
- Packets/errors accounting are done by the stack. In certain cases, when
  driver experiences errors and can not attribute them to any specific
  interface, driver updates ic_oerrors or ic_ierrors counters.

Details on interface configuration with new world order:
- A sequence of commands needed to bring up wireless DOESN"T change.
- /etc/rc.conf parameters DON'T change.
- List of devices that can be used to create wlan(4) interfaces is
  now provided by net.wlan.devices sysctl.

Most drivers in this change were converted by me, except of wpi(4),
that was done by Andriy Voskoboinyk. Big thanks to Kevin Lo for testing
changes to at least 8 drivers. Thanks to Olivier Cochard, gjb@, mmoll@,
op@ and lev@, who also participated in testing. Details here:

https://wiki.freebsd.org/projects/ifnet/net80211

Still, drivers: ndis, wtap, mwl, ipw, bwn, wi, upgt, uath were not
tested. Changes to mwl, ipw, bwn, wi, upgt are trivial and chances
of problems are low. The wtap wasn't compilable even before this change.
But the ndis driver is complex, and it is likely to be broken with this
commit. Help with testing and debugging it is appreciated.

Differential Revision: D2655, D2740
Sponsored by: Nginx, Inc.
Sponsored by: Netflix

8 years agoManpage cleanup.
brueffer [Fri, 7 Aug 2015 10:48:52 +0000 (10:48 +0000)]
Manpage cleanup.

- new sentence -> new line
- fix manpage references
- fix macro usage
- fix a typo

MFC after: 1 week

8 years agoAttach dwmmc to the ofwbus, som devicetrees place it here.
andrew [Fri, 7 Aug 2015 08:57:58 +0000 (08:57 +0000)]
Attach dwmmc to the ofwbus, som devicetrees place it here.

Sponsored by: ABT Systems Ltd

8 years agoStop including machine/fdt.h, it's unneeded, and purposefully
andrew [Fri, 7 Aug 2015 08:54:50 +0000 (08:54 +0000)]
Stop including machine/fdt.h, it's unneeded, and purposefully
unimplemented on arm64.

Sponsored by: ABT Systems Ltd

8 years agoWrap some unused functions with notyet, it is necessary to be able to
araujo [Fri, 7 Aug 2015 08:30:43 +0000 (08:30 +0000)]
Wrap some unused functions with notyet, it is necessary to be able to
build the modules/ctl directly.
Remove a dead MALLOC_DEFINE.

Differential Revision: D3329
Reviewed by: mav
Sponsored by: gandi.net

8 years agoMinor style cleanup of the code surrounding r286404.
kib [Fri, 7 Aug 2015 08:24:12 +0000 (08:24 +0000)]
Minor style cleanup of the code surrounding r286404.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoThe condition to use direct processing for the unmapped bio is
kib [Fri, 7 Aug 2015 08:13:34 +0000 (08:13 +0000)]
The condition to use direct processing for the unmapped bio is
reverted.  We can do direct processing when g_io_check() does not need
to perform transient remapping of the bio, otherwise the thread has to
sleep.

Reviewed by: mav (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoRemove an extra new line on usage().
araujo [Fri, 7 Aug 2015 07:05:47 +0000 (07:05 +0000)]
Remove an extra new line on usage().
Rename domain to domainname to be identical to the man page.

Reported by: bde

8 years agoFix variable 'old' is used uninitialized whenever '&&' condition is false.
araujo [Fri, 7 Aug 2015 06:15:01 +0000 (06:15 +0000)]
Fix variable 'old' is used uninitialized whenever '&&' condition is false.
Spotted by clang.

Differential Revision: D2721
Reviewed by: rodrigc, bapt

8 years agoRemove unused i386 header privatespace.h. For the native kernel, its
kib [Fri, 7 Aug 2015 05:59:58 +0000 (05:59 +0000)]
Remove unused i386 header privatespace.h.  For the native kernel, its
use was removed in r173592 (Nov 2007), yet Xen PV bits continued
referencing the privatespace structure, and were removed in r282274
(Apr 2015).

Discussed with: jhb
Sponsored by: The FreeBSD Foundation

8 years agoReminder to check tools/build/mk/OptionalObsoleteFiles.inc on new
gshapiro [Fri, 7 Aug 2015 04:58:35 +0000 (04:58 +0000)]
Reminder to check tools/build/mk/OptionalObsoleteFiles.inc on new
version imports.

Obtained from: garga@

8 years agoRebase after r286395: rounding fix for dynamic VHD
marcel [Fri, 7 Aug 2015 04:35:43 +0000 (04:35 +0000)]
Rebase after r286395: rounding fix for dynamic VHD