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
lizhongxiao
OpenXG-RAN
Commits
8eb9d0b4
Commit
8eb9d0b4
authored
Oct 19, 2020
by
hardy
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/fixes-mac-sched-nfapi' into integration_2020_wk42
parents
4d14cc63
ff48c369
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
128 additions
and
202 deletions
+128
-202
nfapi/oai_integration/nfapi_vnf.c
nfapi/oai_integration/nfapi_vnf.c
+15
-1
nfapi/open-nFAPI/vnf/src/vnf_p7.c
nfapi/open-nFAPI/vnf/src/vnf_p7.c
+2
-2
openair2/LAYER2/MAC/main_ue.c
openair2/LAYER2/MAC/main_ue.c
+0
-11
openair2/LAYER2/MAC/pre_processor.c
openair2/LAYER2/MAC/pre_processor.c
+107
-151
openair2/LAYER2/MAC/slicing/slicing.c
openair2/LAYER2/MAC/slicing/slicing.c
+4
-0
openair2/PHY_INTERFACE/IF_Module.h
openair2/PHY_INTERFACE/IF_Module.h
+0
-11
openair2/PHY_INTERFACE/phy_stub_UE.c
openair2/PHY_INTERFACE/phy_stub_UE.c
+0
-24
openair2/PHY_INTERFACE/phy_stub_UE.h
openair2/PHY_INTERFACE/phy_stub_UE.h
+0
-2
No files found.
nfapi/oai_integration/nfapi_vnf.c
View file @
8eb9d0b4
...
...
@@ -348,7 +348,15 @@ int wake_eNB_rxtx(PHY_VARS_eNB *eNB, uint16_t sfn, uint16_t sf) {
old_sf
=
sf
;
old_sfn
=
sfn
;
if
(
old_sf
==
0
&&
old_sfn
%
100
==
0
)
LOG_W
(
PHY
,
"[eNB] sfn/sf:%d%d old_sfn/sf:%d%d proc[rx:%d%d]
\n
"
,
sfn
,
sf
,
old_sfn
,
old_sf
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
if
(
old_sf
==
0
&&
old_sfn
%
100
==
0
)
LOG_D
(
PHY
,
"[eNB] sfn/sf:%d%d old_sfn/sf:%d%d proc[rx:%d%d]
\n
"
,
sfn
,
sf
,
old_sfn
,
old_sf
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
}
++
L1_proc
->
instance_cnt
;
...
...
@@ -435,6 +443,7 @@ int phy_rach_indication(struct nfapi_vnf_p7_config *config, nfapi_rach_indicatio
}
if
(
index
==
-
1
){
LOG_E
(
MAC
,
"phy_rach_indication : num of rach reach max
\n
"
);
pthread_mutex_unlock
(
&
eNB
->
UL_INFO_mutex
);
return
0
;
}
UL_RCC_INFO
.
rach_ind
[
index
]
=
*
ind
;
...
...
@@ -499,6 +508,7 @@ int phy_harq_indication(struct nfapi_vnf_p7_config *config, nfapi_harq_indicatio
}
if
(
index
==
-
1
){
LOG_E
(
MAC
,
"phy_harq_indication : num of harq reach max
\n
"
);
pthread_mutex_unlock
(
&
eNB
->
UL_INFO_mutex
);
return
0
;
}
UL_RCC_INFO
.
harq_ind
[
index
]
=
*
ind
;
...
...
@@ -538,6 +548,7 @@ int phy_crc_indication(struct nfapi_vnf_p7_config *config, nfapi_crc_indication_
}
if
(
index
==
-
1
){
LOG_E
(
MAC
,
"phy_crc_indication : num of crc reach max
\n
"
);
pthread_mutex_unlock
(
&
eNB
->
UL_INFO_mutex
);
return
0
;
}
UL_RCC_INFO
.
crc_ind
[
index
]
=
*
ind
;
...
...
@@ -603,6 +614,7 @@ int phy_rx_indication(struct nfapi_vnf_p7_config *config, nfapi_rx_indication_t
}
if
(
index
==
-
1
){
LOG_E
(
MAC
,
"phy_rx_indication : num of rx reach max
\n
"
);
pthread_mutex_unlock
(
&
eNB
->
UL_INFO_mutex
);
return
0
;
}
UL_RCC_INFO
.
rx_ind
[
index
]
=
*
ind
;
...
...
@@ -686,6 +698,7 @@ int phy_sr_indication(struct nfapi_vnf_p7_config *config, nfapi_sr_indication_t
}
if
(
index
==
-
1
){
LOG_E
(
MAC
,
"phy_sr_indication : num of sr reach max
\n
"
);
pthread_mutex_unlock
(
&
eNB
->
UL_INFO_mutex
);
return
0
;
}
UL_RCC_INFO
.
sr_ind
[
index
]
=
*
ind
;
...
...
@@ -737,6 +750,7 @@ int phy_cqi_indication(struct nfapi_vnf_p7_config *config, nfapi_cqi_indication_
}
if
(
index
==
-
1
){
LOG_E
(
MAC
,
"phy_cqi_indication : num of cqi reach max
\n
"
);
pthread_mutex_unlock
(
&
eNB
->
UL_INFO_mutex
);
return
0
;
}
UL_RCC_INFO
.
cqi_ind
[
index
]
=
*
ind
;
...
...
nfapi/open-nFAPI/vnf/src/vnf_p7.c
View file @
8eb9d0b4
...
...
@@ -955,7 +955,7 @@ void vnf_handle_ul_node_sync(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_p7)
struct
timespec
ts
;
clock_gettime
(
CLOCK_MONOTONIC
,
&
ts
);
NFAPI_TRACE
(
NFAPI_TRACE_
NOTE
,
"(%4d/%1d) %d.%d PNF to VNF phy_id:%2d (t1/2/3/4:%8u, %8u, %8u, %8u) txrx:%4u procT:%3u latency(us):%4d(avg:%4d) offset(us):%8d filtered(us):%8d wrap[t1:%u t2:%u]
\n
"
,
NFAPI_TRACE
(
NFAPI_TRACE_
INFO
,
"(%4d/%1d) %d.%d PNF to VNF phy_id:%2d (t1/2/3/4:%8u, %8u, %8u, %8u) txrx:%4u procT:%3u latency(us):%4d(avg:%4d) offset(us):%8d filtered(us):%8d wrap[t1:%u t2:%u]
\n
"
,
NFAPI_SFNSF2SFN
(
phy
->
sfn_sf
),
NFAPI_SFNSF2SF
(
phy
->
sfn_sf
),
ts
.
tv_sec
,
ts
.
tv_nsec
,
ind
.
header
.
phy_id
,
ind
.
t1
,
ind
.
t2
,
ind
.
t3
,
t4
,
tx_2_rx
,
pnf_proc_time
,
latency
,
phy
->
average_latency
,
phy
->
sf_offset
,
phy
->
sf_offset_filtered
,
...
...
@@ -1016,7 +1016,7 @@ void vnf_handle_ul_node_sync(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_p7)
{
phy
->
adjustment
=
NFAPI_SFNSF2DEC
(
new_sfn_sf
)
-
NFAPI_SFNSF2DEC
(
curr_sfn_sf
);
NFAPI_TRACE
(
NFAPI_TRACE_
NOTE
,
"PNF to VNF phy_id:%d adjustment%d phy->previous_sf_offset_filtered:%d phy->previous_sf_offset_filtered:%d phy->sf_offset_trend:%d
\n
"
,
ind
.
header
.
phy_id
,
phy
->
adjustment
,
phy
->
previous_sf_offset_filtered
,
phy
->
previous_sf_offset_filtered
,
phy
->
sf_offset_trend
);
NFAPI_TRACE
(
NFAPI_TRACE_
INFO
,
"PNF to VNF phy_id:%d adjustment%d phy->previous_sf_offset_filtered:%d phy->previous_sf_offset_filtered:%d phy->sf_offset_trend:%d
\n
"
,
ind
.
header
.
phy_id
,
phy
->
adjustment
,
phy
->
previous_sf_offset_filtered
,
phy
->
previous_sf_offset_filtered
,
phy
->
sf_offset_trend
);
phy
->
previous_t1
=
0
;
phy
->
previous_t2
=
0
;
...
...
openair2/LAYER2/MAC/main_ue.c
View file @
8eb9d0b4
...
...
@@ -44,7 +44,6 @@
#include "common/ran_context.h"
extern
FILL_UL_INFO_MUTEX_t
fill_ul_mutex
;
extern
void
openair_rrc_top_init_ue
(
int
eMBMS_active
,
char
*
uecap_xer
,
uint8_t
cba_group_active
,
uint8_t
HO_active
);
void
dl_phy_sync_success
(
module_id_t
module_idP
,
frame_t
frameP
,
unsigned
char
eNB_index
,
uint8_t
first_sync
)
{
//init as MR
...
...
@@ -90,16 +89,6 @@ mac_top_init_ue(int eMBMS_active, char *uecap_xer,
UE_mac_inst
=
NULL
;
}
// mutex below are used for multiple UE's L2 FAPI simulation.
if
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
)
{
pthread_mutex_init
(
&
fill_ul_mutex
.
rx_mutex
,
NULL
);
pthread_mutex_init
(
&
fill_ul_mutex
.
crc_mutex
,
NULL
);
pthread_mutex_init
(
&
fill_ul_mutex
.
sr_mutex
,
NULL
);
pthread_mutex_init
(
&
fill_ul_mutex
.
harq_mutex
,
NULL
);
pthread_mutex_init
(
&
fill_ul_mutex
.
cqi_mutex
,
NULL
);
pthread_mutex_init
(
&
fill_ul_mutex
.
rach_mutex
,
NULL
);
}
LOG_I
(
MAC
,
"[MAIN] calling RRC
\n
"
);
openair_rrc_top_init_ue
(
eMBMS_active
,
uecap_xer
,
cba_group_active
,
HO_active
);
...
...
openair2/LAYER2/MAC/pre_processor.c
View file @
8eb9d0b4
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/slicing/slicing.c
View file @
8eb9d0b4
...
...
@@ -336,6 +336,8 @@ void static_dl(module_id_t mod_id,
rbgalloc_slice_mask
[
rbg
]
=
rbgalloc_mask
[
rbg
];
n_rbg_sched
+=
rbgalloc_mask
[
rbg
];
}
if
(
n_rbg_sched
==
0
)
/* no free RBGs, e.g., taken by RA */
continue
;
s
->
s
[
i
]
->
dl_algo
.
run
(
mod_id
,
CC_id
,
...
...
@@ -445,6 +447,8 @@ void static_ul(module_id_t mod_id,
}
if
(
!
last_rb_blocked
)
rbs
[
n_contig
-
1
].
length
=
p
->
posHigh
-
rbs
[
n_contig
-
1
].
start
+
1
;
if
(
n_contig
==
1
&&
rbs
[
0
].
length
==
0
)
/* no RBs, e.g., taken by RA */
continue
;
s
->
s
[
i
]
->
ul_algo
.
run
(
mod_id
,
CC_id
,
...
...
openair2/PHY_INTERFACE/IF_Module.h
View file @
8eb9d0b4
...
...
@@ -203,17 +203,6 @@ typedef struct IF_Module_s{
pthread_mutex_t
if_mutex
;
}
IF_Module_t
;
// These mutex is used for multiple UEs L2 FAPI simulator.
// Each UEs set these value in UL and UL_INFO is shared in all UE's thread.
typedef
struct
{
pthread_mutex_t
rx_mutex
;
pthread_mutex_t
crc_mutex
;
pthread_mutex_t
sr_mutex
;
pthread_mutex_t
harq_mutex
;
pthread_mutex_t
cqi_mutex
;
pthread_mutex_t
rach_mutex
;
}
FILL_UL_INFO_MUTEX_t
;
/*Initial */
IF_Module_t
*
IF_Module_init
(
int
Mod_id
);
void
IF_Module_kill
(
int
Mod_id
);
...
...
openair2/PHY_INTERFACE/phy_stub_UE.c
View file @
8eb9d0b4
...
...
@@ -64,8 +64,6 @@ void fill_rx_indication_UE_MAC(module_id_t Mod_id,
nfapi_rx_indication_pdu_t
*
pdu
;
int
timing_advance_update
;
pthread_mutex_lock
(
&
fill_ul_mutex
.
rx_mutex
);
UL_INFO
->
rx_ind
.
sfn_sf
=
frame
<<
4
|
subframe
;
UL_INFO
->
rx_ind
.
rx_indication_body
.
tl
.
tag
=
NFAPI_RX_INDICATION_BODY_TAG
;
UL_INFO
->
rx_ind
.
vendor_extension
=
ul_config_req
->
vendor_extension
;
...
...
@@ -101,7 +99,6 @@ void fill_rx_indication_UE_MAC(module_id_t Mod_id,
UL_INFO
->
rx_ind
.
rx_indication_body
.
number_of_pdus
++
;
UL_INFO
->
rx_ind
.
sfn_sf
=
frame
<<
4
|
subframe
;
pthread_mutex_unlock
(
&
fill_ul_mutex
.
rx_mutex
);
}
void
fill_sr_indication_UE_MAC
(
int
Mod_id
,
...
...
@@ -109,8 +106,6 @@ void fill_sr_indication_UE_MAC(int Mod_id,
int
subframe
,
UL_IND_t
*
UL_INFO
,
uint16_t
rnti
)
{
pthread_mutex_lock
(
&
fill_ul_mutex
.
sr_mutex
);
nfapi_sr_indication_t
*
sr_ind
=
&
UL_INFO
->
sr_ind
;
nfapi_sr_indication_body_t
*
sr_ind_body
=
&
sr_ind
->
sr_indication_body
;
nfapi_sr_indication_pdu_t
*
pdu
=
&
sr_ind_body
->
sr_pdu_list
[
sr_ind_body
->
number_of_srs
];
...
...
@@ -139,7 +134,6 @@ void fill_sr_indication_UE_MAC(int Mod_id,
// UL_INFO->rx_ind.rx_indication_body.number_of_pdus++;
sr_ind_body
->
number_of_srs
++
;
pthread_mutex_unlock
(
&
fill_ul_mutex
.
sr_mutex
);
}
void
fill_crc_indication_UE_MAC
(
int
Mod_id
,
...
...
@@ -149,8 +143,6 @@ void fill_crc_indication_UE_MAC(int Mod_id,
uint8_t
crc_flag
,
int
index
,
uint16_t
rnti
)
{
pthread_mutex_lock
(
&
fill_ul_mutex
.
crc_mutex
);
nfapi_crc_indication_pdu_t
*
pdu
=
&
UL_INFO
->
crc_ind
.
crc_indication_body
.
crc_pdu_list
[
UL_INFO
->
crc_ind
.
crc_indication_body
.
number_of_crcs
];
...
...
@@ -174,8 +166,6 @@ void fill_crc_indication_UE_MAC(int Mod_id,
__FUNCTION__
,
pdu
->
rx_ue_information
.
rnti
,
UL_INFO
->
crc_ind
.
crc_indication_body
.
number_of_crcs
);
pthread_mutex_unlock
(
&
fill_ul_mutex
.
crc_mutex
);
}
void
fill_rach_indication_UE_MAC
(
int
Mod_id
,
...
...
@@ -184,10 +174,6 @@ void fill_rach_indication_UE_MAC(int Mod_id,
UL_IND_t
*
UL_INFO
,
uint8_t
ra_PreambleIndex
,
uint16_t
ra_RNTI
)
{
LOG_D
(
MAC
,
"fill_rach_indication_UE_MAC 1
\n
"
);
pthread_mutex_lock
(
&
fill_ul_mutex
.
rach_mutex
);
UL_INFO
->
rach_ind
.
rach_indication_body
.
number_of_preambles
=
1
;
UL_INFO
->
rach_ind
.
header
.
message_id
=
NFAPI_RACH_INDICATION
;
...
...
@@ -232,8 +218,6 @@ void fill_rach_indication_UE_MAC(int Mod_id,
// should call it when we merge with that branch.
oai_nfapi_rach_ind
(
&
UL_INFO
->
rach_ind
);
free
(
UL_INFO
->
rach_ind
.
rach_indication_body
.
preamble_list
);
pthread_mutex_unlock
(
&
fill_ul_mutex
.
rach_mutex
);
}
void
fill_ulsch_cqi_indication_UE_MAC
(
int
Mod_id
,
...
...
@@ -241,7 +225,6 @@ void fill_ulsch_cqi_indication_UE_MAC(int Mod_id,
uint8_t
subframe
,
UL_IND_t
*
UL_INFO
,
uint16_t
rnti
)
{
pthread_mutex_lock
(
&
fill_ul_mutex
.
cqi_mutex
);
nfapi_cqi_indication_pdu_t
*
pdu
=
&
UL_INFO
->
cqi_ind
.
cqi_indication_body
.
cqi_pdu_list
[
UL_INFO
->
cqi_ind
.
cqi_indication_body
.
number_of_cqis
];
...
...
@@ -275,7 +258,6 @@ void fill_ulsch_cqi_indication_UE_MAC(int Mod_id,
raw_pdu
->
pdu
[
0
]
=
cqi
<<
4
;
UL_INFO
->
cqi_ind
.
cqi_indication_body
.
number_of_cqis
++
;
pthread_mutex_unlock
(
&
fill_ul_mutex
.
cqi_mutex
);
}
void
fill_ulsch_harq_indication_UE_MAC
(
...
...
@@ -285,8 +267,6 @@ void fill_ulsch_harq_indication_UE_MAC(
UL_IND_t
*
UL_INFO
,
nfapi_ul_config_ulsch_harq_information
*
harq_information
,
uint16_t
rnti
)
{
pthread_mutex_lock
(
&
fill_ul_mutex
.
harq_mutex
);
nfapi_harq_indication_pdu_t
*
pdu
=
&
UL_INFO
->
harq_ind
.
harq_indication_body
.
harq_pdu_list
[
UL_INFO
->
harq_ind
.
harq_indication_body
.
number_of_harqs
];
...
...
@@ -318,7 +298,6 @@ void fill_ulsch_harq_indication_UE_MAC(
}
UL_INFO
->
harq_ind
.
harq_indication_body
.
number_of_harqs
++
;
pthread_mutex_unlock
(
&
fill_ul_mutex
.
harq_mutex
);
}
void
fill_uci_harq_indication_UE_MAC
(
int
Mod_id
,
...
...
@@ -327,8 +306,6 @@ void fill_uci_harq_indication_UE_MAC(int Mod_id,
UL_IND_t
*
UL_INFO
,
nfapi_ul_config_harq_information
*
harq_information
,
uint16_t
rnti
)
{
pthread_mutex_lock
(
&
fill_ul_mutex
.
harq_mutex
);
nfapi_harq_indication_t
*
ind
=
&
UL_INFO
->
harq_ind
;
nfapi_harq_indication_body_t
*
body
=
&
ind
->
harq_indication_body
;
nfapi_harq_indication_pdu_t
*
pdu
=
...
...
@@ -410,7 +387,6 @@ void fill_uci_harq_indication_UE_MAC(int Mod_id,
LOG_D
(
PHY
,
"Incremented eNB->UL_INFO.harq_ind.number_of_harqs:%d
\n
"
,
UL_INFO
->
harq_ind
.
harq_indication_body
.
number_of_harqs
);
pthread_mutex_unlock
(
&
fill_ul_mutex
.
harq_mutex
);
}
void
handle_nfapi_ul_pdu_UE_MAC
(
module_id_t
Mod_id
,
...
...
openair2/PHY_INTERFACE/phy_stub_UE.h
View file @
8eb9d0b4
...
...
@@ -17,8 +17,6 @@
//#include "openair1/PHY/defs.h"
//#include "openair1/PHY/LTE_TRANSPORT/defs.h"
// this mutex is used to set multiple UE's UL value in L2 FAPI simulator.
FILL_UL_INFO_MUTEX_t
fill_ul_mutex
;
//below 2 difinitions move to phy_stub_UE.c to add initialization when difinition.
extern
UL_IND_t
*
UL_INFO
;
extern
nfapi_tx_request_pdu_t
*
tx_request_pdu_list
;
...
...
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