Commit Graph

15913 Commits

Author SHA1 Message Date
Mark Johnston
e977d70f45 Revert r274200. Implicitly setting DEBUG_FLAGS when WITH_CTF is true is
not the right way to do this.

Requested by:	kan
2014-11-08 18:16:39 +00:00
Andrey V. Elsukov
f325335caf Overhaul if_gre(4).
Split it into two modules: if_gre(4) for GRE encapsulation and
if_me(4) for minimal encapsulation within IP.

gre(4) changes:
* convert to if_transmit;
* rework locking: protect access to softc with rmlock,
  protect from concurrent ioctls with sx lock;
* correct interface accounting for outgoing datagramms (count only payload size);
* implement generic support for using IPv6 as delivery header;
* make implementation conform to the RFC 2784 and partially to RFC 2890;
* add support for GRE checksums - calculate for outgoing datagramms and check
  for inconming datagramms;
* add support for sending sequence number in GRE header;
* remove support of cached routes. This fixes problem, when gre(4) doesn't
  work at system startup. But this also removes support for having tunnels with
  the same addresses for inner and outer header.
* deprecate support for various GREXXX ioctls, that doesn't used in FreeBSD.
  Use our standard ioctls for tunnels.

me(4):
* implementation conform to RFC 2004;
* use if_transmit;
* use the same locking model as gre(4);

PR:		164475
Differential Revision:	D1023
No objections from:	net@
Relnotes:	yes
Sponsored by:	Yandex LLC
2014-11-07 19:13:19 +00:00
Mark Johnston
59a9e2ca26 Automatically build with debug symbols when building with WITH_CTF.
Otherwise there's nothing for ctfconvert to do, and it ends up emitting an
error for each object file. Also remove some redundant checks from
bsd.prog.mk and bsd.lib.mk.

Differential Revision:	https://reviews.freebsd.org/D1111
Reviewed by:		imp
2014-11-06 22:46:40 +00:00
Warner Losh
bd808d4133 Ignore errors from rm -rf to support high -j builds. This is, at best,
a kludge. However, it also effectively works around the issues for
high -j builds on systems that do not have the rm fixes.

A better fix would be to rmdir here, and fix the places where we're
sloppy and not list all the files we create in CLEANFILES, should
anybody have the time to chase them all to ground.
2014-11-06 17:19:41 +00:00
Alexander V. Chernikov
146a181f28 Finish r274118: remove useless fields from struct domain.
Sponsored by:	Yandex LLC
2014-11-06 14:39:04 +00:00
Devin Teske
041394f38a Add new libraries/utilities for data throughput visualization.
dpv(3): dialog progress view library
dpv(1): stream data from stdin or multiple paths with dialog progress view
figpar(3): configuration file parsing library

Reviews:	D714
Reviewed by:	jelischer, shurd
Discussed at:	MeetBSD California 2014 Vendor/Dev Summit
Discussed on:	-current
MFC after:	21 days
X-MFC-to:	stable/10 stable/9
2014-11-04 23:46:01 +00:00
John-Mark Gurney
cea971c122 convert .Nm to proper .Xr's... 2014-11-04 08:22:08 +00:00
Enji Cooper
068ebf3274 Import proper fix for misc/49356 (/usr/include/atf-c/config.h) after atf-c/config.h
was removed from the build

Pointyhat to: me (again, for not running make delete-old after running test builds)
2014-11-04 05:02:22 +00:00
Enji Cooper
db572ab644 As an optimization (in simple, well used cases) only call cat ${.ALLSRC} when
generating files from various sources instead of calling cat ${.ALLSRC} | sed

The perl case was skipped because it's not being used in the tree at this time
2014-11-04 01:57:31 +00:00
Enji Cooper
37e4638f2e Add Makefile snippet to ease porting NetBSD testcases to FreeBSD from
contrib/netbsd-tests

This Makefile snippet handles polluting testcases with -lnetbsd, specific
headers for ATF version differences, and does necessary rewriting for the
testcases to match the format discussed on the TestSuite wiki page
(t_<foo> -> <foo>_test)

One must define SRCTOP (inspired by projects/bmake), OBJTOP, and TESTSRC
(e.g. contrib/netbsd-tests/lib/libc/gen) to use the Makefile snippet

Test programs are specific either via NETBSD_ATF_TESTS_C or NETBSD_ATF_TESTS_SH

C++ analogs aren't currently implemented.

The imported testcases will be cleaned up to use this Makefile snippet pseudo
"API".
2014-11-04 00:19:10 +00:00
Jean-Sébastien Pédron
4261dbcfa6 vt(4): Start new sentences on their own lines
Submitted by:	brueffer@
MFC after:	1 week
2014-11-03 16:01:44 +00:00
Jean-Sébastien Pédron
a95c461233 vt(4): Improve the description of kern.vt.fb.modes.$connector
Differential Revision:	https://reviews.freebsd.org/D1098
Submitted by:	emaste@
MFC after:	1 week
2014-11-03 15:25:48 +00:00
Jean-Sébastien Pédron
79c4bda828 vt(4): Document kern.vt.fb.default_mode and kern.vt.fb.modes.*
Those tunables are used to set a specific mode in vt(4) instead of using
the default mode.

Differential Revision:	https://reviews.freebsd.org/D1098
Reviewed by:	ak@, emaste@, kwm@
MFC after:	1 week
2014-11-03 14:57:41 +00:00
Enji Cooper
fa8093473b Integrate pjdfstest test suite execution into kyua
pjdfstest execution is opt-in and must be done as root due to some of the
assumptions made by the test suite and lack of error checking in the non-root
case

A description of how to execute pjdfstest with kyua is provided in
share/pjdfstest/README

Phabric: D824 (an earlier prototype patch)
MFC after: 1 month
Relnotes: yes
Sponsored by: EMC / Isilon Storage Division
2014-11-03 07:18:42 +00:00
Konstantin Belousov
72ba3c0822 Fix two issues with lockmgr(9) LK_CAN_SHARE() test, which determines
whether the shared request for already shared-locked lock could be
granted.  Both problems result in the exclusive locker starvation.

The concurrent exclusive request is indicated by either
LK_EXCLUSIVE_WAITERS or LK_EXCLUSIVE_SPINNERS flags.  The reverse
condition, i.e. no exclusive waiters, must check that both flags are
cleared.

Add a flag LK_NODDLKTREAT for shared lock request to indicate that
current thread guarantees that it does not own the lock in shared
mode.  This turns back the exclusive lock starvation avoidance code;
see man page update for detailed description.

Use LK_NODDLKTREAT when doing lookup(9).

Reported and tested by:	pho
No objections from:	attilio
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2014-11-02 13:10:31 +00:00
John-Mark Gurney
7bd12696d7 add an rc.d script to automatically grow the specified FS... It has
been tested on both MBR and GPT...  It won't be enabled until you add
growfs_enable="YES" and will only run on first boot..
2014-11-02 00:11:25 +00:00
Julio Merino
0677dfd1c4 MFV: Import atf-0.21. 2014-11-01 11:17:54 +00:00
Konstantin Belousov
2361c6d135 Add type qualifier volatile to the base (userspace) address argument
of fuword(9) and suword(9).  This makes the functions type-compatible
with volatile objects and does not require devolatile force, e.g. in
kern_umtx.c.

Requested by:	bde
Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
MFC after:	3 weeks
2014-10-31 17:43:21 +00:00
Julio Merino
30175d7650 Use the right depend file for each program.
bsd.progs.mk generates a separate depend file for every program being
built, but then it does not properly tell each submake to use those
individual files.  Properly propagate the depend file to use.

Discovered while preparing the update of atf to 0.21 and noticing that
the test programs were not being relinked to the new library.

This change is "make tinderbox" clean.
2014-10-30 22:07:29 +00:00
Mark Murray
10cb24248a This is the much-discussed major upgrade to the random(4) device, known to you all as /dev/random.
This code has had an extensive rewrite and a good series of reviews, both by the author and other parties. This means a lot of code has been simplified. Pluggable structures for high-rate entropy generators are available, and it is most definitely not the case that /dev/random can be driven by only a hardware souce any more. This has been designed out of the device. Hardware sources are stirred into the CSPRNG (Yarrow, Fortuna) like any other entropy source. Pluggable modules may be written by third parties for additional sources.

The harvesting structures and consequently the locking have been simplified. Entropy harvesting is done in a more general way (the documentation for this will follow). There is some GREAT entropy to be had in the UMA allocator, but it is disabled for now as messing with that is likely to annoy many people.

The venerable (but effective) Yarrow algorithm, which is no longer supported by its authors now has an alternative, Fortuna. For now, Yarrow is retained as the default algorithm, but this may be changed using a kernel option. It is intended to make Fortuna the default algorithm for 11.0. Interested parties are encouraged to read ISBN 978-0-470-47424-2 "Cryptography Engineering" By Ferguson, Schneier and Kohno for Fortuna's gory details. Heck, read it anyway.

Many thanks to Arthur Mesh who did early grunt work, and who got caught in the crossfire rather more than he deserved to.

My thanks also to folks who helped me thresh this out on whiteboards and in the odd "Hallway track", or otherwise.

My Nomex pants are on. Let the feedback commence!

Reviewed by:	trasz,des(partial),imp(partial?),rwatson(partial?)
Approved by:	so(des)
2014-10-30 21:21:53 +00:00
Enji Cooper
05f0ff5a30 Fix the logic inversion in the previous commit by ensuring that the matched
expression (:M) is empty, not the not matched (:N) is empty. The former case
means we have not found the TEST_SUBDIR value in SUBDIR

Reported by: rodrigc
X-MFC with: r273803
Pointyhat to: me (did not use a clean install root)
Sponsored by: EMC / Isilon Storage Division
2014-10-29 04:32:46 +00:00
Enji Cooper
9aa9738938 Filter out TESTS_SUBDIRS already added to SUBDIR instead of blindly
appending the TESTS_SUBDIRS variable to SUBDIR

Duplicate directory entries can cause unexpected side effects, like
installing the same files multiple times. This can be easily
reproduced via the following testcase prior to this commit:

  SUBDIR= dir
  TESTS_SUBDIRS+= dir

  .include <bsd.test.mk>

Sponsored by: EMC / Isilon Storage Division
2014-10-28 23:01:09 +00:00
Jung-uk Kim
1561b87885 Actually install casuword(9) to fix build. 2014-10-28 16:19:02 +00:00
Konstantin Belousov
4f3dc90023 Add fueword(9) and casueword(9) functions. They are like fuword(9)
and casuword(9), but do not mix value read and indication of fault.

I know (or remember) enough assembly to handle x86 and powerpc.  For
arm, mips and sparc64, implement fueword() and casueword() as wrappers
around fuword() and casuword(), which means that the functions cannot
distinguish between -1 and fault.

On architectures where fueword() and casueword() are native, implement
fuword() and casuword() using fueword() and casuword(), to reduce
assembly code duplication.

Sponsored by:	The FreeBSD Foundation
Tested by:	pho
MFC after:	2 weeks (ia64 needs treating)
2014-10-28 15:22:13 +00:00
Xin LI
1545452c54 Remove an extra copy of hv_kvp_daemon(8) [1].
While I'm there also correct typos in OptionalObsoleteFiles and add
information of the command line options for hv_kvp_daemon(8).

Reported by:	jmg [1]
Reviewed by:	jmg
MFC after:	2 weeks
2014-10-27 21:29:42 +00:00
John Baldwin
9ef82a94ab Correct a typo: this is the manpage for pthread_cleanup_pop, not push.
Submitted by:	ian
2014-10-27 15:45:37 +00:00
Edward Tomasz Napierala
9d66b6a5a9 Mention VAAI and ODX in ctl(4).
Reviewed by:	mav@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-26 13:30:53 +00:00
John Baldwin
613a9773e5 Clarify that pthread_cleanup_push()/pop() are implemented as macros that
create a new code block and thus must be balanced at the same lexical
scope.  (This is also a requirement in POSIX.)

PR:		194280
Submitted by:	dr2867.business@pacbell.net
MFC after:	1 week
2014-10-25 19:31:34 +00:00
Kevin Lo
66fef59616 Add D-Link DWA-123 rev D1 and Elecom WDC-150SU2M. 2014-10-24 15:36:30 +00:00
John-Mark Gurney
dbb91b1415 minor updates to make it more explicit that when using fpu_kern_thread,
you don't need to use fpu_kern_enter/_leave...

Reviewed by:	kib
2014-10-23 17:24:50 +00:00
Bryan Venteicher
6f744ddee4 Add VirtIO console driver
Support for the multiport feature is mostly implemented, but currently
disabled due to some potential races in the hot plug code paths.

Requested by:	marcel
MFC after:	1 month
Relnotes:	yes
2014-10-23 04:47:32 +00:00
Enji Cooper
eb1fef6574 Fix linking static test binaries with atf.test.mk
Check for -static in LDFLAGS or LDFLAGS.<test>, then pass in the appropriate
dependency (LIBATF or LDATF)

This unbreaks the build with some of the NetBSD tests that need to be compiled
statically

Reviewed by: imp, jmmv
Phabric: D991
Sponsored by: EMC / Isilon Storage Division
2014-10-22 18:11:10 +00:00
Alexander Motin
4f8244bbf7 Document sort_io_queue sysctls/tunables.
MFC after:	1 week
2014-10-22 08:54:10 +00:00
John-Mark Gurney
14cac2a6f1 fix spelling of DEFAULT in comments... 2014-10-22 06:53:55 +00:00
Warner Losh
b55e8e6e0d My previous commit exposed an issue as it fixed a different
issue. lib/atf isn't a prereq_lib, since it isn't required for other
libraries to build. Remove it. The old kludge of always building it
had effectively been retired. Since we don't want to build the
libraries with the tests when we're bootstrapping, invent
MK_TESTS_SUPPORT which normally defaults to the current MK_TESTS
value, except when explicitly defined. Make lib/atf depend on it being
yes. When building the libraries set MK_TESTS to no, and
MK_TESTS_SUPPORT to the current value of MK_TESTS so that later stages
of the build work correctly. This should fix (and does for me)
people's issues with parallel builds racing between lib/atf and
libexec/atf. Since lib/atf is built during the libraries phase, the
race disappears.
2014-10-22 03:39:11 +00:00
Baptiste Daroussin
e82241aa78 Revert r273426 r273409
A solution that work with both new and old binutils should be investigated
2014-10-21 21:17:44 +00:00
Baptiste Daroussin
412013d7a8 older binutils does not know about --no-fatal-warnings 2014-10-21 21:09:54 +00:00
Ed Maste
a0f6423b3d Regenerate after r273418 2014-10-21 20:41:19 +00:00
Warner Losh
289ee3b601 For the kernel, we have USB_GADGET_EXAMPLES as defaults to yes. For
userland defaults to no. This caused issues for the automated option
documenation script. Turns out, this isn't used in userland at all, so
just remove it from here.
2014-10-21 20:29:53 +00:00
Baptiste Daroussin
9904471bf3 Do not make ld(1) warnings fatal anymore, binutils behaviour has changed over the
time and gnu.warnings.symbol are now being fatal preventing building world.

in the futur we want to investigate only making the gnu.warning.symbol non fatal

Reviewed by:	imp
2014-10-21 20:11:05 +00:00
Baptiste Daroussin
ff2cf3685b Always use libc++ as the default c++ stack when building with an external gcc 4.8+
While here disable building gcc from base when using gcc 4.8+

Reviewed by:	imp
2014-10-21 20:00:49 +00:00
Baptiste Daroussin
d8d1a9ad6c When using an external toolchain note that gcc 4.8+ supports C++11
Submitted by:	imp
2014-10-21 19:58:23 +00:00
Baptiste Daroussin
8447c44fe7 The dependencies are computed with CC even if sources are C++, when building
when building with an external gcc, we want to be able to pass the path to
the libc++ headers so dependencies are correctly computed for C++ source files.
Add a DEPFLAGS for that purpose

Reviewed by:	imp
2014-10-21 19:56:45 +00:00
John-Mark Gurney
d31a976084 it is not cast to a pointer of the specified type, it is cast to the
specified type...

mtod(m, uint8_t) does not work, mtod(m, uint8_t *) does work..
2014-10-21 17:59:27 +00:00
John-Mark Gurney
e0912e08e4 spell out the arguments..
the + *offsetp does not belong w/ the type, move it outside the .Fn
macro...
2014-10-21 17:17:40 +00:00
Hans Petter Selasky
f0188618f2 Fix multiple incorrect SYSCTL arguments in the kernel:
- Wrong integer type was specified.

- Wrong or missing "access" specifier. The "access" specifier
sometimes included the SYSCTL type, which it should not, except for
procedural SYSCTL nodes.

- Logical OR where binary OR was expected.

- Properly assert the "access" argument passed to all SYSCTL macros,
using the CTASSERT macro. This applies to both static- and dynamically
created SYSCTLs.

- Properly assert the the data type for both static and dynamic
SYSCTLs. In the case of static SYSCTLs we only assert that the data
pointed to by the SYSCTL data pointer has the correct size, hence
there is no easy way to assert types in the C language outside a
C-function.

- Rewrote some code which doesn't pass a constant "access" specifier
when creating dynamic SYSCTL nodes, which is now a requirement.

- Updated "EXAMPLES" section in SYSCTL manual page.

MFC after:	3 days
Sponsored by:	Mellanox Technologies
2014-10-21 07:31:21 +00:00
Mark Johnston
e9083b2dc5 Fix a few small bugs in the DTrace USDT rules:
* anchor search strings appropriately,
* use .ALLSRC to pass the full path to the D script to dtrace(1),
* don't insert the auto-generated header into SRCS - it doesn't
  accomplish anything, and we end up having to remove it from OBJS anyway.

Reviewed by:		rpaulo
Differential Revision:	https://reviews.freebsd.org/D978
MFC after:		3 weeks
Sponsored by:		EMC / Isilon Storage Division
2014-10-21 04:30:00 +00:00
Sergey Kandaurov
f2f9dcf1e1 Mac OS X 10.10 added. 2014-10-20 15:41:11 +00:00
Ed Maste
5e81927466 Add vtfontcvt(8) cross-reference to vt(4) man page
Reported by:	beeessdee@ruggedinbox.com
MFC after:	3 days
2014-10-20 14:48:20 +00:00
Bryan Venteicher
007054f070 Add vxlan interface
vxlan creates a virtual LAN by encapsulating the inner Ethernet frame in
a UDP packet. This implementation is based on RFC7348.

Currently, the IPv6 support is not fully compliant with the specification:
we should be able to receive UPDv6 packets with a zero checksum, but we
need to support RFC6935 first. Patches for this should come soon.

Encapsulation protocols such as vxlan emphasize the need for the FreeBSD
network stack to support batching, GRO, and GSO. Each frame has to make
two trips through the network stack, and each frame will be at most MTU
sized. Performance suffers accordingly.

Some latest generation NICs have begun to support vxlan HW offloads that
we should also take advantage of. VIMAGE support should also be added soon.

Differential Revision:	https://reviews.freebsd.org/D384
Reviewed by:	gnn
Relnotes:	yes
2014-10-20 14:42:42 +00:00