Commit Graph
3600 Commits
Author SHA1 Message Date
Ondřej Surý cc18f4500a WIP: Add F&A Array Queue implementation 2019-09-12 09:23:16 +02:00
Ondřej Surý 80143307f8 Add implementation of hazard pointers 2019-09-12 09:22:48 +02:00
Ondřej Surý 773f429626 Update the whitespaces 2019-09-11 10:31:48 +02:00
Ondřej Surý 8f4b3e58b7 Add ISC_UNREACHABLE(); to isc_nm_send() default branch 2019-09-10 17:11:04 +02:00
Ondřej Surý c17cbec4dd fixup: Include <isc/print.h> in new netmgr.h 2019-09-10 17:10:15 +02:00
Ondřej Surý 2da9647455 Add new function prototypes for win32 def file 2019-09-10 17:09:45 +02:00
Witold KręcickiandOndřej Surý 79d45de664 netmgr: checkpoint: sanitize tcphandle handling, it was wrong 2019-09-10 17:06:47 +02:00
Witold KręcickiandOndřej Surý 086de03aa7 netmgr: checkpoint: isc_task_pause/unpause - we want to pause client->task when we're processing it outside taskmgr (directly from network thread) 2019-09-10 17:06:47 +02:00
Witold KręcickiandOndřej Surý ba28f8c96a netmgr: proper closing of TCP/TCPDNS connections, TCP quota support 2019-09-10 17:06:47 +02:00
Evan HuntandOndřej Surý edb42c66f8 fixup: simplify a complex boolean expression; fix style nits 2019-09-10 17:06:47 +02:00
Witold KręcickiandOndřej Surý 10819373a9 fixup! Split netmgr into functional pieces properly 2019-09-10 17:06:47 +02:00
Witold KręcickiandOndřej Surý c86c24f69c netmgr: stop DNS listening, pt 2 2019-09-10 17:06:47 +02:00
Witold KręcickiandOndřej Surý 24751997c4 netmgr: stop DNS listening, pt 1 2019-09-10 17:06:47 +02:00
Witold KręcickiandOndřej Surý e34d47b651 netmgr: pause/resume netmgr when going exclusive 2019-09-10 17:06:47 +02:00
Witold KręcickiandOndřej Surý 07fc9d247c netmgr: isc_nm_pause/resume implementations - holds all processing 2019-09-10 17:06:47 +02:00
Witold KręcickiandOndřej Surý 71c7a22923 netmgr: set thread affinity 2019-09-10 17:06:47 +02:00
Witold KręcickiandOndřej Surý 2e6ed654c4 netmgr: Set larger buffer size on UDP sockets 2019-09-10 17:06:47 +02:00
Witold KręcickiandOndřej Surý facf3af6df netmgr: client mctxs divided by thread 2019-09-10 17:06:47 +02:00
Witold KręcickiandOndřej Surý b8b6dba9f8 fixup! nm: WiP: proper udp shutdown procedure 2019-09-10 17:06:47 +02:00
Witold KręcickiandOndřej Surý d42de0c290 nm: WiP: proper udp shutdown procedure 2019-09-10 17:06:47 +02:00
Witold KręcickiandOndřej Surý fa74784835 nm: some style nits, better handling of UDP shutdown 2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý 2ae0f9d00a isc__nm_in_netthread 2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý 8461e06eb4 Don't reference sockets in unused handles, causing ref loop 2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý 7524f29d50 Cleanups 2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý e6e02d534a Style fixes 2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý be287351f6 Missing file 2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý 85262728f1 Split netmgr into functional pieces properly 2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý aff025723e Dirty and ugly split of netmgr into functional parts 2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý 7432f07bc1 Move netmgr to a separate diretory 2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý a83be985b4 netmgr: a big WiP on TCP/DNS 2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý def6642dd0 TCP WiP 2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý 016a3690f4 netmgr: Some parts of tcp; reuse nm_uvreqs 2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý 67d9c23d2b Minor cleanups 2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý a5392d83c6 Netmgr - work in progress (squashed)
Make a copy of ns__client_request as ns__client_request_old

The 'old' one will be used by not-yet-reworked parts, while we
keep history of ns__client_request.

Start netmgr with named, shutdown at the end

- udplistener in interfacemgr uses netmgr
- use per-client buffer for udp send
- first steps at making ns_client_request use netmgr for UDP
- uncrustify

Make interfacemgr and interface references isc_refcount_t instead of locked ints

Use clock_gettime instead of gettimeofday

Cleanup get_client, use one interface for clientmgr instead of attaching it to each client

'extra' field at the end of handle - for client data

WiP: no TCP, UDP works, no resolver
2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý 2b3f2bad31 Add isc_sockaddr_fromsockaddr function to convert from struct sockaddr to isc_sockaddr 2019-09-10 17:06:46 +02:00
Tinderbox User 3a1dbc13c9 prep for 9.15.4 2019-09-09 12:34:47 +00:00
Mark Andrews 2f558854b7 implement maxudp under windows 2019-09-04 10:04:14 +10:00
Ondřej Surý 32eee57875 lib/isc/siphash.c: Get rid of duplicate block caused by bad rebase 2019-09-03 14:20:53 +02:00
Ondřej Surý 30b716d220 Add OpenSSL based isc_siphash24() implementation
This commits adds an OpenSSL based isc_siphash24() implementation, which is
preferred when available.

The siphash_test has been modified to test both implementation with a trick that
renames the isc_siphash24() to openssl_ or native_ prefixed name and includes
the ../siphash.c two times (when the OpenSSL implementation is available).
2019-09-03 09:19:55 +02:00
Ondřej Surý 6fd3259560 Fix alignment issues in the native implementation of isc_siphash24()
The native implementation's conversion from the uint8_t buffers to uint64_t now
follows the reference implementation that doesn't require aligned buffers.
2019-09-02 13:21:07 +02:00
Ondřej Surý 50e109d659 isc_event_allocate() cannot fail, remove the fail handling blocks
isc_event_allocate() calls isc_mem_get() to allocate the event structure.  As
isc_mem_get() cannot fail softly (e.g. it never returns NULL), the
isc_event_allocate() cannot return NULL, hence we remove the (ret == NULL)
handling blocks using the semantic patch from the previous commit.
2019-08-30 08:55:34 +02:00
Tinderbox User d6a9407908 prep 9.15.3 2019-08-12 13:59:41 +00:00
Sergei TrofimovichandOndřej Surý a5ad6b16c5 configure.ac: autodetect 'pause' instruction presence on sparc
The change fixes the following build failure on sparc T3 and older CPUs:

```
sparc-unknown-linux-gnu-gcc ... -O2 -mcpu=niagara2 ... -c rwlock.c
{standard input}: Assembler messages:
{standard input}:398: Error: Architecture mismatch on "pause ".
{standard input}:398: (Requires v9e|v9v|v9m|m8; requested architecture is v9b.)
make[1]: *** [Makefile:280: rwlock.o] Error 1
```

`pause` insutruction exists only on `-mcpu=niagara4` (`T4`) and upper.

The change adds `pause` configure-time autodetection and uses it if available.
config.h.in got new `HAVE_SPARC_PAUSE` knob. Fallback is a fall-through no-op.

Build-tested on:

- sparc-unknown-linux-gnu-gcc (no `pause`, build succeeds)
- sparc-unknown-linux-gnu-gcc -mcpu=niagara4 (`pause`, build succeeds)

Reported-by: Rolf Eike Beer
Bug: https://bugs.gentoo.org/691708
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2019-08-08 07:15:04 -04:00
Ondřej Surý 2b632a232f Convert the configure.ac rules for zlib library to use pkg-config 2019-07-31 14:54:40 +02:00
Ondřej Surý 46919579bb Make isc_thread_join() assert internally on failure
Previously isc_thread_join() would return ISC_R_UNEXPECTED on a failure to
create new thread.  All such occurences were caught and wrapped into assert
function at higher level.  The function was simplified to assert directly in the
isc_thread_join() function and all caller level assertions were removed.
2019-07-31 11:56:58 +02:00
Ondřej Surý d6a60f2905 Make isc_thread_create() assert internally on failure
Previously isc_thread_create() would return ISC_R_UNEXPECTED on a failure to
create new thread.  All such occurences were caught and wrapped into assert
function at higher level.  The function was simplified to assert directly in the
isc_thread_create() function and all caller level assertions were removed.
2019-07-31 11:56:58 +02:00
Ondřej Surý a6dcdc535c Replace usage of isc_mem_put+isc_mem_detach with isc_mem_putanddetach
Using isc_mem_put(mctx, ...) + isc_mem_detach(mctx) required juggling with the
local variables when mctx was part of the freed object. The isc_mem_putanddetach
function can handle this case internally, but it wasn't used everywhere.  This
commit apply the semantic patching plus bit of manual work to replace all such
occurrences with proper usage of isc_mem_putanddetach().
2019-07-31 10:26:40 +02:00
Mark AndrewsandEvan Hunt 91a0cb5da3 handle connect() returning ETIMEDOUT on a non-blocking socket 2019-07-30 16:21:49 -07:00
Michał Kępień f4daf6e0e7 Do not use legacy time zone names
"PST8PDT" is a legacy time zone name whose use in modern code is
discouraged.  It so happens that using this time zone with musl libc
time functions results in different output than for other libc
implementations, which breaks the lib/isc/tests/time_test unit test.
Use the "America/Los_Angeles" time zone instead in order to get
consistent output across all tested libc implementations.
2019-07-30 21:25:18 +02:00
Michał Kępień b5cd146033 Always include <errno.h> instead of <sys/errno.h>
Including <sys/errno.h> instead of <errno.h> raises a compiler warning
when building against musl libc.  Always include <errno.h> instead of
<sys/errno.h> to prevent that compilation warning from being triggered
and to achieve consistency in this regard across the entire source tree.
2019-07-30 21:25:18 +02:00