]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
6 years agostrdup filename in more places
Arran Cudbard-Bell [Thu, 12 Dec 2019 18:04:50 +0000 (01:04 +0700)] 
strdup filename in more places

6 years agoremove unused variable
Alan T. DeKok [Thu, 12 Dec 2019 17:43:27 +0000 (12:43 -0500)] 
remove unused variable

6 years agoRevert "add API to clear request_data"
Alan T. DeKok [Thu, 12 Dec 2019 17:39:49 +0000 (12:39 -0500)] 
Revert "add API to clear request_data"

This reverts commit 33c8af9031618f293195802facfd5ab3cb3433dc.

no longer needed

6 years agoRevert "add API to clear a pre-existing stack"
Alan T. DeKok [Thu, 12 Dec 2019 17:39:29 +0000 (12:39 -0500)] 
Revert "add API to clear a pre-existing stack"

This reverts commit 1d764ca8062b0b73704df7acbd4ec8e7e70cab91.

not needed

6 years agoAdd the pointer to the handle, not the handle
Arran Cudbard-Bell [Thu, 12 Dec 2019 17:37:52 +0000 (00:37 +0700)] 
Add the pointer to the handle, not the handle

6 years agotypo. Use the correct variable
Alan T. DeKok [Thu, 12 Dec 2019 17:12:34 +0000 (12:12 -0500)] 
typo.  Use the correct variable

6 years agosnprintf() is expensive.
Alan T. DeKok [Thu, 12 Dec 2019 16:51:39 +0000 (11:51 -0500)] 
snprintf() is expensive.

Using our own itoa() routine saves 200ms on a 15s run.

6 years agoremove bad code
Alan T. DeKok [Thu, 12 Dec 2019 16:32:49 +0000 (11:32 -0500)] 
remove bad code

6 years agoPCRE_ERROR_UNSET not available everywhere
Arran Cudbard-Bell [Thu, 12 Dec 2019 16:28:56 +0000 (23:28 +0700)] 
PCRE_ERROR_UNSET not available everywhere

6 years agomove code to where it's used
Alan T. DeKok [Thu, 12 Dec 2019 16:21:53 +0000 (11:21 -0500)] 
move code to where it's used

6 years agoadd local free list for MD5 contexts
Alan T. DeKok [Thu, 12 Dec 2019 15:50:51 +0000 (10:50 -0500)] 
add local free list for MD5 contexts

which saves 1/2s to 1s on the performance tests.

Because we don't control the content of OpenSSL's structures,
we can't use a dlist.  Instead, we just have a fixed-size local
array.  With provisions for all array entries being used.

In general, the code should allocate an MD5 context, use it,
and immediately free it.  i.e. *without* doing any IO while
holding the MD5 context.

Since the code does this already, it's OK.

6 years agodon't call snprintf() in the hot path.
Alan T. DeKok [Thu, 12 Dec 2019 15:49:25 +0000 (10:49 -0500)] 
don't call snprintf() in the hot path.

If we don't have debugging symbols enabled, then performance
is likely more important than debugging.  If debugging symbols
are enabled, then small performance hits aren't much of an issue.

6 years agoInitialise is_closed to the correct value
Arran Cudbard-Bell [Thu, 12 Dec 2019 13:14:41 +0000 (20:14 +0700)] 
Initialise is_closed to the correct value

6 years agoAdd basic I/O throughput test
Arran Cudbard-Bell [Thu, 12 Dec 2019 12:19:05 +0000 (19:19 +0700)] 
Add basic I/O throughput test

6 years agoMake trunk more permissive regarding what callbacks need to be provided
Arran Cudbard-Bell [Thu, 12 Dec 2019 12:18:41 +0000 (19:18 +0700)] 
Make trunk more permissive regarding what callbacks need to be provided

6 years agoTypos
Arran Cudbard-Bell [Thu, 12 Dec 2019 10:27:46 +0000 (17:27 +0700)] 
Typos

6 years agoAdd redis pipeline code
Arran Cudbard-Bell [Thu, 12 Dec 2019 10:20:03 +0000 (17:20 +0700)] 
Add redis pipeline code

Untested... So probably doesn't work yet.

6 years agoPass around connection callbacks and configurations in structs
Arran Cudbard-Bell [Thu, 12 Dec 2019 10:19:07 +0000 (17:19 +0700)] 
Pass around connection callbacks and configurations in structs

Makes it much easier to add new parameters later

6 years agoAdd a 'ignore a response' mini-API to the Redis I/O code
Arran Cudbard-Bell [Thu, 12 Dec 2019 08:05:51 +0000 (15:05 +0700)] 
Add a 'ignore a response' mini-API to the Redis I/O code

When a request is signalled to be freed we can now tell the redis pipeline code to ignore the response.

Unfortunately there's no way to explicitly cancel a command, but they're not usually very long running anyway.

6 years agoChange how we deal with freeing connections
Arran Cudbard-Bell [Thu, 12 Dec 2019 08:04:05 +0000 (15:04 +0700)] 
Change how we deal with freeing connections

We now use the on_halt watcher as an indication the conn is ready to be freed, and that the tconn should also be freed.

This allows us to signal that the connection should be shutdown, and allows that process to complete before we attempt to free the conn or tconn.

The previous code just failed spectacularly... this is almost sane.

6 years agoAllow request states to be signalled from outside of the demuxer
Arran Cudbard-Bell [Thu, 12 Dec 2019 08:02:04 +0000 (15:02 +0700)] 
Allow request states to be signalled from outside of the demuxer

The demuxer isn't always needed or useful.

6 years agomemcpy the trunk config
Arran Cudbard-Bell [Thu, 12 Dec 2019 08:01:27 +0000 (15:01 +0700)] 
memcpy the trunk config

It's just easier, and there are fewer pointer derefs.

6 years agoEnqueue return codes should be public...
Arran Cudbard-Bell [Thu, 12 Dec 2019 07:57:21 +0000 (14:57 +0700)] 
Enqueue return codes should be public...

6 years agoAllow watchers to be removed by handlers without causing catastrophic failure
Arran Cudbard-Bell [Thu, 12 Dec 2019 07:56:38 +0000 (14:56 +0700)] 
Allow watchers to be removed by handlers without causing catastrophic failure

When a watcher is freed, the watcher call loop is now fully aware that this has happened, and will not attempt to call freed watchers.

6 years agoDocs
Arran Cudbard-Bell [Thu, 12 Dec 2019 07:55:05 +0000 (14:55 +0700)] 
Docs

6 years agoEverything else uses entry...
Arran Cudbard-Bell [Thu, 12 Dec 2019 07:54:50 +0000 (14:54 +0700)] 
Everything else uses entry...

6 years agoShift come code around
Arran Cudbard-Bell [Thu, 12 Dec 2019 07:54:29 +0000 (14:54 +0700)] 
Shift come code around

6 years agoAdd a deferred signal handling system to the connection API
Arran Cudbard-Bell [Thu, 12 Dec 2019 07:53:37 +0000 (14:53 +0700)] 
Add a deferred signal handling system to the connection API

It was a nightmare trying to reason about how signals would be delivered to the connections from within the handlers, so prevent that from happening, EVER.

Now the connection state machine completes whatever work it needs to, then at the end, checks to see if the handlers signalled it, and THEN, AND ONLY THEN does it process the signals.

The signals run through the public signalling interface, which should mean the connection is never allowed to make an invalid transition.  Signals that are invalid for the connections current state are just ignored.

6 years agoreuse more memory
Alan T. DeKok [Wed, 11 Dec 2019 21:12:01 +0000 (16:12 -0500)] 
reuse more memory

6 years agoMake JIT stack size configurable, and keep the stack sizes consistent between library...
Arran Cudbard-Bell [Wed, 11 Dec 2019 13:53:14 +0000 (20:53 +0700)] 
Make JIT stack size configurable, and keep the stack sizes consistent between library versions

6 years agoAdd missing errors, increase JIT stack size
Arran Cudbard-Bell [Wed, 11 Dec 2019 13:47:18 +0000 (20:47 +0700)] 
Add missing errors, increase JIT stack size

6 years agoincrease size of output buffer
Alan T. DeKok [Wed, 11 Dec 2019 13:51:58 +0000 (08:51 -0500)] 
increase size of output buffer

6 years agoRevert "use PCRE function to get error string"
Alan T. DeKok [Wed, 11 Dec 2019 12:53:25 +0000 (07:53 -0500)] 
Revert "use PCRE function to get error string"

This reverts commit 278ba5cdf353739bfdef5a9b20836430c5affd3e.

Nope.

6 years agouse PCRE function to get error string
Alan T. DeKok [Wed, 11 Dec 2019 12:35:38 +0000 (07:35 -0500)] 
use PCRE function to get error string

6 years agoBetter tracking for stacked handlers in connection.c
Arran Cudbard-Bell [Wed, 11 Dec 2019 02:49:28 +0000 (09:49 +0700)] 
Better tracking for stacked handlers in connection.c

They don't really do much here, but it allows us to prevent certain signalling functions being used in handlers in future.

6 years agoMove to macros for all request list changes
Arran Cudbard-Bell [Wed, 11 Dec 2019 02:38:44 +0000 (09:38 +0700)] 
Move to macros for all request list changes

6 years agoTypo
Arran Cudbard-Bell [Wed, 11 Dec 2019 02:32:56 +0000 (09:32 +0700)] 
Typo

6 years agoEverywhere else uses entry as the dlist fields
Arran Cudbard-Bell [Wed, 11 Dec 2019 02:27:47 +0000 (09:27 +0700)] 
Everywhere else uses entry as the dlist fields

6 years agoAdd shutdown callback to the redis handle
Arran Cudbard-Bell [Wed, 11 Dec 2019 02:16:57 +0000 (09:16 +0700)] 
Add shutdown callback to the redis handle

6 years agoDeal with return codes from the shutdown callback
Arran Cudbard-Bell [Wed, 11 Dec 2019 02:14:45 +0000 (09:14 +0700)] 
Deal with return codes from the shutdown callback

6 years agoUsed
Arran Cudbard-Bell [Wed, 11 Dec 2019 01:54:39 +0000 (08:54 +0700)] 
Used

6 years agoFix LDAP connection callback
Arran Cudbard-Bell [Wed, 11 Dec 2019 01:17:20 +0000 (08:17 +0700)] 
Fix LDAP connection callback

6 years agoAdd support for shutting down connections gracefully
Arran Cudbard-Bell [Wed, 11 Dec 2019 00:54:56 +0000 (07:54 +0700)] 
Add support for shutting down connections gracefully

6 years agoUpdate Pica8 dictionary
Jorge Pereira [Tue, 10 Dec 2019 14:48:48 +0000 (11:48 -0300)] 
Update Pica8 dictionary

6 years agoStart of Redis Async I/O tests
Arran Cudbard-Bell [Tue, 10 Dec 2019 13:38:45 +0000 (20:38 +0700)] 
Start of Redis Async I/O tests

6 years agoGet basic Redis async I/O functional
Arran Cudbard-Bell [Tue, 10 Dec 2019 13:38:29 +0000 (20:38 +0700)] 
Get basic Redis async I/O functional

6 years agoOnly two packets
Arran Cudbard-Bell [Tue, 10 Dec 2019 13:38:06 +0000 (20:38 +0700)] 
Only two packets

6 years agoRemove duplicate message
Arran Cudbard-Bell [Tue, 10 Dec 2019 13:37:54 +0000 (20:37 +0700)] 
Remove duplicate message

6 years agoTypo
Arran Cudbard-Bell [Tue, 10 Dec 2019 09:54:51 +0000 (16:54 +0700)] 
Typo

6 years agoAlways need to add the linking context
Arran Cudbard-Bell [Tue, 10 Dec 2019 09:38:10 +0000 (16:38 +0700)] 
Always need to add the linking context

6 years agoAdd function to check if a list is initialised
Arran Cudbard-Bell [Tue, 10 Dec 2019 08:16:44 +0000 (15:16 +0700)] 
Add function to check if a list is initialised

6 years agoAdd notes on heap allocations
Arran Cudbard-Bell [Tue, 10 Dec 2019 08:16:26 +0000 (15:16 +0700)] 
Add notes on heap allocations

6 years agoFix linker args
Arran Cudbard-Bell [Tue, 10 Dec 2019 07:44:01 +0000 (14:44 +0700)] 
Fix linker args

6 years agoFix test command output for the EAP tests
Arran Cudbard-Bell [Tue, 10 Dec 2019 06:45:51 +0000 (13:45 +0700)] 
Fix test command output for the EAP tests

6 years agoImplement self-contained way of managing the request slab allocator
Arran Cudbard-Bell [Tue, 10 Dec 2019 06:45:40 +0000 (13:45 +0700)] 
Implement self-contained way of managing the request slab allocator

There's no real reason to use specific free lists.  We want all requests in a particular thread to be allocated in the same list, and passing around free list heads just makes things more complicated.

This seems to deal ok with child requests too.

6 years agoRevert "alloc / free requests into worker-specific list"
Arran Cudbard-Bell [Tue, 10 Dec 2019 05:36:21 +0000 (12:36 +0700)] 
Revert "alloc / free requests into worker-specific list"

This reverts commit dd4dcaeccfe4334e0d45f08549b070ae98dad314.

Revert "add APIs to mark a request as unused, or to re-use a request"

This reverts commit de712c55940c3b2aa8bec49ae93b1c4aa62ffb14.

6 years agos/rad_request/fr_request_s/
Arran Cudbard-Bell [Tue, 10 Dec 2019 03:32:08 +0000 (10:32 +0700)] 
s/rad_request/fr_request_s/

6 years agopoint to "track" and not "entry"
Alan T. DeKok [Tue, 10 Dec 2019 02:29:25 +0000 (21:29 -0500)] 
point to "track" and not "entry"

6 years agoalloc / free requests into worker-specific list
Alan T. DeKok [Mon, 9 Dec 2019 23:24:34 +0000 (18:24 -0500)] 
alloc / free requests into worker-specific list

6 years agouse new API for fr_dict_enum_by_value()
Alan T. DeKok [Mon, 9 Dec 2019 23:16:21 +0000 (18:16 -0500)] 
use new API for fr_dict_enum_by_value()

6 years agouse new API for fr_dict_enum_by_value()
Alan T. DeKok [Mon, 9 Dec 2019 23:15:21 +0000 (18:15 -0500)] 
use new API for fr_dict_enum_by_value()

6 years agoadd duplicate of fr_dict_enum_by_value(), which takes dict
Alan T. DeKok [Mon, 9 Dec 2019 23:14:38 +0000 (18:14 -0500)] 
add duplicate of fr_dict_enum_by_value(), which takes dict

that saves rather surprising amounts of time.

6 years agoadd APIs to mark a request as unused, or to re-use a request
Alan T. DeKok [Mon, 9 Dec 2019 22:07:27 +0000 (17:07 -0500)] 
add APIs to mark a request as unused, or to re-use a request

this avoids the malloc / free loop when dealing with large
volumes of requests

6 years agoadd API to clear request_data
Alan T. DeKok [Mon, 9 Dec 2019 22:00:09 +0000 (17:00 -0500)] 
add API to clear request_data

6 years agoadd API to clear a pre-existing stack
Alan T. DeKok [Mon, 9 Dec 2019 21:59:20 +0000 (16:59 -0500)] 
add API to clear a pre-existing stack

6 years agotest result of write()
Alan T. DeKok [Mon, 9 Dec 2019 18:41:04 +0000 (13:41 -0500)] 
test result of write()

6 years agoneed this, too
Alan T. DeKok [Mon, 9 Dec 2019 18:14:32 +0000 (13:14 -0500)] 
need this, too

6 years agoremove test which no longer works
Alan T. DeKok [Mon, 9 Dec 2019 16:53:15 +0000 (11:53 -0500)] 
remove test which no longer works

6 years agocall event timer delete instead of const_free
Alan T. DeKok [Mon, 9 Dec 2019 16:21:58 +0000 (11:21 -0500)] 
call event timer delete instead of const_free

which lets us re-use the timer event

6 years agoslab allocator && re-use for tracking structures
Alan T. DeKok [Mon, 9 Dec 2019 15:48:13 +0000 (10:48 -0500)] 
slab allocator && re-use for tracking structures

which saves ~1/2s on a ~20s run.

6 years agoinitialize variable to quiet stupid scanner
Alan T. DeKok [Mon, 9 Dec 2019 14:19:57 +0000 (09:19 -0500)] 
initialize variable to quiet stupid scanner

6 years agoAll todos done...
Arran Cudbard-Bell [Mon, 9 Dec 2019 13:52:54 +0000 (20:52 +0700)] 
All todos done...

6 years agoUnused arg
Arran Cudbard-Bell [Mon, 9 Dec 2019 13:36:15 +0000 (20:36 +0700)] 
Unused arg

6 years agomove control API to pipes instead of poking kevent.
Alan T. DeKok [Mon, 9 Dec 2019 13:29:29 +0000 (08:29 -0500)] 
move control API to pipes instead of poking kevent.

it's a LOT faster to signal via pipes & kevent than to add / delete
individual kevents

6 years agocheck for debug BEFORE calling debug function
Alan T. DeKok [Mon, 9 Dec 2019 02:06:29 +0000 (21:06 -0500)] 
check for debug BEFORE calling debug function

map_list_mod_debug() does a lot of unconditional allocations.
So don't call it unless we know it's debugging

6 years agocall fr_worker_verify only when WITH_VERIFY_PTR is set
Alan T. DeKok [Mon, 9 Dec 2019 01:49:32 +0000 (20:49 -0500)] 
call fr_worker_verify only when WITH_VERIFY_PTR is set

6 years agoTypo
Arran Cudbard-Bell [Mon, 9 Dec 2019 13:22:19 +0000 (20:22 +0700)] 
Typo

6 years agoAdd dumb script to run the google profiler against a binary
Arran Cudbard-Bell [Mon, 9 Dec 2019 13:21:26 +0000 (20:21 +0700)] 
Add dumb script to run the google profiler against a binary

6 years agoSupport connection lifetime
Arran Cudbard-Bell [Mon, 9 Dec 2019 12:47:39 +0000 (19:47 +0700)] 
Support connection lifetime

6 years agoTest high/low edges for connection spawning
Arran Cudbard-Bell [Mon, 9 Dec 2019 11:55:33 +0000 (18:55 +0700)] 
Test high/low edges for connection spawning

6 years agoCheck the callbacks were actually called in the I/O tests
Arran Cudbard-Bell [Mon, 9 Dec 2019 09:28:28 +0000 (16:28 +0700)] 
Check the callbacks were actually called in the I/O tests

Set start time to 1, so we don't trigger asserts

6 years agoTypo
Arran Cudbard-Bell [Mon, 9 Dec 2019 06:20:56 +0000 (13:20 +0700)] 
Typo

6 years agoNotes on what we're doing in trunk_requests_per_connection
Arran Cudbard-Bell [Mon, 9 Dec 2019 04:00:45 +0000 (11:00 +0700)] 
Notes on what we're doing in trunk_requests_per_connection

6 years agoIncrease debug priority of trunk connection state changes
Arran Cudbard-Bell [Mon, 9 Dec 2019 03:52:20 +0000 (10:52 +0700)] 
Increase debug priority of trunk connection state changes

We should only see these printed once a steady state has been reached if something genuinely interesting happens, like a load spike or network disruption

6 years agoAdd draining_to_free state to simplify max_uses and lifetime
Arran Cudbard-Bell [Mon, 9 Dec 2019 03:48:50 +0000 (10:48 +0700)] 
Add draining_to_free state to simplify max_uses and lifetime

Connections in the draining-to-free state cannot be reactivated, and will be freed once there are no more requests associated with them.

Connections in the draining state can be reactivated if we get a load spike

6 years agoFix issues with freeing requests
Arran Cudbard-Bell [Mon, 9 Dec 2019 03:16:13 +0000 (10:16 +0700)] 
Fix issues with freeing requests

Implement max_uses

Add configuration parser

6 years agoadd simple profiling make file
Alan T. DeKok [Sun, 8 Dec 2019 21:34:20 +0000 (16:34 -0500)] 
add simple profiling make file

so that mere mortals can run the profiling tools

6 years agomake sure that each packet has it's own unique time
Alan T. DeKok [Sat, 7 Dec 2019 20:14:16 +0000 (15:14 -0500)] 
make sure that each packet has it's own unique time

6 years agoFix redefinition
Arran Cudbard-Bell [Sun, 8 Dec 2019 11:49:51 +0000 (18:49 +0700)] 
Fix redefinition

6 years agoFormatting
Arran Cudbard-Bell [Sun, 8 Dec 2019 10:01:58 +0000 (17:01 +0700)] 
Formatting

6 years agoAlways include autoconf.h in talloc.h
Arran Cudbard-Bell [Sun, 8 Dec 2019 09:09:19 +0000 (16:09 +0700)] 
Always include autoconf.h in talloc.h

When doing standalone builds it's easy to miss the include for autoconf.h and it leads to stupid things

6 years agoInsert freed requests into an unassigned list, ready to be used again
Arran Cudbard-Bell [Sun, 8 Dec 2019 07:54:01 +0000 (14:54 +0700)] 
Insert freed requests into an unassigned list, ready to be used again

This gives us significant performance improvements (as you'd expect)

6 years agoSpace to tabs
Arran Cudbard-Bell [Sat, 7 Dec 2019 14:16:24 +0000 (21:16 +0700)] 
Space to tabs

6 years agostupid integer overflow
Alan T. DeKok [Sat, 7 Dec 2019 15:04:07 +0000 (10:04 -0500)] 
stupid integer overflow

6 years agoadd todo note
Alan T. DeKok [Sat, 7 Dec 2019 15:03:57 +0000 (10:03 -0500)] 
add todo note

6 years agolimit to max backlog
Alan T. DeKok [Fri, 6 Dec 2019 19:49:42 +0000 (14:49 -0500)] 
limit to max backlog

6 years agoUnused
Arran Cudbard-Bell [Sat, 7 Dec 2019 13:52:59 +0000 (20:52 +0700)] 
Unused

6 years agoRemove and rename fields
Arran Cudbard-Bell [Sat, 7 Dec 2019 13:47:37 +0000 (20:47 +0700)] 
Remove and rename fields

6 years agoFix opening connection in the connection manager
Arran Cudbard-Bell [Sat, 7 Dec 2019 12:58:41 +0000 (19:58 +0700)] 
Fix opening connection in the connection manager

6 years agoRebalance the backlogs of connections when a new connection becomes active
Arran Cudbard-Bell [Sat, 7 Dec 2019 11:31:25 +0000 (18:31 +0700)] 
Rebalance the backlogs of connections when a new connection becomes active