Commit 85e34aac authored by Joanne Hugé's avatar Joanne Hugé

wip

parent 051a2768
......@@ -125,10 +125,10 @@ typedef struct {
int statistic_affinity;
int flow_id;
int frame_frequency;
int trx_buf_size;
int txrx_buf_size;
int rx_burst;
int monitor_pps;
int monitor_trigger_duration;
......@@ -162,9 +162,6 @@ static counter_stat_t sent_counter; // frames sent to RRH
static counter_stat_t rx_drop_counter; // frames sent to RRH
static counter_stat_t tx_drop_counter; // frames sent to RRH
static int recv_pps_threshold_hit = 0;
static int recv_pps_threshold;
// Network
static uint8_t seq_id;
static uint8_t frame_id;
......@@ -653,25 +650,6 @@ static void *statistic_thread(void *p) {
update_counter_pps(&write_counter);
update_counter_pps(&encode_counter);
update_counter_pps(&sent_counter);
if(s->monitor_pps) {
if(recv_counter.pps > recv_pps_threshold) {
recv_pps_threshold_hit = 1;
}
if(recv_pps_threshold_hit && recv_counter.pps < recv_pps_threshold) {
struct timespec _ts;
int64_t ts;
clock_gettime(CLOCK_MONOTONIC, &_ts);
ts = ts_to_int(_ts);
if((recv_stop && ((ts - recv_stop) > (s->monitor_trigger_duration) * INT64_C(1000000000)))) {
if(s->monitor_pps == 1)
log_exit("MONITOR", "Stopped recieving packets, restarting...");
log_info("MONITOR", "Stopped recieving packets, sending again...");
recv_stop = 0;
}
if(!recv_stop)
recv_stop = ts;
}
}
clock_nanosleep(CLOCK_TAI, TIMER_ABSTIME, &next, NULL);
}
......@@ -1235,16 +1213,12 @@ int trx_driver_init(TRXState *s1)
s->statistic_affinity = (int) val;
trx_get_param_double(s1, &val, "flow_id");
s->flow_id = (int) val;
trx_get_param_double(s1, &val, "frame_frequency");
s->frame_frequency = (int) val;
trx_get_param_double(s1, &val, "trx_buf_size");
s->trx_buf_size = (int) val;
trx_get_param_double(s1, &val, "txrx_buf_size");
s->txrx_buf_size = (int) val;
trx_get_param_double(s1, &val, "monitor_pps");
s->monitor_pps = (int) val;
trx_get_param_double(s1, &val, "monitor_trigger_duration");
s->monitor_trigger_duration = (int) val;
trx_get_param_double(s1, &val, "rx_burst");
s->rx_burst = (int) val;
trx_get_param_double(s1, &val, "rx_n_channel");
s->rx_n_channel = (int) val;
trx_get_param_double(s1, &val, "tx_n_channel");
......@@ -1262,8 +1236,6 @@ int trx_driver_init(TRXState *s1)
s->bbu_if = trx_get_param_string(s1, "bbu_if");
s->log_directory = trx_get_param_string(s1, "log_directory");
recv_pps_threshold = (s->frame_frequency * 9 / 10);
s1->opaque = s;
s1->trx_end_func = trx_ecpri_end;
s1->trx_write_func2 = trx_ecpri_write;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment