Some components (the timer thread used by the codec handlers in
particular) may hold references to components owned by the codeclib (the
.so handles in particular). Move codeclib cleanup towards the end.
Change-Id: Ic581588c27b69c025576c14a69e999c9ca5d1597
(cherry picked from commit 43cc9cc06d)
(cherry picked from commit 6e49850351)
HTTP/WS init creates worker threads, which would be terminated by a fork
to background. Reverse the order.
Closes#1896
Possibly also relevant to #1895
Change-Id: I30b61e07ad3bed41b6b241e8943ed479277c1474
(cherry picked from commit dd04af1163)
(cherry picked from commit b25caeeaa3)
Some of the earlier cleanup functions may still refer to some of the
options.
Change-Id: I5b6db886fe58891b3f737e7a0f3b31b0425699b9
(cherry picked from commit dafd71fd98)
(cherry picked from commit 9d486c0514)
Use a BIO WRITE callback instead of BIO_read'ing from the BIO after each
operation. This is a more direct way to intercept data that needs to be
sent out.
Implement MTU-related BIO callbacks.
Deduct the assumed IP MTU overhead from the configured MTU during
startup.
Unlike the previous code, this does not necessarily send DTLS from the
same socket that received a message, nor to the same address that sent
one, and instead always uses the selected_sfd and ->endpoint. This may
or may not be a regression.
Closes#1806
Change-Id: I4d4456df3f378d00782cbfa64afdb2a038217e6c
(cherry picked from commit 08332161cf)
(cherry picked from commit dd7e56d1f6)
Make sure we create the fallback buffer pool if the kernel module isn't
available but userspace operation is permitted.
Change-Id: I177c36b9a17c18f39e6c54ffb414c13fbb9c15ba
Revert of 128e84e and implement for io_uring poller
Turns out that this function is necessary to prevent out-of-order writes
to a streambuf once the connection is open.
Use a simple array to keep track of blocked fds under uring.
Change-Id: I4af2a64071030fd4892dde88547705230aec59fd
Use relaxed-order atomic ops to access config variables that can be set
during run time.
Rename config_lock to keyspaces_lock as the keyspaces list remains the
only object that it protects.
All other config variables aren't settable at runtime and so don't
require locks or atomic ops.
Change-Id: I7e01a34a4818a558d5648ae27a86f9880a95d050
The requirement to continuously update stats from the kernel has been
eliminates. Remove all relevant code.
Change-Id: Idc8093b64290b89ff3d015f3e61e4bbe25df6e23
Rename the "noop" method to "init" and split up the function to open the
table into two parts. Open the control file first, then do the mmap(),
then init other things, then finally call the init method.
Change-Id: I832f6e90fbec4375e3e19ed6e72d7cce78488e9e
Switch all memory buffers used for RTP I/O from generic stack or heap
allocated memory to the bufferpool implementation. Use a per-thread
bufferpool to minimise lock contention.
This commit is just a one-for-one swap and doesn't use the bufferpool's
reference counting semantics yet.
Change-Id: I9cba4ec97bd0afcd374bf6c0be2b608a46e73e57
Support is desired for Kamailio/Rtpengine traffic via UDP.
Adding homer-disable-rtcp-stats and homer-enable-ng config params to
separately control sending to Homer each traffic type. By default rtcp
is `on` when homer parameter is configured. NG is by default disabled.
closes#1802
Change-Id: Ib68fb133cffc5d8945f9b6bf60bab3e80fab9630
The poller-per-thread feature was broken with a division by zero. Take
the opportunity to rework it and eliminate the poller_map object. Use a
simple array of pollers for media sockets, plus one global poller for
control sockets. In the regular case only one poller is created and
everything points to that poller. In the poller-per-thread case, one
poller per thread is created, plus one poller (also with its own single
thread) for control connections. All control sockets use the single
control poller, while all media sockets get assigned one poller from the
pool in a round-robin fashion.
closes#1801
Change-Id: Iae91a3e10b7206455c6df33b1a472254c700ce21
poller_new used to have the side effect of initialising rtpe_now.
Restore this side effect explicitly in the startup code, so that timers
are launched with the correst start time instead of zero.
Change-Id: I590061a9665b52c4aed00c06dc330d2a226c73d3
For the use case with a separate base chain, we want to preempt other
firewall rules by default and insert our immediate jump rule at the
beginning, rather than at the end. Add an option to provide the other
behaviour.
Change-Id: I16171f7c028c89b94823ecc99387771be3ba9443
Convert each listener entity into a list.
Support a list of values for each option so that multiple
ports/addresses can be listed.
Keep previous behaviour unchanged: If ANY address is given, open
listeners for IPv4 and IPv6.
Change-Id: Ic54f28d1262f60d5e5c9d824a95e7c33ebc2aba9
All functions that create listener objects take a read-only endpoint, so
make them as const.
Remove the extra TOS argument to make all signatures the same.
Change-Id: I722c7665b192476d90dbf0ece200d0bfd34cb9eb
Forking to background kills already created threads, so forking must
happen first and thread creation after.
closes#1695
Change-Id: I743b890b83903d9e0b3248b032844e7e357d2307