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
aa1b8a8c
Commit
aa1b8a8c
authored
May 05, 2022
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix trx_ecpri_write bug
parent
431bebe4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
trx_ecpri_dpdk.c
trx_ecpri_dpdk.c
+7
-5
No files found.
trx_ecpri_dpdk.c
View file @
aa1b8a8c
...
...
@@ -154,7 +154,7 @@ static uint8_t pkt_frame_full[1024];
#endif
static
volatile
int
rx_trace_ready
=
0
;
static
volatile
int
tx_trace_ready
=
1
;
static
volatile
int
tx_trace_ready
=
0
;
static
int64_t
encode_counter_prev
=
0
;
static
int64_t
decode_counter_prev
=
0
;
...
...
@@ -379,7 +379,9 @@ static void update_counter(volatile counter_stat_t * c, int64_t v) {
static
void
trace_handler
(
struct
timespec
initial
,
TRXEcpriState
*
s
)
{
struct
timespec
next
;
int
ready
=
1
;
if
(
s
->
trace_tx
)
ready
&=
tx_trace_ready
;
if
(
s
->
trace_rx
)
ready
&=
rx_trace_ready
;
if
(
ready
)
{
int64_t
d
;
...
...
@@ -823,7 +825,7 @@ static void *statistic_thread(void *p) {
next
=
initial
;
for
(
int64_t
i
=
0
;;
i
++
)
{
add_ns
(
&
next
,
s
->
statistics_refresh_rate_ns
);
if
(
s
->
trace_rx
)
if
(
s
->
trace_rx
||
s
->
trace_tx
)
trace_handler
(
initial
,
s
);
print_stats
(
stats_file_desc
,
(
i
%
50
)
==
0
);
#ifdef DEBUG
...
...
@@ -1136,7 +1138,7 @@ static void trx_ecpri_write(TRXState *s1, trx_timestamp_t timestamp, const void
int
len
=
nc
*
trxr_rbuf
[
0
].
len
*
sizeof
(
Complex
);
if
(
__samples
)
for
(
int
i
=
0
;
i
<
s
->
tx_n_channel
;
i
++
)
{
uint8_t
*
src
=
((
uint8_t
*
)
_samples
[
i
])
+
len
;
uint8_t
*
src
=
((
uint8_t
*
)
_samples
[
i
])
+
(
nk
*
trxr_rbuf
[
0
].
len
*
sizeof
(
Complex
))
;
uint8_t
*
dst
=
((
uint8_t
*
)
trxw_rbuf
[
i
].
buffer
)
+
trxw_rbuf
[
0
].
write_index
*
trxw_rbuf
[
0
].
len
*
sizeof
(
Complex
);
memcpy
(
dst
,
src
,
len
);
}
...
...
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