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
ZhouShuya
OpenXG-RAN
Commits
8de28502
Commit
8de28502
authored
Aug 04, 2017
by
shahab SHARIATBAGHERI
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-68-uplink' into feature-68-enb-agent
parents
e2ac251c
9e7e57de
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
2014 additions
and
361 deletions
+2014
-361
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+4
-0
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
+76
-3
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.h
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.h
+4
-0
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_defs.h
...air2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_defs.h
+4
-0
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c
.../ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c
+109
-1
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.h
.../ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.h
+4
-0
openair2/ENB_APP/MESSAGES/V2/controller_commands.proto
openair2/ENB_APP/MESSAGES/V2/controller_commands.proto
+8
-2
openair2/ENB_APP/MESSAGES/V2/flexran.proto
openair2/ENB_APP/MESSAGES/V2/flexran.proto
+11
-1
openair2/ENB_APP/MESSAGES/V2/header.proto
openair2/ENB_APP/MESSAGES/V2/header.proto
+2
-2
openair2/ENB_APP/MESSAGES/V2/mac_primitives.proto
openair2/ENB_APP/MESSAGES/V2/mac_primitives.proto
+39
-1
openair2/ENB_APP/flexran_agent_ran_api.c
openair2/ENB_APP/flexran_agent_ran_api.c
+31
-4
openair2/ENB_APP/flexran_agent_ran_api.h
openair2/ENB_APP/flexran_agent_ran_api.h
+1
-1
openair2/LAYER2/MAC/eNB_scheduler.c
openair2/LAYER2/MAC/eNB_scheduler.c
+263
-25
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
+1
-1
openair2/LAYER2/MAC/flexran_agent_mac_proto.h
openair2/LAYER2/MAC/flexran_agent_mac_proto.h
+45
-5
openair2/LAYER2/MAC/flexran_agent_scheduler_dataplane.c
openair2/LAYER2/MAC/flexran_agent_scheduler_dataplane.c
+6
-6
openair2/LAYER2/MAC/flexran_agent_scheduler_dlsch_ue.c
openair2/LAYER2/MAC/flexran_agent_scheduler_dlsch_ue.c
+331
-309
openair2/LAYER2/MAC/flexran_agent_scheduler_ulsch_ue.c
openair2/LAYER2/MAC/flexran_agent_scheduler_ulsch_ue.c
+1075
-0
No files found.
cmake_targets/CMakeLists.txt
View file @
8de28502
...
...
@@ -1148,6 +1148,7 @@ if (FLEXRAN_AGENT_SB_IF)
set
(
MAC_SRC
${
MAC_SRC
}
${
MAC_DIR
}
/flexran_agent_scheduler_dlsch_ue.c
${
MAC_DIR
}
/flexran_agent_scheduler_ulsch_ue.c
${
MAC_DIR
}
/flexran_agent_scheduler_dataplane.c
${
MAC_DIR
}
/flexran_agent_scheduler_dlsch_ue_remote.c
)
...
...
@@ -1171,6 +1172,9 @@ if (FLEXRAN_AGENT_SB_IF)
add_library
(
default_sched SHARED
${
MAC_DIR
}
/flexran_agent_scheduler_dlsch_ue.c
)
add_library
(
remote_sched SHARED
${
MAC_DIR
}
/flexran_agent_scheduler_dlsch_ue_remote.c
)
add_library
(
default_ul_sched SHARED
${
MAC_DIR
}
/flexran_agent_scheduler_ulsch_ue.c
)
endif
()
# L3 Libs
...
...
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
View file @
8de28502
...
...
@@ -1044,6 +1044,78 @@ int flexran_agent_mac_destroy_dl_config(Protocol__FlexranMessage *msg) {
return
-
1
;
}
int
flexran_agent_mac_create_empty_ul_config
(
mid_t
mod_id
,
Protocol__FlexranMessage
**
msg
)
{
int
xid
=
0
;
Protocol__FlexHeader
*
header
;
if
(
flexran_create_header
(
xid
,
PROTOCOL__FLEX_TYPE__FLPT_UL_MAC_CONFIG
,
&
header
)
!=
0
)
goto
error
;
Protocol__FlexUlMacConfig
*
ul_mac_config_msg
;
ul_mac_config_msg
=
malloc
(
sizeof
(
Protocol__FlexUlMacConfig
));
if
(
ul_mac_config_msg
==
NULL
)
{
goto
error
;
}
protocol__flex_ul_mac_config__init
(
ul_mac_config_msg
);
ul_mac_config_msg
->
header
=
header
;
ul_mac_config_msg
->
has_sfn_sf
=
1
;
ul_mac_config_msg
->
sfn_sf
=
flexran_get_sfn_sf
(
mod_id
);
*
msg
=
malloc
(
sizeof
(
Protocol__FlexranMessage
));
if
(
*
msg
==
NULL
)
goto
error
;
protocol__flexran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__FLEXRAN_MESSAGE__MSG_UL_MAC_CONFIG_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__FLEXRAN_DIRECTION__INITIATING_MESSAGE
;
(
*
msg
)
->
ul_mac_config_msg
=
ul_mac_config_msg
;
return
0
;
error:
return
-
1
;
}
int
flexran_agent_mac_destroy_ul_config
(
Protocol__FlexranMessage
*
msg
)
{
int
i
,
j
,
k
;
if
(
msg
->
msg_case
!=
PROTOCOL__FLEXRAN_MESSAGE__MSG_UL_MAC_CONFIG_MSG
)
goto
error
;
Protocol__FlexUlDci
*
ul_dci
;
free
(
msg
->
ul_mac_config_msg
->
header
);
for
(
i
=
0
;
i
<
msg
->
ul_mac_config_msg
->
n_ul_ue_data
;
i
++
)
{
// TODO uplink rlc ...
// free(msg->ul_mac_config_msg->dl_ue_data[i]->ce_bitmap);
// for (j = 0; j < msg->ul_mac_config_msg->ul_ue_data[i]->n_rlc_pdu; j++) {
// for (k = 0; k < msg->ul_mac_config_msg->ul_ue_data[i]->rlc_pdu[j]->n_rlc_pdu_tb; k++) {
// free(msg->ul_mac_config_msg->dl_ue_data[i]->rlc_pdu[j]->rlc_pdu_tb[k]);
// }
// free(msg->ul_mac_config_msg->ul_ue_data[i]->rlc_pdu[j]->rlc_pdu_tb);
// free(msg->ul_mac_config_msg->ul_ue_data[i]->rlc_pdu[j]);
// }
// free(msg->ul_mac_config_msg->ul_ue_data[i]->rlc_pdu);
ul_dci
=
msg
->
ul_mac_config_msg
->
ul_ue_data
[
i
]
->
ul_dci
;
// free(dl_dci->tbs_size);
// free(ul_dci->mcs);
// free(ul_dci->ndi);
// free(ul_dci->rv);
// free(ul_dci);
free
(
msg
->
ul_mac_config_msg
->
ul_ue_data
[
i
]);
}
free
(
msg
->
ul_mac_config_msg
->
ul_ue_data
);
free
(
msg
->
ul_mac_config_msg
);
free
(
msg
);
return
0
;
error:
return
-
1
;
}
void
flexran_agent_get_pending_dl_mac_config
(
mid_t
mod_id
,
Protocol__FlexranMessage
**
msg
)
{
struct
lfds700_misc_prng_state
ls
;
...
...
@@ -1176,12 +1248,13 @@ int flexran_agent_register_mac_xface(mid_t mod_id, AGENT_MAC_xface *xface) {
xface
->
flexran_agent_send_sr_info
=
flexran_agent_send_sr_info
;
xface
->
flexran_agent_send_sf_trigger
=
flexran_agent_send_sf_trigger
;
//xface->flexran_agent_send_update_mac_stats = flexran_agent_send_update_mac_stats;
xface
->
flexran_agent_schedule_ue_spec
=
flexran_schedule_ue_spec_default
;
xface
->
flexran_agent_schedule_ue_spec
=
flexran_schedule_ue_dl_spec_default
;
xface
->
flexran_agent_schedule_ul_spec
=
flexran_schedule_ue_ul_spec_default
;
//xface->flexran_agent_schedule_ue_spec = flexran_schedule_ue_spec_remote;
xface
->
flexran_agent_get_pending_dl_mac_config
=
flexran_agent_get_pending_dl_mac_config
;
xface
->
dl_scheduler_loaded_lib
=
NULL
;
xface
->
ul_scheduler_loaded_lib
=
NULL
;
mac_agent_registered
[
mod_id
]
=
1
;
agent_mac_xface
[
mod_id
]
=
xface
;
...
...
@@ -1199,7 +1272,7 @@ int flexran_agent_unregister_mac_xface(mid_t mod_id, AGENT_MAC_xface *xface) {
xface
->
dl_scheduler_loaded_lib
=
NULL
;
xface
->
ul_scheduler_loaded_lib
=
NULL
;
mac_agent_registered
[
mod_id
]
=
0
;
agent_mac_xface
[
mod_id
]
=
NULL
;
...
...
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.h
View file @
8de28502
...
...
@@ -57,6 +57,10 @@ int flexran_agent_mac_destroy_stats_reply(Protocol__FlexranMessage *msg);
int
flexran_agent_mac_create_empty_dl_config
(
mid_t
mod_id
,
Protocol__FlexranMessage
**
msg
);
int
flexran_agent_mac_destroy_dl_config
(
Protocol__FlexranMessage
*
msg
);
/* UL MAC scheduling decision protocol message constructor (empty command) and destructor */
int
flexran_agent_mac_create_empty_ul_config
(
mid_t
mod_id
,
Protocol__FlexranMessage
**
msg
);
int
flexran_agent_mac_destroy_ul_config
(
Protocol__FlexranMessage
*
msg
);
int
flexran_agent_mac_handle_dl_mac_config
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__FlexranMessage
**
msg
);
...
...
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_defs.h
View file @
8de28502
...
...
@@ -61,6 +61,9 @@ typedef struct {
int
*
mbsfn_flag
,
Protocol__FlexranMessage
**
dl_info
);
void
(
*
flexran_agent_schedule_ul_spec
)(
mid_t
module_idP
,
uint32_t
frameP
,
unsigned
char
cooperation_flag
,
uint32_t
subframeP
,
unsigned
char
sched_subframe
,
Protocol__FlexranMessage
**
ul_info
);
/// Notify the controller for a state change of a particular UE, by sending the proper
/// UE state change message (ACTIVATION, DEACTIVATION, HANDOVER)
// int (*flexran_agent_notify_ue_state_change)(mid_t mod_id, uint32_t rnti,
...
...
@@ -68,6 +71,7 @@ typedef struct {
void
*
dl_scheduler_loaded_lib
;
void
*
ul_scheduler_loaded_lib
;
/*TODO: Fill in with the rest of the MAC layer technology specific callbacks (UL/DL scheduling, RACH info etc)*/
}
AGENT_MAC_xface
;
...
...
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c
View file @
8de28502
...
...
@@ -607,7 +607,10 @@ int parse_mac_config(mid_t mod_id, yaml_parser_t *parser) {
}
else
if
(
strcmp
((
char
*
)
event
.
data
.
scalar
.
value
,
"ul_scheduler"
)
==
0
)
{
// Call the proper handler
LOG_D
(
ENB_APP
,
"This is for the ul_scheduler subsystem
\n
"
);
goto
error
;
if
(
parse_ul_scheduler_config
(
mod_id
,
parser
)
==
-
1
)
{
LOG_D
(
ENB_APP
,
"An error occured
\n
"
);
goto
error
;
}
// TODO
}
else
if
(
strcmp
((
char
*
)
event
.
data
.
scalar
.
value
,
"ra_scheduler"
)
==
0
)
{
// Call the proper handler
...
...
@@ -700,6 +703,56 @@ int parse_dl_scheduler_config(mid_t mod_id, yaml_parser_t *parser) {
return
-
1
;
}
int
parse_ul_scheduler_config
(
mid_t
mod_id
,
yaml_parser_t
*
parser
)
{
yaml_event_t
event
;
int
done
=
0
;
int
mapping_started
=
0
;
while
(
!
done
)
{
if
(
!
yaml_parser_parse
(
parser
,
&
event
))
goto
error
;
switch
(
event
.
type
)
{
// We are expecting a mapping (behavior and parameters)
case
YAML_MAPPING_START_EVENT
:
LOG_D
(
ENB_APP
,
"The mapping of the subsystem started
\n
"
);
mapping_started
=
1
;
break
;
case
YAML_MAPPING_END_EVENT
:
LOG_D
(
ENB_APP
,
"The mapping of the subsystem ended
\n
"
);
mapping_started
=
0
;
break
;
case
YAML_SCALAR_EVENT
:
if
(
!
mapping_started
)
{
goto
error
;
}
// Check what key needs to be set
if
(
strcmp
((
char
*
)
event
.
data
.
scalar
.
value
,
"parameters"
)
==
0
)
{
LOG_D
(
ENB_APP
,
"Now it is time to set the parameters for this subsystem
\n
"
);
if
(
parse_ul_scheduler_parameters
(
mod_id
,
parser
)
==
-
1
)
{
goto
error
;
}
}
break
;
default:
goto
error
;
}
done
=
(
event
.
type
==
YAML_MAPPING_END_EVENT
);
yaml_event_delete
(
&
event
);
}
return
0
;
error:
yaml_event_delete
(
&
event
);
return
-
1
;
}
int
parse_dl_scheduler_parameters
(
mid_t
mod_id
,
yaml_parser_t
*
parser
)
{
yaml_event_t
event
;
...
...
@@ -755,6 +808,61 @@ int parse_dl_scheduler_parameters(mid_t mod_id, yaml_parser_t *parser) {
return
-
1
;
}
int
parse_ul_scheduler_parameters
(
mid_t
mod_id
,
yaml_parser_t
*
parser
)
{
yaml_event_t
event
;
void
*
param
;
int
done
=
0
;
int
mapping_started
=
0
;
while
(
!
done
)
{
if
(
!
yaml_parser_parse
(
parser
,
&
event
))
goto
error
;
switch
(
event
.
type
)
{
// We are expecting a mapping of parameters
case
YAML_MAPPING_START_EVENT
:
LOG_D
(
ENB_APP
,
"The mapping of the parameters started
\n
"
);
mapping_started
=
1
;
break
;
case
YAML_MAPPING_END_EVENT
:
LOG_D
(
ENB_APP
,
"The mapping of the parameters ended
\n
"
);
mapping_started
=
0
;
break
;
case
YAML_SCALAR_EVENT
:
if
(
!
mapping_started
)
{
goto
error
;
}
// Check what key needs to be set
if
(
mac_agent_registered
[
mod_id
])
{
LOG_D
(
ENB_APP
,
"Setting parameter %s
\n
"
,
event
.
data
.
scalar
.
value
);
param
=
dlsym
(
agent_mac_xface
[
mod_id
]
->
ul_scheduler_loaded_lib
,
(
char
*
)
event
.
data
.
scalar
.
value
);
if
(
param
==
NULL
)
{
goto
error
;
}
apply_parameter_modification
(
param
,
parser
);
}
else
{
goto
error
;
}
break
;
default:
goto
error
;
}
done
=
(
event
.
type
==
YAML_MAPPING_END_EVENT
);
yaml_event_delete
(
&
event
);
}
return
0
;
error:
yaml_event_delete
(
&
event
);
return
-
1
;
}
int
load_dl_scheduler_function
(
mid_t
mod_id
,
const
char
*
function_name
)
{
void
*
lib
;
...
...
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.h
View file @
8de28502
...
...
@@ -101,6 +101,10 @@ int parse_dl_scheduler_config(mid_t mod_id, yaml_parser_t *parser);
int
parse_dl_scheduler_parameters
(
mid_t
mod_id
,
yaml_parser_t
*
parser
);
int
parse_ul_scheduler_config
(
mid_t
mod_id
,
yaml_parser_t
*
parser
);
int
parse_ul_scheduler_parameters
(
mid_t
mod_id
,
yaml_parser_t
*
parser
);
int
load_dl_scheduler_function
(
mid_t
mod_id
,
const
char
*
function_name
);
#endif
/*FLEXRAN_AGENT_MAC_INTERNAL_H_*/
openair2/ENB_APP/MESSAGES/V2/controller_commands.proto
View file @
8de28502
...
...
@@ -3,7 +3,7 @@ package protocol;
import
"mac_primitives.proto"
;
//
// Body of UE DL MAC scheduling configuration info
// Body of UE DL
/UL
MAC scheduling configuration info
//
message
flex_dl_data
{
...
...
@@ -15,6 +15,12 @@ message flex_dl_data {
optional
uint32
act_deact_ce
=
6
;
//Hex content of MAC CE for Activation/Deactivation in CA
}
message
flex_ul_data
{
optional
uint32
rnti
=
1
;
optional
flex_ul_dci
ul_dci
=
2
;
}
//
// Body of the RAR scheduler configuration
//
...
...
@@ -55,4 +61,4 @@ message flex_pdcch_ofdm_sym_count {
enum
flex_broadcast_type
{
FLBT_BCCH
=
0
;
FLBT_PCCH
=
1
;
}
\ No newline at end of file
}
openair2/ENB_APP/MESSAGES/V2/flexran.proto
View file @
8de28502
...
...
@@ -24,11 +24,12 @@ message flexran_message {
flex_ue_config_reply
ue_config_reply_msg
=
11
;
flex_lc_config_request
lc_config_request_msg
=
12
;
flex_lc_config_reply
lc_config_reply_msg
=
13
;
flex_dl_mac_config
dl_mac_config_msg
=
14
;
flex_dl_mac_config
dl_mac_config_msg
=
14
;
flex_ue_state_change
ue_state_change_msg
=
15
;
flex_control_delegation
control_delegation_msg
=
16
;
flex_agent_reconfiguration
agent_reconfiguration_msg
=
17
;
flex_rrc_triggering
rrc_triggering
=
18
;
flex_ul_mac_config
ul_mac_config_msg
=
19
;
}
}
...
...
@@ -164,6 +165,14 @@ message flex_dl_mac_config {
repeated
flex_pdcch_ofdm_sym_count
ofdm_sym
=
6
;
// OFDM symbol count for each CC
}
message
flex_ul_mac_config
{
optional
flex_header
header
=
1
;
optional
uint32
sfn_sf
=
2
;
repeated
flex_ul_data
ul_ue_data
=
3
;
}
message
flex_rrc_triggering
{
optional
flex_header
header
=
1
;
...
...
@@ -171,6 +180,7 @@ message flex_rrc_triggering {
}
//
// UE state change message
//
...
...
openair2/ENB_APP/MESSAGES/V2/header.proto
View file @
8de28502
...
...
@@ -32,7 +32,7 @@ enum flex_type {
//Controller command messages
FLPT_DL_MAC_CONFIG
=
13
;
// UE state change messages
FLPT_UE_STATE_CHANGE
=
14
;
...
...
@@ -40,6 +40,6 @@ enum flex_type {
FLPT_DELEGATE_CONTROL
=
15
;
FLPT_RECONFIGURE_AGENT
=
16
;
FLPT_RRC_TRIGGERING
=
17
;
FLPT_UL_MAC_CONFIG
=
18
;
}
openair2/ENB_APP/MESSAGES/V2/mac_primitives.proto
View file @
8de28502
...
...
@@ -33,6 +33,38 @@ message flex_dl_dci {
optional
uint32
pdcch_power_offset
=
25
;
// DL PDCCH power boosting in dB
optional
uint32
cif_present
=
26
;
// Boolean. Indication of CIF field
optional
uint32
cif
=
27
;
// CIF for cross-carrier scheduling
}
message
flex_ul_dci
{
optional
uint32
rnti
=
1
;
optional
uint32
rb_start
=
2
;
// The start RB allocated to the UE
optional
uint32
rb_len
=
3
;
// The number of RBs allocated to the UE
optional
uint32
mcs
=
4
;
// Modulation and coding scheme
optional
uint32
cyclic_shift2
=
5
;
// match DCI format 0/4 PDU
optional
uint32
freq_hop_flag
=
6
;
// 0 no hopping, 1 hoppping
optional
uint32
freq_hop_map
=
7
;
// Frequency hopping bits (0..4)
optional
uint32
ndi
=
8
;
// New data indicator
optional
uint32
rv
=
9
;
// Redundancy version
optional
uint32
harq_pid
=
10
;
// The harq process id
optional
uint32
ultx_mode
=
11
;
// A FLULM_* value
optional
uint32
tbs_size
=
12
;
// The size of each TBS
optional
uint32
n_srs
=
13
;
// Overlap indication with srs
optional
uint32
res_alloc
=
14
;
// Type of resource allocation
optional
uint32
size
=
15
;
// Size of the ULSCH PDU in bytes for UL Grant.
optional
uint32
dai
=
16
;
// TDD only
// optional uint32 tb_swap = 17; // Boolean. TB to codeword swap flag
// optional uint32 pdcch_order = 19;
// optional uint32 preamble_index = 20; // Only valid if pdcch_order = 1
// optional uint32 prach_mask_index = 21; // Only valid if pdcch_order = 1
// optional uint32 tbs_idx = 23; // The TBS index for Format 1A
}
//
...
...
@@ -73,4 +105,10 @@ enum flex_vrb_format {
enum
flex_ngap_val
{
FLNGV_1
=
0
;
FLNGV_2
=
1
;
}
\ No newline at end of file
}
enum
flex_mod_type
{
FLMOD_QPSK
=
2
;
FLMOD_16QAM
=
4
;
FLMOD_64QAM
=
6
;
}
openair2/ENB_APP/flexran_agent_ran_api.c
View file @
8de28502
...
...
@@ -299,8 +299,9 @@ int flexran_get_harq(const mid_t mod_id,
const
mid_t
ue_id
,
const
int
frame
,
const
uint8_t
subframe
,
uint8_t
*
id
,
uint8_t
*
round
)
{
//flag_id_status = 0 then id, else status
uint8_t
*
pid
,
uint8_t
*
round
,
const
uint8_t
harq_flag
)
{
//flag_id_status = 0 then id, else status
/*TODO: Add int TB in function parameters to get the status of the second TB. This can be done to by editing in
* get_ue_active_harq_pid function in line 272 file: phy_procedures_lte_eNB.c to add
* DLSCH_ptr = PHY_vars_eNB_g[Mod_id][CC_id]->dlsch_eNB[(uint32_t)UE_id][1];*/
...
...
@@ -310,10 +311,21 @@ int flexran_get_harq(const mid_t mod_id,
uint16_t
rnti
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
if
(
harq_flag
==
openair_harq_DL
){
mac_xface
->
get_ue_active_harq_pid
(
mod_id
,
CC_id
,
rnti
,
frame
,
subframe
,
&
harq_pid
,
&
harq_round
,
openair_harq_DL
);
mac_xface
->
get_ue_active_harq_pid
(
mod_id
,
CC_id
,
rnti
,
frame
,
subframe
,
&
harq_pid
,
&
harq_round
,
openair_harq_DL
);
*
id
=
harq_pid
;
}
else
if
(
harq_flag
==
openair_harq_UL
){
mac_xface
->
get_ue_active_harq_pid
(
mod_id
,
CC_id
,
rnti
,
frame
,
subframe
,
&
harq_pid
,
&
round
,
openair_harq_UL
);
}
else
{
LOG_W
(
FLEXRAN_AGENT
,
"harq_flag is not recongnized"
);
}
*
pid
=
harq_pid
;
*
round
=
harq_round
;
/* if (round > 0) { */
/* *status = 1; */
...
...
@@ -643,6 +655,21 @@ int flexran_get_meas_gap_config_offset(mid_t mod_id, mid_t ue_id) {
return
-
1
;
}
int
flexran_get_rrc_status
(
const
mid_t
mod_id
,
const
rnti_t
rntiP
){
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
ue_context_p
=
rrc_eNB_get_ue_context
(
&
eNB_rrc_inst
[
mod_id
],
rntiP
);
if
(
ue_context_p
!=
NULL
)
{
return
(
ue_context_p
->
ue_context
.
Status
);
}
else
{
return
RRC_INACTIVE
;
}
}
int
flexran_get_ue_aggregated_max_bitrate_dl
(
mid_t
mod_id
,
mid_t
ue_id
)
{
return
((
UE_list_t
*
)
enb_ue
[
mod_id
])
->
UE_sched_ctrl
[
ue_id
].
ue_AggregatedMaximumBitrateDL
;
}
...
...
openair2/ENB_APP/flexran_agent_ran_api.h
View file @
8de28502
...
...
@@ -187,7 +187,7 @@ int flexran_get_ue_pmi(mid_t mod_id);
a designated frame and subframe. Returns 0 for success. The id and the
status of the HARQ process are stored in id and status respectively */
int
flexran_get_harq
(
const
mid_t
mod_id
,
const
uint8_t
CC_id
,
const
mid_t
ue_id
,
const
int
frame
,
const
uint8_t
subframe
,
unsigned
char
*
id
,
unsigned
char
*
round
);
const
int
frame
,
const
uint8_t
subframe
,
unsigned
char
*
id
,
unsigned
char
*
round
,
const
uint8_t
harq_flag
);
/* Uplink power control management*/
int
flexran_get_p0_pucch_dbm
(
mid_t
mod_id
,
mid_t
ue_id
,
int
CC_id
);
...
...
openair2/LAYER2/MAC/eNB_scheduler.c
View file @
8de28502
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
View file @
8de28502
...
...
@@ -885,7 +885,7 @@ abort();
rb_table_index
=
UE_template
->
pre_allocated_rb_table_index_ul
;
}
else
{
mcs
=
10
;
//cmin (10, openair_daq_vars.target_ue_ul_mcs);
rb_table_index
=
5
;
// for PHR
rb_table_index
=
13
;
// for PHR
}
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
ulsch_mcs2
=
mcs
;
...
...
openair2/LAYER2/MAC/flexran_agent_mac_proto.h
View file @
8de28502
...
...
@@ -39,19 +39,25 @@
/*
* slice specific scheduler
*/
typedef
void
(
*
slice_scheduler
)(
module_id_t
mod_id
,
typedef
void
(
*
slice_scheduler
_dl
)(
module_id_t
mod_id
,
int
slice_id
,
uint32_t
frame
,
uint32_t
subframe
,
int
*
mbsfn_flag
,
Protocol__FlexranMessage
**
dl_info
);
typedef
void
(
*
slice_scheduler_ul
)(
module_id_t
mod_id
,
frame_t
frame
,
unsigned
char
cooperation_flag
,
uint32_t
subframe
,
unsigned
char
sched_subframe
,
Protocol__FlexranMessage
**
ul_info
);
/*
* top level flexran scheduler used by the eNB scheduler
*/
void
flexran_schedule_ue_spec_default
(
mid_t
mod_id
,
void
flexran_schedule_ue_
dl_
spec_default
(
mid_t
mod_id
,
uint32_t
frame
,
uint32_t
subframe
,
int
*
mbsfn_flag
,
...
...
@@ -102,13 +108,22 @@ flexran_schedule_ue_spec_be(mid_t mod_id,
* common flexran scheduler function
*/
void
flexran_schedule_ue_spec_common
(
mid_t
mod_id
,
flexran_schedule_ue_
dl_
spec_common
(
mid_t
mod_id
,
int
slice_id
,
uint32_t
frame
,
uint32_t
subframe
,
int
*
mbsfn_flag
,
Protocol__FlexranMessage
**
dl_info
);
void
flexran_schedule_ue_ul_spec_default
(
mid_t
mod_id
,
uint32_t
frame
,
uint32_t
cooperation_flag
,
int
subframe
,
unsigned
char
sched_subframe
,
Protocol__FlexranMessage
**
ul_info
);
uint16_t
flexran_nb_rbs_allowed_slice
(
float
rb_percentage
,
int
total_rbs
);
...
...
@@ -117,6 +132,8 @@ int flexran_slice_member(int UE_id,
int
flexran_slice_maxmcs
(
int
slice_id
)
;
/* Downlink Primitivies */
void
_store_dlsch_buffer
(
module_id_t
Mod_id
,
int
slice_id
,
frame_t
frameP
,
...
...
@@ -131,6 +148,21 @@ void _assign_rbs_required (module_id_t Mod_id,
uint16_t
nb_rbs_allowed_slice
[
MAX_NUM_CCs
][
MAX_NUM_SLICES
],
int
min_rb_unit
[
MAX_NUM_CCs
]);
/* Uplink Primitivies */
// void _sort_ue_ul (module_id_t module_idP,int frameP, sub_frame_t subframeP);
void
_assign_max_mcs_min_rb
(
module_id_t
module_idP
,
int
slice_id
,
int
frameP
,
sub_frame_t
subframeP
,
uint16_t
*
first_rb
);
void
_ulsch_scheduler_pre_processor
(
module_id_t
module_idP
,
int
slice_id
,
int
frameP
,
sub_frame_t
subframeP
,
uint16_t
*
first_rb
);
void
_dlsch_scheduler_pre_processor
(
module_id_t
Mod_id
,
int
slice_id
,
frame_t
frameP
,
...
...
@@ -165,13 +197,21 @@ void _dlsch_scheduler_pre_processor_allocate (module_id_t Mod_id,
/*
* Default scheduler used by the eNB agent
*/
void
flexran_schedule_ue_spec_default
(
mid_t
mod_id
,
uint32_t
frame
,
uint32_t
subframe
,
void
flexran_schedule_ue_
dl_
spec_default
(
mid_t
mod_id
,
uint32_t
frame
,
uint32_t
subframe
,
int
*
mbsfn_flag
,
Protocol__FlexranMessage
**
dl_info
);
/*
Uplink scheduler used by MAC agent
*/
void
flexran_agent_schedule_ulsch_ue_spec
(
module_id_t
module_idP
,
frame_t
frameP
,
unsigned
char
cooperation_flag
,
sub_frame_t
subframeP
,
unsigned
char
sched_subframe
,
Protocol__FlexranMessage
**
ul_info
);
/*
* Data plane function for applying the DL decisions of the scheduler
*/
void
flexran_apply_
dl_
scheduling_decisions
(
mid_t
mod_id
,
uint32_t
frame
,
uint32_t
subframe
,
int
*
mbsfn_flag
,
void
flexran_apply_scheduling_decisions
(
mid_t
mod_id
,
uint32_t
frame
,
uint32_t
subframe
,
int
*
mbsfn_flag
,
Protocol__FlexranMessage
*
dl_scheduling_info
);
/*
...
...
openair2/LAYER2/MAC/flexran_agent_scheduler_dataplane.c
View file @
8de28502
...
...
@@ -59,28 +59,28 @@
#include "SIMULATION/TOOLS/defs.h" // for taus
void
flexran_apply_
dl_
scheduling_decisions
(
mid_t
mod_id
,
void
flexran_apply_scheduling_decisions
(
mid_t
mod_id
,
uint32_t
frame
,
uint32_t
subframe
,
int
*
mbsfn_flag
,
Protocol__FlexranMessage
*
dl_scheduling_info
)
{
Protocol__FlexDlMacConfig
*
mac_config
=
dl_scheduling_info
->
dl_mac_config_msg
;
Protocol__FlexDlMacConfig
*
mac_
dl_
config
=
dl_scheduling_info
->
dl_mac_config_msg
;
// Check if there is anything to schedule for random access
if
(
mac_config
->
n_dl_rar
>
0
)
{
if
(
mac_
dl_
config
->
n_dl_rar
>
0
)
{
/*TODO: call the random access data plane function*/
}
// Check if there is anything to schedule for paging/broadcast
if
(
mac_config
->
n_dl_broadcast
>
0
)
{
if
(
mac_
dl_
config
->
n_dl_broadcast
>
0
)
{
/*TODO: call the broadcast/paging data plane function*/
}
// Check if there is anything to schedule for the UEs
if
(
mac_config
->
n_dl_ue_data
>
0
)
{
if
(
mac_
dl_
config
->
n_dl_ue_data
>
0
)
{
flexran_apply_ue_spec_scheduling_decisions
(
mod_id
,
frame
,
subframe
,
mbsfn_flag
,
mac_
config
->
n_dl_ue_data
,
mac
_config
->
dl_ue_data
);
mac_
dl_config
->
n_dl_ue_data
,
mac_dl
_config
->
dl_ue_data
);
}
}
...
...
openair2/LAYER2/MAC/flexran_agent_scheduler_dlsch_ue.c
View file @
8de28502
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/flexran_agent_scheduler_ulsch_ue.c
0 → 100644
View file @
8de28502
This diff is collapsed.
Click to expand it.
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