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
wangjie
OpenXG-RAN
Commits
18fb589b
Commit
18fb589b
authored
Oct 07, 2019
by
laurent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes: improves throughput
parent
3321a351
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
263 additions
and
26 deletions
+263
-26
executables/main-fs6.c
executables/main-fs6.c
+175
-12
executables/split_headers.h
executables/split_headers.h
+43
-1
openair1/PHY/CODING/lte_segmentation.c
openair1/PHY/CODING/lte_segmentation.c
+1
-1
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+3
-2
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
+1
-1
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
+6
-1
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
+4
-2
targets/ARCH/rfsimulator/stored_node.c
targets/ARCH/rfsimulator/stored_node.c
+30
-6
No files found.
executables/main-fs6.c
View file @
18fb589b
This diff is collapsed.
Click to expand it.
executables/split_headers.h
View file @
18fb589b
...
@@ -76,6 +76,39 @@ typedef struct {
...
@@ -76,6 +76,39 @@ typedef struct {
uint16_t
UE_id
;
uint16_t
UE_id
;
int8_t
harq_pid
;
int8_t
harq_pid
;
UE_type_t
ue_type
;
UE_type_t
ue_type
;
uint8_t
dci_alloc
;
uint8_t
rar_alloc
;
SCH_status_t
status
;
uint8_t
Msg3_flag
;
uint8_t
subframe
;
uint32_t
frame
;
uint8_t
handled
;
uint8_t
phich_active
;
uint8_t
phich_ACK
;
uint16_t
previous_first_rb
;
uint32_t
B
;
uint32_t
G
;
UCI_format_t
uci_format
;
uint8_t
Or2
;
uint8_t
o_RI
[
2
];
uint8_t
o_ACK
[
4
];
uint8_t
O_ACK
;
uint8_t
o_RCC
;
int16_t
q_ACK
[
MAX_ACK_PAYLOAD
];
int16_t
q_RI
[
MAX_RI_PAYLOAD
];
uint32_t
RTC
[
MAX_NUM_ULSCH_SEGMENTS
];
uint8_t
ndi
;
uint8_t
round
;
uint8_t
rvidx
;
uint8_t
Nl
;
uint8_t
n_DMRS
;
uint8_t
previous_n_DMRS
;
uint8_t
n_DMRS2
;
int32_t
delta_TF
;
uint32_t
repetition_number
;
uint32_t
total_number_of_repetitions
;
uint16_t
harq_mask
;
uint16_t
harq_mask
;
uint16_t
nb_rb
;
uint16_t
nb_rb
;
uint8_t
Qm
;
uint8_t
Qm
;
...
@@ -130,6 +163,10 @@ typedef struct {
...
@@ -130,6 +163,10 @@ typedef struct {
int16_t
nb_active_ue
;
int16_t
nb_active_ue
;
}
fs6_dl_uespec_ulcch_t
;
}
fs6_dl_uespec_ulcch_t
;
typedef
struct
{
int
ta
;
}
ul_propagation_t
;
typedef
struct
{
typedef
struct
{
enum
pckType
type
:
8
;
enum
pckType
type
:
8
;
short
UE_id
;
short
UE_id
;
...
@@ -137,6 +174,9 @@ typedef struct {
...
@@ -137,6 +174,9 @@ typedef struct {
uint8_t
segment
;
uint8_t
segment
;
int
segLen
;
int
segLen
;
int
ulsch_power
[
2
];
int
ulsch_power
[
2
];
int
ta
;
uint8_t
o
[
MAX_CQI_BYTES
];
uint8_t
cqi_crc_status
;
}
fs6_ul_uespec_t
;
}
fs6_ul_uespec_t
;
typedef
struct
{
typedef
struct
{
...
@@ -144,6 +184,7 @@ typedef struct {
...
@@ -144,6 +184,7 @@ typedef struct {
int
UEid
;
int
UEid
;
int
frame
;
int
frame
;
int
subframe
;
int
subframe
;
LTE_eNB_UCI
uci
;
uint8_t
harq_ack
[
4
];
uint8_t
harq_ack
[
4
];
uint8_t
tdd_mapping_mode
;
uint8_t
tdd_mapping_mode
;
uint16_t
tdd_multiplexing_mask
;
uint16_t
tdd_multiplexing_mask
;
...
@@ -185,7 +226,8 @@ static inline void *commonUDPdata(uint8_t *ptr) {
...
@@ -185,7 +226,8 @@ static inline void *commonUDPdata(uint8_t *ptr) {
}
}
void
setAllfromTS
(
uint64_t
TS
);
void
setAllfromTS
(
uint64_t
TS
);
void
sendFs6Ulharq
(
enum
pckType
type
,
int
UEid
,
PHY_VARS_eNB
*
eNB
,
int
frame
,
int
subframe
,
uint8_t
*
harq_ack
,
uint8_t
tdd_mapping_mode
,
uint16_t
tdd_multiplexing_mask
,
uint16_t
rnti
,
int32_t
stat
);
void
sendFs6Ulharq
(
enum
pckType
type
,
int
UEid
,
PHY_VARS_eNB
*
eNB
,
LTE_eNB_UCI
*
uci
,
int
frame
,
int
subframe
,
uint8_t
*
harq_ack
,
uint8_t
tdd_mapping_mode
,
uint16_t
tdd_multiplexing_mask
,
uint16_t
rnti
,
int32_t
stat
);
void
sendFs6Ul
(
PHY_VARS_eNB
*
eNB
,
int
UE_id
,
int
harq_pid
,
int
segmentID
,
int16_t
*
data
,
int
dataLen
);
void
sendFs6Ul
(
PHY_VARS_eNB
*
eNB
,
int
UE_id
,
int
harq_pid
,
int
segmentID
,
int16_t
*
data
,
int
dataLen
);
void
*
cu_fs6
(
void
*
arg
);
void
*
cu_fs6
(
void
*
arg
);
void
*
du_fs6
(
void
*
arg
);
void
*
du_fs6
(
void
*
arg
);
...
...
openair1/PHY/CODING/lte_segmentation.c
View file @
18fb589b
...
@@ -105,7 +105,7 @@ int lte_segmentation(unsigned char *input_buffer,
...
@@ -105,7 +105,7 @@ int lte_segmentation(unsigned char *input_buffer,
#endif
#endif
*
Kminus
=
(
*
Kplus
-
64
);
*
Kminus
=
(
*
Kplus
-
64
);
}
else
{
}
else
{
printf
(
"lte_segmentation.c: Illegal codeword size !!!
\n
"
);
LOG_E
(
PHY
,
"lte_segmentation.c: Illegal codeword size !!!
\n
"
);
return
(
-
1
);
return
(
-
1
);
}
}
...
...
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
18fb589b
...
@@ -593,7 +593,7 @@ void srs_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
...
@@ -593,7 +593,7 @@ void srs_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
void
fill_sr_indication
(
int
UEid
,
PHY_VARS_eNB
*
eNB
,
uint16_t
rnti
,
int
frame
,
int
subframe
,
uint32_t
stat
)
{
void
fill_sr_indication
(
int
UEid
,
PHY_VARS_eNB
*
eNB
,
uint16_t
rnti
,
int
frame
,
int
subframe
,
uint32_t
stat
)
{
#ifdef FS6
#ifdef FS6
if
(
getenv
(
"fs6"
)
!=
NULL
&&
strncasecmp
(
getenv
(
"fs6"
),
"du"
,
2
)
==
0
)
{
if
(
getenv
(
"fs6"
)
!=
NULL
&&
strncasecmp
(
getenv
(
"fs6"
),
"du"
,
2
)
==
0
)
{
sendFs6Ulharq
(
fs6ULindicationSr
,
UEid
,
eNB
,
frame
,
subframe
,
NULL
,
0
,
0
,
rnti
,
stat
);
sendFs6Ulharq
(
fs6ULindicationSr
,
UEid
,
eNB
,
NULL
,
frame
,
subframe
,
NULL
,
0
,
0
,
rnti
,
stat
);
return
;
return
;
}
}
#endif
#endif
...
@@ -609,6 +609,7 @@ void fill_sr_indication(int UEid, PHY_VARS_eNB *eNB,uint16_t rnti,int frame,int
...
@@ -609,6 +609,7 @@ void fill_sr_indication(int UEid, PHY_VARS_eNB *eNB,uint16_t rnti,int frame,int
pdu
->
rx_ue_information
.
tl
.
tag
=
NFAPI_RX_UE_INFORMATION_TAG
;
pdu
->
rx_ue_information
.
tl
.
tag
=
NFAPI_RX_UE_INFORMATION_TAG
;
pdu
->
rx_ue_information
.
rnti
=
rnti
;
pdu
->
rx_ue_information
.
rnti
=
rnti
;
int
SNRtimes10
=
dB_fixed_times10
(
stat
)
-
10
*
eNB
->
measurements
.
n0_subband_power_dB
[
0
][
0
];
int
SNRtimes10
=
dB_fixed_times10
(
stat
)
-
10
*
eNB
->
measurements
.
n0_subband_power_dB
[
0
][
0
];
LOG_D
(
PHY
,
"stat %d subbandpower %d, SNRtimes10 %d
\n
"
,
stat
,
eNB
->
measurements
.
n0_subband_power_dB
[
0
][
0
],
SNRtimes10
);
pdu
->
ul_cqi_information
.
tl
.
tag
=
NFAPI_UL_CQI_INFORMATION_TAG
;
pdu
->
ul_cqi_information
.
tl
.
tag
=
NFAPI_UL_CQI_INFORMATION_TAG
;
if
(
SNRtimes10
<
-
640
)
pdu
->
ul_cqi_information
.
ul_cqi
=
0
;
if
(
SNRtimes10
<
-
640
)
pdu
->
ul_cqi_information
.
ul_cqi
=
0
;
...
@@ -1769,7 +1770,7 @@ void fill_ulsch_harq_indication (PHY_VARS_eNB *eNB, LTE_UL_eNB_HARQ_t *ulsch_har
...
@@ -1769,7 +1770,7 @@ void fill_ulsch_harq_indication (PHY_VARS_eNB *eNB, LTE_UL_eNB_HARQ_t *ulsch_har
void
fill_uci_harq_indication
(
int
UEid
,
PHY_VARS_eNB
*
eNB
,
LTE_eNB_UCI
*
uci
,
int
frame
,
int
subframe
,
uint8_t
*
harq_ack
,
uint8_t
tdd_mapping_mode
,
uint16_t
tdd_multiplexing_mask
)
{
void
fill_uci_harq_indication
(
int
UEid
,
PHY_VARS_eNB
*
eNB
,
LTE_eNB_UCI
*
uci
,
int
frame
,
int
subframe
,
uint8_t
*
harq_ack
,
uint8_t
tdd_mapping_mode
,
uint16_t
tdd_multiplexing_mask
)
{
#ifdef FS6
#ifdef FS6
if
(
getenv
(
"fs6"
)
!=
NULL
&&
strncasecmp
(
getenv
(
"fs6"
),
"du"
,
2
)
==
0
)
{
if
(
getenv
(
"fs6"
)
!=
NULL
&&
strncasecmp
(
getenv
(
"fs6"
),
"du"
,
2
)
==
0
)
{
sendFs6Ulharq
(
fs6ULindicationHarq
,
UEid
,
eNB
,
frame
,
subframe
,
harq_ack
,
tdd_mapping_mode
,
tdd_multiplexing_mask
,
0
,
0
);
sendFs6Ulharq
(
fs6ULindicationHarq
,
UEid
,
eNB
,
uci
,
frame
,
subframe
,
harq_ack
,
tdd_mapping_mode
,
tdd_multiplexing_mask
,
0
,
0
);
return
;
return
;
}
}
#endif
#endif
...
...
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
View file @
18fb589b
...
@@ -1506,7 +1506,7 @@ schedule_ue_spec(module_id_t module_idP,
...
@@ -1506,7 +1506,7 @@ schedule_ue_spec(module_id_t module_idP,
tpc
=
1
;
//0
tpc
=
1
;
//0
}
}
LOG_D
(
MAC
,
"[eNB %d] DLSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, snr/target snr %d/%d
\n
"
,
LOG_D
(
MAC
,
"[eNB %d] DLSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, snr/target snr %d/%d
(normal case)
\n
"
,
module_idP
,
module_idP
,
frameP
,
frameP
,
subframeP
,
subframeP
,
...
...
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
View file @
18fb589b
...
@@ -4990,7 +4990,12 @@ cqi_indication(module_id_t mod_idP,
...
@@ -4990,7 +4990,12 @@ cqi_indication(module_id_t mod_idP,
UE_id
,
UE_id
,
ul_cqi_information
->
channel
,
ul_cqi_information
->
channel
,
ul_cqi_information
->
ul_cqi
);
ul_cqi_information
->
ul_cqi
);
/*
int sum=0;
for (int i=0; i <rel9->length; i++)
sum+=pdu[i];
LOG_D(MAC, "pdu for channel: %d, checksum: %d\n", ul_cqi_information->channel, sum);
*/
if
(
ul_cqi_information
->
channel
==
0
)
{
// PUCCH
if
(
ul_cqi_information
->
channel
==
0
)
{
// PUCCH
// extract pucch csi information before changing RI information
// extract pucch csi information before changing RI information
extract_pucch_csi
(
mod_idP
,
extract_pucch_csi
(
mod_idP
,
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
View file @
18fb589b
...
@@ -127,14 +127,16 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t *const ctxt_pP) {
...
@@ -127,14 +127,16 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t *const ctxt_pP) {
}
else
if
(
UE_NAS_USE_TUN
)
{
}
else
if
(
UE_NAS_USE_TUN
)
{
ret
=
write
(
nas_sock_fd
[
ctxt_pP
->
module_id
],
&
(
sdu_p
->
data
[
sizeof
(
pdcp_data_ind_header_t
)]),
sizeToWrite
);
ret
=
write
(
nas_sock_fd
[
ctxt_pP
->
module_id
],
&
(
sdu_p
->
data
[
sizeof
(
pdcp_data_ind_header_t
)]),
sizeToWrite
);
}
else
if
(
ENB_NAS_USE_TUN
)
{
}
else
if
(
ENB_NAS_USE_TUN
)
{
ret
=
write
(
nas_sock_fd
[
0
],
&
(
sdu_p
->
data
[
sizeof
(
pdcp_data_ind_header_t
)]),
sizeToWrite
);
if
((
ret
=
write
(
nas_sock_fd
[
0
],
&
(
sdu_p
->
data
[
sizeof
(
pdcp_data_ind_header_t
)]),
sizeToWrite
))
!=
sizeToWrite
)
{
printf
(
"ret: %d
\n
"
,
ret
);
}
}
else
if
(
PDCP_USE_NETLINK
)
{
}
else
if
(
PDCP_USE_NETLINK
)
{
memcpy
(
NLMSG_DATA
(
nas_nlh_tx
),
(
uint8_t
*
)
sdu_p
->
data
,
sizeToWrite
);
memcpy
(
NLMSG_DATA
(
nas_nlh_tx
),
(
uint8_t
*
)
sdu_p
->
data
,
sizeToWrite
);
nas_nlh_tx
->
nlmsg_len
=
sizeToWrite
;
nas_nlh_tx
->
nlmsg_len
=
sizeToWrite
;
ret
=
sendmsg
(
nas_sock_fd
[
0
],
&
nas_msg_tx
,
0
);
ret
=
sendmsg
(
nas_sock_fd
[
0
],
&
nas_msg_tx
,
0
);
}
// PDCP_USE_NETLINK
}
// PDCP_USE_NETLINK
AssertFatal
(
ret
>=
0
,
"[PDCP_FIFOS] pdcp_fifo_flush_sdus (errno: %d %s)
\n
"
,
errno
,
strerror
(
errno
));
if
(
ret
<
0
)
LOG_E
(
PDCP
,
"[PDCP_FIFOS] pdcp_fifo_flush_sdus (ret (instead of: %d) : %d, errno: %d %s)
\n
"
,
ret
,
sizeToWrite
,
errno
,
strerror
(
errno
));
list_remove_head
(
&
pdcp_sdu_list
);
list_remove_head
(
&
pdcp_sdu_list
);
free_mem_block
(
sdu_p
,
__func__
);
free_mem_block
(
sdu_p
,
__func__
);
pdcp_nb_sdu_sent
++
;
pdcp_nb_sdu_sent
++
;
...
...
targets/ARCH/rfsimulator/stored_node.c
View file @
18fb589b
...
@@ -7,6 +7,21 @@
...
@@ -7,6 +7,21 @@
volatile
int
oai_exit
=
0
;
volatile
int
oai_exit
=
0
;
int
fullread
(
int
fd
,
void
*
_buf
,
int
count
)
{
char
*
buf
=
_buf
;
int
ret
=
0
;
int
l
;
while
(
count
)
{
l
=
read
(
fd
,
buf
,
count
);
if
(
l
<=
0
)
return
-
1
;
count
-=
l
;
buf
+=
l
;
ret
+=
l
;
}
return
ret
;
}
void
fullwrite
(
int
fd
,
void
*
_buf
,
int
count
)
{
void
fullwrite
(
int
fd
,
void
*
_buf
,
int
count
)
{
char
*
buf
=
_buf
;
char
*
buf
=
_buf
;
int
l
;
int
l
;
...
@@ -63,10 +78,10 @@ sin_addr:
...
@@ -63,10 +78,10 @@ sin_addr:
bool
connected
=
false
;
bool
connected
=
false
;
while
(
!
connected
)
{
while
(
!
connected
)
{
LOG_I
(
HW
,
"rfsimulator: trying to connect to %s:%d
\n
"
,
IP
,
port
);
//
LOG_I(HW,"rfsimulator: trying to connect to %s:%d\n", IP, port);
if
(
connect
(
sock
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
))
==
0
)
{
if
(
connect
(
sock
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
))
==
0
)
{
LOG_I
(
HW
,
"rfsimulator: connection established
\n
"
);
//
LOG_I(HW,"rfsimulator: connection established\n");
connected
=
true
;
connected
=
true
;
}
}
...
@@ -108,12 +123,13 @@ int main(int argc, char *argv[]) {
...
@@ -108,12 +123,13 @@ int main(int argc, char *argv[]) {
if
(
strcmp
(
argv
[
2
],
"server"
)
==
0
)
{
if
(
strcmp
(
argv
[
2
],
"server"
)
==
0
)
{
serviceSock
=
server_start
(
atoi
(
argv
[
3
]));
serviceSock
=
server_start
(
atoi
(
argv
[
3
]));
}
else
{
}
else
{
client_start
(
argv
[
2
],
atoi
(
argv
[
3
]));
serviceSock
=
client_start
(
argv
[
2
],
atoi
(
argv
[
3
]));
}
}
samplesBlockHeader_t
header
;
samplesBlockHeader_t
header
;
int
bufSize
=
100000
;
int
bufSize
=
100000
;
void
*
buff
=
malloc
(
bufSize
);
void
*
buff
=
malloc
(
bufSize
);
uint64_t
readTS
=
0
;
while
(
1
)
{
while
(
1
)
{
//Rewind the file to loop on the samples
//Rewind the file to loop on the samples
...
@@ -125,6 +141,7 @@ int main(int argc, char *argv[]) {
...
@@ -125,6 +141,7 @@ int main(int argc, char *argv[]) {
AssertFatal
(
read
(
fd
,
&
header
,
sizeof
(
header
)),
""
);
AssertFatal
(
read
(
fd
,
&
header
,
sizeof
(
header
)),
""
);
fullwrite
(
serviceSock
,
&
header
,
sizeof
(
header
));
fullwrite
(
serviceSock
,
&
header
,
sizeof
(
header
));
int
dataSize
=
sizeof
(
int32_t
)
*
header
.
size
*
header
.
nbAnt
;
int
dataSize
=
sizeof
(
int32_t
)
*
header
.
size
*
header
.
nbAnt
;
uint64_t
wroteTS
=
header
.
timestamp
;
if
(
dataSize
>
bufSize
)
{
if
(
dataSize
>
bufSize
)
{
void
*
new_buff
=
realloc
(
buff
,
dataSize
);
void
*
new_buff
=
realloc
(
buff
,
dataSize
);
...
@@ -139,9 +156,16 @@ int main(int argc, char *argv[]) {
...
@@ -139,9 +156,16 @@ int main(int argc, char *argv[]) {
AssertFatal
(
read
(
fd
,
buff
,
dataSize
)
==
dataSize
,
""
);
AssertFatal
(
read
(
fd
,
buff
,
dataSize
)
==
dataSize
,
""
);
fullwrite
(
serviceSock
,
buff
,
dataSize
);
fullwrite
(
serviceSock
,
buff
,
dataSize
);
// Purge incoming samples
// Purge incoming samples
setblocking
(
serviceSock
,
notBlocking
);
setblocking
(
serviceSock
,
blocking
);
while
(
readTS
<
wroteTS
)
{
while
(
recv
(
serviceSock
,
buff
,
bufSize
,
MSG_DONTWAIT
)
>
0
)
{
if
(
fullread
(
serviceSock
,
&
header
,
sizeof
(
header
))
!=
sizeof
(
header
)
||
fullread
(
serviceSock
,
buff
,
sizeof
(
int32_t
)
*
header
.
size
*
header
.
nbAnt
)
!=
sizeof
(
int32_t
)
*
header
.
size
*
header
.
nbAnt
)
{
printf
(
"error: %s
\n
"
,
strerror
(
errno
));
exit
(
1
);
}
readTS
=
header
.
timestamp
;
}
}
}
}
...
...
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