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
wangjie
OpenXG-RAN
Commits
ec48bb89
Commit
ec48bb89
authored
Dec 11, 2020
by
heshanyun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement rrcReestablishmentComplete
parent
547d7b01
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
424 additions
and
0 deletions
+424
-0
openair2/RRC/NR/nr_rrc_defs.h
openair2/RRC/NR/nr_rrc_defs.h
+2
-0
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+318
-0
openair2/RRC/NR/rrc_gNB_NGAP.h
openair2/RRC/NR/rrc_gNB_NGAP.h
+7
-0
openair3/GTPV1-U/gtpv1u_gNB.c
openair3/GTPV1-U/gtpv1u_gNB.c
+90
-0
openair3/GTPV1-U/gtpv1u_gNB_task.h
openair3/GTPV1-U/gtpv1u_gNB_task.h
+7
-0
No files found.
openair2/RRC/NR/nr_rrc_defs.h
View file @
ec48bb89
...
@@ -379,6 +379,8 @@ typedef struct gNB_RRC_UE_s {
...
@@ -379,6 +379,8 @@ typedef struct gNB_RRC_UE_s {
uint32_t
ue_reestablishment_timer_thres
;
uint32_t
ue_reestablishment_timer_thres
;
uint8_t
e_rab_release_command_flag
;
uint8_t
e_rab_release_command_flag
;
uint8_t
pdu_session_release_command_flag
;
uint8_t
pdu_session_release_command_flag
;
uint32_t
ue_rrc_inactivity_timer
;
int8_t
reestablishment_xid
;
//------------------------------------------------------------------------------//
//------------------------------------------------------------------------------//
NR_CellGroupId_t
cellGroupId
;
NR_CellGroupId_t
cellGroupId
;
struct
NR_SpCellConfig
*
spCellConfig
;
struct
NR_SpCellConfig
*
spCellConfig
;
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
ec48bb89
This diff is collapsed.
Click to expand it.
openair2/RRC/NR/rrc_gNB_NGAP.h
View file @
ec48bb89
...
@@ -156,4 +156,11 @@ rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE(
...
@@ -156,4 +156,11 @@ rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE(
uint8_t
xid
uint8_t
xid
);
);
void
nr_rrc_pdcp_config_security
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
rrc_gNB_ue_context_t
*
const
ue_context_pP
,
const
uint8_t
send_security_mode_command
);
#endif
#endif
openair3/GTPV1-U/gtpv1u_gNB.c
View file @
ec48bb89
...
@@ -551,6 +551,96 @@ gtpv1u_create_ngu_tunnel(
...
@@ -551,6 +551,96 @@ gtpv1u_create_ngu_tunnel(
return
ret
;
return
ret
;
}
}
int
gtpv1u_update_ngu_tunnel
(
const
instance_t
instanceP
,
const
gtpv1u_gnb_create_tunnel_req_t
*
const
create_tunnel_req_pP
,
const
rnti_t
prior_rnti
)
{
/* Local tunnel end-point identifier */
teid_t
ngu_teid
=
0
;
nr_gtpv1u_teid_data_t
*
gtpv1u_teid_data_p
=
NULL
;
nr_gtpv1u_ue_data_t
*
gtpv1u_ue_data_p
=
NULL
;
nr_gtpv1u_ue_data_t
*
gtpv1u_ue_data_new_p
=
NULL
;
//MessageDef *message_p = NULL;
hashtable_rc_t
hash_rc
=
HASH_TABLE_KEY_NOT_EXISTS
;
int
i
,
j
;
uint8_t
bearers_num
=
0
,
bearers_total
=
0
;
//-----------------------
// PDCP->GTPV1U mapping
//-----------------------
hash_rc
=
hashtable_get
(
RC
.
nr_gtpv1u_data_g
->
ue_mapping
,
prior_rnti
,
(
void
**
)
&
gtpv1u_ue_data_p
);
if
(
hash_rc
!=
HASH_TABLE_OK
)
{
LOG_E
(
GTPU
,
"Error get ue_mapping(rnti=%x) from GTPV1U hashtable error
\n
"
,
prior_rnti
);
return
-
1
;
}
gtpv1u_ue_data_new_p
=
calloc
(
1
,
sizeof
(
nr_gtpv1u_ue_data_t
));
memcpy
(
gtpv1u_ue_data_new_p
,
gtpv1u_ue_data_p
,
sizeof
(
nr_gtpv1u_ue_data_t
));
gtpv1u_ue_data_new_p
->
ue_id
=
create_tunnel_req_pP
->
rnti
;
hash_rc
=
hashtable_insert
(
RC
.
nr_gtpv1u_data_g
->
ue_mapping
,
create_tunnel_req_pP
->
rnti
,
gtpv1u_ue_data_new_p
);
//AssertFatal(hash_rc == HASH_TABLE_OK, "Error inserting ue_mapping in GTPV1U hashtable");
if
(
hash_rc
!=
HASH_TABLE_OK
)
{
LOG_E
(
GTPU
,
"Failed to insert ue_mapping(rnti=%x) in GTPV1U hashtable
\n
"
,
create_tunnel_req_pP
->
rnti
);
return
-
1
;
}
else
{
LOG_I
(
GTPU
,
"inserting ue_mapping(rnti=%x) in GTPV1U hashtable
\n
"
,
create_tunnel_req_pP
->
rnti
);
}
hash_rc
=
hashtable_remove
(
RC
.
nr_gtpv1u_data_g
->
ue_mapping
,
prior_rnti
);
LOG_I
(
GTPU
,
"hashtable_remove ue_mapping(rnti=%x) in GTPV1U hashtable
\n
"
,
prior_rnti
);
//-----------------------
// GTPV1U->PDCP mapping
//-----------------------
bearers_total
=
gtpv1u_ue_data_new_p
->
num_bearers
;
for
(
j
=
0
;
j
<
GTPV1U_MAX_BEARERS_ID
;
j
++
)
{
if
(
gtpv1u_ue_data_new_p
->
bearers
[
j
].
state
!=
BEARER_IN_CONFIG
)
continue
;
bearers_num
++
;
for
(
i
=
0
;
i
<
create_tunnel_req_pP
->
num_tunnels
;
i
++
)
{
if
(
j
==
(
create_tunnel_req_pP
->
pdusession_id
[
i
]
-
GTPV1U_BEARER_OFFSET
))
break
;
}
if
(
i
<
create_tunnel_req_pP
->
num_tunnels
)
{
ngu_teid
=
gtpv1u_ue_data_new_p
->
bearers
[
j
].
teid_gNB
;
hash_rc
=
hashtable_get
(
RC
.
nr_gtpv1u_data_g
->
teid_mapping
,
ngu_teid
,
(
void
**
)
&
gtpv1u_teid_data_p
);
if
(
hash_rc
==
HASH_TABLE_OK
)
{
gtpv1u_teid_data_p
->
ue_id
=
create_tunnel_req_pP
->
rnti
;
gtpv1u_teid_data_p
->
pdu_session_id
=
create_tunnel_req_pP
->
pdusession_id
[
i
];
LOG_I
(
GTPU
,
"updata teid_mapping te_id %u (prior_rnti %x rnti %x) in GTPV1U hashtable
\n
"
,
ngu_teid
,
prior_rnti
,
create_tunnel_req_pP
->
rnti
);
}
else
{
LOG_W
(
GTPU
,
"Error get teid mapping(s1u_teid=%u) from GTPV1U hashtable"
,
ngu_teid
);
}
}
else
{
ngu_teid
=
gtpv1u_ue_data_new_p
->
bearers
[
j
].
teid_gNB
;
hash_rc
=
hashtable_remove
(
RC
.
nr_gtpv1u_data_g
->
teid_mapping
,
ngu_teid
);
if
(
hash_rc
!=
HASH_TABLE_OK
)
{
LOG_D
(
GTPU
,
"Removed user rnti %x , enb S1U teid %u not found
\n
"
,
prior_rnti
,
ngu_teid
);
}
gtpv1u_ue_data_new_p
->
bearers
[
j
].
state
=
BEARER_DOWN
;
gtpv1u_ue_data_new_p
->
num_bearers
--
;
LOG_I
(
GTPU
,
"delete teid_mapping te_id %u (rnti%x) bearer_id %d in GTPV1U hashtable
\n
"
,
ngu_teid
,
prior_rnti
,
j
+
GTPV1U_BEARER_OFFSET
);;
}
if
(
bearers_num
>
bearers_total
)
break
;
}
return
0
;
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
int
gtpv1u_delete_ngu_tunnel
(
int
gtpv1u_delete_ngu_tunnel
(
const
instance_t
instanceP
,
const
instance_t
instanceP
,
...
...
openair3/GTPV1-U/gtpv1u_gNB_task.h
View file @
ec48bb89
...
@@ -40,5 +40,12 @@ gtpv1u_create_ngu_tunnel(
...
@@ -40,5 +40,12 @@ gtpv1u_create_ngu_tunnel(
const
gtpv1u_gnb_create_tunnel_req_t
*
const
create_tunnel_req_pP
,
const
gtpv1u_gnb_create_tunnel_req_t
*
const
create_tunnel_req_pP
,
gtpv1u_gnb_create_tunnel_resp_t
*
const
create_tunnel_resp_pP
);
gtpv1u_gnb_create_tunnel_resp_t
*
const
create_tunnel_resp_pP
);
int
gtpv1u_update_ngu_tunnel
(
const
instance_t
instanceP
,
const
gtpv1u_gnb_create_tunnel_req_t
*
const
create_tunnel_req_pP
,
const
rnti_t
prior_rnti
);
#endif
/* GTPV1U_GNB_TASK_H_ */
#endif
/* GTPV1U_GNB_TASK_H_ */
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