Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
spbro
OpenXG-RAN
Commits
144e2675
Commit
144e2675
authored
Oct 28, 2020
by
Florian Kaltenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing PRACH bug in benetel_5g driver
parent
f4f9d3b4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
13 deletions
+47
-13
targets/ARCH/ETHERNET/benetel/5g/benetel.c
targets/ARCH/ETHERNET/benetel/5g/benetel.c
+1
-0
targets/ARCH/ETHERNET/benetel/5g/dpdk_driver.c
targets/ARCH/ETHERNET/benetel/5g/dpdk_driver.c
+11
-11
targets/ARCH/ETHERNET/benetel/5g/low.c
targets/ARCH/ETHERNET/benetel/5g/low.c
+35
-2
No files found.
targets/ARCH/ETHERNET/benetel/5g/benetel.c
View file @
144e2675
...
...
@@ -275,6 +275,7 @@ void benetel_fh_if4p5_south_out(RU_t *ru,
int
slot
,
uint64_t
timestamp
)
{
//printf("XXX benetel_fh_if4p5_south_out %d %d %ld\n", frame, slot, timestamp);
benetel_eth_state_t
*
s
=
ru
->
ifdevice
.
priv
;
NR_DL_FRAME_PARMS
*
fp
;
...
...
targets/ARCH/ETHERNET/benetel/5g/dpdk_driver.c
View file @
144e2675
...
...
@@ -86,10 +86,9 @@ static struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
static
struct
rte_eth_conf
port_conf
=
{
.
rxmode
=
{
.
split_hdr_size
=
0
,
.
offloads
=
DEV_RX_OFFLOAD_CRC_STRIP
,
.
offloads
=
DEV_RX_OFFLOAD_JUMBO_FRAME
,
.
split_hdr_size
=
0
,
.
max_rx_pkt_len
=
9500
,
.
offloads
=
DEV_RX_OFFLOAD_JUMBO_FRAME
,
.
split_hdr_size
=
0
,
.
max_rx_pkt_len
=
9500
,
},
.
txmode
=
{
.
mq_mode
=
ETH_MQ_TX_NONE
,
...
...
@@ -234,7 +233,7 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid, benetel_t *bs)
}
// Trigger start send DL packets
if
(
PAYLOAD_1
==
0x13
&&
PAYLOAD_2
==
0xe4
&&
SYMBOL
==
0x4
6
&&
ANT_NUM
==
0x00
&&
SUBFRAME
==
0x00
&&
dl_start
==
0
){
if
(
PAYLOAD_1
==
0x13
&&
PAYLOAD_2
==
0xe4
&&
SYMBOL
==
0x4
4
&&
ANT_NUM
==
0x00
&&
SUBFRAME
==
0x00
&&
dl_start
==
0
){
printf
(
"
\n
U-Plane Started
\n
"
);
printf
(
"
\n
====================================================
\n
"
);
...
...
@@ -253,7 +252,7 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid, benetel_t *bs)
p
.
antenna
=
0
;
memcpy
(
p
.
iq
,
IQ_ptr
,
5088
);
store_ul
(
bs
,
&
p
);
//
if (p.symbol==0) printf("store ul f.sl.sy %d.%d.%d\n", p.frame, p.slot, p.symbol);
//
if (p.symbol==0) printf("store ul f.sl.sy %d.%d.%d\n", p.frame, p.slot, p.symbol);
}
// U-PLANE UL ANT_0 PROCESSING
...
...
@@ -268,7 +267,7 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid, benetel_t *bs)
int
tx_frame
=
frame
;
int
tx_subframe
=
subframe
;
int
tx_slot
=
slot
;
int
tx_symbol
=
symbol
+
8
;
int
tx_symbol
=
symbol
+
10
;
if
(
tx_symbol
>
13
)
{
tx_symbol
-=
14
;
...
...
@@ -286,7 +285,7 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid, benetel_t *bs)
ANT_NUM
=
0x00
;
// Mask the symbol bits from UL packet received and apply the shift.
SYMBOL
=
((
SYMBOL
&
0
b00111111
)
+
8
)
%
14
;
SYMBOL
=
((
SYMBOL
&
0
b00111111
)
+
10
)
%
14
;
ANT_NUM
=
0x00
;
SUBFRAME
=
sf
;
...
...
@@ -307,6 +306,7 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid, benetel_t *bs)
memcpy
(
IQ_ptr
,
bs
->
buffers
->
dl
[
oai_slot
]
+
tx_symbol
*
1272
*
4
,
1272
*
4
);
}
//printf("DL buffer f sf slot symbol %d %d %d %d (sf %d)\n", tx_frame, tx_subframe, tx_slot, tx_symbol, (int)sf);
bs
->
buffers
->
dl_busy
[
oai_slot
]
&=
~
(
1
<<
tx_symbol
);
unlock_dl_buffer
(
bs
->
buffers
,
oai_slot
);
...
...
@@ -319,7 +319,7 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid, benetel_t *bs)
{
// Mask the symbol bits from UL packet received and apply the shift.
SYMBOL
=
((
SYMBOL
&
0
b00111111
)
+
8
)
%
14
;
SYMBOL
=
((
SYMBOL
&
0
b00111111
)
+
10
)
%
14
;
ANT_NUM
=
0x01
;
SUBFRAME
=
sf
;
...
...
@@ -348,10 +348,10 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid, benetel_t *bs)
else
if
(
PAYLOAD_1
==
0x0d
&&
PAYLOAD_2
==
0x28
){
if
(
ANT_NUM
==
0
)
{
int
subframe
=
SUBFRAME
>>
4
;
int
slot
=
((
SUBFRAME
&
0x0f
)
<<
2
)
|
((
SYMBOL
>>
6
)
&
0x03
);
//
int slot = ((SUBFRAME & 0x0f) << 2) | ((SYMBOL >> 6) & 0x03);
if
(
subframe
==
9
)
{
//printf("store prach f.sf.sl %d.%d.%d %d\n", FRAME, subframe, slot, subframe * 2 + slot);
store_prach
(
bs
,
FRAME
,
s
lot
/*subframe * 2 + slot*/
,
IQ_ptr
);
store_prach
(
bs
,
FRAME
,
s
ubframe
*
2
+
1
,
IQ_ptr
);
}
}
rte_pktmbuf_free
(
m
);
...
...
targets/ARCH/ETHERNET/benetel/5g/low.c
View file @
144e2675
...
...
@@ -27,17 +27,50 @@
void
store_ul
(
benetel_t
*
bs
,
ul_packet_t
*
ul
)
{
#if 0
struct timespec t;
static struct timespec old;
clock_gettime(CLOCK_REALTIME, &t);
printf("store_ul %d.%ld (%ld)\n", (int)(t.tv_sec % 60), t.tv_nsec, t.tv_nsec - old.tv_nsec);
old = t;
#endif
/* only antenna 0 for the moment */
if
(
ul
->
antenna
!=
0
)
return
;
if
(
ul
->
slot
!=
bs
->
next_slot
||
ul
->
symbol
!=
bs
->
next_symbol
)
{
printf
(
"%s:
fatal
, expected frame.sl.symbol %d.%d.%d, got %d.%d.%d
\n
"
,
printf
(
"%s:
error
, expected frame.sl.symbol %d.%d.%d, got %d.%d.%d
\n
"
,
__FUNCTION__
,
bs
->
expected_benetel_frame
,
bs
->
next_slot
,
bs
->
next_symbol
,
ul
->
frame
,
ul
->
slot
,
ul
->
symbol
);
exit
(
1
);
}
/* fill missing data with 0s */
while
(
ul
->
slot
!=
bs
->
next_slot
||
ul
->
symbol
!=
bs
->
next_symbol
)
{
lock_ul_buffer
(
bs
->
buffers
,
bs
->
next_slot
);
if
(
bs
->
buffers
->
ul_busy
[
bs
->
next_slot
]
&
(
1
<<
bs
->
next_symbol
))
{
printf
(
"%s: warning, UL overflow (sl.symbol %d.%d)
\n
"
,
__FUNCTION__
,
bs
->
next_slot
,
bs
->
next_symbol
);
}
memset
(
bs
->
buffers
->
ul
[
bs
->
next_slot
]
+
bs
->
next_symbol
*
1272
*
4
,
0
,
1272
*
4
);
bs
->
buffers
->
ul_busy
[
bs
->
next_slot
]
|=
(
1
<<
bs
->
next_symbol
);
signal_ul_buffer
(
bs
->
buffers
,
bs
->
next_slot
);
unlock_ul_buffer
(
bs
->
buffers
,
bs
->
next_slot
);
bs
->
next_symbol
++
;
if
(
bs
->
next_symbol
==
14
)
{
bs
->
next_symbol
=
0
;
bs
->
next_slot
=
(
bs
->
next_slot
+
1
)
%
20
;
if
(
bs
->
next_slot
==
0
)
{
bs
->
expected_benetel_frame
++
;
bs
->
expected_benetel_frame
&=
255
;
}
}
}
lock_ul_buffer
(
bs
->
buffers
,
bs
->
next_slot
);
...
...
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