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
27c3074f
Commit
27c3074f
authored
Jan 08, 2018
by
Xu Bo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix RRCConnectionReestablishment issue when multiple RRCConnectionReestablishment happen
parent
9d5ae645
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
294 additions
and
34 deletions
+294
-34
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-0
openair1/PHY/LTE_TRANSPORT/dci_tools.c
openair1/PHY/LTE_TRANSPORT/dci_tools.c
+1
-1
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+2
-2
openair2/LAYER2/MAC/defs.h
openair2/LAYER2/MAC/defs.h
+2
-0
openair2/LAYER2/MAC/eNB_scheduler.c
openair2/LAYER2/MAC/eNB_scheduler.c
+37
-2
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
+1
-0
openair2/LAYER2/MAC/extern.h
openair2/LAYER2/MAC/extern.h
+0
-2
openair2/RRC/LITE/MESSAGES/asn1_msg.c
openair2/RRC/LITE/MESSAGES/asn1_msg.c
+1
-1
openair2/RRC/LITE/defs.h
openair2/RRC/LITE/defs.h
+6
-0
openair2/RRC/LITE/rrc_common.c
openair2/RRC/LITE/rrc_common.c
+42
-4
openair2/RRC/LITE/rrc_eNB.c
openair2/RRC/LITE/rrc_eNB.c
+133
-10
openair2/RRC/LITE/rrc_eNB_S1AP.c
openair2/RRC/LITE/rrc_eNB_S1AP.c
+1
-0
openair2/RRC/LITE/rrc_eNB_UE_context.c
openair2/RRC/LITE/rrc_eNB_UE_context.c
+14
-0
openair3/GTPV1-U/gtpv1u_eNB.c
openair3/GTPV1-U/gtpv1u_eNB.c
+53
-12
No files found.
cmake_targets/CMakeLists.txt
View file @
27c3074f
...
@@ -1936,6 +1936,7 @@ add_executable(oaisim_nos1
...
@@ -1936,6 +1936,7 @@ add_executable(oaisim_nos1
${
OPENAIR_BIN_DIR
}
/messages_xml.h
${
OPENAIR_BIN_DIR
}
/messages_xml.h
${
OPENAIR_TARGETS
}
/RT/USER/lte-ue.c
${
OPENAIR_TARGETS
}
/RT/USER/lte-ue.c
${
OPENAIR_TARGETS
}
/RT/USER/lte-ru.c
${
OPENAIR_TARGETS
}
/RT/USER/lte-ru.c
${
OPENAIR_TARGETS
}
/RT/USER/lte-enb.c
${
OPENAIR_TARGETS
}
/RT/USER/rt_wrapper.c
${
OPENAIR_TARGETS
}
/RT/USER/rt_wrapper.c
${
OPENAIR_TARGETS
}
/SIMU/USER/channel_sim.c
${
OPENAIR_TARGETS
}
/SIMU/USER/channel_sim.c
${
OPENAIR_TARGETS
}
/SIMU/USER/init_lte.c
${
OPENAIR_TARGETS
}
/SIMU/USER/init_lte.c
...
...
openair1/PHY/LTE_TRANSPORT/dci_tools.c
View file @
27c3074f
...
@@ -6492,7 +6492,7 @@ uint8_t pdcch_alloc2ul_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint8_t n)
...
@@ -6492,7 +6492,7 @@ uint8_t pdcch_alloc2ul_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint8_t n)
else
else
ul_subframe
=
((
n
+
4
)
%
10
);
ul_subframe
=
((
n
+
4
)
%
10
);
if
(
subframe_select
(
frame_parms
,
ul_subframe
)
!=
SF_UL
)
return
(
255
);
if
(
(
subframe_select
(
frame_parms
,
ul_subframe
)
!=
SF_UL
)
&&
(
frame_parms
->
frame_type
==
TDD
)
)
return
(
255
);
LOG_D
(
PHY
,
"subframe %d: PUSCH subframe = %d
\n
"
,
n
,
ul_subframe
);
LOG_D
(
PHY
,
"subframe %d: PUSCH subframe = %d
\n
"
,
n
,
ul_subframe
);
return
ul_subframe
;
return
ul_subframe
;
...
...
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
27c3074f
...
@@ -834,10 +834,10 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
...
@@ -834,10 +834,10 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
if
(
uci
->
type
==
SR
)
{
if
(
uci
->
type
==
SR
)
{
if
(
SR_payload
==
1
)
{
if
(
SR_payload
==
1
)
{
fill_sr_indication
(
eNB
,
uci
->
rnti
,
frame
,
subframe
,
metric_SR
);
fill_sr_indication
(
eNB
,
uci
->
rnti
,
frame
,
subframe
,
metric_SR
);
return
;
continue
;
}
}
else
{
else
{
return
;
continue
;
}
}
}
}
case
HARQ
:
case
HARQ
:
...
...
openair2/LAYER2/MAC/defs.h
View file @
27c3074f
...
@@ -835,6 +835,8 @@ typedef struct {
...
@@ -835,6 +835,8 @@ typedef struct {
int32_t
cqi_req_timer
;
int32_t
cqi_req_timer
;
int32_t
ul_inactivity_timer
;
int32_t
ul_inactivity_timer
;
int32_t
ul_failure_timer
;
int32_t
ul_failure_timer
;
uint32_t
ue_reestablishment_reject_timer
;
uint32_t
ue_reestablishment_reject_timer_thres
;
int32_t
ul_scheduled
;
int32_t
ul_scheduled
;
int32_t
ra_pdcch_order_sent
;
int32_t
ra_pdcch_order_sent
;
int32_t
ul_out_of_sync
;
int32_t
ul_out_of_sync
;
...
...
openair2/LAYER2/MAC/eNB_scheduler.c
View file @
27c3074f
...
@@ -163,7 +163,7 @@ schedule_SRS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
...
@@ -163,7 +163,7 @@ schedule_SRS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
(
nfapi_ul_config_srs_pdu
));
(
nfapi_ul_config_srs_pdu
));
ul_config_pdu
->
srs_pdu
.
srs_pdu_rel8
.
size
=
ul_config_pdu
->
srs_pdu
.
srs_pdu_rel8
.
size
=
(
uint8_t
)
(
uint8_t
)
sizeof
(
nfapi_ul_config_srs_pdu
);
;
sizeof
(
nfapi_ul_config_srs_pdu
);
ul_config_pdu
->
srs_pdu
.
srs_pdu_rel8
.
rnti
=
ul_config_pdu
->
srs_pdu
.
srs_pdu_rel8
.
rnti
=
UE_list
->
UE_template
[
CC_id
][
UE_id
].
UE_list
->
UE_template
[
CC_id
][
UE_id
].
rnti
;
rnti
;
...
@@ -549,7 +549,7 @@ check_ul_failure(module_id_t module_idP, int CC_id, int UE_id,
...
@@ -549,7 +549,7 @@ check_ul_failure(module_id_t module_idP, int CC_id, int UE_id,
UE_list
->
UE_sched_ctrl
[
UE_id
].
ul_failure_timer
++
;
UE_list
->
UE_sched_ctrl
[
UE_id
].
ul_failure_timer
++
;
// check threshold
// check threshold
if
(
UE_list
->
UE_sched_ctrl
[
UE_id
].
ul_failure_timer
>
200
)
{
if
(
UE_list
->
UE_sched_ctrl
[
UE_id
].
ul_failure_timer
>
200
00
)
{
// inform RRC of failure and clear timer
// inform RRC of failure and clear timer
LOG_I
(
MAC
,
LOG_I
(
MAC
,
"UE %d rnti %x: UL Failure after repeated PDCCH orders: Triggering RRC
\n
"
,
"UE %d rnti %x: UL Failure after repeated PDCCH orders: Triggering RRC
\n
"
,
...
@@ -707,6 +707,41 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
...
@@ -707,6 +707,41 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
ul_inactivity_timer
,
ul_inactivity_timer
,
RC
.
mac
[
module_idP
]
->
UE_list
.
UE_sched_ctrl
[
i
].
cqi_req_timer
);
RC
.
mac
[
module_idP
]
->
UE_list
.
UE_sched_ctrl
[
i
].
cqi_req_timer
);
check_ul_failure
(
module_idP
,
CC_id
,
i
,
frameP
,
subframeP
);
check_ul_failure
(
module_idP
,
CC_id
,
i
,
frameP
,
subframeP
);
if
(
RC
.
mac
[
module_idP
]
->
UE_list
.
UE_sched_ctrl
[
i
].
ue_reestablishment_reject_timer
>
0
)
{
RC
.
mac
[
module_idP
]
->
UE_list
.
UE_sched_ctrl
[
i
].
ue_reestablishment_reject_timer
++
;
if
(
RC
.
mac
[
module_idP
]
->
UE_list
.
UE_sched_ctrl
[
i
].
ue_reestablishment_reject_timer
>=
RC
.
mac
[
module_idP
]
->
UE_list
.
UE_sched_ctrl
[
i
].
ue_reestablishment_reject_timer_thres
)
{
RC
.
mac
[
module_idP
]
->
UE_list
.
UE_sched_ctrl
[
i
].
ue_reestablishment_reject_timer
=
0
;
for
(
int
ii
=
0
;
ii
<
NUMBER_OF_UE_MAX
;
ii
++
)
{
LTE_eNB_ULSCH_t
*
ulsch
=
NULL
;
ulsch
=
RC
.
eNB
[
module_idP
][
CC_id
]
->
ulsch
[
ii
];
if
((
ulsch
!=
NULL
)
&&
(
ulsch
->
rnti
==
rnti
)){
LOG_I
(
MAC
,
"clean_eNb_ulsch UE %x
\n
"
,
rnti
);
clean_eNb_ulsch
(
ulsch
);
break
;
}
}
for
(
int
j
=
0
;
j
<
10
;
j
++
){
nfapi_ul_config_request_body_t
*
ul_req_tmp
=
NULL
;
ul_req_tmp
=
&
RC
.
mac
[
module_idP
]
->
UL_req_tmp
[
CC_id
][
j
].
ul_config_request_body
;
if
(
ul_req_tmp
){
int
pdu_number
=
ul_req_tmp
->
number_of_pdus
;
for
(
int
pdu_index
=
pdu_number
-
1
;
pdu_index
>=
0
;
pdu_index
--
){
if
(
ul_req_tmp
->
ul_config_pdu_list
[
pdu_index
].
ulsch_pdu
.
ulsch_pdu_rel8
.
rnti
==
rnti
){
LOG_I
(
MAC
,
"remove UE %x from ul_config_pdu_list %d/%d
\n
"
,
rnti
,
pdu_index
,
pdu_number
);
if
(
pdu_index
<
pdu_number
-
1
){
memcpy
(
&
ul_req_tmp
->
ul_config_pdu_list
[
pdu_index
],
&
ul_req_tmp
->
ul_config_pdu_list
[
pdu_index
+
1
],
(
pdu_number
-
1
-
pdu_index
)
*
sizeof
(
nfapi_ul_config_request_pdu_t
));
}
ul_req_tmp
->
number_of_pdus
--
;
}
}
}
}
rrc_mac_remove_ue
(
module_idP
,
rnti
);
}
}
}
}
...
...
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
View file @
27c3074f
...
@@ -2075,6 +2075,7 @@ int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP, int harq_pidP
...
@@ -2075,6 +2075,7 @@ int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP, int harq_pidP
sizeof
(
UE_sched_ctrl
));
sizeof
(
UE_sched_ctrl
));
memset
((
void
*
)
&
UE_list
->
eNB_UE_stats
[
cc_idP
][
UE_id
],
0
,
memset
((
void
*
)
&
UE_list
->
eNB_UE_stats
[
cc_idP
][
UE_id
],
0
,
sizeof
(
eNB_UE_STATS
));
sizeof
(
eNB_UE_STATS
));
UE_list
->
UE_sched_ctrl
[
UE_id
].
ue_reestablishment_reject_timer
=
0
;
UE_list
->
UE_sched_ctrl
[
UE_id
].
ta_update
=
31
;
UE_list
->
UE_sched_ctrl
[
UE_id
].
ta_update
=
31
;
...
...
openair2/LAYER2/MAC/extern.h
View file @
27c3074f
...
@@ -101,6 +101,4 @@ extern DCI2_5MHz_2A_TDD_t DLSCH_alloc_pdu1;
...
@@ -101,6 +101,4 @@ extern DCI2_5MHz_2A_TDD_t DLSCH_alloc_pdu1;
extern
DCI2_5MHz_2A_TDD_t
DLSCH_alloc_pdu2
;
extern
DCI2_5MHz_2A_TDD_t
DLSCH_alloc_pdu2
;
extern
DCI1E_5MHz_2A_M10PRB_TDD_t
DLSCH_alloc_pdu1E
;
extern
DCI1E_5MHz_2A_M10PRB_TDD_t
DLSCH_alloc_pdu1E
;
extern
uint16_t
reestablish_rnti_map
[
NUMBER_OF_UE_MAX
][
2
];
#endif //DEF_H
#endif //DEF_H
openair2/RRC/LITE/MESSAGES/asn1_msg.c
View file @
27c3074f
...
@@ -233,7 +233,7 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich
...
@@ -233,7 +233,7 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich
AssertFatal
(
phich_Resource
<=
PHICH_Config__phich_Resource_two
,
"Illegal phich_Resource
\n
"
);
AssertFatal
(
phich_Resource
<=
PHICH_Config__phich_Resource_two
,
"Illegal phich_Resource
\n
"
);
mib
->
message
.
phich_Config
.
phich_Resource
=
phich_Resource
;
mib
->
message
.
phich_Config
.
phich_Resource
=
phich_Resource
;
AssertFatal
(
phich_
Resource
<=
PHICH_Config__phich_Duration_extended
,
"Illegal phich_Duration
\n
"
);
AssertFatal
(
phich_
duration
<=
PHICH_Config__phich_Duration_extended
,
"Illegal phich_Duration
\n
"
);
mib
->
message
.
phich_Config
.
phich_Duration
=
phich_duration
;
mib
->
message
.
phich_Config
.
phich_Duration
=
phich_duration
;
LOG_I
(
RRC
,
"[MIB] systemBandwidth %x, phich_duration %x, phich_resource %x,sfn %x
\n
"
,
LOG_I
(
RRC
,
"[MIB] systemBandwidth %x, phich_duration %x, phich_resource %x,sfn %x
\n
"
,
(
uint32_t
)
mib
->
message
.
dl_Bandwidth
,
(
uint32_t
)
mib
->
message
.
dl_Bandwidth
,
...
...
openair2/RRC/LITE/defs.h
View file @
27c3074f
...
@@ -451,6 +451,12 @@ typedef struct eNB_RRC_UE_s {
...
@@ -451,6 +451,12 @@ typedef struct eNB_RRC_UE_s {
uint32_t
ul_failure_timer
;
uint32_t
ul_failure_timer
;
uint32_t
ue_release_timer
;
uint32_t
ue_release_timer
;
uint32_t
ue_release_timer_thres
;
uint32_t
ue_release_timer_thres
;
uint32_t
ue_release_timer_s1
;
uint32_t
ue_release_timer_thres_s1
;
uint32_t
ue_release_timer_rrc
;
uint32_t
ue_release_timer_thres_rrc
;
uint32_t
ue_reestablishment_timer
;
uint32_t
ue_reestablishment_timer_thres
;
uint8_t
e_rab_release_command_flag
;
uint8_t
e_rab_release_command_flag
;
}
eNB_RRC_UE_t
;
}
eNB_RRC_UE_t
;
...
...
openair2/RRC/LITE/rrc_common.c
View file @
27c3074f
...
@@ -333,26 +333,58 @@ rrc_rx_tx(
...
@@ -333,26 +333,58 @@ rrc_rx_tx(
RB_FOREACH
(
ue_context_p
,
rrc_ue_tree_s
,
&
(
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
rrc_ue_head
))
{
RB_FOREACH
(
ue_context_p
,
rrc_ue_tree_s
,
&
(
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
rrc_ue_head
))
{
if
((
ctxt_pP
->
frame
==
0
)
&&
(
ctxt_pP
->
subframe
==
0
))
{
if
((
ctxt_pP
->
frame
==
0
)
&&
(
ctxt_pP
->
subframe
==
0
))
{
if
(
ue_context_p
->
ue_context
.
Initialue_identity_s_TMSI
.
presence
==
TRUE
)
{
if
(
ue_context_p
->
ue_context
.
Initialue_identity_s_TMSI
.
presence
==
TRUE
)
{
LOG_I
(
RRC
,
"UE rnti %x:S-TMSI %x failure timer %d/
20000
\n
"
,
LOG_I
(
RRC
,
"UE rnti %x:S-TMSI %x failure timer %d/
8
\n
"
,
ue_context_p
->
ue_context
.
rnti
,
ue_context_p
->
ue_context
.
rnti
,
ue_context_p
->
ue_context
.
Initialue_identity_s_TMSI
.
m_tmsi
,
ue_context_p
->
ue_context
.
Initialue_identity_s_TMSI
.
m_tmsi
,
ue_context_p
->
ue_context
.
ul_failure_timer
);
ue_context_p
->
ue_context
.
ul_failure_timer
);
}
}
else
{
else
{
LOG_I
(
RRC
,
"UE rnti %x failure timer %d/
20000
\n
"
,
LOG_I
(
RRC
,
"UE rnti %x failure timer %d/
8
\n
"
,
ue_context_p
->
ue_context
.
rnti
,
ue_context_p
->
ue_context
.
rnti
,
ue_context_p
->
ue_context
.
ul_failure_timer
);
ue_context_p
->
ue_context
.
ul_failure_timer
);
}
}
}
}
if
(
ue_context_p
->
ue_context
.
ul_failure_timer
>
0
)
{
if
(
ue_context_p
->
ue_context
.
ul_failure_timer
>
0
)
{
ue_context_p
->
ue_context
.
ul_failure_timer
++
;
ue_context_p
->
ue_context
.
ul_failure_timer
++
;
if
(
ue_context_p
->
ue_context
.
ul_failure_timer
>=
20000
)
{
if
(
ue_context_p
->
ue_context
.
ul_failure_timer
>=
8
)
{
// remove UE after 20 seconds after MAC has indicated UL failure
// remove UE after 20 seconds after MAC has indicated UL failure
LOG_I
(
RRC
,
"Removing UE %x instance
\n
"
,
ue_context_p
->
ue_context
.
rnti
);
LOG_I
(
RRC
,
"Removing UE %x instance
\n
"
,
ue_context_p
->
ue_context
.
rnti
);
ue_to_be_removed
=
ue_context_p
;
ue_to_be_removed
=
ue_context_p
;
break
;
break
;
}
}
}
}
if
(
ue_context_p
->
ue_context
.
ue_release_timer_s1
>
0
)
{
ue_context_p
->
ue_context
.
ue_release_timer_s1
++
;
if
(
ue_context_p
->
ue_context
.
ue_release_timer_s1
>=
ue_context_p
->
ue_context
.
ue_release_timer_thres_s1
)
{
LOG_I
(
RRC
,
"Removing UE %x instance Because of UE_CONTEXT_RELEASE_COMMAND not received after %d ms from sending request
\n
"
,
ue_context_p
->
ue_context
.
rnti
,
ue_context_p
->
ue_context
.
ue_release_timer_thres_s1
);
ue_to_be_removed
=
ue_context_p
;
break
;
}
}
if
(
ue_context_p
->
ue_context
.
ue_release_timer_rrc
>
0
)
{
ue_context_p
->
ue_context
.
ue_release_timer_rrc
++
;
if
(
ue_context_p
->
ue_context
.
ue_release_timer_rrc
>=
ue_context_p
->
ue_context
.
ue_release_timer_thres_rrc
)
{
LOG_I
(
RRC
,
"Removing UE %x instance After UE_CONTEXT_RELEASE_Complete
\n
"
,
ue_context_p
->
ue_context
.
rnti
);
ue_to_be_removed
=
ue_context_p
;
break
;
}
}
if
(
ue_context_p
->
ue_context
.
ue_reestablishment_timer
>
0
)
{
ue_context_p
->
ue_context
.
ue_reestablishment_timer
++
;
if
(
ue_context_p
->
ue_context
.
ue_reestablishment_timer
>=
ue_context_p
->
ue_context
.
ue_reestablishment_timer_thres
)
{
LOG_I
(
RRC
,
"UE %d reestablishment_timer max
\n
"
,
ue_context_p
->
ue_context
.
rnti
);
ue_context_p
->
ue_context
.
ul_failure_timer
=
20000
;
ue_to_be_removed
=
ue_context_p
;
ue_context_p
->
ue_context
.
ue_reestablishment_timer
=
0
;
break
;
}
}
if
(
ue_context_p
->
ue_context
.
ue_release_timer
>
0
)
{
if
(
ue_context_p
->
ue_context
.
ue_release_timer
>
0
)
{
ue_context_p
->
ue_context
.
ue_release_timer
++
;
ue_context_p
->
ue_context
.
ue_release_timer
++
;
if
(
ue_context_p
->
ue_context
.
ue_release_timer
>=
if
(
ue_context_p
->
ue_context
.
ue_release_timer
>=
...
@@ -364,8 +396,14 @@ rrc_rx_tx(
...
@@ -364,8 +396,14 @@ rrc_rx_tx(
}
}
}
}
if
(
ue_to_be_removed
)
{
if
(
ue_to_be_removed
)
{
if
(
ue_to_be_removed
->
ue_context
.
ul_failure_timer
>=
8
)
{
ue_to_be_removed
->
ue_context
.
ue_release_timer_s1
=
1
;
ue_to_be_removed
->
ue_context
.
ue_release_timer_thres_s1
=
100
;
ue_to_be_removed
->
ue_context
.
ue_release_timer
=
0
;
ue_to_be_removed
->
ue_context
.
ue_reestablishment_timer
=
0
;
}
rrc_eNB_free_UE
(
ctxt_pP
->
module_id
,
ue_to_be_removed
);
rrc_eNB_free_UE
(
ctxt_pP
->
module_id
,
ue_to_be_removed
);
if
(
ue_to_be_removed
->
ue_context
.
ul_failure_timer
>=
20000
){
if
(
ue_to_be_removed
->
ue_context
.
ul_failure_timer
>=
8
){
ue_to_be_removed
->
ue_context
.
ul_failure_timer
=
0
;
ue_to_be_removed
->
ue_context
.
ul_failure_timer
=
0
;
}
}
}
}
...
...
openair2/RRC/LITE/rrc_eNB.c
View file @
27c3074f
This diff is collapsed.
Click to expand it.
openair2/RRC/LITE/rrc_eNB_S1AP.c
View file @
27c3074f
...
@@ -1197,6 +1197,7 @@ int rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_COMMAND (MessageDef *msg_p, const ch
...
@@ -1197,6 +1197,7 @@ int rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_COMMAND (MessageDef *msg_p, const ch
}
}
return
(
-
1
);
return
(
-
1
);
}
else
{
}
else
{
ue_context_p
->
ue_context
.
ue_release_timer_s1
=
0
;
PROTOCOL_CTXT_SET_BY_INSTANCE
(
&
ctxt
,
instance
,
ENB_FLAG_YES
,
ue_context_p
->
ue_context
.
rnti
,
0
,
0
);
PROTOCOL_CTXT_SET_BY_INSTANCE
(
&
ctxt
,
instance
,
ENB_FLAG_YES
,
ue_context_p
->
ue_context
.
rnti
,
0
,
0
);
rrc_eNB_generate_RRCConnectionRelease
(
&
ctxt
,
ue_context_p
);
rrc_eNB_generate_RRCConnectionRelease
(
&
ctxt
,
ue_context_p
);
/*
/*
...
...
openair2/RRC/LITE/rrc_eNB_UE_context.c
View file @
27c3074f
...
@@ -155,7 +155,21 @@ rrc_eNB_get_ue_context(
...
@@ -155,7 +155,21 @@ rrc_eNB_get_ue_context(
memset
(
&
temp
,
0
,
sizeof
(
struct
rrc_eNB_ue_context_s
));
memset
(
&
temp
,
0
,
sizeof
(
struct
rrc_eNB_ue_context_s
));
/* eNB ue rrc id = 24 bits wide */
/* eNB ue rrc id = 24 bits wide */
temp
.
ue_id_rnti
=
rntiP
;
temp
.
ue_id_rnti
=
rntiP
;
#if 0
return RB_FIND(rrc_ue_tree_s, &rrc_instance_pP->rrc_ue_head, &temp);
return RB_FIND(rrc_ue_tree_s, &rrc_instance_pP->rrc_ue_head, &temp);
#endif
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
ue_context_p
=
RB_FIND
(
rrc_ue_tree_s
,
&
rrc_instance_pP
->
rrc_ue_head
,
&
temp
);
if
(
ue_context_p
!=
NULL
)
{
return
ue_context_p
;
}
else
{
RB_FOREACH
(
ue_context_p
,
rrc_ue_tree_s
,
&
(
rrc_instance_pP
->
rrc_ue_head
))
{
if
(
ue_context_p
->
ue_context
.
rnti
==
rntiP
)
{
return
ue_context_p
;
}
}
return
NULL
;
}
}
}
...
...
openair3/GTPV1-U/gtpv1u_eNB.c
View file @
27c3074f
...
@@ -814,40 +814,81 @@ int gtpv1u_update_s1u_tunnel(
...
@@ -814,40 +814,81 @@ int gtpv1u_update_s1u_tunnel(
const
rnti_t
prior_rnti
const
rnti_t
prior_rnti
)
)
{
{
/* Local tunnel end-point identifier */
/* Local tunnel end-point identifier */
teid_t
s1u_teid
=
0
;
teid_t
s1u_teid
=
0
;
gtpv1u_teid_data_t
*
gtpv1u_teid_data_p
=
NULL
;
gtpv1u_teid_data_t
*
gtpv1u_teid_data_p
=
NULL
;
gtpv1u_ue_data_t
*
gtpv1u_ue_data_p
=
NULL
;
gtpv1u_ue_data_t
*
gtpv1u_ue_data_p
=
NULL
;
gtpv1u_ue_data_t
*
gtpv1u_ue_data_new_p
=
NULL
;
//MessageDef *message_p = NULL;
//MessageDef *message_p = NULL;
hashtable_rc_t
hash_rc
=
HASH_TABLE_KEY_NOT_EXISTS
;
hashtable_rc_t
hash_rc
=
HASH_TABLE_KEY_NOT_EXISTS
;
int
i
;
int
i
,
j
;
ebi_t
eps_bearer_id
=
0
;
uint8_t
bearers_num
=
0
,
bearers_total
=
0
;
//-----------------------
//-----------------------
// PDCP->GTPV1U mapping
// PDCP->GTPV1U mapping
//-----------------------
//-----------------------
hash_rc
=
hashtable_get
(
RC
.
gtpv1u_data_g
->
ue_mapping
,
prior_rnti
,
(
void
**
)
&
gtpv1u_ue_data_p
);
hash_rc
=
hashtable_get
(
RC
.
gtpv1u_data_g
->
ue_mapping
,
prior_rnti
,
(
void
**
)
&
gtpv1u_ue_data_p
);
AssertFatal
(
hash_rc
==
HASH_TABLE_OK
,
"Error get ue_mapping(rnti=%x) from GTPV1U hashtable error
\n
"
,
prior_rnti
);
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_p
->
ue_id
=
create_tunnel_req_pP
->
rnti
;
gtpv1u_ue_data_new_p
=
calloc
(
1
,
sizeof
(
gtpv1u_ue_data_t
));
hash_rc
=
hashtable_insert
(
RC
.
gtpv1u_data_g
->
ue_mapping
,
create_tunnel_req_pP
->
rnti
,
gtpv1u_ue_data_p
);
memcpy
(
gtpv1u_ue_data_new_p
,
gtpv1u_ue_data_p
,
sizeof
(
gtpv1u_ue_data_t
));
gtpv1u_ue_data_new_p
->
ue_id
=
create_tunnel_req_pP
->
rnti
;
hash_rc
=
hashtable_insert
(
RC
.
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"
);
AssertFatal
(
hash_rc
==
HASH_TABLE_OK
,
"Error inserting ue_mapping in GTPV1U hashtable"
);
LOG_I
(
GTPU
,
"inserting ue_mapping(rnti=%x) in GTPV1U hashtable
\n
"
,
LOG_I
(
GTPU
,
"inserting ue_mapping(rnti=%x) in GTPV1U hashtable
\n
"
,
create_tunnel_req_pP
->
rnti
);
create_tunnel_req_pP
->
rnti
);
hash_rc
=
hashtable_remove
(
RC
.
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
// GTPV1U->PDCP mapping
//-----------------------
//-----------------------
for
(
i
=
0
;
i
<
create_tunnel_req_pP
->
num_tunnels
;
i
++
)
{
bearers_total
=
gtpv1u_ue_data_new_p
->
num_bearers
;
eps_bearer_id
=
create_tunnel_req_pP
->
eps_bearer_id
[
i
];
for
(
j
=
0
;
j
<
GTPV1U_MAX_BEARERS_ID
;
j
++
){
s1u_teid
=
gtpv1u_ue_data_p
->
bearers
[
eps_bearer_id
-
GTPV1U_BEARER_OFFSET
].
teid_eNB
;
hash_rc
=
hashtable_get
(
RC
.
gtpv1u_data_g
->
teid_mapping
,
s1u_teid
,
(
void
**
)
&
gtpv1u_teid_data_p
);
AssertFatal
(
hash_rc
==
HASH_TABLE_OK
,
"Error get teid mapping(s1u_teid=%u) from GTPV1U hashtable"
,
s1u_teid
);
gtpv1u_teid_data_p
->
ue_id
=
create_tunnel_req_pP
->
rnti
;
if
(
gtpv1u_ue_data_new_p
->
bearers
[
j
].
state
!=
BEARER_IN_CONFIG
)
gtpv1u_teid_data_p
->
eps_bearer_id
=
eps_bearer_id
;
continue
;
bearers_num
++
;
for
(
i
=
0
;
i
<
create_tunnel_req_pP
->
num_tunnels
;
i
++
)
{
if
(
j
==
(
create_tunnel_req_pP
->
eps_bearer_id
[
i
]
-
GTPV1U_BEARER_OFFSET
))
break
;
}
if
(
i
<
create_tunnel_req_pP
->
num_tunnels
){
s1u_teid
=
gtpv1u_ue_data_new_p
->
bearers
[
j
].
teid_eNB
;
hash_rc
=
hashtable_get
(
RC
.
gtpv1u_data_g
->
teid_mapping
,
s1u_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
->
eps_bearer_id
=
create_tunnel_req_pP
->
eps_bearer_id
[
i
];
LOG_I
(
GTPU
,
"updata teid_mapping te_id %u (prior_rnti %x rnti %x) in GTPV1U hashtable
\n
"
,
s1u_teid
,
prior_rnti
,
create_tunnel_req_pP
->
rnti
);
}
else
{
LOG_W
(
GTPU
,
"Error get teid mapping(s1u_teid=%u) from GTPV1U hashtable"
,
s1u_teid
);
}
}
else
{
s1u_teid
=
gtpv1u_ue_data_new_p
->
bearers
[
j
].
teid_eNB
;
hash_rc
=
hashtable_remove
(
RC
.
gtpv1u_data_g
->
teid_mapping
,
s1u_teid
);
if
(
hash_rc
!=
HASH_TABLE_OK
)
{
LOG_D
(
GTPU
,
"Removed user rnti %x , enb S1U teid %u not found
\n
"
,
prior_rnti
,
s1u_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
"
,
s1u_teid
,
prior_rnti
,
j
+
GTPV1U_BEARER_OFFSET
);;
}
if
(
bearers_num
>
bearers_total
)
break
;
}
}
return
0
;
return
0
;
}
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
...
...
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