Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OAI-RAN-5G-sheduler_MaxTBS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MAQ5G-PFC
OAI-RAN-5G-sheduler_MaxTBS
Commits
19922715
Commit
19922715
authored
9 years ago
by
Sandeep Kumar
Browse files
Options
Downloads
Patches
Plain Diff
rcc recv and send work (not sync with rru yet)
parent
808494dd
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
openair1/PHY/LTE_TRANSPORT/if4_tools.c
+7
-8
7 additions, 8 deletions
openair1/PHY/LTE_TRANSPORT/if4_tools.c
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c
+12
-21
12 additions, 21 deletions
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c
with
19 additions
and
29 deletions
openair1/PHY/LTE_TRANSPORT/if4_tools.c
+
7
−
8
View file @
19922715
...
...
@@ -193,22 +193,21 @@ void recv_IF4(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t *packet_type,
}
db_halflength
=
db_fulllength
>>
1
;
int64_t
*
ret_type
=
(
int64_t
*
)
malloc
(
sizeof
(
int64_t
));
void
*
rx_buffer
=
NULL
;
IF4_header_t
*
packet_header
=
NULL
;
int16_t
*
data_block
=
NULL
;
// Read packet(s) from the fronthaul
if
(
eNB
->
ifdevice
.
trx_read_func
(
&
eNB
->
ifdevice
,
r
et_type
,
(
int64_t
*
)
pack
et_type
,
&
rx_buffer
,
db_fulllength
,
0
)
<
0
)
{
perror
(
"ETHERNET read"
);
}
*
packet_
type
=
(
uint16
_t
)
*
ret_type
;
data_block
=
(
int16_t
*
)
(
rx_buffer
+
sizeof_IF4_header_t
);
packet_
header
=
(
IF4_header
_t
*
)
(
rx_buffer
+
MAC_HEADER_SIZE_BYTES
)
;
data_block
=
(
int16_t
*
)
(
rx_buffer
+
MAC_HEADER_SIZE_BYTES
+
sizeof_IF4_header_t
);
if
(
*
packet_type
==
IF4_PDLFFT
)
{
// Calculate from received packet
...
...
@@ -225,7 +224,7 @@ void recv_IF4(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t *packet_type,
}
// Find and return symbol_number
*
symbol_number
=
((
((
IF4
_header
_t
*
)(
rx_buffer
))
->
frame_status
)
>>
26
)
&
0x000f
;
*
symbol_number
=
((
packet
_header
->
frame_status
)
>>
26
)
&
0x000f
;
}
else
if
(
*
packet_type
==
IF4_PULFFT
)
{
// Calculate from received packet
...
...
@@ -242,7 +241,7 @@ void recv_IF4(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t *packet_type,
}
// Find and return symbol_number
*
symbol_number
=
((
((
IF4
_header
_t
*
)(
rx_buffer
))
->
frame_status
)
>>
26
)
&
0x000f
;
*
symbol_number
=
((
packet
_header
->
frame_status
)
>>
26
)
&
0x000f
;
}
else
if
(
*
packet_type
==
IF4_PRACH
)
{
// FIX: hard coded prach samples length
...
...
This diff is collapsed.
Click to expand it.
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c
+
12
−
21
View file @
19922715
...
...
@@ -312,13 +312,12 @@ int trx_eth_read_raw_IF4(openair0_device *device, openair0_timestamp *timestamp,
ssize_t
packet_size
=
MAC_HEADER_SIZE_BYTES
+
sizeof_IF4_header_t
;
void
*
test_buffer
=
(
void
*
)
malloc
(
packet_size
);
void
*
rx_buffer
=
NULL
;
IF4_header_t
*
test_header
=
(
IF4_header_t
*
)(
test_buffer
+
MAC_HEADER_SIZE_BYTES
);
bytes_received
=
recv
(
eth
->
sockfd
[
Mod_id
],
test_buffer
,
packet_size
,
0
);
MSG_PEEK
);
if
(
bytes_received
==-
1
)
{
eth
->
num_rx_errors
++
;
perror
(
"ETHERNET READ: "
);
...
...
@@ -328,28 +327,21 @@ int trx_eth_read_raw_IF4(openair0_device *device, openair0_timestamp *timestamp,
*
timestamp
=
test_header
->
sub_type
;
if
(
test_header
->
sub_type
==
IF4_PDLFFT
)
{
buff
[
0
]
=
(
void
*
)
malloc
(
RAW_IF4_PDLFFT_SIZE_BYTES
(
nblocks
)
-
MAC_HEADER_SIZE_BYTES
);
packet_size
=
RAW_IF4_PDLFFT_SIZE_BYTES
(
nblocks
)
-
packet_size
;
packet_size
=
RAW_IF4_PDLFFT_SIZE_BYTES
(
nblocks
);
}
else
if
(
test_header
->
sub_type
==
IF4_PULFFT
)
{
buff
[
0
]
=
(
void
*
)
malloc
(
RAW_IF4_PULFFT_SIZE_BYTES
(
nblocks
)
-
MAC_HEADER_SIZE_BYTES
);
packet_size
=
RAW_IF4_PULFFT_SIZE_BYTES
(
nblocks
)
-
packet_size
;
packet_size
=
RAW_IF4_PULFFT_SIZE_BYTES
(
nblocks
);
}
else
{
buff
[
0
]
=
(
void
*
)
malloc
(
RAW_IF4_PRACH_SIZE_BYTES
-
MAC_HEADER_SIZE_BYTES
);
packet_size
=
RAW_IF4_PRACH_SIZE_BYTES
-
packet_size
;
printf
(
" Came for prach
\n
"
);
packet_size
=
RAW_IF4_PRACH_SIZE_BYTES
;
}
memcpy
(
buff
[
0
],
test_header
,
sizeof_IF4_header_t
);
rx_buffer
=
(
void
*
)(
buff
[
0
]
+
sizeof_IF4_header_t
);
buff
[
0
]
=
(
void
*
)
malloc
(
packet_size
);
bytes_received
=
0
;
while
(
bytes_received
<
packet_size
)
{
bytes_received
+
=
recv
(
eth
->
sockfd
[
Mod_id
],
rx_
buff
er
,
packet_size
-
bytes_received
,
bytes_received
=
recv
(
eth
->
sockfd
[
Mod_id
],
buff
[
0
]
,
packet_size
,
0
);
if
(
bytes_received
==-
1
)
{
eth
->
num_rx_errors
++
;
...
...
@@ -362,9 +354,8 @@ int trx_eth_read_raw_IF4(openair0_device *device, openair0_timestamp *timestamp,
}
eth
->
rx_nsamps
=
nsamps
;
free
(
test_buffer
);
return
(
bytes_received
-
MAC_HEADER_SIZE_BYTES
)
>>
1
;
return
(
bytes_received
)
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment