Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
Michael Black
OpenXG UE
Commits
434d5584
Commit
434d5584
authored
Apr 22, 2017
by
shahab SHARIATBAGHERI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uplink harq api
parent
3566b470
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
191 additions
and
75 deletions
+191
-75
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
+39
-0
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
+1
-1
openair2/ENB_APP/MESSAGES/V2/flexran.proto
openair2/ENB_APP/MESSAGES/V2/flexran.proto
+2
-2
openair2/ENB_APP/MESSAGES/V2/header.proto
openair2/ENB_APP/MESSAGES/V2/header.proto
+6
-7
openair2/ENB_APP/flexran_agent_ran_api.c
openair2/ENB_APP/flexran_agent_ran_api.c
+16
-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
+104
-43
openair2/LAYER2/MAC/flexran_agent_mac_proto.h
openair2/LAYER2/MAC/flexran_agent_mac_proto.h
+2
-2
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
+3
-3
openair2/LAYER2/MAC/flexran_agent_scheduler_ulsch_ue.c
openair2/LAYER2/MAC/flexran_agent_scheduler_ulsch_ue.c
+7
-6
No files found.
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
View file @
434d5584
...
...
@@ -1077,6 +1077,45 @@ int flexran_agent_mac_create_empty_ul_config(mid_t mod_id, Protocol__FlexranMess
}
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
;
...
...
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.h
View file @
434d5584
...
...
@@ -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 @
434d5584
...
...
@@ -63,7 +63,7 @@ typedef struct {
void
(
*
flexran_agent_schedule_ul_spec
)(
mid_t
module_idP
,
uint32_t
frameP
,
unsigned
char
cooperation_flag
,
uint32_t
subframeP
,
unsigned
char
sched_subframe
);
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)
...
...
openair2/ENB_APP/MESSAGES/V2/flexran.proto
View file @
434d5584
...
...
@@ -168,8 +168,8 @@ message flex_dl_mac_config {
message
flex_ul_mac_config
{
optional
flex_header
header
=
1
;
optional
uint32
sfn_sf
=
2
;
repeated
flex_ul_data
ul_ue_data
=
3
;
optional
uint32
sfn_sf
=
2
;
repeated
flex_ul_data
ul_ue_data
=
3
;
}
...
...
openair2/ENB_APP/MESSAGES/V2/header.proto
View file @
434d5584
...
...
@@ -32,15 +32,14 @@ enum flex_type {
//Controller command messages
FLPT_DL_MAC_CONFIG
=
13
;
FLPT_UL_MAC_CONFIG
=
14
;
// UE state change messages
FLPT_UE_STATE_CHANGE
=
1
5
;
FLPT_UE_STATE_CHANGE
=
1
4
;
// Control delegation messages
FLPT_DELEGATE_CONTROL
=
1
6
;
FLPT_RECONFIGURE_AGENT
=
1
7
;
FLPT_RRC_TRIGGERING
=
1
8
;
FLPT_DELEGATE_CONTROL
=
1
5
;
FLPT_RECONFIGURE_AGENT
=
1
6
;
FLPT_RRC_TRIGGERING
=
1
7
;
FLPT_UL_MAC_CONFIG
=
18
;
}
openair2/ENB_APP/flexran_agent_ran_api.c
View file @
434d5584
...
...
@@ -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; */
...
...
openair2/ENB_APP/flexran_agent_ran_api.h
View file @
434d5584
...
...
@@ -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 @
434d5584
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/flexran_agent_mac_proto.h
View file @
434d5584
...
...
@@ -174,12 +174,12 @@ void flexran_schedule_ue_spec_default(mid_t mod_id, uint32_t frame, uint32_t sub
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
);
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 @
434d5584
...
...
@@ -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 @
434d5584
...
...
@@ -526,7 +526,7 @@ void _dlsch_scheduler_pre_processor (module_id_t Mod_id,
CC_id
=
UE_list
->
ordered_CCids
[
ii
][
UE_id
];
ue_sched_ctl
=
&
UE_list
->
UE_sched_ctrl
[
UE_id
];
ue_sched_ctl
->
max_allowed_rbs
[
CC_id
]
=
nb_rbs_allowed_slice
[
CC_id
][
slice_id
];
flexran_get_harq
(
Mod_id
,
CC_id
,
UE_id
,
frameP
,
subframeP
,
&
harq_pid
,
&
round
);
flexran_get_harq
(
Mod_id
,
CC_id
,
UE_id
,
frameP
,
subframeP
,
&
harq_pid
,
&
round
,
openair_harq_DL
);
// if there is no available harq_process, skip the UE
if
(
UE_list
->
UE_sched_ctrl
[
UE_id
].
harq_pid
[
CC_id
]
<
0
)
...
...
@@ -640,7 +640,7 @@ void _dlsch_scheduler_pre_processor (module_id_t Mod_id,
for
(
ii
=
0
;
ii
<
UE_num_active_CC
(
UE_list
,
UE_id
);
ii
++
)
{
CC_id
=
UE_list
->
ordered_CCids
[
ii
][
UE_id
];
ue_sched_ctl
=
&
UE_list
->
UE_sched_ctrl
[
UE_id
];
flexran_get_harq
(
Mod_id
,
CC_id
,
UE_id
,
frameP
,
subframeP
,
&
harq_pid
,
&
round
);
flexran_get_harq
(
Mod_id
,
CC_id
,
UE_id
,
frameP
,
subframeP
,
&
harq_pid
,
&
round
,
openair_harq_DL
);
rnti
=
UE_RNTI
(
Mod_id
,
UE_id
);
// LOG_D(MAC,"UE %d rnti 0x\n", UE_id, rnti );
...
...
@@ -1096,7 +1096,7 @@ flexran_schedule_ue_spec_common(mid_t mod_id,
dl_data
[
num_ues_added
]
->
serv_cell_index
=
CC_id
;
nb_available_rb
=
ue_sched_ctl
->
pre_nb_available_rbs
[
CC_id
];
flexran_get_harq
(
mod_id
,
CC_id
,
UE_id
,
frame
,
subframe
,
&
harq_pid
,
&
round
);
flexran_get_harq
(
mod_id
,
CC_id
,
UE_id
,
frame
,
subframe
,
&
harq_pid
,
&
round
,
openair_harq_DL
);
sdu_length_total
=
0
;
mcs
=
cqi_to_mcs
[
flexran_get_ue_wcqi
(
mod_id
,
UE_id
)];
// LOG_I(FLEXRAN_AGENT, "The MCS is %d\n", mcs);
...
...
openair2/LAYER2/MAC/flexran_agent_scheduler_ulsch_ue.c
View file @
434d5584
...
...
@@ -615,8 +615,8 @@ void _ulsch_scheduler_pre_processor(module_id_t module_idP,
// This is the actual CC_id in the list
CC_id
=
UE_list
->
ordered_ULCCids
[
n
][
UE_id
];
mac_xface
->
get_ue_active_harq_pid
(
module_idP
,
CC_id
,
rnti
,
frameP
,
subframeP
,
&
harq_pid
,
&
round
,
openair_harq_UL
);
//
mac_xface->get_ue_active_harq_pid(module_idP,CC_id,rnti,frameP,subframeP,&harq_pid,&round,openair_harq_UL);
flexran_get_harq
(
module_idP
,
CC_id
,
UE_id
,
frameP
,
subframeP
,
&
harq_pid
,
&
round
,
openair_harq_UL
);
if
(
round
>
0
)
{
nb_allocated_rbs
[
CC_id
][
UE_id
]
=
UE_list
->
UE_template
[
CC_id
][
UE_id
].
nb_rb_ul
[
harq_pid
];
}
else
{
...
...
@@ -787,10 +787,11 @@ 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
)
{
unsigned
char
sched_subframe
,
Protocol__FlexranMessage
**
ul_info
)
{
//
flexran_agent_mac_create_empty_ul_config(module_idP, ul_info);
flexran_agent_mac_create_empty_ul_config
(
module_idP
,
ul_info
);
uint16_t
first_rb
[
MAX_NUM_CCs
],
i
;
int
CC_id
;
...
...
@@ -907,7 +908,7 @@ void flexran_agent_schedule_ulsch_rnti(module_id_t module_idP,
continue
;
}
rnti
=
UE_RNTI
(
module_idP
,
UE_id
);
rnti
=
flexran_get_ue_crnti
(
module_idP
,
UE_id
);
if
(
rnti
==
NOT_A_RNTI
)
{
LOG_W
(
MAC
,
"[eNB %d] frame %d subfarme %d, UE %d: no RNTI
\n
"
,
module_idP
,
frameP
,
subframeP
,
UE_id
);
...
...
@@ -973,7 +974,7 @@ abort();
UE_template
=
&
UE_list
->
UE_template
[
CC_id
][
UE_id
];
UE_sched_ctrl
=
&
UE_list
->
UE_sched_ctrl
[
UE_id
];
if
(
mac_xface
->
get_ue_active_harq_pid
(
module_idP
,
CC_id
,
rnti
,
frameP
,
subframeP
,
&
harq_pid
,
&
round
,
openair_harq_UL
)
==
-
1
)
{
if
(
flexran_get_harq
(
module_idP
,
CC_id
,
UE_id
,
frameP
,
subframeP
,
&
harq_pid
,
&
round
,
openair_harq_UL
)
==
-
1
)
{
LOG_W
(
MAC
,
"[eNB %d] Scheduler Frame %d, subframeP %d: candidate harq_pid from PHY for UE %d CC %d RNTI %x
\n
"
,
module_idP
,
frameP
,
subframeP
,
UE_id
,
CC_id
,
rnti
);
continue
;
...
...
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