diff --git a/daemon/cdr.c b/daemon/cdr.c index 137ed5398..1a3f09ee9 100644 --- a/daemon/cdr.c +++ b/daemon/cdr.c @@ -150,7 +150,7 @@ void cdr_update_entry(call_t * c) { cdrlinecnt, md->index, protocol, packet_stream_last_packet(ps), cdrlinecnt, md->index, protocol, - ps->in_tos_tclass); + atomic_get_na(&ps->stats_in->tos)); } else { g_string_append_printf(cdr, "ml%i_midx%u_%s_endpoint_ip=%s, " @@ -175,7 +175,7 @@ void cdr_update_entry(call_t * c) { cdrlinecnt, md->index, protocol, packet_stream_last_packet(ps), cdrlinecnt, md->index, protocol, - ps->in_tos_tclass); + atomic_get_na(&ps->stats_in->tos)); } } diff --git a/daemon/media_socket.c b/daemon/media_socket.c index 20e43260d..d159ec318 100644 --- a/daemon/media_socket.c +++ b/daemon/media_socket.c @@ -3504,8 +3504,6 @@ enum thread_looper_action kernel_stats_updater(void) { count_stream_stats_kernel(ps); } - ps->in_tos_tclass = ke->tos; - bool update = false; bool active_media = (rtpe_now.tv_sec - packet_stream_last_packet(ps) < 1); diff --git a/include/call.h b/include/call.h index 0a72f1906..0f3cf521d 100644 --- a/include/call.h +++ b/include/call.h @@ -467,7 +467,6 @@ struct packet_stream { struct stream_stats *stats_in; struct stream_stats *stats_out; - unsigned char in_tos_tclass; atomic64 last_packet; // userspace only GHashTable *rtp_stats; /* LOCK: call->master_lock */ struct rtp_stats *rtp_stats_cache; diff --git a/kernel-module/common_stats.h b/kernel-module/common_stats.h index 34d564337..52f7cfd06 100644 --- a/kernel-module/common_stats.h +++ b/kernel-module/common_stats.h @@ -48,6 +48,7 @@ struct stream_stats { atomic64 errors; atomic64 last_packet; atomic_t last_pt; + atomic_t tos; }; struct rtp_stats { diff --git a/kernel-module/xt_RTPENGINE.c b/kernel-module/xt_RTPENGINE.c index 1d6eed4b0..94d1de846 100644 --- a/kernel-module/xt_RTPENGINE.c +++ b/kernel-module/xt_RTPENGINE.c @@ -320,7 +320,6 @@ struct rtpengine_target { struct rtpengine_target_info target; unsigned int last_pt; // index into pt_input[] and pt_output[] - atomic_t tos; spinlock_t ssrc_stats_lock; struct rtpengine_ssrc_stats ssrc_stats[RTPE_NUM_SSRC_TRACKING]; @@ -1473,8 +1472,6 @@ static ssize_t proc_blist_read(struct file *f, char __user *b, size_t l, loff_t memcpy(&opp->target, &g->target, sizeof(opp->target)); - opp->tos = atomic_read(&g->tos); - spin_lock_irqsave(&g->decrypt_rtp.lock, flags); for (i = 0; i < ARRAY_SIZE(opp->target.decrypt.last_rtp_index); i++) opp->target.decrypt.last_rtp_index[i] = g->target.decrypt.last_rtp_index[i]; @@ -5548,7 +5545,7 @@ static unsigned int rtpengine46(struct sk_buff *skb, struct sk_buff *oskb, } do_stats: - atomic_set(&g->tos, in_tos); + atomic_set(&g->target.stats->tos, in_tos); atomic64_set(&g->target.stats->last_packet, packet_ts); atomic64_inc(&g->target.stats->packets); diff --git a/kernel-module/xt_RTPENGINE.h b/kernel-module/xt_RTPENGINE.h index bb078dc9b..bf39783fb 100644 --- a/kernel-module/xt_RTPENGINE.h +++ b/kernel-module/xt_RTPENGINE.h @@ -269,7 +269,6 @@ struct rtpengine_command_send_packet { struct rtpengine_list_entry { struct rtpengine_target_info target; struct rtpengine_output_info outputs[RTPE_MAX_FORWARD_DESTINATIONS]; - int tos; };