Commit Graph

218969 Commits

Author SHA1 Message Date
Alan Somers
4c9f98e28a Quell Coverity for diskinfo(8)
* CID 1198994: Don't run the speed disk on a disk with no sectors
* CID 1011442: Don't call close(2) if open(2) fails
* CID 1011161: Use snprintf instead of sprintf
* CID 1009825: Check the return value of lseek

Reported by:	Coverity
CID:		1198994 1011442 1011161 1009825
MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
2017-01-04 00:39:06 +00:00
Andriy Voskoboinyk
0642856a1e rtwn: fix possible buffer overrun.
r297596 was not merged properly into new code; restore lost part.
2017-01-04 00:26:41 +00:00
Mark Johnston
33ce6ec1d9 Add some missing atomic_*_ptr #defines for arm.
MFC after:	1 week
2017-01-04 00:18:51 +00:00
Mateusz Guzik
5e5ad162ad Reduce lock accesses in thread lock similarly to r311172. 2017-01-03 23:08:11 +00:00
Enji Cooper
30dcd18b90 Swap parameters around with parse_syntax_strval(..) for consistency with
other parse_* APIs in bsnmp*

MFC after:	3 days
Noted by:	bz
2017-01-03 22:33:07 +00:00
Enji Cooper
71aa1443ea Make /usr/lib/libbsnmptools.so.0 into an INTERRNALLIB
Although it increases the size of the bsnmp{get,set,walk} binaries by
four on my [amd64] system, it removes the need for producing .debug
files, profiled libraries, and for installing the library itself,
reducing the overall size use on disk by the utilities noted
previously.

Plus, it guards against ABI/API compatibility issues with the library
as it's only used internal to the tools themselves.

MFC after:	3 weeks
2017-01-03 22:31:05 +00:00
Navdeep Parhar
c88fa71928 cxgbe(4): Update T4, T5 and T6 firmwares to 1.16.26.0. Changelog for
all public firmwares for all chips since the last release (1.15.37.0)
follows (it's a straight copy-paste from the Release Notes for the
12/30/2016 Unified Wire release on Chelsio's website).

T6 Firmware
++++++++++++

Version : 1.16.26.0
Date    : 12/28/2016

Fixes
-----

BASE:
- Max number of egress and control queues adjusted to accomodate
  co-processor mode queues.
- Fixed intermittent DDR3/4 ECC errors.
- Fixed a traffic stall when ETS BW is configured as 0%.
- Max number of ethctrl queue in VF set to 1.

ETH:
- Added a new config file option 'speed' under port section to set the
  port speed.  Use only when auto negotiation is off.
- FEC option removed from firmware config file. cxgbtool can be used to
  change the fec setting.
- CPL_TX_TNL_LSO cpl handling added in ETH_TX_PKT_VM handler. This fixes
  large tunnel tcp packet support for VxLAN.

Version : 1.16.22.0
Date    : 12/05/2016

Fixes
-----

BASE:
- fw_port_type updated in fw API to match kernel.org definitions.
- Saved power by disaling unused MAC lanes.
- Configures correct power bin.
- Enhanced DDR4 performance.
- Enabled interrupts.
- Fixed an issue where filter rule for 'unicast hash' is not working.

ETH:
- Disabled auto negotiation by default because most of 100G switches do
  not support AN as of today.
- Fixed flow control not getting disabled problem.
- Fixed an issue where port0 doesn't come up sometimes.
- Fixed 10G link not coming up issue.
- Fixed an issue with promiscuous mode when dcbx disabled.

OFLD:
- Fixed a connection stuck issue when abort is received during out of tx
  pages backpressure.

ENHANCEMENTS
------------

BASE:
- Added inline TLS mode support.

Version : 1.16.12.0
Date    : 11/11/2016

ENHANCEMENTS
------------

BASE:
- Added T6 support.
- Added T6 1G/10G/25G/40G/100G link speeds.
- Added T6 co-processor mode crypto support.
- Added facility to increase link AN+AEC timeout.

OFLD:
- Added support for all T5 offload protocols except FCoE.

iSCSI:
- iscsi completion moderation enabled.

=======================================================================

T5 Firmware
++++++++++++

Version : 1.16.26.0
Date    : 12/28/2016

FIXES
-----

BASE:
- Max number of ethctrl queue in VF set to 1.

Version : 1.16.22.0
Date    : 12/05/2016

FIXES
-----

BASE:
- Fixed an issue where filter rule for 'unicast hash' is not working.

ETH:
- Fixed an issue with promiscuous mode when dcbx disabled.

ENHANCEMENTS
------------

ETH:
- Added 40G-KR support.

Version : 1.16.12.0
Date    : 11/11/2016

FIXES
-----

BASE:
- Fixed multiple issues related with VFs FLR processing.
- Fixed channel assignment based on number of ports in adapter.
- Fixed a crash when VM having PF assigned as passthrough mode is
  rebooted.
- Handled 2nd HELLO command from the same PF without seeing BYE from the
  same PF and if that is the only PF.
- A warning is printed in firmware log if PCI-E cookie generation is
  enabled in serial initialization file.
- Fixed multiple issues related with Filtering.
- Enabled DSGL memory write for iscsi and rdma.
- Added new FW_PARAMS_CMD[DEV] options to retrieve Serial Configuration
  and VPD version numbers.
- Fixed an issue where LVDS output was not getting enabled using vpd.

DCBX:
- Fixed DCBX CEE Incorrect class to pririty mapping.
- Fixed incorrect interpretation of DCBX IEEE PFC.

ETH:
- Adjusted the link related delay timings according to the QSFP spec.
- Improved 40G link bringup time with few switches.

OFLD:
- Do not reserve qp/cq if rdma capability is not enabled.
- Fixed an issue where approx 1600+ TOE connections were causing a
  firmware fatal error.

FOiSCSI:
- Fixed an issue where unloading foiscsi driver causes mailbox timeout.

ENHANCEMENTS
------------

BASE:
- Added 10G KR/KX support.
- Added T540-BT adapter support.
- Added 4 new rss key modes for PFs and VFs.

OFLD:
- Added new WR FW_RI_FR_NSMR_TPTE_WR to improve fast MR write
  performance in RDMA.

Version : 1.16.5.0
Date    : 10/26/2016

FIXES
-----

BASE:
- Fixed multiple issues where FLR from multiple VFs can cause firmware
  crash.
- Fixed channel assignment based on number of ports in adapter.
- Fixed the HELLO command master force api to handle the 2nd HELLO
  correctly without getting BYE from the PF driver.
- Added facility to retrieve Serial configuration and VPD version. Two
  new FW_PARAMS_CMD[DEV] options added to retrieve these values.
- Fixed multiple issues where FLR from multiple VFs are not completing.
- Added new RSS hash secret key modes.
- Fixed an issue where LVDS output was not getting enabled using vpd.

DCBX:
- Fixed an issue where iscsi tlv is sent incorrectly to host (DCBX CEE).
- Fixed an issue where app priority values are not handled correctly
  in fw (DCBX IEEE).

ETH:
- Adjusts the link related delay timings according to the QSFP spec.
- Changed 2.5G mac speed bit to 25G mac speed bit in fw API.
- Improvement in 40G link bringup time with few switches.

OFLD:
- Do not reserve qp/cq if rdma capability is not enabled.
- Fixed an issue where approx 1600+ TOE connections were causing a
  firmware fatal error.
- Fixed DSGL memory write in T5. Now iwarp and iscsi can use DSGL to do
  memory write.
- Fixed multiple issues in hash filter mode where incorrect protocol
  mask was getting used and affecting hash filter functionality.
- New fastpath WR FW_RI_FR_NSMR_TPTE_WR (with fully populated TPTE) is
  added for small REG_MR operations.

FOiSCSI:
- Fixed an issue in foiscsi recovery path.
- Fixed an issue where foiscsi (in VM in PCIE passthrough mode) didn't
  come up after VM FLR.

ENHANCEMENTS
------------

ETH:
- Implemented 1G/10G KR/KX ability.
- Implemented T540-BT adapter support.

=======================================================================

T4 Firmware
+++++++++++

Version : 1.16.12.0
Date    : 11/11/2016

FIXES
-----

BASE:
- Fixed an issue where reading temperature sesors using ldst command
  causes mailbox timeout.
- Added new FW_PARAMS_CMD[DEV] options to retrieve Serial Configuration
  and VPD version numbers.

ETH:
- Fixed DCBX CEE Incorrect class to pririty mapping.

FOiSCSI:
- Fixed an issue where unloading foiscsi driver causes mailbox timeout.

MFC after:	3 days
Sponsored by:	Chelsio Communications
2017-01-03 22:05:07 +00:00
Mateusz Guzik
2604eb9e17 mtx: reduce lock accesses
Instead of spuriously re-reading the lock value, read it once.

This change also has a side effect of fixing a performance bug:
on failed _mtx_obtain_lock, it was possible that re-read would find
the lock is unowned, but in this case the primitive would make a trip
through turnstile code.

This is diff reduction to a variant which uses atomic_fcmpset.

Discussed with:	jhb (previous version)
Tested by:	pho (previous version)
2017-01-03 21:36:15 +00:00
Benjamin Kaduk
68278ec60f Fix typo 2017-01-03 21:11:30 +00:00
Mateusz Guzik
619ce4d72e Revert r309619 "ifndef atomic_cas_* in cddl code"
It was a temporary change to ease an import of native atomic_cas primitives.
Instead, atomic_fcmpset was devised with different semantics. See r311168.
2017-01-03 21:02:30 +00:00
Mateusz Guzik
f7c6177038 amd64: add atomic_fcmpset
Reviewed by:	kib, jhb
2017-01-03 21:00:24 +00:00
Mateusz Guzik
c0b995bb1b Add the upcoming atomic_fcmpset family to the atomic(9) man page.
These primitives give the caller the read value if the exchange attempt
failed which saves an explicit reload for cmpset loops.

The man page was partially submitted by kib.

Reviewed by:	kib (previous version), jhb (previous version)
2017-01-03 20:59:50 +00:00
Alan Somers
fa699bb23e misc minor fixes in mpr(4)
sys/dev/mpr/mpr_sas.c
	* Fix a potential null pointer dereference (CID 1305731)
	* Check for overrun of the ccb_scsiio.cdb_io.cdb_bytes buffer (CID
	  1211934)

sys/dev/mpr/mpr_sas_lsi.c
	* Nullify a dangling pointer in mprsas_get_sata_identify
	* Fix a memory leak in mprsas_SSU_to_SATA_devices (CID 1211935)

Reported by:	Coverity (partially)
CID:		1305731 1211934 1211935
Reviewed by:	slm
MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D8880
2017-01-03 17:35:16 +00:00
Olivier Houchard
36ea572167 In the netfront_rxq struct, we should use NET_RX_RING_SIZE, not
NET_TX_RING_SIZE.

Reviewed by:	royger
2017-01-03 17:24:56 +00:00
Luiz Otavio O Souza
722e888dce Remove a GPL licensed DTS.
The micro-Firewall DTS is now a single BSD licensed file.

Reported by:	manu
Obtained from:	pfSense
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC (Netgate)
2017-01-03 16:46:51 +00:00
Sean Bruno
3d33d7f39a Restore r302384 that was dropped when r303816 updated the driver to 1.6.6.-k
Original log:
Do not initialize the adapter on MTU change when adapter status is down.
This fixes long-standing problems when changing settings of the adapter.

Discussed in:
https://lists.freebsd.org/pipermail/freebsd-net/2016-June/045509.html

Reported by:	Franco Fichtner <franco@opnsense.org>
MFH:		2 days
2017-01-03 14:52:39 +00:00
John Baldwin
48f7957436 Update libsysdecode for getfsstat() 'flags' argument changing to 'mode'.
As a followup to r310638, update libsysdecode (and kdump) to decode the
'mode' argument to getfsstat().  sysdecode_getfsstat_flags() has been
renamed to sysdecode_getfsstat_mode() and now treats the argument as an
enumerated value rather than a mask of flags.
2017-01-03 01:39:05 +00:00
Mark Johnston
91371de1fa Remove the "unused" DIF subroutine index left after r308582.
These indices are input to a build-time script that generates code to
validate subroutine names.
2017-01-03 00:24:12 +00:00
Mark Johnston
b1fd102ee7 Add a page queue for holding dirty anonymous unswappable pages.
On systems without a configured swap device, an attempt to launder pages
from a swap object will always fail and result in the page being
reactivated. This means that the page daemon will continuously scan pages
that can never be evicted. With this change, anonymous pages are instead
moved to PQ_UNSWAPPABLE after a failed laundering attempt when no swap
devices are configured. PQ_UNSWAPPABLE is not scanned unless a swap device
is configured, so unreferenced unswappable pages are excluded from the page
daemon's workload.

Reviewed by:	alc
2017-01-03 00:05:44 +00:00
Piotr Pawel Stefaniak
183668da96 indent(1): add a piece missed in r311138. 2017-01-02 20:49:24 +00:00
Enji Cooper
94ef145e6b Only bake krb5_config.h support in to ssh(3), etc if both MK_GSSAPI and
MK_KERBEROS_SUPPORT != no

This fixes the odd case where someone specified MK_GSSAPI=no and
MK_KERBEROS_SUPPORT=yes (which admittedly, probably doesn't make sense,
but the build system doesn't prevent this case today, and it didn't when
I filed the bug back in 2011 either).

MFC after:	2 weeks
PR:		159745
2017-01-02 20:29:50 +00:00
Piotr Pawel Stefaniak
86adac04b2 indent(1): add option -P for loading user-provided files as profiles
Without this change, indent(1) would only look to load options from ~/.indent.pro if it's there and -npro wasn't used on the command line. This option lets the user set their own path to the file.

Approved by:	pfg (mentor)
Differential Revision:	https://reviews.freebsd.org/D9010
2017-01-02 20:23:46 +00:00
Enji Cooper
0cd582c898 Regen src.conf after recent changes to tools/build/options/... and
src.opts.mk
2017-01-02 20:14:06 +00:00
Enji Cooper
c9940f8cad Add WITH_SSP to silence complaints from mkman about there not being a file
MFC after:	3 days
2017-01-02 20:09:09 +00:00
Enji Cooper
386ab50591 Add documentation for MK_EFI added in r307243 2017-01-02 20:07:56 +00:00
Enji Cooper
584d8c634a rcs was removed in r307351; kill off WITH*_RCS
MFC after:	never
2017-01-02 20:01:07 +00:00
Enji Cooper
4301886de3 Move the "MK_* options..." section before the "... MK_*_SUPPORT..." section
For the case that someone set WITHOUT_GSSAPI=, now WITHOUT_KERBEROS_SUPPORT
will be properly set.

This will likely fix the issue for the default case noted in the PR I filed
back in 2011. I am trying to fix the less obvious case documented in the PR
still.

MFC after:	2 weeks
PR:		159745
2017-01-02 19:55:18 +00:00
Dimitry Andric
715652a404 Make native-xtools build correctly after clang/llvm 3.9.0 import
During the clang/llvm 3.9.0 import, the build structure for it was
completely revamped.  This broke the native-xtools target.

It first attempts to build libllvmminimal, then the llvm-tblgen and
clang-tblgen executables, but these fail to link because they are linked
to the 'full' libllvm by default, as they normally are during the
'world' stage.

To make these link against libllvmminimal instead, define TOOLS_PREFIX,
similarly as during the bootstrap-tools phase.  The value itself is
empty, as we don't really want to use a prefix.

Reviewed by:	imp
PR:		215684
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D9026
2017-01-02 19:33:22 +00:00
Josh Paetzel
b5a8f340f1 Workaround NFS bug with readdirplus when there are greater than 1 billion files in a filesystem.
Reviewed by	kib
MFC after:	2 weeks
Sponsored by:	iXsystems
Differential Revision:	D9009
2017-01-02 19:18:56 +00:00
Enji Cooper
474da3c328 Conditionalize adding ${KRB5DIR}/lib/gssapi/krb5/gkrb5_err.et to ETSRCS
if MK_GSSAPI != "no"

MFC after:	1 week
2017-01-02 19:03:01 +00:00
Enji Cooper
739666dd97 Build libexec/kadmind when MK_GSSAPI != no because it requires gssapi
MFC after:	1 week
2017-01-02 19:02:00 +00:00
Konstantin Belousov
7ee34a31fd There is no need to use temporary statfs buffer for fsid obliteration
and prison enforcement.  Do it on the caller buffer directly.

Besides eliminating memory copies, this change also removes large
structure from the kernel stack.

Extracted from:	ino64 work by gleb
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-01-02 18:59:23 +00:00
Enji Cooper
3b647ba7aa libgssapi_{krb5,ntlm,spnego} requires MK_GSSAPI != no; conditionalize
their building on the knob

MFC after:	1 week
2017-01-02 18:58:13 +00:00
Konstantin Belousov
b961dc3193 Style.
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-01-02 18:49:48 +00:00
Pedro F. Giffuni
fa81223743 patch(1): replace strnlen() with a simpler strlen().
Small style fix with here.

Pointed out by:	kib
2017-01-02 18:27:35 +00:00
Pedro F. Giffuni
4f548c1916 Revert r311106:
patch(1): extend the maximum length of a line from USHRT_MAX to UINT_MAX.

This doesn't really work for 32 bit platforms.

Pointed out by:	kib
2017-01-02 18:23:31 +00:00
Konstantin Belousov
f2af4041fa Move common code from kern_statfs() and kern_fstatfs() into a new helper.
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-01-02 18:20:22 +00:00
Pedro F. Giffuni
ad8469feec patch(1): extend the maximum length of a line from USHRT_MAX to UINT_MAX.
We can handle such "big data" without much trouble.
Try to do a better job at detecting the rejection cause while here.

MFC after:	2 weeks
2017-01-02 17:12:14 +00:00
Andriy Voskoboinyk
53d2e5b73e rsu: restore 40Mhz channel support.
MFC after:	4 days.
2017-01-02 16:58:55 +00:00
Justin Hibbits
b5345ef10e Print flags in hex instead of decimal.
Hex is easier to grok for flags, and consistent with other prints.
2017-01-02 16:50:52 +00:00
Ian Lepore
9f5b5f5a4d Update ntp.conf to use the ntpd pool feature.
Our previous ntp.conf file configured 3 servers from freebsd.pool.ntp.org
using 3 separate 'server' config lines.  That is now replaced with a single
'pool' line which causes ntpd to add multiple servers from the pool.

More than just making the config smaller, the pool feature in ntpd has one
major advantage over configuring 3 separate servers from a pool: if a server
that was added using a 'pool' statement provides bad time (initially or at
some later date), ntpd automatically discards it and configures a new
different server from the pool without needing to be restarted.

These changes also add a 'tos' line to control how many pool servers get
added, a 'restrict source' line that is required to allow ntpd to add new
peers from the pool, and it deletes a 'restrict 127.127.1.0' line that does
nothing and should never have been there (127.127.1.0 is not a valid IP
address, it's a refclock identifier).

Differential Revision:	https://reviews.freebsd.org/D9011
2017-01-02 15:19:22 +00:00
Pedro F. Giffuni
3795066839 Cleanup inelegant calloc(3) introduced in r310984. 2017-01-02 15:17:33 +00:00
Pedro F. Giffuni
eca80cd0ae libkvm - extend a bit the swap statistics field.
Change ksw_used and ksw_total to unsigned, which increases the maximum
total swap that can be displayed properly from ~8TB to ~16TB.

Obtained from:	DragonflyBSD (ecc2e461)
MFC after:	2 weeks
2017-01-02 15:12:11 +00:00
Konstantin Belousov
67319388b8 Remove unneeded externs keywords. Reindent long lines.
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-01-02 09:02:39 +00:00
Adrian Chadd
67ca1051e0 [netmap] call RLOCK /and/ RUNLOCK.
Reported by: olivier
2017-01-02 06:36:12 +00:00
Mark Johnston
b5442eba5c Factor out instances of a knote detach followed by a knote_drop() call.
Reviewed by:	kib (previous version)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D9015
2017-01-02 01:23:21 +00:00
Sean Bruno
1248952a50 2017 IFLIB updates in preparation for commits to e1000 and ixgbe.
- iflib - add checksum in place support (mmacy)
- iflib - initialize IP for TSO (going to be needed for e1000) (mmacy)
- iflib - move isc_txrx from shared context to softc context (mmacy)
- iflib - Normalize checks in TXQ drainage. (shurd)
- iflib - Fix queue capping checks (mmacy)
- iflib - Fix invalid assert, em can need 2 sentinels (mmacy)
- iflib - let the driver determine what capabilities are set and what
          tx csum flags are used (mmacy)
- add INVARIANTS debugging hooks to gtaskqueue enqueue (mmacy)
- update bnxt(4) to support the changes to iflib (shurd)

Some other various, sundry updates.  Slightly more verbose changelog:

Submitted by:	mmacy@nextbsd.org
Reviewed by:	shurd
mFC after:
Sponsored by:	LimeLight Networks and Dell EMC Isilon
2017-01-02 00:56:33 +00:00
Konstantin Belousov
1569205f0a Style fixes for vm_map_insert().
Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-01-01 18:49:46 +00:00
Pedro F. Giffuni
f1b298ad46 Remove some uses of the GCC __nonnull() attribute.
While the checks are considered useful, the attribute does dangerous
optimizations, removing NULL checks where they can be needed. Remove the
uses of this attribute introduced in r281130: the changes were inspired on
Google's bionic where this attribute is not used anymore.

The __nonnull() attribute will be deprecrated from our headers and
replaced with the Clang _Nonnull qualifier in the future.

MFC after:	3 days
2017-01-01 17:16:47 +00:00
Cy Schubert
d2aa1af629 Fix up grammar.
MFC after:	3 days
2017-01-01 10:37:10 +00:00