]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoClose race in r268291 between port destruction, delayed by sessions
Alexander Motin [Sun, 6 Jul 2014 17:57:59 +0000 (17:57 +0000)]
Close race in r268291 between port destruction, delayed by sessions
teardown, and new port creation during `service ctld restart`.

Close it by returning iSCSI port internal state, that allows to identify
dying ports, which should not be counted as existing, from really alive.

10 years agoIntroduce pmap_unwire(). It will replace pmap_change_wiring(). There are
Alan Cox [Sun, 6 Jul 2014 17:42:38 +0000 (17:42 +0000)]
Introduce pmap_unwire().  It will replace pmap_change_wiring().  There are
several reasons for this change:

pmap_change_wiring() has never (in my memory) been used to set the wired
attribute on a virtual page.  We have always used pmap_enter() to do that.
Moreover, it is not really safe to use pmap_change_wiring() to set the wired
attribute on a virtual page.  The description of pmap_change_wiring() says
that it assumes the existence of a mapping in the pmap.  However, non-wired
mappings may be reclaimed by the pmap at any time.  (See pmap_collect().)
Many implementations of pmap_change_wiring() will crash if the mapping does
not exist.

pmap_unwire() accepts a range of virtual addresses, whereas
pmap_change_wiring() acts upon a single virtual page.  Since we are
typically unwiring a range of virtual addresses, pmap_unwire() will be more
efficient.  Moreover, pmap_unwire() allows us to unwire superpage mappings.
Previously, we were forced to demote the superpage mapping, because
pmap_change_wiring() only allowed us to express the unwiring of a single
base page mapping at a time.  This added to the overhead of unwiring for
large ranges of addresses, including the implicit unwiring that occurs at
process termination.

Implementations for arm and powerpc will follow.

Discussed with: jeff, marcel
Reviewed by: kib
Sponsored by: EMC / Isilon Storage Division

10 years agoMake iSCSI initiator keep Initiator Session ID (ISID) across reconnects.
Alexander Motin [Sun, 6 Jul 2014 17:37:49 +0000 (17:37 +0000)]
Make iSCSI initiator keep Initiator Session ID (ISID) across reconnects.

Previously ISID was changed every time, that made impossible correct
persistent reservation, because reconnected session was identified as
completely new one.

Reviewed by: trasz
MFC after: 1 week

10 years agoIn case we ever support little-endian PowerPC (probably userland only),
Nathan Whitehorn [Sun, 6 Jul 2014 16:20:37 +0000 (16:20 +0000)]
In case we ever support little-endian PowerPC (probably userland only),
avoid hardcoding endianness here.

10 years agoAdd a new CPU id for a POWER8 variant.
Nathan Whitehorn [Sun, 6 Jul 2014 16:19:55 +0000 (16:19 +0000)]
Add a new CPU id for a POWER8 variant.

10 years agoFix OFED startup order: All SYSINIT()'s and modules should be loaded
Hans Petter Selasky [Sun, 6 Jul 2014 14:22:13 +0000 (14:22 +0000)]
Fix OFED startup order: All SYSINIT()'s and modules should be loaded
prior to starting "/sbin/init" which will run all the "/etc/rc.d/xxx"
scripts. Else there can be a race configuring the interfaces via
"/etc/rc.conf".

MFC after: 4 weeks
Sponsored by: Mellanox Technologies

10 years agoFix compile warning.
Hans Petter Selasky [Sun, 6 Jul 2014 14:20:47 +0000 (14:20 +0000)]
Fix compile warning.

MFC after: 4 weeks
Sponsored by: Mellanox Technologies

10 years agoFix some compile warnings.
Hans Petter Selasky [Sun, 6 Jul 2014 14:14:07 +0000 (14:14 +0000)]
Fix some compile warnings.

MFC after: 4 weeks
Sponsored by: Mellanox Technologies

10 years agoAlign the stack in _rtld_bind_start. Normally this is called with the
Andrew Turner [Sun, 6 Jul 2014 10:24:06 +0000 (10:24 +0000)]
Align the stack in _rtld_bind_start. Normally this is called with the
correct stack alignment, however when we have a leaf function that uses
thread local storage it calls __aeabi_read_tp to get the thread pointer.
Neither GCC or clang see this as a function call so will align the stack
to a 4-byte boundary. This may be a problem as _rtld_bind expects to be
on an 8-byte boundary.

The solution is to store a copy of the stack pointer and force the
alignment before calling _rtld_bind.

This fixes a problem with armeb where applications would crash in odd ways.
It should also remove the need for a local patch to clang to force the
stack alignment to an 8-byte boundary, even for leaf functions. Further
testing will be needed before reverting this local change to clang as we
may rely on it in other places.

Reviewed by: jmg@

10 years agoAdd support for SCSI Ports (88h) VPD page.
Alexander Motin [Sun, 6 Jul 2014 07:34:18 +0000 (07:34 +0000)]
Add support for SCSI Ports (88h) VPD page.

10 years agoMake REPORT TARGET PORT GROUPS command report realistic data instead of
Alexander Motin [Sun, 6 Jul 2014 07:02:36 +0000 (07:02 +0000)]
Make REPORT TARGET PORT GROUPS command report realistic data instead of
hardcoded garbage.

10 years agoMove lun_map() method from command nexus to port.
Alexander Motin [Sun, 6 Jul 2014 06:21:34 +0000 (06:21 +0000)]
Move lun_map() method from command nexus to port.

Previous implementation made impossible to do some things, such as calling
it for ports other then one through which command arrived.

10 years agoRelax some bit checks for INQUIRY command.
Alexander Motin [Sun, 6 Jul 2014 06:12:29 +0000 (06:12 +0000)]
Relax some bit checks for INQUIRY command.

FreeBSD still tries to put LUN number in second byte until it get device
protocol version, even that it was obsoleted about 20 years ago.

10 years agosh: Fix overflow checking on 'ulimit' operand.
Jilles Tjoelker [Sat, 5 Jul 2014 21:50:59 +0000 (21:50 +0000)]
sh: Fix overflow checking on 'ulimit' operand.

10 years agoAdd support to asmc(4) for Macmini 3,1.
Gavin Atkinson [Sat, 5 Jul 2014 21:34:37 +0000 (21:34 +0000)]
Add support to asmc(4) for Macmini 3,1.

PR: 190195
Submitted by: fbsdbugs2 sentry.org
MFC after: 1 week
Relnotes: yes

10 years agoPass through iSCSI session ISID from LOGIN request to the CTL frontend.
Alexander Motin [Sat, 5 Jul 2014 21:18:33 +0000 (21:18 +0000)]
Pass through iSCSI session ISID from LOGIN request to the CTL frontend.

ISID is an important part of initiator transport ID for iSCSI.  It is not
used now, but should be to properly implement persistent reservation.

10 years agoCheck the number of returned entries before doing any access to ifm_ulist.
Luiz Otavio O Souza [Sat, 5 Jul 2014 20:16:02 +0000 (20:16 +0000)]
Check the number of returned entries before doing any access to ifm_ulist.

10 years agobsd.dep.mk: add support for generating DTrace header files from .d files.
Rui Paulo [Sat, 5 Jul 2014 20:08:35 +0000 (20:08 +0000)]
bsd.dep.mk: add support for generating DTrace header files from .d files.

MFC after: 3 weeks

10 years agoUse %zu not %zd for printing size_t.
Gavin Atkinson [Sat, 5 Jul 2014 20:08:25 +0000 (20:08 +0000)]
Use %zu not %zd for printing size_t.

PR: 185007
Submitted by: saper saper.info
MFC after: 3 days

10 years agoCorrect format string to fix build of uhsoctl when DEBUG is defined
Gavin Atkinson [Sat, 5 Jul 2014 19:53:21 +0000 (19:53 +0000)]
Correct format string to fix build of uhsoctl when DEBUG is defined

PR: 185007
Submitted by: saper saper.info
MFC after: 3 days

10 years agoAdd the DTrace probe definitions for plockstat support.
Rui Paulo [Sat, 5 Jul 2014 19:49:31 +0000 (19:49 +0000)]
Add the DTrace probe definitions for plockstat support.

This will be connected to the system later.

Sponsored by: The FreeBSD Foundation

10 years agoFix equation and limerick to be correct. NetBSD fixed this 14 years ago
Gavin Atkinson [Sat, 5 Jul 2014 19:37:38 +0000 (19:37 +0000)]
Fix equation and limerick to be correct.  NetBSD fixed this 14 years ago
(src/games/fortune/datfiles/fortunes2 1.7).

PR: 188714
Submitted by: ksmakoto dd.iij4u.or.jp
Reviewed by: Wolfram Alpha
MFC after: 3 days

10 years agoAllow the PVID setting on CPU port.
Luiz Otavio O Souza [Sat, 5 Jul 2014 19:31:22 +0000 (19:31 +0000)]
Allow the PVID setting on CPU port.

Return our static list of supported media for the CPU port.

Tested on TP-Link 1043ND.

10 years agoBurry devid port method, which was a gross hack.
Alexander Motin [Sat, 5 Jul 2014 19:30:20 +0000 (19:30 +0000)]
Burry devid port method, which was a gross hack.

Instead make ports provide wanted port and target IDs, and LUNs provide
wanted LUN IDs.  After that core Device ID VPD code only had to link all
of them together and add relative port and port group numbers.

LUN ID for iSCSI LUNs no longer created by CTL, but by ctld, and passed
to CTL as "scsiname" LUN option.  This makes LUNs to report the same set
of IDs, independently from the port through which it is accessed, as
required by SCSI specifications.

10 years agoDominion Day became Canada Day in 1982, update the holiday calendar.
Gavin Atkinson [Sat, 5 Jul 2014 19:02:53 +0000 (19:02 +0000)]
Dominion Day became Canada Day in 1982, update the holiday calendar.

PR: 191533
Submitted by: db
Obtained from: http://www.pch.gc.ca/eng/1359137387574/1359137429809
MFC after: 3 days

10 years agoCreate separate CTL port for every iSCSI target (and maybe portal group).
Alexander Motin [Sat, 5 Jul 2014 18:15:00 +0000 (18:15 +0000)]
Create separate CTL port for every iSCSI target (and maybe portal group).

Having single port for all iSCSI connections makes problematic implementing
some more advanced SCSI functionality in CTL, that require proper ports
enumeration and identification.

This change extends CTL iSCSI API, making ctld daemon to control list of
iSCSI ports in CTL.  When new target is defined in config fine, ctld will
create respective port in CTL.  When target is removed -- port will be
also removed after all active commands through that port properly aborted.
This change require ctld to be rebuilt to match the kernel.

As a minor side effect, this allows to have iSCSI targets without LUNs.
While that may look odd and not very useful, that is not incorrect.

10 years agoMerge from OpenSolaris (24-Jul-2010):
Pedro F. Giffuni [Sat, 5 Jul 2014 15:36:17 +0000 (15:36 +0000)]
Merge from OpenSolaris (24-Jul-2010):

6679140 asymmetric alloc/dealloc activity can induce dynamic variable drops
6679193 dtrace_dynvar walker produces flood of dtrace_dynhash_sink

This finishes a set of merges from the older OpenSolaris releases.
Still the FreeBSD port has many differences that are difficult to
account for but that seems normal given that the kernels are different.

MFC after: 1 week

10 years agoFix minor copy-paste bug in r268284.
Alexander Motin [Sat, 5 Jul 2014 15:32:25 +0000 (15:32 +0000)]
Fix minor copy-paste bug in r268284.

10 years agoImprove CTL_BEARG_* flags support, including optional values copyout.
Alexander Motin [Sat, 5 Jul 2014 14:32:42 +0000 (14:32 +0000)]
Improve CTL_BEARG_* flags support, including optional values copyout.

10 years agoImplement and use ctl_frontend_find().
Alexander Motin [Sat, 5 Jul 2014 13:50:05 +0000 (13:50 +0000)]
Implement and use ctl_frontend_find().

10 years agoFix compile-time errors when NO_WERROR and WITHOUT_INET6_SUPPORT
Cy Schubert [Sat, 5 Jul 2014 07:15:19 +0000 (07:15 +0000)]
Fix compile-time errors when NO_WERROR and WITHOUT_INET6_SUPPORT
(NO_INET6) are specified.

Approved by: glebius
MFC after: 1 week

10 years agoWhen getting the initial value of numeric tunables use the
Hans Petter Selasky [Sat, 5 Jul 2014 06:12:48 +0000 (06:12 +0000)]
When getting the initial value of numeric tunables use the
getenv_xxx() functions instead of strtoq(), because the getenv_xxx()
functions include wrappers for various postfixes like G/M/K, which
strtoq() doesn't do.

10 years agoIntroduce new IOCTL CTL_PORT_LIST reporting in more flexible XML format.
Alexander Motin [Sat, 5 Jul 2014 05:44:26 +0000 (05:44 +0000)]
Introduce new IOCTL CTL_PORT_LIST reporting in more flexible XML format.

Leave old CTL_GET_PORT_LIST in place so far.  Garbage-collect it later.

10 years agoImprove readability of XML generated by CTL_LUN_LIST.
Alexander Motin [Sat, 5 Jul 2014 04:10:24 +0000 (04:10 +0000)]
Improve readability of XML generated by CTL_LUN_LIST.

10 years agounits(1): Clean up
Eitan Adler [Sat, 5 Jul 2014 03:49:20 +0000 (03:49 +0000)]
units(1): Clean up
Remove unused constant.  Add 'static' where able.

10 years agoMake options KPI more generic to allow it to be used for ports too,
Alexander Motin [Sat, 5 Jul 2014 03:34:52 +0000 (03:34 +0000)]
Make options KPI more generic to allow it to be used for ports too,
not only for LUNs.

10 years agounits(1): Convert units.lib to use '#' instead of '/'.
Eitan Adler [Sat, 5 Jul 2014 03:27:31 +0000 (03:27 +0000)]
units(1): Convert units.lib to use '#' instead of '/'.
This allows us to run GNU units against our data files and compare the output.
In addition, current units(1) does not support '/' as a comment at all.

10 years agounits: Support start of line comments with '#'
Eitan Adler [Sat, 5 Jul 2014 03:25:26 +0000 (03:25 +0000)]
units: Support start of line comments with '#'
Modern GNU units(1) supports comments anywhere with '#' but take the easy route for now and at least support start of line # comments.

10 years agounits(1): Add 'terse' support
Eitan Adler [Sat, 5 Jul 2014 03:17:57 +0000 (03:17 +0000)]
units(1): Add 'terse' support
terse output is used when calling units from another script.

10 years agoExtend capabilities to 64-bits in preparation for some API changes.
Peter Grehan [Sat, 5 Jul 2014 02:38:53 +0000 (02:38 +0000)]
Extend capabilities to 64-bits in preparation for some API changes.
The v1.0 virtio spec supports an extended size for guest/host
caps, but in practice 64-bits should last for a long time.

10 years agoUse proper links field for ports linking.
Alexander Motin [Sat, 5 Jul 2014 01:24:06 +0000 (01:24 +0000)]
Use proper links field for ports linking.

10 years agoThe new NFSv3 server did not generate directory postop attributes for
Rick Macklem [Fri, 4 Jul 2014 22:47:07 +0000 (22:47 +0000)]
The new NFSv3 server did not generate directory postop attributes for
the reply to ReaddirPlus when the server failed within the loop
that calls VFS_VGET(). This failure is most likely an error
return from VFS_VGET() caused by a bogus d_fileno that was
truncated to 32bits.
This patch fixes the server so that it will return directory postop
attributes for the failure. It does not fix the underlying issue caused
by d_fileno being uint32_t when a file system like ZFS generates
a fileno that is greater than 32bits.

Reported by: jpaetzel
Reviewed by: jpaetzel
MFC after: 1 month

10 years agominor perf enhancement for UTF-8
Pedro F. Giffuni [Fri, 4 Jul 2014 22:39:39 +0000 (22:39 +0000)]
minor perf enhancement for UTF-8

Reduce some duplicate code.

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

Obtained from: Illumos
MFC after: 1 week

10 years agounits(1): Add 'help' flag
Eitan Adler [Fri, 4 Jul 2014 22:19:21 +0000 (22:19 +0000)]
units(1): Add 'help' flag
- Add support for --help for compatibility
- Make usage() static

10 years agounits(1): Fix man page
Eitan Adler [Fri, 4 Jul 2014 21:34:48 +0000 (21:34 +0000)]
units(1): Fix man page
Igor walks one way.  I walked the other.

Reported by: wblock

10 years agounits(1): add long options
Eitan Adler [Fri, 4 Jul 2014 21:21:05 +0000 (21:21 +0000)]
units(1): add long options
Things brings additional compatibility with units 2.10

Discussed with: wblock (man page)

10 years agogetopt(3): clarify GNU instead of NetBSD.
Pedro F. Giffuni [Fri, 4 Jul 2014 21:06:48 +0000 (21:06 +0000)]
getopt(3): clarify GNU instead of NetBSD.

The manpage and the code for r267745 came from NetBSD but the
option is inspired on GNU.

Reported by: Ben Kaduk
MFC after: 3 days

10 years agoSeparate concepts of frontend and port.
Alexander Motin [Fri, 4 Jul 2014 19:27:06 +0000 (19:27 +0000)]
Separate concepts of frontend and port.

Before iSCSI implementation CTL had no knowledge about frontend drivers,
it had only frontends, which really were ports (alike to LUNs, if comparing
to backends).  But iSCSI added there ioctl() method, which does not belong
to frontend as a port, but belongs to a frontend driver.

10 years agoRemove targ_enable()/targ_disable() frontend methods.
Alexander Motin [Fri, 4 Jul 2014 19:19:03 +0000 (19:19 +0000)]
Remove targ_enable()/targ_disable() frontend methods.

Those methods were never implemented, and I believe that their concept is
wrong, since single frontend (SCSI port) can not handle several targets.

10 years agoDocument the -y option as a unit test option.
Marcel Moolenaar [Fri, 4 Jul 2014 18:47:25 +0000 (18:47 +0000)]
Document the -y option as a unit test option.
Add missing -v (and -y) to the usage message.

Requested by: eadler@

10 years agoAfter EFI support was added to the installer, it needed to allow boot
Nathan Whitehorn [Fri, 4 Jul 2014 15:55:32 +0000 (15:55 +0000)]
After EFI support was added to the installer, it needed to allow boot
partitions of types other than "freebsd-boot" (in particular, "efi").
This allows the removal of some nasty hacks for supporting PowerPC systems,
in particular aliasing freebsd-boot to apple-boot on APM and an IBM-specific
code on MBR.

This changes the installer to use the correct names, which also breaks a
degeneracy in the meaning of "freebsd-boot" that allows the addition
of support for some newer IBM systems that can boot from GPT in addition to
MBR. Since I have no idea how to detect which those systems are, leave
the default on IBM PPC systems as MBR for now.

10 years agoadd a hit that you can enable this by default if you want... necessary
John-Mark Gurney [Fri, 4 Jul 2014 14:49:40 +0000 (14:49 +0000)]
add a hit that you can enable this by default if you want...  necessary
if you want the keyboard break to work early in boot..

MFC after: 1 week

10 years agoBREAK_TO_DEBUGGER is not just serial console anymore, it controls all
John-Mark Gurney [Fri, 4 Jul 2014 14:32:15 +0000 (14:32 +0000)]
BREAK_TO_DEBUGGER is not just serial console anymore, it controls all
console's ability to enter the debugger....  rwatson forgot to document
this when he changed it back in 2011...  There is more docs to write
about this, but at least fix this for now...

Reviewed by: emaste
MFC after: 1 week

10 years agoAdopt to current and other changes:
Michael Reifenberger [Fri, 4 Jul 2014 09:29:43 +0000 (09:29 +0000)]
Adopt to current and other changes:
use dedicated kernel files with some local settings
use mkimg for ISO building
put images into separate directory and rename them for better consistency

10 years agolook: implement long options
Eitan Adler [Fri, 4 Jul 2014 04:47:29 +0000 (04:47 +0000)]
look: implement long options
gentoo has "util-linux 2.24.1" with long options.  Other distributions
have similar.

usage() is intentionally unchanged to keep it short and sweet

Reviewed by: jmg
Discussed with: adrian, jilles

10 years agoFix a typo.
Hiren Panchasara [Thu, 3 Jul 2014 23:12:43 +0000 (23:12 +0000)]
Fix a typo.

10 years agoAdd persistent reservation support to camcontrol(8).
Kenneth D. Merry [Thu, 3 Jul 2014 23:09:44 +0000 (23:09 +0000)]
Add persistent reservation support to camcontrol(8).

camcontrol(8) now supports a new 'persist' subcommand that allows users to
issue SCSI PERSISTENT RESERVE IN / OUT commands.

sbin/camcontrol/Makefile:
Add persist.c.

sbin/camcontrol/persist.c:
New persistent reservation support for camcontrol(8).

We have support for all known operation modes for PERSISTENT RESERVE
IN and PERSISTENT RESERVE OUT.
exceptions noted above.

sbin/camcontrol/camcontrol.8:
Document the new 'persist' subcommand.

In the section on the Transport ID (-I) option, explain what
Transport IDs for each protocol should look like.  At some point
some of this information could probably get moved off in a
separate man page, either on Transport IDs alone or a man page
documenting the Transport ID parsing code.

Add a number of examples of persistent reservation commands.
Persistent Reservations are complex enough that the average user
probably won't be able to get the commands exactly right by just
reading the man page.  These examples show a few basic and
advanced examples of how to use persistent reservations.

sbin/camcontrol/camcontrol.h:
Move the definition for camcontrol_optret here, so we can use it
for the persistent reservation code.

Add a definition for the new scsipersist() function.

sbin/camcontrol/camcontrol.c:
Add 'persist' to the list of subcommands.

Document 'persist' in the help text.

sys/cam/scsi/scsi_all.c:
Add the scsi_persistent_reserve_in() and
scsi_persistent_reserve_out() CCB building functions.

Add a new function, scsi_transportid_sbuf().  This takes a
SCSI Transport ID (documented in SPC-4), and prints it to
an sbuf(9).  There are some transports (like ATA, USB, and
SSA) for which there is no transport defined.  We need to
come up with a reasonable thing to do if we're presented
with a Transport ID that claims to be for one of those
protocols.

Add new routines scsi_get_nv() and scsi_nv_to_str().

These functions do a table lookup to go between a string and an
integer.  There are lots of table lookups needed in the
persistent reservation code in camcontrol(8).

Add a new function, scsi_parse_transportid(), along with leaf node
functions to parse:
FC, 1394 and SAS (scsi_parse_transportid_64bit())
iSCSI (scsi_parse_transportid_iscsi())
SPI (scsi_parse_transportid_spi())
RDMA (scsi_parse_transportid_rdma())
PCIe (scsi_parse_transportid_sop())

Transport IDs.  Given a string with the general form proto,id these
functions create a SCSI Transport ID structure.

sys/cam/scsi/scsi_all.h:
Update the various persistent reservation data structures to
SPC4r36l, but also rename some fields that were previously
obsolete with the proper names from older SCSI specs.  This
allows using older, obsolete persistent reservation types when
desired.

Add function prototypes for the new persistent reservation CCB
building functions.

Add a data strucure for the READ FULL STATUS service action
of the PERSISTENT RESERVE IN command.

Add Transport ID structures for all protocols described in SPC-4.

Add a new series of SCSI_PROTO_XXX definitions, and
redefine other defines in terms of these new definitions.

Add a prototype for scsi_transportid_sbuf().

Change a couple of "obsolete" persistent reservation data
structure fields into something more meaningful, based on
what the field was called when it was defined in the spec.
(e.g. SPC, SPC-2, etc.)

Create a new define, SPRI_MAX_LEN, for the maximum allocation
length allowed for the PERSISTENT RESERVE IN command.

Add data structures and enumerations for the new name/value
translation functions.

Add data structures for SCSI over PCIe Routing IDs.

Bring the PERSISTENT RESERVE OUT Register and Move parameter list
structure (struct scsi_per_res_out_parms) up to date with SPC-4.

Add a data structure for the transport IDs that can optionally be
appended to the basic PERSISTENT RESERVE OUT parameter list.

Move SCSI protocol macro definitions out of the VPD page 0x83
definition and combine them with the more up to date protocol
definitions higher in the file.

Add function prototypes for scsi_nv_to_str(), scsi_get_nv(),
scsi_parse_transportid_64bit(), scsi_parse_transportid_spi(),
scsi_parse_transportid_rdma(), scsi_parse_transportid_iscsi(),
scsi_parse_transportid_sop(), and scsi_parse_transportid().

Sponsored by: Spectra Logic Corporation
MFC after: 1 week

10 years agoAdd an option, -p, which makes gstat(8) to only display physical providers
Xin LI [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

10 years agoAdd VHD support to mkimg(1). VHD is used by Xen and Microsoft's Hyper-V
Marcel Moolenaar [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@

10 years agoProperly advertise that if_arge can handle long frames (if_arge is set to
Luiz Otavio O Souza [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)

10 years agoInitialize the switch vlan table at attachment.
Luiz Otavio O Souza [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)

10 years agoThe u-boot tarball needed for some boards, BEAGLEBONE for
Glen Barber [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

10 years agoMerge from OpenSolaris (30-Jun-2009):
Pedro F. Giffuni [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

10 years agoMerge from OpenSolaris (22-Apr-2008):
Pedro F. Giffuni [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

10 years agoDisplay efi framebuffer dimensions on boot
Ed Maste [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

10 years agoMerge from OpenSolaris (20-Apr-2008):
Pedro F. Giffuni [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

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

Reviewed by: wblock

10 years agoNote that most errors are possible for all syscalls from utimes(2)
Konstantin Belousov [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

10 years agoMicro-manage clang to get the expected inlining for cpu_search().
Konstantin Belousov [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

10 years ago- Disable hardware checksumming until it is properly tested.
Hans Petter Selasky [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

10 years agoFix a bug in hwpmc(4) callchain retrieval, for both user and kernel.
Justin Hibbits [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

10 years agoRework the BIO_DELETE code slightly. Always queue the BIO_DELETE
Warner Losh [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@

10 years agoUse separate memory type M_CTLIO for I/Os.
Alexander Motin [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.
Pedro F. Giffuni [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.
Peter 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
Bryan Venteicher [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.
Pedro F. Giffuni [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 Moolenaar [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 Panchasara [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
Warren Block [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 Moolenaar [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 Moolenaar [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 Panchasara [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 Moolenaar [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).
Alexander Motin [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.
Sergey Kandaurov [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
Ed Maste [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 Strobl [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)
Ed Maste [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
Ed Maste [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 Moolenaar [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
Nathan Whitehorn [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
Ed Maste [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 Moolenaar [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
Ed Maste [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 Rizzo [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
Hans Petter Selasky [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".
Hans Petter Selasky [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
Mateusz Guzik [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.
Eitan Adler [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