Commit graph

213440 commits

Author SHA1 Message Date
Navdeep Parhar 0bc01d66b6 cxgbe(4): Provide information about traffic classes in the sysctl mib.
Sponsored by:	Chelsio Communications
2016-06-07 06:42:35 +00:00
Michal Meloun 949883bd72 INTRNG: As follow up of r301451, implement mapping and configuration
of gpio pin interrupts by new way.

Note: This removes last consumer of intr_ddata machinery and we remove it
in separate commit.
2016-06-07 05:08:24 +00:00
Sepherosa Ziehau 36ad8372d4 net: Use M_HASHTYPE_OPAQUE_HASH if the mbuf flowid has hash properties
Reviewed by:	hps, erj, tuexen
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6688
2016-06-07 04:51:50 +00:00
Adrian Chadd aebdb1e24e [ath3k] add a replacement ath3k firmware loading tool.
This is influenced by the ath3k driver from linux (circa 2013, this is
how long I've been sitting on this.)

It handles loading in firmware using the newer model, where it assembles
the right set of firmware blobs and board configuration based on the
device list and querying the device.

The older utility could only load in a single image - which sometimes
was ath3k-1.fw and sometimes was ath3k-2.fw.  However, the ath3k maintainers
didn't want to keep adding in binaries that were just derivatives with a
separate board config, so they deleted ath3k-2.fw from the Linux firmware
repository and instead, well, did this.

Now, this has been tested against AR3011 and AR3012 NICs from the AR9285+BT
combo up through to the QCA9565+BT combo.  It doesn't yet work with the
QCAFN222 NIC as that is some newer chip.

The firmware can be grabbed from https://github.com/erikarn/ath3kfw/ in
the share/firmware/ath3k directory.  I'll update this utility over time
to support the newer firmware drops (newer than mid-2013) which should
pull in the QCNFA222 and subsequent chips.

Tested:

* AR9285 + BT
* AR9287 + BT
* AR9485 + BT
* AR9462 + BT
* QCA9565 + BT
2016-06-07 04:22:18 +00:00
Marcelo Araujo 3db8326de1 Add an entry on rc.conf(5) explaining the new options
nis_ypldap_enable and nis_ypldap_flags.

Also add an entry on ypldap(8) that it is a feature ready and
appears on FreeBSD 11.0.

Requested by:	rodrigc
Relnotes:	Yes
2016-06-07 01:00:08 +00:00
Navdeep Parhar 46464b95b0 cxgbe(4): Track the state of the hardware traffic schedulers in the
driver.  This works as long as everyone uses set_sched_class_params
to program them.

Sponsored by:	Chelsio Communications
2016-06-07 00:27:55 +00:00
Bjoern A. Zeeb 2d5ad99a0d After tearing down the interface per-"domain" bits, set the data area
to NULL to avoid it being mis-treated on a possible re-attach but also
to get a clean NULL pointer derefence in case of errors due to
unexpected race conditions elsewhere in the code, e.g., callouts.

Obtained from:	projects/vnet
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2016-06-06 22:59:58 +00:00
Eric van Gyzen c152ba971f newsyslog: Eliminate unnecessary sleep(10) when -R and -s are specified
After going through the signal work list, during which do_sigwork()
is called and essentially does nothing because -s and -R were
specified on the command line, newsyslog will sleep for 10 seconds
as the (verbose) code says: "Pause 10 seconds to allow daemon(s)
to close log file(s)".

However, the man page verbiage for -R (and -s) seems quite clear
that this sleep() is unnecessary because the daemon was expected
to have already closed the log file before calling newsyslog.

PR:		210020
Submitted by:	David A. Bright <david_a_bright@dell.com>
MFC after:	1 week
Sponsored by:	Dell Inc.
Differential Revision:	https://reviews.freebsd.org/D6727
2016-06-06 22:54:08 +00:00
Navdeep Parhar cfbe2911c9 cxgbe(4): Break up set_sched_class. Validate the channel number and
min/max rates against their actual limits (which are chip and port
specific) instead of hardcoded constants.

Sponsored by:	Chelsio Communications
2016-06-06 22:51:44 +00:00
Bjoern A. Zeeb 74b44794c6 Make KASSERT message more useful by printing the variables on which
we assert.

Obtained from:	projects/vnet
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2016-06-06 22:34:12 +00:00
Bjoern A. Zeeb b941cb8d60 Add a show igi_list command to DDB to debug IGMP state.
Obtained from:	projects/vnet
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2016-06-06 22:26:18 +00:00
Bjoern A. Zeeb 3af72c1124 Implement a show panic command to DDB which will helpfully print the
panic string again if set, in case it scrolled out of the active
window.  This avoids having to remember the symbol name.

Also add a show callout <addr> command to DDB in order to inspect
some struct callout fields in case of panics in the callout code.
This may help to see if there was memory corruption or to further
ease debugging problems.

Obtained from:	projects/vnet
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Reviewed by:	jhb (comment only on the show panic initally)
Differential Revision:	https://reviews.freebsd.org/D4527
2016-06-06 20:57:24 +00:00
Navdeep Parhar db80d07377 cxgbe(4): Create a reusable struct type for scheduling class parameters.
Sponsored by:	Chelsio Communications
2016-06-06 20:42:46 +00:00
John Baldwin 9f70e94e68 Defer the creation of ACPI thermal kthreads to a startup sysinit.
The SYSINIT runs at SI_SUB_KICK_SCHEDULER after the scheduler is fully
initialized and timers are working.  This fixes booting in the
EARLY_AP_STARTUP case.
2016-06-06 20:28:53 +00:00
Kurt Lidl 504422fab3 Update blacklist support in ftpd to clarify fd usage
The ftp daemon dups the control socket to stdin and uses that fd
throughout the code.  Clarify this usage slightly by changing from
explicit use of "0" for the fd to a variable, to make it clear what
the zero represents in the non-blacklist code. Make the
blacklist_notify routine use STDIN_FILENO so as to have less of a
"magic number" feel to the code.

Reviewed by:	cem
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D6716
2016-06-06 20:00:13 +00:00
Navdeep Parhar 93e452dbc0 cxgbetool: Allow max-rate > 10Gbps for rate-limited traffic.
Sponsored by:	Chelsio Communications
2016-06-06 18:45:09 +00:00
Kurt Lidl 00dc8270d5 Turn off blacklistd daemon in defaults
Reported by:	Matteo Riondato ( matteo @ FreeBSD.org )
Reviewed by:	rpaulo
Approved by:	rpaulo
Relnotes:	YES
Sponsored by:	The FreeBSD Foundation
2016-06-06 17:01:35 +00:00
Bjoern A. Zeeb d117fd8003 Similarly to r301505 protect the removal of the ifa from the if_addrhead
by a lock (as well as the check that the list is not empty).

Obtained from:	projects/vnet
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2016-06-06 16:23:02 +00:00
Pedro F. Giffuni b67565942b indent(1): Fix typo.
It's typedef, not typdef.

Obtained from:	OpenBSD (CVS rev. 1.20)
MFC after:	3 days
2016-06-06 16:10:52 +00:00
Roger Pau Monné 6567125372 xen-netfront: fix initialization
A couple of mostly cosmetic fixes for the final initialization of netfront:

 - Switch to "connected" state before starting to kick the rings.
 - Correctly use "rxq" in the initialization loop (previously rxq was not
   updated in the loop, and netfront would kick np->rxq[N] several times).
 - Declare and define xn_connect as static, it's not used outside of this
   file.

Reviewed by:		Wei Liu <wei.liu2@citrix.com>
Sponsored by:		Citrix Systems R&D
Differential revision:	https://reviews.freebsd.org/D6657
2016-06-06 15:01:24 +00:00
Roger Pau Monné 89ee6cecbc xen: Correct typo in #undef for symbol NBPL
Submitted by:	Akshay Jaggi <akshay1994.leo@gmail.com>
Reviewed by:	royger
2016-06-06 14:55:46 +00:00
Bjoern A. Zeeb 99a0c4062d Move the callout_reset() to the end of the work not having it stick
before we do anything.

Obtained from:	projects/vnet
MFC after:	2 week
Sponsored by:	The FreeBSD Foundation
2016-06-06 14:01:09 +00:00
Bjoern A. Zeeb f22d78c06e In if_purgeaddrs() we cannot hold the lock over the entire loop
due to called functions (as in other parts of the stack, leave a comment).
Put around a lock the removal of the ifa from the list however to
reduce the possible race with other places.

Obtained from:	projects/vnet
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2016-06-06 13:17:25 +00:00
Bjoern A. Zeeb a6c96fc2f0 Destroy the mutex last. In this case it should not matter, but
generally cleanup code might still acquire it thus try to be
consistent destroying locks late.

Obtained from:	projects/vnet
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2016-06-06 13:04:22 +00:00
Bjoern A. Zeeb b9dbac48f3 SYSINIT functions do not return a value; switch to void, remove
the return value, and mark the unused argument __unused.

Obtained from:	projects/vnet
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2016-06-06 13:01:57 +00:00
Bjoern A. Zeeb 80ae8d609a Provide a public interface to rt_flushifroutes which takes the address
family as an argument as well.
This will be used to cleanup individual protocols during VNET teardown.

Obtained from:	projects/vnet
Sponsored by:	The FreeBSD Foundation
2016-06-06 12:49:47 +00:00
Bjoern A. Zeeb e84ef07f02 Make the KASSERT message more helpful by also printing the ifp information
which we are asserting.

Obtained from:	projects/vnet
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2016-06-06 10:13:48 +00:00
Stanislav Galabov 86845464f0 Remove erroneous lock assertions
In mediatek etherswitch support, functions mtkswitch_reg_write32_mt7621
and mtkswitch_reg_read32_mt7621 are called without locks held, so
lock assertions fail. Remove the lock assertions.

Sponsored by:	Smartcom - Bulgaria AD
2016-06-06 10:07:57 +00:00
Marcelo Araujo 2ccbbd06d2 Add support to priority code point (PCP) that is an 3-bit field
which refers to IEEE 802.1p class of service and maps to the frame
priority level.

Values in order of priority are: 1 (Background (lowest)),
0 (Best effort (default)), 2 (Excellent effort),
3 (Critical applications), 4 (Video, < 100ms latency),
5 (Video, < 10ms latency), 6 (Internetwork control) and
7 (Network control (highest)).

Example of usage:
root# ifconfig em0.1 create
root# ifconfig em0.1 vlanpcp 3

Note:
The review D801 includes the pf(4) part, but as discussed with kristof,
we won't commit the pf(4) bits for now.
The credits of the original code is from rwatson.

Differential Revision:	https://reviews.freebsd.org/D801
Reviewed by:	gnn, adrian, loos
Discussed with: rwatson, glebius, kristof
Tested by:	many including Matthew Grooms <mgrooms__shrew.net>
Obtained from:	pfSense
Relnotes:	Yes
2016-06-06 09:51:58 +00:00
Andrew Rybchenko ba3049f99c sfxge(4): update TX vFIFO ULL tag location to avoid merge conflict
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-06-06 09:30:31 +00:00
Andrew Rybchenko 3bbc1e08ed sfxge(4): pick an RSS bucket for the packet enqueued and select TXQ accordingly
Submitted by:   Ivan Malov <Ivan.Malov at oktetlabs.ru>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D6723
2016-06-06 09:08:16 +00:00
Andrew Rybchenko f949e9f802 sfxge(4): set up the indirection table using the kernel-driven RSS bucket ids
Submitted by:   Ivan Malov <Ivan.Malov at oktetlabs.ru>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D6722
2016-06-06 09:07:26 +00:00
Andrew Rybchenko 35c0644e49 sfxge(4): bind interrupts to CPUs in accordance with bucket to CPU map
Submitted by:   Ivan Malov <Ivan.Malov at oktetlabs.ru>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D6721
2016-06-06 09:06:38 +00:00
Andrew Rybchenko 8e7d32065b sfxge(4): restrict the maximum number of RSS channels by the number of RSS buckets
This is done because one has no point to have more channels since they
will be unused.

Submitted by:   Ivan Malov <Ivan.Malov at oktetlabs.ru>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D6720
2016-06-06 09:05:52 +00:00
Andrew Rybchenko 2da8819492 sfxge(4): get RSS key to be programmed into NIC from the kernel
Submitted by:   Ivan Malov <Ivan.Malov at oktetlabs.ru>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D6719
2016-06-06 09:05:06 +00:00
Andrew Rybchenko bc2b508634 sfxge(4): prepare sfxge to be RSS API aware
This change is needed because 'opt_rss.h' is included by multiple source
files and RSS macro is defined as 1 within the file during build process
if option RSS is enabled in the kernel.

Submitted by:   Ivan Malov <Ivan.Malov at oktetlabs.ru>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D6718
2016-06-06 09:04:20 +00:00
Sepherosa Ziehau 43926ba13f hyperv/vmbus: Constify channel message
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6708
2016-06-06 07:39:44 +00:00
Sepherosa Ziehau 12ea25ae4f hyperv/vmbus: Factor out channel message processing
This paves the way for further cleanup.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6707
2016-06-06 07:27:57 +00:00
Adrian Chadd 4594925d80 [bwn] don't use a 1MB CCK RTS frame for 11a OFDM transmissions. 2016-06-06 07:09:02 +00:00
Sepherosa Ziehau fa4828b0ab hyperv/vmbus: Define type for channel messages.
And fix message processing; only channel messages are supported.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6706
2016-06-06 06:18:18 +00:00
Sepherosa Ziehau d8bf51683d hyperv: Move machine dependent bits into machine dependent files.
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6701
2016-06-06 05:55:37 +00:00
Marcelo Araujo d134fb49e5 For pointers use NULL instead of 0. 2016-06-06 04:18:56 +00:00
Marcelo Araujo 3f708a3203 Connect ypldap(8) script on Makefile, forgotten on my previous commit r301480. 2016-06-06 04:13:49 +00:00
Marcelo Araujo 46b6ecf257 Add rc.d script for ypldap(8). 2016-06-06 03:55:00 +00:00
Marcelo Araujo 3191e5717d Install/Connect ypldap.conf(5) on examples. 2016-06-06 02:43:41 +00:00
George V. Neville-Neil 8b2b91eee0 Add missing constants from RFCs 4443 and 6550 2016-06-06 00:35:45 +00:00
Bryan Drewery aa06dfc9c3 legacy: Avoid building/installing headers twice.
Sponsored by:	EMC / Isilon Storage Division
2016-06-05 23:56:28 +00:00
Bryan Drewery 1e325b6598 Use the in-tree sys/elf_common.h
This is the same fix as r301471.
2016-06-05 23:34:19 +00:00
Bryan Drewery 9a8968a87d Regenerate 2016-06-05 23:16:27 +00:00
Bryan Drewery 33b9006513 Document WITH_META_MODE enforcing WITHOUT_SYSTEM_COMPILER.
makeman doesn't handle this since it would need to enable all
non-default options when checking enabling 1 option, which
then convolutes what is really affecting each other.
2016-06-05 23:14:06 +00:00