]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoAdd support for Atmel at25df641 flash
Baptiste Daroussin [Wed, 8 Jun 2016 14:22:16 +0000 (14:22 +0000)]
Add support for Atmel at25df641 flash

Submitted by: Grégory Soutadé <soutade@gmail.com> (via github pull request)

8 years agoDocument 300880, Leading spaces are stripped from SCSI disk serial numbers
Steven Kreuzer [Wed, 8 Jun 2016 14:21:48 +0000 (14:21 +0000)]
Document 300880, Leading spaces are stripped from SCSI disk serial numbers

Approved by: re (gjb, implicit, relnotes)

8 years agocxgbe(4): Add a sysctl to manage the binding of a txq to a traffic class.
Navdeep Parhar [Wed, 8 Jun 2016 14:15:29 +0000 (14:15 +0000)]
cxgbe(4): Add a sysctl to manage the binding of a txq to a traffic class.

Sponsored by: Chelsio Communications

8 years agoDon't force filemon for makeman/showconfig
Bryan Drewery [Wed, 8 Jun 2016 14:02:21 +0000 (14:02 +0000)]
Don't force filemon for makeman/showconfig

Reported by: lidl

8 years agoRemove duplicate define.
Ruslan Bukin [Wed, 8 Jun 2016 13:57:18 +0000 (13:57 +0000)]
Remove duplicate define.

8 years agosfxge(4): host byte order is required for IP ID in TSO descriptors
Andrew Rybchenko [Wed, 8 Jun 2016 13:14:52 +0000 (13:14 +0000)]
sfxge(4): host byte order is required for IP ID in TSO descriptors

Submitted by:   Artem V. Andreev <Artem.Andreev at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agoRegenerate
Bryan Drewery [Wed, 8 Jun 2016 12:46:54 +0000 (12:46 +0000)]
Regenerate

8 years agoBounds check rpcbs_rmtcall(..) to ensure rtype is less than RPCBVERS_STAT
Enji Cooper [Wed, 8 Jun 2016 12:45:22 +0000 (12:45 +0000)]
Bounds check rpcbs_rmtcall(..) to ensure rtype is less than RPCBVERS_STAT

Not returning if rtype == RPCBVERS_STAT will cause us to overrun the inf array, as
it's defined to be exactly RPCBVERS_STAT elements in rpcb_prot.x:

> include/rpc/rpcb_prot.x:typedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT];

The proposed change also matches the rest of the rtype upper bound checks in the
file, so the original change was likely a typo.

MFC after: 2 weeks
Reported by: Coverity
CID: 1007567
Reviewed by: truckman
Sponsored by: EMC / Isilon Storage Division

8 years agosfxge(4): cleanup: add missing probes to ef10_nvram_segment_write_tlv
Andrew Rybchenko [Wed, 8 Jun 2016 12:40:21 +0000 (12:40 +0000)]
sfxge(4): cleanup: add missing probes to ef10_nvram_segment_write_tlv

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agoMove misplaced break statement to right place
Renato Botelho [Wed, 8 Jun 2016 11:58:03 +0000 (11:58 +0000)]
Move misplaced break statement to right place

Reported by: Coverity
CID: 1304340
Reviewed by: lidl
Differential Revision: https://reviews.freebsd.org/D6749
Sponsored by: Rubicon Communications (Netgate)

8 years agoReplace _pam_verbose_error() with a macro. This was the last difference
Dag-Erling Smørgrav [Wed, 8 Jun 2016 11:47:19 +0000 (11:47 +0000)]
Replace _pam_verbose_error() with a macro.  This was the last difference
between our libpam and stock OpenPAM, meaning that it is now possible to
replace the base libpam with a hypothetical ports version of OpenPAM.

8 years agoFix typos.
Edward Tomasz Napierala [Wed, 8 Jun 2016 10:38:00 +0000 (10:38 +0000)]
Fix typos.

MFC after: 1 month

8 years agoFix some trailing whitespaces.
Edward Tomasz Napierala [Wed, 8 Jun 2016 10:26:17 +0000 (10:26 +0000)]
Fix some trailing whitespaces.

MFC after: 1 month

8 years agoDon't leak olinep if malloc() fails.
Don Lewis [Wed, 8 Jun 2016 10:25:16 +0000 (10:25 +0000)]
Don't leak olinep if malloc() fails.

If malloc() fails to allocate linep, then free olinep (if it exists)
before returning to avoid a memory leak.

Reported by: Coverity
CID: 1016716
Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D6755

8 years agoDon't leak addrinfo if ai->ai_addrlen <= minsiz test fails.
Don Lewis [Wed, 8 Jun 2016 09:40:06 +0000 (09:40 +0000)]
Don't leak addrinfo if ai->ai_addrlen <= minsiz test fails.

If the ai->ai_addrlen <= minsiz test fails, then freeaddrinfo()
does not get called to free the memory just allocated by getaddrinfo().
Fix by moving ai->ai_addrlen <= minsiz to a separate nested if
block, and keep freeaddrinfo() in the outer block so that freeaddrinfo()
will be called whenever getaddrinfo() succeeds.

Reported by: Coverity
CID: 1273652
Reviewed by: ume
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D6756

8 years agoLast few instances of "sentence not on new line".
Edward Tomasz Napierala [Wed, 8 Jun 2016 09:36:07 +0000 (09:36 +0000)]
Last few instances of "sentence not on new line".

MFC after: 1 month

8 years agoFix a bunch of "sentence not on new line" warnings in section 9.
Edward Tomasz Napierala [Wed, 8 Jun 2016 09:19:47 +0000 (09:19 +0000)]
Fix a bunch of "sentence not on new line" warnings in section 9.

MFC after: 1 month

8 years agoFix a bunch of "sentence not on new line" warnings from igor(1).
Edward Tomasz Napierala [Wed, 8 Jun 2016 08:50:35 +0000 (08:50 +0000)]
Fix a bunch of "sentence not on new line" warnings from igor(1).

MFC after: 1 month

8 years agohyperv/vmbus: Change tx_evtflags type to u_long to match vmbus_evtflags
Sepherosa Ziehau [Wed, 8 Jun 2016 07:47:21 +0000 (07:47 +0000)]
hyperv/vmbus: Change tx_evtflags type to u_long to match vmbus_evtflags

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6745

8 years agoImprove documentation for usfs(4) and usb_template(4).
Edward Tomasz Napierala [Wed, 8 Jun 2016 07:39:55 +0000 (07:39 +0000)]
Improve documentation for usfs(4) and usb_template(4).

Reviewed by: hselasky (earlier version)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D6740

8 years agoPacify igor(8) and make it easier to find via "man -k iser".
Edward Tomasz Napierala [Wed, 8 Jun 2016 07:36:00 +0000 (07:36 +0000)]
Pacify igor(8) and make it easier to find via "man -k iser".

MFC after: 1 month

8 years agoAdd iser(4) manual page.
Edward Tomasz Napierala [Wed, 8 Jun 2016 07:33:17 +0000 (07:33 +0000)]
Add iser(4) manual page.

Obtained from: Mellanox Technologies
MFC after: 1 month

8 years agoApply mergemaster r255428:
Xin LI [Wed, 8 Jun 2016 06:33:55 +0000 (06:33 +0000)]
Apply mergemaster r255428:

Pass -n (do not emit comments) when saving mtree information for future
mergemaster(8) runs.

MFC after: 3 days

8 years agohyperv/vmbus: Busdma-fy MNF and event flags.
Sepherosa Ziehau [Wed, 8 Jun 2016 05:34:22 +0000 (05:34 +0000)]
hyperv/vmbus: Busdma-fy MNF and event flags.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6744

8 years agoExplicitly NUL terminate the buffer filled by fread().
Don Lewis [Wed, 8 Jun 2016 05:32:39 +0000 (05:32 +0000)]
Explicitly NUL terminate the buffer filled by fread().

The fix in r300649 was not sufficient to convince Coverity that the
buffer was NUL terminated, even with the buffer pre-zeroed.  Swap
the size and nmemb arguments to fread() so that a valid lenght is
returned, which we can use to terminate the string in the buffer
at the correct location.  This should also quiet the complaint about
the return value of fread() not being checked.

Reported by: Coverity
CID: 10190541009614
MFC after: 1 week

8 years agoOld process credentials for setuid execve must not be dereferenced
Konstantin Belousov [Wed, 8 Jun 2016 04:37:03 +0000 (04:37 +0000)]
Old process credentials for setuid execve must not be dereferenced
when the process credentials were not changed.  This can happen if an
error occured trying to activate the setuid binary.  And on error, if
new credentials were not yet assigned, they must be freed to not
create the leak.

Use oldcred == NULL as the predicate to detect credential
reassignment.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation

8 years agoBump date on ifconfig(8) and vlan(4) to reflect the changes made
Marcelo Araujo [Wed, 8 Jun 2016 04:18:57 +0000 (04:18 +0000)]
Bump date on ifconfig(8) and vlan(4) to reflect the changes made
on revision r301496.

8 years agoFix a style bug.
Kevin Lo [Wed, 8 Jun 2016 02:39:10 +0000 (02:39 +0000)]
Fix a style bug.

8 years ago- Replace the magic numbers with something more readable.
Kevin Lo [Wed, 8 Jun 2016 02:37:23 +0000 (02:37 +0000)]
- Replace the magic numbers with something more readable.
- Reset DMA indexes after disabling DMA.

8 years agoFix a (false positive?) Argument cannot be negative coverity defect.
Don Lewis [Wed, 8 Jun 2016 02:14:05 +0000 (02:14 +0000)]
Fix a (false positive?) Argument cannot be negative coverity defect.

Rather than guarding close(fd) with an fd >= 0 test and setting fd
to -1 when it is closed to avoid a potential double-close, just
move the close() call after the conditional "goto make_token".  This
moves the close() call totally outside the loop to avoid the
possibility of calling it twice.  This should also prevent a Coverity
warning about checking fd for validity after it was previously passed
to read().

Reported by: Coverity
CID: 1355335
MFC after: 1 week
X-MFC with: r299484

8 years agoIntroduce the PD_CLOEXEC for pdfork(2).
Mariusz Zaborski [Wed, 8 Jun 2016 02:09:14 +0000 (02:09 +0000)]
Introduce the PD_CLOEXEC for pdfork(2).

Reviewed by: mjg

8 years agoAdd flags to the Casper services.
Mariusz Zaborski [Wed, 8 Jun 2016 02:03:53 +0000 (02:03 +0000)]
Add flags to the Casper services.

CASPER_SERVICE_STDIO - Casper will not close the first three descriptors (stdin,
       stdout and stderr) this can be helpful for debugging.
CASPER_SERVICE_FD - Capser will not close all other descriptors, this can
    be useful for a filesystem service.

8 years agolibsupc++: Fix typo in symbol map.
Pedro F. Giffuni [Wed, 8 Jun 2016 00:29:48 +0000 (00:29 +0000)]
libsupc++: Fix typo in symbol map.

This went mostly unnoticed with the deprecation of the GNU toolchain
in tier 1 platforms. Fix it now for the rest.

PR: 169901
MFC after: 3 days

8 years agoext2fs: Stop dropping and reacquiring Giant around geom calls.
Pedro F. Giffuni [Tue, 7 Jun 2016 21:40:42 +0000 (21:40 +0000)]
ext2fs: Stop dropping and reacquiring Giant around geom calls.

As in UFS r300366.

8 years agoFix memory leaks in (a|)daregister introduced in r298002
Conrad Meyer [Tue, 7 Jun 2016 20:33:55 +0000 (20:33 +0000)]
Fix memory leaks in (a|)daregister introduced in r298002

In the case where cam_iosched_init() fails, the ada and da softcs were leaked.
Instead, free them.

Reported by: Coverity
CID: 1356039
Sponsored by: EMC / Isilon Storage Division

8 years agoiflib: Improve cleanup on iflib_queues_alloc error path
Conrad Meyer [Tue, 7 Jun 2016 20:26:00 +0000 (20:26 +0000)]
iflib: Improve cleanup on iflib_queues_alloc error path

Fix some memory leaks.  Some may remain.

Reported by: Coverity
Discussed with: mmacy
CIDs: 135603613560371356038
Sponsored by: EMC / Isilon Storage Division

8 years agonfs_clvfsops: Fix leading whitespace introduced in r299848
Conrad Meyer [Tue, 7 Jun 2016 20:16:01 +0000 (20:16 +0000)]
nfs_clvfsops: Fix leading whitespace introduced in r299848

Replace spaces with tabs.  No functional change.

Sponsored by: EMC / Isilon Storage Division

8 years agoSwitch arm64 to use intrng by default. The old interrupt handling code can
Andrew Turner [Tue, 7 Jun 2016 20:14:08 +0000 (20:14 +0000)]
Switch arm64 to use intrng by default. The old interrupt handling code can
still be used, however this is expected to be removed soon.

Obtained from: ABT Systems Ltd
Relnotes: yes
Sponsored by: The FreeBSD Foundation

8 years agonfs_clvfsops: Prevent strdup of stack garbage with bogus mount specs
Conrad Meyer [Tue, 7 Jun 2016 20:00:20 +0000 (20:00 +0000)]
nfs_clvfsops: Prevent strdup of stack garbage with bogus mount specs

If strlen(hostp) was zero, the stack array 'nam' would never be initialized
before being strdup()ed.  Fix this by initializing it to the empty string.

It's possible some external condition makes this case impossible, in which
case, an assertion instead of this workaround is appropriate.

Introduced in r299848.

Reported by: Coverity
CID: 1355336
Sponsored by: EMC / Isilon Storage Division

8 years agoiflib: Fix potential leak in iflib_if_transmit
Conrad Meyer [Tue, 7 Jun 2016 19:49:08 +0000 (19:49 +0000)]
iflib: Fix potential leak in iflib_if_transmit

Due to an accidental mismatch between allocation and release in the slow path
of iflib_if_transmit, if a caller passed 9-16 mbufs to the routine, the mbuf
array would be leaked.

Fix the mismatch by removing the magic numbers in favor of nitems() on the
stack array.  According to mmacy, this leak is unlikely.

Reported by: Coverity
Discussed with: mmacy
CID: 1356040
Sponsored by: EMC / Isilon Storage Division

8 years agoFix a minor leak in ACPI thermal
Conrad Meyer [Tue, 7 Jun 2016 19:08:13 +0000 (19:08 +0000)]
Fix a minor leak in ACPI thermal

Introduced in r301518.

Reported by: Coverity
CID: 1356266
Sponsored by: EMC / Isilon Storage Division

8 years agoStart to clean MIDR values using the CPUID scheme. We don't need to know
Andrew Turner [Tue, 7 Jun 2016 18:50:36 +0000 (18:50 +0000)]
Start to clean MIDR values using the CPUID scheme. We don't need to know
the exact CPU we are running on to set the cpu functions. Relax the check
to ignore the CPU revision. Even so this may still be too specific.

Reviewed by: mmel
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D6504

8 years agoext2fs: rearrange ext4_bmapext().
Pedro F. Giffuni [Tue, 7 Jun 2016 18:23:22 +0000 (18:23 +0000)]
ext2fs: rearrange ext4_bmapext().

While here assign error a bit later.

Reviewed by: Damjan Jovanovich
Obtained from: NetBSD

8 years agoext2fs(5): Cosmetic cleanups, mostly to the ext4 code.
Pedro F. Giffuni [Tue, 7 Jun 2016 17:08:34 +0000 (17:08 +0000)]
ext2fs(5): Cosmetic cleanups, mostly to the ext4 code.

Obtained from: NetBSD

8 years agoDisconnect LE socket when the HCI connection associated is disconnected.
Takanori Watanabe [Tue, 7 Jun 2016 16:57:13 +0000 (16:57 +0000)]
Disconnect LE socket when the HCI connection associated is disconnected.

8 years agoBump dates in blacklist related manpages
Kurt Lidl [Tue, 7 Jun 2016 16:51:56 +0000 (16:51 +0000)]
Bump dates in blacklist related manpages

Reported by: araujo
Sponsored by: The FreeBSD Foundation

8 years agoDocument BLACKLIST related build options
Kurt Lidl [Tue, 7 Jun 2016 16:35:55 +0000 (16:35 +0000)]
Document BLACKLIST related build options

Reported by: bdrewery
Sponsored by: The FreeBSD Foundation

8 years agoSeparate BLACKLIST vs BLACKLIST_SUPPORT properly
Kurt Lidl [Tue, 7 Jun 2016 16:31:03 +0000 (16:31 +0000)]
Separate BLACKLIST vs BLACKLIST_SUPPORT properly

Sponsored by: The FreeBSD Foundation

8 years agoNote blacklist support first appeared in FreeBSD 11
Kurt Lidl [Tue, 7 Jun 2016 16:26:34 +0000 (16:26 +0000)]
Note blacklist support first appeared in FreeBSD 11

Reported by: jbeich
Sponsored by: The FreeBSD Foundation

8 years agoAdd blacklist support to sshd
Kurt Lidl [Tue, 7 Jun 2016 16:18:09 +0000 (16:18 +0000)]
Add blacklist support to sshd

Reviewed by: rpaulo
Approved by: rpaulo (earlier version of changes)
Relnotes: YES
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5915

8 years agong_mppc(4): Bring netgraph(3) MPPC compression support.
Pedro F. Giffuni [Tue, 7 Jun 2016 15:20:53 +0000 (15:20 +0000)]
ng_mppc(4): Bring netgraph(3) MPPC compression support.

Documentation change missing from r301549.

8 years agong_mppc(4): Bring netgraph(3) MPPC compression support.
Pedro F. Giffuni [Tue, 7 Jun 2016 15:07:00 +0000 (15:07 +0000)]
ng_mppc(4): Bring netgraph(3) MPPC compression support.

Support for compression has been available from July 2007 but it
was never imported due to concerns with patents once held by
STAC/HiFn. The issues have clearly been resolved so bring it
in now.

Special thanks to Brett Glass for preserving the code and
pointing documentation for the expiration case.

Obtained from: mav (through Brett Glass)
Relnotes: yes
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D6739

8 years agoext2fs: cleanup generation number management.
Pedro F. Giffuni [Tue, 7 Jun 2016 14:37:43 +0000 (14:37 +0000)]
ext2fs: cleanup generation number management.

Ext2/3/4 manages generation numbers differently than UFS so adopt
some rules that should work well. When allocating a new inode,
make sure we generate a "good" random value specifically avoiding
zero.

Don't interfere with the numbers that are already generated in
the filesystem: ext2fs doesn't have the backwards compatibility
issues  where there were no generation numbers.

Reviewed by: kevlo
MFC after: 1 week

8 years agoDocument 300779, Dummynet AQM version 0.2.1
Steven Kreuzer [Tue, 7 Jun 2016 14:11:15 +0000 (14:11 +0000)]
Document 300779, Dummynet AQM version 0.2.1

Approved by: re (gjb, implicit, relnotes)

8 years agoAdd SR-IOV guest support to the mlx5en driver.
Hans Petter Selasky [Tue, 7 Jun 2016 13:58:52 +0000 (13:58 +0000)]
Add SR-IOV guest support to the mlx5en driver.

This patch adds the missing pieces needed for device setup using the
mlx5en driver inside a virtual machine which is providing hardware
access through SR-IOV.

Sponsored by: Mellanox Technologies
MFC after: 1 week

8 years agoFallback to arc4rand() in the LinuxKPI when read_random() returns
Hans Petter Selasky [Tue, 7 Jun 2016 13:10:13 +0000 (13:10 +0000)]
Fallback to arc4rand() in the LinuxKPI when read_random() returns
zero. This can happen for virtual machines.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoRemove temporary solution for storing interrupt mapping data as
Svatopluk Kraus [Tue, 7 Jun 2016 09:03:27 +0000 (09:03 +0000)]
Remove temporary solution for storing interrupt mapping data as
it's not needed after r301451 and follow-ups r301453, r301539.

This makes INTRNG clean of all additions related to various buses.

8 years agocxgbe(4): A couple of fixes to set_sched_queue.
Navdeep Parhar [Tue, 7 Jun 2016 07:48:36 +0000 (07:48 +0000)]
cxgbe(4): A couple of fixes to set_sched_queue.

- Validate the scheduling class against the actual limit (which is chip
  specific) instead of a magic number.

- Return an error if an attempt is made to manipulate the tx queues of a
  VI that hasn't been initialized.

Sponsored by: Chelsio Communications

8 years agoBump date in both manpages.
Marcelo Araujo [Tue, 7 Jun 2016 07:04:05 +0000 (07:04 +0000)]
Bump date in both manpages.

Reported by: rodrigc

8 years agocxgbe(4): Provide information about traffic classes in the sysctl mib.
Navdeep Parhar [Tue, 7 Jun 2016 06:42:35 +0000 (06:42 +0000)]
cxgbe(4): Provide information about traffic classes in the sysctl mib.

Sponsored by: Chelsio Communications

8 years agoINTRNG: As follow up of r301451, implement mapping and configuration
Michal Meloun [Tue, 7 Jun 2016 05:08:24 +0000 (05:08 +0000)]
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.

8 years agonet: Use M_HASHTYPE_OPAQUE_HASH if the mbuf flowid has hash properties
Sepherosa Ziehau [Tue, 7 Jun 2016 04:51:50 +0000 (04:51 +0000)]
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

8 years ago[ath3k] add a replacement ath3k firmware loading tool.
Adrian Chadd [Tue, 7 Jun 2016 04:22:18 +0000 (04:22 +0000)]
[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

8 years agoAdd an entry on rc.conf(5) explaining the new options
Marcelo Araujo [Tue, 7 Jun 2016 01:00:08 +0000 (01:00 +0000)]
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

8 years agocxgbe(4): Track the state of the hardware traffic schedulers in the
Navdeep Parhar [Tue, 7 Jun 2016 00:27:55 +0000 (00:27 +0000)]
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

8 years agoAfter tearing down the interface per-"domain" bits, set the data area
Bjoern A. Zeeb [Mon, 6 Jun 2016 22:59:58 +0000 (22:59 +0000)]
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

8 years agonewsyslog: Eliminate unnecessary sleep(10) when -R and -s are specified
Eric van Gyzen [Mon, 6 Jun 2016 22:54:08 +0000 (22:54 +0000)]
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

8 years agocxgbe(4): Break up set_sched_class. Validate the channel number and
Navdeep Parhar [Mon, 6 Jun 2016 22:51:44 +0000 (22:51 +0000)]
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

8 years agoMake KASSERT message more useful by printing the variables on which
Bjoern A. Zeeb [Mon, 6 Jun 2016 22:34:12 +0000 (22:34 +0000)]
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

8 years agoAdd a `show igi_list` command to DDB to debug IGMP state.
Bjoern A. Zeeb [Mon, 6 Jun 2016 22:26:18 +0000 (22:26 +0000)]
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

8 years agoImplement a `show panic` command to DDB which will helpfully print the
Bjoern A. Zeeb [Mon, 6 Jun 2016 20:57:24 +0000 (20:57 +0000)]
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

8 years agocxgbe(4): Create a reusable struct type for scheduling class parameters.
Navdeep Parhar [Mon, 6 Jun 2016 20:42:46 +0000 (20:42 +0000)]
cxgbe(4): Create a reusable struct type for scheduling class parameters.

Sponsored by: Chelsio Communications

8 years agoDefer the creation of ACPI thermal kthreads to a startup sysinit.
John Baldwin [Mon, 6 Jun 2016 20:28:53 +0000 (20:28 +0000)]
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.

8 years agoUpdate blacklist support in ftpd to clarify fd usage
Kurt Lidl [Mon, 6 Jun 2016 20:00:13 +0000 (20:00 +0000)]
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

8 years agocxgbetool: Allow max-rate > 10Gbps for rate-limited traffic.
Navdeep Parhar [Mon, 6 Jun 2016 18:45:09 +0000 (18:45 +0000)]
cxgbetool: Allow max-rate > 10Gbps for rate-limited traffic.

Sponsored by: Chelsio Communications

8 years agoTurn off blacklistd daemon in defaults
Kurt Lidl [Mon, 6 Jun 2016 17:01:35 +0000 (17:01 +0000)]
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

8 years agoSimilarly to r301505 protect the removal of the ifa from the if_addrhead
Bjoern A. Zeeb [Mon, 6 Jun 2016 16:23:02 +0000 (16:23 +0000)]
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

8 years agoindent(1): Fix typo.
Pedro F. Giffuni [Mon, 6 Jun 2016 16:10:52 +0000 (16:10 +0000)]
indent(1): Fix typo.

It's typedef, not typdef.

Obtained from: OpenBSD (CVS rev. 1.20)
MFC after: 3 days

8 years agoxen-netfront: fix initialization
Roger Pau Monné [Mon, 6 Jun 2016 15:01:24 +0000 (15:01 +0000)]
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

8 years agoxen: Correct typo in #undef for symbol NBPL
Roger Pau Monné [Mon, 6 Jun 2016 14:55:46 +0000 (14:55 +0000)]
xen: Correct typo in #undef for symbol NBPL

Submitted by: Akshay Jaggi <akshay1994.leo@gmail.com>
Reviewed by: royger

8 years agoMove the callout_reset() to the end of the work not having it stick
Bjoern A. Zeeb [Mon, 6 Jun 2016 14:01:09 +0000 (14:01 +0000)]
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

8 years agoIn if_purgeaddrs() we cannot hold the lock over the entire loop
Bjoern A. Zeeb [Mon, 6 Jun 2016 13:17:25 +0000 (13:17 +0000)]
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

8 years agoDestroy the mutex last. In this case it should not matter, but
Bjoern A. Zeeb [Mon, 6 Jun 2016 13:04:22 +0000 (13:04 +0000)]
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

8 years agoSYSINIT functions do not return a value; switch to void, remove
Bjoern A. Zeeb [Mon, 6 Jun 2016 13:01:57 +0000 (13:01 +0000)]
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

8 years agoProvide a public interface to rt_flushifroutes which takes the address
Bjoern A. Zeeb [Mon, 6 Jun 2016 12:49:47 +0000 (12:49 +0000)]
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

8 years agoMake the KASSERT message more helpful by also printing the ifp information
Bjoern A. Zeeb [Mon, 6 Jun 2016 10:13:48 +0000 (10:13 +0000)]
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

8 years agoRemove erroneous lock assertions
Stanislav Galabov [Mon, 6 Jun 2016 10:07:57 +0000 (10:07 +0000)]
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

8 years agoAdd support to priority code point (PCP) that is an 3-bit field
Marcelo Araujo [Mon, 6 Jun 2016 09:51:58 +0000 (09:51 +0000)]
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

8 years agosfxge(4): update TX vFIFO ULL tag location to avoid merge conflict
Andrew Rybchenko [Mon, 6 Jun 2016 09:30:31 +0000 (09:30 +0000)]
sfxge(4): update TX vFIFO ULL tag location to avoid merge conflict

Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): pick an RSS bucket for the packet enqueued and select TXQ accordingly
Andrew Rybchenko [Mon, 6 Jun 2016 09:08:16 +0000 (09:08 +0000)]
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

8 years agosfxge(4): set up the indirection table using the kernel-driven RSS bucket ids
Andrew Rybchenko [Mon, 6 Jun 2016 09:07:26 +0000 (09:07 +0000)]
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

8 years agosfxge(4): bind interrupts to CPUs in accordance with bucket to CPU map
Andrew Rybchenko [Mon, 6 Jun 2016 09:06:38 +0000 (09:06 +0000)]
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

8 years agosfxge(4): restrict the maximum number of RSS channels by the number of RSS buckets
Andrew Rybchenko [Mon, 6 Jun 2016 09:05:52 +0000 (09:05 +0000)]
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

8 years agosfxge(4): get RSS key to be programmed into NIC from the kernel
Andrew Rybchenko [Mon, 6 Jun 2016 09:05:06 +0000 (09:05 +0000)]
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

8 years agosfxge(4): prepare sfxge to be RSS API aware
Andrew Rybchenko [Mon, 6 Jun 2016 09:04:20 +0000 (09:04 +0000)]
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

8 years agohyperv/vmbus: Constify channel message
Sepherosa Ziehau [Mon, 6 Jun 2016 07:39:44 +0000 (07:39 +0000)]
hyperv/vmbus: Constify channel message

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6708

8 years agohyperv/vmbus: Factor out channel message processing
Sepherosa Ziehau [Mon, 6 Jun 2016 07:27:57 +0000 (07:27 +0000)]
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

8 years ago[bwn] don't use a 1MB CCK RTS frame for 11a OFDM transmissions.
Adrian Chadd [Mon, 6 Jun 2016 07:09:02 +0000 (07:09 +0000)]
[bwn] don't use a 1MB CCK RTS frame for 11a OFDM transmissions.

8 years agohyperv/vmbus: Define type for channel messages.
Sepherosa Ziehau [Mon, 6 Jun 2016 06:18:18 +0000 (06:18 +0000)]
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

8 years agohyperv: Move machine dependent bits into machine dependent files.
Sepherosa Ziehau [Mon, 6 Jun 2016 05:55:37 +0000 (05:55 +0000)]
hyperv: Move machine dependent bits into machine dependent files.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6701