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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
cdd58ab9
Commit
cdd58ab9
authored
Aug 19, 2022
by
Sakthivel Velumani
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved DRB config out of RRCReconfig complete
Monolithic and F1 split works
parent
61d66e49
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
144 additions
and
77 deletions
+144
-77
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+136
-76
openair2/RRC/NR/rrc_gNB_NGAP.c
openair2/RRC/NR/rrc_gNB_NGAP.c
+8
-1
No files found.
openair2/RRC/NR/rrc_gNB.c
View file @
cdd58ab9
...
@@ -752,15 +752,9 @@ rrc_gNB_generate_defaultRRCReconfiguration(
...
@@ -752,15 +752,9 @@ rrc_gNB_generate_defaultRRCReconfiguration(
}
}
}
}
//-----------------------------------------------------------------------------
void
fill_DRB_configList
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
void
rrc_gNB_ue_context_t
*
ue_context_pP
)
{
rrc_gNB_generate_dedicatedRRCReconfiguration
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
rrc_gNB_ue_context_t
*
ue_context_pP
,
NR_CellGroupConfig_t
*
cell_groupConfig_from_DU
)
//-----------------------------------------------------------------------------
{
gNB_RRC_INST
*
rrc
=
RC
.
nrrrc
[
ctxt_pP
->
module_id
];
gNB_RRC_INST
*
rrc
=
RC
.
nrrrc
[
ctxt_pP
->
module_id
];
NR_DRB_ToAddMod_t
*
DRB_config
=
NULL
;
NR_DRB_ToAddMod_t
*
DRB_config
=
NULL
;
NR_SRB_ToAddMod_t
*
SRB2_config
=
NULL
;
NR_SRB_ToAddMod_t
*
SRB2_config
=
NULL
;
...
@@ -769,18 +763,11 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
...
@@ -769,18 +763,11 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
NR_DRB_ToAddModList_t
**
DRB_configList2
=
NULL
;
NR_DRB_ToAddModList_t
**
DRB_configList2
=
NULL
;
NR_SRB_ToAddModList_t
**
SRB_configList2
=
NULL
;
NR_SRB_ToAddModList_t
**
SRB_configList2
=
NULL
;
NR_SRB_ToAddModList_t
*
SRB_configList
=
ue_context_pP
->
ue_context
.
SRB_configList
;
NR_SRB_ToAddModList_t
*
SRB_configList
=
ue_context_pP
->
ue_context
.
SRB_configList
;
struct
NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList
*
dedicatedNAS_MessageList
=
NULL
;
NR_DedicatedNAS_Message_t
*
dedicatedNAS_Message
=
NULL
;
uint8_t
buffer
[
RRC_BUF_SIZE
];
uint16_t
size
;
int
qos_flow_index
=
0
;
int
qos_flow_index
=
0
;
int
pdu_sessions_done
=
0
;
int
pdu_sessions_done
=
0
;
int
i
;
int
i
;
uint8_t
drb_id_to_setup_start
=
1
;
uint8_t
drb_id_to_setup_start
=
1
;
uint8_t
nb_drb_to_setup
=
0
;
uint8_t
nb_drb_to_setup
=
0
;
long
drb_priority
[
1
]
=
{
13
};
// For now, we assume only one drb per pdu sessions with a default preiority (will be dynamique in future)
NR_CellGroupConfig_t
*
cellGroupConfig
=
NULL
;
uint8_t
xid
=
rrc_gNB_get_next_transaction_identifier
(
ctxt_pP
->
module_id
);
uint8_t
xid
=
rrc_gNB_get_next_transaction_identifier
(
ctxt_pP
->
module_id
);
...
@@ -809,8 +796,6 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
...
@@ -809,8 +796,6 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
*
DRB_configList2
=
CALLOC
(
1
,
sizeof
(
**
DRB_configList2
));
*
DRB_configList2
=
CALLOC
(
1
,
sizeof
(
**
DRB_configList2
));
memset
(
*
DRB_configList2
,
0
,
sizeof
(
**
DRB_configList2
));
memset
(
*
DRB_configList2
,
0
,
sizeof
(
**
DRB_configList2
));
dedicatedNAS_MessageList
=
CALLOC
(
1
,
sizeof
(
struct
NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList
));
for
(
i
=
0
;
i
<
ue_context_pP
->
ue_context
.
setup_pdu_sessions
;
i
++
)
{
for
(
i
=
0
;
i
<
ue_context_pP
->
ue_context
.
setup_pdu_sessions
;
i
++
)
{
if
(
pdu_sessions_done
>=
ue_context_pP
->
ue_context
.
nb_of_pdusessions
)
{
if
(
pdu_sessions_done
>=
ue_context_pP
->
ue_context
.
nb_of_pdusessions
)
{
break
;
break
;
...
@@ -913,6 +898,36 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
...
@@ -913,6 +898,36 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
ue_context_pP
->
ue_context
.
pduSession
[
i
].
status
=
PDU_SESSION_STATUS_DONE
;
ue_context_pP
->
ue_context
.
pduSession
[
i
].
status
=
PDU_SESSION_STATUS_DONE
;
ue_context_pP
->
ue_context
.
pduSession
[
i
].
xid
=
xid
;
ue_context_pP
->
ue_context
.
pduSession
[
i
].
xid
=
xid
;
}
}
//-----------------------------------------------------------------------------
void
rrc_gNB_generate_dedicatedRRCReconfiguration
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
rrc_gNB_ue_context_t
*
ue_context_pP
,
NR_CellGroupConfig_t
*
cell_groupConfig_from_DU
)
//-----------------------------------------------------------------------------
{
gNB_RRC_INST
*
rrc
=
RC
.
nrrrc
[
ctxt_pP
->
module_id
];
long
drb_priority
[
1
]
=
{
13
};
// For now, we assume only one drb per pdu sessions with a default preiority (will be dynamique in future)
NR_CellGroupConfig_t
*
cellGroupConfig
=
NULL
;
uint8_t
buffer
[
RRC_BUF_SIZE
];
uint16_t
size
;
int
xid
=
-
1
;
int
drb_id_to_setup_start
=
1
;
NR_DRB_ToAddModList_t
*
DRB_configList
=
ue_context_pP
->
ue_context
.
DRB_configList
;
int
nb_drb_to_setup
=
DRB_configList
->
list
.
count
;
struct
NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList
*
dedicatedNAS_MessageList
=
NULL
;
NR_DedicatedNAS_Message_t
*
dedicatedNAS_Message
=
NULL
;
dedicatedNAS_MessageList
=
CALLOC
(
1
,
sizeof
(
struct
NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList
));
for
(
int
i
=
0
;
i
<
nb_drb_to_setup
;
i
++
)
{
NR_DRB_ToAddMod_t
*
DRB_config
=
DRB_configList
->
list
.
array
[
i
];
if
(
drb_id_to_setup_start
==
1
)
drb_id_to_setup_start
=
DRB_config
->
drb_Identity
;
if
(
ue_context_pP
->
ue_context
.
pduSession
[
i
].
param
.
nas_pdu
.
buffer
!=
NULL
)
{
if
(
ue_context_pP
->
ue_context
.
pduSession
[
i
].
param
.
nas_pdu
.
buffer
!=
NULL
)
{
dedicatedNAS_Message
=
CALLOC
(
1
,
sizeof
(
NR_DedicatedNAS_Message_t
));
dedicatedNAS_Message
=
CALLOC
(
1
,
sizeof
(
NR_DedicatedNAS_Message_t
));
...
@@ -927,6 +942,8 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
...
@@ -927,6 +942,8 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
// TODO
// TODO
LOG_E
(
NR_RRC
,
"no NAS info (pdusession id %d)
\n
"
,
i
);
LOG_E
(
NR_RRC
,
"no NAS info (pdusession id %d)
\n
"
,
i
);
}
}
xid
=
ue_context_pP
->
ue_context
.
pduSession
[
i
].
xid
;
}
}
/* If list is empty free the list and reset the address */
/* If list is empty free the list and reset the address */
...
@@ -947,10 +964,14 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
...
@@ -947,10 +964,14 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
cellGroupConfig
=
cell_groupConfig_from_DU
;
cellGroupConfig
=
cell_groupConfig_from_DU
;
}
}
AssertFatal
(
xid
>
-
1
,
"Invalid xid %d. No PDU sessions setup to configure.
\n
"
,
xid
);
NR_SRB_ToAddModList_t
*
SRB_configList2
=
NULL
;
SRB_configList2
=
ue_context_pP
->
ue_context
.
SRB_configList2
[
xid
];
size
=
do_RRCReconfiguration
(
ctxt_pP
,
buffer
,
sizeof
(
buffer
),
size
=
do_RRCReconfiguration
(
ctxt_pP
,
buffer
,
sizeof
(
buffer
),
xid
,
xid
,
*
SRB_configList2
,
SRB_configList2
,
*
DRB_configList
,
DRB_configList
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
...
@@ -964,7 +985,7 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
...
@@ -964,7 +985,7 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
LOG_DUMPMSG
(
NR_RRC
,
DEBUG_RRC
,(
char
*
)
buffer
,
size
,
"[MSG] RRC Reconfiguration
\n
"
);
LOG_DUMPMSG
(
NR_RRC
,
DEBUG_RRC
,(
char
*
)
buffer
,
size
,
"[MSG] RRC Reconfiguration
\n
"
);
/* Free all NAS PDUs */
/* Free all NAS PDUs */
for
(
i
=
0
;
i
<
ue_context_pP
->
ue_context
.
nb_of_pdusessions
;
i
++
)
{
for
(
i
nt
i
=
0
;
i
<
ue_context_pP
->
ue_context
.
nb_of_pdusessions
;
i
++
)
{
if
(
ue_context_pP
->
ue_context
.
pduSession
[
i
].
param
.
nas_pdu
.
buffer
!=
NULL
)
{
if
(
ue_context_pP
->
ue_context
.
pduSession
[
i
].
param
.
nas_pdu
.
buffer
!=
NULL
)
{
/* Free the NAS PDU buffer and invalidate it */
/* Free the NAS PDU buffer and invalidate it */
free
(
ue_context_pP
->
ue_context
.
pduSession
[
i
].
param
.
nas_pdu
.
buffer
);
free
(
ue_context_pP
->
ue_context
.
pduSession
[
i
].
param
.
nas_pdu
.
buffer
);
...
@@ -1289,64 +1310,104 @@ rrc_gNB_generate_dedicatedRRCReconfiguration_release(
...
@@ -1289,64 +1310,104 @@ rrc_gNB_generate_dedicatedRRCReconfiguration_release(
}
}
}
}
//-----------------------------------------------------------------------------
int
drb_config_gtpu_create
(
const
protocol_ctxt_t
*
const
ctxt_p
,
/*
rrc_gNB_ue_context_t
*
ue_context_p
,
* Process the RRC Reconfiguration Complete from the UE
e1ap_bearer_setup_req_t
*
req
,
*/
NR_DRB_ToAddModList_t
*
DRB_configList
,
void
NR_SRB_ToAddModList_t
*
SRB_configList
,
rrc_gNB_process_RRCReconfigurationComplete
(
instance_t
instance
)
{
const
protocol_ctxt_t
*
const
ctxt_pP
,
rrc_gNB_ue_context_t
*
ue_context_pP
,
gtpv1u_gnb_create_tunnel_req_t
create_tunnel_req
=
{
0
};
const
uint8_t
xid
gtpv1u_gnb_create_tunnel_resp_t
create_tunnel_resp
=
{
0
};
)
{
for
(
int
i
=
0
;
i
<
ue_context_p
->
ue_context
.
nb_of_pdusessions
;
i
++
)
{
int
drb_id
;
pdu_session_param_t
*
pdu
=
ue_context_p
->
ue_context
.
pduSession
+
i
;
create_tunnel_req
.
pdusession_id
[
i
]
=
pdu
->
param
.
pdusession_id
;
create_tunnel_req
.
incoming_rb_id
[
i
]
=
i
+
1
;
create_tunnel_req
.
outgoing_qfi
[
i
]
=
req
->
pduSession
[
i
].
DRBnGRanList
[
0
].
qosFlows
[
0
].
id
;
memcpy
(
&
create_tunnel_req
.
dst_addr
[
i
].
buffer
,
&
pdu
->
param
.
upf_addr
.
buffer
,
sizeof
(
uint8_t
)
*
20
);
create_tunnel_req
.
dst_addr
[
i
].
length
=
pdu
->
param
.
upf_addr
.
length
;
create_tunnel_req
.
outgoing_teid
[
i
]
=
pdu
->
param
.
gtp_teid
;
}
create_tunnel_req
.
num_tunnels
=
ue_context_p
->
ue_context
.
nb_of_pdusessions
;
create_tunnel_req
.
ue_id
=
ue_context_p
->
ue_context
.
rnti
;
int
ret
=
gtpv1u_create_ngu_tunnel
(
instance
,
&
create_tunnel_req
,
&
create_tunnel_resp
);
if
(
ret
!=
0
)
{
LOG_E
(
NR_RRC
,
"rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ : gtpv1u_create_ngu_tunnel failed,start to release UE rnti %ld
\n
"
,
create_tunnel_req
.
ue_id
);
return
ret
;
}
nr_rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP
(
ctxt_p
,
&
create_tunnel_resp
);
uint8_t
*
kRRCenc
=
NULL
;
uint8_t
*
kRRCenc
=
NULL
;
uint8_t
*
kRRCint
=
NULL
;
uint8_t
*
kRRCint
=
NULL
;
uint8_t
*
kUPenc
=
NULL
;
uint8_t
*
kUPenc
=
NULL
;
uint8_t
*
kUPint
=
NULL
;
uint8_t
*
kUPint
=
NULL
;
NR_DRB_ToAddModList_t
*
DRB_configList
=
ue_context_pP
->
ue_context
.
DRB_configList2
[
xid
];
NR_SRB_ToAddModList_t
*
SRB_configList
=
ue_context_pP
->
ue_context
.
SRB_configList2
[
xid
];
NR_DRB_ToReleaseList_t
*
DRB_Release_configList2
=
ue_context_pP
->
ue_context
.
DRB_Release_configList2
[
xid
];
NR_DRB_Identity_t
*
drb_id_p
=
NULL
;
// uint8_t nr_DRB2LCHAN[8];
ue_context_pP
->
ue_context
.
ue_reestablishment_timer
=
0
;
/* Derive the keys from kgnb */
/* Derive the keys from kgnb */
if
(
DRB_configList
!=
NULL
)
{
if
(
DRB_configList
!=
NULL
)
{
nr_derive_key_up_enc
(
ue_context_p
P
->
ue_context
.
ciphering_algorithm
,
nr_derive_key_up_enc
(
ue_context_p
->
ue_context
.
ciphering_algorithm
,
ue_context_p
P
->
ue_context
.
kgnb
,
ue_context_p
->
ue_context
.
kgnb
,
&
kUPenc
);
&
kUPenc
);
nr_derive_key_up_int
(
ue_context_p
P
->
ue_context
.
integrity_algorithm
,
nr_derive_key_up_int
(
ue_context_p
->
ue_context
.
integrity_algorithm
,
ue_context_p
P
->
ue_context
.
kgnb
,
ue_context_p
->
ue_context
.
kgnb
,
&
kUPint
);
&
kUPint
);
}
}
nr_derive_key_rrc_enc
(
ue_context_p
P
->
ue_context
.
ciphering_algorithm
,
nr_derive_key_rrc_enc
(
ue_context_p
->
ue_context
.
ciphering_algorithm
,
ue_context_p
P
->
ue_context
.
kgnb
,
ue_context_p
->
ue_context
.
kgnb
,
&
kRRCenc
);
&
kRRCenc
);
nr_derive_key_rrc_int
(
ue_context_p
P
->
ue_context
.
integrity_algorithm
,
nr_derive_key_rrc_int
(
ue_context_p
->
ue_context
.
integrity_algorithm
,
ue_context_p
P
->
ue_context
.
kgnb
,
ue_context_p
->
ue_context
.
kgnb
,
&
kRRCint
);
&
kRRCint
);
/* Refresh SRBs/DRBs */
/* Refresh SRBs/DRBs */
LOG_D
(
NR_RRC
,
"Configuring PDCP DRBs/SRBs for UE %x
\n
"
,
ue_context_p
P
->
ue_context
.
rnti
);
LOG_D
(
NR_RRC
,
"Configuring PDCP DRBs/SRBs for UE %x
\n
"
,
ue_context_p
->
ue_context
.
rnti
);
nr_pdcp_add_srbs
(
ctxt_p
P
->
enb_flag
,
ctxt_pP
->
rnti
,
nr_pdcp_add_srbs
(
ctxt_p
->
enb_flag
,
ctxt_p
->
rnti
,
SRB_configList
,
SRB_configList
,
(
ue_context_p
P
->
ue_context
.
integrity_algorithm
<<
4
)
(
ue_context_p
->
ue_context
.
integrity_algorithm
<<
4
)
|
ue_context_p
P
->
ue_context
.
ciphering_algorithm
,
|
ue_context_p
->
ue_context
.
ciphering_algorithm
,
kRRCenc
,
kRRCenc
,
kRRCint
);
kRRCint
);
nr_pdcp_add_drbs
(
ctxt_p
P
->
enb_flag
,
ctxt_pP
->
rnti
,
nr_pdcp_add_drbs
(
ctxt_p
->
enb_flag
,
ctxt_p
->
rnti
,
DRB_configList
,
DRB_configList
,
(
ue_context_p
P
->
ue_context
.
integrity_algorithm
<<
4
)
(
ue_context_p
->
ue_context
.
integrity_algorithm
<<
4
)
|
ue_context_p
P
->
ue_context
.
ciphering_algorithm
,
|
ue_context_p
->
ue_context
.
ciphering_algorithm
,
kUPenc
,
kUPenc
,
kUPint
,
kUPint
,
get_softmodem_params
()
->
sa
?
ue_context_pP
->
ue_context
.
masterCellGroup
->
rlc_BearerToAddModList
:
NULL
);
get_softmodem_params
()
->
sa
?
ue_context_p
->
ue_context
.
masterCellGroup
->
rlc_BearerToAddModList
:
NULL
);
return
ret
;
}
//-----------------------------------------------------------------------------
/*
* Process the RRC Reconfiguration Complete from the UE
*/
void
rrc_gNB_process_RRCReconfigurationComplete
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
rrc_gNB_ue_context_t
*
ue_context_pP
,
const
uint8_t
xid
)
{
int
drb_id
;
NR_DRB_ToAddModList_t
*
DRB_configList
=
ue_context_pP
->
ue_context
.
DRB_configList2
[
xid
];
NR_SRB_ToAddModList_t
*
SRB_configList
=
ue_context_pP
->
ue_context
.
SRB_configList2
[
xid
];
NR_DRB_ToReleaseList_t
*
DRB_Release_configList2
=
ue_context_pP
->
ue_context
.
DRB_Release_configList2
[
xid
];
NR_DRB_Identity_t
*
drb_id_p
=
NULL
;
// uint8_t nr_DRB2LCHAN[8];
ue_context_pP
->
ue_context
.
ue_reestablishment_timer
=
0
;
/* Refresh SRBs/DRBs */
/* Refresh SRBs/DRBs */
if
(
!
NODE_IS_CU
(
RC
.
nrrrc
[
ctxt_pP
->
module_id
]
->
node_type
))
{
if
(
!
NODE_IS_CU
(
RC
.
nrrrc
[
ctxt_pP
->
module_id
]
->
node_type
))
{
...
@@ -3523,6 +3584,7 @@ static void rrc_CU_process_ue_context_setup_response(MessageDef *msg_p, const ch
...
@@ -3523,6 +3584,7 @@ static void rrc_CU_process_ue_context_setup_response(MessageDef *msg_p, const ch
xer_fprint
(
stdout
,
&
asn_DEF_NR_CellGroupConfig
,
ue_context_p
->
ue_context
.
masterCellGroup
);
xer_fprint
(
stdout
,
&
asn_DEF_NR_CellGroupConfig
,
ue_context_p
->
ue_context
.
masterCellGroup
);
if
(
ue_context_p
->
ue_context
.
established_pdu_sessions_flag
==
1
)
{
if
(
ue_context_p
->
ue_context
.
established_pdu_sessions_flag
==
1
)
{
fill_DRB_configList
(
&
ctxt
,
ue_context_p
);
rrc_gNB_generate_dedicatedRRCReconfiguration
(
&
ctxt
,
ue_context_p
,
cellGroupConfig
);
rrc_gNB_generate_dedicatedRRCReconfiguration
(
&
ctxt
,
ue_context_p
,
cellGroupConfig
);
}
else
{
}
else
{
rrc_gNB_generate_defaultRRCReconfiguration
(
&
ctxt
,
ue_context_p
);
rrc_gNB_generate_defaultRRCReconfiguration
(
&
ctxt
,
ue_context_p
);
...
@@ -3877,7 +3939,7 @@ int rrc_gNB_process_e1_setup_req(e1ap_setup_req_t *req, instance_t instance) {
...
@@ -3877,7 +3939,7 @@ int rrc_gNB_process_e1_setup_req(e1ap_setup_req_t *req, instance_t instance) {
return
0
;
return
0
;
}
}
void
fill_DRB_configList
(
NR_DRB_ToAddModList_t
*
DRB_configList
,
pdu_session_to_setup_t
*
pdu
)
{
void
fill_DRB_configList
_e1
(
NR_DRB_ToAddModList_t
*
DRB_configList
,
pdu_session_to_setup_t
*
pdu
)
{
for
(
int
i
=
0
;
i
<
pdu
->
numDRB2Setup
;
i
++
)
{
for
(
int
i
=
0
;
i
<
pdu
->
numDRB2Setup
;
i
++
)
{
DRB_nGRAN_to_setup_t
*
drb
=
pdu
->
DRBnGRanList
+
i
;
DRB_nGRAN_to_setup_t
*
drb
=
pdu
->
DRBnGRanList
+
i
;
...
@@ -3944,7 +4006,7 @@ void fill_DRB_configList(NR_DRB_ToAddModList_t *DRB_configList, pdu_session_to_s
...
@@ -3944,7 +4006,7 @@ void fill_DRB_configList(NR_DRB_ToAddModList_t *DRB_configList, pdu_session_to_s
}
}
}
}
int
drb_config_gtpu_create
(
e1ap_bearer_setup_req_t
*
req
,
int
drb_config_gtpu_create
_e1
(
e1ap_bearer_setup_req_t
*
req
,
gtpv1u_gnb_create_tunnel_req_t
*
create_tunnel_req
,
gtpv1u_gnb_create_tunnel_req_t
*
create_tunnel_req
,
gtpv1u_gnb_create_tunnel_resp_t
*
create_tunnel_resp
,
gtpv1u_gnb_create_tunnel_resp_t
*
create_tunnel_resp
,
instance_t
instance
)
{
instance_t
instance
)
{
...
@@ -3959,7 +4021,7 @@ int drb_config_gtpu_create(e1ap_bearer_setup_req_t *req,
...
@@ -3959,7 +4021,7 @@ int drb_config_gtpu_create(e1ap_bearer_setup_req_t *req,
sizeof
(
uint8_t
)
*
4
);
sizeof
(
uint8_t
)
*
4
);
create_tunnel_req
->
dst_addr
[
i
].
length
=
32
;
// 8bits * 4bytes
create_tunnel_req
->
dst_addr
[
i
].
length
=
32
;
// 8bits * 4bytes
create_tunnel_req
->
outgoing_teid
[
i
]
=
pdu
->
teId
;
create_tunnel_req
->
outgoing_teid
[
i
]
=
pdu
->
teId
;
fill_DRB_configList
(
&
DRB_configList
,
pdu
);
fill_DRB_configList
_e1
(
&
DRB_configList
,
pdu
);
}
}
create_tunnel_req
->
num_tunnels
=
req
->
numPDUSessions
;
create_tunnel_req
->
num_tunnels
=
req
->
numPDUSessions
;
create_tunnel_req
->
ue_id
=
(
req
->
gNB_cu_cp_ue_id
&
0xFFFF
);
create_tunnel_req
->
ue_id
=
(
req
->
gNB_cu_cp_ue_id
&
0xFFFF
);
...
@@ -4000,7 +4062,7 @@ int rrc_gNB_process_e1_bearer_context_setup_req(e1ap_bearer_setup_req_t *req, in
...
@@ -4000,7 +4062,7 @@ int rrc_gNB_process_e1_bearer_context_setup_req(e1ap_bearer_setup_req_t *req, in
gtpv1u_gnb_create_tunnel_req_t
create_tunnel_req
=
{
0
};
gtpv1u_gnb_create_tunnel_req_t
create_tunnel_req
=
{
0
};
gtpv1u_gnb_create_tunnel_resp_t
create_tunnel_resp
=
{
0
};
gtpv1u_gnb_create_tunnel_resp_t
create_tunnel_resp
=
{
0
};
int
ret
=
drb_config_gtpu_create
(
req
,
&
create_tunnel_req
,
&
create_tunnel_resp
,
instance
);
int
ret
=
drb_config_gtpu_create
_e1
(
req
,
&
create_tunnel_req
,
&
create_tunnel_resp
,
instance
);
MessageDef
*
message_p
;
MessageDef
*
message_p
;
message_p
=
itti_alloc_new_message
(
TASK_RRC_GNB
,
instance
,
E1AP_BEARER_CONTEXT_SETUP_RESP
);
message_p
=
itti_alloc_new_message
(
TASK_RRC_GNB
,
instance
,
E1AP_BEARER_CONTEXT_SETUP_RESP
);
...
@@ -4092,22 +4154,20 @@ void prepare_and_send_ue_context_modification_f1(rrc_gNB_ue_context_t *ue_contex
...
@@ -4092,22 +4154,20 @@ void prepare_and_send_ue_context_modification_f1(rrc_gNB_ue_context_t *ue_contex
void
bearer_context_setup_direct
(
e1ap_bearer_setup_req_t
*
req
,
instance_t
instance
)
{
void
bearer_context_setup_direct
(
e1ap_bearer_setup_req_t
*
req
,
instance_t
instance
)
{
gtpv1u_gnb_create_tunnel_req_t
create_tunnel_req
=
{
0
};
gtpv1u_gnb_create_tunnel_resp_t
create_tunnel_resp
=
{
0
};
uint16_t
ue_initial_id
=
0
;
// Making an invalid UE initial ID
uint16_t
ue_initial_id
=
0
;
// Making an invalid UE initial ID
rrc_gNB_ue_context_t
*
ue_context_p
=
rrc_gNB_get_ue_context_from_ngap_ids
(
instance
,
ue_initial_id
,
req
->
gNB_cu_cp_ue_id
);
rrc_gNB_ue_context_t
*
ue_context_p
=
rrc_gNB_get_ue_context_from_ngap_ids
(
instance
,
ue_initial_id
,
req
->
gNB_cu_cp_ue_id
);
protocol_ctxt_t
ctxt
=
{
0
};
protocol_ctxt_t
ctxt
=
{
0
};
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
0
,
GNB_FLAG_YES
,
ue_context_p
->
ue_context
.
rnti
,
0
,
0
,
0
);
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
0
,
GNB_FLAG_YES
,
ue_context_p
->
ue_context
.
rnti
,
0
,
0
,
0
);
int
ret
=
drb_config_gtpu_create
(
req
,
&
create_tunnel_req
,
&
create_tunnel_resp
,
instance
);
fill_DRB_configList
(
&
ctxt
,
ue_context_p
);
int
ret
=
drb_config_gtpu_create
(
&
ctxt
,
ue_context_p
,
req
,
ue_context_p
->
ue_context
.
DRB_configList
,
ue_context_p
->
ue_context
.
SRB_configList
,
instance
);
if
(
ret
<
0
)
AssertFatal
(
false
,
"Unable to configure DRB or to create GTP Tunnel
\n
"
);
if
(
ret
<
0
)
AssertFatal
(
false
,
"Unable to configure DRB or to create GTP Tunnel
\n
"
);
nr_rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP
(
&
ctxt
,
&
create_tunnel_resp
);
ue_context_p
->
ue_context
.
setup_pdu_sessions
+=
create_tunnel_resp
.
num_tunnels
;
if
(
!
NODE_IS_CU
(
RC
.
nrrrc
[
ctxt
.
module_id
]
->
node_type
)){
if
(
!
NODE_IS_CU
(
RC
.
nrrrc
[
ctxt
.
module_id
]
->
node_type
)){
rrc_gNB_generate_dedicatedRRCReconfiguration
(
&
ctxt
,
ue_context_p
,
NULL
);
rrc_gNB_generate_dedicatedRRCReconfiguration
(
&
ctxt
,
ue_context_p
,
NULL
);
}
else
{
}
else
{
...
...
openair2/RRC/NR/rrc_gNB_NGAP.c
View file @
cdd58ab9
...
@@ -1018,10 +1018,17 @@ rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(
...
@@ -1018,10 +1018,17 @@ rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(
msg
->
pdusession_setup_params
[
i
].
upf_addr
.
buffer
,
msg
->
pdusession_setup_params
[
i
].
upf_addr
.
buffer
,
sizeof
(
uint8_t
)
*
4
);
sizeof
(
uint8_t
)
*
4
);
ue_context_p
->
ue_context
.
pduSession
[
i
].
param
=
msg
->
pdusession_setup_params
[
i
];
ue_context_p
->
ue_context
.
nb_of_pdusessions
=
msg
->
nb_pdusessions_tosetup
;
ue_context_p
->
ue_context
.
gNB_ue_ngap_id
=
msg
->
gNB_ue_ngap_id
;
ue_context_p
->
ue_context
.
amf_ue_ngap_id
=
msg
->
amf_ue_ngap_id
;
pdu
->
numDRB2Setup
=
1
;
// One DRB per PDU Session. TODO: Remove hardcoding
pdu
->
numDRB2Setup
=
1
;
// One DRB per PDU Session. TODO: Remove hardcoding
ue_context_p
->
ue_context
.
setup_pdu_sessions
+=
pdu
->
numDRB2Setup
;
for
(
int
j
=
0
;
j
<
pdu
->
numDRB2Setup
;
j
++
)
{
for
(
int
j
=
0
;
j
<
pdu
->
numDRB2Setup
;
j
++
)
{
DRB_nGRAN_to_setup_t
*
drb
=
pdu
->
DRBnGRanList
+
j
;
DRB_nGRAN_to_setup_t
*
drb
=
pdu
->
DRBnGRanList
+
j
;
drb
->
id
=
i
+
j
+
1
;
drb
->
id
=
i
+
j
+
1
;
drb
->
defaultDRB
=
E1AP_DefaultDRB_true
;
drb
->
defaultDRB
=
E1AP_DefaultDRB_true
;
drb
->
sDAP_Header_UL
=
!
(
rrc
->
configuration
.
enable_sdap
);
drb
->
sDAP_Header_UL
=
!
(
rrc
->
configuration
.
enable_sdap
);
...
...
FANG WANG
@wf
mentioned in commit
553f1d1a
·
Feb 11, 2023
mentioned in commit
553f1d1a
mentioned in commit 553f1d1a52845911be4ba61ec2bcc5c60ad42ae7
Toggle commit list
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