Commit Graph

213226 Commits

Author SHA1 Message Date
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
Bryan Drewery
a4a2269e0c Regenerate 2016-06-05 23:10:05 +00:00
Bryan Drewery
6f4b2e7f5c 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
2016-06-05 23:05:17 +00:00
Bryan Drewery
94bb24b387 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
2016-06-05 23:05:14 +00:00
Bryan Drewery
4d40df1bff 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
2016-06-05 23:05:10 +00:00
Bryan Drewery
f6b9561750 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
2016-06-05 23:05:07 +00:00
Bryan Drewery
9c8b82a95f 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
2016-06-05 23:05:04 +00:00
Bryan Drewery
7f17cd1c8d 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
2016-06-05 23:05:01 +00:00
Bryan Drewery
3681768c3f WITH_META_MODE: Enable bmake's missing meta rebuild feature 2016-06-05 23:04:42 +00:00
Bryan Drewery
bd2464674d 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
2016-06-05 23:04:15 +00:00
Bryan Drewery
96306ff24d Import latest meta.stage.mk 1.45 (r301462) 2016-06-05 21:21:41 +00:00
Simon J. Gerraty
b778b302be Import bmake-20160604
Performace improvements for meta mode.
2016-06-05 20:26:16 +00:00
Pedro F. Giffuni
3c2c0c0443 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)
2016-06-05 19:12:52 +00:00
Bryan Drewery
6c37a3d469 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
2016-06-05 18:16:33 +00:00
Konstantin Belousov
fc0924b9a4 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
2016-06-05 17:11:23 +00:00