]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoAdd an option, -p, which makes gstat(8) to only display physical providers
delphij [Thu, 3 Jul 2014 21:48:19 +0000 (21:48 +0000)]
Add an option, -p, which makes gstat(8) to only display physical providers
(those with rank of 1).

MFC after: 2 weeks

9 years agoAdd VHD support to mkimg(1). VHD is used by Xen and Microsoft's Hyper-V
marcel [Thu, 3 Jul 2014 20:31:43 +0000 (20:31 +0000)]
Add VHD support to mkimg(1). VHD is used by Xen and Microsoft's Hyper-V
among others.

Add an undocumented option for unit testing (-y). When given, the image
will have UUIDs and timestamps synthesized in a way that gives identical
results across runs. As such, UUIDs stop being unique, globally or
otherwise.

VHD support requested by: gjb@

9 years agoProperly advertise that if_arge can handle long frames (if_arge is set to
loos [Thu, 3 Jul 2014 20:16:48 +0000 (20:16 +0000)]
Properly advertise that if_arge can handle long frames (if_arge is set to
handle packets up to 1536 bytes)

This fixes the need to frag that could happen when using vlans on top of
if_arge (which is a common case for the use the switch ports as individual
NICs).

Previously to this commit any vlan setup with if_arge as parent would have
the MTU of the parent interface reduced by the size of dot1q header
(4 bytes).

Tested on TP-Link 1043ND (where the WAN port is just a switch port setup to
tag packets in a different VLAN than the LAN ports).

Reported and tested by: Harm Weites (harm at weites.com)

9 years agoInitialize the switch vlan table at attachment.
loos [Thu, 3 Jul 2014 19:50:50 +0000 (19:50 +0000)]
Initialize the switch vlan table at attachment.

Update some comments on code, specifying the correct vlans used on switch
setup.

Advertise the proper switch operation mode (the rtl8366rb only support
dot1q vlans).

This fixes the breakage that i introduced on r249752 and make the rtl8366rb
switch works again with etherswitchcfg(8).

Tested on TP-Link 1043ND.

Tested by: me, Harm Weites (harm at weites.com)

9 years agoThe u-boot tarball needed for some boards, BEAGLEBONE for
gjb [Thu, 3 Jul 2014 19:37:25 +0000 (19:37 +0000)]
The u-boot tarball needed for some boards, BEAGLEBONE for
example, explicitly hard-code gcc(1) as the compiler.

Partially revert r264703, which did a post-chroot install
of gcc(1).  This was initially removed because gcc(1) fails
to build usr.bin/dtc/ causing the xdev target to fail.  So
this time, move the gcc(1) installation after xdev is built.

This change is likely applicable to stable/10 arm build
failures, as well.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoMerge from OpenSolaris (30-Jun-2009):
pfg [Thu, 3 Jul 2014 19:25:24 +0000 (19:25 +0000)]
Merge from OpenSolaris (30-Jun-2009):

6851093 system drops to kmdb with anonymous dtrace probes + kmdb

This has no effect on FreeBSD (code is ifdef'ed) but is useful as
reference for future merges.

MFC after: 1 week

9 years agoMerge from OpenSolaris (22-Apr-2008):
pfg [Thu, 3 Jul 2014 19:07:37 +0000 (19:07 +0000)]
Merge from OpenSolaris (22-Apr-2008):

6823388 DTrace ioctl handlers must validate all structure members

MFC after: 1 week

9 years agoSync with head.
marcel [Thu, 3 Jul 2014 18:24:28 +0000 (18:24 +0000)]
Sync with head.

9 years agoDisplay efi framebuffer dimensions on boot
emaste [Thu, 3 Jul 2014 17:53:28 +0000 (17:53 +0000)]
Display efi framebuffer dimensions on boot

The EFI framebuffer produces corrupted output on certain systems.  For
now display the framebuffer parameters (address, dimensions, etc.) on
boot to aid in tracking down these issues.

Sponsored by: The FreeBSD Foundation

9 years agoMerge from OpenSolaris (20-Apr-2008):
pfg [Thu, 3 Jul 2014 17:36:59 +0000 (17:36 +0000)]
Merge from OpenSolaris (20-Apr-2008):

6822482 DOF validation needs to handle loadable sections flagged as unloadable

MFC after: 1 week

9 years agoDescribe kern.vty sc/vt tunable in syscons(4)
emaste [Thu, 3 Jul 2014 13:51:10 +0000 (13:51 +0000)]
Describe kern.vty sc/vt tunable in syscons(4)

Reviewed by: wblock

9 years agoNote that most errors are possible for all syscalls from utimes(2)
kib [Thu, 3 Jul 2014 11:19:16 +0000 (11:19 +0000)]
Note that most errors are possible for all syscalls from utimes(2)
family.  Minor wording corrections.

Based on the suggestions by bde.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoMicro-manage clang to get the expected inlining for cpu_search().
kib [Thu, 3 Jul 2014 11:06:27 +0000 (11:06 +0000)]
Micro-manage clang to get the expected inlining for cpu_search().
Mark cpu_search_lowest/cpu_search_highest/cpu_search_both as noinline,
while cpu_search() gets always_inline.  With the attributes set,
cpu_search() is inlined in wrappers, and if()s with constant
conditionals are optimized.

On some tests on many-core machine, the hwpmc reported samples for
cpu_search*() are reduced from 25% total to 9%.

Submitted by: "Rang, Anton" <anton.rang@isilon.com>
MFC after: 1 week

9 years ago- Disable hardware checksumming until it is properly tested.
hselasky [Thu, 3 Jul 2014 10:49:46 +0000 (10:49 +0000)]
- Disable hardware checksumming until it is properly tested.
- Don't discard frames if the dropped or error flag is set.
- Don't remove the last 4-bytes of every packet.
- Add extra range check for data position offset when receiving data.

MFC after: 1 day
PR: 191432

9 years agoFix a bug in hwpmc(4) callchain retrieval, for both user and kernel.
jhibbits [Thu, 3 Jul 2014 06:52:26 +0000 (06:52 +0000)]
Fix a bug in hwpmc(4) callchain retrieval, for both user and kernel.

The array index for the callchain is getting double-incremented -- both in the
loop and the storing.  It should only be incremented in one location.

Also, constrain the stack pointer range check.

MFC after: 2 weeks

9 years agoRework the BIO_DELETE code slightly. Always queue the BIO_DELETE
imp [Thu, 3 Jul 2014 05:22:13 +0000 (05:22 +0000)]
Rework the BIO_DELETE code slightly. Always queue the BIO_DELETE
requests on the trim_queue, even for the CFA ERASE. This allows us, in
the future, to collapse adjacent requests. Since CFA ERASE is only for
CF cards, and it is so restrictive in what it can do, the collapse
code is not presently here. This also brings the ada driver more in
line with the da driver's treatment of BIO_DELETEs.

Reviewed by: mav@

9 years agoUse separate memory type M_CTLIO for I/Os.
mav [Thu, 3 Jul 2014 04:26:53 +0000 (04:26 +0000)]
Use separate memory type M_CTLIO for I/Os.

CTL allocate large amount of RAM.  This change give some more stats.

MFC after: 2 weeks

10 years agoMore sed(1) usage fixing: the extension -i is not optional.
pfg [Thu, 3 Jul 2014 00:31:13 +0000 (00:31 +0000)]
More sed(1) usage fixing: the extension -i is not optional.

Pointed out by: jmallet
MFC after: 3 days

10 years agoUse correct flag for event index.
grehan [Thu, 3 Jul 2014 00:23:14 +0000 (00:23 +0000)]
Use correct flag for event index.

Submitted by: luigi
Obtained from: Vincenzo Maffione, Universita` di Pisa
MFC after: 1 week

10 years agoRemove some write only variables
bryanv [Wed, 2 Jul 2014 23:28:21 +0000 (23:28 +0000)]
Remove some write only variables

MFC after: 3 days

10 years agoFix sed(1) usage: the extension -i is not an optional.
pfg [Wed, 2 Jul 2014 23:07:01 +0000 (23:07 +0000)]
Fix sed(1) usage: the extension -i is not an optional.

MFC after: 3 days

10 years agoRemove ia64 from the list of known architectures and add an entry to
marcel [Wed, 2 Jul 2014 22:34:06 +0000 (22:34 +0000)]
Remove ia64 from the list of known architectures and add an entry to
UPDATING. This is the first step towards the removal of ia64 from
head. A buildworld for ia64 will now yield:

% make buildworld
make[1]: "/usr/src/Makefile.inc1" line 151: Unknown target ia64:ia64.

While here, trim the ia64-specific additions from ObsoleteFiles.inc

Discussed at: BSDcan

10 years agoFix a typo and improve readability.
hiren [Wed, 2 Jul 2014 22:25:48 +0000 (22:25 +0000)]
Fix a typo and improve readability.

10 years agoImprove markup, change references to nonexistent vt_vga(4), remove some
wblock [Wed, 2 Jul 2014 22:16:01 +0000 (22:16 +0000)]
Improve markup, change references to nonexistent vt_vga(4), remove some
language redundancy, and move the examples so sections are in the
standard order.

MFC after: 1 week

10 years agoDrop KTR records when we're in the debugger so that the debugger isn't
marcel [Wed, 2 Jul 2014 22:13:07 +0000 (22:13 +0000)]
Drop KTR records when we're in the debugger so that the debugger isn't
changing or overwriting the trace buffer. When KTR is enabled for things
like traps or pmap functions, the amount of logging can be substantial.

10 years agoImprove the KTR logs by naming the values.
marcel [Wed, 2 Jul 2014 22:09:06 +0000 (22:09 +0000)]
Improve the KTR logs by naming the values.

10 years ago(no commit message)
hiren [Wed, 2 Jul 2014 22:04:14 +0000 (22:04 +0000)]

10 years agoFix r264346 for ia64. We need to allocate memory for the function
marcel [Wed, 2 Jul 2014 22:04:12 +0000 (22:04 +0000)]
Fix r264346 for ia64. We need to allocate memory for the function
descriptors in order to relocate RTLD itself. To allocate memory,
we need the pagesizes array initialized, but that happens after
RTLD is relocated. This ordering is important for amd64, but it's
opposite of what ia64 needs. Handle this conflict with the define
called RTLD_INIT_PAGESIZES_EARLY. When defined, obtain the page
sizes before relocating rtld, otherwise do it after.

10 years agoFix bug in sync control in new "dev" mode of ZVOL (r265678).
mav [Wed, 2 Jul 2014 21:25:32 +0000 (21:25 +0000)]
Fix bug in sync control in new "dev" mode of ZVOL (r265678).

Don't check ZVOL_WCE flag, used in Solaris to control device "write cache".
It is not applicable on FreeBSD and by default set to "disable".

MFC after: 3 days

10 years agoFixed build with DEVICE_POLLING.
pluknet [Wed, 2 Jul 2014 21:08:25 +0000 (21:08 +0000)]
Fixed build with DEVICE_POLLING.

10 years agoFix vt(4) detection in kbdcontrol and vidcontrol
emaste [Wed, 2 Jul 2014 20:40:59 +0000 (20:40 +0000)]
Fix vt(4) detection in kbdcontrol and vidcontrol

As sc(4) and vt(4) coexist and are both enabled in GENERIC, the existence
of a vt(4) sysctl is not sufficient to determine that vt(4) is in use.

Reported by: Trond Endrestøl

10 years agoRemove ofwfb(4) in order to fix the LINT build breakage caused by r268069.
marius [Wed, 2 Jul 2014 19:46:42 +0000 (19:46 +0000)]
Remove ofwfb(4) in order to fix the LINT build breakage caused by r268069.
Both vt(4) and ofwfb(4) need a lot of love to be usable on sparc64 and even
then the performance of ofwfb(4) would suck compared to hardware accelerated
drivers like creator(4) and machfb(4).

10 years agovtfontcvt: correct width calculation (.hex files and commandline)
emaste [Wed, 2 Jul 2014 19:31:49 +0000 (19:31 +0000)]
vtfontcvt: correct width calculation (.hex files and commandline)

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

10 years agoClarify the setting of syscons driver flags
emaste [Wed, 2 Jul 2014 19:22:12 +0000 (19:22 +0000)]
Clarify the setting of syscons driver flags

Submitted by: wblock

10 years agoFix off-by-one introduced by the conversion to the driver API.
marcel [Wed, 2 Jul 2014 16:17:48 +0000 (16:17 +0000)]
Fix off-by-one introduced by the conversion to the driver API.

Submitted by:   Sreekanth Rupavatharam <rupavath@juniper.net>
Obtained from:  Juniper Networks, Inc.

10 years agoNow that GENERIC can boot on UEFI systems (r268158), switch the build to use
nwhitehorn [Wed, 2 Jul 2014 15:23:13 +0000 (15:23 +0000)]
Now that GENERIC can boot on UEFI systems (r268158), switch the build to use
UEFI-compatible images. These will boot as before on BIOS systems, but will
boot using the UEFI loader on UEFI-aware systems.

10 years agoFix typos in VTY constant names from r268158
emaste [Wed, 2 Jul 2014 14:47:48 +0000 (14:47 +0000)]
Fix typos in VTY constant names from r268158

10 years agoAdd a ful stop after FreeBSD's version in the history section.
marcel [Wed, 2 Jul 2014 14:34:01 +0000 (14:34 +0000)]
Add a ful stop after FreeBSD's version in the history section.

Pointed out by: brueffer@ (thanks!)

10 years agoPrefer vt(4) for UEFI boot
emaste [Wed, 2 Jul 2014 13:24:21 +0000 (13:24 +0000)]
Prefer vt(4) for UEFI boot

The UEFI framebuffer driver vt_efifb requires vt(4), so add a mechanism
for the startup routine to set the preferred console.  This change is
ugly because console init happens very early in the boot, making a
cleaner interface difficult.  This change is intended only to facilitate
the sc(4) / vt(4) transition, and can be reverted once vt(4) is the
default.

10 years agoVarious bugfixes from Stefano Garzarella:
luigi [Wed, 2 Jul 2014 12:13:11 +0000 (12:13 +0000)]
Various bugfixes from Stefano Garzarella:

1. oce_multiq_start(): make sure the buffer is consumed even on ENXIO
2. oce_multiq_transmit(): there is an extra call to drbr_enqueue()
  causing the mbuf to be enqueued twice when the NIC's queue is full,
  and potential panics
3. oce_multiq_transmit(): same problem fixed recently in ixgbe (r267187)
   and other drivers: if the mbuf is enqueued, the proper return value is 0

Submitted by: Stefano Garzarella
MFC after: 3 days

10 years agoAdd support for empty data sets. Data set begin and end pointers
hselasky [Wed, 2 Jul 2014 08:49:06 +0000 (08:49 +0000)]
Add support for empty data sets. Data set begin and end pointers
should resolve to "NULL" when not present. This is done by declaring
the data set begin and end symbols as "weak".

10 years agoDefine a "__weak" macro for declaring symbols "weak".
hselasky [Wed, 2 Jul 2014 08:45:26 +0000 (08:45 +0000)]
Define a "__weak" macro for declaring symbols "weak".

10 years agoPlug gcc warning after r268074 about unitialized newsigacts
mjg [Wed, 2 Jul 2014 05:45:40 +0000 (05:45 +0000)]
Plug gcc warning after r268074 about unitialized newsigacts

Reported by: Gary Jennejohn <gljennjohn gmail.com>

10 years agoAdd documentation for svnlite.
eadler [Wed, 2 Jul 2014 05:09:41 +0000 (05:09 +0000)]
Add documentation for svnlite.

PR: 191544
Reported by: eric
Reviewed by: imp
MFC After:  1 week

10 years agoPrepare for merging to stable/10: update the history section.
marcel [Wed, 2 Jul 2014 04:06:06 +0000 (04:06 +0000)]
Prepare for merging to stable/10: update the history section.

10 years agoConvert nfe(4) to use the driver API.
marcel [Tue, 1 Jul 2014 23:41:54 +0000 (23:41 +0000)]
Convert nfe(4) to use the driver API.

Submitted by: Mikhail <mp@lenta.ru>

10 years agoMerge from OpenSolaris (15-Sep-2008):
pfg [Tue, 1 Jul 2014 23:37:24 +0000 (23:37 +0000)]
Merge from OpenSolaris (15-Sep-2008):

6735480 race between probe enabling and provider registration

MFC after: 1 week

10 years agoCheck if fchflags() is needed by fstat'ing before and check
delphij [Tue, 1 Jul 2014 22:46:39 +0000 (22:46 +0000)]
Check if fchflags() is needed by fstat'ing before and check
the results.

Reviewed by: jilles
X-MFC-With: r267977

10 years agoMFV r268122:
delphij [Tue, 1 Jul 2014 22:42:53 +0000 (22:42 +0000)]
MFV r268122:

4929 want prevsnap property

illumos/illumos-gate@b461c7460e5e77cf65f00151162e654220c6e2fb

MFC after: 2 weeks

10 years agoAdd an entry for r268115 to UPDATING.
rmacklem [Tue, 1 Jul 2014 22:32:11 +0000 (22:32 +0000)]
Add an entry for r268115 to UPDATING.

10 years agoMFV r268121:
delphij [Tue, 1 Jul 2014 22:31:09 +0000 (22:31 +0000)]
MFV r268121:

4924 LZ4 Compression for metadata

illumos/illumos-gate@b8289d24d866c1af02d7007348f7f057693c15d3

MFC after: 2 weeks

10 years agoSmall merges from OpenSolaris:
pfg [Tue, 1 Jul 2014 22:16:44 +0000 (22:16 +0000)]
Small merges from OpenSolaris:

These have no effect on FreeBSD, in fact they are ifdef'ed,
but make easier future merges:

6699767 panic in spec_open()

6718877 crgetzoneid() use can cause problems when forking processes with
USDT providers in a non global zone

MFC after: 3 days

10 years agoMFV r268119:
delphij [Tue, 1 Jul 2014 21:51:30 +0000 (21:51 +0000)]
MFV r268119:

4914 zfs on-disk bookmark structure should be named *_phys_t

illumos/illumos-gate@7802d7bf98dec568dadf72286893b1fe5abd8602

MFC after: 2 weeks

10 years agoBump __FreeBSD_version since r268115 changed the internal
rmacklem [Tue, 1 Jul 2014 21:12:48 +0000 (21:12 +0000)]
Bump __FreeBSD_version since r268115 changed the internal
interfaces used between the NFS related modules, including
the krpc.

10 years agoDocument r268045, vt(4) now in GENERIC.
gjb [Tue, 1 Jul 2014 21:04:40 +0000 (21:04 +0000)]
Document r268045, vt(4) now in GENERIC.
Remove r260888, VT kernel configuration file is gone.

Sponsored by: The FreeBSD Foundation

10 years ago - Fix handling of "new" style of ioctl in compatiblity mode [1];
delphij [Tue, 1 Jul 2014 20:57:39 +0000 (20:57 +0000)]
 - Fix handling of "new" style of ioctl in compatiblity mode [1];
 - Reorganize code and reduce diff from upstream;
 - Improve forward compatibility shims for previous kernel;

Reported by: sbruno [1]
X-MFC-With: r268075

10 years agoMerge the NFSv4.1 server code in projects/nfsv4.1-server over
rmacklem [Tue, 1 Jul 2014 20:47:16 +0000 (20:47 +0000)]
Merge the NFSv4.1 server code in projects/nfsv4.1-server over
into head. The code is not believed to have any effect
on the semantics of non-NFSv4.1 server behaviour.
It is a rather large merge, but I am hoping that there will
not be any regressions for the NFS server.

MFC after: 1 month

10 years agoChange NFS readdir() to only ignore cookies preceding the given offset for
bdrewery [Tue, 1 Jul 2014 20:00:35 +0000 (20:00 +0000)]
Change NFS readdir() to only ignore cookies preceding the given offset for
UFS rather than for all but ZFS.  This code was assuming that offsets were
monotonically increasing for all file systems except ZFS and that the
cookies from a previous call may have been rewound to a block boundary.
According to mckusick@ only UFS is known to do this, so only requests against
UFS file systems should remove cookies smaller than the given offset.  This
fixes serving TMPFS over NFS as it too does not have monotonically increasing
offsets.  The comment around the code also indicated it was specific to UFS.

Some of the code using 'not_zfs' is specific to ZFS snapshot handling, so
add a 'is_zfs' variable for those cases.

It's possible that 'is_zfs' check for VFS_VGET() support may not be
specific to ZFS.  This needs more research and testing.

After this fix TMPFS and other file systems can be served over NFS.

To test I compared the results of syncing a /usr/src tree into a tmpfs and
serving that over NFS.  Before the fix 3589 files were missing on the remote
view.  After the fix all files were successfully found.

Reviewed by: rmacklem
Discussed with: mckusick, rmacklem via fs@
Discussed at: http://lists.freebsd.org/pipermail/freebsd-fs/2014-April/019264.html
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

10 years agoConvert bge(4) to use the driver API.
marcel [Tue, 1 Jul 2014 19:50:47 +0000 (19:50 +0000)]
Convert bge(4) to use the driver API.

Submitted by:   Sreekanth Rupavatharam <rupavath@juniper.net>
Obtained from:  Juniper Networks, Inc.

10 years agoMerge ^/projects/release-debugdist into ^/head:
gjb [Tue, 1 Jul 2014 19:04:04 +0000 (19:04 +0000)]
Merge ^/projects/release-debugdist into ^/head:
r262491, r262493, r262516, r267345, r267397:

r262491:
  Add DEBUG_DISTRIBUTIONS, and set it to include base and
  EXTRA_DISTRIBUTIONS, excluding 'doc', since the documentation
  distribution does not have corresponding debug information.

  Use DEBUG_DISTRIBUTIONS in the 'distributeworld installworld'
  and 'packageworld' targets, to reduce the number of occurances
  of excluding distributions that do not have .debug files.

r262493:
  In release/Makefile, explicitly set WITHOUT_DEBUG_FILES=1
  for dvdrom and cdrom targets.  (Later reverted.)

  Exclude the *.debug.txz distributions from dvdrom and
  cdrom images, but include them for ftp distribution.

r262516:
  Rename ${dist}.debug.txz to ${dist}-dbg.txz to prevent the
  following output:
eval: ${base....}: Bad substitution
eval: ${doc....}: Bad substitution
eval: ${games....}: Bad substitution
eval: ${lib32....}: Bad substitution

  This also follows other naming conventions seen in the
  wild.

r267345:
  Explicitly set MK_DEBUG_FILES=no, which overrides the
  WITH_DEBUG_FILES=1 and WITHOUT_DEBUG_FILES=1 collisions
  previously experienced.

  This change allows us to create the {base,kernel}_debug.txz
  distributions without accidentally installing the *.debug
  files on the medium itself.

r267397:
  Remove evaluations of MK_DEBUG_FILES where not needed.
  If DEBUG_DISTRIBUTIONS is empty, which is true if
  MK_DEBUG_FILES evaluates to 'no' above, the loop does
  nothing.

MFC after: 1 month
Tested on: head@r267801
Reviewed by: brooks [1], emaste, imp [1]
[1] earlier version
Sponsored by: The FreeBSD Foundation

10 years agoMerge r267837 from ^/projects/release-debugdist:
gjb [Tue, 1 Jul 2014 18:26:30 +0000 (18:26 +0000)]
Merge r267837 from ^/projects/release-debugdist:
  When building world when WITH_DEBUG_FILES is set,
  avoid building ar(1) archives with '-g'.

Tested on: head@r267801
Reviewed by: emaste, imp
Sponsored by: The FreeBSD Foundation

10 years agoFree the static DMA buffer holding the command ring during detach as well
jhb [Tue, 1 Jul 2014 18:24:54 +0000 (18:24 +0000)]
Free the static DMA buffer holding the command ring during detach as well
as if attach fails.

10 years agoRemove old reference to IP_RSSCPUID.
adrian [Tue, 1 Jul 2014 17:27:48 +0000 (17:27 +0000)]
Remove old reference to IP_RSSCPUID.

Submitted by: Eggert, Lars <lars@netapp.com>

10 years agoAdd support for REPORT TIMESTAMP command.
mav [Tue, 1 Jul 2014 16:52:41 +0000 (16:52 +0000)]
Add support for REPORT TIMESTAMP command.

MFC after: 2 weeks

10 years agoRevert r268007, and re-adapt MFV r260708:
pfg [Tue, 1 Jul 2014 15:36:05 +0000 (15:36 +0000)]
Revert r268007, and re-adapt MFV r260708:

4427 pid provider rejects probes with valid UTF-8 names

Use of u8_textprep.c required -Wno-cast-qual for powerpc.

MFC after: 2 weeks

10 years agoAdd more formal and strict command parsing and validation.
mav [Tue, 1 Jul 2014 15:05:23 +0000 (15:05 +0000)]
Add more formal and strict command parsing and validation.

For every supported command define CDB length and mask of bits that are
allowed to be set.  This allows to remove bunch of checks through the code
and still make the validation more strict.  To properly do it for commands
supporting multiple service actions, formalize their parsing by adding
subtables for each of such commands.

As visible effect, this change allows to add support for REPORT SUPPORTED
OPERATION CODES command, reporting to client all the data about supported
SCSI commands, except timeouts.

MFC after: 2 weeks

10 years agoActually pro AMD chipsets.
marius [Tue, 1 Jul 2014 14:54:34 +0000 (14:54 +0000)]
Actually pro AMD chipsets.

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

10 years agoFix the reported status for the switch CPU port which was (wrongly)
loos [Tue, 1 Jul 2014 14:49:46 +0000 (14:49 +0000)]
Fix the reported status for the switch CPU port which was (wrongly)
reporting half-duplex link.

Tested on TP-Link WR1043ND.

10 years agoAdd the CPU port flag to the CPU port on rtl8366 (port 5).
loos [Tue, 1 Jul 2014 14:33:48 +0000 (14:33 +0000)]
Add the CPU port flag to the CPU port on rtl8366 (port 5).

Do not allow any media change on the switch CPU port.

Tested on TP-Link WR1043ND.

10 years agoDocument all aliases supported by GEOM_PART class.
ae [Tue, 1 Jul 2014 12:44:47 +0000 (12:44 +0000)]
Document all aliases supported by GEOM_PART class.

MFC after: 1 week

10 years agoLinux uses its own UUID for data partitions.
ae [Tue, 1 Jul 2014 12:40:00 +0000 (12:40 +0000)]
Linux uses its own UUID for data partitions.

MFC after: 1 week

10 years agoDon't overload the CCB status field within the driver.
scottl [Tue, 1 Jul 2014 10:51:20 +0000 (10:51 +0000)]
Don't overload the CCB status field within the driver.

Obtained from: Netflix, Inc.
MFC after: 2 days

10 years agoDon't call crcopysafe or uifind unnecessarily in execve.
mjg [Tue, 1 Jul 2014 09:21:32 +0000 (09:21 +0000)]
Don't call crcopysafe or uifind unnecessarily in execve.

MFC after: 1 week

10 years agoMFV r267570:
delphij [Tue, 1 Jul 2014 08:36:56 +0000 (08:36 +0000)]
MFV r267570:

4756 metaslab_group_preload() could deadlock

illumos/illumos-gate@30beaff42d8240ebf5386e8b7a14e3d137a1631f

MFC after: 2 weeks

10 years agoMFV r267569:
delphij [Tue, 1 Jul 2014 08:28:49 +0000 (08:28 +0000)]
MFV r267569:

4897 Space accounting mismatch in L2ARC/zpool

illumos/illumos-dist@3038a2b421b40dc5ac11cd88423696618584f85a

MFC after: 2 weeks

10 years agoMFV r267568:
delphij [Tue, 1 Jul 2014 08:20:34 +0000 (08:20 +0000)]
MFV r267568:

4891 want zdb option to dump all metadata

illumos/illumos-gate@df15e419cb7359ba56ddddab9045e438d89e7cbc

MFC after: 2 weeks

10 years agoThe assumption in ipsec4_process_packet() that the payload may be
zec [Tue, 1 Jul 2014 08:02:25 +0000 (08:02 +0000)]
The assumption in ipsec4_process_packet() that the payload may be
only IPv4 is wrong, so check the IP version before mangling the
payload header.

10 years agoMFV r267567:
delphij [Tue, 1 Jul 2014 07:56:07 +0000 (07:56 +0000)]
MFV r267567:

4881 zfs send performance degradation when embedded block pointers are
     encountered

illumos/illumos-gate@06315b795c0d54f0228e0b8af497a28752dd92da

MFC after: 2 weeks

10 years agoRemove any stale mbuf tags from packets being injected into a netgraph
zec [Tue, 1 Jul 2014 07:54:12 +0000 (07:54 +0000)]
Remove any stale mbuf tags from packets being injected into a netgraph
graph.  In particular, this solves some issues with (probably leaked)
IPSec-related tags being looped back through netgraph to the inbound
path which then misinterpreted the stale tags.

MFC after: 7 days

10 years agoFix order of USB serial layer uninit. Currently module dependency
hselasky [Tue, 1 Jul 2014 07:30:29 +0000 (07:30 +0000)]
Fix order of USB serial layer uninit. Currently module dependency
rules prevent the USB serial module to be unloaded before any client
modules. This patch ensures that the "ucom_mtx" mutex is destroyed
last when doing a system uninit in a monotolith build aswell.

MFC after: 3 days

10 years agoMFV r267566:
delphij [Tue, 1 Jul 2014 07:29:42 +0000 (07:29 +0000)]
MFV r267566:

4390 i/o errors when deleting filesystem/zvol can lead to space map corruption

MFC after: 2 weeks

10 years agoFix for use after free.
hselasky [Tue, 1 Jul 2014 07:13:41 +0000 (07:13 +0000)]
Fix for use after free.

MFC after: 3 days

10 years agoMFV r267565:
delphij [Tue, 1 Jul 2014 06:43:15 +0000 (06:43 +0000)]
MFV r267565:

4757 ZFS embedded-data block pointers ("zero block compression")
4913 zfs release should not be subject to space checks

MFC after: 2 weeks

10 years agoPerform a lockless check in sigacts_shared.
mjg [Tue, 1 Jul 2014 06:29:15 +0000 (06:29 +0000)]
Perform a lockless check in sigacts_shared.

It is used only during execve (i.e. singlethreaded), so there is no fear
of returning 'not shared' which soon becomes 'shared'.

While here reorganize the code a little to avoid proc lock/unlock in
shared case.

MFC after: 1 week

10 years agoAdd accessor functions for manipulating the CAM CCB status field.
scottl [Tue, 1 Jul 2014 04:44:18 +0000 (04:44 +0000)]
Add accessor functions for manipulating the CAM CCB status field.

Reviewed by: gibbs
Obtained from: Netflix, Inc
MFC after: 2 days

10 years agoRefactor some code in mps.c to reduce header pollution.
scottl [Tue, 1 Jul 2014 04:33:36 +0000 (04:33 +0000)]
Refactor some code in mps.c to reduce header pollution.

Reviewed by: gibbs
Obtained from: Netflix, Inc.
MFC after: 2 days

10 years agoAdd vt(4) devices and options to NOTES
emaste [Tue, 1 Jul 2014 00:22:54 +0000 (00:22 +0000)]
Add vt(4) devices and options to NOTES

Reviewed by: marius (earlier version)

10 years agoInitialise these variables so gcc doesn't complain.
adrian [Mon, 30 Jun 2014 23:34:36 +0000 (23:34 +0000)]
Initialise these variables so gcc doesn't complain.

Submitted by: luigi

10 years agoregex(3): Add support for \< and \> word delimiters
pfg [Mon, 30 Jun 2014 20:54:25 +0000 (20:54 +0000)]
regex(3): Add support for \< and \> word delimiters

Solaris and other OSs have support for \< and \> as word
delimiters in utilities like sed(1). These are useful to
have for general compatiblity with Solaris but should be
avoided for portability with other systems, including the
traditional BSDs.

Bump __FreeBSD_version as this is likely to affect some
userland utilities.

Reference:
https://www.illumos.org/issues/516

PR: bin/153257
Obtained from: Illumos
MFC after: 1 month

10 years agoActivate the condition for WITHOUT_INFO
bapt [Mon, 30 Jun 2014 20:24:00 +0000 (20:24 +0000)]
Activate the condition for WITHOUT_INFO

Submitted by: antoine

10 years agofill in the list of obsolete files when base is built with WITHOUT_INFO
bapt [Mon, 30 Jun 2014 20:22:00 +0000 (20:22 +0000)]
fill in the list of obsolete files when base is built with WITHOUT_INFO

10 years agoAdd missing VT_ kernel config knobs
emaste [Mon, 30 Jun 2014 19:34:16 +0000 (19:34 +0000)]
Add missing VT_ kernel config knobs

MFC after: 1 week

10 years agoWorkaround for bug in GCC on powerpc64. Symbols that are exported are
hselasky [Mon, 30 Jun 2014 18:11:22 +0000 (18:11 +0000)]
Workaround for bug in GCC on powerpc64. Symbols that are exported are
by fault required to be all "static" or all "extern".

10 years agoAdd a vt(4) cross reference to syscons(4)
emaste [Mon, 30 Jun 2014 16:49:00 +0000 (16:49 +0000)]
Add a vt(4) cross reference to syscons(4)

10 years agoFix ifconfig to show pltime and vltime with -L option,
ume [Mon, 30 Jun 2014 16:39:37 +0000 (16:39 +0000)]
Fix ifconfig to show pltime and vltime with -L option,
again after usage change from time_second to time_uptime.

PR: 188520
Submitted by: Guy Yur <guyyur__at__gmail.com>
MFC after: 1 week

10 years agoAdd vt(4) to GENERIC and retire the separate VT config
emaste [Mon, 30 Jun 2014 16:18:38 +0000 (16:18 +0000)]
Add vt(4) to GENERIC and retire the separate VT config

vt(4) and sc(4) can now coexist in the same kernel.  To choose the vt
driver, set the loader tunable kern.vty=vt .

10 years agochown: add a test
eadler [Mon, 30 Jun 2014 05:33:52 +0000 (05:33 +0000)]
chown: add a test

Add a test for the chown utility. This sets up chown(8) to be capable of being
tested.  As such, only add one test for now as an example.

10 years agoAdd initial RSS awareness to the ixgbe(4) driver.
adrian [Mon, 30 Jun 2014 04:38:29 +0000 (04:38 +0000)]
Add initial RSS awareness to the ixgbe(4) driver.

The ixgbe(4) hardware is capable of RSS hashing RX packets and doing RSS
queue selection for up to 8 queues.

However, even if multi-queue is enabled for ixgbe(4), the RX path doesn't use
the RSS flowid from the received descriptor.  It just uses the MSIX queue id.

This patch does a handful of things if RSS is enabled:

* Instead of using a random key at boot, fetch the RSS key from the RSS code
  and program that in to the RSS redirection table.

  That whole chunk of code should be double checked for endian correctness.

* Use the RSS queue mapping to CPU ID to figure out where to thread pin
  the RX swi thread and the taskqueue threads for each queue.

* The software queue is now really an "RSS bucket".

* When programming the RSS indirection table, use the RSS code to
  figure out which RSS bucket each slot in the indirection table maps
  to.

* When transmitting, use the flowid RSS mapping if the mbuf has
  an RSS aware hash.  The existing method wasn't guaranteed to align
  correctly with the destination RSS bucket (and thus CPU ID.)

This code warns if the number of RSS buckets isn't the same as the
automatically configured number of hardware queues.  The administrator
will have to tweak one of them for better performance.

There's currently no way to re-balance the RSS indirection table after
startup.  I'll worry about that later.

Additionally, it may be worthwhile to always use the full 32 bit flowid if
multi-queue is enabled.  It'll make things like lagg(4) behave better with
respect to traffic distribution.

10 years agoAdd initial RSS awareness to the igb(4) driver.
adrian [Mon, 30 Jun 2014 04:34:59 +0000 (04:34 +0000)]
Add initial RSS awareness to the igb(4) driver.

The igb(4) hardware is capable of RSS hashing RX packets and doing RSS
queue selection for up to 8 queues.  (I believe some hardware is limited
to 4 queues, but I haven't tested on that.)

However, even if multi-queue is enabled for igb(4), the RX path doesn't use
the RSS flowid from the received descriptor.  It just uses the MSIX queue id.

This patch does a handful of things if RSS is enabled:

* Instead of using a random key at boot, fetch the RSS key from the RSS code
  and program that in to the RSS redirection table.

  That whole chunk of code should be double checked for endian correctness.

* Use the RSS queue mapping to CPU ID to figure out where to thread pin
  the RX swi thread and the taskqueue threads for each queue.

* The software queue is now really an "RSS bucket".

* When programming the RSS indirection table, use the RSS code to
  figure out which RSS bucket each slot in the indirection table maps
  to.

* When transmitting, use the flowid RSS mapping if the mbuf has
  an RSS aware hash.  The existing method wasn't guaranteed to align
  correctly with the destination RSS bucket (and thus CPU ID.)

This code warns if the number of RSS buckets isn't the same as the
automatically configured number of hardware queues.  The administrator
will have to tweak one of them for better performance.

There's currently no way to re-balance the RSS indirection table after
startup.  I'll worry about that later.

Additionally, it may be worthwhile to always use the full 32 bit flowid if
multi-queue is enabled.  It'll make things like lagg(4) behave better with
respect to traffic distribution.

10 years agoIf we're doing RSS then ensure the TCP timer selection uses the multi-CPU
adrian [Mon, 30 Jun 2014 04:26:29 +0000 (04:26 +0000)]
If we're doing RSS then ensure the TCP timer selection uses the multi-CPU
callwheel setup, rather than just dumping all the timers on swi0.