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
spbro
OpenXG-RAN
Commits
c1aec063
Commit
c1aec063
authored
Mar 07, 2023
by
laurent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test with commercial UE and 2 pdusessions
parent
1ba3b13a
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
313 additions
and
411 deletions
+313
-411
openair2/RRC/NR/cucp_cuup_direct.c
openair2/RRC/NR/cucp_cuup_direct.c
+23
-33
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+283
-368
openair2/RRC/NR/rrc_gNB_NGAP.c
openair2/RRC/NR/rrc_gNB_NGAP.c
+3
-5
openair2/RRC/NR/rrc_gNB_UE_context.c
openair2/RRC/NR/rrc_gNB_UE_context.c
+2
-4
openair2/RRC/NR/rrc_gNB_UE_context.h
openair2/RRC/NR/rrc_gNB_UE_context.h
+1
-1
openair2/RRC/NR/rrc_gNB_radio_bearers.c
openair2/RRC/NR/rrc_gNB_radio_bearers.c
+1
-0
No files found.
openair2/RRC/NR/cucp_cuup_direct.c
View file @
c1aec063
...
...
@@ -107,9 +107,10 @@ static int drb_config_gtpu_create(const protocol_ctxt_t *const ctxt_p,
gtpv1u_gnb_create_tunnel_req_t
create_tunnel_req
=
{
0
};
gtpv1u_gnb_create_tunnel_resp_t
create_tunnel_resp
=
{
0
};
gNB_RRC_UE_t
*
UE
=
&
ue_context_p
->
ue_context
;
LOG_W
(
NR_RRC
,
"recreate existing tunnels, while adding new ones
\n
"
);
for
(
int
i
=
0
;
i
<
ue_context_p
->
ue_context
.
nb_of_pdusessions
;
i
++
)
{
rrc_pdu_session_param_t
*
pdu
=
ue_context_p
->
ue_context
.
pduSession
+
i
;
for
(
int
i
=
0
;
i
<
UE
->
nb_of_pdusessions
;
i
++
)
{
rrc_pdu_session_param_t
*
pdu
=
UE
->
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
;
...
...
@@ -117,8 +118,8 @@ static int drb_config_gtpu_create(const protocol_ctxt_t *const ctxt_p,
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
;
create_tunnel_req
.
num_tunnels
=
UE
->
nb_of_pdusessions
;
create_tunnel_req
.
ue_id
=
UE
->
rnti
;
int
ret
=
gtpv1u_create_ngu_tunnel
(
getCxtE1
(
instance
)
->
gtpInstN3
,
&
create_tunnel_req
,
&
create_tunnel_resp
);
if
(
ret
!=
0
)
{
...
...
@@ -135,38 +136,26 @@ static int drb_config_gtpu_create(const protocol_ctxt_t *const ctxt_p,
uint8_t
*
kUPint
=
NULL
;
/* Derive the keys from kgnb */
if
(
DRB_configList
!=
NULL
)
{
nr_derive_key_up_enc
(
ue_context_p
->
ue_context
.
ciphering_algorithm
,
ue_context_p
->
ue_context
.
kgnb
,
&
kUPenc
);
nr_derive_key_up_int
(
ue_context_p
->
ue_context
.
integrity_algorithm
,
ue_context_p
->
ue_context
.
kgnb
,
&
kUPint
);
nr_derive_key_up_enc
(
UE
->
ciphering_algorithm
,
UE
->
kgnb
,
&
kUPenc
);
nr_derive_key_up_int
(
UE
->
integrity_algorithm
,
UE
->
kgnb
,
&
kUPint
);
}
nr_derive_key_rrc_enc
(
ue_context_p
->
ue_context
.
ciphering_algorithm
,
ue_context_p
->
ue_context
.
kgnb
,
&
kRRCenc
);
nr_derive_key_rrc_int
(
ue_context_p
->
ue_context
.
integrity_algorithm
,
ue_context_p
->
ue_context
.
kgnb
,
&
kRRCint
);
nr_derive_key_rrc_enc
(
UE
->
ciphering_algorithm
,
UE
->
kgnb
,
&
kRRCenc
);
nr_derive_key_rrc_int
(
UE
->
integrity_algorithm
,
UE
->
kgnb
,
&
kRRCint
);
/* Refresh SRBs/DRBs */
LOG_D
(
NR_RRC
,
"Configuring PDCP DRBs/SRBs for UE %x
\n
"
,
ue_context_p
->
ue_context
.
rnti
);
LOG_D
(
NR_RRC
,
"Configuring PDCP DRBs/SRBs for UE %x
\n
"
,
UE
->
rnti
);
nr_pdcp_add_srbs
(
ctxt_p
->
enb_flag
,
ctxt_p
->
rntiMaybeUEid
,
SRB_configList
,
(
ue_context_p
->
ue_context
.
integrity_algorithm
<<
4
)
|
ue_context_p
->
ue_context
.
ciphering_algorithm
,
kRRCenc
,
kRRCint
);
nr_pdcp_add_srbs
(
ctxt_p
->
enb_flag
,
ctxt_p
->
rntiMaybeUEid
,
SRB_configList
,
(
UE
->
integrity_algorithm
<<
4
)
|
UE
->
ciphering_algorithm
,
kRRCenc
,
kRRCint
);
nr_pdcp_add_drbs
(
ctxt_p
->
enb_flag
,
ctxt_p
->
rntiMaybeUEid
,
0
,
nr_pdcp_add_drbs
(
ctxt_p
->
enb_flag
,
ctxt_p
->
rntiMaybeUEid
,
0
,
DRB_configList
,
(
ue_context_p
->
ue_context
.
integrity_algorithm
<<
4
)
|
ue_context_p
->
ue_context
.
ciphering_algorithm
,
(
UE
->
integrity_algorithm
<<
4
)
|
UE
->
ciphering_algorithm
,
kUPenc
,
kUPint
,
get_softmodem_params
()
->
sa
?
ue_context_p
->
ue_context
.
masterCellGroup
->
rlc_BearerToAddModList
:
NULL
);
get_softmodem_params
()
->
sa
?
UE
->
masterCellGroup
->
rlc_BearerToAddModList
:
NULL
);
return
ret
;
}
...
...
@@ -188,16 +177,17 @@ static NR_SRB_ToAddModList_t **generateSRB2_confList(gNB_RRC_UE_t *ue, NR_SRB_To
}
static
void
cucp_cuup_bearer_context_setup_direct
(
e1ap_bearer_setup_req_t
*
const
req
,
instance_t
instance
)
{
rrc_gNB_ue_context_t
*
ue_context_p
=
rrc_gNB_get_ue_context
(
RC
.
nrrrc
[
instance
],
req
->
rnti
);
gNB_RRC_UE_t
*
UE
=
&
ue_context_p
->
ue_context
;
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
->
rnti
,
0
,
0
,
0
);
fill_DRB_configList
(
&
ctxt
,
ue_context_p
);
gNB_RRC_INST
*
rrc
=
RC
.
nrrrc
[
ctxt
.
module_id
];
// Fixme: xid not random, but almost!
NR_SRB_ToAddModList_t
**
SRB_configList2
=
generateSRB2_confList
(
&
ue_context_p
->
ue_context
,
ue_context_p
->
ue_context
.
SRB_configList
,
ue_context_p
->
ue_context
.
pduSession
[
0
].
xid
);
NR_SRB_ToAddModList_t
**
SRB_configList2
=
generateSRB2_confList
(
UE
,
UE
->
SRB_configList
,
UE
->
pduSession
[
0
].
xid
);
// GTP tunnel for UL
int
ret
=
drb_config_gtpu_create
(
&
ctxt
,
ue_context_p
,
req
,
ue_context_p
->
ue_context
.
DRB_configList
,
*
SRB_configList2
,
rrc
->
e1_inst
);
int
ret
=
drb_config_gtpu_create
(
&
ctxt
,
ue_context_p
,
req
,
UE
->
DRB_configList
,
*
SRB_configList2
,
rrc
->
e1_inst
);
if
(
ret
<
0
)
AssertFatal
(
false
,
"Unable to configure DRB or to create GTP Tunnel
\n
"
);
if
(
!
NODE_IS_CU
(
RC
.
nrrrc
[
ctxt
.
module_id
]
->
node_type
))
{
...
...
@@ -208,7 +198,7 @@ static void cucp_cuup_bearer_context_setup_direct(e1ap_bearer_setup_req_t *const
in_addr_t
my_addr
=
inet_addr
(
RC
.
nrrrc
[
ctxt
.
module_id
]
->
eth_params_s
.
my_addr
);
instance_t
gtpInst
=
getCxt
(
CUtype
,
instance
)
->
gtpInst
;
// GTP tunnel for DL
fill_e1ap_bearer_setup_resp
(
&
resp
,
req
,
gtpInst
,
ue_context_p
->
ue_context
.
rnti
,
remote_port
,
my_addr
);
fill_e1ap_bearer_setup_resp
(
&
resp
,
req
,
gtpInst
,
UE
->
rnti
,
remote_port
,
my_addr
);
prepare_and_send_ue_context_modification_f1
(
ue_context_p
,
&
resp
);
}
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
c1aec063
This diff is collapsed.
Click to expand it.
openair2/RRC/NR/rrc_gNB_NGAP.c
View file @
c1aec063
...
...
@@ -714,7 +714,7 @@ rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP(
tmp
->
pdusession_id
,
tmp
->
gtp_teid
);
pdu_sessions_done
++
;
}
else
{
}
else
if
(
session
->
status
!=
PDU_SESSION_STATUS_ESTABLISHED
)
{
session
->
status
=
PDU_SESSION_STATUS_FAILED
;
resp
->
pdusessions_failed
[
pdu_sessions_failed
].
pdusession_id
=
session
->
param
.
pdusession_id
;
pdu_sessions_failed
++
;
...
...
@@ -772,6 +772,7 @@ void rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(MessageDef *msg_p, instance_t ins
for
(
int
i
=
0
;
i
<
msg
->
nb_pdusessions_tosetup
;
i
++
)
{
rrc_pdu_session_param_t
*
pduSession
=
find_pduSession
(
UE
,
msg
->
pdusession_setup_params
[
i
].
pdusession_id
,
true
);
pdusession_t
*
session
=
&
pduSession
->
param
;
LOG_I
(
NR_RRC
,
"Adding pdusession %d, total nb of sessions %d
\n
"
,
session
->
pdusession_id
,
UE
->
nb_of_pdusessions
);
session
->
pdusession_id
=
msg
->
pdusession_setup_params
[
i
].
pdusession_id
;
session
->
nas_pdu
=
msg
->
pdusession_setup_params
[
i
].
nas_pdu
;
session
->
pdusessionTransfer
=
msg
->
pdusession_setup_params
[
i
].
pdusessionTransfer
;
...
...
@@ -1091,10 +1092,7 @@ rrc_gNB_send_NGAP_PDUSESSION_MODIFY_RESP(
resp
->
nb_of_pdusessions_failed
=
pdu_sessions_failed
;
if
(
pdu_sessions_done
>
0
||
pdu_sessions_failed
>
0
)
{
LOG_D
(
NR_RRC
,
"NGAP_PDUSESSION_MODIFY_RESP: sending the message: nb_of_pdusessions %d, total pdu session %d
\n
"
,
ue_context_pP
->
ue_context
.
nb_of_modify_pdusessions
,
ue_context_pP
->
ue_context
.
nb_of_pdusessions
);
LOG_D
(
NR_RRC
,
"NGAP_PDUSESSION_MODIFY_RESP: sending the message: nb_of_pdusessions %d, total pdu session %d
\n
"
,
UE
->
nb_of_modify_pdusessions
,
UE
->
nb_of_pdusessions
);
itti_send_msg_to_task
(
TASK_NGAP
,
ctxt_pP
->
instance
,
msg_p
);
}
else
{
itti_free
(
ITTI_MSG_ORIGIN_ID
(
msg_p
),
msg_p
);
...
...
openair2/RRC/NR/rrc_gNB_UE_context.c
View file @
c1aec063
...
...
@@ -164,17 +164,15 @@ rrc_gNB_ue_context_t *rrc_gNB_ue_context_5g_s_tmsi_exist(gNB_RRC_INST *rrc_insta
RB_FOREACH
(
ue_context_p
,
rrc_nr_ue_tree_s
,
&
rrc_instance_pP
->
rrc_ue_head
)
{
LOG_I
(
NR_RRC
,
"Checking for UE 5G S-TMSI %ld: RNTI %04x
\n
"
,
s_TMSI
,
ue_context_p
->
ue_context
.
rnti
);
if
(
ue_context_p
->
ue_context
.
ng_5G_S_TMSI_Part1
==
s_TMSI
)
{
if
(
ue_context_p
->
ue_context
.
ng_5G_S_TMSI_Part1
==
s_TMSI
)
return
ue_context_p
;
}
}
return
NULL
;
}
//-----------------------------------------------------------------------------
// return a new ue context structure if ue_identityP, ctxt_pP->rnti not found in collection
rrc_gNB_ue_context_t
*
rrc_gNB_
get_next_fre
e_ue_context
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
gNB_RRC_INST
*
rrc_instance_pP
,
const
uint64_t
ue_identityP
)
rrc_gNB_ue_context_t
*
rrc_gNB_
creat
e_ue_context
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
gNB_RRC_INST
*
rrc_instance_pP
,
const
uint64_t
ue_identityP
)
//-----------------------------------------------------------------------------
{
rrc_gNB_ue_context_t
*
ue_context_p
=
rrc_gNB_get_ue_context
(
rrc_instance_pP
,
ctxt_pP
->
rntiMaybeUEid
);
...
...
openair2/RRC/NR/rrc_gNB_UE_context.h
View file @
c1aec063
...
...
@@ -50,6 +50,6 @@ rrc_gNB_ue_context_t* rrc_gNB_ue_context_random_exist(gNB_RRC_INST* rrc_instance
rrc_gNB_ue_context_t
*
rrc_gNB_ue_context_5g_s_tmsi_exist
(
gNB_RRC_INST
*
rrc_instance_pP
,
const
uint64_t
s_TMSI
);
rrc_gNB_ue_context_t
*
rrc_gNB_
get_next_fre
e_ue_context
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
gNB_RRC_INST
*
rrc_instance_pP
,
const
uint64_t
ue_identityP
);
rrc_gNB_ue_context_t
*
rrc_gNB_
creat
e_ue_context
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
gNB_RRC_INST
*
rrc_instance_pP
,
const
uint64_t
ue_identityP
);
#endif
openair2/RRC/NR/rrc_gNB_radio_bearers.c
View file @
c1aec063
...
...
@@ -28,6 +28,7 @@ rrc_pdu_session_param_t *find_pduSession(gNB_RRC_UE_t *ue, int id, bool create)
for
(
j
=
0
;
j
<
ue
->
nb_of_pdusessions
;
j
++
)
if
(
id
==
ue
->
pduSession
[
j
].
param
.
pdusession_id
)
break
;
printf
(
"%d XXXX %d
\n
"
,
j
,
ue
->
nb_of_pdusessions
);
if
(
j
==
ue
->
nb_of_pdusessions
&&
create
)
ue
->
nb_of_pdusessions
++
;
else
...
...
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