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
lizhongxiao
OpenXG-RAN
Commits
c40cceb4
Commit
c40cceb4
authored
Aug 10, 2023
by
Maud Tribaudeau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reestablishment for LTE
parent
537605a6
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
347 additions
and
243 deletions
+347
-243
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
+123
-99
openair2/LAYER2/PDCP_v10.1.0/pdcp.h
openair2/LAYER2/PDCP_v10.1.0/pdcp.h
+22
-23
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
+10
-9
openair2/RRC/LTE/rrc_UE.c
openair2/RRC/LTE/rrc_UE.c
+53
-37
openair2/RRC/LTE/rrc_eNB.c
openair2/RRC/LTE/rrc_eNB.c
+97
-59
openair2/RRC/LTE/rrc_eNB_M2AP.c
openair2/RRC/LTE/rrc_eNB_M2AP.c
+10
-8
openair3/ocp-gtpu/gtp_itf.cpp
openair3/ocp-gtpu/gtp_itf.cpp
+32
-8
No files found.
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
View file @
c40cceb4
...
@@ -148,6 +148,7 @@ pthread_t pdcp_stats_thread_desc;
...
@@ -148,6 +148,7 @@ pthread_t pdcp_stats_thread_desc;
* \param[in] kRRCenc RRC encryption key
* \param[in] kRRCenc RRC encryption key
* \param[in] kRRCint RRC integrity key
* \param[in] kRRCint RRC integrity key
* \param[in] kUPenc User-Plane encryption key
* \param[in] kUPenc User-Plane encryption key
* \param[in] reestablisment_on_going status to know if reestablisment is on going
* \return A status about the processing, OK or error code.
* \return A status about the processing, OK or error code.
*/
*/
static
bool
pdcp_config_req_asn1
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
static
bool
pdcp_config_req_asn1
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
...
@@ -164,7 +165,8 @@ static bool pdcp_config_req_asn1(const protocol_ctxt_t *const ctxt_pP,
...
@@ -164,7 +165,8 @@ static bool pdcp_config_req_asn1(const protocol_ctxt_t *const ctxt_pP,
const
uint8_t
security_modeP
,
const
uint8_t
security_modeP
,
uint8_t
*
const
kRRCenc_pP
,
uint8_t
*
const
kRRCenc_pP
,
uint8_t
*
const
kRRCint_pP
,
uint8_t
*
const
kRRCint_pP
,
uint8_t
*
const
kUPenc_pP
);
uint8_t
*
const
kUPenc_pP
,
bool
reestablisment_on_going
);
void
*
pdcp_stats_thread
(
void
*
param
)
{
void
*
pdcp_stats_thread
(
void
*
param
)
{
...
@@ -1523,17 +1525,17 @@ bool pdcp_remove_UE(const protocol_ctxt_t *const ctxt_pP)
...
@@ -1523,17 +1525,17 @@ bool pdcp_remove_UE(const protocol_ctxt_t *const ctxt_pP)
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
bool
bool
rrc_pdcp_config_asn1_req
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
rrc_pdcp_config_asn1_req
(
const
protocol_ctxt_t
*
const
ctx
t_pP
,
LTE_SRB_ToAddModList_t
*
const
srb2add_lis
t_pP
,
LTE_SRB_ToAddModList_t
*
const
s
rb2add_list_pP
,
LTE_DRB_ToAddModList_t
*
const
d
rb2add_list_pP
,
LTE_DRB_ToAddModList_t
*
const
drb2add
_list_pP
,
LTE_DRB_ToReleaseList_t
*
const
drb2release
_list_pP
,
LTE_DRB_ToReleaseList_t
*
const
drb2release_list_p
P
,
const
uint8_t
security_mode
P
,
const
uint8_t
security_mode
P
,
uint8_t
*
const
kRRCenc_p
P
,
uint8_t
*
const
kRRCenc
_pP
,
uint8_t
*
const
kRRCint
_pP
,
uint8_t
*
const
kRRCint
_pP
,
uint8_t
*
const
kUPenc
_pP
,
uint8_t
*
const
kUPenc
_pP
,
LTE_PMCH_InfoList_r9_t
*
const
pmch_InfoList_r9
_pP
,
LTE_PMCH_InfoList_r9_t
*
const
pmch_InfoList_r9_pP
,
rb_id_t
*
const
defaultDRB
,
rb_id_t
*
const
defaultDRB
)
const
rnti_t
previous_rnti_for_reestab
)
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
{
{
long
int
lc_id
=
0
;
long
int
lc_id
=
0
;
...
@@ -1551,13 +1553,17 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
...
@@ -1551,13 +1553,17 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
LTE_SRB_ToAddMod_t
*
srb_toaddmod_p
=
NULL
;
LTE_SRB_ToAddMod_t
*
srb_toaddmod_p
=
NULL
;
LTE_DRB_ToAddMod_t
*
drb_toaddmod_p
=
NULL
;
LTE_DRB_ToAddMod_t
*
drb_toaddmod_p
=
NULL
;
pdcp_t
*
pdcp_p
=
NULL
;
pdcp_t
*
pdcp_p
=
NULL
;
pdcp_t
*
pdcp_p_previous
=
NULL
;
hash_key_t
key
=
HASHTABLE_NOT_A_KEY_VALUE
;
hash_key_t
key
=
HASHTABLE_NOT_A_KEY_VALUE
;
hash_key_t
key_previous
=
HASHTABLE_NOT_A_KEY_VALUE
;
hashtable_rc_t
h_rc
;
hashtable_rc_t
h_rc
;
hashtable_rc_t
h_rc_previous
;
hash_key_t
key_defaultDRB
=
HASHTABLE_NOT_A_KEY_VALUE
;
hash_key_t
key_defaultDRB
=
HASHTABLE_NOT_A_KEY_VALUE
;
hashtable_rc_t
h_defaultDRB_rc
;
hashtable_rc_t
h_defaultDRB_rc
;
int
i
,
j
;
int
i
,
j
;
LTE_MBMS_SessionInfoList_r9_t
*
mbms_SessionInfoList_r9_p
=
NULL
;
LTE_MBMS_SessionInfoList_r9_t
*
mbms_SessionInfoList_r9_p
=
NULL
;
LTE_MBMS_SessionInfo_r9_t
*
MBMS_SessionInfo_p
=
NULL
;
LTE_MBMS_SessionInfo_r9_t
*
MBMS_SessionInfo_p
=
NULL
;
bool
reestablishment_ongoing
=
previous_rnti_for_reestab
==
NOT_A_RNTI
?
false
:
true
;
LOG_T
(
PDCP
,
PROTOCOL_CTXT_FMT
" %s() SRB2ADD %p DRB2ADD %p DRB2RELEASE %p
\n
"
,
LOG_T
(
PDCP
,
PROTOCOL_CTXT_FMT
" %s() SRB2ADD %p DRB2ADD %p DRB2RELEASE %p
\n
"
,
PROTOCOL_CTXT_ARGS
(
ctxt_pP
),
PROTOCOL_CTXT_ARGS
(
ctxt_pP
),
__FUNCTION__
,
__FUNCTION__
,
...
@@ -1610,44 +1616,44 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
...
@@ -1610,44 +1616,44 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
break
;
break
;
default:
default:
pdcp_config_req_asn1
(
pdcp_config_req_asn1
(
ctxt_pP
,
ctxt_pP
,
pdcp_p
,
pdcp_p
,
SRB_FLAG_YES
,
SRB_FLAG_YES
,
rlc_type
,
rlc_type
,
action
,
action
,
lc_id
,
lc
_id
,
mch
_id
,
mch
_id
,
srb
_id
,
srb_id
,
srb_sn
,
srb_sn
,
0
,
// drb_report
0
,
// drb_report
0
,
// header compression
0
,
// header compression
security_modeP
,
security_mode
P
,
kRRCenc_p
P
,
kRRCenc
_pP
,
kRRCint
_pP
,
kRRCint
_pP
,
kUPenc
_pP
,
kUPenc_pP
);
reestablishment_ongoing
);
break
;
break
;
}
}
break
;
break
;
case
LTE_SRB_ToAddMod__rlc_Config_PR_defaultValue
:
case
LTE_SRB_ToAddMod__rlc_Config_PR_defaultValue
:
pdcp_config_req_asn1
(
pdcp_config_req_asn1
(
ctxt_pP
,
ctxt_pP
,
pdcp_p
,
pdcp_p
,
SRB_FLAG_YES
,
SRB_FLAG_YES
,
rlc_type
,
rlc_type
,
action
,
action
,
lc_id
,
lc
_id
,
mch
_id
,
mch
_id
,
srb
_id
,
srb_id
,
srb_sn
,
srb_sn
,
0
,
// drb_report
0
,
// drb_report
0
,
// header compression
0
,
// header compression
security_modeP
,
security_mode
P
,
kRRCenc_p
P
,
kRRCenc
_pP
,
kRRCint
_pP
,
kRRCint
_pP
,
kUPenc
_pP
,
kUPenc_pP
);
reestablishment_ongoing
);
// already the default values
// already the default values
break
;
break
;
...
@@ -1729,6 +1735,21 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
...
@@ -1729,6 +1735,21 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
drb_report
=
drb_toaddmod_p
->
pdcp_Config
->
rlc_AM
->
statusReportRequired
;
drb_report
=
drb_toaddmod_p
->
pdcp_Config
->
rlc_AM
->
statusReportRequired
;
drb_sn
=
LTE_PDCP_Config__rlc_UM__pdcp_SN_Size_len12bits
;
// default SN size
drb_sn
=
LTE_PDCP_Config__rlc_UM__pdcp_SN_Size_len12bits
;
// default SN size
rlc_type
=
RLC_MODE_AM
;
rlc_type
=
RLC_MODE_AM
;
if
(
reestablishment_ongoing
)
{
// we need to keep previous SN numbers for reestablishment in AM mode
key_previous
=
PDCP_COLL_KEY_VALUE
(
ctxt_pP
->
module_id
,
previous_rnti_for_reestab
,
ctxt_pP
->
enb_flag
,
drb_id
,
SRB_FLAG_NO
);
h_rc_previous
=
hashtable_get
(
pdcp_coll_p
,
key_previous
,
(
void
**
)
&
pdcp_p_previous
);
LOG_I
(
PDCP
,
"SEE DRB pdcp_previous->next_pdcp_tx_sn=%d pdcp_previous->next_pdcp_rx_sn=%d
\n
"
,
pdcp_p_previous
->
next_pdcp_tx_sn
,
pdcp_p_previous
->
next_pdcp_rx_sn
);
pdcp_p
->
next_pdcp_tx_sn
=
pdcp_p_previous
->
next_pdcp_tx_sn
;
pdcp_p
->
next_pdcp_rx_sn
=
pdcp_p_previous
->
next_pdcp_rx_sn
;
pdcp_p
->
tx_hfn
=
pdcp_p_previous
->
tx_hfn
;
pdcp_p
->
rx_hfn
=
pdcp_p_previous
->
rx_hfn
;
pdcp_p
->
last_submitted_pdcp_rx_sn
=
pdcp_p_previous
->
last_submitted_pdcp_rx_sn
;
pdcp_p
->
first_missing_pdu
=
-
1
;
}
}
}
if
(
drb_toaddmod_p
->
pdcp_Config
->
rlc_UM
)
{
if
(
drb_toaddmod_p
->
pdcp_Config
->
rlc_UM
)
{
...
@@ -1777,22 +1798,22 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
...
@@ -1777,22 +1798,22 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
break
;
break
;
}
}
pdcp_config_req_asn1
(
pdcp_config_req_asn1
(
ctxt_pP
,
ctxt_pP
,
pdcp_p
,
pdcp_p
,
SRB_FLAG_NO
,
SRB_FLAG_NO
,
rlc_type
,
rlc_type
,
action
,
action
,
lc_id
,
lc
_id
,
mch
_id
,
mch
_id
,
drb
_id
,
drb_id
,
drb_sn
,
drb_sn
,
drb_report
,
drb_report
,
header_compression_profile
,
header_compression_profile
,
security_modeP
,
security_mode
P
,
kRRCenc_p
P
,
kRRCenc
_pP
,
kRRCint
_pP
,
kRRCint
_pP
,
kUPenc
_pP
,
kUPenc_pP
);
reestablishment_ongoing
);
}
}
}
}
}
}
...
@@ -1813,22 +1834,22 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
...
@@ -1813,22 +1834,22 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
lc_id
=
pdcp_p
->
lcid
;
lc_id
=
pdcp_p
->
lcid
;
action
=
CONFIG_ACTION_REMOVE
;
action
=
CONFIG_ACTION_REMOVE
;
pdcp_config_req_asn1
(
pdcp_config_req_asn1
(
ctxt_pP
,
ctxt_pP
,
pdcp_p
,
pdcp_p
,
SRB_FLAG_NO
,
SRB_FLAG_NO
,
rlc_type
,
rlc_type
,
action
,
action
,
lc_id
,
lc
_id
,
mch
_id
,
mch
_id
,
drb
_id
,
drb_id
,
0
,
0
,
0
,
0
,
0
,
0
,
security_modeP
,
security_mode
P
,
kRRCenc_p
P
,
kRRCenc
_pP
,
kRRCint
_pP
,
kRRCint
_pP
,
kUPenc
_pP
,
kUPenc_pP
);
reestablishment_ongoing
);
h_rc
=
hashtable_remove
(
pdcp_coll_p
,
key
);
h_rc
=
hashtable_remove
(
pdcp_coll_p
,
key
);
if
((
defaultDRB
!=
NULL
)
&&
(
*
defaultDRB
==
drb_id
))
{
if
((
defaultDRB
!=
NULL
)
&&
(
*
defaultDRB
==
drb_id
))
{
...
@@ -1888,22 +1909,22 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
...
@@ -1888,22 +1909,22 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
MBMS_SessionInfo_p
->
tmgi_r9
.
serviceId_r9
.
buf
[
2
],
MBMS_SessionInfo_p
->
tmgi_r9
.
serviceId_r9
.
buf
[
2
],
drb_id
,
drb_id
,
action
);
action
);
pdcp_config_req_asn1
(
pdcp_config_req_asn1
(
ctxt_pP
,
ctxt_pP
,
NULL
,
// unused for MBMS
NULL
,
// unused for MBMS
SRB_FLAG_NO
,
SRB_FLAG_NO
,
RLC_MODE_NONE
,
RLC_MODE_NONE
,
action
,
action
,
lc_id
,
lc
_id
,
mch
_id
,
mch
_id
,
drb
_id
,
drb_id
,
0
,
// unused for MBMS
0
,
// unused for MBMS
0
,
// unused for MBMS
0
,
// unused for MBMS
0
,
// unused for MBMS
0
,
// unused for MBMS
0
,
// unused for MBMS
0
,
// unused for MBMS
NULL
,
// unused for MBMS
NULL
,
// unused for MBMS
NULL
,
// unused for MBMS
NULL
,
// unused for MBMS
NULL
,
NULL
);
// unused for MBMS
reestablishment_ongoing
);
// unused for MBMS
}
}
}
}
}
}
...
@@ -1924,7 +1945,8 @@ static bool pdcp_config_req_asn1(const protocol_ctxt_t *const ctxt_pP,
...
@@ -1924,7 +1945,8 @@ static bool pdcp_config_req_asn1(const protocol_ctxt_t *const ctxt_pP,
const
uint8_t
security_modeP
,
const
uint8_t
security_modeP
,
uint8_t
*
const
kRRCenc_pP
,
uint8_t
*
const
kRRCenc_pP
,
uint8_t
*
const
kRRCint_pP
,
uint8_t
*
const
kRRCint_pP
,
uint8_t
*
const
kUPenc_pP
)
uint8_t
*
const
kUPenc_pP
,
bool
reestablisment_on_going
)
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
{
{
...
@@ -1975,12 +1997,14 @@ static bool pdcp_config_req_asn1(const protocol_ctxt_t *const ctxt_pP,
...
@@ -1975,12 +1997,14 @@ static bool pdcp_config_req_asn1(const protocol_ctxt_t *const ctxt_pP,
}
}
pdcp_pP
->
rlc_mode
=
rlc_modeP
;
pdcp_pP
->
rlc_mode
=
rlc_modeP
;
pdcp_pP
->
next_pdcp_tx_sn
=
0
;
if
(
!
reestablisment_on_going
&&
rlc_modeP
!=
RLC_MODE_AM
)
{
pdcp_pP
->
next_pdcp_rx_sn
=
0
;
pdcp_pP
->
next_pdcp_tx_sn
=
0
;
pdcp_pP
->
tx_hfn
=
0
;
pdcp_pP
->
next_pdcp_rx_sn
=
0
;
pdcp_pP
->
rx_hfn
=
0
;
pdcp_pP
->
tx_hfn
=
0
;
pdcp_pP
->
last_submitted_pdcp_rx_sn
=
4095
;
pdcp_pP
->
rx_hfn
=
0
;
pdcp_pP
->
first_missing_pdu
=
-
1
;
pdcp_pP
->
last_submitted_pdcp_rx_sn
=
4095
;
pdcp_pP
->
first_missing_pdu
=
-
1
;
}
LOG_I
(
PDCP
,
PROTOCOL_PDCP_CTXT_FMT
" Action ADD LCID %d (%s id %ld) "
LOG_I
(
PDCP
,
PROTOCOL_PDCP_CTXT_FMT
" Action ADD LCID %d (%s id %ld) "
"configured with SN size %d bits and RLC %s
\n
"
,
"configured with SN size %d bits and RLC %s
\n
"
,
PROTOCOL_PDCP_CTXT_ARGS
(
ctxt_pP
,
pdcp_pP
),
PROTOCOL_PDCP_CTXT_ARGS
(
ctxt_pP
,
pdcp_pP
),
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp.h
View file @
c40cceb4
...
@@ -297,30 +297,29 @@ void rrc_pdcp_config_req (
...
@@ -297,30 +297,29 @@ void rrc_pdcp_config_req (
const
rb_id_t
rb_idP
,
const
rb_id_t
rb_idP
,
const
uint8_t
security_modeP
);
const
uint8_t
security_modeP
);
/*! \fn bool rrc_pdcp_config_asn1_req (const protocol_ctxt_t* const , SRB_ToAddModList_t* srb2add_list, DRB_ToAddModList_t* drb2add_list, DRB_ToReleaseList_t* drb2release_list)
/*! \fn bool rrc_pdcp_config_asn1_req (const protocol_ctxt_t* const , SRB_ToAddModList_t* srb2add_list, DRB_ToAddModList_t*
* \brief Function for RRC to configure a Radio Bearer.
* drb2add_list, DRB_ToReleaseList_t* drb2release_list) \brief Function for RRC to configure a Radio Bearer. \param[in] ctxt_pP
* \param[in] ctxt_pP Running context.
* Running context. \param[in] index index of UE or eNB depending on the eNB_flag \param[in] srb2add_list SRB
* \param[in] index index of UE or eNB depending on the eNB_flag
* configuration list to be created. \param[in] drb2add_list DRB configuration list to be created. \param[in] drb2release_list
* \param[in] srb2add_list SRB configuration list to be created.
* DRB configuration list to be released. \param[in] security_mode Security algorithm to apply for integrity/ciphering
* \param[in] drb2add_list DRB configuration list to be created.
* \param[in] kRRCenc RRC encryption key
* \param[in] drb2release_list DRB configuration list to be released.
* \param[in] kRRCint RRC integrity key
* \param[in] security_mode Security algorithm to apply for integrity/ciphering
* \param[in] kUPenc User-Plane encryption key
* \param[in] kRRCenc RRC encryption key
* \param[in] defaultDRB Default DRB ID
* \param[in] kRRCint RRC integrity key
* \param[in] previous_rnti_for_reestab rnti in case of reestablishment to get previous pdcp context
* \param[in] kUPenc User-Plane encryption key
* \return A status about the processing, OK or error code.
* \param[in] defaultDRB Default DRB ID
*/
* \return A status about the processing, OK or error code.
bool
rrc_pdcp_config_asn1_req
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
*/
LTE_SRB_ToAddModList_t
*
const
srb2add_list
,
bool
rrc_pdcp_config_asn1_req
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
LTE_DRB_ToAddModList_t
*
const
drb2add_list
,
LTE_SRB_ToAddModList_t
*
const
srb2add_list
,
LTE_DRB_ToAddModList_t
*
const
drb2add_list
,
LTE_DRB_ToReleaseList_t
*
const
drb2release_list
,
LTE_DRB_ToReleaseList_t
*
const
drb2release_list
,
const
uint8_t
security_modeP
,
const
uint8_t
security_modeP
,
uint8_t
*
const
kRRCenc
,
uint8_t
*
const
kRRCenc
,
uint8_t
*
const
kRRCint
,
uint8_t
*
const
kRRCint
,
uint8_t
*
const
kUPenc
,
uint8_t
*
const
kUPenc
,
LTE_PMCH_InfoList_r9_t
*
pmch_InfoList_r9
,
LTE_PMCH_InfoList_r9_t
*
pmch_InfoList_r9
,
rb_id_t
*
const
defaultDRB
);
rb_id_t
*
const
defaultDRB
,
const
rnti_t
previous_rnti_for_reestab
);
/*! \fn void pdcp_add_UE(const protocol_ctxt_t* const ctxt_pP)
/*! \fn void pdcp_add_UE(const protocol_ctxt_t* const ctxt_pP)
* \brief Function (for RRC) to add a new UE in PDCP module
* \brief Function (for RRC) to add a new UE in PDCP module
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
View file @
c40cceb4
...
@@ -939,16 +939,17 @@ void nr_pdcp_add_drbs(eNB_flag_t enb_flag,
...
@@ -939,16 +939,17 @@ void nr_pdcp_add_drbs(eNB_flag_t enb_flag,
}
}
/* Dummy function due to dependency from LTE libraries */
/* Dummy function due to dependency from LTE libraries */
bool
rrc_pdcp_config_asn1_req
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
bool
rrc_pdcp_config_asn1_req
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
LTE_SRB_ToAddModList_t
*
const
srb2add_list
,
LTE_SRB_ToAddModList_t
*
const
srb2add_list
,
LTE_DRB_ToAddModList_t
*
const
drb2add_list
,
LTE_DRB_ToAddModList_t
*
const
drb2add_list
,
LTE_DRB_ToReleaseList_t
*
const
drb2release_list
,
LTE_DRB_ToReleaseList_t
*
const
drb2release_list
,
const
uint8_t
security_modeP
,
const
uint8_t
security_modeP
,
uint8_t
*
const
kRRCenc
,
uint8_t
*
const
kRRCenc
,
uint8_t
*
const
kRRCint
,
uint8_t
*
const
kRRCint
,
uint8_t
*
const
kUPenc
,
uint8_t
*
const
kUPenc
,
LTE_PMCH_InfoList_r9_t
*
pmch_InfoList_r9
,
LTE_PMCH_InfoList_r9_t
*
pmch_InfoList_r9
,
rb_id_t
*
const
defaultDRB
)
rb_id_t
*
const
defaultDRB
,
const
rnti_t
previous_rnti_for_reestab
)
{
{
return
0
;
return
0
;
}
}
...
...
openair2/RRC/LTE/rrc_UE.c
View file @
c40cceb4
...
@@ -1252,17 +1252,18 @@ rrc_ue_process_radioResourceConfigDedicated(
...
@@ -1252,17 +1252,18 @@ rrc_ue_process_radioResourceConfigDedicated(
derive_key_nas
(
RRC_INT_ALG
,
UE_rrc_inst
[
ctxt_pP
->
module_id
].
integrity_algorithm
,
UE_rrc_inst
[
ctxt_pP
->
module_id
].
kenb
,
kRRCint
);
derive_key_nas
(
RRC_INT_ALG
,
UE_rrc_inst
[
ctxt_pP
->
module_id
].
integrity_algorithm
,
UE_rrc_inst
[
ctxt_pP
->
module_id
].
kenb
,
kRRCint
);
// Refresh SRBs
// Refresh SRBs
rrc_pdcp_config_asn1_req
(
ctxt_pP
,
rrc_pdcp_config_asn1_req
(
radioResourceConfigDedicated
->
srb_ToAddModList
,
ctxt_pP
,
(
LTE_DRB_ToAddModList_t
*
)
NULL
,
radioResourceConfigDedicated
->
srb_ToAddModList
,
(
LTE_DRB_ToReleaseList_t
*
)
NULL
,
(
LTE_DRB_ToAddModList_t
*
)
NULL
,
UE_rrc_inst
[
ctxt_pP
->
module_id
].
ciphering_algorithm
|
(
LTE_DRB_ToReleaseList_t
*
)
NULL
,
(
UE_rrc_inst
[
ctxt_pP
->
module_id
].
integrity_algorithm
<<
4
),
UE_rrc_inst
[
ctxt_pP
->
module_id
].
ciphering_algorithm
|
(
UE_rrc_inst
[
ctxt_pP
->
module_id
].
integrity_algorithm
<<
4
),
kRRCenc
,
kRRCenc
,
kRRCint
,
kRRCint
,
NULL
,
NULL
,
(
LTE_PMCH_InfoList_r9_t
*
)
NULL
,
(
LTE_PMCH_InfoList_r9_t
*
)
NULL
,
NULL
);
NULL
,
0
);
// Refresh SRBs
// Refresh SRBs
rrc_rlc_config_asn1_req
(
ctxt_pP
,
rrc_rlc_config_asn1_req
(
ctxt_pP
,
radioResourceConfigDedicated
->
srb_ToAddModList
,
radioResourceConfigDedicated
->
srb_ToAddModList
,
...
@@ -1400,17 +1401,18 @@ rrc_ue_process_radioResourceConfigDedicated(
...
@@ -1400,17 +1401,18 @@ rrc_ue_process_radioResourceConfigDedicated(
derive_key_nas
(
UP_ENC_ALG
,
UE_rrc_inst
[
ctxt_pP
->
module_id
].
integrity_algorithm
,
UE_rrc_inst
[
ctxt_pP
->
module_id
].
kenb
,
kUPenc
);
derive_key_nas
(
UP_ENC_ALG
,
UE_rrc_inst
[
ctxt_pP
->
module_id
].
integrity_algorithm
,
UE_rrc_inst
[
ctxt_pP
->
module_id
].
kenb
,
kUPenc
);
// Refresh DRBs
// Refresh DRBs
rrc_pdcp_config_asn1_req
(
ctxt_pP
,
rrc_pdcp_config_asn1_req
(
(
LTE_SRB_ToAddModList_t
*
)
NULL
,
ctxt_pP
,
radioResourceConfigDedicated
->
drb_ToAddModList
,
(
LTE_SRB_ToAddModList_t
*
)
NULL
,
(
LTE_DRB_ToReleaseList_t
*
)
NULL
,
radioResourceConfigDedicated
->
drb_ToAddModList
,
UE_rrc_inst
[
ctxt_pP
->
module_id
].
ciphering_algorithm
|
(
LTE_DRB_ToReleaseList_t
*
)
NULL
,
(
UE_rrc_inst
[
ctxt_pP
->
module_id
].
integrity_algorithm
<<
4
),
UE_rrc_inst
[
ctxt_pP
->
module_id
].
ciphering_algorithm
|
(
UE_rrc_inst
[
ctxt_pP
->
module_id
].
integrity_algorithm
<<
4
),
NULL
,
NULL
,
NULL
,
NULL
,
kUPenc
,
kUPenc
,
(
LTE_PMCH_InfoList_r9_t
*
)
NULL
,
(
LTE_PMCH_InfoList_r9_t
*
)
NULL
,
UE_rrc_inst
[
ctxt_pP
->
module_id
].
defaultDRB
);
UE_rrc_inst
[
ctxt_pP
->
module_id
].
defaultDRB
,
0
);
// Refresh DRBs
// Refresh DRBs
rrc_rlc_config_asn1_req
(
ctxt_pP
,
rrc_rlc_config_asn1_req
(
ctxt_pP
,
(
LTE_SRB_ToAddModList_t
*
)
NULL
,
(
LTE_SRB_ToAddModList_t
*
)
NULL
,
...
@@ -4832,8 +4834,8 @@ void decode_MBSFNAreaConfiguration( module_id_t ue_mod_idP, uint8_t eNB_index, f
...
@@ -4832,8 +4834,8 @@ void decode_MBSFNAreaConfiguration( module_id_t ue_mod_idP, uint8_t eNB_index, f
NULL
,
// key rrc integrity
NULL
,
// key rrc integrity
NULL
,
// key encryption
NULL
,
// key encryption
&
(
UE_rrc_inst
[
ue_mod_idP
].
mcch_message
[
eNB_index
]
->
pmch_InfoList_r9
),
&
(
UE_rrc_inst
[
ue_mod_idP
].
mcch_message
[
eNB_index
]
->
pmch_InfoList_r9
),
NULL
NULL
,
);
0
);
rrc_rlc_config_asn1_req
(
&
ctxt
,
rrc_rlc_config_asn1_req
(
&
ctxt
,
NULL
,
// SRB_ToAddModList
NULL
,
// SRB_ToAddModList
NULL
,
// DRB_ToAddModList
NULL
,
// DRB_ToAddModList
...
@@ -5828,12 +5830,16 @@ void *rrc_control_socket_thread_fct(void *arg) {
...
@@ -5828,12 +5830,16 @@ void *rrc_control_socket_thread_fct(void *arg) {
UE
->
DRB_configList
=
CALLOC
(
1
,
sizeof
(
LTE_DRB_ToAddModList_t
));
UE
->
DRB_configList
=
CALLOC
(
1
,
sizeof
(
LTE_DRB_ToAddModList_t
));
asn1cSeqAdd
(
&
UE
->
DRB_configList
->
list
,
UE
->
DRB_config
[
0
][
0
]);
asn1cSeqAdd
(
&
UE
->
DRB_configList
->
list
,
UE
->
DRB_config
[
0
][
0
]);
rrc_pdcp_config_asn1_req
(
&
ctxt
,
rrc_pdcp_config_asn1_req
(
&
ctxt
,
(
LTE_SRB_ToAddModList_t
*
)
NULL
,
(
LTE_SRB_ToAddModList_t
*
)
NULL
,
UE
->
DRB_configList
,
UE
->
DRB_configList
,
(
LTE_DRB_ToReleaseList_t
*
)
NULL
,
(
LTE_DRB_ToReleaseList_t
*
)
NULL
,
0xff
,
NULL
,
NULL
,
NULL
,
0xff
,
(
LTE_PMCH_InfoList_r9_t
*
)
NULL
NULL
,
,
NULL
);
NULL
,
NULL
,
(
LTE_PMCH_InfoList_r9_t
*
)
NULL
,
NULL
,
0
);
rrc_rlc_config_asn1_req
(
&
ctxt
,
rrc_rlc_config_asn1_req
(
&
ctxt
,
(
LTE_SRB_ToAddModList_t
*
)
NULL
,
(
LTE_SRB_ToAddModList_t
*
)
NULL
,
UE
->
DRB_configList
,
UE
->
DRB_configList
,
...
@@ -6033,11 +6039,16 @@ void *rrc_control_socket_thread_fct(void *arg) {
...
@@ -6033,11 +6039,16 @@ void *rrc_control_socket_thread_fct(void *arg) {
UE
->
DRB_configList
=
CALLOC
(
1
,
sizeof
(
LTE_DRB_ToAddModList_t
));
UE
->
DRB_configList
=
CALLOC
(
1
,
sizeof
(
LTE_DRB_ToAddModList_t
));
asn1cSeqAdd
(
&
UE
->
DRB_configList
->
list
,
UE
->
DRB_config
[
0
][
0
]);
asn1cSeqAdd
(
&
UE
->
DRB_configList
->
list
,
UE
->
DRB_config
[
0
][
0
]);
rrc_pdcp_config_asn1_req
(
&
ctxt
,
rrc_pdcp_config_asn1_req
(
&
ctxt
,
(
LTE_SRB_ToAddModList_t
*
)
NULL
,
(
LTE_SRB_ToAddModList_t
*
)
NULL
,
UE
->
DRB_configList
,
UE
->
DRB_configList
,
(
LTE_DRB_ToReleaseList_t
*
)
NULL
,
(
LTE_DRB_ToReleaseList_t
*
)
NULL
,
0xff
,
NULL
,
NULL
,
NULL
,
0xff
,
(
LTE_PMCH_InfoList_r9_t
*
)
NULL
,
NULL
);
NULL
,
NULL
,
NULL
,
(
LTE_PMCH_InfoList_r9_t
*
)
NULL
,
NULL
,
0
);
rrc_rlc_config_asn1_req
(
&
ctxt
,
rrc_rlc_config_asn1_req
(
&
ctxt
,
(
LTE_SRB_ToAddModList_t
*
)
NULL
,
(
LTE_SRB_ToAddModList_t
*
)
NULL
,
UE
->
DRB_configList
,
UE
->
DRB_configList
,
...
@@ -6187,11 +6198,16 @@ void *rrc_control_socket_thread_fct(void *arg) {
...
@@ -6187,11 +6198,16 @@ void *rrc_control_socket_thread_fct(void *arg) {
UE
->
DRB_configList
=
CALLOC
(
1
,
sizeof
(
LTE_DRB_ToAddModList_t
));
UE
->
DRB_configList
=
CALLOC
(
1
,
sizeof
(
LTE_DRB_ToAddModList_t
));
asn1cSeqAdd
(
&
UE
->
DRB_configList
->
list
,
UE
->
DRB_config
[
0
][
0
]);
asn1cSeqAdd
(
&
UE
->
DRB_configList
->
list
,
UE
->
DRB_config
[
0
][
0
]);
rrc_pdcp_config_asn1_req
(
&
ctxt
,
rrc_pdcp_config_asn1_req
(
&
ctxt
,
(
LTE_SRB_ToAddModList_t
*
)
NULL
,
(
LTE_SRB_ToAddModList_t
*
)
NULL
,
UE
->
DRB_configList
,
UE
->
DRB_configList
,
(
LTE_DRB_ToReleaseList_t
*
)
NULL
,
(
LTE_DRB_ToReleaseList_t
*
)
NULL
,
0xff
,
NULL
,
NULL
,
NULL
,
0xff
,
(
LTE_PMCH_InfoList_r9_t
*
)
NULL
,
NULL
);
NULL
,
NULL
,
NULL
,
(
LTE_PMCH_InfoList_r9_t
*
)
NULL
,
NULL
,
0
);
rrc_rlc_config_asn1_req
(
&
ctxt
,
rrc_rlc_config_asn1_req
(
&
ctxt
,
(
LTE_SRB_ToAddModList_t
*
)
NULL
,
(
LTE_SRB_ToAddModList_t
*
)
NULL
,
UE
->
DRB_configList
,
UE
->
DRB_configList
,
...
...
openair2/RRC/LTE/rrc_eNB.c
View file @
c40cceb4
...
@@ -528,15 +528,17 @@ static void init_MBMS(
...
@@ -528,15 +528,17 @@ static void init_MBMS(
LOG_D
(
RRC
,
"[eNB %d] Frame %d : Radio Bearer config request for MBMS
\n
"
,
enb_mod_idP
,
frameP
);
//check the lcid
LOG_D
(
RRC
,
"[eNB %d] Frame %d : Radio Bearer config request for MBMS
\n
"
,
enb_mod_idP
,
frameP
);
//check the lcid
// Configuring PDCP and RLC for MBMS Radio Bearer
// Configuring PDCP and RLC for MBMS Radio Bearer
rrc_pdcp_config_asn1_req
(
&
ctxt
,
rrc_pdcp_config_asn1_req
(
&
ctxt
,
(
LTE_SRB_ToAddModList_t
*
)
NULL
,
// LTE_SRB_ToAddModList
(
LTE_SRB_ToAddModList_t
*
)
NULL
,
// LTE_SRB_ToAddModList
(
LTE_DRB_ToAddModList_t
*
)
NULL
,
// LTE_DRB_ToAddModList
(
LTE_DRB_ToAddModList_t
*
)
NULL
,
// LTE_DRB_ToAddModList
(
LTE_DRB_ToReleaseList_t
*
)
NULL
,
(
LTE_DRB_ToReleaseList_t
*
)
NULL
,
0
,
// security mode
0
,
// security mode
NULL
,
// key rrc encryption
NULL
,
// key rrc encryption
NULL
,
// key rrc integrity
NULL
,
// key rrc integrity
NULL
// key encryption
NULL
// key encryption
,
&
(
RC
.
rrc
[
enb_mod_idP
]
->
carrier
[
CC_id
].
mcch_message
->
pmch_InfoList_r9
)
,
,
NULL
);
&
(
RC
.
rrc
[
enb_mod_idP
]
->
carrier
[
CC_id
].
mcch_message
->
pmch_InfoList_r9
),
NULL
,
0
);
rrc_rlc_config_asn1_req
(
&
ctxt
,
rrc_rlc_config_asn1_req
(
&
ctxt
,
NULL
,
// LTE_SRB_ToAddModList
NULL
,
// LTE_SRB_ToAddModList
...
@@ -1195,12 +1197,8 @@ rrc_eNB_generate_RRCConnectionReestablishment(
...
@@ -1195,12 +1197,8 @@ rrc_eNB_generate_RRCConnectionReestablishment(
rrc_eNB_carrier_data_t
*
carrier
=
NULL
;
rrc_eNB_carrier_data_t
*
carrier
=
NULL
;
eNB_RRC_UE_t
*
ue_context
=
NULL
;
eNB_RRC_UE_t
*
ue_context
=
NULL
;
module_id_t
module_id
=
ctxt_pP
->
module_id
;
module_id_t
module_id
=
ctxt_pP
->
module_id
;
uint16_t
rnti
=
ctxt_pP
->
rntiMaybeUEid
;
uint16_t
new_rnti
=
ctxt_pP
->
rntiMaybeUEid
;
T
(
T_ENB_RRC_CONNECTION_REESTABLISHMENT
,
T
(
T_ENB_RRC_CONNECTION_REESTABLISHMENT
,
T_INT
(
module_id
),
T_INT
(
ctxt_pP
->
frame
),
T_INT
(
ctxt_pP
->
subframe
),
T_INT
(
new_rnti
));
T_INT
(
module_id
),
T_INT
(
ctxt_pP
->
frame
),
T_INT
(
ctxt_pP
->
subframe
),
T_INT
(
rnti
));
SRB_configList
=
&
(
ue_context_pP
->
ue_context
.
SRB_configList
);
SRB_configList
=
&
(
ue_context_pP
->
ue_context
.
SRB_configList
);
carrier
=
&
(
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
carrier
[
CC_id
]);
carrier
=
&
(
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
carrier
[
CC_id
]);
ue_context
=
&
(
ue_context_pP
->
ue_context
);
ue_context
=
&
(
ue_context_pP
->
ue_context
);
...
@@ -1251,7 +1249,7 @@ rrc_eNB_generate_RRCConnectionReestablishment(
...
@@ -1251,7 +1249,7 @@ rrc_eNB_generate_RRCConnectionReestablishment(
LOG_I
(
RRC
,
PROTOCOL_RRC_CTXT_UE_FMT
" [RAPROC] Logical Channel DL-CCCH, Generating LTE_RRCConnectionReestablishment (bytes %d)
\n
"
,
LOG_I
(
RRC
,
PROTOCOL_RRC_CTXT_UE_FMT
" [RAPROC] Logical Channel DL-CCCH, Generating LTE_RRCConnectionReestablishment (bytes %d)
\n
"
,
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
ue_context
->
Srb0
.
Tx_buffer
.
payload_size
);
ue_context
->
Srb0
.
Tx_buffer
.
payload_size
);
UE_id
=
find_UE_id
(
module_id
,
rnti
);
UE_id
=
find_UE_id
(
module_id
,
new_
rnti
);
if
(
UE_id
!=
-
1
)
{
if
(
UE_id
!=
-
1
)
{
/* Activate reject timer, if RRCComplete not received after 10 frames, reject UE */
/* Activate reject timer, if RRCComplete not received after 10 frames, reject UE */
...
@@ -1259,9 +1257,10 @@ rrc_eNB_generate_RRCConnectionReestablishment(
...
@@ -1259,9 +1257,10 @@ rrc_eNB_generate_RRCConnectionReestablishment(
/* Reject UE after 10 frames, LTE_RRCConnectionReestablishmentReject is triggered */
/* Reject UE after 10 frames, LTE_RRCConnectionReestablishmentReject is triggered */
RC
.
mac
[
module_id
]
->
UE_info
.
UE_sched_ctrl
[
UE_id
].
ue_reestablishment_reject_timer_thres
=
100
;
RC
.
mac
[
module_id
]
->
UE_info
.
UE_sched_ctrl
[
UE_id
].
ue_reestablishment_reject_timer_thres
=
100
;
}
else
{
}
else
{
LOG_E
(
RRC
,
PROTOCOL_RRC_CTXT_UE_FMT
" Generating LTE_RRCConnectionReestablishment without UE_id(MAC) rnti %x
\n
"
,
LOG_E
(
RRC
,
PROTOCOL_RRC_CTXT_UE_FMT
" Generating LTE_RRCConnectionReestablishment without UE_id(MAC) rnti %x
\n
"
,
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
rnti
);
new_
rnti
);
}
}
}
}
...
@@ -1793,6 +1792,29 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
...
@@ -1793,6 +1792,29 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
size
,
size
,
buffer
,
buffer
,
PDCP_TRANSMISSION_MODE_CONTROL
);
PDCP_TRANSMISSION_MODE_CONTROL
);
rrc_pdcp_config_asn1_req
(
ctxt_pP
,
*
SRB_configList2
,
// NULL,
DRB_configList
,
NULL
,
0xff
,
// already configured during the securitymodecommand
NULL
,
NULL
,
NULL
,
(
LTE_PMCH_InfoList_r9_t
*
)
NULL
,
NULL
,
reestablish_rnti
);
// /* Refresh SRBs/DRBs */
// if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type))
// {
// rrc_rlc_config_asn1_req(ctxt_pP,
// *SRB_configList2, // NULL,
// DRB_configList,
// NULL, (LTE_PMCH_InfoList_r9_t *)NULL,
// 0,
// 0);
// }
}
}
LOG_I
(
RRC
,
"[RRCConnectionReestablishment]put UE %x into freeList
\n
"
,
reestablish_rnti
);
LOG_I
(
RRC
,
"[RRCConnectionReestablishment]put UE %x into freeList
\n
"
,
reestablish_rnti
);
...
@@ -3217,9 +3239,10 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
...
@@ -3217,9 +3239,10 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
0xff
,
// already configured during the securitymodecommand
0xff
,
// already configured during the securitymodecommand
NULL
,
NULL
,
NULL
,
NULL
,
NULL
NULL
,
,
(
LTE_PMCH_InfoList_r9_t
*
)
NULL
(
LTE_PMCH_InfoList_r9_t
*
)
NULL
,
,
NULL
);
NULL
,
0
);
/* Refresh SRBs/DRBs */
/* Refresh SRBs/DRBs */
rrc_rlc_config_asn1_req
(
ctxt_pP
,
rrc_rlc_config_asn1_req
(
ctxt_pP
,
...
@@ -5045,9 +5068,10 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
...
@@ -5045,9 +5068,10 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
0xff
,
// already configured during the securitymodecommand
0xff
,
// already configured during the securitymodecommand
NULL
,
NULL
,
NULL
,
NULL
,
NULL
NULL
,
,
(
LTE_PMCH_InfoList_r9_t
*
)
NULL
(
LTE_PMCH_InfoList_r9_t
*
)
NULL
,
,
NULL
);
NULL
,
0
);
/* Refresh SRBs/DRBs */
/* Refresh SRBs/DRBs */
rrc_rlc_config_asn1_req
(
ctxt_pP
,
rrc_rlc_config_asn1_req
(
ctxt_pP
,
...
@@ -5094,13 +5118,15 @@ rrc_eNB_configure_rbs_handover(struct rrc_eNB_ue_context_s *ue_context_p, protoc
...
@@ -5094,13 +5118,15 @@ rrc_eNB_configure_rbs_handover(struct rrc_eNB_ue_context_s *ue_context_p, protoc
// Configure PDCP/RLC for the target
// Configure PDCP/RLC for the target
rrc_pdcp_config_asn1_req
(
ctxt_pP
,
rrc_pdcp_config_asn1_req
(
ctxt_pP
,
ue_context_p
->
ue_context
.
SRB_configList
,
ue_context_p
->
ue_context
.
SRB_configList
,
(
LTE_DRB_ToAddModList_t
*
)
NULL
,
(
LTE_DRB_ToAddModList_t
*
)
NULL
,
(
LTE_DRB_ToReleaseList_t
*
)
NULL
,
(
LTE_DRB_ToReleaseList_t
*
)
NULL
,
0xff
,
0xff
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
(
LTE_PMCH_InfoList_r9_t
*
)
NULL
,
NULL
);
(
LTE_PMCH_InfoList_r9_t
*
)
NULL
,
NULL
,
0
);
rrc_rlc_config_asn1_req
(
ctxt_pP
,
ue_context_p
->
ue_context
.
SRB_configList
,
(
LTE_DRB_ToAddModList_t
*
)
NULL
,
(
LTE_DRB_ToReleaseList_t
*
)
NULL
,
(
LTE_PMCH_InfoList_r9_t
*
)
NULL
,
0
,
0
);
rrc_rlc_config_asn1_req
(
ctxt_pP
,
ue_context_p
->
ue_context
.
SRB_configList
,
(
LTE_DRB_ToAddModList_t
*
)
NULL
,
(
LTE_DRB_ToReleaseList_t
*
)
NULL
,
(
LTE_PMCH_InfoList_r9_t
*
)
NULL
,
0
,
0
);
...
@@ -5192,8 +5218,9 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
...
@@ -5192,8 +5218,9 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
kRRCenc
,
kRRCenc
,
kRRCint
,
kRRCint
,
kUPenc
,
kUPenc
,
(
LTE_PMCH_InfoList_r9_t
*
)
NULL
,
(
LTE_PMCH_InfoList_r9_t
*
)
NULL
,
NULL
);
NULL
,
0
);
/* Refresh SRBs/DRBs */
/* Refresh SRBs/DRBs */
rrc_rlc_config_asn1_req
(
ctxt_pP
,
rrc_rlc_config_asn1_req
(
ctxt_pP
,
...
@@ -5630,7 +5657,7 @@ rrc_eNB_decode_ccch(
...
@@ -5630,7 +5657,7 @@ rrc_eNB_decode_ccch(
(
rrcConnectionReestablishmentRequest
->
reestablishmentCause
==
LTE_ReestablishmentCause_handoverFailure
)
?
"Handover Failure"
:
(
rrcConnectionReestablishmentRequest
->
reestablishmentCause
==
LTE_ReestablishmentCause_handoverFailure
)
?
"Handover Failure"
:
"reconfigurationFailure"
));
"reconfigurationFailure"
));
{
{
uint16_t
c
_rnti
=
0
;
uint16_t
old
_rnti
=
0
;
if
(
rrcConnectionReestablishmentRequest
->
ue_Identity
.
physCellId
!=
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
carrier
[
CC_id
].
physCellId
)
{
if
(
rrcConnectionReestablishmentRequest
->
ue_Identity
.
physCellId
!=
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
carrier
[
CC_id
].
physCellId
)
{
/* UE was moving from previous cell so quickly that RRCConnectionReestablishment for previous cell was recieved in this cell */
/* UE was moving from previous cell so quickly that RRCConnectionReestablishment for previous cell was recieved in this cell */
...
@@ -5662,9 +5689,9 @@ rrc_eNB_decode_ccch(
...
@@ -5662,9 +5689,9 @@ rrc_eNB_decode_ccch(
break
;
break
;
}
}
c
_rnti
=
BIT_STRING_to_uint16
(
&
rrcConnectionReestablishmentRequest
->
ue_Identity
.
c_RNTI
);
old
_rnti
=
BIT_STRING_to_uint16
(
&
rrcConnectionReestablishmentRequest
->
ue_Identity
.
c_RNTI
);
LOG_I
(
RRC
,
"reestablishment, previous
c_rnti is %x (new is %lx)
\n
"
,
c
_rnti
,
ctxt_pP
->
rntiMaybeUEid
);
LOG_I
(
RRC
,
"reestablishment, previous
rnti is %x (new is %lx)
\n
"
,
old
_rnti
,
ctxt_pP
->
rntiMaybeUEid
);
ue_context_p
=
rrc_eNB_get_ue_context
(
RC
.
rrc
[
ctxt_pP
->
module_id
],
c
_rnti
);
ue_context_p
=
rrc_eNB_get_ue_context
(
RC
.
rrc
[
ctxt_pP
->
module_id
],
old
_rnti
);
if
(
ue_context_p
==
NULL
)
{
if
(
ue_context_p
==
NULL
)
{
LOG_E
(
RRC
,
LOG_E
(
RRC
,
...
@@ -5675,12 +5702,14 @@ rrc_eNB_decode_ccch(
...
@@ -5675,12 +5702,14 @@ rrc_eNB_decode_ccch(
break
;
break
;
}
}
int
UE_id
=
find_UE_id
(
ctxt_pP
->
module_id
,
c
_rnti
);
int
UE_id
=
find_UE_id
(
ctxt_pP
->
module_id
,
old
_rnti
);
if
(
UE_id
==
-
1
)
{
if
(
UE_id
==
-
1
)
{
LOG_E
(
RRC
,
LOG_E
(
RRC
,
PROTOCOL_RRC_CTXT_UE_FMT
" LTE_RRCConnectionReestablishmentRequest without UE_id(MAC) rnti %x, let's reject the UE
\n
"
,
PROTOCOL_RRC_CTXT_UE_FMT
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
c_rnti
);
" LTE_RRCConnectionReestablishmentRequest without UE_id(MAC) rnti %x, let's reject the UE
\n
"
,
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
old_rnti
);
rrc_eNB_generate_RRCConnectionReestablishmentReject
(
ctxt_pP
,
ue_context_p
,
CC_id
);
rrc_eNB_generate_RRCConnectionReestablishmentReject
(
ctxt_pP
,
ue_context_p
,
CC_id
);
break
;
break
;
}
}
...
@@ -5695,23 +5724,25 @@ rrc_eNB_decode_ccch(
...
@@ -5695,23 +5724,25 @@ rrc_eNB_decode_ccch(
ue_context_p
->
ue_context
.
ue_reestablishment_timer
=
0
;
ue_context_p
->
ue_context
.
ue_reestablishment_timer
=
0
;
}
}
//
previous rnti
//
Check if we already have a request on going for same rnti (old)
rnti_t
previous_rnti
=
0
;
rnti_t
previous_
new_
rnti
=
0
;
for
(
i
=
0
;
i
<
MAX_MOBILES_PER_ENB
;
i
++
)
{
for
(
i
=
0
;
i
<
MAX_MOBILES_PER_ENB
;
i
++
)
{
if
(
reestablish_rnti_map
[
i
][
1
]
==
c
_rnti
)
{
if
(
reestablish_rnti_map
[
i
][
1
]
==
old
_rnti
)
{
previous_rnti
=
reestablish_rnti_map
[
i
][
0
];
previous_
new_
rnti
=
reestablish_rnti_map
[
i
][
0
];
break
;
break
;
}
}
}
}
if
(
previous
_rnti
!=
0
)
{
if
(
previous_new
_rnti
!=
0
)
{
UE_id
=
find_UE_id
(
ctxt_pP
->
module_id
,
previous_rnti
);
UE_id
=
find_UE_id
(
ctxt_pP
->
module_id
,
previous_
new_
rnti
);
if
(
UE_id
==
-
1
)
{
if
(
UE_id
==
-
1
)
{
LOG_E
(
RRC
,
LOG_E
(
RRC
,
PROTOCOL_RRC_CTXT_UE_FMT
" RRCConnectionReestablishmentRequest without UE_id(MAC) previous rnti %x, let's reject the UE
\n
"
,
PROTOCOL_RRC_CTXT_UE_FMT
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
previous_rnti
);
" RRCConnectionReestablishmentRequest without UE_id(MAC) previous rnti %x, let's reject the UE
\n
"
,
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
previous_new_rnti
);
rrc_eNB_generate_RRCConnectionReestablishmentReject
(
ctxt_pP
,
ue_context_p
,
CC_id
);
rrc_eNB_generate_RRCConnectionReestablishmentReject
(
ctxt_pP
,
ue_context_p
,
CC_id
);
break
;
break
;
}
}
...
@@ -5730,8 +5761,10 @@ rrc_eNB_decode_ccch(
...
@@ -5730,8 +5761,10 @@ rrc_eNB_decode_ccch(
//c-plane not end
//c-plane not end
if
((
ue_context_p
->
ue_context
.
StatusRrc
!=
RRC_RECONFIGURED
)
&&
(
ue_context_p
->
ue_context
.
reestablishment_cause
==
LTE_ReestablishmentCause_spare1
))
{
if
((
ue_context_p
->
ue_context
.
StatusRrc
!=
RRC_RECONFIGURED
)
&&
(
ue_context_p
->
ue_context
.
reestablishment_cause
==
LTE_ReestablishmentCause_spare1
))
{
LOG_E
(
RRC
,
LOG_E
(
RRC
,
PROTOCOL_RRC_CTXT_UE_FMT
" LTE_RRCConnectionReestablishmentRequest (UE %x c-plane is not end), let's reject the UE
\n
"
,
PROTOCOL_RRC_CTXT_UE_FMT
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
c_rnti
);
" LTE_RRCConnectionReestablishmentRequest (UE %x c-plane is not end), let's reject the UE
\n
"
,
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
old_rnti
);
rrc_eNB_generate_RRCConnectionReestablishmentReject
(
ctxt_pP
,
ue_context_p
,
CC_id
);
rrc_eNB_generate_RRCConnectionReestablishmentReject
(
ctxt_pP
,
ue_context_p
,
CC_id
);
break
;
break
;
}
}
...
@@ -5746,7 +5779,7 @@ rrc_eNB_decode_ccch(
...
@@ -5746,7 +5779,7 @@ rrc_eNB_decode_ccch(
PROTOCOL_CTXT_SET_BY_INSTANCE
(
&
ctxt_old_p
,
PROTOCOL_CTXT_SET_BY_INSTANCE
(
&
ctxt_old_p
,
ctxt_pP
->
instance
,
ctxt_pP
->
instance
,
ENB_FLAG_YES
,
ENB_FLAG_YES
,
c
_rnti
,
old
_rnti
,
ctxt_pP
->
frame
,
ctxt_pP
->
frame
,
ctxt_pP
->
subframe
);
ctxt_pP
->
subframe
);
rrc_eNB_process_RRCConnectionReconfigurationComplete
(
&
ctxt_old_p
,
rrc_eNB_process_RRCConnectionReconfigurationComplete
(
&
ctxt_old_p
,
...
@@ -5777,8 +5810,8 @@ rrc_eNB_decode_ccch(
...
@@ -5777,8 +5810,8 @@ rrc_eNB_decode_ccch(
// insert C-RNTI to map
// insert C-RNTI to map
for
(
i
=
0
;
i
<
MAX_MOBILES_PER_ENB
;
i
++
)
{
for
(
i
=
0
;
i
<
MAX_MOBILES_PER_ENB
;
i
++
)
{
if
(
reestablish_rnti_map
[
i
][
0
]
==
0
)
{
if
(
reestablish_rnti_map
[
i
][
0
]
==
0
)
{
reestablish_rnti_map
[
i
][
0
]
=
ctxt_pP
->
rntiMaybeUEid
;
reestablish_rnti_map
[
i
][
0
]
=
ctxt_pP
->
rntiMaybeUEid
;
// New rnti
reestablish_rnti_map
[
i
][
1
]
=
c
_rnti
;
reestablish_rnti_map
[
i
][
1
]
=
old
_rnti
;
LOG_D
(
RRC
,
"reestablish_rnti_map[%d] [0] %x, [1] %x
\n
"
,
LOG_D
(
RRC
,
"reestablish_rnti_map[%d] [0] %x, [1] %x
\n
"
,
i
,
reestablish_rnti_map
[
i
][
0
],
reestablish_rnti_map
[
i
][
1
]);
i
,
reestablish_rnti_map
[
i
][
0
],
reestablish_rnti_map
[
i
][
1
]);
break
;
break
;
...
@@ -5786,6 +5819,10 @@ rrc_eNB_decode_ccch(
...
@@ -5786,6 +5819,10 @@ rrc_eNB_decode_ccch(
}
}
ue_context_p
->
ue_context
.
reestablishment_cause
=
rrcConnectionReestablishmentRequest
->
reestablishmentCause
;
ue_context_p
->
ue_context
.
reestablishment_cause
=
rrcConnectionReestablishmentRequest
->
reestablishmentCause
;
ue_context_p
->
ue_context
.
StatusRrc
=
RRC_INACTIVE
;
// Ue should be inactive !
ue_context_p
->
ue_context
.
rnti
=
ctxt_pP
->
rntiMaybeUEid
;
// We need to talk to the UE with the new rnti for RRCConnectionReestablishment
LOG_D
(
RRC
,
PROTOCOL_RRC_CTXT_UE_FMT
" Accept connection reestablishment request from UE physCellId %ld cause %ld
\n
"
,
LOG_D
(
RRC
,
PROTOCOL_RRC_CTXT_UE_FMT
" Accept connection reestablishment request from UE physCellId %ld cause %ld
\n
"
,
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
rrcConnectionReestablishmentRequest
->
ue_Identity
.
physCellId
,
rrcConnectionReestablishmentRequest
->
ue_Identity
.
physCellId
,
...
@@ -5817,14 +5854,15 @@ rrc_eNB_decode_ccch(
...
@@ -5817,14 +5854,15 @@ rrc_eNB_decode_ccch(
Idx
);
Idx
);
rrc_pdcp_config_asn1_req
(
ctxt_pP
,
rrc_pdcp_config_asn1_req
(
ctxt_pP
,
ue_context_p
->
ue_context
.
SRB_configList
,
ue_context_p
->
ue_context
.
SRB_configList
,
(
LTE_DRB_ToAddModList_t
*
)
NULL
,
(
LTE_DRB_ToAddModList_t
*
)
NULL
,
(
LTE_DRB_ToReleaseList_t
*
)
NULL
,
(
LTE_DRB_ToReleaseList_t
*
)
NULL
,
0xff
,
0xff
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
NULL
,
,
(
LTE_PMCH_InfoList_r9_t
*
)
NULL
(
LTE_PMCH_InfoList_r9_t
*
)
NULL
,
,
NULL
);
NULL
,
0
);
rrc_rlc_config_asn1_req
(
ctxt_pP
,
ue_context_p
->
ue_context
.
SRB_configList
,
NULL
,
NULL
,
NULL
,
0
,
0
);
rrc_rlc_config_asn1_req
(
ctxt_pP
,
ue_context_p
->
ue_context
.
SRB_configList
,
NULL
,
NULL
,
NULL
,
0
,
0
);
}
}
...
@@ -5994,13 +6032,15 @@ rrc_eNB_decode_ccch(
...
@@ -5994,13 +6032,15 @@ rrc_eNB_decode_ccch(
Idx
);
Idx
);
rrc_pdcp_config_asn1_req
(
ctxt_pP
,
rrc_pdcp_config_asn1_req
(
ctxt_pP
,
ue_context_p
->
ue_context
.
SRB_configList
,
ue_context_p
->
ue_context
.
SRB_configList
,
(
LTE_DRB_ToAddModList_t
*
)
NULL
,
(
LTE_DRB_ToAddModList_t
*
)
NULL
,
(
LTE_DRB_ToReleaseList_t
*
)
NULL
,
(
LTE_DRB_ToReleaseList_t
*
)
NULL
,
0xff
,
0xff
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
(
LTE_PMCH_InfoList_r9_t
*
)
NULL
,
NULL
);
(
LTE_PMCH_InfoList_r9_t
*
)
NULL
,
NULL
,
0
);
rrc_rlc_config_asn1_req
(
ctxt_pP
,
ue_context_p
->
ue_context
.
SRB_configList
,
NULL
,
NULL
,
NULL
,
0
,
0
);
rrc_rlc_config_asn1_req
(
ctxt_pP
,
ue_context_p
->
ue_context
.
SRB_configList
,
NULL
,
NULL
,
NULL
,
0
,
0
);
...
@@ -6563,9 +6603,7 @@ rrc_eNB_decode_dcch(
...
@@ -6563,9 +6603,7 @@ rrc_eNB_decode_dcch(
for
(
i
=
0
;
i
<
MAX_MOBILES_PER_ENB
;
i
++
)
{
for
(
i
=
0
;
i
<
MAX_MOBILES_PER_ENB
;
i
++
)
{
if
(
reestablish_rnti_map
[
i
][
0
]
==
ctxt_pP
->
rntiMaybeUEid
)
{
if
(
reestablish_rnti_map
[
i
][
0
]
==
ctxt_pP
->
rntiMaybeUEid
)
{
reestablish_rnti
=
reestablish_rnti_map
[
i
][
1
];
reestablish_rnti
=
reestablish_rnti_map
[
i
][
1
];
ue_context_p
=
rrc_eNB_get_ue_context
(
LOG_D
(
RRC
,
"reestablish_rnti = %x,
\n
"
,
reestablish_rnti
);
RC
.
rrc
[
ctxt_pP
->
module_id
],
reestablish_rnti
);
// clear currentC-RNTI from map
// clear currentC-RNTI from map
reestablish_rnti_map
[
i
][
0
]
=
0
;
reestablish_rnti_map
[
i
][
0
]
=
0
;
reestablish_rnti_map
[
i
][
1
]
=
0
;
reestablish_rnti_map
[
i
][
1
]
=
0
;
...
...
openair2/RRC/LTE/rrc_eNB_M2AP.c
View file @
c40cceb4
...
@@ -268,15 +268,17 @@ static void rrc_M2AP_init_MBMS(
...
@@ -268,15 +268,17 @@ static void rrc_M2AP_init_MBMS(
LOG_I
(
RRC
,
"[eNB %d] Frame %d : Radio Bearer config request for MBMS
\n
"
,
enb_mod_idP
,
frameP
);
//check the lcid
LOG_I
(
RRC
,
"[eNB %d] Frame %d : Radio Bearer config request for MBMS
\n
"
,
enb_mod_idP
,
frameP
);
//check the lcid
// Configuring PDCP and RLC for MBMS Radio Bearer
// Configuring PDCP and RLC for MBMS Radio Bearer
rrc_pdcp_config_asn1_req
(
&
ctxt
,
rrc_pdcp_config_asn1_req
(
&
ctxt
,
(
LTE_SRB_ToAddModList_t
*
)
NULL
,
// LTE_SRB_ToAddModList
(
LTE_SRB_ToAddModList_t
*
)
NULL
,
// LTE_SRB_ToAddModList
(
LTE_DRB_ToAddModList_t
*
)
NULL
,
// LTE_DRB_ToAddModList
(
LTE_DRB_ToAddModList_t
*
)
NULL
,
// LTE_DRB_ToAddModList
(
LTE_DRB_ToReleaseList_t
*
)
NULL
,
(
LTE_DRB_ToReleaseList_t
*
)
NULL
,
0
,
// security mode
0
,
// security mode
NULL
,
// key rrc encryption
NULL
,
// key rrc encryption
NULL
,
// key rrc integrity
NULL
,
// key rrc integrity
NULL
// key encryption
NULL
// key encryption
,
&
(
RC
.
rrc
[
enb_mod_idP
]
->
carrier
[
CC_id
].
mcch_message
->
pmch_InfoList_r9
)
,
,
NULL
);
&
(
RC
.
rrc
[
enb_mod_idP
]
->
carrier
[
CC_id
].
mcch_message
->
pmch_InfoList_r9
),
NULL
,
0
);
rrc_rlc_config_asn1_req
(
&
ctxt
,
rrc_rlc_config_asn1_req
(
&
ctxt
,
NULL
,
// LTE_SRB_ToAddModList
NULL
,
// LTE_SRB_ToAddModList
...
...
openair3/ocp-gtpu/gtp_itf.cpp
View file @
c40cceb4
...
@@ -706,22 +706,46 @@ int gtpv1u_update_s1u_tunnel(
...
@@ -706,22 +706,46 @@ int gtpv1u_update_s1u_tunnel(
pthread_mutex_lock
(
&
globGtp
.
gtp_lock
);
pthread_mutex_lock
(
&
globGtp
.
gtp_lock
);
getInstRetInt
(
compatInst
(
instance
));
getInstRetInt
(
compatInst
(
instance
));
if
(
inst
->
ue2te_mapping
.
find
(
create_tunnel_req
->
rnti
)
==
inst
->
ue2te_mapping
.
end
()
)
{
// Check if tunnels already exist for new rnti
LOG_E
(
GTPU
,
"[%ld] Update not already existing tunnel (new rnti %x, old rnti %x)
\n
"
,
if
(
inst
->
ue2te_mapping
.
find
(
create_tunnel_req
->
rnti
)
!=
inst
->
ue2te_mapping
.
end
())
{
instance
,
create_tunnel_req
->
rnti
,
prior_rnti
);
LOG_E
(
GTPU
,
"[%ld] Update already existing tunnel for new rnti %x
\n
"
,
instance
,
create_tunnel_req
->
rnti
);
return
-
1
;
}
}
// Check if tunnels exists for old rnti because we should take these tunnels.
// If we do not have tunnels, we create new one to not stop the software
auto
it
=
inst
->
ue2te_mapping
.
find
(
prior_rnti
);
auto
it
=
inst
->
ue2te_mapping
.
find
(
prior_rnti
);
if
(
it
==
inst
->
ue2te_mapping
.
end
())
{
if
(
it
!=
inst
->
ue2te_mapping
.
end
()
)
{
LOG_W
(
GTPU
,
"[%ld] Update a not existing tunnel, start create the new one (new rnti %x, old rnti %x)
\n
"
,
instance
,
create_tunnel_req
->
rnti
,
prior_rnti
);
pthread_mutex_unlock
(
&
globGtp
.
gtp_lock
);
pthread_mutex_unlock
(
&
globGtp
.
gtp_lock
);
AssertFatal
(
false
,
"logic bug: update of non-existing tunnel (new ue id %u, old ue id %u)
\n
"
,
create_tunnel_req
->
rnti
,
prior_rnti
);
gtpv1u_enb_create_tunnel_resp_t
tmp
;
/* we don't know if we need 4G or 5G PDCP and can therefore not create a
(
void
)
gtpv1u_create_s1u_tunnel
(
instance
,
create_tunnel_req
,
&
tmp
,
pdcp_data_req
);
* new tunnel */
return
0
;
return
0
;
}
}
// If tunnels exist for old rnti, we use them for new rnti
inst
->
ue2te_mapping
[
create_tunnel_req
->
rnti
]
=
it
->
second
;
inst
->
ue2te_mapping
[
create_tunnel_req
->
rnti
]
=
it
->
second
;
// Replace old RNTI by new one in te2ue_mapping
teid_t
teid_incoming
,
teid_outcoming
=
0
;
for
(
int
i
=
0
;
i
<
create_tunnel_req
->
num_tunnels
;
i
++
)
{
teid_incoming
=
it
->
second
.
bearers
[
create_tunnel_req
->
eps_bearer_id
[
i
]].
teid_incoming
;
teid_outcoming
=
create_tunnel_req
->
sgw_S1u_teid
[
i
];
globGtp
.
te2ue_mapping
[
teid_incoming
].
ue_id
=
create_tunnel_req
->
rnti
;
LOG_I
(
GTPU
,
"[%ld] Updated tunnel (new rnti %x, old rnti %x) DL teid =%x UL teid =%x
\n
"
,
instance
,
create_tunnel_req
->
rnti
,
prior_rnti
,
teid_incoming
,
teid_outcoming
);
}
// Remove old rnti value from ue2te_mapping
inst
->
ue2te_mapping
.
erase
(
it
);
inst
->
ue2te_mapping
.
erase
(
it
);
pthread_mutex_unlock
(
&
globGtp
.
gtp_lock
);
pthread_mutex_unlock
(
&
globGtp
.
gtp_lock
);
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