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
常顺宇
OpenXG-RAN
Commits
18b8bd4e
Commit
18b8bd4e
authored
Jun 21, 2019
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/bugfix-rrc-ue-removal' into develop_integration_2019_w25
parents
4bf932d6
f6f83ca0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
20 deletions
+45
-20
openair2/RRC/LTE/rrc_eNB.c
openair2/RRC/LTE/rrc_eNB.c
+45
-20
No files found.
openair2/RRC/LTE/rrc_eNB.c
View file @
18b8bd4e
...
...
@@ -7769,6 +7769,29 @@ void rrc_enb_init(void) {
memset
(
&
rrc_release_info
,
0
,
sizeof
(
RRC_release_list_t
));
}
//-----------------------------------------------------------------------------
int
add_ue_to_remove
(
struct
rrc_eNB_ue_context_s
**
ue_to_be_removed
,
int
removed_ue_count
,
struct
rrc_eNB_ue_context_s
*
ue_context_p
)
{
int
i
;
/* is it already here? */
for
(
i
=
0
;
i
<
removed_ue_count
;
i
++
)
if
(
ue_to_be_removed
[
i
]
==
ue_context_p
)
return
removed_ue_count
;
if
(
removed_ue_count
==
NUMBER_OF_UE_MAX
)
{
LOG_E
(
RRC
,
"fatal: ue_to_be_removed is full
\n
"
);
exit
(
1
);
}
ue_to_be_removed
[
removed_ue_count
]
=
ue_context_p
;
removed_ue_count
++
;
return
removed_ue_count
;
}
//-----------------------------------------------------------------------------
void
rrc_subframe_process
(
protocol_ctxt_t
*
const
ctxt_pP
,
const
int
CC_id
)
{
...
...
@@ -7776,7 +7799,9 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id)
int32_t
ref_timestamp_ms
=
0
;
struct
timeval
ts
;
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
struct
rrc_eNB_ue_context_s
*
ue_to_be_removed
=
NULL
;
struct
rrc_eNB_ue_context_s
*
ue_to_be_removed
[
NUMBER_OF_UE_MAX
];
int
removed_ue_count
=
0
;
int
cur_ue
;
#ifdef LOCALIZATION
double
estimated_distance
=
0
;
protocol_ctxt_t
ctxt
;
...
...
@@ -7817,7 +7842,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id)
// remove UE after 20 seconds after MAC (or else) has indicated UL failure
LOG_I
(
RRC
,
"Removing UE %x instance, because of uplink failure timer timeout
\n
"
,
ue_context_p
->
ue_context
.
rnti
);
ue_to_be_removed
=
ue_context_p
;
removed_ue_count
=
add_ue_to_remove
(
ue_to_be_removed
,
removed_ue_count
,
ue_context_p
)
;
break
;
// break RB_FOREACH
}
}
...
...
@@ -7833,7 +7858,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id)
if
(
EPC_MODE_ENABLED
&&
!
NODE_IS_DU
(
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
node_type
))
rrc_eNB_generate_RRCConnectionRelease
(
ctxt_pP
,
ue_context_p
);
else
ue_to_be_removed
=
ue_context_p
;
removed_ue_count
=
add_ue_to_remove
(
ue_to_be_removed
,
removed_ue_count
,
ue_context_p
)
;
ue_context_p
->
ue_context
.
ue_release_timer_s1
=
0
;
break
;
// break RB_FOREACH
...
...
@@ -7847,14 +7872,14 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id)
LOG_I
(
RRC
,
"Removing UE %x instance after UE_CONTEXT_RELEASE_Complete (ue_release_timer_rrc timeout)
\n
"
,
ue_context_p
->
ue_context
.
rnti
);
ue_context_p
->
ue_context
.
ue_release_timer_rrc
=
0
;
ue_to_be_removed
=
ue_context_p
;
removed_ue_count
=
add_ue_to_remove
(
ue_to_be_removed
,
removed_ue_count
,
ue_context_p
)
;
break
;
// break RB_FOREACH
}
}
if
(
ue_context_p
->
ue_context
.
handover_info
!=
NULL
)
{
if
(
ue_context_p
->
ue_context
.
handover_info
->
state
==
HO_RELEASE
)
{
ue_to_be_removed
=
ue_context_p
;
removed_ue_count
=
add_ue_to_remove
(
ue_to_be_removed
,
removed_ue_count
,
ue_context_p
)
;
rrc_eNB_handover_ue_context_release
(
ctxt_pP
,
ue_context_p
);
break
;
//break RB_FOREACH (why to break ?)
}
...
...
@@ -7927,7 +7952,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id)
if
(
ue_context_p
->
ue_context
.
ue_rrc_inactivity_timer
>=
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
configuration
.
rrc_inactivity_timer_thres
)
{
LOG_I
(
RRC
,
"Removing UE %x instance because of rrc_inactivity_timer timeout
\n
"
,
ue_context_p
->
ue_context
.
rnti
);
ue_to_be_removed
=
ue_context_p
;
removed_ue_count
=
add_ue_to_remove
(
ue_to_be_removed
,
removed_ue_count
,
ue_context_p
)
;
break
;
// break RB_FOREACH
}
}
...
...
@@ -7939,7 +7964,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id)
LOG_I
(
RRC
,
"Removing UE %x instance because of reestablishment_timer timeout
\n
"
,
ue_context_p
->
ue_context
.
rnti
);
ue_context_p
->
ue_context
.
ul_failure_timer
=
20000
;
// lead to send S1 UE_CONTEXT_RELEASE_REQ
ue_to_be_removed
=
ue_context_p
;
removed_ue_count
=
add_ue_to_remove
(
ue_to_be_removed
,
removed_ue_count
,
ue_context_p
)
;
ue_context_p
->
ue_context
.
ue_reestablishment_timer
=
0
;
break
;
// break RB_FOREACH
}
...
...
@@ -7956,32 +7981,32 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id)
* It is no more the case.
* The timer should be renamed.
*/
ue_to_be_removed
=
ue_context_p
;
removed_ue_count
=
add_ue_to_remove
(
ue_to_be_removed
,
removed_ue_count
,
ue_context_p
)
;
ue_context_p
->
ue_context
.
ue_release_timer
=
0
;
break
;
// break RB_FOREACH
}
}
}
// end RB_FOREACH
if
(
ue_to_be_removed
)
{
if
((
ue_to_be_removed
->
ue_context
.
ul_failure_timer
>=
20000
)
||
((
ue_to_be_removed
->
ue_context
.
ue_rrc_inactivity_timer
>=
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
configuration
.
rrc_inactivity_timer_thres
)
&&
for
(
cur_ue
=
0
;
cur_ue
<
removed_ue_count
;
cur_ue
++
)
{
if
((
ue_to_be_removed
[
cur_ue
]
->
ue_context
.
ul_failure_timer
>=
20000
)
||
((
ue_to_be_removed
[
cur_ue
]
->
ue_context
.
ue_rrc_inactivity_timer
>=
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
configuration
.
rrc_inactivity_timer_thres
)
&&
(
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
configuration
.
rrc_inactivity_timer_thres
>
0
)))
{
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
;
ue_to_be_removed
[
cur_ue
]
->
ue_context
.
ue_release_timer_s1
=
1
;
ue_to_be_removed
[
cur_ue
]
->
ue_context
.
ue_release_timer_thres_s1
=
100
;
ue_to_be_removed
[
cur_ue
]
->
ue_context
.
ue_release_timer
=
0
;
ue_to_be_removed
[
cur_ue
]
->
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
[
cur_ue
]
);
if
(
ue_to_be_removed
->
ue_context
.
ul_failure_timer
>=
20000
)
{
ue_to_be_removed
->
ue_context
.
ul_failure_timer
=
0
;
if
(
ue_to_be_removed
[
cur_ue
]
->
ue_context
.
ul_failure_timer
>=
20000
)
{
ue_to_be_removed
[
cur_ue
]
->
ue_context
.
ul_failure_timer
=
0
;
}
if
((
ue_to_be_removed
->
ue_context
.
ue_rrc_inactivity_timer
>=
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
configuration
.
rrc_inactivity_timer_thres
)
&&
if
((
ue_to_be_removed
[
cur_ue
]
->
ue_context
.
ue_rrc_inactivity_timer
>=
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
configuration
.
rrc_inactivity_timer_thres
)
&&
(
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
configuration
.
rrc_inactivity_timer_thres
>
0
))
{
ue_to_be_removed
->
ue_context
.
ue_rrc_inactivity_timer
=
0
;
//reset timer after S1 command UE context release request is sent
ue_to_be_removed
[
cur_ue
]
->
ue_context
.
ue_rrc_inactivity_timer
=
0
;
//reset timer after S1 command UE context release request is sent
}
}
...
...
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