diff --git a/daemon/call.c b/daemon/call.c index d82e788ff..8f5711441 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -32,7 +32,6 @@ #include "rtp.h" #include "call_interfaces.h" #include "ice.h" -#include "rtpengine_config.h" #include "log_funcs.h" #include "recording.h" #include "rtplib.h" diff --git a/daemon/cdr.c b/daemon/cdr.c index 5b408fbcc..0ee2f959d 100644 --- a/daemon/cdr.c +++ b/daemon/cdr.c @@ -152,38 +152,6 @@ void cdr_update_entry(call_t * c) { cdrlinecnt, md->index, protocol, ps->in_tos_tclass); } else { -#if (RE_HAS_MEASUREDELAY) - g_string_append_printf(cdr, - "ml%i_midx%u_%s_endpoint_ip=%s, " - "ml%i_midx%u_%s_endpoint_port=%u, " - "ml%i_midx%u_%s_local_relay_ip=%s, " - "ml%i_midx%u_%s_local_relay_port=%u, " - "ml%i_midx%u_%s_relayed_packets="UINT64F", " - "ml%i_midx%u_%s_relayed_bytes="UINT64F", " - "ml%i_midx%u_%s_relayed_errors="UINT64F", " - "ml%i_midx%u_%s_last_packet="UINT64F", " - "ml%i_midx%u_%s_in_tos_tclass=%" PRIu8 ", " - "ml%i_midx%u_%s_delay_min=%.9f, " - "ml%i_midx%u_%s_delay_avg=%.9f, " - "ml%i_midx%u_%s_delay_max=%.9f, ", - cdrlinecnt, md->index, protocol, addr, - cdrlinecnt, md->index, protocol, ps->endpoint.port, - cdrlinecnt, md->index, protocol, local_addr, - cdrlinecnt, md->index, protocol, ps->last_local_endpoint.port, - cdrlinecnt, md->index, protocol, - atomic64_get(&ps->stats_in.packets), - cdrlinecnt, md->index, protocol, - atomic64_get(&ps->stats_in.bytes), - cdrlinecnt, md->index, protocol, - atomic64_get(&ps->stats_in.errors), - cdrlinecnt, md->index, protocol, - atomic64_get(&ps->last_packet), - cdrlinecnt, md->index, protocol, - ps->in_tos_tclass, - cdrlinecnt, md->index, protocol, (double) ps->stats.delay_min / 1000000, - cdrlinecnt, md->index, protocol, (double) ps->stats.delay_avg / 1000000, - cdrlinecnt, md->index, protocol, (double) ps->stats.delay_max / 1000000); -#else g_string_append_printf(cdr, "ml%i_midx%u_%s_endpoint_ip=%s, " "ml%i_midx%u_%s_endpoint_port=%u, " @@ -208,7 +176,6 @@ void cdr_update_entry(call_t * c) { atomic64_get(&ps->last_packet), cdrlinecnt, md->index, protocol, ps->in_tos_tclass); -#endif } } diff --git a/daemon/cli.c b/daemon/cli.c index b10219f89..e51af3ab6 100644 --- a/daemon/cli.c +++ b/daemon/cli.c @@ -31,7 +31,6 @@ #include "rtplib.h" #include "ssrc.h" #include "codec.h" -#include "rtpengine_config.h" typedef void (*cli_handler_func)(str *, struct cli_writer *); typedef struct { @@ -718,13 +717,6 @@ static void cli_list_tag_info(struct cli_writer *cw, struct call_monologue *ml) atomic64_get(&ps->stats_in.packets), atomic64_get(&ps->stats_in.bytes), atomic64_get(&ps->stats_in.errors), atomic64_get(&ps->last_packet)); -#if RE_HAS_MEASUREDELAY - if (PS_ISSET(ps, RTP) || !PS_ISSET(ps, RTCP)) - cw->cw_printf(cw, ", %.9f delay_min, %.9f delay_avg, %.9f delay_max", - (double) ps->stats.delay_min / 1000000, - (double) ps->stats.delay_avg / 1000000, - (double) ps->stats.delay_max / 1000000); -#endif cw->cw_printf(cw, "\n"); } } diff --git a/daemon/media_socket.c b/daemon/media_socket.c index 68f886b20..e38c49225 100644 --- a/daemon/media_socket.c +++ b/daemon/media_socket.c @@ -3474,13 +3474,6 @@ enum thread_looper_action kernel_stats_updater(void) { ps->in_tos_tclass = ke->stats_in.tos; -#if (RE_HAS_MEASUREDELAY) - /* XXX fix atomicity */ - ps->stats_in.delay_min = ke->stats_in.delay_min; - ps->stats_in.delay_avg = ke->stats_in.delay_avg; - ps->stats_in.delay_max = ke->stats_in.delay_max; -#endif - atomic64_set(&ps->kernel_stats_in.bytes, ke->stats_in.bytes); atomic64_set(&ps->kernel_stats_in.packets, ke->stats_in.packets); atomic64_set(&ps->kernel_stats_in.errors, ke->stats_in.errors); diff --git a/el/rtpengine.spec b/el/rtpengine.spec index 39c2eec6e..c0f32eec0 100644 --- a/el/rtpengine.spec +++ b/el/rtpengine.spec @@ -175,8 +175,6 @@ install -D -p -m644 kernel-module/xt_RTPENGINE.c \ install -D -p -m644 kernel-module/xt_RTPENGINE.h \ %{buildroot}%{_usrsrc}/%{name}-%{version}-%{release}/xt_RTPENGINE.h mkdir -p %{buildroot}%{_usrsrc}/%{name}-%{version}-%{release} -install -D -p -m644 kernel-module/rtpengine_config.h \ - %{buildroot}%{_usrsrc}/%{name}-%{version}-%{release}/rtpengine_config.h install -D -p -m644 debian/ngcp-rtpengine-kernel-dkms.dkms %{buildroot}%{_usrsrc}/%{name}-%{version}-%{release}/dkms.conf sed -i -e "s/#MODULE_VERSION#/%{version}-%{release}/g" %{buildroot}%{_usrsrc}/%{name}-%{version}-%{release}/dkms.conf %if 0%{?with_transcoding} > 0 diff --git a/include/statistics.h b/include/statistics.h index fe6860e3a..ff5d80a5f 100644 --- a/include/statistics.h +++ b/include/statistics.h @@ -3,18 +3,12 @@ #include "helpers.h" #include "bencode.h" -#include "rtpengine_config.h" struct packet_stream; struct stream_stats { atomic64 packets; atomic64 bytes; atomic64 errors; -#if RE_HAS_MEASUREDELAY - uint64_t delay_min; - uint64_t delay_avg; - uint64_t delay_max; -#endif }; #include "control_ng.h" diff --git a/kernel-module/rtpengine_config.h b/kernel-module/rtpengine_config.h deleted file mode 100644 index 55c7a9752..000000000 --- a/kernel-module/rtpengine_config.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * rtpengine_config.h - * - * Description: Config file with preprocessor config macros - * - * Created on: Mar 18, 2015 - * Author: fmetz - */ - -#ifndef RTPENGINE_CONFIG_H_ -#define RTPENGINE_CONFIG_H_ - -#define RE_HAS_MEASUREDELAY 0 - -#endif /* RTPENGINE_CONFIG_H_ */ diff --git a/kernel-module/xt_RTPENGINE.c b/kernel-module/xt_RTPENGINE.c index 88f04f037..7bd4fc9e5 100644 --- a/kernel-module/xt_RTPENGINE.c +++ b/kernel-module/xt_RTPENGINE.c @@ -35,8 +35,6 @@ #include "xt_RTPENGINE.h" -#include "rtpengine_config.h" - MODULE_LICENSE("GPL"); #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,12,0) MODULE_IMPORT_NS(CRYPTO_INTERNAL); @@ -307,9 +305,6 @@ struct rtpengine_stats_a { atomic64_t packets; atomic64_t bytes; atomic64_t errors; - uint64_t delay_min; - uint64_t delay_avg; - uint64_t delay_max; atomic_t tos; }; struct rtpengine_rtp_stats_a { @@ -1463,9 +1458,6 @@ static ssize_t proc_blist_read(struct file *f, char __user *b, size_t l, loff_t opp->stats_in.packets = atomic64_read(&g->stats_in.packets); opp->stats_in.bytes = atomic64_read(&g->stats_in.bytes); opp->stats_in.errors = atomic64_read(&g->stats_in.errors); - opp->stats_in.delay_min = g->stats_in.delay_min; - opp->stats_in.delay_max = g->stats_in.delay_max; - opp->stats_in.delay_avg = g->stats_in.delay_avg; opp->stats_in.tos = atomic_read(&g->stats_in.tos); for (i = 0; i < g->target.num_payload_types; i++) { @@ -5185,11 +5177,6 @@ static unsigned int rtpengine46(struct sk_buff *skb, struct sk_buff *oskb, unsigned int start_idx, end_idx; enum {NOT_RTCP = 0, RTCP, RTCP_FORWARD} is_rtcp; -#if (RE_HAS_MEASUREDELAY) - uint64_t starttime, endtime, delay; - ktime_t tstamp = skb->tstamp; -#endif - skb_reset_transport_header(skb); uh = udp_hdr(skb); skb_pull(skb, sizeof(*uh)); @@ -5409,31 +5396,6 @@ do_stats: if (rtp_pt_idx >= 0) { atomic64_inc(&g->rtp_stats[rtp_pt_idx].packets); atomic64_add(datalen, &g->rtp_stats[rtp_pt_idx].bytes); - -#if (RE_HAS_MEASUREDELAY) - starttime = ktime_to_ns(tstamp); - endtime = ktime_to_ns(ktime_get_real()); - - delay = endtime - starttime; - - /* XXX needs locking - not atomic */ - if (atomic64_read(&g->stats.packets)==1) { - g->stats.delay_min=delay; - g->stats.delay_avg=delay; - g->stats.delay_max=delay; - } else { - if (g->stats.delay_min > delay) { - g->stats.delay_min = delay; - } - if (g->stats.delay_max < delay) { - g->stats.delay_max = delay; - } - - g->stats.delay_avg = g->stats.delay_avg * (atomic64_read(&g->stats.packets)-1); - g->stats.delay_avg = g->stats.delay_avg + delay; - g->stats.delay_avg = div64_u64(g->stats.delay_avg, atomic64_read(&g->stats.packets)); - } -#endif } else if (rtp_pt_idx == -2) /* not RTP */ ; diff --git a/kernel-module/xt_RTPENGINE.h b/kernel-module/xt_RTPENGINE.h index e6754a02f..650a8ec14 100644 --- a/kernel-module/xt_RTPENGINE.h +++ b/kernel-module/xt_RTPENGINE.h @@ -17,9 +17,6 @@ struct rtpengine_stats { uint64_t packets; uint64_t bytes; uint64_t errors; - uint64_t delay_min; - uint64_t delay_avg; - uint64_t delay_max; uint8_t tos; }; struct rtpengine_rtp_stats {