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
wangwenhui
OpenXG-RAN
Commits
6c4f58a0
Commit
6c4f58a0
authored
Jun 01, 2018
by
Navid Nikaein
Committed by
Robert Schmidt
Sep 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move UE_list/slice init in dedicated functions
parent
0bb6a19f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
39 deletions
+54
-39
openair2/LAYER2/MAC/mac_proto.h
openair2/LAYER2/MAC/mac_proto.h
+4
-0
openair2/LAYER2/MAC/main.c
openair2/LAYER2/MAC/main.c
+50
-39
No files found.
openair2/LAYER2/MAC/mac_proto.h
View file @
6c4f58a0
...
...
@@ -165,6 +165,10 @@ void add_msg3(module_id_t module_idP, int CC_id, RA_t * ra, frame_t frameP,
//main.c
void
init_UE_list
(
UE_list_t
*
UE_list
);
void
init_slice_info
(
slice_info_t
*
sli
);
int
mac_top_init
(
int
eMBMS_active
,
char
*
uecap_xer
,
uint8_t
cba_group_active
,
uint8_t
HO_active
);
...
...
openair2/LAYER2/MAC/main.c
View file @
6c4f58a0
...
...
@@ -46,12 +46,57 @@
extern
RAN_CONTEXT_t
RC
;
void
init_UE_list
(
UE_list_t
*
UE_list
)
{
int
list_el
;
UE_list
->
num_UEs
=
0
;
UE_list
->
head
=
-
1
;
UE_list
->
head_ul
=
-
1
;
UE_list
->
avail
=
0
;
for
(
list_el
=
0
;
list_el
<
MAX_MOBILES_PER_ENB
-
1
;
list_el
++
)
{
UE_list
->
next
[
list_el
]
=
list_el
+
1
;
UE_list
->
next_ul
[
list_el
]
=
list_el
+
1
;
}
UE_list
->
next
[
list_el
]
=
-
1
;
UE_list
->
next_ul
[
list_el
]
=
-
1
;
memset
(
UE_list
->
DLSCH_pdu
,
0
,
sizeof
(
UE_list
->
DLSCH_pdu
));
memset
(
UE_list
->
UE_template
,
0
,
sizeof
(
UE_list
->
UE_template
));
memset
(
UE_list
->
eNB_UE_stats
,
0
,
sizeof
(
UE_list
->
eNB_UE_stats
));
memset
(
UE_list
->
UE_sched_ctrl
,
0
,
sizeof
(
UE_list
->
UE_sched_ctrl
));
memset
(
UE_list
->
active
,
0
,
sizeof
(
UE_list
->
active
));
memset
(
UE_list
->
assoc_dl_slice_idx
,
0
,
sizeof
(
UE_list
->
assoc_dl_slice_idx
));
memset
(
UE_list
->
assoc_ul_slice_idx
,
0
,
sizeof
(
UE_list
->
assoc_ul_slice_idx
));
}
void
init_slice_info
(
slice_info_t
*
sli
)
{
sli
->
intraslice_share_active
=
1
;
sli
->
interslice_share_active
=
1
;
sli
->
n_dl
=
1
;
memset
(
sli
->
dl
,
0
,
sizeof
(
slice_sched_conf_dl_t
)
*
MAX_NUM_SLICES
);
sli
->
dl
[
0
].
pct
=
1
.
0
;
sli
->
dl
[
0
].
prio
=
10
;
sli
->
dl
[
0
].
pos_high
=
N_RBG_MAX
;
sli
->
dl
[
0
].
maxmcs
=
28
;
sli
->
dl
[
0
].
sorting
=
0x012345
;
sli
->
dl
[
0
].
sched_name
=
"schedule_ue_spec"
;
sli
->
dl
[
0
].
sched_cb
=
dlsym
(
NULL
,
sli
->
dl
[
0
].
sched_name
);
AssertFatal
(
sli
->
dl
[
0
].
sched_cb
,
"DLSCH scheduler callback is NULL
\n
"
);
sli
->
n_ul
=
1
;
memset
(
sli
->
ul
,
0
,
sizeof
(
slice_sched_conf_ul_t
)
*
MAX_NUM_SLICES
);
sli
->
ul
[
0
].
pct
=
1
.
0
;
sli
->
ul
[
0
].
maxmcs
=
20
;
sli
->
ul
[
0
].
sorting
=
0x0123
;
sli
->
ul
[
0
].
sched_name
=
"schedule_ulsch_rnti"
;
sli
->
ul
[
0
].
sched_cb
=
dlsym
(
NULL
,
sli
->
ul
[
0
].
sched_name
);
AssertFatal
(
sli
->
ul
[
0
].
sched_cb
,
"ULSCH scheduler callback is NULL
\n
"
);
}
void
mac_top_init_eNB
(
void
)
{
module_id_t
i
,
j
;
int
list_el
;
UE_list_t
*
UE_list
;
slice_info_t
*
sli
;
eNB_MAC_INST
**
mac
;
LOG_I
(
MAC
,
"[MAIN] Init function start:nb_macrlc_inst=%d
\n
"
,
...
...
@@ -95,42 +140,8 @@ void mac_top_init_eNB(void)
mac
[
i
]
->
if_inst
=
IF_Module_init
(
i
);
UE_list
=
&
mac
[
i
]
->
UE_list
;
UE_list
->
num_UEs
=
0
;
UE_list
->
head
=
-
1
;
UE_list
->
head_ul
=
-
1
;
UE_list
->
avail
=
0
;
for
(
list_el
=
0
;
list_el
<
MAX_MOBILES_PER_ENB
-
1
;
list_el
++
)
{
UE_list
->
next
[
list_el
]
=
list_el
+
1
;
UE_list
->
next_ul
[
list_el
]
=
list_el
+
1
;
}
UE_list
->
next
[
list_el
]
=
-
1
;
UE_list
->
next_ul
[
list_el
]
=
-
1
;
sli
=
&
mac
[
i
]
->
slice_info
;
sli
->
intraslice_share_active
=
1
;
sli
->
interslice_share_active
=
1
;
sli
->
n_dl
=
1
;
memset
(
sli
->
dl
,
0
,
sizeof
(
slice_sched_conf_dl_t
)
*
MAX_NUM_SLICES
);
sli
->
dl
[
0
].
pct
=
1
.
0
;
sli
->
dl
[
0
].
prio
=
10
;
sli
->
dl
[
0
].
pos_high
=
N_RBG_MAX
;
sli
->
dl
[
0
].
maxmcs
=
28
;
sli
->
dl
[
0
].
sorting
=
0x012345
;
sli
->
dl
[
0
].
sched_name
=
"schedule_ue_spec"
;
sli
->
dl
[
0
].
sched_cb
=
dlsym
(
NULL
,
sli
->
dl
[
0
].
sched_name
);
AssertFatal
(
sli
->
dl
[
0
].
sched_cb
,
"DLSCH scheduler callback is NULL
\n
"
);
sli
->
n_ul
=
1
;
memset
(
sli
->
ul
,
0
,
sizeof
(
slice_sched_conf_ul_t
)
*
MAX_NUM_SLICES
);
sli
->
ul
[
0
].
pct
=
1
.
0
;
sli
->
ul
[
0
].
maxmcs
=
20
;
sli
->
ul
[
0
].
sorting
=
0x0123
;
sli
->
ul
[
0
].
sched_name
=
"schedule_ulsch_rnti"
;
sli
->
ul
[
0
].
sched_cb
=
dlsym
(
NULL
,
sli
->
ul
[
0
].
sched_name
);
AssertFatal
(
sli
->
ul
[
0
].
sched_cb
,
"ULSCH scheduler callback is NULL
\n
"
);
init_UE_list
(
&
mac
[
i
]
->
UE_list
);
init_slice_info
(
&
mac
[
i
]
->
slice_info
);
}
RC
.
mac
=
mac
;
...
...
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