MT#55283 move TOS reporting to shm

Change-Id: I97e831836adab7e3c4ee46d58c6a6cfe639bad21
pull/1826/head
Richard Fuchs 2 years ago
parent 89984967e2
commit 2c425bc47e

@ -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));
}
}

@ -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);

@ -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;

@ -48,6 +48,7 @@ struct stream_stats {
atomic64 errors;
atomic64 last_packet;
atomic_t last_pt;
atomic_t tos;
};
struct rtp_stats {

@ -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);

@ -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;
};

Loading…
Cancel
Save