Commit Graph

18228 Commits

Author SHA1 Message Date
Enji Cooper
562cbd7bcd Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:52:29 +00:00
Enji Cooper
85626903d5 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:52:00 +00:00
Enji Cooper
f36f637c6e Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:51:36 +00:00
Enji Cooper
eca3ef96a3 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:50:46 +00:00
Enji Cooper
c989c95116 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:50:19 +00:00
Enji Cooper
61d324734a Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths
This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:46:20 +00:00
Enji Cooper
1ec0c0f505 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:45:09 +00:00
Enji Cooper
49233bae4d Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:43:21 +00:00
Enji Cooper
cb7053336b Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:42:43 +00:00
Enji Cooper
ebc81ded1f Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:42:11 +00:00
Enji Cooper
aa5975162b Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:41:53 +00:00
Enji Cooper
a9468a4e63 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:40:55 +00:00
Enji Cooper
213efd3d26 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:40:10 +00:00
Enji Cooper
7423a04740 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:39:36 +00:00
Enji Cooper
bc77d8f48c Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:38:54 +00:00
Enji Cooper
5e9230be84 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:37:22 +00:00
Enji Cooper
6bc07fa1d6 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:37:03 +00:00
Enji Cooper
3cda95458d Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:36:48 +00:00
Enji Cooper
4781b8d840 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:36:28 +00:00
Enji Cooper
bf51ed485e Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:36:06 +00:00
Enji Cooper
d7258acdbd Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:35:49 +00:00
Enji Cooper
ff9aa684f0 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:35:36 +00:00
Enji Cooper
b7debe1d3f Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:35:18 +00:00
Enji Cooper
9582a53013 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:35:00 +00:00
Enji Cooper
42b623160c Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:34:34 +00:00
Enji Cooper
94989169d7 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:34:01 +00:00
Enji Cooper
92366c0683 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:33:45 +00:00
Enji Cooper
914108c810 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:33:20 +00:00
Enji Cooper
6e0ad41c47 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:32:36 +00:00
Enji Cooper
58368ba984 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:32:19 +00:00
Enji Cooper
a8f5f987e2 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:31:19 +00:00
Enji Cooper
8d8d6de65e Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:30:05 +00:00
Enji Cooper
b0ed3c8160 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:29:23 +00:00
Enji Cooper
bb930a3b16 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:29:05 +00:00
Enji Cooper
5943dd2a5e Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:28:41 +00:00
Enji Cooper
f6d8b2c698 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:28:16 +00:00
Enji Cooper
5bde33db9d Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:27:40 +00:00
Enji Cooper
f623ad832c Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:04:25 +00:00
Enji Cooper
5695441bc7 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 04:03:55 +00:00
Enji Cooper
c91dd79f91 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 03:59:10 +00:00
Enji Cooper
4cbc4dfef7 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 03:58:50 +00:00
Enji Cooper
e2ee3b6641 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 03:57:52 +00:00
Enji Cooper
9466ee8814 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 03:57:24 +00:00
Enji Cooper
b78d94bd05 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 03:56:42 +00:00
Enji Cooper
8b25e84105 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 03:56:10 +00:00
Enji Cooper
4b649713fd Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 03:55:43 +00:00
Enji Cooper
f347f2e2a7 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 03:55:21 +00:00
Enji Cooper
dd1ed99736 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 03:54:36 +00:00
Enji Cooper
23f6875a43 Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 03:52:16 +00:00
Enji Cooper
8834265235 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon
2017-01-20 03:34:59 +00:00
Enji Cooper
d85550da9d Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:	3 weeks
Sponsored by:	Dell EMC Isilon
2017-01-20 03:31:50 +00:00
Enji Cooper
c24988fd09 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output

MFC after:	3 weeks
Sponsored by:	Dell EMC Isilon
2017-01-20 03:27:47 +00:00
Enji Cooper
d0fd0203fb Replace dot-dot relative pathing with SRCTOP-relative paths where possible
This reduces build output, need for recalculating paths, and makes it clearer
which paths are relative to what areas in the source tree. The change in
performance over a locally mounted UFS filesystem was negligible in my testing,
but this may more positively impact other filesystems like NFS.

LIBC_SRCTOP was left alone so Juniper (and other users) can continue to
manipulate lib/libc/Makefile (and other Makefile.inc's under lib/libc) as
include Makefiles with custom options.

Discussed with:	marcel, sjg
MFC after:	1 week
Reviewed by:	emaste
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D9207
2017-01-20 03:23:24 +00:00
Ed Maste
3a067f5b07 libc: remove reference to nonexistent lib/locale directory
As far as I can tell this was introduced in r72406 and updated in several
subsequent revisions, but the lib/locale directory it referenced never
existed.

Reviewed by:	ngie
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D9252
2017-01-20 02:09:59 +00:00
Enji Cooper
0195177b26 Only conditionally add in hyperv support if we're building amd64
This unbreaks the build because the assembly is written for x64.

MFC after:	3 weeks
X-MFC with:	r312418
Pointyhat to:	ngie
Reported by:	Jenkins (i386 job)
Sponsored by:	Dell EMC Isilon
2017-01-19 18:07:24 +00:00
Enji Cooper
ab9bd41a5a Conditionalize hyperv support in gettimeofday(2) based on MK_HYPERV
The effect at runtime is negligible as the hyperv timer isn't available
except when hyperv is loaded.

This is a prerequisite for conditionalizing the header build/install out
of the build

MFC after:	3 weeks
Reviewed by:	sephe
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D9242
2017-01-19 17:03:45 +00:00
Enji Cooper
4a42ab7dda Use SRCTOP instead of .CURDIR-relative path in .PATH directive
MFC after:	3 weeks
Sponsored by:	Dell EMC Isilon
2017-01-18 18:14:50 +00:00
Hans Petter Selasky
f3e7afe2d7 Implement kernel support for hardware rate limited sockets.
- Add RATELIMIT kernel configuration keyword which must be set to
enable the new functionality.

- Add support for hardware driven, Receive Side Scaling, RSS aware, rate
limited sendqueues and expose the functionality through the already
established SO_MAX_PACING_RATE setsockopt(). The API support rates in
the range from 1 to 4Gbytes/s which are suitable for regular TCP and
UDP streams. The setsockopt(2) manual page has been updated.

- Add rate limit function callback API to "struct ifnet" which supports
the following operations: if_snd_tag_alloc(), if_snd_tag_modify(),
if_snd_tag_query() and if_snd_tag_free().

- Add support to ifconfig to view, set and clear the IFCAP_TXRTLMT
flag, which tells if a network driver supports rate limiting or not.

- This patch also adds support for rate limiting through VLAN and LAGG
intermediate network devices.

- How rate limiting works:

1) The userspace application calls setsockopt() after accepting or
making a new connection to set the rate which is then stored in the
socket structure in the kernel. Later on when packets are transmitted
a check is made in the transmit path for rate changes. A rate change
implies a non-blocking ifp->if_snd_tag_alloc() call will be made to the
destination network interface, which then sets up a custom sendqueue
with the given rate limitation parameter. A "struct m_snd_tag" pointer is
returned which serves as a "snd_tag" hint in the m_pkthdr for the
subsequently transmitted mbufs.

2) When the network driver sees the "m->m_pkthdr.snd_tag" different
from NULL, it will move the packets into a designated rate limited sendqueue
given by the snd_tag pointer. It is up to the individual drivers how the rate
limited traffic will be rate limited.

3) Route changes are detected by the NIC drivers in the ifp->if_transmit()
routine when the ifnet pointer in the incoming snd_tag mismatches the
one of the network interface. The network adapter frees the mbuf and
returns EAGAIN which causes the ip_output() to release and clear the send
tag. Upon next ip_output() a new "snd_tag" will be tried allocated.

4) When the PCB is detached the custom sendqueue will be released by a
non-blocking ifp->if_snd_tag_free() call to the currently bound network
interface.

Reviewed by:		wblock (manpages), adrian, gallatin, scottl (network)
Differential Revision:	https://reviews.freebsd.org/D3687
Sponsored by:		Mellanox Technologies
MFC after:		3 months
2017-01-18 13:31:17 +00:00
Enji Cooper
a0888761e8 Use SRCTOP where possible and use :H to manipulate .CURDIR to get rid of
unnecessarily long relative path .PATH values with make

MFC after:	1 days
Sponsored by:	Dell EMC Isilon
2017-01-17 03:58:37 +00:00
Enji Cooper
acf66ea77b Remove util.h (libutil.h) pollution from stdio.h compat header
Introducing libutil.h causes grief later because hexdump(3) in FreeBSD
and contrib/netbsd-tests/lib/libc/db/h_hash.c conflict.

I'm working adapting h_hash.c, but for now, unbreak the build in the
easiest way possible.
2017-01-16 20:43:30 +00:00
Enji Cooper
ebdc3e7fa1 Clarify #includes for hexdump vs sbuf_hexdump 2017-01-16 20:29:28 +00:00
Enji Cooper
a61b4567f3 MFhead@r312305 2017-01-16 19:04:57 +00:00
Enji Cooper
800a0e2672 libnetbsd: add pthread.h compat header
FreeBSD has pthread_np.h, which is used for consolidating all non-POSIX
functions, but NetBSD doesn't have this concept. Make _np functions work
seamlessly when ported from NetBSD to FreeBSD
2017-01-16 18:51:27 +00:00
Maxim Sobolev
339efd75a4 Add a new socket option SO_TS_CLOCK to pick from several different clock
sources to return timestamps when SO_TIMESTAMP is enabled. Two additional
clock sources are:

o nanosecond resolution realtime clock (equivalent of CLOCK_REALTIME);
o nanosecond resolution monotonic clock (equivalent of CLOCK_MONOTONIC).

In addition to this, this option provides unified interface to get bintime
(equivalent of using SO_BINTIME), except it also supported with IPv6 where
SO_BINTIME has never been supported. The long term plan is to depreciate
SO_BINTIME and move everything to using SO_TS_CLOCK.

Idea for this enhancement has been briefly discussed on the Net session
during dev summit in Ottawa last June and the general input was positive.

This change is believed to benefit network benchmarks/profiling as well
as other scenarios where precise time of arrival measurement is necessary.

There are two regression test cases as part of this commit: one extends unix
domain test code (unix_cmsg) to test new SCM_XXX types and another one
implementis totally new test case which exchanges UDP packets between two
processes using both conventional methods (i.e. calling clock_gettime(2)
before recv(2) and after send(2)), as well as using setsockopt()+recv() in
receive path. The resulting delays are checked for sanity for all supported
clock types.

Reviewed by:    adrian, gnn
Differential Revision:  https://reviews.freebsd.org/D9171
2017-01-16 17:46:38 +00:00
Enji Cooper
8a979e7ad7 libnetbsd: add sys/event.h compat header
This adds in necessary sys/types.h pollution for uintptr_t used in
sys/event.h, which according to kqueue(2) on NetBSD isn't necessary.
2017-01-15 22:00:30 +00:00
Enji Cooper
897afca52c libnetbsd: add sys/types.h header which pollutes itself with sys/param.h to
pick up NBBY, etc
2017-01-15 21:53:11 +00:00
Enji Cooper
6b9e8e4eb2 libnetbsd: add sys/wait.h compat header
This just defines wrusage to __wrusage for now (they're both structs).
2017-01-15 21:52:33 +00:00
Enji Cooper
eec0029f96 libnetbsd: more portability fixes with stdio.h and util.h
- stdio.h needs to pull in stdio.h/util.h for fparseln, not util.h
- util.h needs to #include sys/types.h for flags_to_string, etc as
  flags_to_string uses u_long, which is typedef'ed in sys/types.h on
  FreeBSD
2017-01-15 21:18:58 +00:00
Enji Cooper
9a2036bd1d Fix copy-pasted copyright
- Add Dell instead of "SRI International"
- Use standard BSD 2-clause copyright
- Remove DARPA sponsorship advertisement
2017-01-15 10:24:45 +00:00
Enji Cooper
6b0a2ac186 libnetbsd: add compat header for glob.h
This is to diff reduce unnecessary additions to
contrib/netbsd-tests/lib/libc/gen/t_glob.c
2017-01-15 10:16:20 +00:00
Enji Cooper
be996c0522 Add -DSKIP_LEFTASSOC to CFLAGS so leftassoc is skipped, like on NetBSD 2017-01-15 10:03:03 +00:00
Enji Cooper
8209d3fdf1 MFhead@r312217 2017-01-15 09:33:29 +00:00
Enji Cooper
5bd43b0033 Turn COMPILER_VERSION/COMPILER_TYPE make check into a compile-time check
of the clang version

This works around breakage on ^/stable/10 when running installworld from
a ^/stable/10 host where the test wouldn't be compiled on the first
go-around and would be missing when make installworld is run.

MFC after:	1 week
PR:		208703
Reported by:	emaste
Sponsored by:	Dell EMC Isilon
2017-01-15 09:05:26 +00:00
Enji Cooper
0a57eb32ad Remove CFLAGS for sha2_test
The previous code used to grab definitions from these openssl/openssh,
but this is no longer needed and is no longer correct. libnetbsd
provides all of the needed definitions

libnetbsd is added to CFLAGS automatically via netbsd-tests.test.mk --
hence all of CFLAGS can be cleared
2017-01-14 12:55:32 +00:00
Enji Cooper
c3b0c094b3 libnetbsd: improve sha2.h compat with FreeBSD
Add sha384 #include to libnetbsd's copy of sha2.h to expose all of the
SHA384 support via the header.
2017-01-14 08:10:37 +00:00
Enji Cooper
1cb4521644 Diff reduce with upstream using lib/libnetbsd's updated copy of sha1.h 2017-01-14 07:58:40 +00:00
Enji Cooper
59754238a2 libnetbsd: improve sha1.h compat with FreeBSD
Map SHA1_CTX to SHA_CTX and SHA1Final to SHA1_Final
2017-01-14 07:57:34 +00:00
Enji Cooper
acf26de3fa Add stdio.h #include for fparseln
fparseln on FreeBSD requires stdio.h, then libutil.h, whereas NetBSD only
requires util.h
2017-01-14 07:46:03 +00:00
Warren Block
b44047f3df Update the shm_open.2 man page to reflect objective reality.
PR:		215612
Submitted by:	rwatson
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D9066
2017-01-13 19:41:02 +00:00
Ed Maste
2f21ec0129 libgcc_s: add libc DT_NEEDED to fix underlinking
PR:		216012
Reported by:	jbeich
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2017-01-13 15:17:25 +00:00
Enji Cooper
ee5d5813c0 fmaxmin_test still fails with clang 3.9.x.. bypass the test
MFC after:	3 days
PR:		208703
Sponsored by:	Dell EMC Isilon
2017-01-13 04:21:09 +00:00
Enji Cooper
cdebaff820 Upgrade NetBSD tests to 01.11.2017_23.20 snapshot
This contains some new testcases in /usr/tests/...:

- .../lib/libc
- .../lib/libthr
- .../lib/msun
- .../sys/kern

Tested on:	amd64, i386
MFC after:	1 month
2017-01-13 03:33:57 +00:00
Enji Cooper
7ad417dff8 Add __BIT and __BITS macros from NetBSD to help support new testcases
MFC after:	1 week
2017-01-12 09:01:14 +00:00
Enji Cooper
b6bd3eb5f3 Add additional testcases missed in r311966 2017-01-12 08:46:19 +00:00
Enji Cooper
9527fa4f66 Remove __HAVE_LONG_DOUBLE #define from t_strtod.c and place it in Makefile
This is to enable support in other testcases

Inspired by lib/msun/tests/Makefile .

MFC after:	1 week
2017-01-12 08:40:52 +00:00
Enji Cooper
20d24fbb93 Sync ^/vendor/NetBSD/tests/dist with upstream 2017-01-12 07:26:39 +00:00
Enji Cooper
2254eda87e Commit updates accepted upstream (NetBSD) 2017-01-12 07:21:56 +00:00
Ian Lepore
f64342e354 Rework tty_drain() to poll the hardware for completion, and restore
drain timeout handling to historical freebsd behavior.

The primary reason for these changes is the need to have tty_drain() call
ttydevsw_busy() at some reasonable sub-second rate, to poll hardware that
doesn't signal an interrupt when the transmit shift register becomes empty
(which includes virtually all USB serial hardware).  Such hardware hangs
in a ttyout wait, because it never gets an opportunity to trigger a wakeup
from the sleep in tty_drain() by calling ttydisc_getc() again, after
handing the last of the buffered data to the hardware.

While researching the history of changes to tty_drain() I stumbled across
some email describing the historical BSD behavior of tcdrain() and close()
on serial ports, and the ability of comcontrol(1) to control timeout
behavior.  Using that and some advice from Bruce Evans as a guide, I've
put together these changes to implement the hardware polling and restore
the historical timeout behaviors...

 - tty_drain() now calls ttydevsw_busy() in a loop at 10 Hz to accomodate
   hardware that requires polling for busy state.

 - The "new historical" behavior for draining during close(2) is retained:
   the drain timeout is "1 second without making any progress".  When the
   1-second timeout expires, if the count of bytes remaining in the tty
   layer buffer is smaller than last time, the timeout is extended for
   another second.  Unfortunately, the same logic cannot be extended all
   the way down to the hardware, because the interface to that layer is a
   simple busy/not-busy indication.

 - Due to the previous point, an application that needs a guarantee that
   all data has been transmitted must use TIOCDRAIN/tcdrain(3) before
   calling close(2).

 - The historical behavior of honoring the drainwait setting for TIOCDRAIN
   (used by tcdrain(3)) is restored.

 - The historical kern.drainwait sysctl to control the global default
   drainwait time is restored, but is now named kern.tty_drainwait.

 - The historical default drainwait timeout of 300 seconds is restored.

 - Handling of TIOCGDRAINWAIT and TIOCSDRAINWAIT ioctls is restored
   (this also makes the comcontrol(1) drainwait verb work again).

 - Manpages are updated to document these behaviors.

Reviewed by:	bde (prior version)
2017-01-12 00:48:06 +00:00
Enji Cooper
d87ba4cf3a Pull in changes from upstream for lib/libc/{c063,gen,string,sys} to address
issues resolved in FreeBSD or support added to testcases

In collaboration with:	<christos@NetBSD.org>
2017-01-11 08:15:18 +00:00
Martin Matuska
9520841213 Build libarchive tests missing in r311899
MFC after:	1 week
X-MFC with:	r311899
2017-01-10 22:01:37 +00:00
Enji Cooper
4023a42882 Import lib/libc/ttyio/t_ttyio.c,1.3 2017-01-10 10:06:15 +00:00
Enji Cooper
887eb0f8da t_raise: import a minor grammar error fix to diff reduce with NetBSD 2017-01-10 10:02:44 +00:00
Konstantin Belousov
d9d09103dd Use standard Versions.def for libprocstat.
This makes the versions inheritance consistent for our versioned libraries.

Extracted from:	ino64
Discussed with:	kan
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-01-09 11:11:52 +00:00
Konstantin Belousov
06c76d249c Use tab for indent.
Extracted from:	ino64 work by gleb
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-01-09 10:47:20 +00:00
Enji Cooper
75b6a179ac Use nitems({mib,name}) instead of hardcoding their value
MFC after:	3 days
2017-01-09 00:54:18 +00:00
Enji Cooper
7adf46f0c6 lib/libutil/kinfo_*: style cleanup
- Use nitems(mib) instead of hardcoding mib's length
- Sort sys/ #includes

MFC after:	3 days
2017-01-09 00:47:23 +00:00
Conrad Meyer
f9d593d771 libprocstat: Include cd9660 headers in the same order as the kernel
Fix userspace build after r311665.
2017-01-08 08:36:37 +00:00
Baptiste Daroussin
0922cf8d32 remove network mask calculation for Classful network
Nowadays it's not necessary to compute network mask from the IP address and
compare to given by DHCP.

Submitted by:	kczekirda
Reviewed by:	glebius, bapt
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D8740
2017-01-07 23:42:17 +00:00
Konstantin Belousov
b7c7684ae2 Export __cxa_thread_atexit_impl as an alias for __cxa_thread_atexit.
libstdc++ before gcc r244057 expected that libc provided
__cxa_thread_atexit_impl, and libstdc++ implemented
__cxa_thread_atexit, by forwarding the calls to _impl.  Mentioned gcc
revision checks for __cxa_thread_atexit in libc and does not provide
the symbol from libstdc++ if found.

This change helps older gcc, in particular, all released versions
which implement thread_local, by consolidating the implementation into
libc.  For that versions, if configured with the current libc, the
__cxa_thread_atexit is exported from libstdc++ as a trivial wrapper
around libc::__cxa_thread_atexit_impl.

The __cxa_thread_atexit implementation is put into separate source
file to allow for static linking with older libstdc++.a.

gcc bugzilla:	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78968
Reported by:	Hannes Hauswedell <h2+fbsdports@fsfe.org>
PR:	215709
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2017-01-07 16:05:19 +00:00
Alexander Motin
26b1288f5a Make do_buff_decode() not read past the end of the buffer.
Abort format processing as soon as we have no enough data.

MFC after:	2 weeks
2017-01-07 09:33:11 +00:00