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
7d37143b
Commit
7d37143b
authored
Sep 28, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Read and forward NSSAI in E1AP Setup Request
parent
75b05571
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
11 deletions
+64
-11
openair2/COMMON/e1ap_messages_types.h
openair2/COMMON/e1ap_messages_types.h
+6
-1
openair2/E1AP/e1ap.c
openair2/E1AP/e1ap.c
+38
-6
openair2/E1AP/e1ap_asnc.h
openair2/E1AP/e1ap_asnc.h
+2
-0
openair2/E1AP/e1ap_setup.c
openair2/E1AP/e1ap_setup.c
+17
-3
openair2/RRC/NR/rrc_gNB_cuup.c
openair2/RRC/NR/rrc_gNB_cuup.c
+1
-1
No files found.
openair2/COMMON/e1ap_messages_types.h
View file @
7d37143b
...
...
@@ -32,6 +32,7 @@
#define E1AP_MAX_NUM_TRANSAC_IDS 4
#define E1AP_MAX_NUM_PLMNS 4
#define E1AP_MAX_NUM_SLICES 1024
#define E1AP_MAX_NUM_CELL_GROUPS 4
#define E1AP_MAX_NUM_QOS_FLOWS 4
#define E1AP_MAX_NUM_NGRAN_DRB 4
...
...
@@ -76,7 +77,11 @@ typedef struct e1ap_setup_req_s {
char
*
gNB_cu_up_name
;
uint64_t
transac_id
;
int
supported_plmns
;
PLMN_ID_t
plmns
[
E1AP_MAX_NUM_PLMNS
];
struct
{
PLMN_ID_t
id
;
int
supported_slices
;
e1ap_nssai_t
*
slice
;
}
plmn
[
E1AP_MAX_NUM_PLMNS
];
}
e1ap_setup_req_t
;
typedef
struct
e1ap_register_req_t
{
...
...
openair2/E1AP/e1ap.c
View file @
7d37143b
...
...
@@ -198,7 +198,24 @@ static void fill_SETUP_REQUEST(e1ap_setup_req_t *setup, E1AP_E1AP_PDU_t *pdu)
for
(
int
i
=
0
;
i
<
numSupportedPLMNs
;
i
++
)
{
asn1cSequenceAdd
(
ieC5
->
value
.
choice
.
SupportedPLMNs_List
.
list
,
E1AP_SupportedPLMNs_Item_t
,
supportedPLMN
);
/* 5.1 PLMN Identity */
MCC_MNC_TO_PLMNID
(
setup
->
plmns
[
i
].
mcc
,
setup
->
plmns
[
i
].
mnc
,
setup
->
plmns
[
i
].
mnc_digit_length
,
&
supportedPLMN
->
pLMN_Identity
);
PLMN_ID_t
*
id
=
&
setup
->
plmn
[
i
].
id
;
MCC_MNC_TO_PLMNID
(
id
->
mcc
,
id
->
mnc
,
id
->
mnc_digit_length
,
&
supportedPLMN
->
pLMN_Identity
);
int
n
=
setup
->
plmn
[
i
].
supported_slices
;
if
(
setup
->
plmn
[
i
].
slice
!=
NULL
&&
n
>
0
)
{
supportedPLMN
->
slice_Support_List
=
calloc
(
1
,
sizeof
(
*
supportedPLMN
->
slice_Support_List
));
AssertFatal
(
supportedPLMN
->
slice_Support_List
!=
NULL
,
"out of memory
\n
"
);
for
(
int
s
=
0
;
s
<
n
;
++
s
)
{
asn1cSequenceAdd
(
supportedPLMN
->
slice_Support_List
->
list
,
E1AP_Slice_Support_Item_t
,
slice
);
e1ap_nssai_t
*
nssai
=
&
setup
->
plmn
[
i
].
slice
[
s
];
INT8_TO_OCTET_STRING
(
nssai
->
sst
,
&
slice
->
sNSSAI
.
sST
);
if
(
nssai
->
sd
!=
0xffffff
)
{
slice
->
sNSSAI
.
sD
=
malloc
(
sizeof
(
*
slice
->
sNSSAI
.
sD
));
AssertFatal
(
slice
->
sNSSAI
.
sD
!=
NULL
,
"out of memory
\n
"
);
INT24_TO_OCTET_STRING
(
nssai
->
sd
,
slice
->
sNSSAI
.
sD
);
}
}
}
}
}
...
...
@@ -294,11 +311,26 @@ void extract_SETUP_REQUEST(const E1AP_E1AP_PDU_t *pdu,
E1AP_SupportedPLMNs_Item_t
*
supported_plmn_item
=
(
E1AP_SupportedPLMNs_Item_t
*
)(
ie
->
value
.
choice
.
SupportedPLMNs_List
.
list
.
array
[
i
]);
/* PLMN Identity */
PLMNID_TO_MCC_MNC
(
&
supported_plmn_item
->
pLMN_Identity
,
req
->
plmns
[
i
].
mcc
,
req
->
plmns
[
i
].
mnc
,
req
->
plmns
[
i
].
mnc_digit_length
);
LOG_D
(
E1AP
,
"MCC: %d
\n
MNC: %d
\n
"
,
req
->
plmns
[
i
].
mcc
,
req
->
plmns
[
i
].
mnc
);
PLMN_ID_t
*
id
=
&
req
->
plmn
[
i
].
id
;
PLMNID_TO_MCC_MNC
(
&
supported_plmn_item
->
pLMN_Identity
,
id
->
mcc
,
id
->
mnc
,
id
->
mnc_digit_length
);
LOG_D
(
E1AP
,
"MCC %d MNC %d
\n
"
,
id
->
mcc
,
id
->
mnc
);
/* NSSAI */
if
(
supported_plmn_item
->
slice_Support_List
)
{
int
n
=
supported_plmn_item
->
slice_Support_List
->
list
.
count
;
req
->
plmn
[
i
].
supported_slices
=
n
;
req
->
plmn
[
i
].
slice
=
calloc
(
n
,
sizeof
(
*
req
->
plmn
[
i
].
slice
));
AssertFatal
(
req
->
plmn
[
i
].
slice
!=
NULL
,
"out of memory
\n
"
);
for
(
int
s
=
0
;
s
<
n
;
++
s
)
{
e1ap_nssai_t
*
slice
=
&
req
->
plmn
[
i
].
slice
[
s
];
const
E1AP_SNSSAI_t
*
es
=
&
supported_plmn_item
->
slice_Support_List
->
list
.
array
[
s
]
->
sNSSAI
;
OCTET_STRING_TO_INT8
(
&
es
->
sST
,
slice
->
sst
);
slice
->
sd
=
0xffffff
;
if
(
es
->
sD
!=
NULL
)
OCTET_STRING_TO_INT24
(
es
->
sD
,
slice
->
sd
);
LOG_D
(
E1AP
,
"SST %d SD %06x
\n
"
,
slice
->
sst
,
slice
->
sd
);
}
}
}
}
...
...
openair2/E1AP/e1ap_asnc.h
View file @
7d37143b
...
...
@@ -61,5 +61,7 @@
#include <E1AP_T-ReorderingTimer.h>
#include <E1AP_SDAP-Configuration.h>
#include <E1AP_PDCP-Configuration.h>
#include <E1AP_Slice-Support-List.h>
#include <E1AP_Slice-Support-Item.h>
#endif
openair2/E1AP/e1ap_setup.c
View file @
7d37143b
...
...
@@ -102,10 +102,24 @@ MessageDef *RCconfig_NR_CU_E1(bool separate_CUUP_process)
e1Setup
->
supported_plmns
=
numPLMNs
;
for
(
int
I
=
0
;
I
<
numPLMNs
;
I
++
)
{
e1Setup
->
plmns
[
I
].
mcc
=
*
PLMNParamList
.
paramarray
[
I
][
GNB_MOBILE_COUNTRY_CODE_IDX
].
uptr
;
e1Setup
->
plmns
[
I
].
mnc
=
*
PLMNParamList
.
paramarray
[
I
][
GNB_MOBILE_NETWORK_CODE_IDX
].
uptr
;
e1Setup
->
plmn
[
I
].
id
.
mcc
=
*
PLMNParamList
.
paramarray
[
I
][
GNB_MOBILE_COUNTRY_CODE_IDX
].
uptr
;
e1Setup
->
plmn
[
I
].
id
.
mnc
=
*
PLMNParamList
.
paramarray
[
I
][
GNB_MOBILE_NETWORK_CODE_IDX
].
uptr
;
e1Setup
->
plmn
[
I
].
id
.
mnc_digit_length
=
*
PLMNParamList
.
paramarray
[
I
][
GNB_MNC_DIGIT_LENGTH
].
uptr
;
char
snssaistr
[
MAX_OPTNAME_SIZE
*
2
+
8
];
sprintf
(
snssaistr
,
"%s.[%i].%s.[%i]"
,
GNB_CONFIG_STRING_GNB_LIST
,
0
,
GNB_CONFIG_STRING_PLMN_LIST
,
I
);
paramlist_def_t
SNSSAIParamList
=
{
GNB_CONFIG_STRING_SNSSAI_LIST
,
NULL
,
0
};
paramdef_t
SNSSAIParams
[]
=
GNBSNSSAIPARAMS_DESC
;
config_getlist
(
&
SNSSAIParamList
,
SNSSAIParams
,
sizeof
(
SNSSAIParams
)
/
sizeof
(
paramdef_t
),
snssaistr
);
e1Setup
->
plmn
[
I
].
supported_slices
=
SNSSAIParamList
.
numelt
;
e1Setup
->
plmn
[
I
].
slice
=
calloc
(
SNSSAIParamList
.
numelt
,
sizeof
(
*
e1Setup
->
plmn
[
I
].
slice
));
AssertFatal
(
e1Setup
->
plmn
[
I
].
slice
!=
NULL
,
"out of memory
\n
"
);
for
(
int
s
=
0
;
s
<
SNSSAIParamList
.
numelt
;
++
s
)
{
e1ap_nssai_t
*
slice
=
&
e1Setup
->
plmn
[
I
].
slice
[
s
];
slice
->
sst
=
*
SNSSAIParamList
.
paramarray
[
s
][
GNB_SLICE_SERVICE_TYPE_IDX
].
uptr
;
slice
->
sd
=
*
SNSSAIParamList
.
paramarray
[
s
][
GNB_SLICE_DIFFERENTIATOR_IDX
].
uptr
;
}
}
/* TODO add NSSAIs */
e1ap_net_config_t
*
e1ap_nc
=
&
E1AP_REGISTER_REQ
(
msgConfig
).
net_config
;
e1ap_nc
->
remotePortF1U
=
*
(
GNBParamList
.
paramarray
[
0
][
GNB_REMOTE_S_PORTD_IDX
].
uptr
);
...
...
openair2/RRC/NR/rrc_gNB_cuup.c
View file @
7d37143b
...
...
@@ -30,7 +30,7 @@ int rrc_gNB_process_e1_setup_req(e1ap_setup_req_t *req)
for
(
int
i
=
0
;
i
<
req
->
supported_plmns
;
i
++
)
{
PLMN_ID_t
*
id
=
&
req
->
plmn
s
[
i
]
;
PLMN_ID_t
*
id
=
&
req
->
plmn
[
i
].
id
;
if
(
rrc
->
configuration
.
mcc
[
i
]
!=
id
->
mcc
||
rrc
->
configuration
.
mnc
[
i
]
!=
id
->
mnc
)
{
LOG_E
(
NR_RRC
,
"PLMNs received from CUUP (mcc:%d, mnc:%d) did not match with PLMNs in RRC (mcc:%d, mnc:%d)
\n
"
,
...
...
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