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
e2f35a2d
Commit
e2f35a2d
authored
Jan 11, 2024
by
Chieh-Chun Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: add default slice while initializing slice
parent
bdfea1d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
14 deletions
+16
-14
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c
+3
-2
openair2/LAYER2/NR_MAC_gNB/slicing/nr_slicing.c
openair2/LAYER2/NR_MAC_gNB/slicing/nr_slicing.c
+13
-12
No files found.
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c
View file @
e2f35a2d
...
@@ -59,6 +59,7 @@ static int add_mod_dl_slice(int mod_id,
...
@@ -59,6 +59,7 @@ static int add_mod_dl_slice(int mod_id,
char
*
label
,
char
*
label
,
int64_t
pct_reserved
)
int64_t
pct_reserved
)
{
{
nr_pp_impl_param_dl_t
*
dl
=
&
RC
.
nrmac
[
mod_id
]
->
pre_processor_dl
;
void
*
params
=
NULL
;
void
*
params
=
NULL
;
char
*
slice_algo
=
NULL
;
char
*
slice_algo
=
NULL
;
if
(
current_algo
==
NVS_SLICING
)
{
if
(
current_algo
==
NVS_SLICING
)
{
...
@@ -67,12 +68,12 @@ static int add_mod_dl_slice(int mod_id,
...
@@ -67,12 +68,12 @@ static int add_mod_dl_slice(int mod_id,
// use SLICE_SM_NVS_V0_CAPACITY by default
// use SLICE_SM_NVS_V0_CAPACITY by default
slice_algo
=
strdup
(
"NVS_CAPACITY"
);
slice_algo
=
strdup
(
"NVS_CAPACITY"
);
((
nvs_nr_slice_param_t
*
)
params
)
->
type
=
NVS_RES
;
((
nvs_nr_slice_param_t
*
)
params
)
->
type
=
NVS_RES
;
((
nvs_nr_slice_param_t
*
)
params
)
->
pct_reserved
=
pct_reserved
/
100
.
0
;
float
remain_pct
=
1
-
((
nvs_nr_slice_param_t
*
)
dl
->
slices
->
s
[
0
]
->
algo_data
)
->
pct_reserved
;
((
nvs_nr_slice_param_t
*
)
params
)
->
pct_reserved
=
pct_reserved
/
100
.
0
*
remain_pct
;
}
else
{
}
else
{
assert
(
0
!=
0
&&
"Unknow current_algo"
);
assert
(
0
!=
0
&&
"Unknow current_algo"
);
}
}
nr_pp_impl_param_dl_t
*
dl
=
&
RC
.
nrmac
[
mod_id
]
->
pre_processor_dl
;
void
*
algo
=
&
dl
->
dl_algo
;
void
*
algo
=
&
dl
->
dl_algo
;
char
*
l
=
NULL
;
char
*
l
=
NULL
;
if
(
label
)
if
(
label
)
...
...
openair2/LAYER2/NR_MAC_gNB/slicing/nr_slicing.c
View file @
e2f35a2d
...
@@ -110,12 +110,10 @@ void nr_slicing_add_UE(nr_slice_info_t *si, NR_UE_info_t *new_ue)
...
@@ -110,12 +110,10 @@ void nr_slicing_add_UE(nr_slice_info_t *si, NR_UE_info_t *new_ue)
}
else
{
}
else
{
LOG_E
(
NR_MAC
,
"cannot add new UE rnti 0x%04x to slice idx %d, num_UEs %d
\n
"
,
new_ue
->
rnti
,
i
,
si
->
s
[
i
]
->
num_UEs
);
LOG_E
(
NR_MAC
,
"cannot add new UE rnti 0x%04x to slice idx %d, num_UEs %d
\n
"
,
new_ue
->
rnti
,
i
,
si
->
s
[
i
]
->
num_UEs
);
}
}
LOG_W
(
NR_MAC
,
LOG_W
(
NR_MAC
,
"Matched UE, Add UE rnti 0x%04x to slice idx %d, sst %d, sd %d
\n
"
,
"Add UE rnti 0x%04x to slice idx %d, sst %d, sd %d
\n
"
,
new_ue
->
rnti
,
i
,
si
->
s
[
i
]
->
nssai
.
sst
,
si
->
s
[
i
]
->
nssai
.
sd
);
new_ue
->
rnti
,
}
else
{
i
,
LOG_W
(
NR_MAC
,
"cannot find matched UE, do nothing for UE rnti 0x%04x
\n
"
,
new_ue
->
rnti
);
si
->
s
[
i
]
->
nssai
.
sst
,
si
->
s
[
i
]
->
nssai
.
sd
);
}
}
}
}
}
}
...
@@ -558,17 +556,20 @@ nr_pp_impl_param_dl_t nvs_nr_dl_init(module_id_t mod_id)
...
@@ -558,17 +556,20 @@ nr_pp_impl_param_dl_t nvs_nr_dl_init(module_id_t mod_id)
/* insert default slice, all resources */
/* insert default slice, all resources */
nvs_nr_slice_param_t
*
dlp
=
malloc
(
sizeof
(
nvs_nr_slice_param_t
));
nvs_nr_slice_param_t
*
dlp
=
malloc
(
sizeof
(
nvs_nr_slice_param_t
));
DevAssert
(
dlp
);
DevAssert
(
dlp
);
NR_UEs_t
*
UE_info
=
&
RC
.
nrmac
[
mod_id
]
->
UE_info
;
int
num_ue
=
0
;
UE_iterator
(
UE_info
->
list
,
UE
)
{
num_ue
+=
1
;
}
dlp
->
type
=
NVS_RES
;
dlp
->
type
=
NVS_RES
;
dlp
->
pct_reserved
=
1
.
0
f
;
dlp
->
pct_reserved
=
0
.
05
f
*
num_ue
;
nr_dl_sched_algo_t
*
algo
=
&
RC
.
nrmac
[
mod_id
]
->
pre_processor_dl
.
dl_algo
;
nr_dl_sched_algo_t
*
algo
=
&
RC
.
nrmac
[
mod_id
]
->
pre_processor_dl
.
dl_algo
;
algo
->
data
=
NULL
;
algo
->
data
=
NULL
;
// default slice: sst = 1, sd = 0x000000, id = 999, label = default
nssai_t
nssai
=
{.
sst
=
1
,
.
sd
=
0
};
nssai_t
nssai
=
{.
sst
=
1
,
.
sd
=
0
};
const
int
rc
=
addmod_nvs_nr_slice_dl
(
si
,
0
,
nssai
,
strdup
(
"default"
),
algo
,
dlp
);
const
int
rc
=
addmod_nvs_nr_slice_dl
(
si
,
99
,
nssai
,
strdup
(
"default"
),
algo
,
dlp
);
LOG_W
(
NR_MAC
,
"Add default DL slice id 999, label default, sst %d, sd %d, slice sched algo NVS_CAPACITY, pct_reserved %.2f, ue sched algo %s
\n
"
,
nssai
.
sst
,
nssai
.
sd
,
dlp
->
pct_reserved
,
algo
->
name
);
DevAssert
(
0
==
rc
);
DevAssert
(
0
==
rc
);
NR_UEs_t
*
UE_info
=
&
RC
.
nrmac
[
mod_id
]
->
UE_info
;
UE_iterator
(
UE_info
->
list
,
UE
)
{
nr_slicing_add_UE
(
si
,
UE
);
}
nr_pp_impl_param_dl_t
nvs
;
nr_pp_impl_param_dl_t
nvs
;
...
...
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