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
Expand all
Show 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,8 +1525,7 @@ bool pdcp_remove_UE(const protocol_ctxt_t *const ctxt_pP)
...
@@ -1523,8 +1525,7 @@ 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
ctxt_pP
,
LTE_SRB_ToAddModList_t
*
const
srb2add_list_pP
,
LTE_SRB_ToAddModList_t
*
const
srb2add_list_pP
,
LTE_DRB_ToAddModList_t
*
const
drb2add_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_pP
,
...
@@ -1533,7 +1534,8 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
...
@@ -1533,7 +1534,8 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_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,8 +1616,7 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
...
@@ -1610,8 +1616,7 @@ 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
,
...
@@ -1625,15 +1630,15 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
...
@@ -1625,15 +1630,15 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
security_modeP
,
security_modeP
,
kRRCenc_pP
,
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
,
...
@@ -1647,7 +1652,8 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
...
@@ -1647,7 +1652,8 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
security_modeP
,
security_modeP
,
kRRCenc_pP
,
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,8 +1798,7 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
...
@@ -1777,8 +1798,7 @@ 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
,
...
@@ -1792,7 +1812,8 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
...
@@ -1792,7 +1812,8 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
security_modeP
,
security_modeP
,
kRRCenc_pP
,
kRRCenc_pP
,
kRRCint_pP
,
kRRCint_pP
,
kUPenc_pP
);
kUPenc_pP
,
reestablishment_ongoing
);
}
}
}
}
}
}
...
@@ -1813,8 +1834,7 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
...
@@ -1813,8 +1834,7 @@ 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
,
...
@@ -1828,7 +1848,8 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
...
@@ -1828,7 +1848,8 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
security_modeP
,
security_modeP
,
kRRCenc_pP
,
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,8 +1909,7 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
...
@@ -1888,8 +1909,7 @@ 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
,
...
@@ -1903,7 +1923,8 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
...
@@ -1903,7 +1923,8 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
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
);
// unused for MBMS
NULL
,
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
;
if
(
!
reestablisment_on_going
&&
rlc_modeP
!=
RLC_MODE_AM
)
{
pdcp_pP
->
next_pdcp_tx_sn
=
0
;
pdcp_pP
->
next_pdcp_tx_sn
=
0
;
pdcp_pP
->
next_pdcp_rx_sn
=
0
;
pdcp_pP
->
next_pdcp_rx_sn
=
0
;
pdcp_pP
->
tx_hfn
=
0
;
pdcp_pP
->
tx_hfn
=
0
;
pdcp_pP
->
rx_hfn
=
0
;
pdcp_pP
->
rx_hfn
=
0
;
pdcp_pP
->
last_submitted_pdcp_rx_sn
=
4095
;
pdcp_pP
->
last_submitted_pdcp_rx_sn
=
4095
;
pdcp_pP
->
first_missing_pdu
=
-
1
;
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,20 +297,18 @@ void rrc_pdcp_config_req (
...
@@ -297,20 +297,18 @@ 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
,
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
,
...
@@ -320,7 +318,8 @@ bool rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
...
@@ -320,7 +318,8 @@ bool rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
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
...
@@ -948,7 +948,8 @@ bool rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
...
@@ -948,7 +948,8 @@ bool rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
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
(
ctxt_pP
,
radioResourceConfigDedicated
->
srb_ToAddModList
,
radioResourceConfigDedicated
->
srb_ToAddModList
,
(
LTE_DRB_ToAddModList_t
*
)
NULL
,
(
LTE_DRB_ToAddModList_t
*
)
NULL
,
(
LTE_DRB_ToReleaseList_t
*
)
NULL
,
(
LTE_DRB_ToReleaseList_t
*
)
NULL
,
UE_rrc_inst
[
ctxt_pP
->
module_id
].
ciphering_algorithm
|
UE_rrc_inst
[
ctxt_pP
->
module_id
].
ciphering_algorithm
|
(
UE_rrc_inst
[
ctxt_pP
->
module_id
].
integrity_algorithm
<<
4
),
(
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
(
ctxt_pP
,
(
LTE_SRB_ToAddModList_t
*
)
NULL
,
(
LTE_SRB_ToAddModList_t
*
)
NULL
,
radioResourceConfigDedicated
->
drb_ToAddModList
,
radioResourceConfigDedicated
->
drb_ToAddModList
,
(
LTE_DRB_ToReleaseList_t
*
)
NULL
,
(
LTE_DRB_ToReleaseList_t
*
)
NULL
,
UE_rrc_inst
[
ctxt_pP
->
module_id
].
ciphering_algorithm
|
UE_rrc_inst
[
ctxt_pP
->
module_id
].
ciphering_algorithm
|
(
UE_rrc_inst
[
ctxt_pP
->
module_id
].
integrity_algorithm
<<
4
),
(
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
This diff is collapsed.
Click to expand it.
openair2/RRC/LTE/rrc_eNB_M2AP.c
View file @
c40cceb4
...
@@ -275,8 +275,10 @@ static void rrc_M2AP_init_MBMS(
...
@@ -275,8 +275,10 @@ static void rrc_M2AP_init_MBMS(
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