Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
trx-ecpri
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
trx-ecpri
Commits
207a4c54
Commit
207a4c54
authored
Jan 22, 2025
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip
parent
8c4c2b82
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
16 deletions
+15
-16
ring_buffer.c
ring_buffer.c
+4
-4
trx_ecpri.c
trx_ecpri.c
+11
-12
No files found.
ring_buffer.c
View file @
207a4c54
...
...
@@ -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
)
{
...
...
trx_ecpri.c
View file @
207a4c54
...
...
@@ -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
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment