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
6374f04b
Commit
6374f04b
authored
Jan 24, 2025
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix TX sending garbage after the 1st packet in a burst
parent
31359d72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
trx_ecpri.c
trx_ecpri.c
+5
-5
No files found.
trx_ecpri.c
View file @
6374f04b
...
@@ -416,7 +416,7 @@ static void *recv_thread(void *p) {
...
@@ -416,7 +416,7 @@ static void *recv_thread(void *p) {
int
o
=
ETHERNET_HEADER
+
ECPRI_COMMON_HEADER
;
int
o
=
ETHERNET_HEADER
+
ECPRI_COMMON_HEADER
;
uint16_t
antenna_id
=
ntohs
(
*
((
uint16_t
*
)
(
data
+
o
+
0
)));
uint16_t
antenna_id
=
ntohs
(
*
((
uint16_t
*
)
(
data
+
o
+
0
)));
uint8_t
seq_id
=
((
uint8_t
)
(
*
((
uint16_t
*
)
(
data
+
o
+
2
))
>>
8
));
uint8_t
seq_id
=
((
uint8_t
)
(
*
((
uint16_t
*
)
(
data
+
o
+
2
))
>>
8
));
if
(
antenna_id
>
4
||
antenna_id
<
0
)
{
if
(
antenna_id
>
s
->
rx_n_channel
||
antenna_id
<
0
)
{
log_exit
(
"RECV_THREAD"
,
"Wrong Antenna ID: %d
\n
"
,
antenna_id
);
log_exit
(
"RECV_THREAD"
,
"Wrong Antenna ID: %d
\n
"
,
antenna_id
);
}
}
}
}
...
@@ -471,7 +471,7 @@ static void *send_thread(void *p) {
...
@@ -471,7 +471,7 @@ static void *send_thread(void *p) {
to_send
=
s
->
tx_burst
;
to_send
=
s
->
tx_burst
;
for
(
int
j
=
0
;
j
<
to_send
;
j
++
)
{
for
(
int
j
=
0
;
j
<
to_send
;
j
++
)
{
msgv
[
j
].
iov_base
=
rbuf_read
(
&
tx_rbuf
)
+
j
;
msgv
[
j
].
iov_base
=
rbuf_read
(
&
tx_rbuf
)
+
j
*
PACKET_SIZE
;
msgv
[
j
].
iov_len
=
PACKET_SIZE
;
msgv
[
j
].
iov_len
=
PACKET_SIZE
;
if
(
j
>
s
->
tx_burst
)
if
(
j
>
s
->
tx_burst
)
log_exit
(
"SEND_THREAD"
,
"Too many burst packets"
);
log_exit
(
"SEND_THREAD"
,
"Too many burst packets"
);
...
@@ -512,7 +512,7 @@ static void *encode_thread(void *p) {
...
@@ -512,7 +512,7 @@ static void *encode_thread(void *p) {
// If we have frames to encode (is there space in TX buffer)
// If we have frames to encode (is there space in TX buffer)
// And if there are frames from trx_write callback to encode
// And if there are frames from trx_write callback to encode
to_write
=
rbuf_write_amount
(
&
tx_rbuf
)
/
(
PACKET_SIZE
*
4
);
to_write
=
rbuf_write_amount
(
&
tx_rbuf
)
/
(
PACKET_SIZE
*
s
->
tx_n_channel
);
to_read
=
1
;
to_read
=
1
;
for
(
int
k
=
0
;
k
<
s
->
tx_n_channel
;
k
++
)
for
(
int
k
=
0
;
k
<
s
->
tx_n_channel
;
k
++
)
if
(
rbuf_read_amount
(
&
trxw_rbuf
[
k
])
<
IQ_PAYLOAD
)
if
(
rbuf_read_amount
(
&
trxw_rbuf
[
k
])
<
IQ_PAYLOAD
)
...
@@ -547,7 +547,7 @@ static void *encode_thread(void *p) {
...
@@ -547,7 +547,7 @@ static void *encode_thread(void *p) {
}
}
check_rbuf_write
(
&
tx_rbuf
,
log_exit
);
check_rbuf_write
(
&
tx_rbuf
,
log_exit
);
// Increment counter once we wrote packets for all channels
// Increment counter once we wrote packets for all channels
update_counter
(
&
encode_counter
,
4
);
update_counter
(
&
encode_counter
,
s
->
tx_n_channel
);
// Update ORAN counters
// Update ORAN counters
slot_id
=
(
slot_id
+
1
)
%
2
;
slot_id
=
(
slot_id
+
1
)
%
2
;
...
@@ -591,7 +591,7 @@ static void *decode_thread(void *p) {
...
@@ -591,7 +591,7 @@ static void *decode_thread(void *p) {
uint16_t
antenna_id
=
ntohs
(
*
((
uint16_t
*
)
(
data
+
j
+
0
)));
uint16_t
antenna_id
=
ntohs
(
*
((
uint16_t
*
)
(
data
+
j
+
0
)));
uint8_t
seq_id
=
((
uint8_t
)
(
*
((
uint16_t
*
)
(
data
+
j
+
2
))
>>
8
));
uint8_t
seq_id
=
((
uint8_t
)
(
*
((
uint16_t
*
)
(
data
+
j
+
2
))
>>
8
));
if
(
antenna_id
>
4
||
antenna_id
<
0
)
{
if
(
antenna_id
>
s
->
rx_n_channel
||
antenna_id
<
0
)
{
printf
(
"PREVIOUS PACKET DATA:
\n
"
);
printf
(
"PREVIOUS PACKET DATA:
\n
"
);
for
(
int
k
=
0
;
k
<
PACKET_SIZE
*
2
;
k
++
)
for
(
int
k
=
0
;
k
<
PACKET_SIZE
*
2
;
k
++
)
printf
(
"%X"
,
rbuf_read
(
&
rx_rbuf
)[
k
-
PACKET_SIZE
]);
printf
(
"%X"
,
rbuf_read
(
&
rx_rbuf
)[
k
-
PACKET_SIZE
]);
...
...
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