We don't have this available before kernel 5.1
Ref: https://bugs.debian.org/1101804
Change-Id: I4f2f768738d0f53fec28ed3f8e8f577cbc13431e
Reported-by: Andreas Beckmann <anbe@debian.org>
We don't need contiguous physical pages, we only need contiguous virtual
memory. This allows for larger allocation sizes.
Change-Id: I915fdb42c3fd2387aaf08d2f16d0528435038dc6
Special codec handler to support not forwarding (nor any processing
whatsoever) of particular payload types at all. Support this in the
kernel module as well.
Change-Id: If10227affa54307e1e9b448eadd0bf2bfc5774ba
This seems to be an acceptable and reliable way to detect RTCP
multiplexed with RTP, even if `a=rtcp-mux` wasn't advertised in the SDP.
Take the opportunity to clean up __streams_set_sinks() a bit by giving
the variables better names.
Change-Id: I0cdc5e4a544641591fc2aabca12fb11bab3453f7
These are potentially computed from inside each subdir, and in addition
due to what appears to be a regression in GNU make 4.4, where it is
reevaluating variables that contain $(shell) functions, many times (in
the order of thousands, this was slowing down the build, were on the
Debian amd64 build daemons it went from 5m with GNU make 4.3 to 2h40m
with GNU make 4.4. Although the bulk of the slow down has been fixed
with previous commits, the remaining optimizations are only to avoid
this potentially happening again in the future, and to reduce useless
duplicate work.
Instead of trying to cache the values from within make itself, where
programming this there is extremely painful, and does not seem to be
able to greatly reduce the number of calls, because the build system
is going to be called multiple times for different targets. Simply
externalize the generation into several shell scripts, that we call
to generate a make fragment that then we include from the various
Makefiles.
For a Debian build with GNU make 4.3, this reduces the amount of total
pkg-config calls from around ~1600 to 128, for dpkg-buildflags from
~1100 down to 6, and for dpkg-parsechangelog from ~56 to 17, but the
slow down is not as significant there anyway.
For a Debian build with GNU make 4.4, this reduces the amount of total
pkg-config calls from around ~2600 to 128, for dpkg-buildflags from
~2800 down to 6, and for dpkg-parsechangelog from ~350 to 21.
For a Debian build with GNU make 4.4, this reduces the build time
on this system from 2m10s to ~ 1m30s.
Change-Id: I427d0ea5106dc6ed1ff9e664ccdba2fa0725b7d0
Starting with GNU make 4.4, build time have massively regressed
where before they would take 5m on amd64 now can take 2h40m. While this
seems clearly broken, the release notes are filled with notices for
breaking changes, and in particular the one for passing all make
variables down to the invoked programs executed via the «shell» GNU make
function, so it is not clear what is expected breakage and what is not.
This has been reported in Debian, but not yet upstream, and while it
seems like a clear regression, it's not clear what will be the upstream
take on it. For now apply workarounds that do not change semantics, and
which do not regress with older GNU make versions.
Use the GNU make «origin» function instead of «?=» which defaults to
defining a variable as a recursive one. Coerce already defined variables
into simple ones to avoid GNU make re-evaluating these variables for
each «shell» function invocation.
Ref: https://bugs.debian.org/1092051
Change-Id: I076fc05dd616918473a22e7e942fecfdc9851d47
These macros were used for development only and are not needed any more.
Their names collide with an upstream patch, making compilation fail on
kernels >= 6.12. Just remove these wrapper macros altogether.
Change-Id: I6e154be76bfcfb650581095b169ddd58e5f464a0
This patch forces rtpengine to use the IPv4 TTL and IPv6 hop limits set
on the host for proxied packets in kernel mode.
Beforehand, the TTL was always set to a hardcoded value of 64. While
this is the default almost everywhere, it may be desirable to be able to
set a higher value. Especially when interfacing with complex carrier
backbone networks.
Closes#1860
Change-Id: I2ddf5752db541205d92f042db22eb738481e84a3
If a stream has been pushed to the kernel from anything other than RTP,
even though RTP is expected, we get a forwarding entries without any
SSRCs. This is valid, but once actual RTP is received, it needs to be
passed on to user space, so that SSRC contexts can be set up.
Possible fix for #1855
Change-Id: I51b82d3cf79cf66780fdde154bebe56e0f43174b
This array is only conditionally partially filled, but then
unconditionally copied, so we need to zero it out.
closes#1839
Change-Id: I38662ed094aad776a68ad0c2eb947fd598bc4c57
This only exists because of RTCP indexing issues, but with the index
being in shared memory now, we no longer need this.
Change-Id: Ib0a69214f24a7c1edec8aa53139212ee861a6c4d
The requirement to continuously update stats from the kernel has been
eliminates. Remove all relevant code.
Change-Id: Idc8093b64290b89ff3d015f3e61e4bbe25df6e23
... and change to 32 bit.
Remove functions to retrieve kernel stats as they don't do anything any
more.
Add RTCP index information to /list output.
Change-Id: Ia087c8c3913daf83a0749d6a048682b7248eb38b
This field is duplicated with `ext_seq`, which is already kept in shared
memory and therefore preferable.
Also update all sequence number fields to 32-bit (down from 64-bit) as
there's no need for all these extra bits.
Add output seq information to /list.
Change-Id: I0b8d8dfdf5c007c6ca75e7b50a8c900c16be21ed
Allocate per-payload-type stats buffers in shared bufferpool. Push these
to the kernel module for direct tracking of bytes/packets stats. This
eliminates the need to return these values in the /blist data and
continuously update the userspace stats.
The accomodate updating the payload-type tracker, we use the "last
received" timestamp from the kernel module together with the "last seen
payload type" to give similar results as before.
Change-Id: I524791a1940b5d1ff2d82716c3b7a262f64e106c
This obsoletes the need to retain the last seen kernel stats and track
updates to the counters in order to set call states.
Change-Id: Ie5338bd630b679af205a16933f847ccdcd6a477e
Require rtpe_stats to be set before allowing a target to be created.
Refactor init method into its own function.
Otherwise currently unused.
Change-Id: Ic66e7f92f875ede1a3a2d55fee4ed53c39ff93be
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
... and move to kernel module.
Keep the common fields at the beginning of the header in place for both
user space and kernel space, and move the remaining (user only) fields
into a separate header. The kernel module doesn't need to know about
these extra fields.
Change-Id: I9865349e948aacd09753a1b4610098a4d1fc823d
Keep two separate timestamps, one updated by userspace code only and the
other updated by kernel only. This way we can tell where the packet
processing happens. For code that wants to report only the last
timestamp regardless of which one of the two it is, we add a convenience
function that just returns the newer one.
Change-Id: Ib3af7aa55006d8b32e2bc3db4f8bfa5514c57e40
This leaves the TOS value as the only leftover to be not in shm.
The kernel_stats structures remain for the time being as they're needed
to determine whether kernel forwarding is done or not, as well as for
global stats.
Change-Id: I158f18098e018d2870b797f1a196baa03a0e0fb7
Use the kernel/user shared memory to keep track of interface stats. This
eliminates the need to update the userspace stats counters with the
values from the kernel, and vice versa when updating the kernel streams.
Add a function to reverse map userspace mapped memory address to kernel
space addresses.
Change-Id: Iaa5f9488061a12103e57faf27b3979521778cea8