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
These will be shared between userspace and kernel space and so the
definitions must be part of the kernel includes.
Change-Id: Iabf7a4ecff3638ea1765a6d7341bb24e9955b509
Only increase the SRTCP index when encrypted SRTCP is actually in use.
This would be apparent when a stream is switched from RTCP to SRTCP.
Change-Id: I3a31377b89c5124035152d504e7d99f8cf1d96a1
This has been broken for a while and nobody seems to be using it since
nobody complained. Remove it.
Change-Id: I114e7b1859ecd1982338c625f4523f372af3bbe8
skb_copy() copies the GSO state of the skb as well, but we have
converted the skb to a flat linear skb with skb->next being NULL.
__udp_gso_segment() by way of __udp_gso_segment_list() expects skb->next
to be non NULL if GSO flags are present, causing a page fault. Reset the
GSO flags to make sure this doesn't happen.
closes#1792
Change-Id: Idae561120940e407e435e361316383fe5a5c5b7e
Ref: https://github.com/sipwise/rtpengine/issues/1792
Honour the capabilities of the output net devices and only perform
partial checksumming if GRO is in use.
closes#1792
Ref: https://github.com/sipwise/rtpengine/issues/1792
Change-Id: Ic524e3649aefcb274b4bf362970b10f0743d484a
Since skb is a copy of the ingress skb, ->dev still points to the device
the packet was received on. For sending, set it to the outgoing device,
taken from the dst object.
Change-Id: Ia27b4318925dec4396e485a389d818dd46bcac78