]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agolibsupc++: Fix typo in symbol map.
pfg [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

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

As in UFS r300366.

7 years agoFix memory leaks in (a|)daregister introduced in r298002
cem [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

7 years agoiflib: Improve cleanup on iflib_queues_alloc error path
cem [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

7 years agonfs_clvfsops: Fix leading whitespace introduced in r299848
cem [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

7 years agoSwitch arm64 to use intrng by default. The old interrupt handling code can
andrew [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

7 years agonfs_clvfsops: Prevent strdup of stack garbage with bogus mount specs
cem [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

7 years agoiflib: Fix potential leak in iflib_if_transmit
cem [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

7 years agoFix a minor leak in ACPI thermal
cem [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

7 years agoStart to clean MIDR values using the CPUID scheme. We don't need to know
andrew [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

7 years agoext2fs: rearrange ext4_bmapext().
pfg [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

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

Obtained from: NetBSD

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

7 years agoBump dates in blacklist related manpages
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

7 years agoDocument BLACKLIST related build options
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

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

Sponsored by: The FreeBSD Foundation

7 years agoNote blacklist support first appeared in FreeBSD 11
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

7 years agoAdd blacklist support to sshd
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

7 years agong_mppc(4): Bring netgraph(3) MPPC compression support.
pfg [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.

7 years agong_mppc(4): Bring netgraph(3) MPPC compression support.
pfg [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

7 years agoext2fs: cleanup generation number management.
pfg [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

7 years agoDocument 300779, Dummynet AQM version 0.2.1
skreuzer [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)

7 years agoAdd SR-IOV guest support to the mlx5en driver.
hselasky [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

7 years agoFallback to arc4rand() in the LinuxKPI when read_random() returns
hselasky [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

7 years agoRemove temporary solution for storing interrupt mapping data as
skra [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.

7 years agocxgbe(4): A couple of fixes to set_sched_queue.
np [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

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

Reported by: rodrigc

7 years agocxgbe(4): Provide information about traffic classes in the sysctl mib.
np [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

7 years agoINTRNG: As follow up of r301451, implement mapping and configuration
mmel [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.

7 years agonet: Use M_HASHTYPE_OPAQUE_HASH if the mbuf flowid has hash properties
sephe [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

7 years ago[ath3k] add a replacement ath3k firmware loading tool.
adrian [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

7 years agoAdd an entry on rc.conf(5) explaining the new options
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

7 years agocxgbe(4): Track the state of the hardware traffic schedulers in the
np [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

7 years agoAfter tearing down the interface per-"domain" bits, set the data area
bz [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

7 years agonewsyslog: Eliminate unnecessary sleep(10) when -R and -s are specified
vangyzen [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

7 years agocxgbe(4): Break up set_sched_class. Validate the channel number and
np [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

7 years agoMake KASSERT message more useful by printing the variables on which
bz [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

7 years agoAdd a `show igi_list` command to DDB to debug IGMP state.
bz [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

7 years agoImplement a `show panic` command to DDB which will helpfully print the
bz [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

7 years agocxgbe(4): Create a reusable struct type for scheduling class parameters.
np [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

7 years agoDefer the creation of ACPI thermal kthreads to a startup sysinit.
jhb [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.

7 years agoUpdate blacklist support in ftpd to clarify fd usage
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

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

Sponsored by: Chelsio Communications

7 years agoTurn off blacklistd daemon in defaults
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

7 years agoSimilarly to r301505 protect the removal of the ifa from the if_addrhead
bz [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

7 years agoindent(1): Fix typo.
pfg [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

7 years agoxen-netfront: fix initialization
royger [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

7 years agoxen: Correct typo in #undef for symbol NBPL
royger [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

7 years agoMove the callout_reset() to the end of the work not having it stick
bz [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

7 years agoIn if_purgeaddrs() we cannot hold the lock over the entire loop
bz [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

7 years agoDestroy the mutex last. In this case it should not matter, but
bz [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

7 years agoSYSINIT functions do not return a value; switch to void, remove
bz [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

7 years agoProvide a public interface to rt_flushifroutes which takes the address
bz [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
bz [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
sgalabov [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
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
arybchik [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
arybchik [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
arybchik [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
arybchik [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
arybchik [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
arybchik [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
arybchik [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
sephe [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
sephe [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 [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.
sephe [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.
sephe [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

8 years agoFor pointers use NULL instead of 0.
araujo [Mon, 6 Jun 2016 04:18:56 +0000 (04:18 +0000)]
For pointers use NULL instead of 0.

8 years agoConnect ypldap(8) script on Makefile, forgotten on my previous commit r301480.
araujo [Mon, 6 Jun 2016 04:13:49 +0000 (04:13 +0000)]
Connect ypldap(8) script on Makefile, forgotten on my previous commit r301480.

8 years agoAdd rc.d script for ypldap(8).
araujo [Mon, 6 Jun 2016 03:55:00 +0000 (03:55 +0000)]
Add rc.d script for ypldap(8).

8 years agoInstall/Connect ypldap.conf(5) on examples.
araujo [Mon, 6 Jun 2016 02:43:41 +0000 (02:43 +0000)]
Install/Connect ypldap.conf(5) on examples.

8 years agoAdd missing constants from RFCs 4443 and 6550
gnn [Mon, 6 Jun 2016 00:35:45 +0000 (00:35 +0000)]
Add missing constants from RFCs 4443 and 6550

8 years agolegacy: Avoid building/installing headers twice.
bdrewery [Sun, 5 Jun 2016 23:56:28 +0000 (23:56 +0000)]
legacy: Avoid building/installing headers twice.

Sponsored by: EMC / Isilon Storage Division

8 years agoUse the in-tree sys/elf_common.h
bdrewery [Sun, 5 Jun 2016 23:34:19 +0000 (23:34 +0000)]
Use the in-tree sys/elf_common.h

This is the same fix as r301471.

8 years agoRegenerate
bdrewery [Sun, 5 Jun 2016 23:16:27 +0000 (23:16 +0000)]
Regenerate

8 years agoDocument WITH_META_MODE enforcing WITHOUT_SYSTEM_COMPILER.
bdrewery [Sun, 5 Jun 2016 23:14:06 +0000 (23:14 +0000)]
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.

8 years agoRegenerate
bdrewery [Sun, 5 Jun 2016 23:10:05 +0000 (23:10 +0000)]
Regenerate

8 years agoOnly include bsd.compiler.mk for bmakes that use -m .../share/mk by default.
bdrewery [Sun, 5 Jun 2016 23:05:17 +0000 (23:05 +0000)]
Only include bsd.compiler.mk for bmakes that use -m .../share/mk by default.

Otherwise they error when trying to include the file, which also has
its own dependencies.

Sponsored by: EMC / Isilon Storage Division

8 years agoUse the in-tree sys/elf_common.h to build libelftc.
bdrewery [Sun, 5 Jun 2016 23:05:14 +0000 (23:05 +0000)]
Use the in-tree sys/elf_common.h to build libelftc.

This fixes build failures on older releases that lack various
definitions such as EM_AARCH64 (which was unfixed before this).

Revert all of the recent compatibility changes that worked around this
problem.

This uses the same method of using the in-tree header as lib/libelf,
lib/libdwarf and usr.bin/readelf.

Reviewed by: emaste
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D6734

8 years agoAdd a MINIMUM_SUPPORTED_OSREL and bump it to 900044.
bdrewery [Sun, 5 Jun 2016 23:05:10 +0000 (23:05 +0000)]
Add a MINIMUM_SUPPORTED_OSREL and bump it to 900044.

This is actually a revision in the stable/9 branch released as 9.1.  The
localedef build requires xlocale from this period.

Sponsored by: EMC / Isilon Storage Division

8 years agoDIRDEPS_BUILD: Fix bootstrap-tools not handling CCACHE_DIR properly.
bdrewery [Sun, 5 Jun 2016 23:05:07 +0000 (23:05 +0000)]
DIRDEPS_BUILD: Fix bootstrap-tools not handling CCACHE_DIR properly.

CCACHE_DIR needs to be resolved to its full path before processing
legacy.meta or meta mode may see the change to the stats file.

Sponsored by: EMC / Isilon Storage Division

8 years agoWITH_SYSTEM_COMPILER: Disable with WITH_META_MODE for now.
bdrewery [Sun, 5 Jun 2016 23:05:04 +0000 (23:05 +0000)]
WITH_SYSTEM_COMPILER: Disable with WITH_META_MODE for now.

The WITH_META_MODE build is intended to be a working incremental build.
It spies on the build command to see if things should be rebuilt if the
command changes.  If you run buildworld, it builds a cross-compiler,
then do installworld and buildworld again it will invoke the
WITH_SYSTEM_COMPILER logic.  This then adds on -target/--sysroot, etc,
and causes rebuilds due to the changed build command even though the
compiler used is technically the same revision.  Since the incremental
build is not cleaning anything by default then there is much
less risk to rebuilding the already-existing cross-compiler.  Just
disable the combined logic and always use and build the cross-compiler.

An alternative to this would be to always pass -target/--sysroot.  Doing
so may occur in the future.

Sponsored by: EMC / Isilon Storage Division

8 years agoWITH_META_MODE: Avoid host tool timestamps causing a rebuild.
bdrewery [Sun, 5 Jun 2016 23:05:01 +0000 (23:05 +0000)]
WITH_META_MODE: Avoid host tool timestamps causing a rebuild.

Using buildworld, installworld, buildworld.  It is expected that nothing
should rebuild.  However any host tool used could have its timestamp
updated.  Any library used by dynamic tools could have its timestamp
updated.  The filemon(4) data in the .meta files captures all reads to
these files.  This causes the 2nd buildworld to rebuild everything since
host tools and files have been updated.

Because the build is self-reliant and bootstraps itself, it should be
safe to ignore mtime changes on host files used during the build.  Host
files should only impact the build of legacy, build-tools, bootstrap-tools,
cross-tools, but those are already intended to be reproducible from its
own bootstrapping.  It is possible in a rare case that a bug in a host
file does produce a broken build tool.  If that happens it will just
have to be communicated properly.

An alternative solution would be to update the mtime of all files in the
object directory after installworld so that the host files are not newer
than the object files.  That also requires special care for read-only
obj directories and special care to not mess with any intended timestamps in
the build, such as done for reproducibility.

Reported by: many
Sponsored by: EMC / Isilon Storage Division

8 years agoWITH_META_MODE: Enable bmake's missing meta rebuild feature
bdrewery [Sun, 5 Jun 2016 23:04:42 +0000 (23:04 +0000)]
WITH_META_MODE: Enable bmake's missing meta rebuild feature

8 years agoFix bmake version upgrade logic to use the new bmake.
bdrewery [Sun, 5 Jun 2016 23:04:15 +0000 (23:04 +0000)]
Fix bmake version upgrade logic to use the new bmake.

Otherwise it was only used on the next build.

This was a flaw in r295980.

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

8 years agoImport latest meta.stage.mk 1.45 (r301462)
bdrewery [Sun, 5 Jun 2016 21:21:41 +0000 (21:21 +0000)]
Import latest meta.stage.mk 1.45 (r301462)

8 years agoImport bmake-20160604
sjg [Sun, 5 Jun 2016 20:26:16 +0000 (20:26 +0000)]
Import bmake-20160604

Performace improvements for meta mode.

8 years agolibc/locale: Fix type breakage in __collate_range_cmp().
pfg [Sun, 5 Jun 2016 19:12:52 +0000 (19:12 +0000)]
libc/locale: Fix type breakage in __collate_range_cmp().

When collation support was brought in, the second and third
arguments in __collate_range_cmp() were changed from int to
wchar_t, breaking the ABI. Change them to a "char" type which
makes more sense and keeps the ABI compatible.

Also introduce __wcollate_range_cmp() which does work with wide
characters. This function is used only internally in libc so
we don't export it. Use the new function in glob(3), fnmatch(3),
and regexec(3).

PR: 179721
Suggested by: ache. jilles
MFC after: 3 weeks (perhaps partial only)

8 years agoCleanup COMPAT_FREEBSD32 support.
bdrewery [Sun, 5 Jun 2016 18:16:33 +0000 (18:16 +0000)]
Cleanup COMPAT_FREEBSD32 support.

This is a NOP.

The COMPAT_IA32 was renamed in r205014 to COMPAT_FREEBSD32 and
COMPAT_ARCH32 does not seem to have existed.  Also remove some
leftovers from the sysent rework in r301404.  Include
freebsd32_util.h for the freebsd32_sysent prototype.

X-MFC-With: r301404
Reported by: kib
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

8 years agoAvoid spurious EINVAL in amd64 pmap_change_attr().
kib [Sun, 5 Jun 2016 17:11:23 +0000 (17:11 +0000)]
Avoid spurious EINVAL in amd64 pmap_change_attr().

Do not try to change attributes for DMAP when working on a mapping
which is not covered by the DMAP. This was reported on real system
where a BAR of a device (NTB) was mapped outside the PCI window.

Reported and tested by: mav
Reviewed by: jhb, mav
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D6668

8 years agoGet rid of struct proc p_sched and struct thread td_sched pointers.
kib [Sun, 5 Jun 2016 17:04:03 +0000 (17:04 +0000)]
Get rid of struct proc p_sched and struct thread td_sched pointers.

p_sched is unused.

The struct td_sched is always co-allocated with the struct thread,
except for the thread0.  Avoid useless indirection, instead calculate
td_sched location using simple pointer arithmetic in td_get_sched(9).
For thread0, which is statically allocated, create a structure to
emulate layout of the dynamic allocation.

Reviewed by: jhb (previous version)
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D6711

8 years agoUse ANSI function definition.
kib [Sun, 5 Jun 2016 16:55:55 +0000 (16:55 +0000)]
Use ANSI function definition.

Sponsored by: The FreeBSD Foundation

8 years agoINTRNG - change the way how an interrupt mapping data are provided
skra [Sun, 5 Jun 2016 16:20:12 +0000 (16:20 +0000)]
INTRNG - change the way how an interrupt mapping data are provided
to the framework in OFW (FDT) case.

This is a follow-up to r301451.

Differential Revision: https://reviews.freebsd.org/D6634

8 years agosh: Improve descriptions in 'ulimit -a' output.
jilles [Sun, 5 Jun 2016 16:09:31 +0000 (16:09 +0000)]
sh: Improve descriptions in 'ulimit -a' output.

The format limits descriptions to 18 characters and is not changed, so
the descriptions do not describe the limits exactly.

8 years ago(1) Add a new bus method to get a mapping data for an interrupt.
skra [Sun, 5 Jun 2016 16:07:57 +0000 (16:07 +0000)]
(1) Add a new bus method to get a mapping data for an interrupt.

BUS_MAP_INTR() is used to get an interrupt mapping data according
to provided hints. The hints could be modified afterwards, but only
if mapping data was allocated. This method is intended to be called
before BUS_ALLOC_RESOURCE().

An interrupt mapping data describes an interrupt - hardware number,
type, configuration, cpu binding, and whatever is needed to setup it.

(2) Introduce a method which allows storing of an additional data
in struct resource to be available for bus drivers. This method is
convenient in two ways:
 - there is no need to rework existing bus drivers as they can simply
   be extended to provide an additional data,
 - there is no need to modify any existing bus methods as struct
   resource is already passed to them as argument and thus stored data
   is simply accessible by other bus drivers.
For now, implement this method only for INTRNG.

This is motivated by needs of modern SOCs where hardware initialization
is not straightforward and resources descriptions are complex, opaque
for everyone but provider, and may vary from SOC to SOC. Typical
situation is that one bus driver can fetch a resource description for
its child device, but it's opaque for this driver. Another bus driver
knows a provider for this kind of resource and can pass this resource
description to it. In fact, something like device IVARS would be
perfect for that if implemented generally enough. Unfortunatelly, IVARS
are usable only by their owners now. Only owner knows its IVARS layout,
thus other bus drivers are not able to use them.

Differential Revision: https://reviews.freebsd.org/D6632

8 years agoReflect error indication according to POSIX and what those functions
ache [Sun, 5 Jun 2016 15:46:14 +0000 (15:46 +0000)]
Reflect error indication according to POSIX and what those functions
currently do.

8 years agoFix build with external gcc
bapt [Sun, 5 Jun 2016 11:56:03 +0000 (11:56 +0000)]
Fix build with external gcc

Completly disable some extra optimisation for very recent gcc.
They would require some updated in the runtime which we do not have yet

8 years agoFix 4-byte overflow in ipv6_writemask.
melifaro [Sun, 5 Jun 2016 10:33:53 +0000 (10:33 +0000)]
Fix 4-byte overflow in ipv6_writemask.

This bug could cause some IPv6 table prefix delete requests to fail.

Obtained from: Yandex LLC

8 years agoEnsure old gcc does not accidently get the attributes it does not know about
bapt [Sun, 5 Jun 2016 09:38:48 +0000 (09:38 +0000)]
Ensure old gcc does not accidently get the attributes it does not know about