Commit Graph

213782 Commits

Author SHA1 Message Date
George V. Neville-Neil
15dbc1605b On FreeBSD there is a setsockopt option SO_USER_COOKIE which allows
setting a 32 bit value on each socket. This can be used by applications
and DTrace as a rendezvous point so that an applicaton's data can
more easily be captured at run time. Expose the user cookie via
DTrace by updating the translator in tcp.d and add a quick test
program, a TCP server, that sets the cookie on each connection
accepted.

Reviewed by:	hiren
MFC after:	1 week
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D7152
2016-07-08 23:44:09 +00:00
Baptiste Daroussin
aa0bf3d606 Sync usage between program and man page. Increase column width. [1]
Simplifay the usage() function
Replace errx/strerror with errc

Submitted by:	wiz@NetBSD.org [1]
Obtained from:	NetBSD
2016-07-08 23:40:25 +00:00
Emmanuel Vadot
356c50adff Add support for Allwinner A13.
Reviewed by:	jmcneill
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D6809
2016-07-08 23:38:25 +00:00
Baptiste Daroussin
c60ba08a6b Add RCS Id. Sort options in SYNOPSIS. Fix macro usage. Fix Dd.
Submitted by:	wiz@NetBSD.org
Obtained from:	NetBSD
2016-07-08 23:10:55 +00:00
Emmanuel Vadot
f8f34e91da Check that the pin function exists before setting it.
This is needed for Allwinner A13 which has gpio pins with only "out" function.
2016-07-08 23:08:59 +00:00
Baptiste Daroussin
94185be27c Allow to install various components of the locales independantly 2016-07-08 23:07:48 +00:00
Adrian Chadd
e6df5ff544 [ath_hal] add in locationing timer support and capabilities.
* add support to read the timer and capability
* add support to enable/disable the location timer.

On AR9380 at least, enabling the location timer is required to make
the timer tick, otherwise location packets return a timestamp of 0.
However, it then makes /all/ RX packets use the RX location timestamp
instead of the TSF timestamp.

So, unless I find another magical way to do location timestamping,
we will have to dynamically switch things on/off and ensure the
TX/RX path handles the "different" timestamps correctly.

Tested:

* AR9380, STA mode
2016-07-08 22:59:15 +00:00
Adrian Chadd
b10add4ea4 [ath_hal] add locationing / tx-beamforming RX status descriptor decoding.
* LOC_INFO is mostly just "did this packet come with a locationing
  timestamp instead of TSF";
* Decode not-sounding, uploaded-data, data-valid, data type and
  number of extension spatial streams.
2016-07-08 22:39:37 +00:00
Adrian Chadd
ada3f60304 [ath_hal] Add setting positioning bit and clear sounding-disable bit.
* If fast_ts is set then the TX timestamp is the fast timestamp, not
  normal TSF.
* If the TX descriptor has the position bit set then request locationing
  and clear sounding-disable.  This way we (a) get the response with
  the TX timestamp from the location side of things, and (b) we get
  a CSI dump of the response ACK, which we will eventually use in the
  locationing path.
2016-07-08 22:37:52 +00:00
Oleksandr Tymoshenko
3fd8559331 Remove extra 0x before %p format strings introduced by r296182 2016-07-08 22:32:03 +00:00
Adrian Chadd
aaf8b608ca [ath] add a new buf flag, marking a buffer as involved with ToA/ToD positioning. 2016-07-08 22:20:35 +00:00
Adrian Chadd
23c4e11be6 [ath_hal] add capability bit for querying/controlling the ToA/ToD positioning code. 2016-07-08 21:37:04 +00:00
Adrian Chadd
5f01bf5405 [ath] include ath_hal accessor macro changes.
I missed this in the previous commit.
2016-07-08 21:35:44 +00:00
Adrian Chadd
515582436a [ath_hal] retire a "long RX desc" flag, store/use the TX/RX timestamp length.
* the code already stored the length of the RX desc, which I never used.
  So, use that and retire the new flag I introduced a while ago.
* Introduce a TX timestamp length field and capability.
2016-07-08 21:34:39 +00:00
Alexander Motin
3dd7961093 Add emulation for multiple (up to 16) MSI vectors for AHCI.
It was useless before, but may improve performance now if multiple devices
are configured and guest supports this feature.

Sponsored by:	iXsystems, Inc.
2016-07-08 21:30:18 +00:00
Alexander Motin
098f5155d1 Allow AHCI controller to support up to 32 arbitrary devices.
While old syntax is still supported, new syntax looks like this:

-s 3,ahci,hd:/dev/zvol/XXX,hd:/dev/zvol/YYY,cd:/storage/ZZZ.iso

Sponsored by:	iXsystems, Inc.
2016-07-08 21:25:37 +00:00
Ed Maste
dcc88911a9 libunwind: enable only the native unwinder by default
This significantly reduces stack space requirements, and runtimes
require only native unwinding.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2016-07-08 21:17:24 +00:00
Poul-Henning Kamp
9d2111d16b Add missing PORTS_OPTS to two make commands 2016-07-08 20:33:20 +00:00
Ed Maste
1de4a1a95b libunwind: update to upstream snapshot r272680
The key improvement is that it may be built without cross-unwinding
support, which significantly reduces the stack space requirement.

MFC after:	1 week
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D7123
2016-07-08 20:20:46 +00:00
Bryan Drewery
6af16d65de Use TARGET here to fix check/delete-old after r302391.
usr.bin/Makefie.arm is used to install ofwdump so TARGET=arm should cover
all of the cases.

MFC after:	now
Sponsored by:	EMC / Isilon Storage Division
2016-07-08 20:15:58 +00:00
Ed Schouten
d96aeddf2f Don't forget to set sa->narg for CloudABI system calls.
It turns out that this value is not used within the system call code
under normal conditions, except when using tracing tools like ktrace.
If we forget to set this value, it is set to random garbage. This may
cause ktrace to hang indefinitely, making it impossible to kill.

Reported by: Michael Plass
PR: 210800
MFC before: 11.0-RELEASE
2016-07-08 20:09:21 +00:00
Adrian Chadd
155a72b58a [ath_hal] extend the TX/RX descriptor layout to include location/beamforming fields.
* extend the TX timestamp to 32 bits, as the AR5416 and later does a full
  32 bit TX timestamp instead of 15 or 16 bits.
* add RX descriptor fields for PHY uploaded information (coming soon)
* add flags for RX/TX fast timestamp, hardware upload, etc
* add a flag for TX to request ToD/ToA location information.
2016-07-08 19:16:50 +00:00
Navdeep Parhar
a33b046750 cxgbe(4): Add sysctl to display the RSS indirection table size for an
interface.

dev.cxl.<n>.rss_size
dev.vcxl.<n>.rss_size

MFC after:	3 days
2016-07-08 18:13:23 +00:00
Conrad Meyer
91d546a05d iflib: Fix typo in 'iflib_rx_miss_bufs' sysctl name
It looks like these sysctls were copy-pasted from netmap.  Most were changed
from 'ixl_' prefix to 'iflib_', but this one was missed.

Fix the "can't re-use a leaf (ixl_rx_miss_bufs)!" warning.

Reported by:	dim@ and others
Sponsored by:	EMC / Isilon Storage Division
2016-07-08 17:04:21 +00:00
Enji Cooper
88f0575156 Revert r302403
lang/gcc{48,49,5} lacks -fformat-extensions support (causing build errors, which
is what prompted r302403 to be committed). devel/amd64-gcc on the other hand
(which is used by Jenkins), has the support.

This fixes the Jenkins failure emails due to excessive warnings being produced
with "make buildkernel".

Discussed with: lwhsu
Reported by: Jenkins (FreeBSD_HEAD_amd64_gcc job)
Sponsored by: EMC / Isilon Storage Division
2016-07-08 16:29:45 +00:00
Steven Kreuzer
a9d365dbb6 Document 300291, Enable NEW_PCIB on arm64.
Approved by:	re (gjb, implicit, relnotes)
2016-07-08 13:29:47 +00:00
Steven Kreuzer
73a6793215 Document 301973, Add bsdconfig wifi' (aka wireless' or `wlan') module
Approved by:	re (gjb, implicit, relnotes)
2016-07-08 13:26:17 +00:00
Steven Kreuzer
cb5423b0e1 Document 300436, bsdinstall/zfsboot GPT+BIOS+GELI installs make use of GELIBOOT
Approved by:	re (gjb, implicit, relnotes)
2016-07-08 13:21:51 +00:00
Steven Kreuzer
7a654ff7f4 Document 293190, Update less to v481
Approved by:	re (gjb, implicit, relnotes)
2016-07-08 13:12:24 +00:00
Steven Kreuzer
86f2840521 Document 289549, Update hostapd/wpa_supplicant to version 2.5.
Approved by:	re (gjb, implicit, relnotes)
2016-07-08 13:09:55 +00:00
Steven Kreuzer
7692e5dd04 Document 302110, Merge netmap support from ncxgbe/ncxl to vcxgbe/vcxl
Approved by:	re (gjb, implicit, relnotes)
2016-07-08 13:08:26 +00:00
Glen Barber
981b538fd6 Spell '12.x' correctly in UPDATING.
Submitted by:	lidl
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2016-07-08 02:19:09 +00:00
Glen Barber
ddfcae6a67 Spell 10.2, 10.3, 12.0 correctly in various places.
Submitted by:	markj
Approved by:	re (implicit)
Pointyhat:	gjb (myself)
Sponsored by:	The FreeBSD Foundation
2016-07-08 02:03:42 +00:00
Glen Barber
aa5755d30d Add freebsd12 to contrib/gcc/config.gcc.
Submitted by:	bdrewery
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2016-07-08 01:56:52 +00:00
Glen Barber
a33ae599bb Bump FREEBSD_CC_VERSION in lib/clang/freebsd_cc_version.h
Submitted by:	bdrewery
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2016-07-08 01:47:01 +00:00
Glen Barber
9493d165a2 Default manual pages to 12.0 in head, and add missing 10.x
releases.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2016-07-08 00:54:21 +00:00
Glen Barber
bad7300b1e Spell 1200000 correctly.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2016-07-08 00:52:53 +00:00
Glen Barber
ae940db11f Reflect head is now 12.0-CURRENT.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2016-07-08 00:12:29 +00:00
Enji Cooper
d6b483b209 Do not use -fformat-extensions with non-base versions of gcc
Ports versions of gcc do not have -fformat-extensions support.

This unbreaks compiling the kernel/modules with non-base gcc (4.8,
5.0, etc) if MK_FORMAT_EXTENSIONS=yes (the default).

Approved by: re (gjb)
Differential Revision: https://reviews.freebsd.org/D7150
Reviewed by: bdrewery
Sponsored by: EMC / Isilon Storage Division
2016-07-07 22:44:23 +00:00
Alexander Motin
feae851874 Fix ahci(4) driver attach to controller with 32 ports.
Incorrect sign expansion in variables that supposed to be a bit fields
caused infinite loop.  Fixing this allows system properly detect maximal
possible 32 devices configured on AHCI HBA of BHyVe.  That case did not
happen in a wild before due to lack of hardware AHCI HBAs with 32 ports.

Approved by:	re (gjb@)
MFC after:	1 week
2016-07-07 22:10:10 +00:00
Jilles Tjoelker
2740b654c6 fcntl(2): Document interrupt/restart for file locks.
Since r302216, thread suspension causes advisory file locks to restart
(instead of continuing to wait) and for a long time SA_RESTART has
affected advisory file locks. These are both not compliant to POSIX.1.

To clarify that restarting means something, add a paragraph about fair
queuing. Note that the network lock manager does not implement fair
queuing.

Reviewed by:	kib (previous version)
Approved by:	re (gjb)
2016-07-07 21:44:59 +00:00
Bryan Drewery
a356b78462 WITH_SYSTEM_COMPILER: Don't enable for xdev or native-xtools.
Otherwise they get no compiler.

Reported by:	swills
Tested by:	swills
Approved by:	re (gjb)
Sponsored by:	EMC / Isilon Storage Division
2016-07-07 21:03:50 +00:00
Alan Cox
381b724280 Change the type of the map entry's next_read field from a vm_pindex_t to a
vm_offset_t.  (This field is used to detect sequential access to the virtual
address range represented by the map entry.)  There are three reasons to
make this change.  First, a vm_offset_t is smaller on 32-bit architectures.
Consequently, a struct vm_map_entry is now smaller on 32-bit architectures.
Second, a vm_offset_t can be written atomically, whereas it may not be
possible to write a vm_pindex_t atomically on a 32-bit architecture.  Third,
using a vm_pindex_t makes the next_read field dependent on which object in
the shadow chain is being read from.

Replace an "XXX" comment.

Reviewed by:	kib
Approved by:	re (gjb)
Sponsored by:	EMC / Isilon Storage Division
2016-07-07 20:58:16 +00:00
Ed Maste
932d4e19e6 lorder: produce locale-independent symbol ordering
Found by the Debian reproducible builds effort -- Debian bug 830259.

Reported by:	Reiner Herrmann <reiner@reiner-h.de>
Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
2016-07-07 20:50:59 +00:00
Warner Losh
035ec48e55 Tidy up loose ends from Netflix I/O sched rename to dynamic I/O sched.
Rename kern.cam.do_netflix_iosched sysctl to
kern.cam.do_dynamic_iosched.

Approved by: re (kib@)
2016-07-07 20:31:35 +00:00
Luiz Otavio O Souza
cde7231a7f Fix a lockup in tx path for cspw.
Sometimes the software loses the race when appending more descriptors to
the tx ring and the tx queue stops.

This commit detects this condition and restart the tx queue whenever it stall.

Tested by:	sobomax@, Keith White <kwhite@site.uottawa.ca>,
	Paul Mather <paul@gromit.dlib.vt.edu>
Sponsored by:	Rubicon Communications (Netgate)
Approved by:	re (kib)
2016-07-07 20:01:03 +00:00
Colin Percival
34caa842a4 Autotune the number of pages set aside for UMA startup based on the number
of CPUs present.  On amd64 this unbreaks the boot for systems with 92 or
more CPUs; the limit will vary on other systems depending on the size of
their uma_zone and uma_cache structures.

The major consumer of pages during UMA startup is the 19 zone structures
which are set up before UMA has bootstrapped itself sufficiently to use
the rest of the available memory:  UMA Slabs, UMA Hash, 4 / 6 / 8 / 12 /
16 / 32 / 64 / 128 / 256 Bucket, vmem btag, VM OBJECT, RADIX NODE, MAP,
KMAP ENTRY, MAP ENTRY, VMSPACE, and fakepg.  If the zone structures occupy
more than one page, they will not share pages and the number of pages
currently needed for startup is 19 * pages_per_zone + N, where N is the
number of pages used for allocating other structures; on amd64 N = 3 at
present (2 pages are allocated for UMA Kegs, and one page for UMA Hash).

This patch adds a new definition UMA_BOOT_PAGES_ZONES, currently set to 32,
and if a zone structure does not fit into a single page sets boot_pages to
UMA_BOOT_PAGES_ZONES * pages_per_zone instead of UMA_BOOT_PAGES (which
remains at 64).  Consequently this patch has no effect on systems where the
zone structure fits into 2 or fewer pages (on amd64, 59 or fewer CPUs), but
increases boot_pages sufficiently on systems where the large number of CPUs
makes this structure larger.  It seems safe to assume that systems with 60+
CPUs can afford to set aside an additional 128kB of memory per 32 CPUs.

The vm.boot_pages tunable continues to override this computation, but is
unlikely to be necessary in the future.

Tested on:	EC2 x1.32xlarge
Relnotes:	FreeBSD can now boot on 92+ CPU systems without requiring
		vm.boot_pages to be manually adjusted.
Reviewed by:	jeff, alc, adrian
Approved by:	re (kib)
2016-07-07 18:37:12 +00:00
Adrian Chadd
a7038bd16b [ath] obey the short-GI vap config flag when transmitting.
This makes 'ifconfig wlanX -shortgi' work correctly.

Tested:

* AR9380, STA mode

Approved by:	re (gjb)
2016-07-07 17:22:13 +00:00
Andrew Turner
b3ee9ce691 Stop deleting ofwdump.8.gz on arm and arm64 when running make delete-old,
it is installed on these architectures.

Approved by:	re (kib)
Sponsored by:	ABT Systems Ltd
2016-07-07 15:25:14 +00:00
Steven Kreuzer
61639dda74 Document 299786, Support for X-Powers AXP813 and AXP818 PMIC
Approved by:	re (gjb, implicit, relnotes)
2016-07-07 14:29:23 +00:00