]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoThe value small=2**-(p+3), where p is the precision, can be determine from
Steve Kargl [Thu, 9 Oct 2014 22:39:52 +0000 (22:39 +0000)]
The value small=2**-(p+3), where p is the precision, can be determine from
lgamma(x) = -log(x) - log(1+x) + x*(1-g) + x**2*P(x) with g = 0.57...
being the Euler constant and P(x) a polynomial.  Substitution of small
into the RHS shows that the last 3 terms are negligible in comparison to
the leading term.  The choice of 3 may be conservative.

The value large=2**(p+3) is detemined from Stirling's approximation
lgamma(x) = x*(log(x)-1) - log(x)/2 + log(2*pi)/2 + P(1/x)/x
Again, substitution of large into the RHS reveals the last 3 terms
are negligible in comparison to the leading term.

Move the x=+-0 special case into the |x|<small block.

In the ld80 and ld128 implementaion, use fdlibm compatible comparisons
involving ix, lx, and llx.  This replaces several floating point
comparisons (some involving fabsl()) and also fixes the special cases
x=1 and x=2.

While here
  . Remove unnecessary parentheses.
  . Fix/improve comments due to the above changes.
  . Fix nearby whitespace.

* src/e_lgamma_r.c:
  . Sort declaration.
  . Remove unneeded explicit cast for type conversion.
  . Replace a double literal constant by an integer literal constant.

* src/e_lgammaf_r.c:
  . Sort declaration.

* ld128/e_lgammal_r.c:
  . Replace a long double literal constant by a double literal constant.

* ld80/e_lgammal_r.c:
  . Remove unused '#include float.h'
  . Replace a long double literal constant by a double literal constant.

Requested by: bde

9 years agoAdd missing UDP multicast receive dtrace probes
Bryan Venteicher [Thu, 9 Oct 2014 22:36:21 +0000 (22:36 +0000)]
Add missing UDP multicast receive dtrace probes

Phabricator: https://reviews.freebsd.org/D924
Reviewed by: rpaulo markj
MFC after: 1 month

9 years agoFix problem on big endian systems introduced in r271579 - when we were
Pawel Jakub Dawidek [Thu, 9 Oct 2014 20:55:05 +0000 (20:55 +0000)]
Fix problem on big endian systems introduced in r271579 - when we were
returning from handling a nested nvlist we were resetting big-endian flag.

Reported by: Kuleshov Aleksey @ yandex.ru
Tested by: Kuleshov Aleksey @ yandex.ru

9 years agoAlways return pathname in dl_iterate_phdr's dlpi_name, as Linux does
Ed Maste [Thu, 9 Oct 2014 20:39:18 +0000 (20:39 +0000)]
Always return pathname in dl_iterate_phdr's dlpi_name, as Linux does

Linux LD_ITERATE_PHDR(3):
    The dlpi_name field is a null-terminated string giving the
    pathname from which the shared object was loaded.

That functionality is much more useful than returning just the short
name.

Approved by: kan
Sponsored by: The FreeBSD Foundation

9 years agoEnsure that the flags field of sctp_tmit_chunks is initialized.
Michael Tuexen [Thu, 9 Oct 2014 20:08:12 +0000 (20:08 +0000)]
Ensure that the flags field of sctp_tmit_chunks is initialized.
Thanks to Peter Bostroem from Google for reporting the issue.

MFC after: 3 days

9 years agoMerge projects/ipfw to HEAD.
Alexander V. Chernikov [Thu, 9 Oct 2014 19:32:35 +0000 (19:32 +0000)]
Merge projects/ipfw to HEAD.

Main user-visible changes are related to tables:

* Tables are now identified by names, not numbers.
 There can be up to 65k tables with up to 63-byte long names.
* Tables are now set-aware (default off), so you can switch/move
 them atomically with rules.
* More functionality is supported (swap, lock, limits, user-level lookup,
 batched add/del) by generic table code.
* New table types are added (flow) so you can match multiple packet fields at once.
* Ability to add different type of lookup algorithms for particular
 table type has been added.
* New table algorithms are added (cidr:hash, iface:array, number:array and
 flow:hash) to make certain types of lookup more effective.
* Table value are now capable of holding multiple data fields for
  different tablearg users

Performance changes:
* Main ipfw lock was converted to rmlock
* Rule counters were separated from rule itself and made per-cpu.
* Radix table entries fits into 128 bytes
* struct ip_fw is now more compact so more rules will fit into 64 bytes
* interface tables uses array of existing ifindexes for faster match

ABI changes:
All functionality supported by old ipfw(8) remains functional.
 Old & new binaries can work together with the following restrictions:
* Tables named other than ^\d+$ are shown as table(65535) in
 ruleset in old binaries

Internal changes:.
Changing table ids to numbers resulted in format modification for
 most sockopt codes. Old sopt format was compact, but very hard to
 extend (no versioning, inability to add more opcodes), so
* All relevant opcodes were converted to TLV-based versioned IP_FW3-based codes.
* The remaining opcodes were also converted to be able to eliminate
 all older opcodes at once
* All IP_FW3 handlers uses special API instead of calling sooptcopy*
 directly to ease adding another communication methods
* struct ip_fw is now different for kernel and userland
* tablearg value has been changed to 0 to ease future extensions
* table "values" are now indexes in special value array which
 holds extended data for given index
* Batched add/delete has been added to tables code
* Most changes has been done to permit batched rule addition.
* interface tracking API has been added (started on demand)
 to permit effective interface tables operations
* O(1) skipto cache, currently turned off by default at
 compile-time (eats 512K).

* Several steps has been made towards making libipfw:
  * most of new functions were separated into "parse/prepare/show
    and actuall-do-stuff" pieces (already merged).
  * there are separate functions for parsing text string into "struct ip_fw"
    and printing "struct ip_fw" to supplied buffer (already merged).
* Probably some more less significant/forgotten features

MFC after: 1 month
Sponsored by: Yandex LLC

9 years agoSupport Intel-specific MSRs that are accessed when booting up a linux in bhyve:
Neel Natu [Thu, 9 Oct 2014 19:13:33 +0000 (19:13 +0000)]
Support Intel-specific MSRs that are accessed when booting up a linux in bhyve:
- MSR_PLATFORM_INFO
- MSR_TURBO_RATIO_LIMITx
- MSR_RAPL_POWER_UNIT

Reviewed by: grehan
MFC after: 1 week

9 years agoiasl(8) expects integer fields in data tables to be specified as hexadecimal
Neel Natu [Thu, 9 Oct 2014 19:02:32 +0000 (19:02 +0000)]
iasl(8) expects integer fields in data tables to be specified as hexadecimal
values. Therefore the bit width of the "PM Timer Block" was actually being
interpreted as 50-bits instead of the expected 32-bit.

This eliminates an error message emitted by a Linux 3.17 guest during boot:
"Invalid length for FADT/PmTimerBlock: 50, using default 32"

Reviewed by: grehan
MFC after: 1 week

9 years agoRemove remnants of some cleanup; no functional changes.
Edward Tomasz Napierala [Thu, 9 Oct 2014 18:49:58 +0000 (18:49 +0000)]
Remove remnants of some cleanup; no functional changes.

Sponsored by: The FreeBSD Foundation

9 years agoMerge HEAD@r272834
Alexander V. Chernikov [Thu, 9 Oct 2014 18:03:12 +0000 (18:03 +0000)]
Merge HEAD@r272834

9 years agoDocument the CPU+Pri_Class column rather than CPU+PRI, as the latter isn't
Mark Johnston [Thu, 9 Oct 2014 17:45:58 +0000 (17:45 +0000)]
Document the CPU+Pri_Class column rather than CPU+PRI, as the latter isn't
used or implemented on FreeBSD.

Reported by: kmacy
Reviewed by: kmacy, rpaulo
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoTwo more places where login_setcryptfmt() defaults to MD5 were missed
Dag-Erling Smørgrav [Thu, 9 Oct 2014 17:39:11 +0000 (17:39 +0000)]
Two more places where login_setcryptfmt() defaults to MD5 were missed
in r252688.

MFC after: 3 days

9 years agoBackout r272825 every useland usage of ufs/ufs/dir.h are now broken with that change
Baptiste Daroussin [Thu, 9 Oct 2014 17:26:29 +0000 (17:26 +0000)]
Backout r272825 every useland usage of ufs/ufs/dir.h are now broken with that change

9 years agoShuffle things.
Adrian Chadd [Thu, 9 Oct 2014 16:48:42 +0000 (16:48 +0000)]
Shuffle things.

Suggested by: jhb

Differential Revision: D906
Sponsored by: Norse Corp

9 years agoChange the hardcoded default back from SHA512 to DES.
Dag-Erling Smørgrav [Thu, 9 Oct 2014 16:45:11 +0000 (16:45 +0000)]
Change the hardcoded default back from SHA512 to DES.

PR: 192277
MFC after: 3 days

9 years agoWhen building with a newer GCC, suppress some warnings for the
Warner Losh [Thu, 9 Oct 2014 16:39:10 +0000 (16:39 +0000)]
When building with a newer GCC, suppress some warnings for the
moment. The kernel isn't ready for them without a lot of work.

9 years agoBump ipfw module version.
Alexander V. Chernikov [Thu, 9 Oct 2014 16:12:01 +0000 (16:12 +0000)]
Bump ipfw module version.

9 years agoAdd size(1) to the cross build toolchain
Baptiste Daroussin [Thu, 9 Oct 2014 15:52:01 +0000 (15:52 +0000)]
Add size(1) to the cross build toolchain

9 years agoSync to HEAD@r272825.
Alexander V. Chernikov [Thu, 9 Oct 2014 15:35:28 +0000 (15:35 +0000)]
Sync to HEAD@r272825.

9 years agoUse offsetof() from sys/types.h instead of a custom one
Baptiste Daroussin [Thu, 9 Oct 2014 15:26:22 +0000 (15:26 +0000)]
Use offsetof() from sys/types.h instead of a custom one
This fixes build with recent gcc versions

9 years agoRegenerate after r272823:
Marcel Moolenaar [Thu, 9 Oct 2014 15:19:35 +0000 (15:19 +0000)]
Regenerate after r272823:
Move the SCTP syscalls to netinet with the rest of the SCTP code.

Submitted by: Steve Kiernan <stevek@juniper.net>
Reviewed by: tuexen, rrs
Obtained from: Juniper Networks, Inc.

9 years agoMove the SCTP syscalls to netinet with the rest of the SCTP code. The
Marcel Moolenaar [Thu, 9 Oct 2014 15:16:52 +0000 (15:16 +0000)]
Move the SCTP syscalls to netinet with the rest of the SCTP code.  The
syscalls themselves are tightly coupled with the network stack and
therefore should not be in the generic socket code.

The following four syscalls have been marked as NOSTD so they can be
dynamically registered in sctp_syscalls_init() function:
  sys_sctp_peeloff
  sys_sctp_generic_sendmsg
  sys_sctp_generic_sendmsg_iov
  sys_sctp_generic_recvmsg

The syscalls are also set up to be dynamically registered when COMPAT32
option is configured.

As a side effect of moving the SCTP syscalls, getsock_cap needs to be
made available outside of the uipc_syscalls.c source file.  A proper
prototype has been added to the sys/socketvar.h header file.

API tests from the SCTP reference implementation have been run to ensure
compatibility. (http://code.google.com/p/sctp-refimpl/source/checkout)

Submitted by: Steve Kiernan <stevek@juniper.net>
Reviewed by: tuexen, rrs
Obtained from: Juniper Networks, Inc.

9 years agoAdd sysctl knob to disable port power on a specific USB HUB. You need
Hans Petter Selasky [Thu, 9 Oct 2014 14:43:43 +0000 (14:43 +0000)]
Add sysctl knob to disable port power on a specific USB HUB. You need
to reset the USB HUB using "usbconfig -d X.Y reset" or boot having the
setting in /boot/loader.conf before it activates.

9 years agoFix core on table destroy inroduced by table values code.
Alexander V. Chernikov [Thu, 9 Oct 2014 14:33:20 +0000 (14:33 +0000)]
Fix core on table destroy inroduced by table values code.
Rename @ti array copy to 'ti_copy'.

9 years agoAdd example devd configuration file for USB printers.
Hans Petter Selasky [Thu, 9 Oct 2014 13:58:19 +0000 (13:58 +0000)]
Add example devd configuration file for USB printers.

9 years ago* Fix use-after-free in table printing code.
Alexander V. Chernikov [Thu, 9 Oct 2014 12:54:56 +0000 (12:54 +0000)]
* Fix use-after-free in table printing code.
* Fix showing human-readable error in table cmds code.

9 years ago* Wire large user buffer before processing GET request.
Alexander V. Chernikov [Thu, 9 Oct 2014 12:37:53 +0000 (12:37 +0000)]
* Wire large user buffer before processing GET request.
* Fix incorrect size calculation for IP_FW_XGET request.

9 years agoOnly catch the line from the compiler output where 'version' is a word
Baptiste Daroussin [Thu, 9 Oct 2014 12:35:17 +0000 (12:35 +0000)]
Only catch the line from the compiler output  where 'version' is a word
This allows to build the kernel with gcc 4.9.1 from ports

9 years agoFix typo
Baptiste Daroussin [Thu, 9 Oct 2014 12:20:00 +0000 (12:20 +0000)]
Fix typo

9 years agoAdd OBJCOPY to the list of external tools
Baptiste Daroussin [Thu, 9 Oct 2014 10:47:14 +0000 (10:47 +0000)]
Add OBJCOPY to the list of external tools

9 years agoFix build when XCC is defined and X_COMPILER_TYPE is not
Baptiste Daroussin [Thu, 9 Oct 2014 09:46:44 +0000 (09:46 +0000)]
Fix build when XCC is defined and X_COMPILER_TYPE is not

9 years agoMake iSCSI connection close somewhat less aggressive.
Alexander Motin [Thu, 9 Oct 2014 09:12:08 +0000 (09:12 +0000)]
Make iSCSI connection close somewhat less aggressive.

It allows to push out some final data from the send queue to the socket
before its close.  In particular, it increases chances for logout response
to be delivered to the initiator.

9 years agoAdd CROSS_TOOLCHAIN macro select pre seeded external toolchain configuration files
Baptiste Daroussin [Thu, 9 Oct 2014 09:04:01 +0000 (09:04 +0000)]
Add CROSS_TOOLCHAIN macro select pre seeded external toolchain configuration files
The goal is to provide pre seeded toolchain configurations withing the ports tree
to allow the use of an external toolchain in a simple way:

make CROSS_TOOLCHAIN=powerpc64-gcc TARGET=powerpc TARGET_ARCH=powerpc64 buildworld

This will look for the external toolchain definition in /usr/local/share/mk/powerpc64-gcc.mk
While here add the notion of X_COMPILER_TYPE to the external toolchain framework to allow
to deal with differences between gcc and clang in regards of cross building

9 years agoMFV r272804:
Xin LI [Thu, 9 Oct 2014 07:52:51 +0000 (07:52 +0000)]
MFV r272804:

Refactor the code and stop restore_object from creating two transactions.

Illumos issue:
    3693 restore_object uses at least two transactions to restore an object

MFC after: 2 weeks

9 years agoMFV r272803:
Xin LI [Thu, 9 Oct 2014 07:18:40 +0000 (07:18 +0000)]
MFV r272803:

Illumos issue:
    5175 implement dmu_read_uio_dbuf() to improve cached read performance

MFC after: 2 weeks

9 years agoFix build with rpcgen using a recent (tested with gcc 4.9.1) GNU cpp
Baptiste Daroussin [Thu, 9 Oct 2014 06:58:33 +0000 (06:58 +0000)]
Fix build with rpcgen using a recent (tested with gcc 4.9.1) GNU cpp

9 years agoRefine support for disabling USB enumeration to allow device detach
Hans Petter Selasky [Thu, 9 Oct 2014 06:24:06 +0000 (06:24 +0000)]
Refine support for disabling USB enumeration to allow device detach
and suspend and resume of existing devices.

MFC after: 2 weeks

9 years agoMFV r272802:
Xin LI [Thu, 9 Oct 2014 06:02:53 +0000 (06:02 +0000)]
MFV r272802:

 - Limit ARC for zdb at 256MB.  zdb do not typically revisit data
   in the ARC.
 - Increase default max_inflight from 200 to 1000 (can be overriden
   by -I) so we can queue more I/Os when doing scrubbing.
 - Print status while loading meataslabs for leak detection.

Illumos issues:

    5169 zdb should limit its ARC size
    5170 zdb -c should create more scrub i/os by default
    5171 zdb should print status while loading metaslabs for leak detection

MFC after: 2 weeks

9 years agoUse proper variable when looping through periphs with CAM_PERIPH_FREE.
Alexander Motin [Thu, 9 Oct 2014 05:53:58 +0000 (05:53 +0000)]
Use proper variable when looping through periphs with CAM_PERIPH_FREE.

PR: 194256
Submitted by: Scott M. Ferris <smferris@gmail.com>
MFC after: 3 days
Sponsored by: EMC/Isilon Storage Division

9 years ago3693 restore_object uses at least two transactions to restore an object
Xin LI [Thu, 9 Oct 2014 05:53:04 +0000 (05:53 +0000)]
3693 restore_object uses at least two transactions to restore an object
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Andriy Gapon <andriy.gapon@hybridcluster.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@e77d42eaa49fe55bfae1e0e0065c6e99affc001b

9 years ago5175 implement dmu_read_uio_dbuf() to improve cached read performance
Xin LI [Thu, 9 Oct 2014 05:50:23 +0000 (05:50 +0000)]
5175 implement dmu_read_uio_dbuf() to improve cached read performance
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Alex Reece <alex.reece@delphix.com>
Reviewed by: George Wilson <george@delphix.com>
Reviewed by: Richard Elling <richard.elling@gmail.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@f8554bb92be6be88a684bea58293b41a6168a538

9 years ago5169 zdb should limit its ARC size
Xin LI [Thu, 9 Oct 2014 05:48:06 +0000 (05:48 +0000)]
5169 zdb should limit its ARC size
5170 zdb -c should create more scrub i/os by default
5171 zdb should print status while loading metaslabs for leak detection

Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <paul.dagnelie@delphix.com>
Reviewed by: Bayard Bell <Bayard.Bell@nexenta.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@06be98028b8a84e7f327188613dd09a708294d1a

9 years agoMove the calls to u_tun_func() into udp6_append()
Bryan Venteicher [Thu, 9 Oct 2014 05:42:07 +0000 (05:42 +0000)]
Move the calls to u_tun_func() into udp6_append()

A similar cleanup for UDPv4 was performed in r220620.

Phabricator: https://reviews.freebsd.org/D383
Reviewed by: gnn
MFC after: 1 month

9 years agoMissing from previous commit - keep the VM domain -> PXM mapping
Adrian Chadd [Thu, 9 Oct 2014 05:34:28 +0000 (05:34 +0000)]
Missing from previous commit - keep the VM domain -> PXM mapping
array and use it to map PXM -> VM domain when needed.

Differential Revision: D906
Reviewed by: jhb

9 years agoAdd a bus method to fetch the VM domain for the given device/bus.
Adrian Chadd [Thu, 9 Oct 2014 05:33:25 +0000 (05:33 +0000)]
Add a bus method to fetch the VM domain for the given device/bus.

* Add a bus_if.m method - get_domain() - returning the VM domain or
  ENOENT if the device isn't in a VM domain;
* Add bus methods to print out the domain of the device if appropriate;
* Add code in srat.c to save the PXM -> VM domain mapping that's done and
  expose a function to translate VM domain -> PXM;
* Add ACPI and ACPI PCI methods to check if the bus has a _PXM attribute
  and if so map it to the VM domain;
* (.. yes, this works recursively.)
* Have the pci bus glue print out the device VM domain if present.

Note: this is just the plumbing to start enumerating information -
it doesn't at all modify behaviour.

Differential Revision: D906
Reviewed by: jhb
Sponsored by: Norse Corp

9 years agoCheck for mbuf copy failure when there are multiple multicast sockets
Bryan Venteicher [Thu, 9 Oct 2014 05:17:47 +0000 (05:17 +0000)]
Check for mbuf copy failure when there are multiple multicast sockets

This partitular case is the only path where the mbuf could be NULL.
udp_append() checked for a NULL mbuf only after invoking the tunneling
callback. Our only in tree tunneling callback - SCTP - assumed a non
NULL mbuf, and it is a bit odd to make the callbacks responsible for
checking this condition.

This also reduces the differences between the IPv4 and IPv6 code.

MFC after: 1 month

9 years agoAdd M_FLOWID to M_COPYFLAGS
Bryan Venteicher [Thu, 9 Oct 2014 04:40:19 +0000 (04:40 +0000)]
Add M_FLOWID to M_COPYFLAGS

The M_FLOWID flag should be propagated to the new mbuf pkthdr in
m_move_pkthdr() and m_dup_pkthdr(). The new mbuf already got the
existing flowid value, but would be ignored since the flag was
not set.

Phabricator: https://reviews.freebsd.org/D914
Reviewed by: adrian
Obtained from: NetApp
MFC after: 1 week

9 years agoFix draining in ttydev_leave():
Marcel Moolenaar [Thu, 9 Oct 2014 02:30:38 +0000 (02:30 +0000)]
Fix draining in ttydev_leave():
1.  ERESTART is not only returned when the revoke count changed. It
    is also returned when a signal is received. While a change in
    the revoke count should be ignored, a signal should not.
2.  Waiting until the output queue is entirely drained can cause a
    hang when the underlying device is stuck or broken.

Have tty_drain() take care of this by telling it when we're leaving.
When leaving, tty_drain() will use a timed wait to address point 2
above and it will check the revoke count to handle point 1 above.
The timeout is set to 1 second, which is arbitrary and long enough
to expect a change in the output queue.

Discussed with: jilles@
Reported by: Yamagi Burmeister <lists@yamagi.org>

9 years agoIntegrate usr.bin/gzip/tests from NetBSD into atf/kyua
Enji Cooper [Thu, 9 Oct 2014 02:24:34 +0000 (02:24 +0000)]
Integrate usr.bin/gzip/tests from NetBSD into atf/kyua

Sponsored by: EMC / Isilon Storage Division

9 years agoIntegrate usr.bin/diff/tests from NetBSD into atf/kyua at gnu/usr.bin/diff/tests
Enji Cooper [Thu, 9 Oct 2014 02:07:34 +0000 (02:07 +0000)]
Integrate usr.bin/diff/tests from NetBSD into atf/kyua at gnu/usr.bin/diff/tests

Sponsored by: EMC / Isilon Storage Division

9 years agoApply r269126 to tty_timedwait():
Marcel Moolenaar [Thu, 9 Oct 2014 01:59:25 +0000 (01:59 +0000)]
Apply r269126 to tty_timedwait():
Don't return ERESTART when the device is gone.

9 years agoProperly NUL-terminate the on-stack buffer for reading /boot.config
Marcel Moolenaar [Thu, 9 Oct 2014 01:54:32 +0000 (01:54 +0000)]
Properly NUL-terminate the on-stack buffer for reading /boot.config
or /boot/config. In qemu, on a warm boot, the stack is not all zeroes
and we parse beyond the file's contents.

Obtained from: Juniper Networks, Inc.

9 years agoIntegrate usr.bin/grep/tests from NetBSD into atf/kyua
Enji Cooper [Thu, 9 Oct 2014 01:53:23 +0000 (01:53 +0000)]
Integrate usr.bin/grep/tests from NetBSD into atf/kyua

Sponsored by: EMC / Isilon Storage Division

9 years agoIntegrate usr.bin/cut/tests from NetBSD into atf/kyua
Enji Cooper [Thu, 9 Oct 2014 01:46:31 +0000 (01:46 +0000)]
Integrate usr.bin/cut/tests from NetBSD into atf/kyua

Sponsored by: EMC / Isilon Storage Division

9 years agoIntegrate bin/sleep/tests from NetBSD into atf/kyua
Enji Cooper [Thu, 9 Oct 2014 01:39:07 +0000 (01:39 +0000)]
Integrate bin/sleep/tests from NetBSD into atf/kyua

Sponsored by: EMC / Isilon Storage Division

9 years agoIntegrate usr.bin/dirname/tests from NetBSD into atf/kyua
Enji Cooper [Thu, 9 Oct 2014 00:55:04 +0000 (00:55 +0000)]
Integrate usr.bin/dirname/tests from NetBSD into atf/kyua

In collaboration with: pho, sjg
Sponsored by: EMC / Isilon Storage Division

9 years agoIntegrate usr.bin/cmp/tests from NetBSD into atf/kyua
Enji Cooper [Thu, 9 Oct 2014 00:50:33 +0000 (00:50 +0000)]
Integrate usr.bin/cmp/tests from NetBSD into atf/kyua

In collaboration with: sjg
Sponsored by: EMC / Isilon Storage Division

9 years agoIntegrate usr.sbin/basename/tests from NetBSD into atf/kyua
Enji Cooper [Thu, 9 Oct 2014 00:41:42 +0000 (00:41 +0000)]
Integrate usr.sbin/basename/tests from NetBSD into atf/kyua

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division

9 years agoSet the autoindent to 4 spaces with vim in BSD.tests.dist
Enji Cooper [Thu, 9 Oct 2014 00:37:58 +0000 (00:37 +0000)]
Set the autoindent to 4 spaces with vim in BSD.tests.dist

This will prevent vim users from accidentally checking in buggy mtree files
(mixed tabs/spaces).

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

9 years agoIntegrate usr.sbin/nmtree/tests from NetBSD into atf/kyua
Enji Cooper [Thu, 9 Oct 2014 00:32:33 +0000 (00:32 +0000)]
Integrate usr.sbin/nmtree/tests from NetBSD into atf/kyua

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division

9 years agoForgot to bump Dd.
John Baldwin [Wed, 8 Oct 2014 21:56:00 +0000 (21:56 +0000)]
Forgot to bump Dd.

Pointy hat to: jhb

9 years agoRewrite timeout(9) to be callout(9)-centric instead. Move the description
John Baldwin [Wed, 8 Oct 2014 21:53:24 +0000 (21:53 +0000)]
Rewrite timeout(9) to be callout(9)-centric instead.  Move the description
of timeout(9) to the end and mark it prominently as deprecated.  Document
somewhat how times are specified for the 'sbt' variants.  Better explain
how using callout_init_*() to associate a lock with a callout resolves
common races.

Differential Revision: https://reviews.freebsd.org/D847
Reviewed by: wblock, bjk
MFC after: 1 week

9 years agoWhen tunneling interface is going to insert mbuf into netisr queue after stripping
Andrey V. Elsukov [Wed, 8 Oct 2014 21:23:34 +0000 (21:23 +0000)]
When tunneling interface is going to insert mbuf into netisr queue after stripping
outer header, consider it as new packet and clear the protocols flags.

This fixes problems when IPSEC traffic goes through various tunnels and router
doesn't send ICMP/ICMPv6 errors.

PR: 174602
Obtained from: Yandex LLC
MFC after: 2 weeks
Sponsored by: Yandex LLC

9 years agoImport byacc 20141006
Baptiste Daroussin [Wed, 8 Oct 2014 20:46:38 +0000 (20:46 +0000)]
Import byacc 20141006

9 years agoImport byacc 20140906
Baptiste Daroussin [Wed, 8 Oct 2014 20:41:56 +0000 (20:41 +0000)]
Import byacc 20140906

9 years agoPass up the error status of minidumpsys() to its callers.
Mark Johnston [Wed, 8 Oct 2014 20:25:21 +0000 (20:25 +0000)]
Pass up the error status of minidumpsys() to its callers.

PR: 193761
Submitted by: Conrad Meyer <conrad.meyer@isilon.com>
Sponsored by: EMC / Isilon Storage Division

9 years agoRemove one second wait for threads exit from icl_conn_close().
Alexander Motin [Wed, 8 Oct 2014 19:54:42 +0000 (19:54 +0000)]
Remove one second wait for threads exit from icl_conn_close().

Switch it from polling with pause() to using cv_wait()/cv_signal().

9 years agoIt looks like an entry for the R215 is not required in cdce(4) after all.
Gavin Atkinson [Wed, 8 Oct 2014 19:49:10 +0000 (19:49 +0000)]
It looks like an entry for the R215 is not required in cdce(4) after all.

9 years agoIf we fail to send a signal after rotation, print the pidfile from which
Mark Johnston [Wed, 8 Oct 2014 17:44:30 +0000 (17:44 +0000)]
If we fail to send a signal after rotation, print the pidfile from which
the corresponding PID was obtained.

PR: 194143
Submitted by: Lyndon Nerenberg <lyndon@orthanc.ca>
MFC after: 1 week

9 years agoCorrect scale factor for T terabyte suffix
Ed Maste [Wed, 8 Oct 2014 17:40:58 +0000 (17:40 +0000)]
Correct scale factor for T terabyte suffix

PR: 194250
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoAdd an argument to the x86 pmap_invalidate_cache_range() to request
Konstantin Belousov [Wed, 8 Oct 2014 16:48:03 +0000 (16:48 +0000)]
Add an argument to the x86 pmap_invalidate_cache_range() to request
forced invalidation of the cache range regardless of the presence of
self-snoop feature.  Some recent Intel GPUs in some modes are not
coherent, and dirty lines in CPU cache must be flushed before the
pages are transferred to GPU domain.

Reviewed by: alc (previous version)
Tested by: pho (amd64)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoAdd schedgraph traces for callout handlers. Specifically, a callwheel logs
John Baldwin [Wed, 8 Oct 2014 16:22:59 +0000 (16:22 +0000)]
Add schedgraph traces for callout handlers.  Specifically, a callwheel logs
a running event each time it executes a callout function.  The event
includes the function pointer, argument, and whether or not it was run from
hardware interrupt context.  The callwheel is marked idle when each handler
completes.  This effectively logs the duration of each callout routine in
the graph.

9 years agoProperly report 12Gbps connection rate.
Alexander Motin [Wed, 8 Oct 2014 16:22:26 +0000 (16:22 +0000)]
Properly report 12Gbps connection rate.

Reviewed by: kadesai, slm
MFC after: 1 week

9 years agoEnsure that the list of streams sent in a stream reset parameter fits
Michael Tuexen [Wed, 8 Oct 2014 15:30:59 +0000 (15:30 +0000)]
Ensure that the list of streams sent in a stream reset parameter fits
in an mbuf-cluster.
Thanks to Peter Bostroem for drawing my attention to this part of the code.

9 years agoEnsure that the number of stream reported in srs_number_streams is
Michael Tuexen [Wed, 8 Oct 2014 15:29:49 +0000 (15:29 +0000)]
Ensure that the number of stream reported in srs_number_streams is
consistent with the amount of data provided in the SCTP_RESET_STREAMS
socket option.
Thanks to Peter Bostroem from Google for drawing my attention to
this part of the code.

9 years agoFix comment.
Andrey V. Elsukov [Wed, 8 Oct 2014 12:33:31 +0000 (12:33 +0000)]
Fix comment.

MFC after: 1 week

9 years agoImplement software (mode page) and hardware (config) write protection.
Alexander Motin [Wed, 8 Oct 2014 12:24:24 +0000 (12:24 +0000)]
Implement software (mode page) and hardware (config) write protection.

9 years agoRevert r156046. We support setting dumpdev via loader tunable again.
Andrey V. Elsukov [Wed, 8 Oct 2014 12:19:48 +0000 (12:19 +0000)]
Revert r156046. We support setting dumpdev via loader tunable again.
Also change default disk name to ada.

MFC after: 3 weeks

9 years agoAdd an ability to set dumpdev via loader(8) tunable.
Andrey V. Elsukov [Wed, 8 Oct 2014 12:18:16 +0000 (12:18 +0000)]
Add an ability to set dumpdev via loader(8) tunable.

MFC after: 3 weeks

9 years agoAdd IP_FW_DUMP_SOPTCODES sopt to be able to determine
Alexander V. Chernikov [Wed, 8 Oct 2014 11:12:14 +0000 (11:12 +0000)]
Add IP_FW_DUMP_SOPTCODES sopt to be able to determine
which opcodes are currently available in kernel.

9 years agoNo logical code change in this pathc.
Kashyap D Desai [Wed, 8 Oct 2014 10:14:37 +0000 (10:14 +0000)]
No logical code change in this pathc.
Only Style 9 changes for mrsas driver.

Reviewed by: ambrisko
MFC after: 2 weeks
Sponsored by: AVAGO Technologies

9 years agoSimplify; no functional changes.
Edward Tomasz Napierala [Wed, 8 Oct 2014 09:44:02 +0000 (09:44 +0000)]
Simplify; no functional changes.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoDriver version upgrade.
Kashyap D Desai [Wed, 8 Oct 2014 09:39:18 +0000 (09:39 +0000)]
Driver version upgrade.
Bring head mrsas same as internal Phase 6.5.

Reviewed by: ambrisko
MFC after: 2 weeks
Sponsored by: AVAGO Technologies

9 years agoIn the passthru IOCTL path, the mfi command pool was freely accessible N times
Kashyap D Desai [Wed, 8 Oct 2014 09:37:47 +0000 (09:37 +0000)]
In the passthru IOCTL path, the mfi command pool was freely accessible N times
where as there are limited number(32) of mfi commands in the pool.
The mfi command pool is now restricted to 27 simultaneous accesses by using
a counting semaphore while calling the passthru function.

In the mrsas_cam.c source file there was a same function name mrsas_poll(),
which was same as the mrsas_poll() implemented in the mrsas.c file for the
polling interface.
To clearly distinguish the functionality by usage we have renamed the former
as mrsas_cam_poll().

In the passthru function let's say it has got an mfi command from the pool
but it has failed in one of the DMA function call which will lead to leak
an mfi command because in the ERROR case it directly returns and not freeing up
the occupied mfi command.

Reviewed by: ambrisko
MFC after: 2 weeks
Sponsored by: AVAGO Technologies

9 years agod_poll() callback function is the entry point for poll system call for the application.
Kashyap D Desai [Wed, 8 Oct 2014 09:35:52 +0000 (09:35 +0000)]
d_poll() callback function is the entry point for poll system call for the application.
It is meant to notify the applications which will be waiting for some
controller events to be occured.

Reviewed by: ambrisko
MFC after: 2 weeks
Sponsored by: AVAGO Technologies

9 years agoExtended MSI-x vectors support for Invader and Fury(12Gb/s HBA).
Kashyap D Desai [Wed, 8 Oct 2014 09:34:25 +0000 (09:34 +0000)]
Extended MSI-x vectors support for Invader and Fury(12Gb/s HBA).

This Driver will create multiple MSI-x vector depending upon what FW expose.
As of now 12 Gbp/s MR controller (Invader and Fury) expose 96 msix vector.
As of now 6 Gbp/s MR controller (Thunderbolt) expose 16 msix vector.

Reviewed by: ambrisko
MFC after: 2 weeks
Sponsored by: AVAGO Technologies

9 years agoFix the minor svn add issue. $FreeBSD$ expands at the time of
Kashyap D Desai [Wed, 8 Oct 2014 09:30:35 +0000 (09:30 +0000)]
Fix the minor svn add issue. $FreeBSD$ expands at the time of
snv add, so I have added $FreeBSD$ as comment.

This commit is contininous of last mrsas commit, so that compilation
does not break.

Obtained from: AVAGO Technologies
MFC after: 2 weeks

9 years agoThis is a feature provided to run 32-bit linux binaries on FreeBSD 64bit
Kashyap D Desai [Wed, 8 Oct 2014 09:19:35 +0000 (09:19 +0000)]
This is a feature provided to run 32-bit linux binaries on FreeBSD 64bit
machine, for which 32bit compatibilty code has been added.
As in linux there is only one device entry that is used to fire IOCTL commands,
a new device entry megaraid_sas_ioctl_node is added for solely this
purpose.

From one dev node i.e mrgaraid_sa_ioctl_node we have to find out the
controller instance in case of multicontroller, for which one management info
structure has been added.

Reviewed by: ambrisko
MFC after: 2 weeks
Sponsored by: AVAGO Technologies

9 years agoAlways wait 'command done' interrupt status bit before proceeding next command.
Ruslan Bukin [Wed, 8 Oct 2014 08:51:05 +0000 (08:51 +0000)]
Always wait 'command done' interrupt status bit before proceeding next command.

Sponsored by: DARPA, AFRL

9 years agoCurrent MegaRAID firmware and hence the driver only supported 64VDs.
Kashyap D Desai [Wed, 8 Oct 2014 08:48:18 +0000 (08:48 +0000)]
Current MegaRAID firmware and hence the driver only supported 64VDs.
E.g: If the user wants to create more than 64VD on a controller,
    it is not possible on current firmware/driver.

New feature and requirement to support upto 256VD, firmware/driver/apps need changes.
In addition to that, there must be a backward compatibility of the new driver with the
older firmware and vice versa.

RAID map is the interface between Driver and FW to fetch all required
fields(attributes) for each Virtual Drives.
In the earlier design driver was using the FW copy of RAID map where as
in the new design the Driver will keep the RAID map copy of its own; on which
it will operate for any raid map access in fast path.

Local driver raid map copy will provide ease of access through out the code
and provide generic interface for future FW raid map changes.

For the backward compatibility driver will notify FW that it supports 256VD
to the FW in driver capability field.
Based on the controller properly returned by the FW, the Driver will know
whether it supports 256VD or not and will copy the RAID map accordingly.

At any given time, driver will always have old or new Raid map.

Reviewed by : ambrisko
MFC after : 2 weeks
Sponsored by: AVAGO Technologies

9 years agoAdd support for WRITE ATOMIC (16) command and report SBC-4 compliance.
Alexander Motin [Wed, 8 Oct 2014 07:48:36 +0000 (07:48 +0000)]
Add support for WRITE ATOMIC (16) command and report SBC-4 compliance.

Atomic writes are only supported for ZVOLs in "dev" mode.  In other cases
atomicity can not be guarantied and so the command is blocked.

9 years agoAdd support for disabling USB enumeration in general or on selected
Hans Petter Selasky [Wed, 8 Oct 2014 07:00:50 +0000 (07:00 +0000)]
Add support for disabling USB enumeration in general or on selected
USB HUBs.

MFC after: 2 weeks

9 years agoOops, fix typo made in r272729.
Pyun YongHyeon [Wed, 8 Oct 2014 05:53:04 +0000 (05:53 +0000)]
Oops, fix typo made in r272729.

9 years agoDocument newly added controller AR816x/AR817x.
Pyun YongHyeon [Wed, 8 Oct 2014 05:49:10 +0000 (05:49 +0000)]
Document newly added controller AR816x/AR817x.

9 years agoAdd support for QAC AR816x/AR817x Gigabit/Fast Ethernet controllers.
Pyun YongHyeon [Wed, 8 Oct 2014 05:47:01 +0000 (05:47 +0000)]
Add support for QAC AR816x/AR817x Gigabit/Fast Ethernet controllers.
These controllers seem to have the same feature of AR813x/AR815x and
improved RSS support(4 TX queues and 8 RX queues).  alc(4) supports
all hardware features except RSS.  I didn't implement RX checksum
offloading for AR816x/AR817x just because I couldn't get
confirmation from the Vendor whether AR816x/AR817x corrected its
predecessor's RX checksum offloading bug on fragmented packets.
This change adds supports for the following controllers.
 o AR8161 PCIe Gigabit Ethernet controller
 o AR8162 PCIe Fast Ethernet controller
 o AR8171 PCIe Gigabit Ethernet controller
 o AR8172 PCIe Fast Ethernet controller
 o Killer E2200 Gigabit Ethernet controller

Tested by: Many
Relnotes: yes
MFC after: 2 weeks
HW donated by: Qualcomm Atheros Communications, Inc.

9 years agoAdd new quirk PCI_QUIRK_MSI_INTX_BUG to pci(4).
Pyun YongHyeon [Wed, 8 Oct 2014 05:34:39 +0000 (05:34 +0000)]
Add new quirk PCI_QUIRK_MSI_INTX_BUG to pci(4).
QAC AR816x/E2200 controller has a silicon bug that MSI interrupt
does not assert if PCIM_CMD_INTxDIS bit of command register is set.

Reviewed by: jhb

9 years agodon't reinvent the wheel: rely on basename(3)
Eitan Adler [Wed, 8 Oct 2014 05:04:31 +0000 (05:04 +0000)]
don't reinvent the wheel: rely on basename(3)

Reviewed by: nwhitehorn

9 years agoFix a long standing bug in MAC statistics register access. One
Pyun YongHyeon [Wed, 8 Oct 2014 01:03:32 +0000 (01:03 +0000)]
Fix a long standing bug in MAC statistics register access.  One
additional register was erroneously added in the MAC register set
such that 7 TX statistics counters were wrong.

9 years agoImplement PLPMTUD blackhole detection (RFC 4821), inspired by code
Sean Bruno [Tue, 7 Oct 2014 21:50:28 +0000 (21:50 +0000)]
Implement PLPMTUD blackhole detection (RFC 4821), inspired by code
from xnu sources.  If we encounter a network where ICMP is blocked
the Needs Frag indicator may not propagate back to us.  Attempt to
downshift the mss once to a preconfigured value.

Default this feature to off for now while we do not have a full PLPMTUD
implementation in our stack.

Adds the following new sysctl's for control:
net.inet.tcp.pmtud_blackhole_detection -- turns on/off this feature
net.inet.tcp.pmtud_blackhole_mss       -- mss to try for ipv4
net.inet.tcp.v6pmtud_blackhole_mss     -- mss to try for ipv6

Adds the following new sysctl's for monitoring:
-- Number of times the code was activated to attempt a mss downshift
net.inet.tcp.pmtud_blackhole_activated
-- Number of times the blackhole mss was used in an attempt to downshift
net.inet.tcp.pmtud_blackhole_min_activated
-- Number of times that we failed to connect after we downshifted the mss
net.inet.tcp.pmtud_blackhole_failed

Phabricator: https://reviews.freebsd.org/D506
Reviewed by: rpaulo bz
MFC after: 2 weeks
Relnotes: yes
Sponsored by: Limelight Networks

9 years agocxgbe/tom: don't leak resources tied to an active open request that
Navdeep Parhar [Tue, 7 Oct 2014 21:26:22 +0000 (21:26 +0000)]
cxgbe/tom: don't leak resources tied to an active open request that
cannot be sent to the chip because a prerequisite L2 resolution
failed.

Submitted by: Hariprasad at chelsio dot com (original version)
MFC after: 2 weeks.