Commit 207a4c54 authored by Joanne Hugé's avatar Joanne Hugé

wip

parent 8c4c2b82
......@@ -63,17 +63,17 @@ static void check_rbuf_read(ring_buffer_t * rbuf,
void (* log_exit)(const char *, const char * msg, ...)) {
if ((rbuf->read_index % rbuf->block_len))
log_exit("CHECK_RBUF",
"read index needs to be a multiple of block_len"
"read index for %s needs to be a multiple of block_len"
" (%d is not a multiple of %d)",
rbuf->read_index, rbuf->block_len);
rbuf->name, rbuf->read_index, rbuf->block_len);
}
static void check_rbuf_write(ring_buffer_t * rbuf,
void (* log_exit)(const char *, const char * msg, ...)) {
if ((rbuf->write_index % rbuf->block_len))
log_exit("CHECK_RBUF",
"write index needs to be a multiple of block_len"
"write index for %s needs to be a multiple of block_len"
" (%d is not a multiple of %d)",
rbuf->write_index, rbuf->block_len);
rbuf->name, rbuf->write_index, rbuf->block_len);
}
static int rbuf_read_amount(ring_buffer_t * rbuf) {
......
......@@ -33,7 +33,7 @@
#include "private/trx_driver.h"
#define DEBUG
#define DISABLE_SEND
//#define DISABLE_SEND
//#define DISABLE_ENCODE
#define DISABLE_RECV
#define DISABLE_DECODE
......@@ -284,14 +284,14 @@ static void print_stats(FILE * f, int print_header) {
"%" STAT_INT_LEN "" PRIi64 "pps "
"%" STAT_INT_LEN "" PRIi64 "pps "
"\n",
rx_drop_counter.counter,
tx_drop_counter.counter,
recv_counter.counter,
decode_counter.counter,
read_counter.counter,
write_counter.counter,
encode_counter.counter,
sent_counter.counter,
rx_drop_counter.counter / (IQ_PAYLOAD / N_SAMPLES),
tx_drop_counter.counter / (IQ_PAYLOAD / N_SAMPLES),
recv_counter.counter / 4,
decode_counter.counter / 4,
read_counter.counter / (IQ_PAYLOAD / N_SAMPLES),
write_counter.counter / (IQ_PAYLOAD / N_SAMPLES),
encode_counter.counter / 4,
sent_counter.counter / 4,
recv_counter.pps,
decode_counter.pps,
read_counter.pps,
......@@ -461,7 +461,6 @@ static void *send_thread(void *p) {
update_counter(&sent_counter, ret);
}
rbuf_increment_read(&tx_rbuf, PACKET_SIZE * to_send);
check_rbuf_read(&tx_rbuf, log_exit);
}
pthread_exit(EXIT_SUCCESS);
}
......@@ -522,7 +521,7 @@ static void *encode_thread(void *p) {
}
check_rbuf_write(&tx_rbuf, log_exit);
// Increment counter once we wrote packets for all channels
update_counter(&encode_counter, 1);
update_counter(&encode_counter, 4);
// Update ORAN counters
slot_id = (slot_id + 1) % 2;
......@@ -874,7 +873,7 @@ static void trx_ecpri_write(TRXState *s1, trx_timestamp_t timestamp, const void
float ** _samples = (float **) __samples;
TRXEcpriState *s = s1->opaque;
log_debug("TRX_ECPRI_WRITE", "trx_ecpri_write, count = %ld", count / N_SAMPLES);
//log_debug("TRX_ECPRI_WRITE", "trx_ecpri_write, count = %ld", count / N_SAMPLES);
// Consistency check
if(prev_count && ((timestamp - prev_timestamp) != prev_count)) {
......
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