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
aa579a91
Commit
aa579a91
authored
May 03, 2022
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP
parent
e3cbb609
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
14 deletions
+10
-14
trx_ecpri_dpdk.c
trx_ecpri_dpdk.c
+10
-14
No files found.
trx_ecpri_dpdk.c
View file @
aa579a91
...
...
@@ -429,7 +429,7 @@ static void trace_handler(struct timespec initial, TRXEcpriState * s) {
sprintf
(
n
,
"%s/trxw.trace"
,
s
->
log_directory
);
f
=
fopen
(
n
,
"wb+"
);
start
=
(
TRACE
)
%
trxw_rbuf
[
0
].
buf_len
;
log_info
(
"TRACE"
,
"Writing %d frames to trxw.trace"
,
trxw_rbuf
[
0
].
write_index
+
trxw_rbuf
.
buf_len
-
start
);
log_info
(
"TRACE"
,
"Writing %d frames to trxw.trace"
,
trxw_rbuf
[
0
].
write_index
+
trxw_rbuf
[
0
]
.
buf_len
-
start
);
for
(
int
i
=
start
;
i
!=
trxw_rbuf
[
0
].
write_index
;
i
=
(
i
+
1
)
%
trxw_rbuf
[
0
].
buf_len
)
{
for
(
int
j
=
0
;
j
<
TX_N_CHANNEL
;
j
++
)
fwrite
((
uint8_t
*
)
(((
Complex
*
)
trxw_rbuf
[
j
].
buffer
)
+
i
*
trxw_rbuf
[
0
].
len
),
trxw_rbuf
[
0
].
len
*
sizeof
(
Complex
),
1
,
f
);
...
...
@@ -454,7 +454,7 @@ static void trace_handler(struct timespec initial, TRXEcpriState * s) {
memset
(
n
,
'\0'
,
256
);
sprintf
(
n
,
"%s/trxr.trace"
,
s
->
log_directory
);
f
=
fopen
(
n
,
"wb+"
);
start
=
(
TRACE
+
decode_counter_prev
)
%
trxr_rbuf
.
buf_len
;
start
=
(
TRACE
+
decode_counter_prev
)
%
trxr_rbuf
[
0
]
.
buf_len
;
log_info
(
"TRACE"
,
"Writing %d frames to trxr.trace"
,
trxr_rbuf
[
0
].
write_index
+
trxr_rbuf
[
0
].
buf_len
-
start
);
for
(
int
i
=
start
;
i
!=
trxr_rbuf
[
0
].
write_index
;
i
=
(
i
+
1
)
%
trxr_rbuf
[
0
].
buf_len
)
{
for
(
int
j
=
0
;
j
<
RX_N_CHANNEL
;
j
++
)
...
...
@@ -549,7 +549,7 @@ static void *recv_thread(void *p) {
while
((
nc
=
rbuf_contiguous_copy
(
NULL
,
&
rx_rbuf
,
nr
)))
{
#ifdef TRACE
#if TRACE_RX
#if
def
TRACE_RX
if
((
recv_counter
.
counter
+
nc
)
>=
(
rx_rbuf
.
buf_len
+
TRACE
))
{
rx_trace_ready
=
1
;
log_info
(
"RECV_THREAD"
,
"RX Trace ready"
);
...
...
@@ -704,7 +704,7 @@ static void *encode_thread(void *p) {
nb_frames
=
g
->
count
>
n
?
n
:
g
->
count
;
g
->
count
-=
nb_frames
;
#ifdef TRACE
#if TRACE_TX
#if
def
TRACE_TX
if
(
sync_complete
&&
(
encode_counter
.
counter
+
nb_frames
)
>=
(
tx_rbuf
.
buf_len
+
TRACE
))
{
tx_trace_ready
=
1
;
log_info
(
"ENCODE_THREAD"
,
"TX Trace ready"
);
...
...
@@ -790,30 +790,26 @@ static void *decode_thread(void *p) {
}
n
=
EFREQ
;
for
(
int
j
=
0
;
j
<
n
;
j
++
)
rbuf_update_write_index
(
&
trxr_rbuf
);
rbuf_update_write_index
(
&
trxr_rbuf
[
0
]
);
update_counter
(
&
decode_counter
,
n
);
continue
;
}
else
if
(
reset_decode_counter
)
{
decode_counter_prev
=
decode_counter
.
counter
decode_counter_prev
=
decode_counter
.
counter
;
decode_counter
.
counter
=
0
;
reset_decode_counter
=
0
;
}
#endif
while
(
!
(
n
=
rbuf_read_amount
(
&
rx_rbuf
)));
while
(
rbuf_write_amount
(
&
trxr_rbuf
[
0
])
<
n
);
#ifdef TRACE
trxr_trace_index_start
=
trxr_rbuf
.
write_index
;
#endif
while
(
!
(
n
=
rbuf_read_amount
(
&
rx_rbuf
)))
{};
while
(
rbuf_write_amount
(
&
trxr_rbuf
[
0
])
<
n
)
{};
while
((
nc
=
rbuf_contiguous_copy
(
&
rx_rbuf
,
&
trxr_rbuf
[
0
],
n
)))
{
uint8_t
*
buf
=
((
uint8_t
*
)
rx_rbuf
.
buffer
)
+
(
rx_rbuf
.
read_index
*
rx_rbuf
.
len
)
+
22
;
#ifdef TRACE
#if TRACE_RX
#if
def
TRACE_RX
if
(
received_pkts
&&
((
decode_counter
.
counter
+
nc
)
>=
(
trxr_rbuf
[
0
].
buf_len
+
TRACE
)))
{
rx_trace_ready
=
1
;
log_info
(
"DECODE_THREAD"
,
"RX Trace ready"
);
...
...
@@ -1164,7 +1160,7 @@ static void trx_ecpri_write(TRXState *s1, trx_timestamp_t timestamp, const void
}
#ifdef TRACE
#if TRACE_TX
#if
def
TRACE_TX
if
((
write_counter
.
counter
+
write_count
)
>=
(
trxw_rbuf
[
0
].
buf_len
+
TRACE
))
{
tx_trace_ready
=
1
;
log_info
(
"TRX_ECPRI_WRITE"
,
"TX Trace ready"
);
...
...
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