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
zzha zzha
OpenXG-RAN
Commits
30357814
Commit
30357814
authored
Oct 25, 2018
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move ue_lc_config message filling into MAC CM
parent
369e89ee
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
70 deletions
+77
-70
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
+60
-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/flexran_agent_common.c
openair2/ENB_APP/flexran_agent_common.c
+13
-70
No files found.
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
View file @
30357814
...
...
@@ -1372,6 +1372,66 @@ void flexran_agent_fill_mac_cell_config(mid_t mod_id, uint8_t cc_id,
}
}
void
flexran_agent_fill_mac_lc_ue_config
(
mid_t
mod_id
,
mid_t
ue_id
,
Protocol__FlexLcUeConfig
*
lc_ue_conf
)
{
lc_ue_conf
->
rnti
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
lc_ue_conf
->
has_rnti
=
1
;
lc_ue_conf
->
n_lc_config
=
flexran_get_num_ue_lcs
(
mod_id
,
ue_id
);
if
(
lc_ue_conf
->
n_lc_config
==
0
)
return
;
Protocol__FlexLcConfig
**
lc_config
=
calloc
(
lc_ue_conf
->
n_lc_config
,
sizeof
(
Protocol__FlexLcConfig
*
));
if
(
!
lc_config
)
{
LOG_E
(
FLEXRAN_AGENT
,
"could not allocate memory for lc_config of UE %x
\n
"
,
lc_ue_conf
->
rnti
);
lc_ue_conf
->
n_lc_config
=
0
;
return
;
// can not allocate memory, skip rest
}
for
(
int
j
=
0
;
j
<
lc_ue_conf
->
n_lc_config
;
j
++
)
{
lc_config
[
j
]
=
malloc
(
sizeof
(
Protocol__FlexLcConfig
));
if
(
!
lc_config
[
j
])
continue
;
// go over this error, try entry
protocol__flex_lc_config__init
(
lc_config
[
j
]);
lc_config
[
j
]
->
has_lcid
=
1
;
lc_config
[
j
]
->
lcid
=
j
+
1
;
const
int
lcg
=
flexran_get_lcg
(
mod_id
,
ue_id
,
j
+
1
);
if
(
lcg
>=
0
&&
lcg
<=
3
)
{
lc_config
[
j
]
->
has_lcg
=
1
;
lc_config
[
j
]
->
lcg
=
flexran_get_lcg
(
mod_id
,
ue_id
,
j
+
1
);
}
lc_config
[
j
]
->
has_direction
=
1
;
lc_config
[
j
]
->
direction
=
flexran_get_direction
(
ue_id
,
j
+
1
);
//TODO: Bearer type. One of FLQBT_* values. Currently only default bearer supported
lc_config
[
j
]
->
has_qos_bearer_type
=
1
;
lc_config
[
j
]
->
qos_bearer_type
=
PROTOCOL__FLEX_QOS_BEARER_TYPE__FLQBT_NON_GBR
;
//TODO: Set the QCI defined in TS 23.203, coded as defined in TS 36.413
// One less than the actual QCI value. Needs to be generalized
lc_config
[
j
]
->
has_qci
=
1
;
lc_config
[
j
]
->
qci
=
1
;
if
(
lc_config
[
j
]
->
direction
==
PROTOCOL__FLEX_QOS_BEARER_TYPE__FLQBT_GBR
)
{
/* TODO all of the need to be taken from API */
//TODO: Set the max bitrate (UL)
lc_config
[
j
]
->
has_e_rab_max_bitrate_ul
=
0
;
lc_config
[
j
]
->
e_rab_max_bitrate_ul
=
0
;
//TODO: Set the max bitrate (DL)
lc_config
[
j
]
->
has_e_rab_max_bitrate_dl
=
0
;
lc_config
[
j
]
->
e_rab_max_bitrate_dl
=
0
;
//TODO: Set the guaranteed bitrate (UL)
lc_config
[
j
]
->
has_e_rab_guaranteed_bitrate_ul
=
0
;
lc_config
[
j
]
->
e_rab_guaranteed_bitrate_ul
=
0
;
//TODO: Set the guaranteed bitrate (DL)
lc_config
[
j
]
->
has_e_rab_guaranteed_bitrate_dl
=
0
;
lc_config
[
j
]
->
e_rab_guaranteed_bitrate_dl
=
0
;
}
}
lc_ue_conf
->
lc_config
=
lc_config
;
}
int
flexran_agent_unregister_mac_xface
(
mid_t
mod_id
)
{
if
(
!
agent_mac_xface
[
mod_id
])
{
...
...
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.h
View file @
30357814
...
...
@@ -87,6 +87,10 @@ void flexran_agent_get_pending_dl_mac_config(mid_t mod_id, Protocol__FlexranMess
void
flexran_agent_fill_mac_cell_config
(
mid_t
mod_id
,
uint8_t
cc_id
,
Protocol__FlexCellConfig
*
conf
);
/* Fill the lc_ue_config->lc_config message */
void
flexran_agent_fill_mac_lc_ue_config
(
mid_t
mod_id
,
mid_t
ue_id
,
Protocol__FlexLcUeConfig
*
lc_ue_conf
);
/*Register technology specific interface callbacks*/
int
flexran_agent_register_mac_xface
(
mid_t
mod_id
);
...
...
openair2/ENB_APP/flexran_agent_common.c
View file @
30357814
...
...
@@ -443,8 +443,6 @@ int flexran_agent_lc_config_reply(mid_t mod_id, const void *params, Protocol__Fl
Protocol__FlexLcConfigRequest
*
lc_config_request_msg
=
input
->
lc_config_request_msg
;
xid
=
(
lc_config_request_msg
->
header
)
->
xid
;
int
i
,
j
;
Protocol__FlexLcConfigReply
*
lc_config_reply_msg
;
lc_config_reply_msg
=
malloc
(
sizeof
(
Protocol__FlexLcConfigReply
));
if
(
lc_config_reply_msg
==
NULL
)
...
...
@@ -456,82 +454,27 @@ int flexran_agent_lc_config_reply(mid_t mod_id, const void *params, Protocol__Fl
lc_config_reply_msg
->
header
=
header
;
lc_config_reply_msg
->
n_lc_ue_config
=
flexran_get_num_ues
(
mod_id
);
/* the lc_config_reply entirely depends on MAC except for the
* mac_eNB_get_rrc_status() function (which in the current OAI implementation
* is reachable if F1 is present). Therefore we check here wether MAC CM is
* present and the message gets properly filled if it is or remains empty if
* not */
lc_config_reply_msg
->
n_lc_ue_config
=
flexran_agent_get_mac_xface
(
mod_id
)
?
flexran_get_num_ues
(
mod_id
)
:
0
;
Protocol__FlexLcUeConfig
**
lc_ue_config
;
Protocol__FlexLcUeConfig
**
lc_ue_config
=
NULL
;
if
(
lc_config_reply_msg
->
n_lc_ue_config
>
0
)
{
lc_ue_config
=
malloc
(
sizeof
(
Protocol__FlexLcUeConfig
*
)
*
lc_config_reply_msg
->
n_lc_ue_config
);
if
(
lc_ue_config
==
NULL
)
{
goto
error
;
}
// Fill the config for each UE
for
(
i
=
0
;
i
<
lc_config_reply_msg
->
n_lc_ue_config
;
i
++
)
{
for
(
i
nt
i
=
0
;
i
<
lc_config_reply_msg
->
n_lc_ue_config
;
i
++
)
{
lc_ue_config
[
i
]
=
malloc
(
sizeof
(
Protocol__FlexLcUeConfig
));
protocol__flex_lc_ue_config__init
(
lc_ue_config
[
i
]);
lc_ue_config
[
i
]
->
has_rnti
=
1
;
lc_ue_config
[
i
]
->
rnti
=
flexran_get_ue_crnti
(
mod_id
,
i
);
//TODO: Set the number of LC configurations that will be reported for this UE
//Set this according to the current state of the UE. This is only a temporary fix
int
status
=
0
;
status
=
mac_eNB_get_rrc_status
(
mod_id
,
flexran_get_ue_crnti
(
mod_id
,
i
));
/* TODO needs to be revised and appropriate API to be implemented */
if
(
status
<
RRC_CONNECTED
)
{
lc_ue_config
[
i
]
->
n_lc_config
=
0
;
}
else
if
(
status
==
RRC_CONNECTED
)
{
lc_ue_config
[
i
]
->
n_lc_config
=
1
;
}
else
{
lc_ue_config
[
i
]
->
n_lc_config
=
3
;
}
Protocol__FlexLcConfig
**
lc_config
;
if
(
lc_ue_config
[
i
]
->
n_lc_config
>
0
)
{
lc_config
=
malloc
(
sizeof
(
Protocol__FlexLcConfig
*
)
*
lc_ue_config
[
i
]
->
n_lc_config
);
if
(
lc_config
==
NULL
)
{
goto
error
;
}
for
(
j
=
0
;
j
<
lc_ue_config
[
i
]
->
n_lc_config
;
j
++
)
{
lc_config
[
j
]
=
malloc
(
sizeof
(
Protocol__FlexLcConfig
));
protocol__flex_lc_config__init
(
lc_config
[
j
]);
if
(
!
lc_ue_config
[
i
])
goto
error
;
lc_config
[
j
]
->
has_lcid
=
1
;
lc_config
[
j
]
->
lcid
=
j
+
1
;
int
lcg
=
flexran_get_lcg
(
mod_id
,
i
,
j
+
1
);
if
(
lcg
>=
0
&&
lcg
<=
3
)
{
lc_config
[
j
]
->
has_lcg
=
1
;
lc_config
[
j
]
->
lcg
=
flexran_get_lcg
(
mod_id
,
i
,
j
+
1
);
}
lc_config
[
j
]
->
has_direction
=
1
;
lc_config
[
j
]
->
direction
=
flexran_get_direction
(
i
,
j
+
1
);
//TODO: Bearer type. One of FLQBT_* values. Currently only default bearer supported
lc_config
[
j
]
->
has_qos_bearer_type
=
1
;
lc_config
[
j
]
->
qos_bearer_type
=
PROTOCOL__FLEX_QOS_BEARER_TYPE__FLQBT_NON_GBR
;
//TODO: Set the QCI defined in TS 23.203, coded as defined in TS 36.413
// One less than the actual QCI value. Needs to be generalized
lc_config
[
j
]
->
has_qci
=
1
;
lc_config
[
j
]
->
qci
=
1
;
if
(
lc_config
[
j
]
->
direction
==
PROTOCOL__FLEX_QOS_BEARER_TYPE__FLQBT_GBR
)
{
/* TODO all of the need to be taken from API */
//TODO: Set the max bitrate (UL)
lc_config
[
j
]
->
has_e_rab_max_bitrate_ul
=
0
;
lc_config
[
j
]
->
e_rab_max_bitrate_ul
=
0
;
//TODO: Set the max bitrate (DL)
lc_config
[
j
]
->
has_e_rab_max_bitrate_dl
=
0
;
lc_config
[
j
]
->
e_rab_max_bitrate_dl
=
0
;
//TODO: Set the guaranteed bitrate (UL)
lc_config
[
j
]
->
has_e_rab_guaranteed_bitrate_ul
=
0
;
lc_config
[
j
]
->
e_rab_guaranteed_bitrate_ul
=
0
;
//TODO: Set the guaranteed bitrate (DL)
lc_config
[
j
]
->
has_e_rab_guaranteed_bitrate_dl
=
0
;
lc_config
[
j
]
->
e_rab_guaranteed_bitrate_dl
=
0
;
}
}
lc_ue_config
[
i
]
->
lc_config
=
lc_config
;
}
protocol__flex_lc_ue_config__init
(
lc_ue_config
[
i
]);
flexran_agent_fill_mac_lc_ue_config
(
mod_id
,
i
,
lc_ue_config
[
i
]);
}
// end for UE
lc_config_reply_msg
->
lc_ue_config
=
lc_ue_config
;
}
// lc_config_reply_msg->n_lc_ue_config > 0
...
...
@@ -553,7 +496,7 @@ int flexran_agent_lc_config_reply(mid_t mod_id, const void *params, Protocol__Fl
free
(
lc_config_reply_msg
);
if
(
*
msg
!=
NULL
)
free
(
*
msg
);
//
LOG_E(FLEXRAN_AGENT, "%s: an error occured\n", __FUNCTION__);
LOG_E
(
FLEXRAN_AGENT
,
"%s: an error occured
\n
"
,
__FUNCTION__
);
return
-
1
;
}
...
...
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