Commit Graph

242270 Commits

Author SHA1 Message Date
sevan
3a76206649 Tidy up minor nits raised by mandoc lint:
Zap trailing white and double spaces
Remove extra coma which is not required.
Bump date.

Reviewed by:	gnn
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D11142
2017-06-11 14:33:16 +00:00
cy
ececcb3d95 Flag loadpoolfile() (ippool -f) command line syntax errors. 2017-06-11 04:03:09 +00:00
cy
55eda8a54d Identify poolstats() (ippool -s) command line syntax errors. 2017-06-11 04:00:26 +00:00
cy
4ae75921d5 Identify command line syntax errors in poolflush() (ippool -F). 2017-06-11 03:56:13 +00:00
ian
580634b30b Convert from local code and constants for mac<->phy connection type to new
common fdt helper code.
2017-06-11 00:44:19 +00:00
ian
23bb804c65 Add a driver for the Vitesse/Microsemi VSC8501 PHY. 2017-06-11 00:38:16 +00:00
ian
05a8f3d3f3 Add some utility functions to help a PHY driver on an FDT-configured
system retrieve its config data from the fdt data.

The properties that are common to all phys are decoded and returned in a
structure.  The fdt node handles for the mac and phy devices are also
returned in the config data struct, so a driver can easily obtain additional
hardware-specific config values from the fdt data.
2017-06-11 00:16:21 +00:00
ian
02de41164f Add a set of constants describing the ways a MAC and PHY can be connected.
While the initial need for this is to help support phy drivers which are
configured with FDT data, there is nothing devicetree-specific about the
concept or the names, so they are available for use even on non-FDT systems.

The initial list of connection types comes from the current devicetree
bindings documentation, but values not documented there can be added to
the list in the future as needed, the values could be sorted into a
different order without perturbing FDT code, etc.  The only invariant
is that MII_CONTYPE_UNKNOWN should be first (so it has a value of zero,
so that a con-type variable in a softc, for example, is initialized to
MII_CONTYPE_UNKNOWN by default).
2017-06-10 23:55:13 +00:00
ian
108469a362 Allow building if_ffec as a module. 2017-06-10 23:45:26 +00:00
ian
c230c4cb0e if_ffec bugfixes related to harvesting of hardware-maintained statistics...
After harvesting the hardware statistics counters and summing them into the
interface stats, properly clear the hardware counters back to zero.  On imx5
and earlier hardware it is necessary to disable collection of stats while
writing zeroes to all the registers.  On imx6 and newer it turns out it's
not even possible to write zeroes, instead you have to toggle a special
"zero everything" control bit in a register.

Count incoming packets with a bad start frame delim as input errors, and
incoming packets dropped due to no fifo space as input drops.

Remove all code related to harvesting the hardware stats less often than
once per second.  It turns out the 32-bit stats registers are backed by
16-bit counters under the hood, and they can easily roll over if you only
harvest them once every 3 seconds like the old code was doing.  Now we just
read all the regs once a second.

The combination of not properly zeroing the stats registers and 16-bit
counters sometimes wrapping between harvest calls resulted in basically
unusable statistics before these changes.
2017-06-10 23:26:25 +00:00
cy
033b1901a2 Remove redundant assignment of infile from optarg in loadpoolfile()
which was previously assigned from optarg in the argument list from
main().
2017-06-10 23:16:00 +00:00
markj
8630ed19ce List DTrace provider pages in a single variable.
MFC after:	1 week
2017-06-10 21:13:39 +00:00
markj
1e0888f2dc Remove an inaccuracy from socket.2.
SOCK_SEQPACKET is implemented for several protocols.

MFC after:	1 week
2017-06-10 21:07:55 +00:00
ngie
7142f707da Improve handling with system state
- Always unlink $cmd after exit via END block.
- The tests don't function well if kern.geom.debugflags != 0. Save debugflags,
  then restore them at the end of the test.

MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2017-06-10 20:56:31 +00:00
gnn
e31cf040a9 Update the variables as well. 2017-06-10 20:50:50 +00:00
gnn
93d2ad9d05 Update Makefile to contain the new DTrace lockstat manual page. 2017-06-10 20:47:37 +00:00
gnn
2321581009 Manual page for the DTrace lockstat provider
Reviewed by:	markj
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D11128
2017-06-10 20:41:53 +00:00
avg
504a6533d2 fstat: catch up with r318997 and use 64 bits to store fsid
Discussed with:	kib
2017-06-10 20:38:52 +00:00
ngie
7c9b4b7560 Don't explicitly get the class to PART in gctl_test_helper.c
This will allow the tool to be used with arbitrary geom(4) classes, like GEOM.

Specify class=PART explicitly in the tester to keep existing behavior.

MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2017-06-10 19:48:45 +00:00
trasz
02c4106af3 Switch the example name for variables controlling loading memory images
in /boot/defaults/loader.conf to something that's actually commonly used,
"mdroot".  It's arbitrary, but it's easier to find this way.

MFC after:	2 weeks
2017-06-10 19:05:45 +00:00
erj
a8ff4bf5b6 ixl(4)/ixlv(4): Fix some busdma tags and improper map NULL.
Description from Brett:

"The busdma tags used to create mappings for the tx and rx rings did not have
the device's tag as parents, meaning that they did not respect the device's
busdma properties. The other tags used in the driver had their parents set
appropriately.

Also, the dma maps for each buffer in ixl_txeof() were being NULLed after
being unloaded, which is an error because those maps are then reused without
being recreated (I believe this also leaked resources since the maps were not
destroyed). Simply removing the line that sets the maps to NULL gives the
desired behavior. There does not seem to be a similar problem with ixl_rxeof().
Functions to free the tx and rx rings also NULL out the dma maps for each
buffer, but this seems okay because the maps are destroyed and not reused in
this case.

With these fixes, my ixl card seems to be working with the IOMMU enabled."

Submitted by:	Brett Gutstein <bgutstein@rice.edu>
Reviewed by:	erj
Approved by:	Alan Cox <alc@rice.edu>
MFC after:	1 week
2017-06-10 18:56:30 +00:00
dim
3432f44f15 Remove a few unneeded files from libllvm, libclang and liblldb.
MFC after:	3 days
2017-06-10 18:52:13 +00:00
cy
cbb4362af9 Disable the -O (output fields) option in poollist() (ippool -l) for
now. The option does not presently work. However, similar functions in
ipfstat (for state) and ipnat (for nat) do work and provide outputs that
can be easily parsed by shell scripts or subsequently loaded into CSV
files.  The intention here is to return to this option to make it work.
I suspect the problem is in printpoolfields.c.
2017-06-10 17:05:14 +00:00
cy
d2e66d41a3 Flag poollist() (ippool -l) command line syntax errors. 2017-06-10 16:42:39 +00:00
alc
96ecc27926 Remove an unnecessary field from struct blist. (The comment describing
what this field represented was also inaccurate.)  Suggested by: kib

In r178792, blist_create() grew a malloc flag, allowing M_NOWAIT to be
specified.  However, blist_create() was not modified to handle the
possibility that a malloc() call failed.  Address this omission.

Increase the width of the local variable "radix" to 64 bits.  (This
matches the width of the corresponding field in struct blist.)

Reviewed by:	kib
MFC after:	6 weeks
2017-06-10 16:11:39 +00:00
markj
435f967468 Override the locale so that file lists get a consistent sort order.
Reported by:	avg
MFC after:	1 week
2017-06-10 14:47:01 +00:00
trasz
5062b8b981 Remove mentions of recently removed /usr/share/doc/ subdirectories
from hier(7).
2017-06-10 08:25:46 +00:00
trasz
fa47fc72e3 /usr/share/doc/bind is gone since 20040925.
MFC after:	2 weeks
2017-06-10 08:08:14 +00:00
trasz
5ea92fb04c Improve formatting by removing yet another case of '-width ".Pa'.
MFC after:	2 weeks
2017-06-10 08:01:05 +00:00
trasz
eaab7d32f1 Remove /usr/include/readline/ from hier(7); it's long gone. 2017-06-10 07:47:21 +00:00
trasz
1572be7653 Remove groff(1) leftovers from hier(7). 2017-06-10 07:43:24 +00:00
avg
1d9822a04f follow up to r319746: add the new test files to the make file
Reported by:	markj
MFC after:	2 days
X-MFC with:	r319746
2017-06-10 06:13:52 +00:00
jhb
ce50dd4b55 Decode arguments to rtprio() and rtprio_thread(). 2017-06-10 01:32:35 +00:00
jhb
82bb926c65 Decode arguments to rtprio_thread() (same as rtprio()). 2017-06-10 01:32:18 +00:00
jhb
db8f3a8a56 Decode the 'howto' argument to reboot(). 2017-06-10 01:22:40 +00:00
jhb
57cd391d21 Improve decoding of RB_AUTOBOOT in the 'howto' argument to reboot().
The reboot() system call accepts a mode (RB_AUTOBOOT, RB_HALT, RB_POWEROFF,
or RB_REROOT) as well as zero or more optional flags in 'howto'.
However, RB_AUTOBOOT was only displayed if 'howto' was exactly 0.
Combinations like 'RB_AUTOBOOT | RB_DUMP' were decoded as 'RB_DUMP'.
Instead, imply that RB_AUTOBOOT was specified if none of the other "mode"
flags were specified.
2017-06-10 01:20:08 +00:00
jhb
ee40b0c42b Decode the arguments to quotactl(). 2017-06-10 00:53:00 +00:00
jhb
63413c4a12 Decode the arguments to ptrace().
This does not decode structures returned by ptrace().
2017-06-10 00:45:07 +00:00
jhb
f2050b8244 Decode arguments to getpriority() and setpriority(). 2017-06-10 00:37:02 +00:00
jhb
ac38c7be96 Fix decoding of setpriority() arguments.
The PRIO_* 'which' value is stored in the first argument to setpriority(2),
not the last.  While here, decode the arguments to getpriority(2).
2017-06-10 00:35:45 +00:00
loos
0241533b04 Remove an unnecessary variable from the switch softc structure and make the
functions that are used as booleans return real boolean values.

Sponsored by:	Rubicon Communications, LLC (Netgate)
2017-06-09 20:38:18 +00:00
jhibbits
11138abae1 Follow up r313841 on powerpc
Close a potential race in reading the CPU dtrace flags, where a thread can
start on one CPU, and partway through retrieving the flags be swapped out,
while another thread traps and sets the CPU_DTRACE_NOFAULT.  This could
cause the first thread to return without handling the fault.

Discussed with:	markj@
2017-06-09 20:26:42 +00:00
markj
e10054b3aa Implement pci_disable_device() in the LinuxKPI.
Submitted by:	kmacy
MFC after:	2 weeks
2017-06-09 19:57:27 +00:00
markj
d2500bbf92 Augment wait queue support in the LinuxKPI.
In particular:
- Don't evaluate event conditions with a sleepqueue lock held, since such
  code may attempt to acquire arbitrary locks.
- Fix the return value for wait_event_interruptible() in the case that the
  wait is interrupted by a signal.
- Implement wait_on_bit_timeout() and wait_on_atomic_t().
- Implement some functions used to test for pending signals.
- Implement a number of wait_event_*() variants and unify the existing
  implementations.
- Unify the mechanism used by wait_event_*() and schedule() to put the
  calling thread to sleep.

This is required to support updated DRM drivers. Thanks to hselasky for
finding and fixing a number of bugs in the original revision.

Reviewed by:	hselasky
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D10986
2017-06-09 19:41:12 +00:00
alc
33ce3020df Style and comment fixes only.
Reviewed by:	kib
MFC after:	6 weeks
2017-06-09 17:19:27 +00:00
alc
ca8432638e blist_fill()'s return type is too narrow. blist_fill() accepts a 64-bit
quantity as the size of the range to fill, but returns a 32-bit quantity
as the number of blocks that were allocated to fill that range.  This
revision corrects that mismatch.  Currently, swaponsomething() limits
the size of a swap area to prevent arithmetic arithmetic overflow in
other parts of the blist allocator.  That limit has also prevented this
type mismatch from causing problems.

Reviewed by:	kib, markj
MFC after:	6 weeks
Differential Revision:	https://reviews.freebsd.org/D11096
2017-06-09 16:19:24 +00:00
glebius
b8cd5af05d Fix stat(2) on a listening socket. 2017-06-09 15:54:48 +00:00
andrew
4fce328cae Allow the arm64 machine/vfp.h to be included without first including
machine/pcb.h. It he latter is only needed for struct pcb.
2017-06-09 15:47:14 +00:00
andrew
7f9edbc607 Store the read-only thread pointer when scheduling a new thread. This is
not currently set, however we may wish to set it later.
2017-06-09 15:37:17 +00:00
avg
4ac11ff78d MFV r319740: 8168 NULL pointer dereference in zfs_create()
illumos/illumos-gate@690031d326
690031d326

https://www.illumos.org/issues/8168
  If we manage to export the pool on which we are creating a dataset (filesystem
  or zvol) between entering libzfs`zfs_create() and libzfs`zpool_open() call (for
  which we never check the return value) we end up dereferencing a NULL pointer
  in libzfs`zpool_close().
  This was discovered on ZFS on Linux. The same issue can be reproduced on
  Illumos running in parallel:
    while :; do zpool import -d /tmp testpool ; zpool export testpool ; done
    while :; do zfs create testpool/fs; zfs destroy testpool/fs ; done
  Eventually this will result in several core dumps like this one:
  [root@52-54-00-d3-7a-01 /cores]# mdb core.zfs.4244
  Loading modules: [ libumem.so.1 libc.so.1 libtopo.so.1 libavl.so.1
  libnvpair.so.1 ld.so.1 ]
  > ::stack
  libzfs.so.1`zpool_close+0x17(0, 0, 0, 8047450)
  libzfs.so.1`zfs_create+0x1bb(8090548, 8047e6f, 1, 808cba8)
  zfs_do_create+0x545(2, 8047d74, 80778a0, 801, 0, 3)
  main+0x22c(8047d2c, fef5c6e8, 8047d64, 8055a17, 3, 8047d70)
  _start+0x83(3, 8047e64, 8047e68, 8047e6f, 0, 8047e7b)
  >
  Fix and reproducer (systemtap): https://github.com/zfsonlinux/zfs/pull/6096

Reviewed by: Matt Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: loli10K <ezomori.nozomu@gmail.com>
MFC after:	2 weeks
2017-06-09 15:30:41 +00:00