Put module identifiers, enb_flag, frame in a struct called protocol_ctxt_t
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6326 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -58,12 +58,8 @@
|
|||||||
|
|
||||||
#undef GTP_DUMP_SOCKET
|
#undef GTP_DUMP_SOCKET
|
||||||
|
|
||||||
extern boolean_t
|
extern boolean_t pdcp_data_req(
|
||||||
pdcp_data_req(
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const module_id_t enb_mod_idP,
|
|
||||||
const module_id_t ue_mod_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t enb_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const rb_id_t rb_idP,
|
const rb_id_t rb_idP,
|
||||||
const mui_t muiP,
|
const mui_t muiP,
|
||||||
@@ -282,6 +278,7 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req(
|
|||||||
teid_t teid = 0;
|
teid_t teid = 0;
|
||||||
hashtable_rc_t hash_rc = HASH_TABLE_KEY_NOT_EXISTS;
|
hashtable_rc_t hash_rc = HASH_TABLE_KEY_NOT_EXISTS;
|
||||||
gtpv1u_teid_data_t *gtpv1u_teid_data_p = NULL;
|
gtpv1u_teid_data_t *gtpv1u_teid_data_p = NULL;
|
||||||
|
protocol_ctxt_t ctxt;
|
||||||
|
|
||||||
switch(pUlpApi->apiType) {
|
switch(pUlpApi->apiType) {
|
||||||
/* Here there are two type of messages handled:
|
/* Here there are two type of messages handled:
|
||||||
@@ -319,12 +316,13 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req(
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#warning "LG eps bearer mapping to DRB id to do (offset -4)"
|
#warning "LG eps bearer mapping to DRB id to do (offset -4)"
|
||||||
|
ctxt.enb_module_id = gtpv1u_teid_data_p->enb_id;
|
||||||
|
ctxt.ue_module_id = gtpv1u_teid_data_p->ue_id;
|
||||||
|
ctxt.frame = 0;
|
||||||
|
ctxt.enb_flag = ENB_FLAG_YES;
|
||||||
|
|
||||||
result = pdcp_data_req(
|
result = pdcp_data_req(
|
||||||
gtpv1u_teid_data_p->enb_id,
|
&ctxt,
|
||||||
gtpv1u_teid_data_p->ue_id,
|
|
||||||
0, // frame TO DO
|
|
||||||
ENB_FLAG_YES,
|
|
||||||
SRB_FLAG_NO,
|
SRB_FLAG_NO,
|
||||||
(gtpv1u_teid_data_p->eps_bearer_id) ? gtpv1u_teid_data_p->eps_bearer_id - 4: 5-4,
|
(gtpv1u_teid_data_p->eps_bearer_id) ? gtpv1u_teid_data_p->eps_bearer_id - 4: 5-4,
|
||||||
0, // mui
|
0, // mui
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
Installation Instructions
|
Installation Instructions
|
||||||
*************************
|
*************************
|
||||||
|
|
||||||
Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
|
Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
|
||||||
Inc.
|
Inc.
|
||||||
|
|
||||||
Copying and distribution of this file, with or without modification,
|
Copying and distribution of this file, with or without modification,
|
||||||
@@ -12,8 +12,8 @@ without warranty of any kind.
|
|||||||
Basic Installation
|
Basic Installation
|
||||||
==================
|
==================
|
||||||
|
|
||||||
Briefly, the shell commands `./configure; make; make install' should
|
Briefly, the shell command `./configure && make && make install'
|
||||||
configure, build, and install this package. The following
|
should configure, build, and install this package. The following
|
||||||
more-detailed instructions are generic; see the `README' file for
|
more-detailed instructions are generic; see the `README' file for
|
||||||
instructions specific to this package. Some packages provide this
|
instructions specific to this package. Some packages provide this
|
||||||
`INSTALL' file but do not implement all of the features documented
|
`INSTALL' file but do not implement all of the features documented
|
||||||
@@ -309,9 +309,10 @@ causes the specified `gcc' to be used as the C compiler (unless it is
|
|||||||
overridden in the site shell script).
|
overridden in the site shell script).
|
||||||
|
|
||||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||||
an Autoconf bug. Until the bug is fixed you can use this workaround:
|
an Autoconf limitation. Until the limitation is lifted, you can use
|
||||||
|
this workaround:
|
||||||
|
|
||||||
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
|
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||||
|
|
||||||
`configure' Invocation
|
`configure' Invocation
|
||||||
======================
|
======================
|
||||||
@@ -367,4 +368,3 @@ operates.
|
|||||||
|
|
||||||
`configure' also accepts some other, not widely useful, options. Run
|
`configure' also accepts some other, not widely useful, options. Run
|
||||||
`configure --help' for more details.
|
`configure --help' for more details.
|
||||||
|
|
||||||
|
|||||||
@@ -170,4 +170,16 @@ typedef enum config_action_e {
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
typedef uint32_t teid_t; // tunnel endpoint identifier
|
typedef uint32_t teid_t; // tunnel endpoint identifier
|
||||||
typedef uint8_t ebi_t; // eps bearer id
|
typedef uint8_t ebi_t; // eps bearer id
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
typedef struct protocol_ctxt_s {
|
||||||
|
module_id_t enb_module_id; /*!< \brief Virtualized enb module identifier, Not used if eNB_flagP = 0. */
|
||||||
|
module_id_t ue_module_id; /*!< \brief Virtualized ue module identifier */
|
||||||
|
frame_t frame; /*!< \brief LTE Frame number.*/
|
||||||
|
eNB_flag_t enb_flag; /*!< \brief Flag to indicate eNB (1) or UE (0) */
|
||||||
|
} protocol_ctxt_t;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
|
|||||||
unsigned int nCCE[MAX_NUM_CCs];
|
unsigned int nCCE[MAX_NUM_CCs];
|
||||||
int mbsfn_status[MAX_NUM_CCs];
|
int mbsfn_status[MAX_NUM_CCs];
|
||||||
uint32_t RBalloc[MAX_NUM_CCs];
|
uint32_t RBalloc[MAX_NUM_CCs];
|
||||||
|
protocol_ctxt_t ctxt;
|
||||||
#ifdef EXMIMO
|
#ifdef EXMIMO
|
||||||
int ret;
|
int ret;
|
||||||
#endif
|
#endif
|
||||||
@@ -181,7 +182,11 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
|
|||||||
|
|
||||||
//if (subframeP%5 == 0)
|
//if (subframeP%5 == 0)
|
||||||
//#ifdef EXMIMO
|
//#ifdef EXMIMO
|
||||||
pdcp_run(frameP, 1, 0, module_idP);
|
ctxt.enb_module_id = module_idP;
|
||||||
|
ctxt.ue_module_id = 0;
|
||||||
|
ctxt.frame = frameP;
|
||||||
|
ctxt.enb_flag = ENB_FLAG_YES;
|
||||||
|
pdcp_run(&ctxt);
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
// check HO
|
// check HO
|
||||||
|
|||||||
@@ -1321,6 +1321,7 @@ UE_L2_STATE_t ue_scheduler(module_id_t module_idP,frame_t frameP, sub_frame_t su
|
|||||||
// int8_t lcg_id;
|
// int8_t lcg_id;
|
||||||
struct RACH_ConfigCommon *rach_ConfigCommon = (struct RACH_ConfigCommon *)NULL;
|
struct RACH_ConfigCommon *rach_ConfigCommon = (struct RACH_ConfigCommon *)NULL;
|
||||||
#ifdef EXMIMO
|
#ifdef EXMIMO
|
||||||
|
protocol_ctxt_t ctxt;
|
||||||
int ret;
|
int ret;
|
||||||
#endif
|
#endif
|
||||||
#if defined(ENABLE_ITTI)
|
#if defined(ENABLE_ITTI)
|
||||||
@@ -1366,7 +1367,11 @@ UE_L2_STATE_t ue_scheduler(module_id_t module_idP,frame_t frameP, sub_frame_t su
|
|||||||
//Rrc_xface->Frame_index=Mac_rlc_xface->frameP;
|
//Rrc_xface->Frame_index=Mac_rlc_xface->frameP;
|
||||||
//if (subframe%5 == 0)
|
//if (subframe%5 == 0)
|
||||||
#ifdef EXMIMO
|
#ifdef EXMIMO
|
||||||
pdcp_run(frameP, 0, module_idP, eNB_indexP);
|
ctxt.enb_module_id = eNB_indexP;
|
||||||
|
ctxt.ue_module_id = module_idP;
|
||||||
|
ctxt.frame = frameP;
|
||||||
|
ctxt.enb_flag = ENB_FLAG_NO;
|
||||||
|
pdcp_run(&ctxt);
|
||||||
#endif
|
#endif
|
||||||
UE_mac_inst[module_idP].frame = frameP;
|
UE_mac_inst[module_idP].frame = frameP;
|
||||||
UE_mac_inst[module_idP].subframe = subframeP;
|
UE_mac_inst[module_idP].subframe = subframeP;
|
||||||
|
|||||||
+303
-294
File diff suppressed because it is too large
Load Diff
@@ -197,12 +197,9 @@ typedef struct pdcp_mbms_t {
|
|||||||
* under targets/TEST/PDCP/
|
* under targets/TEST/PDCP/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \fn boolean_t pdcp_data_req(module_id_t , module_id_t , frame_t , eNB_flag_t , srb_flag_t , rb_id_t , mui_t , confirm_t ,sdu_size_t , unsigned char* , pdcp_transmission_mode_t )
|
/*! \fn boolean_t pdcp_data_req(const protocol_ctxt_t* const , srb_flag_t , rb_id_t , mui_t , confirm_t ,sdu_size_t , unsigned char* , pdcp_transmission_mode_t )
|
||||||
* \brief This functions handles data transfer requests coming either from RRC or from IP
|
* \brief This functions handles data transfer requests coming either from RRC or from IP
|
||||||
* \param[in] enb_mod_idP Virtualized enb module identifier, Not used if eNB_flagP = 0.
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] ue_mod_idP Virtualized ue module identifier.
|
|
||||||
* \param[in] frame Frame number
|
|
||||||
* \param[in] Shows if relevant PDCP entity is part of an eNB or a UE
|
|
||||||
* \param[in] rab_id Radio Bearer ID
|
* \param[in] rab_id Radio Bearer ID
|
||||||
* \param[in] muiP
|
* \param[in] muiP
|
||||||
* \param[in] confirmP
|
* \param[in] confirmP
|
||||||
@@ -214,10 +211,7 @@ typedef struct pdcp_mbms_t {
|
|||||||
* @ingroup _pdcp
|
* @ingroup _pdcp
|
||||||
*/
|
*/
|
||||||
public_pdcp(boolean_t pdcp_data_req(
|
public_pdcp(boolean_t pdcp_data_req(
|
||||||
const module_id_t eNB_id,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const module_id_t UE_id,
|
|
||||||
const frame_t frame,
|
|
||||||
const eNB_flag_t eNB_flag,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const rb_id_t rb_id,
|
const rb_id_t rb_id,
|
||||||
const mui_t muiP,
|
const mui_t muiP,
|
||||||
@@ -226,12 +220,9 @@ public_pdcp(boolean_t pdcp_data_req(
|
|||||||
unsigned char* const sdu_buffer,
|
unsigned char* const sdu_buffer,
|
||||||
const pdcp_transmission_mode_t mode));
|
const pdcp_transmission_mode_t mode));
|
||||||
|
|
||||||
/*! \fn boolean_t pdcp_data_ind(module_id_t, module_id_t, frame_t, eNB_flag_t, srb_flag_t, MBMS_flag_t, rb_id_t, sdu_size_t, mem_block_t*, boolean_t)
|
/*! \fn boolean_t pdcp_data_ind(const protocol_ctxt_t* const, srb_flag_t, MBMS_flag_t, rb_id_t, sdu_size_t, mem_block_t*, boolean_t)
|
||||||
* \brief This functions handles data transfer indications coming from RLC
|
* \brief This functions handles data transfer indications coming from RLC
|
||||||
* \param[in] enb_mod_idP Virtualized enb module identifier, Not used if eNB_flagP = 0.
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] ue_mod_idP Virtualized ue module identifier.
|
|
||||||
* \param[in] frame Frame number
|
|
||||||
* \param[in] Shows if relevant PDCP entity is part of an eNB or a UE
|
|
||||||
* \param[in] Shows if rb is SRB
|
* \param[in] Shows if rb is SRB
|
||||||
* \param[in] Tells if MBMS traffic
|
* \param[in] Tells if MBMS traffic
|
||||||
* \param[in] rab_id Radio Bearer ID
|
* \param[in] rab_id Radio Bearer ID
|
||||||
@@ -243,22 +234,16 @@ public_pdcp(boolean_t pdcp_data_req(
|
|||||||
* @ingroup _pdcp
|
* @ingroup _pdcp
|
||||||
*/
|
*/
|
||||||
public_pdcp(boolean_t pdcp_data_ind(
|
public_pdcp(boolean_t pdcp_data_ind(
|
||||||
const module_id_t eNB_id,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const module_id_t UE_id,
|
|
||||||
const frame_t frame,
|
|
||||||
const eNB_flag_t eNB_flag,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const MBMS_flag_t MBMS_flagP,
|
const MBMS_flag_t MBMS_flagP,
|
||||||
const rb_id_t rb_id,
|
const rb_id_t rb_id,
|
||||||
const sdu_size_t sdu_buffer_size,
|
const sdu_size_t sdu_buffer_size,
|
||||||
mem_block_t* const sdu_buffer));
|
mem_block_t* const sdu_buffer));
|
||||||
|
|
||||||
/*! \fn void rrc_pdcp_config_req(module_id_t , module_id_t ,frame_t,eNB_flag_t,uint32_t,rb_id_t,uint8_t)
|
/*! \fn void rrc_pdcp_config_req(const protocol_ctxt_t* const ,uint32_t,rb_id_t,uint8_t)
|
||||||
* \brief This functions initializes relevant PDCP entity
|
* \brief This functions initializes relevant PDCP entity
|
||||||
* \param[in] enb_mod_idP Virtualized enb module identifier, Not used if eNB_flagP = 0.
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] ue_mod_idP Virtualized ue module identifier.
|
|
||||||
* \param[in] frameP frame counter (TTI)
|
|
||||||
* \param[in] eNB_flagP flag indicating the node type
|
|
||||||
* \param[in] actionP flag for action: add, remove , modify
|
* \param[in] actionP flag for action: add, remove , modify
|
||||||
* \param[in] rb_idP Radio Bearer ID of relevant PDCP entity
|
* \param[in] rb_idP Radio Bearer ID of relevant PDCP entity
|
||||||
* \param[in] security_modeP Radio Bearer ID of relevant PDCP entity
|
* \param[in] security_modeP Radio Bearer ID of relevant PDCP entity
|
||||||
@@ -267,21 +252,15 @@ public_pdcp(boolean_t pdcp_data_ind(
|
|||||||
* @ingroup _pdcp
|
* @ingroup _pdcp
|
||||||
*/
|
*/
|
||||||
public_pdcp(void rrc_pdcp_config_req (
|
public_pdcp(void rrc_pdcp_config_req (
|
||||||
const module_id_t enb_idP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const module_id_t ue_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const uint32_t actionP,
|
const uint32_t actionP,
|
||||||
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 (module_id_t module_id, frame_t frame, eNB_flag_t eNB_flag, 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* drb2add_list, DRB_ToReleaseList_t* drb2release_list)
|
||||||
* \brief Function for RRC to configure a Radio Bearer.
|
* \brief Function for RRC to configure a Radio Bearer.
|
||||||
* \param[in] enb_mod_idP Virtualized enb module identifier.
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] ue_mod_idP Virtualized ue module identifier.
|
|
||||||
* \param[in] frame Frame index.
|
|
||||||
* \param[in] eNB_flag Flag to indicate eNB (1) or UE (0)
|
|
||||||
* \param[in] index index of UE or eNB depending on the eNB_flag
|
* \param[in] index index of UE or eNB depending on the eNB_flag
|
||||||
* \param[in] srb2add_list SRB configuration list to be created.
|
* \param[in] srb2add_list SRB configuration list to be created.
|
||||||
* \param[in] drb2add_list DRB configuration list to be created.
|
* \param[in] drb2add_list DRB configuration list to be created.
|
||||||
@@ -294,10 +273,7 @@ public_pdcp(void rrc_pdcp_config_req (
|
|||||||
*/
|
*/
|
||||||
public_pdcp(
|
public_pdcp(
|
||||||
boolean_t rrc_pdcp_config_asn1_req (
|
boolean_t rrc_pdcp_config_asn1_req (
|
||||||
const module_id_t eNB_idP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const module_id_t ue_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
SRB_ToAddModList_t *const srb2add_list,
|
SRB_ToAddModList_t *const srb2add_list,
|
||||||
DRB_ToAddModList_t *const drb2add_list,
|
DRB_ToAddModList_t *const drb2add_list,
|
||||||
DRB_ToReleaseList_t *const drb2release_list,
|
DRB_ToReleaseList_t *const drb2release_list,
|
||||||
@@ -310,8 +286,9 @@ boolean_t rrc_pdcp_config_asn1_req (
|
|||||||
#endif
|
#endif
|
||||||
));
|
));
|
||||||
|
|
||||||
/*! \fn boolean_t pdcp_config_req_asn1 (module_id_t module_id, frame_t frame, eNB_flag_t eNB_flag, srb_flag_t srb_flagP, uint32_t action, rb_id_t rb_id, uint8_t rb_sn, uint8_t rb_report, uint16_t header_compression_profile, uint8_t security_mode)
|
/*! \fn boolean_t pdcp_config_req_asn1 (const protocol_ctxt_t* const ctxt_pP, srb_flag_t srb_flagP, uint32_t action, rb_id_t rb_id, uint8_t rb_sn, uint8_t rb_report, uint16_t header_compression_profile, uint8_t security_mode)
|
||||||
* \brief Function for RRC to configure a Radio Bearer.
|
* \brief Function for RRC to configure a Radio Bearer.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] pdcp_pP Pointer on PDCP structure.
|
* \param[in] pdcp_pP Pointer on PDCP structure.
|
||||||
* \param[in] enb_mod_idP Virtualized enb module identifier, Not used if eNB_flagP = 0.
|
* \param[in] enb_mod_idP Virtualized enb module identifier, Not used if eNB_flagP = 0.
|
||||||
* \param[in] ue_mod_idP Virtualized ue module identifier.
|
* \param[in] ue_mod_idP Virtualized ue module identifier.
|
||||||
@@ -330,11 +307,8 @@ boolean_t rrc_pdcp_config_asn1_req (
|
|||||||
* \return A status about the processing, OK or error code.
|
* \return A status about the processing, OK or error code.
|
||||||
*/
|
*/
|
||||||
public_pdcp(boolean_t pdcp_config_req_asn1 (
|
public_pdcp(boolean_t pdcp_config_req_asn1 (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
pdcp_t *const pdcp_pP,
|
pdcp_t *const pdcp_pP,
|
||||||
const module_id_t enb_idP,
|
|
||||||
const module_id_t ue_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const rlc_mode_t rlc_mode,
|
const rlc_mode_t rlc_mode,
|
||||||
const uint32_t action,
|
const uint32_t action,
|
||||||
@@ -350,43 +324,33 @@ public_pdcp(boolean_t pdcp_config_req_asn1 (
|
|||||||
uint8_t *const kUPenc));
|
uint8_t *const kUPenc));
|
||||||
|
|
||||||
|
|
||||||
/*! \fn boolean_t pdcp_remove_UE(const module_id_t enb_mod_idP,const module_id_t ue_mod_idP,const frame_t frameP)
|
/*! \fn boolean_t pdcp_remove_UE(const protocol_ctxt_t* const ctxt_pP)
|
||||||
* \brief Function for RRC to configure a Radio Bearer clear all PDCP resources for a particular UE
|
* \brief Function for RRC to configure a Radio Bearer clear all PDCP resources for a particular UE
|
||||||
* \param[in] enb_mod_idP index of eNB
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] enb_mod_idP index of UE
|
|
||||||
* \param[in] frameP frame
|
|
||||||
* \return A status about the processing, OK or error code.
|
* \return A status about the processing, OK or error code.
|
||||||
*/
|
*/
|
||||||
public_pdcp(boolean_t pdcp_remove_UE(
|
public_pdcp(boolean_t pdcp_remove_UE(
|
||||||
const module_id_t enb_mod_idP,
|
const protocol_ctxt_t* const ctxt_pP));
|
||||||
const module_id_t ue_mod_idP,
|
|
||||||
const frame_t frameP));
|
|
||||||
|
|
||||||
/*! \fn void rrc_pdcp_config_release(module_id_t, rb_id_t)
|
/*! \fn void rrc_pdcp_config_release( const protocol_ctxt_t* const, rb_id_t)
|
||||||
* \brief This functions is unused
|
* \brief This functions is unused
|
||||||
* \param[in] module_id Module ID of relevant PDCP entity
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rab_id Radio Bearer ID of relevant PDCP entity
|
* \param[in] rab_id Radio Bearer ID of relevant PDCP entity
|
||||||
* \return none
|
* \return none
|
||||||
* \note None
|
* \note None
|
||||||
* @ingroup _pdcp
|
* @ingroup _pdcp
|
||||||
*/
|
*/
|
||||||
//public_pdcp(void rrc_pdcp_config_release (module_id_t, rb_id_t);)
|
//public_pdcp(void rrc_pdcp_config_release ( const protocol_ctxt_t* const ctxt_pP, rb_id_t);)
|
||||||
|
|
||||||
/*! \fn void pdcp_run(frame_t, eNB_flag_t, module_id_t,module_id_t)
|
/*! \fn void pdcp_run(const protocol_ctxt_t* const ctxt_pP)
|
||||||
* \brief Runs PDCP entity to let it handle incoming/outgoing SDUs
|
* \brief Runs PDCP entity to let it handle incoming/outgoing SDUs
|
||||||
* \param[in] frame Frame number
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] eNB_flag Indicates if this PDCP entity belongs to an eNB or to a UE
|
|
||||||
* \param[in] enb_mod_idP Virtualized enb module identifier, Not used if eNB_flagP = 0.
|
|
||||||
* \param[in] ue_mod_idP Virtualized ue module identifier.
|
|
||||||
* \return none
|
* \return none
|
||||||
* \note None
|
* \note None
|
||||||
* @ingroup _pdcp
|
* @ingroup _pdcp
|
||||||
*/
|
*/
|
||||||
public_pdcp(void pdcp_run (
|
public_pdcp(void pdcp_run (
|
||||||
const frame_t frameP,
|
const protocol_ctxt_t* const ctxt_pP);)
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const module_id_t ue_mod_idP,
|
|
||||||
const module_id_t enb_mod_idP);)
|
|
||||||
public_pdcp(int pdcp_module_init (void);)
|
public_pdcp(int pdcp_module_init (void);)
|
||||||
public_pdcp(void pdcp_module_cleanup (void);)
|
public_pdcp(void pdcp_module_cleanup (void);)
|
||||||
public_pdcp(void pdcp_layer_init (void);)
|
public_pdcp(void pdcp_layer_init (void);)
|
||||||
@@ -397,23 +361,13 @@ public_pdcp(int pdcp_netlink_init (void);)
|
|||||||
#define NAS2PDCP_FIFO 22
|
#define NAS2PDCP_FIFO 22
|
||||||
|
|
||||||
protected_pdcp_fifo(int pdcp_fifo_flush_sdus (
|
protected_pdcp_fifo(int pdcp_fifo_flush_sdus (
|
||||||
const frame_t frameP,
|
const protocol_ctxt_t* const ctxt_pP);)
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const module_id_t enb_idP,
|
|
||||||
const module_id_t ue_mod_idP);)
|
|
||||||
protected_pdcp_fifo(int pdcp_fifo_read_input_sdus_remaining_bytes (
|
protected_pdcp_fifo(int pdcp_fifo_read_input_sdus_remaining_bytes (
|
||||||
const frame_t frameP,
|
const protocol_ctxt_t* const ctxt_pP);)
|
||||||
const eNB_flag_t eNB_flagP);)
|
|
||||||
protected_pdcp_fifo(int pdcp_fifo_read_input_sdus (
|
protected_pdcp_fifo(int pdcp_fifo_read_input_sdus (
|
||||||
const frame_t frameP,
|
const protocol_ctxt_t* const ctxt_pP);)
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const module_id_t ue_mod_idP,
|
|
||||||
const module_id_t enb_mod_idP);)
|
|
||||||
protected_pdcp_fifo(void pdcp_fifo_read_input_sdus_from_otg (
|
protected_pdcp_fifo(void pdcp_fifo_read_input_sdus_from_otg (
|
||||||
const frame_t frameP,
|
const protocol_ctxt_t* const ctxt_pP);)
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const module_id_t ue_mod_idP,
|
|
||||||
const module_id_t enb_mod_idP);)
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ extern Packet_OTG_List_t *otg_pdcp_buffer;
|
|||||||
pdcp_data_req_header_t pdcp_read_header_g;
|
pdcp_data_req_header_t pdcp_read_header_g;
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
int pdcp_fifo_flush_sdus(frame_t frameP, eNB_flag_t enb_flagP, module_id_t enb_mod_idP, module_id_t ue_mod_idP)
|
int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -123,18 +123,18 @@ int pdcp_fifo_flush_sdus(frame_t frameP, eNB_flag_t enb_flagP, module_id_t enb_m
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LINK_PDCP_TO_GTPV1U)
|
#if defined(LINK_PDCP_TO_GTPV1U)
|
||||||
if (enb_flagP) {
|
if (ctxt_pP->enb_flag) {
|
||||||
AssertFatal(0, "Now execution should not go here");
|
AssertFatal(0, "Now execution should not go here");
|
||||||
LOG_D(PDCP,"Sending to GTPV1U %d bytes\n", ((pdcp_data_ind_header_t *)(sdu_p->data))->data_size);
|
LOG_D(PDCP,"Sending to GTPV1U %d bytes\n", ((pdcp_data_ind_header_t *)(sdu_p->data))->data_size);
|
||||||
/*message_p = itti_alloc_new_message(TASK_PDCP_ENB, GTPV1U_TUNNEL_DATA_REQ);
|
/*message_p = itti_alloc_new_message(TASK_PDCP_ENB, GTPV1U_TUNNEL_DATA_REQ);
|
||||||
GTPV1U_TUNNEL_DATA_REQ(message_p).buffer = &(((uint8_t *) sdu_p->data)[sizeof (pdcp_data_ind_header_t)]);
|
GTPV1U_TUNNEL_DATA_REQ(message_p).buffer = &(((uint8_t *) sdu_p->data)[sizeof (pdcp_data_ind_header_t)]);
|
||||||
GTPV1U_TUNNEL_DATA_REQ(message_p).length = ((pdcp_data_ind_header_t *)(sdu_p->data))->data_size;
|
GTPV1U_TUNNEL_DATA_REQ(message_p).length = ((pdcp_data_ind_header_t *)(sdu_p->data))->data_size;
|
||||||
GTPV1U_TUNNEL_DATA_REQ(message_p).ue_module_id = ue_mod_idP;
|
GTPV1U_TUNNEL_DATA_REQ(message_p).ue_module_id = ctxt_pP->ue_module_id;
|
||||||
GTPV1U_TUNNEL_DATA_REQ(message_p).rab_id; = ((pdcp_data_ind_header_t *)(sdu_p->data))->rb_id;
|
GTPV1U_TUNNEL_DATA_REQ(message_p).rab_id; = ((pdcp_data_ind_header_t *)(sdu_p->data))->rb_id;
|
||||||
*/
|
*/
|
||||||
gtpv1u_new_data_req(
|
gtpv1u_new_data_req(
|
||||||
enb_mod_idP, //gtpv1u_data_t *gtpv1u_data_p,
|
ctxt_pP->enb_module_id, //gtpv1u_data_t *gtpv1u_data_p,
|
||||||
ue_mod_idP,//rb_id/maxDRB, TO DO UE ID
|
ctxt_pP->ue_module_id,//rb_id/maxDRB, TO DO UE ID
|
||||||
((pdcp_data_ind_header_t *)(sdu_p->data))->rb_id + 4,
|
((pdcp_data_ind_header_t *)(sdu_p->data))->rb_id + 4,
|
||||||
&(((uint8_t *) sdu_p->data)[sizeof (pdcp_data_ind_header_t)]),
|
&(((uint8_t *) sdu_p->data)[sizeof (pdcp_data_ind_header_t)]),
|
||||||
((pdcp_data_ind_header_t *)(sdu_p->data))->data_size);
|
((pdcp_data_ind_header_t *)(sdu_p->data))->data_size);
|
||||||
@@ -150,7 +150,7 @@ int pdcp_fifo_flush_sdus(frame_t frameP, eNB_flag_t enb_flagP, module_id_t enb_m
|
|||||||
#endif /* defined(ENABLE_USE_MME) */
|
#endif /* defined(ENABLE_USE_MME) */
|
||||||
#ifdef PDCP_DEBUG
|
#ifdef PDCP_DEBUG
|
||||||
LOG_I(PDCP, "PDCP->IP TTI %d INST %d: Preparing %d Bytes of data from rab %d to Nas_mesh\n",
|
LOG_I(PDCP, "PDCP->IP TTI %d INST %d: Preparing %d Bytes of data from rab %d to Nas_mesh\n",
|
||||||
frameP, ((pdcp_data_ind_header_t *)(sdu_p->data))->inst,
|
ctxt_pP->frame, ((pdcp_data_ind_header_t *)(sdu_p->data))->inst,
|
||||||
((pdcp_data_ind_header_t *)(sdu_p->data))->data_size, ((pdcp_data_ind_header_t *)(sdu_p->data))->rb_id);
|
((pdcp_data_ind_header_t *)(sdu_p->data))->data_size, ((pdcp_data_ind_header_t *)(sdu_p->data))->rb_id);
|
||||||
#endif //PDCP_DEBUG
|
#endif //PDCP_DEBUG
|
||||||
cont = 0;
|
cont = 0;
|
||||||
@@ -179,7 +179,7 @@ int pdcp_fifo_flush_sdus(frame_t frameP, eNB_flag_t enb_flagP, module_id_t enb_m
|
|||||||
|
|
||||||
#ifdef PDCP_DEBUG
|
#ifdef PDCP_DEBUG
|
||||||
LOG_I(PDCP, "Frame %d Sent %d Bytes of header to Nas_mesh\n",
|
LOG_I(PDCP, "Frame %d Sent %d Bytes of header to Nas_mesh\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
bytes_wrote);
|
bytes_wrote);
|
||||||
#endif //PDCP_DEBUG
|
#endif //PDCP_DEBUG
|
||||||
|
|
||||||
@@ -210,7 +210,7 @@ int pdcp_fifo_flush_sdus(frame_t frameP, eNB_flag_t enb_flagP, module_id_t enb_m
|
|||||||
|
|
||||||
#ifdef PDCP_DEBUG
|
#ifdef PDCP_DEBUG
|
||||||
LOG_I(PDCP, "PDCP->IP Frame %d INST %d: Sent %d Bytes of data from rab %d to Nas_mesh\n",
|
LOG_I(PDCP, "PDCP->IP Frame %d INST %d: Sent %d Bytes of data from rab %d to Nas_mesh\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
((pdcp_data_ind_header_t *)(sdu_p->data))->inst,
|
((pdcp_data_ind_header_t *)(sdu_p->data))->inst,
|
||||||
bytes_wrote,
|
bytes_wrote,
|
||||||
((pdcp_data_ind_header_t *)(sdu_p->data))->rb_id);
|
((pdcp_data_ind_header_t *)(sdu_p->data))->rb_id);
|
||||||
@@ -222,7 +222,7 @@ int pdcp_fifo_flush_sdus(frame_t frameP, eNB_flag_t enb_flagP, module_id_t enb_m
|
|||||||
// LOG_D(PDCP, "rb sent a sdu qos_sap %d\n", sapiP);
|
// LOG_D(PDCP, "rb sent a sdu qos_sap %d\n", sapiP);
|
||||||
LOG_D(PDCP,
|
LOG_D(PDCP,
|
||||||
"[FRAME %05d][xxx][PDCP][MOD xx/xx][RB %u][--- PDCP_DATA_IND / %d Bytes --->][IP][INSTANCE %u][RB %u]\n",
|
"[FRAME %05d][xxx][PDCP][MOD xx/xx][RB %u][--- PDCP_DATA_IND / %d Bytes --->][IP][INSTANCE %u][RB %u]\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
((pdcp_data_ind_header_t *)(sdu_p->data))->rb_id,
|
((pdcp_data_ind_header_t *)(sdu_p->data))->rb_id,
|
||||||
((pdcp_data_ind_header_t *)(sdu_p->data))->data_size,
|
((pdcp_data_ind_header_t *)(sdu_p->data))->data_size,
|
||||||
((pdcp_data_ind_header_t *)(sdu_p->data))->inst,
|
((pdcp_data_ind_header_t *)(sdu_p->data))->inst,
|
||||||
@@ -271,13 +271,13 @@ int pdcp_fifo_flush_sdus(frame_t frameP, eNB_flag_t enb_flagP, module_id_t enb_m
|
|||||||
if ((pdcp_2_nas_irq > 0)) {
|
if ((pdcp_2_nas_irq > 0)) {
|
||||||
#ifdef PDCP_DEBUG
|
#ifdef PDCP_DEBUG
|
||||||
LOG_I(PDCP, "Frame %d : Trigger NAS RX interrupt\n",
|
LOG_I(PDCP, "Frame %d : Trigger NAS RX interrupt\n",
|
||||||
frameP);
|
ctxt_pP->frame);
|
||||||
#endif //PDCP_DEBUG
|
#endif //PDCP_DEBUG
|
||||||
|
|
||||||
rt_pend_linux_srq (pdcp_2_nas_irq);
|
rt_pend_linux_srq (pdcp_2_nas_irq);
|
||||||
} else {
|
} else {
|
||||||
LOG_E(PDCP, "Frame %d: ERROR IF IP STACK WANTED : NOTIF PACKET(S) pdcp_2_nas_irq not initialized : %d\n",
|
LOG_E(PDCP, "Frame %d: ERROR IF IP STACK WANTED : NOTIF PACKET(S) pdcp_2_nas_irq not initialized : %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
pdcp_2_nas_irq);
|
pdcp_2_nas_irq);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -292,7 +292,7 @@ int pdcp_fifo_flush_sdus(frame_t frameP, eNB_flag_t enb_flagP, module_id_t enb_m
|
|||||||
* returns zero value if whole bytes that had to be read were not read at all
|
* returns zero value if whole bytes that had to be read were not read at all
|
||||||
* returns a negative value if an error was encountered while reading the rt fifo
|
* returns a negative value if an error was encountered while reading the rt fifo
|
||||||
*/
|
*/
|
||||||
int pdcp_fifo_read_input_sdus_remaining_bytes (frame_t frameP, eNB_flag_t enb_flagP)
|
int pdcp_fifo_read_input_sdus_remaining_bytes (const protocol_ctxt_t* const ctxt_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
sdu_size_t bytes_read = 0;
|
sdu_size_t bytes_read = 0;
|
||||||
@@ -320,7 +320,7 @@ int pdcp_fifo_read_input_sdus_remaining_bytes (frame_t frameP, eNB_flag_t enb_fl
|
|||||||
} else {
|
} else {
|
||||||
#ifdef PDCP_DEBUG
|
#ifdef PDCP_DEBUG
|
||||||
LOG_I(PDCP, "Frame %d: IP->RADIO RECEIVED COMPLETE SDU size %d inst %d rb %d\n",
|
LOG_I(PDCP, "Frame %d: IP->RADIO RECEIVED COMPLETE SDU size %d inst %d rb %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
pdcp_input_sdu_size_read,
|
pdcp_input_sdu_size_read,
|
||||||
pdcp_input_header.inst,
|
pdcp_input_header.inst,
|
||||||
pdcp_input_header.rb_id);
|
pdcp_input_header.rb_id);
|
||||||
@@ -330,7 +330,7 @@ int pdcp_fifo_read_input_sdus_remaining_bytes (frame_t frameP, eNB_flag_t enb_fl
|
|||||||
pdcp_read_header_g.inst = 0;
|
pdcp_read_header_g.inst = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (enb_flagP == 0) {
|
if (ctxt_pP->enb_flag == 0) {
|
||||||
ue_inst = pdcp_read_header_g.inst;
|
ue_inst = pdcp_read_header_g.inst;
|
||||||
rb_id = pdcp_read_header_g.rb_id;
|
rb_id = pdcp_read_header_g.rb_id;
|
||||||
enb_inst = 0;
|
enb_inst = 0;
|
||||||
@@ -355,8 +355,8 @@ int pdcp_fifo_read_input_sdus_remaining_bytes (frame_t frameP, eNB_flag_t enb_fl
|
|||||||
|
|
||||||
if (pdcp_input_header.rb_id != 0) {
|
if (pdcp_input_header.rb_id != 0) {
|
||||||
LOG_D(PDCP, "[FRAME %5u][%s][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u/%u][RB %u]\n",
|
LOG_D(PDCP, "[FRAME %5u][%s][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u/%u][RB %u]\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
pdcp_read_header_g.inst,
|
pdcp_read_header_g.inst,
|
||||||
pdcp_read_header_g.rb_id,
|
pdcp_read_header_g.rb_id,
|
||||||
pdcp_read_header_g.data_size,
|
pdcp_read_header_g.data_size,
|
||||||
@@ -366,10 +366,7 @@ int pdcp_fifo_read_input_sdus_remaining_bytes (frame_t frameP, eNB_flag_t enb_fl
|
|||||||
|
|
||||||
if (pdcp_p->instanciated_instance) {
|
if (pdcp_p->instanciated_instance) {
|
||||||
result = pdcp_data_req (
|
result = pdcp_data_req (
|
||||||
enb_inst,
|
ctxt_pP,
|
||||||
ue_inst,
|
|
||||||
frameP,
|
|
||||||
enb_flagP,
|
|
||||||
SRB_FLAG_NO,
|
SRB_FLAG_NO,
|
||||||
rb_id % maxDRB,
|
rb_id % maxDRB,
|
||||||
RLC_MUI_UNDEFINED,
|
RLC_MUI_UNDEFINED,
|
||||||
@@ -382,8 +379,8 @@ int pdcp_fifo_read_input_sdus_remaining_bytes (frame_t frameP, eNB_flag_t enb_fl
|
|||||||
|
|
||||||
} else if ((pdcp_input_header.traffic_type == TRAFFIC_IPV6_TYPE_MULTICAST) || (pdcp_input_header.traffic_type == TRAFFIC_IPV4_TYPE_MULTICAST)) {
|
} else if ((pdcp_input_header.traffic_type == TRAFFIC_IPV6_TYPE_MULTICAST) || (pdcp_input_header.traffic_type == TRAFFIC_IPV4_TYPE_MULTICAST)) {
|
||||||
LOG_D(PDCP, "[FRAME %5u][%s][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ on MBMS bearer/ %d Bytes --->][PDCP][MOD %u/%u][RB %u]\n",
|
LOG_D(PDCP, "[FRAME %5u][%s][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ on MBMS bearer/ %d Bytes --->][PDCP][MOD %u/%u][RB %u]\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
pdcp_read_header_g.inst,
|
pdcp_read_header_g.inst,
|
||||||
pdcp_read_header_g.rb_id,
|
pdcp_read_header_g.rb_id,
|
||||||
pdcp_read_header_g.data_size,
|
pdcp_read_header_g.data_size,
|
||||||
@@ -393,10 +390,7 @@ int pdcp_fifo_read_input_sdus_remaining_bytes (frame_t frameP, eNB_flag_t enb_fl
|
|||||||
|
|
||||||
if (pdcp_p->instanciated_instance) {
|
if (pdcp_p->instanciated_instance) {
|
||||||
result = pdcp_data_req (
|
result = pdcp_data_req (
|
||||||
enb_inst,
|
ctxt_pP,
|
||||||
ue_inst,
|
|
||||||
frameP,
|
|
||||||
enb_flagP,
|
|
||||||
SRB_FLAG_NO,
|
SRB_FLAG_NO,
|
||||||
rb_id,
|
rb_id,
|
||||||
RLC_MUI_UNDEFINED,
|
RLC_MUI_UNDEFINED,
|
||||||
@@ -407,7 +401,7 @@ int pdcp_fifo_read_input_sdus_remaining_bytes (frame_t frameP, eNB_flag_t enb_fl
|
|||||||
AssertFatal (result == TRUE, "PDCP data request failed!\n");
|
AssertFatal (result == TRUE, "PDCP data request failed!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (enb_flagP) {
|
} else if (ctxt_pP->enb_flag) {
|
||||||
// is a broadcast packet, we have to send this packet on all default RABS of all connected UEs
|
// is a broadcast packet, we have to send this packet on all default RABS of all connected UEs
|
||||||
LOG_D(PDCP, "Checking if could sent on default rabs\n");
|
LOG_D(PDCP, "Checking if could sent on default rabs\n");
|
||||||
for (ue_inst = 0; ue_inst < NUMBER_OF_UE_MAX; ue_inst++) {
|
for (ue_inst = 0; ue_inst < NUMBER_OF_UE_MAX; ue_inst++) {
|
||||||
@@ -415,8 +409,8 @@ int pdcp_fifo_read_input_sdus_remaining_bytes (frame_t frameP, eNB_flag_t enb_fl
|
|||||||
pdcp_p = &pdcp_array_drb_eNB[enb_inst][ue_inst][DEFAULT_RAB_ID-1];
|
pdcp_p = &pdcp_array_drb_eNB[enb_inst][ue_inst][DEFAULT_RAB_ID-1];
|
||||||
if (pdcp_p->instanciated_instance) {
|
if (pdcp_p->instanciated_instance) {
|
||||||
LOG_D(PDCP, "[FRAME %5u][%s][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u/%u][RB DEFAULT_RAB_ID %u]\n",
|
LOG_D(PDCP, "[FRAME %5u][%s][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u/%u][RB DEFAULT_RAB_ID %u]\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
pdcp_read_header_g.inst,
|
pdcp_read_header_g.inst,
|
||||||
pdcp_read_header_g.rb_id,
|
pdcp_read_header_g.rb_id,
|
||||||
pdcp_read_header_g.data_size,
|
pdcp_read_header_g.data_size,
|
||||||
@@ -424,10 +418,7 @@ int pdcp_fifo_read_input_sdus_remaining_bytes (frame_t frameP, eNB_flag_t enb_fl
|
|||||||
ue_inst,
|
ue_inst,
|
||||||
DEFAULT_RAB_ID);
|
DEFAULT_RAB_ID);
|
||||||
result = pdcp_data_req (
|
result = pdcp_data_req (
|
||||||
enb_inst,
|
ctxt_pP,
|
||||||
ue_inst,
|
|
||||||
frameP,
|
|
||||||
enb_flagP,
|
|
||||||
SRB_FLAG_NO,
|
SRB_FLAG_NO,
|
||||||
DEFAULT_RAB_ID,
|
DEFAULT_RAB_ID,
|
||||||
RLC_MUI_UNDEFINED,
|
RLC_MUI_UNDEFINED,
|
||||||
@@ -441,8 +432,8 @@ int pdcp_fifo_read_input_sdus_remaining_bytes (frame_t frameP, eNB_flag_t enb_fl
|
|||||||
} else {
|
} else {
|
||||||
LOG_D(PDCP, "Forcing send on DEFAULT_RAB_ID\n");
|
LOG_D(PDCP, "Forcing send on DEFAULT_RAB_ID\n");
|
||||||
LOG_D(PDCP, "[FRAME %5u][%s][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u/%u][RB DEFAULT_RAB_ID %u]\n",
|
LOG_D(PDCP, "[FRAME %5u][%s][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u/%u][RB DEFAULT_RAB_ID %u]\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
pdcp_read_header_g.inst,
|
pdcp_read_header_g.inst,
|
||||||
pdcp_read_header_g.rb_id,
|
pdcp_read_header_g.rb_id,
|
||||||
pdcp_read_header_g.data_size,
|
pdcp_read_header_g.data_size,
|
||||||
@@ -450,10 +441,7 @@ int pdcp_fifo_read_input_sdus_remaining_bytes (frame_t frameP, eNB_flag_t enb_fl
|
|||||||
ue_inst,
|
ue_inst,
|
||||||
DEFAULT_RAB_ID);
|
DEFAULT_RAB_ID);
|
||||||
result = pdcp_data_req (
|
result = pdcp_data_req (
|
||||||
enb_inst,
|
ctxt_pP,
|
||||||
ue_inst,
|
|
||||||
frameP,
|
|
||||||
enb_flagP,
|
|
||||||
SRB_FLAG_NO,
|
SRB_FLAG_NO,
|
||||||
DEFAULT_RAB_ID,
|
DEFAULT_RAB_ID,
|
||||||
RLC_MUI_UNDEFINED,
|
RLC_MUI_UNDEFINED,
|
||||||
@@ -475,7 +463,7 @@ int pdcp_fifo_read_input_sdus_remaining_bytes (frame_t frameP, eNB_flag_t enb_fl
|
|||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
int pdcp_fifo_read_input_sdus (frame_t frameP, eNB_flag_t enb_flagP, module_id_t ue_mod_idP, module_id_t enb_mod_idP)
|
int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||||
{
|
{
|
||||||
#ifdef NAS_NETLINK
|
#ifdef NAS_NETLINK
|
||||||
# if defined(ENABLE_PDCP_NETLINK_FIFO)
|
# if defined(ENABLE_PDCP_NETLINK_FIFO)
|
||||||
@@ -485,37 +473,37 @@ int pdcp_fifo_read_input_sdus (frame_t frameP, eNB_flag_t enb_flagP, module_id_t
|
|||||||
pdcp_transmission_mode_t pdcp_mode = PDCP_TRANSMISSION_MODE_UNKNOWN;
|
pdcp_transmission_mode_t pdcp_mode = PDCP_TRANSMISSION_MODE_UNKNOWN;
|
||||||
struct pdcp_netlink_element_s *data = NULL;
|
struct pdcp_netlink_element_s *data = NULL;
|
||||||
|
|
||||||
while (pdcp_netlink_dequeue_element(enb_mod_idP, ue_mod_idP, enb_flagP, &data) != 0) {
|
while (pdcp_netlink_dequeue_element(ctxt_pP->enb_module_id, ctxt_pP->ue_module_id, ctxt_pP->enb_flag, &data) != 0) {
|
||||||
DevAssert(data != NULL);
|
DevAssert(data != NULL);
|
||||||
if (enb_flagP == 0) {
|
if (ctxt_pP->enb_flag == 0) {
|
||||||
rab_id = data->pdcp_read_header.rb_id % maxDRB;
|
rab_id = data->pdcp_read_header.rb_id % maxDRB;
|
||||||
pdcp = &pdcp_array_drb_ue[ue_mod_idP][rab_id-1];
|
pdcp = &pdcp_array_drb_ue[ctxt_pP->ue_module_id][rab_id-1];
|
||||||
} else {
|
} else {
|
||||||
rab_id = data->pdcp_read_header.rb_id % maxDRB;
|
rab_id = data->pdcp_read_header.rb_id % maxDRB;
|
||||||
ue_mod_idP = data->pdcp_read_header.rb_id / maxDRB;
|
ctxt_pP->ue_module_id = data->pdcp_read_header.rb_id / maxDRB;
|
||||||
pdcp = &pdcp_array_drb_eNB[enb_mod_idP][ue_mod_idP][rab_id-1];
|
pdcp = &pdcp_array_drb_eNB[ctxt_pP->enb_module_id][ctxt_pP->ue_module_id][rab_id-1];
|
||||||
}
|
}
|
||||||
if (enb_flagP) {
|
if (ctxt_pP->enb_flag) {
|
||||||
AssertFatal ((enb_mod_idP >= oai_emulation.info.first_enb_local) && (oai_emulation.info.nb_enb_local > 0),
|
AssertFatal ((ctxt_pP->enb_module_id >= oai_emulation.info.first_enb_local) && (oai_emulation.info.nb_enb_local > 0),
|
||||||
"eNB module id is too low (%u/%d)!\n",
|
"eNB module id is too low (%u/%d)!\n",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
oai_emulation.info.first_enb_local);
|
oai_emulation.info.first_enb_local);
|
||||||
AssertFatal ((enb_mod_idP < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local)) && (oai_emulation.info.nb_enb_local > 0),
|
AssertFatal ((ctxt_pP->enb_module_id < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local)) && (oai_emulation.info.nb_enb_local > 0),
|
||||||
"eNB module id is too high (%u/%d)!\n",
|
"eNB module id is too high (%u/%d)!\n",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local);
|
oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local);
|
||||||
AssertFatal (ue_mod_idP < NB_UE_INST,
|
AssertFatal (ctxt_pP->ue_module_id < NB_UE_INST,
|
||||||
"UE module id is too high (%u/%d)!\n",
|
"UE module id is too high (%u/%d)!\n",
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
||||||
} else {
|
} else {
|
||||||
AssertFatal (ue_mod_idP < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local),
|
AssertFatal (ctxt_pP->ue_module_id < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local),
|
||||||
"UE module id is too high (%u/%d)!\n",
|
"UE module id is too high (%u/%d)!\n",
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
||||||
AssertFatal (ue_mod_idP >= oai_emulation.info.first_ue_local,
|
AssertFatal (ctxt_pP->ue_module_id >= oai_emulation.info.first_ue_local,
|
||||||
"UE module id is too low (%u/%d)!\n",
|
"UE module id is too low (%u/%d)!\n",
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
oai_emulation.info.first_ue_local);
|
oai_emulation.info.first_ue_local);
|
||||||
}
|
}
|
||||||
AssertFatal (rab_id < maxDRB, "RB id is too high (%u/%d)!\n", rab_id, maxDRB);
|
AssertFatal (rab_id < maxDRB, "RB id is too high (%u/%d)!\n", rab_id, maxDRB);
|
||||||
@@ -524,13 +512,13 @@ int pdcp_fifo_read_input_sdus (frame_t frameP, eNB_flag_t enb_flagP, module_id_t
|
|||||||
if (pdcp->instanciated_instance) {
|
if (pdcp->instanciated_instance) {
|
||||||
LOG_D(PDCP, "[FRAME %05d][%s][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ "
|
LOG_D(PDCP, "[FRAME %05d][%s][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ "
|
||||||
"/ %d Bytes --->][PDCP][MOD %u/%u][RB %u]\n",
|
"/ %d Bytes --->][PDCP][MOD %u/%u][RB %u]\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
data->pdcp_read_header.inst,
|
data->pdcp_read_header.inst,
|
||||||
data->pdcp_read_header.rb_id,
|
data->pdcp_read_header.rb_id,
|
||||||
data->pdcp_read_header.data_size,
|
data->pdcp_read_header.data_size,
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rab_id);
|
rab_id);
|
||||||
#ifdef OAI_NW_DRIVER_TYPE_ETHERNET
|
#ifdef OAI_NW_DRIVER_TYPE_ETHERNET
|
||||||
if ((data->pdcp_read_header.traffic_type == TRAFFIC_IPV6_TYPE_MULTICAST) /*TRAFFIC_IPV6_TYPE_MULTICAST */ ||
|
if ((data->pdcp_read_header.traffic_type == TRAFFIC_IPV6_TYPE_MULTICAST) /*TRAFFIC_IPV6_TYPE_MULTICAST */ ||
|
||||||
@@ -551,10 +539,10 @@ int pdcp_fifo_read_input_sdus (frame_t frameP, eNB_flag_t enb_flagP, module_id_t
|
|||||||
#else // NASMESH driver does not curreenlty support multicast traffic
|
#else // NASMESH driver does not curreenlty support multicast traffic
|
||||||
pdcp_mode = PDCP_TRANSMISSION_MODE_DATA;
|
pdcp_mode = PDCP_TRANSMISSION_MODE_DATA;
|
||||||
#endif
|
#endif
|
||||||
pdcp_data_req(enb_mod_idP,
|
pdcp_data_req(ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
enb_flagP,
|
ctxt_pP->enb_flag,
|
||||||
SRB_FLAG_NO,
|
SRB_FLAG_NO,
|
||||||
rab_id % maxDRB,
|
rab_id % maxDRB,
|
||||||
RLC_MUI_UNDEFINED,
|
RLC_MUI_UNDEFINED,
|
||||||
@@ -563,24 +551,24 @@ int pdcp_fifo_read_input_sdus (frame_t frameP, eNB_flag_t enb_flagP, module_id_t
|
|||||||
data->data,
|
data->data,
|
||||||
pdcp_mode);
|
pdcp_mode);
|
||||||
} else {
|
} else {
|
||||||
LOG_E(PDCP, "Received packet for non-instanciated instance %u with rb_id %u, UE_index %d, enb_flagP %d eNB_index %d\n",
|
LOG_E(PDCP, "Received packet for non-instanciated instance %u with rb_id %u, UE_index %d, ctxt_pP->enb_flag %d eNB_index %d\n",
|
||||||
data->pdcp_read_header.inst, data->pdcp_read_header.rb_id, ue_mod_idP, enb_flagP,enb_mod_idP);
|
data->pdcp_read_header.inst, data->pdcp_read_header.rb_id, ctxt_pP->ue_module_id, ctxt_pP->enb_flag,ctxt_pP->enb_module_id);
|
||||||
}
|
}
|
||||||
} else if (enb_flagP) {
|
} else if (ctxt_pP->enb_flag) {
|
||||||
/* rb_id = 0, thus interpreated as broadcast and transported as
|
/* rb_id = 0, thus interpreated as broadcast and transported as
|
||||||
* multiple unicast is a broadcast packet, we have to send this
|
* multiple unicast is a broadcast packet, we have to send this
|
||||||
* packet on all default RABS of all connected UEs
|
* packet on all default RABS of all connected UEs
|
||||||
*/
|
*/
|
||||||
LOG_D(PDCP, "eNB Try Forcing send on DEFAULT_RAB_ID first_ue_local %u nb_ue_local %u\n", oai_emulation.info.first_ue_local, oai_emulation.info.nb_ue_local);
|
LOG_D(PDCP, "eNB Try Forcing send on DEFAULT_RAB_ID first_ue_local %u nb_ue_local %u\n", oai_emulation.info.first_ue_local, oai_emulation.info.nb_ue_local);
|
||||||
for (ue_id = 0; ue_id < NB_UE_INST; ue_id++) {
|
for (ue_id = 0; ue_id < NB_UE_INST; ue_id++) {
|
||||||
pdcp = &pdcp_array_drb_eNB[enb_mod_idP][ue_id][DEFAULT_RAB_ID-1];
|
pdcp = &pdcp_array_drb_eNB[ctxt_pP->enb_module_id][ue_id][DEFAULT_RAB_ID-1];
|
||||||
if (pdcp->instanciated_instance) {
|
if (pdcp->instanciated_instance) {
|
||||||
LOG_D(PDCP, "eNB Try Forcing send on DEFAULT_RAB_ID UE %d\n", ue_id);
|
LOG_D(PDCP, "eNB Try Forcing send on DEFAULT_RAB_ID UE %d\n", ue_id);
|
||||||
pdcp_data_req(
|
pdcp_data_req(
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_id,
|
ue_id,
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
enb_flagP,
|
ctxt_pP->enb_flag,
|
||||||
SRB_FLAG_NO,
|
SRB_FLAG_NO,
|
||||||
DEFAULT_RAB_ID,
|
DEFAULT_RAB_ID,
|
||||||
RLC_MUI_UNDEFINED,
|
RLC_MUI_UNDEFINED,
|
||||||
@@ -593,10 +581,10 @@ int pdcp_fifo_read_input_sdus (frame_t frameP, eNB_flag_t enb_flagP, module_id_t
|
|||||||
} else {
|
} else {
|
||||||
LOG_D(PDCP, "Forcing send on DEFAULT_RAB_ID\n");
|
LOG_D(PDCP, "Forcing send on DEFAULT_RAB_ID\n");
|
||||||
pdcp_data_req(
|
pdcp_data_req(
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
enb_flagP,
|
ctxt_pP->enb_flag,
|
||||||
SRB_FLAG_NO,
|
SRB_FLAG_NO,
|
||||||
DEFAULT_RAB_ID,
|
DEFAULT_RAB_ID,
|
||||||
RLC_MUI_UNDEFINED,
|
RLC_MUI_UNDEFINED,
|
||||||
@@ -653,31 +641,31 @@ int pdcp_fifo_read_input_sdus (frame_t frameP, eNB_flag_t enb_flagP, module_id_t
|
|||||||
#ifdef OAI_EMU
|
#ifdef OAI_EMU
|
||||||
// overwrite function input parameters, because only one netlink socket for all instances
|
// overwrite function input parameters, because only one netlink socket for all instances
|
||||||
if (pdcp_read_header_g.inst < oai_emulation.info.nb_enb_local) {
|
if (pdcp_read_header_g.inst < oai_emulation.info.nb_enb_local) {
|
||||||
enb_flagP = 1;
|
ctxt_pP->enb_flag = 1;
|
||||||
ue_mod_idP = pdcp_read_header_g.rb_id / maxDRB + oai_emulation.info.first_ue_local;
|
ctxt_pP->ue_module_id = pdcp_read_header_g.rb_id / maxDRB + oai_emulation.info.first_ue_local;
|
||||||
enb_mod_idP = pdcp_read_header_g.inst + oai_emulation.info.first_enb_local;
|
ctxt_pP->enb_module_id = pdcp_read_header_g.inst + oai_emulation.info.first_enb_local;
|
||||||
rab_id = pdcp_read_header_g.rb_id % maxDRB;
|
rab_id = pdcp_read_header_g.rb_id % maxDRB;
|
||||||
} else {
|
} else {
|
||||||
enb_flagP = 0;
|
ctxt_pP->enb_flag = 0;
|
||||||
ue_mod_idP = pdcp_read_header_g.inst - oai_emulation.info.nb_enb_local + oai_emulation.info.first_ue_local;
|
ctxt_pP->ue_module_id = pdcp_read_header_g.inst - oai_emulation.info.nb_enb_local + oai_emulation.info.first_ue_local;
|
||||||
enb_mod_idP = 0;
|
ctxt_pP->enb_module_id = 0;
|
||||||
rab_id = pdcp_read_header_g.rb_id;
|
rab_id = pdcp_read_header_g.rb_id;
|
||||||
}
|
}
|
||||||
AssertFatal (enb_mod_idP >= oai_emulation.info.first_enb_local,
|
AssertFatal (ctxt_pP->enb_module_id >= oai_emulation.info.first_enb_local,
|
||||||
"eNB inst is too low (%u/%d)!\n",
|
"eNB inst is too low (%u/%d)!\n",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
oai_emulation.info.first_enb_local);
|
oai_emulation.info.first_enb_local);
|
||||||
AssertFatal (enb_mod_idP < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local),
|
AssertFatal (ctxt_pP->enb_module_id < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local),
|
||||||
"eNB inst is too high (%u/%d)!\n",
|
"eNB inst is too high (%u/%d)!\n",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local);
|
oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local);
|
||||||
AssertFatal (ue_mod_idP >= oai_emulation.info.first_ue_local,
|
AssertFatal (ctxt_pP->ue_module_id >= oai_emulation.info.first_ue_local,
|
||||||
"UE inst is too low (%u/%d)!\n",
|
"UE inst is too low (%u/%d)!\n",
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
oai_emulation.info.first_ue_local);
|
oai_emulation.info.first_ue_local);
|
||||||
AssertFatal (ue_mod_idP < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local),
|
AssertFatal (ctxt_pP->ue_module_id < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local),
|
||||||
"UE inst is too high (%u/%d)!\n",
|
"UE inst is too high (%u/%d)!\n",
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
||||||
AssertFatal (rab_id < maxDRB, "RB id is too high (%u/%d)!\n", rab_id, maxDRB);
|
AssertFatal (rab_id < maxDRB, "RB id is too high (%u/%d)!\n", rab_id, maxDRB);
|
||||||
/*LGpdcp_read_header.inst = (pdcp_read_header_g.inst >= oai_emulation.info.nb_enb_local) ? \
|
/*LGpdcp_read_header.inst = (pdcp_read_header_g.inst >= oai_emulation.info.nb_enb_local) ? \
|
||||||
@@ -686,24 +674,24 @@ int pdcp_fifo_read_input_sdus (frame_t frameP, eNB_flag_t enb_flagP, module_id_t
|
|||||||
#else
|
#else
|
||||||
pdcp_read_header_g.inst = 0;
|
pdcp_read_header_g.inst = 0;
|
||||||
#warning "TO DO CORRCT VALUES FOR ue mod id, enb mod id"
|
#warning "TO DO CORRCT VALUES FOR ue mod id, enb mod id"
|
||||||
if (enb_flagP) {
|
if (ctxt_pP->enb_flag) {
|
||||||
ue_mod_idP = 0;
|
ctxt_pP->ue_module_id = 0;
|
||||||
enb_mod_idP = 0;
|
ctxt_pP->enb_module_id = 0;
|
||||||
rab_id = pdcp_read_header_g.rb_id % maxDRB;
|
rab_id = pdcp_read_header_g.rb_id % maxDRB;
|
||||||
} else {
|
} else {
|
||||||
ue_mod_idP = 0;
|
ctxt_pP->ue_module_id = 0;
|
||||||
enb_mod_idP = 0;
|
ctxt_pP->enb_module_id = 0;
|
||||||
rab_id = pdcp_read_header_g.rb_id % maxDRB;
|
rab_id = pdcp_read_header_g.rb_id % maxDRB;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (enb_flagP) {
|
if (ctxt_pP->enb_flag) {
|
||||||
if (rab_id != 0) {
|
if (rab_id != 0) {
|
||||||
rab_id = rab_id % maxDRB;
|
rab_id = rab_id % maxDRB;
|
||||||
if (pdcp_array_drb_eNB[enb_mod_idP][ue_mod_idP][rab_id-1].instanciated_instance) {
|
if (pdcp_array_drb_eNB[ctxt_pP->enb_module_id][ctxt_pP->ue_module_id][rab_id-1].instanciated_instance) {
|
||||||
#ifdef PDCP_DEBUG
|
#ifdef PDCP_DEBUG
|
||||||
LOG_I(PDCP, "[FRAME %5u][eNB][NETLINK][IP->PDCP] INST %d: Received socket with length %d (nlmsg_len = %d) on Rab %d \n",
|
LOG_I(PDCP, "[FRAME %5u][eNB][NETLINK][IP->PDCP] INST %d: Received socket with length %d (nlmsg_len = %d) on Rab %d \n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
pdcp_read_header_g.inst,
|
pdcp_read_header_g.inst,
|
||||||
len,
|
len,
|
||||||
nas_nlh_rx->nlmsg_len-sizeof(struct nlmsghdr),
|
nas_nlh_rx->nlmsg_len-sizeof(struct nlmsghdr),
|
||||||
@@ -711,15 +699,15 @@ int pdcp_fifo_read_input_sdus (frame_t frameP, eNB_flag_t enb_flagP, module_id_t
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
LOG_D(PDCP, "[FRAME %5u][eNB][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u/%u][RB %u]\n",
|
LOG_D(PDCP, "[FRAME %5u][eNB][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u/%u][RB %u]\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
pdcp_read_header_g.inst,
|
pdcp_read_header_g.inst,
|
||||||
pdcp_read_header_g.rb_id,
|
pdcp_read_header_g.rb_id,
|
||||||
pdcp_read_header_g.data_size,
|
pdcp_read_header_g.data_size,
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rab_id);
|
rab_id);
|
||||||
|
|
||||||
pdcp_data_req(enb_mod_idP,ue_mod_idP,frameP, enb_flagP,SRB_FLAG_NO,
|
pdcp_data_req(ctxt_pP->enb_module_id,ctxt_pP->ue_module_id,ctxt_pP->frame, ctxt_pP->enb_flag,SRB_FLAG_NO,
|
||||||
rab_id,
|
rab_id,
|
||||||
RLC_MUI_UNDEFINED,
|
RLC_MUI_UNDEFINED,
|
||||||
RLC_SDU_CONFIRM_NO,
|
RLC_SDU_CONFIRM_NO,
|
||||||
@@ -728,32 +716,32 @@ int pdcp_fifo_read_input_sdus (frame_t frameP, eNB_flag_t enb_flagP, module_id_t
|
|||||||
PDCP_TRANSMISSION_MODE_DATA);
|
PDCP_TRANSMISSION_MODE_DATA);
|
||||||
} else {
|
} else {
|
||||||
LOG_D(PDCP, "[FRAME %5u][eNB][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u/%u][RB %u] NON INSTANCIATED INSTANCE, DROPPED\n",
|
LOG_D(PDCP, "[FRAME %5u][eNB][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u/%u][RB %u] NON INSTANCIATED INSTANCE, DROPPED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
pdcp_read_header_g.inst,
|
pdcp_read_header_g.inst,
|
||||||
pdcp_read_header_g.rb_id,
|
pdcp_read_header_g.rb_id,
|
||||||
pdcp_read_header_g.data_size,
|
pdcp_read_header_g.data_size,
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rab_id);
|
rab_id);
|
||||||
}
|
}
|
||||||
} else { // rb_id =0, thus interpreated as broadcast and transported as multiple unicast
|
} else { // rb_id =0, thus interpreated as broadcast and transported as multiple unicast
|
||||||
// is a broadcast packet, we have to send this packet on all default RABS of all connected UEs
|
// is a broadcast packet, we have to send this packet on all default RABS of all connected UEs
|
||||||
#warning CODE TO BE REVIEWED, ONLY WORK FOR SIMPLE TOPOLOGY CASES
|
#warning CODE TO BE REVIEWED, ONLY WORK FOR SIMPLE TOPOLOGY CASES
|
||||||
for (ue_mod_idP = 0; ue_mod_idP < NB_UE_INST; ue_mod_idP++) {
|
for (ctxt_pP->ue_module_id = 0; ctxt_pP->ue_module_id < NB_UE_INST; ctxt_pP->ue_module_id++) {
|
||||||
if (pdcp_array_drb_eNB[enb_mod_idP][ue_mod_idP][rab_id-1].instanciated_instance == TRUE) {
|
if (pdcp_array_drb_eNB[ctxt_pP->enb_module_id][ctxt_pP->ue_module_id][rab_id-1].instanciated_instance == TRUE) {
|
||||||
LOG_D(PDCP, "[FRAME %5u][eNB][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u/%u][RB DEFAULT_RAB_ID %u]\n",
|
LOG_D(PDCP, "[FRAME %5u][eNB][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u/%u][RB DEFAULT_RAB_ID %u]\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
pdcp_read_header_g.inst,
|
pdcp_read_header_g.inst,
|
||||||
pdcp_read_header_g.rb_id,
|
pdcp_read_header_g.rb_id,
|
||||||
pdcp_read_header_g.data_size,
|
pdcp_read_header_g.data_size,
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
DEFAULT_RAB_ID);
|
DEFAULT_RAB_ID);
|
||||||
pdcp_data_req (
|
pdcp_data_req (
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
enb_flagP,
|
ctxt_pP->enb_flag,
|
||||||
SRB_FLAG_NO,
|
SRB_FLAG_NO,
|
||||||
DEFAULT_RAB_ID,
|
DEFAULT_RAB_ID,
|
||||||
RLC_MUI_UNDEFINED,
|
RLC_MUI_UNDEFINED,
|
||||||
@@ -766,30 +754,30 @@ int pdcp_fifo_read_input_sdus (frame_t frameP, eNB_flag_t enb_flagP, module_id_t
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (rab_id != 0) {
|
if (rab_id != 0) {
|
||||||
if (pdcp_array_drb_ue[ue_mod_idP][rab_id-1].instanciated_instance) {
|
if (pdcp_array_drb_ue[ctxt_pP->ue_module_id][rab_id-1].instanciated_instance) {
|
||||||
#ifdef PDCP_DEBUG
|
#ifdef PDCP_DEBUG
|
||||||
LOG_I(PDCP, "[FRAME %5u][UE][NETLINK][IP->PDCP] INST %d: Received socket with length %d (nlmsg_len = %d) on Rab %d \n",
|
LOG_I(PDCP, "[FRAME %5u][UE][NETLINK][IP->PDCP] INST %d: Received socket with length %d (nlmsg_len = %d) on Rab %d \n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
pdcp_read_header_g.inst,
|
pdcp_read_header_g.inst,
|
||||||
len,
|
len,
|
||||||
nas_nlh_rx->nlmsg_len-sizeof(struct nlmsghdr),
|
nas_nlh_rx->nlmsg_len-sizeof(struct nlmsghdr),
|
||||||
pdcp_read_header_g.rb_id);
|
pdcp_read_header_g.rb_id);
|
||||||
|
|
||||||
LOG_D(PDCP, "[FRAME %5u][UE][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u/%u][RB %u]\n",
|
LOG_D(PDCP, "[FRAME %5u][UE][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u/%u][RB %u]\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
pdcp_read_header_g.inst,
|
pdcp_read_header_g.inst,
|
||||||
pdcp_read_header_g.rb_id,
|
pdcp_read_header_g.rb_id,
|
||||||
pdcp_read_header_g.data_size,
|
pdcp_read_header_g.data_size,
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rab_id);
|
rab_id);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pdcp_data_req(
|
pdcp_data_req(
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
enb_flagP,
|
ctxt_pP->enb_flag,
|
||||||
SRB_FLAG_NO,
|
SRB_FLAG_NO,
|
||||||
rab_id,
|
rab_id,
|
||||||
RLC_MUI_UNDEFINED,
|
RLC_MUI_UNDEFINED,
|
||||||
@@ -799,29 +787,29 @@ int pdcp_fifo_read_input_sdus (frame_t frameP, eNB_flag_t enb_flagP, module_id_t
|
|||||||
PDCP_TRANSMISSION_MODE_DATA);
|
PDCP_TRANSMISSION_MODE_DATA);
|
||||||
} else {
|
} else {
|
||||||
LOG_D(PDCP, "[FRAME %5u][UE][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u/%u][RB %u] NON INSTANCIATED INSTANCE, DROPPED\n",
|
LOG_D(PDCP, "[FRAME %5u][UE][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u/%u][RB %u] NON INSTANCIATED INSTANCE, DROPPED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
pdcp_read_header_g.inst,
|
pdcp_read_header_g.inst,
|
||||||
pdcp_read_header_g.rb_id,
|
pdcp_read_header_g.rb_id,
|
||||||
pdcp_read_header_g.data_size,
|
pdcp_read_header_g.data_size,
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rab_id);
|
rab_id);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_D(PDCP, "Forcing send on DEFAULT_RAB_ID\n");
|
LOG_D(PDCP, "Forcing send on DEFAULT_RAB_ID\n");
|
||||||
LOG_D(PDCP, "[FRAME %5u][eNB][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u/%u][RB DEFAULT_RAB_ID %u]\n",
|
LOG_D(PDCP, "[FRAME %5u][eNB][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u/%u][RB DEFAULT_RAB_ID %u]\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
pdcp_read_header_g.inst,
|
pdcp_read_header_g.inst,
|
||||||
pdcp_read_header_g.rb_id,
|
pdcp_read_header_g.rb_id,
|
||||||
pdcp_read_header_g.data_size,
|
pdcp_read_header_g.data_size,
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
DEFAULT_RAB_ID);
|
DEFAULT_RAB_ID);
|
||||||
pdcp_data_req (
|
pdcp_data_req (
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
enb_flagP,
|
ctxt_pP->enb_flag,
|
||||||
SRB_FLAG_NO,
|
SRB_FLAG_NO,
|
||||||
DEFAULT_RAB_ID,
|
DEFAULT_RAB_ID,
|
||||||
RLC_MUI_UNDEFINED,
|
RLC_MUI_UNDEFINED,
|
||||||
@@ -844,7 +832,7 @@ int pdcp_fifo_read_input_sdus (frame_t frameP, eNB_flag_t enb_flagP, module_id_t
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void pdcp_fifo_read_input_sdus_from_otg (frame_t frameP, eNB_flag_t enb_flagP, module_id_t ue_mod_idP, module_id_t enb_mod_idP) {
|
void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t* const ctxt_pP) {
|
||||||
unsigned char *otg_pkt=NULL;
|
unsigned char *otg_pkt=NULL;
|
||||||
module_id_t src_id, module_id; // src for otg
|
module_id_t src_id, module_id; // src for otg
|
||||||
module_id_t dst_id; // dst for otg
|
module_id_t dst_id; // dst for otg
|
||||||
@@ -855,17 +843,19 @@ void pdcp_fifo_read_input_sdus_from_otg (frame_t frameP, eNB_flag_t enb_flagP, m
|
|||||||
Packet_otg_elt_t *otg_pkt_info=NULL;
|
Packet_otg_elt_t *otg_pkt_info=NULL;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
src_id = enb_mod_idP;
|
protocol_ctxt_t ctxt;
|
||||||
|
|
||||||
|
src_id = ctxt_pP->enb_module_id;
|
||||||
|
|
||||||
// we need to add conditions to avoid transmitting data when the UE is not RRC connected.
|
// we need to add conditions to avoid transmitting data when the UE is not RRC connected.
|
||||||
#if defined(USER_MODE) && defined(OAI_EMU)
|
#if defined(USER_MODE) && defined(OAI_EMU)
|
||||||
if (oai_emulation.info.otg_enabled ==1 ){
|
if (oai_emulation.info.otg_enabled ==1 ){
|
||||||
module_id = (enb_flagP == 1) ? enb_mod_idP : ue_mod_idP+NB_eNB_INST;
|
module_id = (ctxt_pP->enb_flag == 1) ? ctxt_pP->enb_module_id : ctxt_pP->ue_module_id+NB_eNB_INST;
|
||||||
//rb_id = (enb_flagP == 1) ? enb_mod_idP * MAX_NUM_RB + DTCH : (NB_eNB_INST + UE_index -1 ) * MAX_NUM_RB + DTCH ;
|
//rb_id = (ctxt_pP->enb_flag == 1) ? ctxt_pP->enb_module_id * MAX_NUM_RB + DTCH : (NB_eNB_INST + UE_index -1 ) * MAX_NUM_RB + DTCH ;
|
||||||
src_id = module_id;
|
src_id = module_id;
|
||||||
while ((otg_pkt_info = pkt_list_remove_head(&(otg_pdcp_buffer[module_id]))) != NULL) {
|
while ((otg_pkt_info = pkt_list_remove_head(&(otg_pdcp_buffer[module_id]))) != NULL) {
|
||||||
LOG_I(OTG,"Mod_id %d Frame %d Got a packet (%p), HEAD of otg_pdcp_buffer[%d] is %p and Nb elements is %d\n",
|
LOG_I(OTG,"Mod_id %d Frame %d Got a packet (%p), HEAD of otg_pdcp_buffer[%d] is %p and Nb elements is %d\n",
|
||||||
module_id,frameP, otg_pkt_info, module_id, pkt_list_get_head(&(otg_pdcp_buffer[module_id])), otg_pdcp_buffer[module_id].nb_elements);
|
module_id,ctxt_pP->frame, otg_pkt_info, module_id, pkt_list_get_head(&(otg_pdcp_buffer[module_id])), otg_pdcp_buffer[module_id].nb_elements);
|
||||||
//otg_pkt_info = pkt_list_remove_head(&(otg_pdcp_buffer[module_id]));
|
//otg_pkt_info = pkt_list_remove_head(&(otg_pdcp_buffer[module_id]));
|
||||||
dst_id = (otg_pkt_info->otg_pkt).dst_id;
|
dst_id = (otg_pkt_info->otg_pkt).dst_id;
|
||||||
module_id = (otg_pkt_info->otg_pkt).module_id;
|
module_id = (otg_pkt_info->otg_pkt).module_id;
|
||||||
@@ -875,7 +865,7 @@ void pdcp_fifo_read_input_sdus_from_otg (frame_t frameP, eNB_flag_t enb_flagP, m
|
|||||||
// LOG_I(PDCP,"pdcp_fifo, pdcp mode is= %d\n",pdcp_mode);
|
// LOG_I(PDCP,"pdcp_fifo, pdcp mode is= %d\n",pdcp_mode);
|
||||||
|
|
||||||
// generate traffic if the ue is rrc reconfigured state
|
// generate traffic if the ue is rrc reconfigured state
|
||||||
// if (mac_get_rrc_status(module_id, enb_flagP, dst_id ) > 2 /*RRC_CONNECTED*/) { // not needed: this test is already done in update_otg_enb
|
// if (mac_get_rrc_status(module_id, ctxt_pP->enb_flag, dst_id ) > 2 /*RRC_CONNECTED*/) { // not needed: this test is already done in update_otg_enb
|
||||||
otg_pkt = (unsigned char*) (otg_pkt_info->otg_pkt).sdu_buffer;
|
otg_pkt = (unsigned char*) (otg_pkt_info->otg_pkt).sdu_buffer;
|
||||||
pkt_size = (otg_pkt_info->otg_pkt).sdu_buffer_size;
|
pkt_size = (otg_pkt_info->otg_pkt).sdu_buffer_size;
|
||||||
if (otg_pkt != NULL) {
|
if (otg_pkt != NULL) {
|
||||||
@@ -886,8 +876,8 @@ void pdcp_fifo_read_input_sdus_from_otg (frame_t frameP, eNB_flag_t enb_flagP, m
|
|||||||
*/
|
*/
|
||||||
//rb_id = (/*NB_eNB_INST +*/ dst_id -1 ) * MAX_NUM_RB + DTCH;
|
//rb_id = (/*NB_eNB_INST +*/ dst_id -1 ) * MAX_NUM_RB + DTCH;
|
||||||
LOG_D(OTG,"[eNB %d] Frame %d sending packet %d from module %d on rab id %d (src %d, dst %d) pkt size %d for pdcp mode %d\n",
|
LOG_D(OTG,"[eNB %d] Frame %d sending packet %d from module %d on rab id %d (src %d, dst %d) pkt size %d for pdcp mode %d\n",
|
||||||
enb_mod_idP, frameP, pkt_cnt_enb++, module_id, rb_id, module_id, dst_id, pkt_size, pdcp_mode);
|
ctxt_pP->enb_module_id, ctxt_pP->frame, pkt_cnt_enb++, module_id, rb_id, module_id, dst_id, pkt_size, pdcp_mode);
|
||||||
result = pdcp_data_req(enb_mod_idP, dst_id, frameP, enb_flagP, SRB_FLAG_NO, rb_id, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO, pkt_size, otg_pkt,pdcp_mode);
|
result = pdcp_data_req(ctxt_pP->enb_module_id, dst_id, ctxt_pP->frame, ctxt_pP->enb_flag, SRB_FLAG_NO, rb_id, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO, pkt_size, otg_pkt,pdcp_mode);
|
||||||
AssertFatal (result == TRUE, "PDCP data request failed!\n");
|
AssertFatal (result == TRUE, "PDCP data request failed!\n");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -895,11 +885,14 @@ void pdcp_fifo_read_input_sdus_from_otg (frame_t frameP, eNB_flag_t enb_flagP, m
|
|||||||
|
|
||||||
|
|
||||||
LOG_D(OTG,"[UE %d] Frame %d: sending packet %d from module %d on rab id %d (src %d, dst %d) pkt size %d\n",
|
LOG_D(OTG,"[UE %d] Frame %d: sending packet %d from module %d on rab id %d (src %d, dst %d) pkt size %d\n",
|
||||||
ue_mod_idP, frameP, pkt_cnt_ue++, src_id, rb_id, src_id, dst_id, pkt_size);
|
ctxt_pP->ue_module_id, ctxt_pP->frame, pkt_cnt_ue++, src_id, rb_id, src_id, dst_id, pkt_size);
|
||||||
result = pdcp_data_req( dst_id,
|
|
||||||
ue_mod_idP,
|
ctxt.enb_module_id = dst_id;
|
||||||
frameP,
|
ctxt.ue_module_id = ue_module_id;
|
||||||
enb_flagP,
|
ctxt.frame = ctxt_pP->frame;
|
||||||
|
ctxt.enb_flag = ctxt_pP->enb_flag;
|
||||||
|
|
||||||
|
result = pdcp_data_req( &ctxt,
|
||||||
SRB_FLAG_NO,
|
SRB_FLAG_NO,
|
||||||
rb_id,
|
rb_id,
|
||||||
RLC_MUI_UNDEFINED,
|
RLC_MUI_UNDEFINED,
|
||||||
@@ -912,24 +905,36 @@ void pdcp_fifo_read_input_sdus_from_otg (frame_t frameP, eNB_flag_t enb_flagP, m
|
|||||||
free(otg_pkt);
|
free(otg_pkt);
|
||||||
otg_pkt = NULL;
|
otg_pkt = NULL;
|
||||||
}
|
}
|
||||||
// } //else LOG_D(OTG,"frameP %d enb %d-> ue %d link not yet established state %d \n", frameP, eNB_index,dst_id - NB_eNB_INST, mac_get_rrc_status(module_id, enb_flagP, dst_id - NB_eNB_INST));
|
// } //else LOG_D(OTG,"ctxt_pP->frame %d enb %d-> ue %d link not yet established state %d \n", ctxt_pP->frame, eNB_index,dst_id - NB_eNB_INST, mac_get_rrc_status(module_id, ctxt_pP->enb_flag, dst_id - NB_eNB_INST));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if ((otg_enabled==1) && (enb_flagP == 1)) { // generate DL traffic
|
if ((otg_enabled==1) && (ctxt_pP->enb_flag == 1)) { // generate DL traffic
|
||||||
unsigned int ctime=0;
|
unsigned int ctime=0;
|
||||||
ctime = frameP * 100;
|
ctime = ctxt_pP->frame * 100;
|
||||||
|
|
||||||
|
/*if ((mac_get_rrc_status(eNB_index, ctxt_pP->enb_flag, 0 ) > 2) &&
|
||||||
|
(mac_get_rrc_status(eNB_index, ctxt_pP->enb_flag, 1 ) > 2)) { */
|
||||||
|
ctxt.enb_module_id = ctxt_pP->enb_module_id;
|
||||||
|
ctxt.frame = ctxt_pP->frame;
|
||||||
|
ctxt.enb_flag = ctxt_pP->enb_flag;
|
||||||
|
|
||||||
/*if ((mac_get_rrc_status(eNB_index, enb_flagP, 0 ) > 2) &&
|
|
||||||
(mac_get_rrc_status(eNB_index, enb_flagP, 1 ) > 2)) { */
|
|
||||||
for (dst_id = 0; dst_id<NUMBER_OF_UE_MAX; dst_id++) {
|
for (dst_id = 0; dst_id<NUMBER_OF_UE_MAX; dst_id++) {
|
||||||
if (mac_get_rrc_status(enb_mod_idP, enb_flagP, dst_id ) > 2) {
|
if (mac_get_rrc_status(ctxt_pP->enb_module_id, ctxt_pP->enb_flag, dst_id ) > 2) {
|
||||||
otg_pkt=packet_gen(src_id, dst_id, 0, ctime, &pkt_size);
|
otg_pkt=packet_gen(src_id, dst_id, 0, ctime, &pkt_size);
|
||||||
if (otg_pkt != NULL){
|
if (otg_pkt != NULL){
|
||||||
rb_id = dst_id * maxDRB + DTCH;
|
rb_id = dst_id * maxDRB + DTCH;
|
||||||
pdcp_data_req(enb_mod_idP, dst_id, frameP, enb_flagP, SRB_FLAG_NO, rb_id, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO,pkt_size, otg_pkt, PDCP_TRANSMISSION_MODE_DATA);
|
ctxt.ue_module_id = dst_id;
|
||||||
LOG_I(OTG,"send packet from module %d on rab id %d (src %d, dst %d) pkt size %d\n", enb_mod_idP, rb_id, src_id, dst_id, pkt_size);
|
pdcp_data_req(&ctxt,
|
||||||
|
SRB_FLAG_NO,
|
||||||
|
rb_id,
|
||||||
|
RLC_MUI_UNDEFINED,
|
||||||
|
RLC_SDU_CONFIRM_NO,
|
||||||
|
pkt_size,
|
||||||
|
otg_pkt,
|
||||||
|
PDCP_TRANSMISSION_MODE_DATA);
|
||||||
|
LOG_I(OTG,"send packet from module %d on rab id %d (src %d, dst %d) pkt size %d\n", ctxt_pP->enb_module_id, rb_id, src_id, dst_id, pkt_size);
|
||||||
free(otg_pkt);
|
free(otg_pkt);
|
||||||
}
|
}
|
||||||
/*else {
|
/*else {
|
||||||
@@ -937,7 +942,7 @@ void pdcp_fifo_read_input_sdus_from_otg (frame_t frameP, eNB_flag_t enb_flagP, m
|
|||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
/*else {
|
/*else {
|
||||||
LOG_I(OTG,"rrc_status (src %d, dst %d) = %d\n",src_id, dst_id, mac_get_rrc_status(src_id, enb_flagP, dst_id ));
|
LOG_I(OTG,"rrc_status (src %d, dst %d) = %d\n",src_id, dst_id, mac_get_rrc_status(src_id, ctxt_pP->enb_flag, dst_id ));
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ int pdcp_netlink_init(void) {
|
|||||||
* should be avoided if we want a reliable link.
|
* should be avoided if we want a reliable link.
|
||||||
*/
|
*/
|
||||||
if (pthread_create(&pdcp_netlink_thread, &attr, pdcp_netlink_thread_fct, NULL) != 0) {
|
if (pthread_create(&pdcp_netlink_thread, &attr, pdcp_netlink_thread_fct, NULL) != 0) {
|
||||||
LOG_E(PDCP, "[NETLINK]Failed to create new thread for Netlink/PDCP communcation (%d:%s)\n",
|
LOG_E(PDCP, "[NETLINK]Failed to create new thread for Netlink/PDCP communication (%d:%s)\n",
|
||||||
errno, strerror(errno));
|
errno, strerror(errno));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
@@ -164,23 +164,20 @@ int pdcp_netlink_init(void) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int pdcp_netlink_dequeue_element(
|
int pdcp_netlink_dequeue_element(const protocol_ctxt_t* const ctxt_pP,
|
||||||
module_id_t enb_mod_idP,
|
|
||||||
module_id_t ue_mod_idP,
|
|
||||||
eNB_flag_t eNB_flagP,
|
|
||||||
struct pdcp_netlink_element_s **data_ppP)
|
struct pdcp_netlink_element_s **data_ppP)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (eNB_flagP) {
|
if (ctxt_pP->enb_flag) {
|
||||||
ret = lfds611_queue_dequeue(pdcp_netlink_queue_enb[enb_mod_idP], (void **)data_ppP);
|
ret = lfds611_queue_dequeue(pdcp_netlink_queue_enb[ctxt_pP->enb_module_id], (void **)data_ppP);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
LOG_D(PDCP,"[NETLINK]De-queueing packet for eNB instance %d\n", enb_mod_idP);
|
LOG_D(PDCP,"[NETLINK]De-queueing packet for eNB instance %d\n", ctxt_pP->enb_module_id);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ret = lfds611_queue_dequeue(pdcp_netlink_queue_ue[ue_mod_idP], (void **)data_ppP);
|
ret = lfds611_queue_dequeue(pdcp_netlink_queue_ue[ctxt_pP->ue_module_id], (void **)data_ppP);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
LOG_D(PDCP, "[NETLINK]De-queueing packet for UE instance %d\n", ue_mod_idP);
|
LOG_D(PDCP, "[NETLINK]De-queueing packet for UE instance %d\n", ctxt_pP->ue_module_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -174,23 +174,29 @@ boolean_t pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char*
|
|||||||
boolean_t pdcp_serialize_control_pdu_for_pdcp_status_report(unsigned char* pdu_buffer, \
|
boolean_t pdcp_serialize_control_pdu_for_pdcp_status_report(unsigned char* pdu_buffer, \
|
||||||
uint8_t bitmap[512], pdcp_control_pdu_for_pdcp_status_report* pdu);
|
uint8_t bitmap[512], pdcp_control_pdu_for_pdcp_status_report* pdu);
|
||||||
|
|
||||||
int pdcp_netlink_dequeue_element(module_id_t enb_mod_idP, module_id_t ue_mod_idP, eNB_flag_t eNB_flagP,
|
int pdcp_netlink_dequeue_element(const protocol_ctxt_t* const ctxt_pP,
|
||||||
struct pdcp_netlink_element_s **data_ppP);
|
struct pdcp_netlink_element_s **data_ppP);
|
||||||
|
|
||||||
void pdcp_config_set_security(pdcp_t *pdcp_pP, module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame_t frameP, eNB_flag_t eNB_flagP, rb_id_t rb_idP,
|
void pdcp_config_set_security(const protocol_ctxt_t* const ctxt_pP, pdcp_t *pdcp_pP, rb_id_t rb_idP,
|
||||||
uint16_t lc_idP, uint8_t security_modeP, uint8_t *kRRCenc_pP, uint8_t *kRRCint_pP, uint8_t *kUPenc_pP);
|
uint16_t lc_idP, uint8_t security_modeP, uint8_t *kRRCenc_pP, uint8_t *kRRCint_pP, uint8_t *kUPenc_pP);
|
||||||
|
|
||||||
#if defined(ENABLE_SECURITY)
|
#if defined(ENABLE_SECURITY)
|
||||||
int pdcp_apply_security(pdcp_t *pdcp_entity,
|
int pdcp_apply_security(const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
pdcp_t *pdcp_entity,
|
||||||
srb_flag_t srb_flagP,
|
srb_flag_t srb_flagP,
|
||||||
rb_id_t rb_id,
|
rb_id_t rb_id,
|
||||||
uint8_t pdcp_header_len, uint16_t current_sn, uint8_t *pdcp_pdu_buffer,
|
uint8_t pdcp_header_len,
|
||||||
|
uint16_t current_sn,
|
||||||
|
uint8_t *pdcp_pdu_buffer,
|
||||||
uint16_t sdu_buffer_size);
|
uint16_t sdu_buffer_size);
|
||||||
|
|
||||||
int pdcp_validate_security(pdcp_t *pdcp_entity,
|
int pdcp_validate_security(const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
pdcp_t *pdcp_entity,
|
||||||
srb_flag_t srb_flagP,
|
srb_flag_t srb_flagP,
|
||||||
rb_id_t rb_id,
|
rb_id_t rb_id,
|
||||||
uint8_t pdcp_header_len, uint16_t current_sn, uint8_t *pdcp_pdu_buffer,
|
uint8_t pdcp_header_len,
|
||||||
|
uint16_t current_sn,
|
||||||
|
uint8_t *pdcp_pdu_buffer,
|
||||||
uint16_t sdu_buffer_size);
|
uint16_t sdu_buffer_size);
|
||||||
#endif /* defined(ENABLE_SECURITY) */
|
#endif /* defined(ENABLE_SECURITY) */
|
||||||
|
|
||||||
|
|||||||
@@ -49,12 +49,17 @@
|
|||||||
#if defined(ENABLE_SECURITY)
|
#if defined(ENABLE_SECURITY)
|
||||||
|
|
||||||
static
|
static
|
||||||
uint32_t pdcp_get_next_count_tx(pdcp_t *pdcp_entity, srb_flag_t srb_flagP, uint16_t pdcp_sn);
|
uint32_t pdcp_get_next_count_tx(pdcp_t *const pdcp_entity, const srb_flag_t srb_flagP, const uint16_t pdcp_sn);
|
||||||
static
|
static
|
||||||
uint32_t pdcp_get_next_count_rx(pdcp_t *pdcp_entity, srb_flag_t srb_flagP, uint16_t pdcp_sn);
|
uint32_t pdcp_get_next_count_rx(pdcp_t *const pdcp_entity, const srb_flag_t srb_flagP, const uint16_t pdcp_sn);
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
static
|
static
|
||||||
uint32_t pdcp_get_next_count_tx(pdcp_t *pdcp_entity, srb_flag_t srb_flagP, uint16_t pdcp_sn)
|
uint32_t pdcp_get_next_count_tx(
|
||||||
|
pdcp_t * const pdcp_entity,
|
||||||
|
const srb_flag_t srb_flagP,
|
||||||
|
const uint16_t pdcp_sn
|
||||||
|
)
|
||||||
{
|
{
|
||||||
uint32_t count;
|
uint32_t count;
|
||||||
/* For TX COUNT = TX_HFN << length of SN | pdcp SN */
|
/* For TX COUNT = TX_HFN << length of SN | pdcp SN */
|
||||||
@@ -73,8 +78,12 @@ uint32_t pdcp_get_next_count_tx(pdcp_t *pdcp_entity, srb_flag_t srb_flagP, uint1
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
static
|
static
|
||||||
uint32_t pdcp_get_next_count_rx(pdcp_t *pdcp_entity, srb_flag_t srb_flagP, uint16_t pdcp_sn)
|
uint32_t pdcp_get_next_count_rx(
|
||||||
|
pdcp_t * const pdcp_entity,
|
||||||
|
const srb_flag_t srb_flagP,
|
||||||
|
const uint16_t pdcp_sn)
|
||||||
{
|
{
|
||||||
uint32_t count;
|
uint32_t count;
|
||||||
/* For RX COUNT = RX_HFN << length of SN | pdcp SN of received PDU */
|
/* For RX COUNT = RX_HFN << length of SN | pdcp SN of received PDU */
|
||||||
@@ -97,13 +106,19 @@ uint32_t pdcp_get_next_count_rx(pdcp_t *pdcp_entity, srb_flag_t srb_flagP, uint1
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
int pdcp_apply_security(pdcp_t *pdcp_entity,
|
|
||||||
srb_flag_t srb_flagP,
|
//-----------------------------------------------------------------------------
|
||||||
rb_id_t rb_id,
|
int
|
||||||
uint8_t pdcp_header_len,
|
pdcp_apply_security(
|
||||||
uint16_t current_sn,
|
const protocol_ctxt_t* const ctxtP,
|
||||||
uint8_t *pdcp_pdu_buffer,
|
pdcp_t *const pdcp_entity,
|
||||||
uint16_t sdu_buffer_size)
|
const srb_flag_t srb_flagP,
|
||||||
|
const rb_id_t rb_id,
|
||||||
|
const uint8_t pdcp_header_len,
|
||||||
|
const uint16_t current_sn,
|
||||||
|
uint8_t * const pdcp_pdu_buffer,
|
||||||
|
const uint16_t sdu_buffer_size
|
||||||
|
)
|
||||||
{
|
{
|
||||||
uint8_t *buffer_encrypted = NULL;
|
uint8_t *buffer_encrypted = NULL;
|
||||||
stream_cipher_t encrypt_params;
|
stream_cipher_t encrypt_params;
|
||||||
@@ -161,13 +176,18 @@ int pdcp_apply_security(pdcp_t *pdcp_entity,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int pdcp_validate_security(pdcp_t *pdcp_entity,
|
//-----------------------------------------------------------------------------
|
||||||
srb_flag_t srb_flagP,
|
int
|
||||||
rb_id_t rb_id,
|
pdcp_validate_security(
|
||||||
uint8_t pdcp_header_len,
|
const protocol_ctxt_t* const ctxtP,
|
||||||
uint16_t current_sn,
|
pdcp_t * const pdcp_entity,
|
||||||
uint8_t *pdcp_pdu_buffer,
|
const srb_flag_t srb_flagP,
|
||||||
uint16_t sdu_buffer_size)
|
const rb_id_t rb_id,
|
||||||
|
const uint8_t pdcp_header_len,
|
||||||
|
const uint16_t current_sn,
|
||||||
|
uint8_t *const pdcp_pdu_buffer,
|
||||||
|
const uint16_t sdu_buffer_size
|
||||||
|
)
|
||||||
{
|
{
|
||||||
uint8_t *buffer_decrypted = NULL;
|
uint8_t *buffer_decrypted = NULL;
|
||||||
stream_cipher_t decrypt_params;
|
stream_cipher_t decrypt_params;
|
||||||
|
|||||||
@@ -57,7 +57,9 @@ extern rlc_am_control_pdu_info_t g_rlc_am_control_pdu_info;
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
uint32_t
|
uint32_t
|
||||||
rlc_am_get_buffer_occupancy_in_bytes (rlc_am_entity_t *rlc_pP,frame_t frameP)
|
rlc_am_get_buffer_occupancy_in_bytes (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t * const rlc_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
uint32_t max_li_overhead;
|
uint32_t max_li_overhead;
|
||||||
@@ -68,7 +70,7 @@ rlc_am_get_buffer_occupancy_in_bytes (rlc_am_entity_t *rlc_pP,frame_t frameP)
|
|||||||
if (rlc_pP->t_status_prohibit.running == 0) {
|
if (rlc_pP->t_status_prohibit.running == 0) {
|
||||||
#ifdef TRACE_RLC_AM_BO
|
#ifdef TRACE_RLC_AM_BO
|
||||||
if (((15 + rlc_pP->num_nack_sn*(10+1) + rlc_pP->num_nack_so*(15+15+1) + 7) >> 3) > 0) {
|
if (((15 + rlc_pP->num_nack_sn*(10+1) + rlc_pP->num_nack_so*(15+15+1) + 7) >> 3) > 0) {
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] BO : CONTROL PDU %d bytes \n", frameP, rlc_pP->module_id, rlc_pP->rb_id, ((15 + rlc_pP->num_nack_sn*(10+1) + rlc_pP->num_nack_so*(15+15+1) + 7) >> 3));
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] BO : CONTROL PDU %d bytes \n", ctxt_pP->frame, rlc_pP->module_id, rlc_pP->rb_id, ((15 + rlc_pP->num_nack_sn*(10+1) + rlc_pP->num_nack_so*(15+15+1) + 7) >> 3));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return ((15 + rlc_pP->num_nack_sn*(10+1) + rlc_pP->num_nack_so*(15+15+1) + 7) >> 3);
|
return ((15 + rlc_pP->num_nack_sn*(10+1) + rlc_pP->num_nack_so*(15+15+1) + 7) >> 3);
|
||||||
@@ -90,33 +92,36 @@ rlc_am_get_buffer_occupancy_in_bytes (rlc_am_entity_t *rlc_pP,frame_t frameP)
|
|||||||
|
|
||||||
#ifdef TRACE_RLC_AM_BO
|
#ifdef TRACE_RLC_AM_BO
|
||||||
if ((rlc_pP->status_buffer_occupancy + rlc_pP->retransmission_buffer_occupancy + rlc_pP->sdu_buffer_occupancy + max_li_overhead + header_overhead) > 0) {
|
if ((rlc_pP->status_buffer_occupancy + rlc_pP->retransmission_buffer_occupancy + rlc_pP->sdu_buffer_occupancy + max_li_overhead + header_overhead) > 0) {
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] BO : STATUS BUFFER %d bytes \n", frameP, rlc_pP->module_id, rlc_pP->rb_id, rlc_pP->status_buffer_occupancy);
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] BO : STATUS BUFFER %d bytes \n", ctxt_pP->frame, rlc_pP->module_id, rlc_pP->rb_id, rlc_pP->status_buffer_occupancy);
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] BO : RETRANS BUFFER %d bytes \n", frameP, rlc_pP->module_id,rlc_pP->rb_id, rlc_pP->retransmission_buffer_occupancy);
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] BO : RETRANS BUFFER %d bytes \n", ctxt_pP->frame, rlc_pP->module_id,rlc_pP->rb_id, rlc_pP->retransmission_buffer_occupancy);
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] BO : SDU BUFFER %d bytes + li_overhead %d bytes header_overhead %d bytes (nb sdu not segmented %d)\n", frameP, rlc_pP->module_id,rlc_pP->rb_id, rlc_pP->sdu_buffer_occupancy, max_li_overhead, header_overhead, rlc_pP->nb_sdu_no_segmented);
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] BO : SDU BUFFER %d bytes + li_overhead %d bytes header_overhead %d bytes (nb sdu not segmented %d)\n", ctxt_pP->frame, rlc_pP->module_id,rlc_pP->rb_id, rlc_pP->sdu_buffer_occupancy, max_li_overhead, header_overhead, rlc_pP->nb_sdu_no_segmented);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return rlc_pP->status_buffer_occupancy + rlc_pP->retransmission_buffer_occupancy + rlc_pP->sdu_buffer_occupancy + max_li_overhead + header_overhead;
|
return rlc_pP->status_buffer_occupancy + rlc_pP->retransmission_buffer_occupancy + rlc_pP->sdu_buffer_occupancy + max_li_overhead + header_overhead;
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_release (rlc_am_entity_t *rlc_pP)
|
void
|
||||||
|
rlc_am_release (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t * const rlc_pP
|
||||||
|
)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void config_req_rlc_am (
|
void
|
||||||
module_id_t enb_module_idP,
|
config_req_rlc_am (
|
||||||
module_id_t ue_module_idP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
frame_t frameP,
|
const srb_flag_t srb_flagP,
|
||||||
eNB_flag_t eNB_flagP,
|
rlc_am_info_t * const config_am_pP,
|
||||||
srb_flag_t srb_flagP,
|
const rb_id_t rb_idP
|
||||||
rlc_am_info_t *config_am_pP,
|
)
|
||||||
rb_id_t rb_idP)
|
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
rlc_union_t *rlc_union_p = NULL;
|
rlc_union_t *rlc_union_p = NULL;
|
||||||
rlc_am_entity_t *l_rlc_p = NULL;
|
rlc_am_entity_t *l_rlc_p = NULL;
|
||||||
hash_key_t key = RLC_COLL_KEY_VALUE(enb_module_idP, ue_module_idP, eNB_flagP, rb_idP, srb_flagP);
|
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->enb_module_id, ctxt_pP->ue_module_id, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||||
hashtable_rc_t h_rc;
|
hashtable_rc_t h_rc;
|
||||||
|
|
||||||
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
||||||
@@ -124,22 +129,22 @@ void config_req_rlc_am (
|
|||||||
l_rlc_p = &rlc_union_p->rlc.am;
|
l_rlc_p = &rlc_union_p->rlc.am;
|
||||||
LOG_D(RLC,
|
LOG_D(RLC,
|
||||||
"[FRAME %5u][%s][RRC][MOD %u/%u][][--- CONFIG_REQ (max_retx_threshold=%d poll_pdu=%d poll_byte=%d t_poll_retransmit=%d t_reord=%d t_status_prohibit=%d) --->][RLC_AM][MOD %u/%u][RB %u]\n",
|
"[FRAME %5u][%s][RRC][MOD %u/%u][][--- CONFIG_REQ (max_retx_threshold=%d poll_pdu=%d poll_byte=%d t_poll_retransmit=%d t_reord=%d t_status_prohibit=%d) --->][RLC_AM][MOD %u/%u][RB %u]\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
( eNB_flagP > 0) ? "eNB":"UE",
|
( ctxt_pP->enb_flag > 0) ? "eNB":"UE",
|
||||||
enb_module_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxt_pP->ue_module_id,
|
||||||
config_am_pP->max_retx_threshold,
|
config_am_pP->max_retx_threshold,
|
||||||
config_am_pP->poll_pdu,
|
config_am_pP->poll_pdu,
|
||||||
config_am_pP->poll_byte,
|
config_am_pP->poll_byte,
|
||||||
config_am_pP->t_poll_retransmit,
|
config_am_pP->t_poll_retransmit,
|
||||||
config_am_pP->t_reordering,
|
config_am_pP->t_reordering,
|
||||||
config_am_pP->t_status_prohibit,
|
config_am_pP->t_status_prohibit,
|
||||||
enb_module_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rb_idP);
|
rb_idP);
|
||||||
rlc_am_init(l_rlc_p,frameP);
|
rlc_am_init(ctxt_pP, l_rlc_p);
|
||||||
rlc_am_set_debug_infos(l_rlc_p, frameP, eNB_flagP, enb_module_idP, ue_module_idP, rb_idP, srb_flagP);
|
rlc_am_set_debug_infos(ctxt_pP, l_rlc_p, srb_flagP, rb_idP);
|
||||||
rlc_am_configure(l_rlc_p,frameP,
|
rlc_am_configure(ctxt_pP, l_rlc_p,
|
||||||
config_am_pP->max_retx_threshold,
|
config_am_pP->max_retx_threshold,
|
||||||
config_am_pP->poll_pdu,
|
config_am_pP->poll_pdu,
|
||||||
config_am_pP->poll_byte,
|
config_am_pP->poll_byte,
|
||||||
@@ -148,12 +153,12 @@ void config_req_rlc_am (
|
|||||||
config_am_pP->t_status_prohibit);
|
config_am_pP->t_status_prohibit);
|
||||||
} else {
|
} else {
|
||||||
LOG_E(RLC, "[FRAME %5u][%s][RRC][MOD %u/%u][][--- CONFIG_REQ --->][RLC_AM][MOD %u/%u][RB %u] RLC NOT FOUND\n",
|
LOG_E(RLC, "[FRAME %5u][%s][RRC][MOD %u/%u][][--- CONFIG_REQ --->][RLC_AM][MOD %u/%u][RB %u] RLC NOT FOUND\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(eNB_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_module_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxt_pP->ue_module_id,
|
||||||
enb_module_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rb_idP);
|
rb_idP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -166,10 +171,7 @@ uint32_t t_StatusProhibit_tab[T_StatusProhibit_spare8]={0,5,10,15,20,25,30,35,40
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void config_req_rlc_am_asn1 (
|
void config_req_rlc_am_asn1 (
|
||||||
const module_id_t enb_module_idP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const module_id_t ue_module_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const struct RLC_Config__am * const config_am_pP,
|
const struct RLC_Config__am * const config_am_pP,
|
||||||
const rb_id_t rb_idP)
|
const rb_id_t rb_idP)
|
||||||
@@ -177,7 +179,7 @@ void config_req_rlc_am_asn1 (
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
rlc_union_t *rlc_union_p = NULL;
|
rlc_union_t *rlc_union_p = NULL;
|
||||||
rlc_am_entity_t *l_rlc_p = NULL;
|
rlc_am_entity_t *l_rlc_p = NULL;
|
||||||
hash_key_t key = RLC_COLL_KEY_VALUE(enb_module_idP, ue_module_idP, eNB_flagP, rb_idP, srb_flagP);
|
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->enb_module_id, ctxt_pP->ue_module_id, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||||
hashtable_rc_t h_rc;
|
hashtable_rc_t h_rc;
|
||||||
|
|
||||||
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
||||||
@@ -191,24 +193,23 @@ void config_req_rlc_am_asn1 (
|
|||||||
(config_am_pP->dl_AM_RLC.t_StatusProhibit<T_StatusProhibit_spare8) ){
|
(config_am_pP->dl_AM_RLC.t_StatusProhibit<T_StatusProhibit_spare8) ){
|
||||||
|
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RRC][MOD %u/%u][][--- CONFIG_REQ (max_retx_threshold=%d poll_pdu=%d poll_byte=%d t_poll_retransmit=%d t_reord=%d t_status_prohibit=%d) --->][RLC_AM][MOD %u/%u][RB %u]\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RRC][MOD %u/%u][][--- CONFIG_REQ (max_retx_threshold=%d poll_pdu=%d poll_byte=%d t_poll_retransmit=%d t_reord=%d t_status_prohibit=%d) --->][RLC_AM][MOD %u/%u][RB %u]\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(eNB_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_module_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxt_pP->ue_module_id,
|
||||||
maxRetxThreshold_tab[config_am_pP->ul_AM_RLC.maxRetxThreshold],
|
maxRetxThreshold_tab[config_am_pP->ul_AM_RLC.maxRetxThreshold],
|
||||||
pollPDU_tab[config_am_pP->ul_AM_RLC.pollPDU],
|
pollPDU_tab[config_am_pP->ul_AM_RLC.pollPDU],
|
||||||
pollByte_tab[config_am_pP->ul_AM_RLC.pollByte],
|
pollByte_tab[config_am_pP->ul_AM_RLC.pollByte],
|
||||||
PollRetransmit_tab[config_am_pP->ul_AM_RLC.t_PollRetransmit],
|
PollRetransmit_tab[config_am_pP->ul_AM_RLC.t_PollRetransmit],
|
||||||
am_t_Reordering_tab[config_am_pP->dl_AM_RLC.t_Reordering],
|
am_t_Reordering_tab[config_am_pP->dl_AM_RLC.t_Reordering],
|
||||||
t_StatusProhibit_tab[config_am_pP->dl_AM_RLC.t_StatusProhibit],
|
t_StatusProhibit_tab[config_am_pP->dl_AM_RLC.t_StatusProhibit],
|
||||||
enb_module_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rb_idP);
|
rb_idP);
|
||||||
|
|
||||||
rlc_am_init(l_rlc_p,frameP);
|
rlc_am_init(ctxt_pP, l_rlc_p);
|
||||||
rlc_am_set_debug_infos(l_rlc_p, frameP, eNB_flagP, srb_flagP, enb_module_idP, ue_module_idP, rb_idP);
|
rlc_am_set_debug_infos(ctxt_pP, l_rlc_p, srb_flagP, rb_idP);
|
||||||
rlc_am_configure(l_rlc_p,
|
rlc_am_configure(ctxt_pP, l_rlc_p,
|
||||||
frameP,
|
|
||||||
maxRetxThreshold_tab[config_am_pP->ul_AM_RLC.maxRetxThreshold],
|
maxRetxThreshold_tab[config_am_pP->ul_AM_RLC.maxRetxThreshold],
|
||||||
pollPDU_tab[config_am_pP->ul_AM_RLC.pollPDU],
|
pollPDU_tab[config_am_pP->ul_AM_RLC.pollPDU],
|
||||||
pollByte_tab[config_am_pP->ul_AM_RLC.pollByte],
|
pollByte_tab[config_am_pP->ul_AM_RLC.pollByte],
|
||||||
@@ -218,34 +219,36 @@ void config_req_rlc_am_asn1 (
|
|||||||
} else {
|
} else {
|
||||||
LOG_D(RLC,
|
LOG_D(RLC,
|
||||||
"[FRAME %5u][%s][RRC][MOD %u/%u][][--- ILLEGAL CONFIG_REQ (max_retx_threshold=%d poll_pdu=%d poll_byte=%d t_poll_retransmit=%d t_reord=%d t_status_prohibit=%d) --->][RLC_AM][MOD %u/%u][RB %u], RLC-AM NOT CONFIGURED\n",
|
"[FRAME %5u][%s][RRC][MOD %u/%u][][--- ILLEGAL CONFIG_REQ (max_retx_threshold=%d poll_pdu=%d poll_byte=%d t_poll_retransmit=%d t_reord=%d t_status_prohibit=%d) --->][RLC_AM][MOD %u/%u][RB %u], RLC-AM NOT CONFIGURED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(eNB_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_module_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxt_pP->ue_module_id,
|
||||||
config_am_pP->ul_AM_RLC.maxRetxThreshold,
|
config_am_pP->ul_AM_RLC.maxRetxThreshold,
|
||||||
config_am_pP->ul_AM_RLC.pollPDU,
|
config_am_pP->ul_AM_RLC.pollPDU,
|
||||||
config_am_pP->ul_AM_RLC.pollByte,
|
config_am_pP->ul_AM_RLC.pollByte,
|
||||||
config_am_pP->ul_AM_RLC.t_PollRetransmit,
|
config_am_pP->ul_AM_RLC.t_PollRetransmit,
|
||||||
config_am_pP->dl_AM_RLC.t_Reordering,
|
config_am_pP->dl_AM_RLC.t_Reordering,
|
||||||
config_am_pP->dl_AM_RLC.t_StatusProhibit,
|
config_am_pP->dl_AM_RLC.t_StatusProhibit,
|
||||||
enb_module_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rb_idP);
|
rb_idP);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_E(RLC, "[FRAME %5u][%s][RRC][MOD %u/%u][][--- CONFIG_REQ --->][RLC_AM][MOD %u/%u][RB %u] RLC NOT FOUND\n",
|
LOG_E(RLC, "[FRAME %5u][%s][RRC][MOD %u/%u][][--- CONFIG_REQ --->][RLC_AM][MOD %u/%u][RB %u] RLC NOT FOUND\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(eNB_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_module_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxt_pP->ue_module_id,
|
||||||
enb_module_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rb_idP);
|
rb_idP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_stat_req (rlc_am_entity_t *rlc_pP,
|
void rlc_am_stat_req (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t * const rlc_pP,
|
||||||
unsigned int* stat_tx_pdcp_sdu,
|
unsigned int* stat_tx_pdcp_sdu,
|
||||||
unsigned int* stat_tx_pdcp_bytes,
|
unsigned int* stat_tx_pdcp_bytes,
|
||||||
unsigned int* stat_tx_pdcp_sdu_discarded,
|
unsigned int* stat_tx_pdcp_sdu_discarded,
|
||||||
@@ -306,7 +309,10 @@ void rlc_am_stat_req (rlc_am_entity_t *rlc_pP,
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rlc_am_get_pdus (rlc_am_entity_t *rlc_pP, frame_t frameP)
|
rlc_am_get_pdus (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t * const rlc_pP
|
||||||
|
)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
int display_flag = 0;
|
int display_flag = 0;
|
||||||
@@ -337,21 +343,21 @@ rlc_am_get_pdus (rlc_am_entity_t *rlc_pP, frame_t frameP)
|
|||||||
// When a STATUS PDU has been delivered to lower layer, the receiving side of an AM RLC entity shall:
|
// When a STATUS PDU has been delivered to lower layer, the receiving side of an AM RLC entity shall:
|
||||||
// - start t-StatusProhibit.
|
// - start t-StatusProhibit.
|
||||||
if (rlc_pP->t_status_prohibit.running == 0) {
|
if (rlc_pP->t_status_prohibit.running == 0) {
|
||||||
rlc_am_send_status_pdu(rlc_pP,frameP);
|
rlc_am_send_status_pdu(ctxt_pP, rlc_pP);
|
||||||
mem_block_t* pdu = list_remove_head(&rlc_pP->control_pdu_list);
|
mem_block_t* pdu = list_remove_head(&rlc_pP->control_pdu_list);
|
||||||
if (pdu) {
|
if (pdu) {
|
||||||
list_add_tail_eurecom (pdu, &rlc_pP->pdus_to_mac_layer);
|
list_add_tail_eurecom (pdu, &rlc_pP->pdus_to_mac_layer);
|
||||||
rlc_pP->status_requested = 0;
|
rlc_pP->status_requested = 0;
|
||||||
rlc_am_start_timer_status_prohibit(rlc_pP,frameP);
|
rlc_am_start_timer_status_prohibit(ctxt_pP, rlc_pP);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] DELAYED SENT STATUS PDU BECAUSE T-STATUS-PROHIBIT RUNNING (TIME-OUT FRAME %5u)\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] DELAYED SENT STATUS PDU BECAUSE T-STATUS-PROHIBIT RUNNING (TIME-OUT FRAME %5u)\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_module_id) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->t_status_prohibit.frame_time_out);
|
rlc_pP->t_status_prohibit.frame_time_out);
|
||||||
}
|
}
|
||||||
@@ -362,7 +368,7 @@ rlc_am_get_pdus (rlc_am_entity_t *rlc_pP, frame_t frameP)
|
|||||||
if ( ((rlc_am_tx_control_pdu_management_t*)(pdu->data))->size <= rlc_pP->nb_bytes_requested_by_mac) {
|
if ( ((rlc_am_tx_control_pdu_management_t*)(pdu->data))->size <= rlc_pP->nb_bytes_requested_by_mac) {
|
||||||
pdu = list_remove_head(&rlc_pP->control_pdu_list);
|
pdu = list_remove_head(&rlc_pP->control_pdu_list);
|
||||||
#ifdef TRACE_RLC_AM_TX
|
#ifdef TRACE_RLC_AM_TX
|
||||||
msg ("[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] SEND CONTROL PDU\n", ((rlc_am_entity_t *) rlc_pP)->module_id,((rlc_am_entity_t *) rlc_pP)->rb_id, frameP);
|
msg ("[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] SEND CONTROL PDU\n", ((rlc_am_entity_t *) rlc_pP)->module_id,((rlc_am_entity_t *) rlc_pP)->rb_id, ctxt_pP->frame);
|
||||||
#endif
|
#endif
|
||||||
list_add_tail_eurecom (pdu, &rlc_pP->pdus_to_mac_layer);
|
list_add_tail_eurecom (pdu, &rlc_pP->pdus_to_mac_layer);
|
||||||
rlc_pP->nb_bytes_requested_by_mac = rlc_pP->nb_bytes_requested_by_mac - ((rlc_am_tx_control_pdu_management_t*)(pdu->data))->size;
|
rlc_pP->nb_bytes_requested_by_mac = rlc_pP->nb_bytes_requested_by_mac - ((rlc_am_tx_control_pdu_management_t*)(pdu->data))->size;
|
||||||
@@ -384,12 +390,12 @@ rlc_am_get_pdus (rlc_am_entity_t *rlc_pP, frame_t frameP)
|
|||||||
tx_data_pdu_management = &rlc_pP->pdu_retrans_buffer[rlc_pP->first_retrans_pdu_sn];
|
tx_data_pdu_management = &rlc_pP->pdu_retrans_buffer[rlc_pP->first_retrans_pdu_sn];
|
||||||
|
|
||||||
if ((tx_data_pdu_management->header_and_payload_size <= rlc_pP->nb_bytes_requested_by_mac) && (tx_data_pdu_management->retx_count >= 0) && (tx_data_pdu_management->nack_so_start == 0) && (tx_data_pdu_management->nack_so_stop == 0x7FFF)) {
|
if ((tx_data_pdu_management->header_and_payload_size <= rlc_pP->nb_bytes_requested_by_mac) && (tx_data_pdu_management->retx_count >= 0) && (tx_data_pdu_management->nack_so_start == 0) && (tx_data_pdu_management->nack_so_stop == 0x7FFF)) {
|
||||||
mem_block_t* copy = rlc_am_retransmit_get_copy(rlc_pP, frameP,rlc_pP->first_retrans_pdu_sn);
|
mem_block_t* copy = rlc_am_retransmit_get_copy(ctxt_pP, rlc_pP, rlc_pP->first_retrans_pdu_sn);
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] RE-SEND DATA PDU SN %04d %d BYTES\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] RE-SEND DATA PDU SN %04d %d BYTES\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_module_id) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->first_retrans_pdu_sn,
|
rlc_pP->first_retrans_pdu_sn,
|
||||||
tx_data_pdu_management->header_and_payload_size);
|
tx_data_pdu_management->header_and_payload_size);
|
||||||
@@ -407,10 +413,10 @@ rlc_am_get_pdus (rlc_am_entity_t *rlc_pP, frame_t frameP)
|
|||||||
return;
|
return;
|
||||||
} else if ((tx_data_pdu_management->retx_count >= 0) && (rlc_pP->nb_bytes_requested_by_mac >= RLC_AM_MIN_SEGMENT_SIZE_REQUEST)) {
|
} else if ((tx_data_pdu_management->retx_count >= 0) && (rlc_pP->nb_bytes_requested_by_mac >= RLC_AM_MIN_SEGMENT_SIZE_REQUEST)) {
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] SEND SEGMENT OF DATA PDU SN %04d MAC BYTES %d SIZE %d RTX COUNT %d nack_so_start %d nack_so_stop %04X(hex)\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] SEND SEGMENT OF DATA PDU SN %04d MAC BYTES %d SIZE %d RTX COUNT %d nack_so_start %d nack_so_stop %04X(hex)\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_module_id) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->first_retrans_pdu_sn,
|
rlc_pP->first_retrans_pdu_sn,
|
||||||
rlc_pP->nb_bytes_requested_by_mac,
|
rlc_pP->nb_bytes_requested_by_mac,
|
||||||
@@ -420,15 +426,15 @@ rlc_am_get_pdus (rlc_am_entity_t *rlc_pP, frame_t frameP)
|
|||||||
tx_data_pdu_management->nack_so_stop);
|
tx_data_pdu_management->nack_so_stop);
|
||||||
|
|
||||||
mem_block_t* copy = rlc_am_retransmit_get_subsegment(
|
mem_block_t* copy = rlc_am_retransmit_get_subsegment(
|
||||||
|
ctxt_pP,
|
||||||
rlc_pP,
|
rlc_pP,
|
||||||
frameP,
|
|
||||||
rlc_pP->first_retrans_pdu_sn,
|
rlc_pP->first_retrans_pdu_sn,
|
||||||
&rlc_pP->nb_bytes_requested_by_mac);
|
&rlc_pP->nb_bytes_requested_by_mac);
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] SEND SEGMENT OF DATA PDU SN %04d (NEW SO %05d)\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] SEND SEGMENT OF DATA PDU SN %04d (NEW SO %05d)\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_module_id) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->first_retrans_pdu_sn,
|
rlc_pP->first_retrans_pdu_sn,
|
||||||
tx_data_pdu_management->nack_so_start);
|
tx_data_pdu_management->nack_so_start);
|
||||||
@@ -448,10 +454,10 @@ rlc_am_get_pdus (rlc_am_entity_t *rlc_pP, frame_t frameP)
|
|||||||
(!(rlc_pP->pdu_retrans_buffer[rlc_pP->first_retrans_pdu_sn].flags.retransmit))) {
|
(!(rlc_pP->pdu_retrans_buffer[rlc_pP->first_retrans_pdu_sn].flags.retransmit))) {
|
||||||
rlc_pP->first_retrans_pdu_sn = (rlc_pP->first_retrans_pdu_sn+1) & RLC_AM_SN_MASK;
|
rlc_pP->first_retrans_pdu_sn = (rlc_pP->first_retrans_pdu_sn+1) & RLC_AM_SN_MASK;
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] UPDATED first_retrans_pdu_sn SN %04d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] UPDATED first_retrans_pdu_sn SN %04d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_module_id) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->first_retrans_pdu_sn);
|
rlc_pP->first_retrans_pdu_sn);
|
||||||
};
|
};
|
||||||
@@ -462,18 +468,18 @@ rlc_am_get_pdus (rlc_am_entity_t *rlc_pP, frame_t frameP)
|
|||||||
rlc_pP->first_retrans_pdu_sn = -1;
|
rlc_pP->first_retrans_pdu_sn = -1;
|
||||||
display_flag = 0;
|
display_flag = 0;
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] CLEAR first_retrans_pdu_sn\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] CLEAR first_retrans_pdu_sn\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_module_id) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
}
|
}
|
||||||
if (display_flag > 0) {
|
if (display_flag > 0) {
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] UPDATED first_retrans_pdu_sn %04d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] UPDATED first_retrans_pdu_sn %04d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_module_id) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->first_retrans_pdu_sn);
|
rlc_pP->first_retrans_pdu_sn);
|
||||||
}
|
}
|
||||||
@@ -482,14 +488,14 @@ rlc_am_get_pdus (rlc_am_entity_t *rlc_pP, frame_t frameP)
|
|||||||
/* ONLY ONE TB PER TTI
|
/* ONLY ONE TB PER TTI
|
||||||
if ((tx_data_pdu_management->retx_count >= 0) && (rlc_pP->nb_bytes_requested_by_mac < RLC_AM_MIN_SEGMENT_SIZE_REQUEST)) {
|
if ((tx_data_pdu_management->retx_count >= 0) && (rlc_pP->nb_bytes_requested_by_mac < RLC_AM_MIN_SEGMENT_SIZE_REQUEST)) {
|
||||||
#ifdef TRACE_RLC_AM_TX
|
#ifdef TRACE_RLC_AM_TX
|
||||||
msg ("[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] BREAK LOOP ON RETRANSMISSION BECAUSE ONLY %d BYTES ALLOWED TO TRANSMIT BY MAC\n",frameP, ((rlc_am_entity_t *) rlc_pP)->module_id,((rlc_am_entity_t *) rlc_pP)->rb_id, rlc_pP->nb_bytes_requested_by_mac);
|
msg ("[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] BREAK LOOP ON RETRANSMISSION BECAUSE ONLY %d BYTES ALLOWED TO TRANSMIT BY MAC\n",ctxt_pP->frame, ((rlc_am_entity_t *) rlc_pP)->module_id,((rlc_am_entity_t *) rlc_pP)->rb_id, rlc_pP->nb_bytes_requested_by_mac);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((rlc_pP->nb_bytes_requested_by_mac > 2) && (rlc_pP->vt_s != rlc_pP->vt_ms)) {
|
if ((rlc_pP->nb_bytes_requested_by_mac > 2) && (rlc_pP->vt_s != rlc_pP->vt_ms)) {
|
||||||
rlc_am_segment_10(rlc_pP,frameP);
|
rlc_am_segment_10(ctxt_pP, rlc_pP);
|
||||||
list_add_list (&rlc_pP->segmentation_pdu_list, &rlc_pP->pdus_to_mac_layer);
|
list_add_list (&rlc_pP->segmentation_pdu_list, &rlc_pP->pdus_to_mac_layer);
|
||||||
if (rlc_pP->pdus_to_mac_layer.head != NULL) {
|
if (rlc_pP->pdus_to_mac_layer.head != NULL) {
|
||||||
rlc_pP->stat_tx_data_pdu += 1;
|
rlc_pP->stat_tx_data_pdu += 1;
|
||||||
@@ -497,20 +503,22 @@ rlc_am_get_pdus (rlc_am_entity_t *rlc_pP, frame_t frameP)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((rlc_pP->pdus_to_mac_layer.head == NULL) && (rlc_am_is_timer_poll_retransmit_timed_out(rlc_pP)) && (rlc_pP->nb_bytes_requested_by_mac > 2)) {
|
if ((rlc_pP->pdus_to_mac_layer.head == NULL) &&
|
||||||
rlc_am_retransmit_any_pdu(rlc_pP,frameP);
|
(rlc_am_is_timer_poll_retransmit_timed_out(ctxt_pP, rlc_pP)) &&
|
||||||
|
(rlc_pP->nb_bytes_requested_by_mac > 2)) {
|
||||||
|
rlc_am_retransmit_any_pdu(ctxt_pP, rlc_pP);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] COULD NOT RETRANSMIT ANY PDU BECAUSE ",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] COULD NOT RETRANSMIT ANY PDU BECAUSE ",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_module_id) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
if (rlc_pP->pdus_to_mac_layer.head != NULL) {
|
if (rlc_pP->pdus_to_mac_layer.head != NULL) {
|
||||||
LOG_D(RLC, "THERE ARE SOME PDUS READY TO TRANSMIT ");
|
LOG_D(RLC, "THERE ARE SOME PDUS READY TO TRANSMIT ");
|
||||||
}
|
}
|
||||||
if (!(rlc_am_is_timer_poll_retransmit_timed_out(rlc_pP))) {
|
if (!(rlc_am_is_timer_poll_retransmit_timed_out(ctxt_pP, rlc_pP))) {
|
||||||
LOG_D(RLC, "TIMER POLL DID NOT TIMED OUT (RUNNING = %d NUM PDUS TO RETRANS = %d NUM BYTES TO RETRANS = %d) ", rlc_pP->t_poll_retransmit.running, rlc_pP->retrans_num_pdus, rlc_pP->retrans_num_bytes_to_retransmit);
|
LOG_D(RLC, "TIMER POLL DID NOT TIMED OUT (RUNNING = %d NUM PDUS TO RETRANS = %d NUM BYTES TO RETRANS = %d) ", rlc_pP->t_poll_retransmit.running, rlc_pP->retrans_num_pdus, rlc_pP->retrans_num_bytes_to_retransmit);
|
||||||
}
|
}
|
||||||
if (rlc_pP->nb_bytes_requested_by_mac <= 2) {
|
if (rlc_pP->nb_bytes_requested_by_mac <= 2) {
|
||||||
@@ -522,17 +530,21 @@ rlc_am_get_pdus (rlc_am_entity_t *rlc_pP, frame_t frameP)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_E(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] MAC_DATA_REQ UNKNOWN PROTOCOL STATE 0x%02X\n",
|
LOG_E(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] MAC_DATA_REQ UNKNOWN PROTOCOL STATE 0x%02X\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_module_id) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->protocol_state);
|
rlc_pP->protocol_state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rlc_am_rx (void *arg_pP, frame_t frameP, eNB_flag_t eNB_flagP, struct mac_data_ind data_indP)
|
rlc_am_rx (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
void * const arg_pP,
|
||||||
|
struct mac_data_ind data_indP
|
||||||
|
)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -546,7 +558,7 @@ rlc_am_rx (void *arg_pP, frame_t frameP, eNB_flag_t eNB_flagP, struct mac_data_i
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case RLC_DATA_TRANSFER_READY_STATE:
|
case RLC_DATA_TRANSFER_READY_STATE:
|
||||||
rlc_am_receive_routing (rlc, frameP, eNB_flagP, data_indP);
|
rlc_am_receive_routing (ctxt_pP, rlc, data_indP);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -556,7 +568,11 @@ rlc_am_rx (void *arg_pP, frame_t frameP, eNB_flag_t eNB_flagP, struct mac_data_i
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
struct mac_status_resp
|
struct mac_status_resp
|
||||||
rlc_am_mac_status_indication (void *rlc_pP, frame_t frameP, uint16_t tb_sizeP, struct mac_status_ind tx_statusP)
|
rlc_am_mac_status_indication (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
void * const rlc_pP,
|
||||||
|
const uint16_t tb_sizeP,
|
||||||
|
struct mac_status_ind tx_statusP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
struct mac_status_resp status_resp;
|
struct mac_status_resp status_resp;
|
||||||
@@ -572,24 +588,24 @@ rlc_am_mac_status_indication (void *rlc_pP, frame_t frameP, uint16_t tb_sizeP, s
|
|||||||
status_resp.head_sdu_is_segmented = 0;
|
status_resp.head_sdu_is_segmented = 0;
|
||||||
status_resp.rlc_info.rlc_protocol_state = rlc->protocol_state;
|
status_resp.rlc_info.rlc_protocol_state = rlc->protocol_state;
|
||||||
|
|
||||||
if (rlc->last_frame_status_indication != frameP) {
|
if (rlc->last_frame_status_indication != ctxt_pP->frame) {
|
||||||
rlc_am_check_timer_poll_retransmit(rlc,frameP);
|
rlc_am_check_timer_poll_retransmit(ctxt_pP, rlc);
|
||||||
rlc_am_check_timer_reordering(rlc,frameP);
|
rlc_am_check_timer_reordering(ctxt_pP, rlc);
|
||||||
rlc_am_check_timer_status_prohibit(rlc,frameP);
|
rlc_am_check_timer_status_prohibit(ctxt_pP, rlc);
|
||||||
}
|
}
|
||||||
rlc->last_frame_status_indication = frameP;
|
rlc->last_frame_status_indication = ctxt_pP->frame;
|
||||||
|
|
||||||
rlc->nb_bytes_requested_by_mac = tb_sizeP;
|
rlc->nb_bytes_requested_by_mac = tb_sizeP;
|
||||||
|
|
||||||
status_resp.buffer_occupancy_in_bytes = rlc_am_get_buffer_occupancy_in_bytes(rlc,frameP);
|
status_resp.buffer_occupancy_in_bytes = rlc_am_get_buffer_occupancy_in_bytes(ctxt_pP, rlc);
|
||||||
|
|
||||||
if ((rlc->input_sdus[rlc->current_sdu_index].mem_block != NULL) && (status_resp.buffer_occupancy_in_bytes)) {
|
if ((rlc->input_sdus[rlc->current_sdu_index].mem_block != NULL) && (status_resp.buffer_occupancy_in_bytes)) {
|
||||||
|
|
||||||
//status_resp.buffer_occupancy_in_bytes += ((rlc_am_entity_t *) rlc)->tx_header_min_length_in_bytes;
|
//status_resp.buffer_occupancy_in_bytes += ((rlc_am_entity_t *) rlc)->tx_header_min_length_in_bytes;
|
||||||
status_resp.buffer_occupancy_in_pdus = rlc->nb_sdu;
|
status_resp.buffer_occupancy_in_pdus = rlc->nb_sdu;
|
||||||
diff_time = frameP - ((rlc_am_tx_sdu_management_t *) (rlc->input_sdus[rlc->current_sdu_index].mem_block->data))->sdu_creation_time;
|
diff_time = ctxt_pP->frame - ((rlc_am_tx_sdu_management_t *) (rlc->input_sdus[rlc->current_sdu_index].mem_block->data))->sdu_creation_time;
|
||||||
|
|
||||||
status_resp.head_sdu_creation_time = (diff_time > 0 ) ? (uint32_t) diff_time : (uint32_t)(0xffffffff - diff_time + frameP) ;
|
status_resp.head_sdu_creation_time = (diff_time > 0 ) ? (uint32_t) diff_time : (uint32_t)(0xffffffff - diff_time + ctxt_pP->frame) ;
|
||||||
|
|
||||||
sdu_size = ((rlc_am_tx_sdu_management_t *) (rlc->input_sdus[rlc->current_sdu_index].mem_block->data))->sdu_size;
|
sdu_size = ((rlc_am_tx_sdu_management_t *) (rlc->input_sdus[rlc->current_sdu_index].mem_block->data))->sdu_size;
|
||||||
sdu_remaining_size = ((rlc_am_tx_sdu_management_t *) (rlc->input_sdus[rlc->current_sdu_index].mem_block->data))->sdu_remaining_size;
|
sdu_remaining_size = ((rlc_am_tx_sdu_management_t *) (rlc->input_sdus[rlc->current_sdu_index].mem_block->data))->sdu_remaining_size;
|
||||||
@@ -609,7 +625,7 @@ rlc_am_mac_status_indication (void *rlc_pP, frame_t frameP, uint16_t tb_sizeP, s
|
|||||||
#ifdef TRACE_RLC_AM_TX_STATUS
|
#ifdef TRACE_RLC_AM_TX_STATUS
|
||||||
if (tb_sizeP > 0) {
|
if (tb_sizeP > 0) {
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] MAC_STATUS_INDICATION (DATA) %d bytes -> %d bytes\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] MAC_STATUS_INDICATION (DATA) %d bytes -> %d bytes\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc->is_enb) ? "eNB" : "UE",
|
(rlc->is_enb) ? "eNB" : "UE",
|
||||||
rlc->enb_module_id,
|
rlc->enb_module_id,
|
||||||
rlc->ue_module_id,
|
rlc->ue_module_id,
|
||||||
@@ -618,11 +634,11 @@ rlc_am_mac_status_indication (void *rlc_pP, frame_t frameP, uint16_t tb_sizeP, s
|
|||||||
status_resp.buffer_occupancy_in_bytes);
|
status_resp.buffer_occupancy_in_bytes);
|
||||||
/*if ((tx_statusP.tx_status == MAC_TX_STATUS_SUCCESSFUL) && (tx_statusP.no_pdu)) {
|
/*if ((tx_statusP.tx_status == MAC_TX_STATUS_SUCCESSFUL) && (tx_statusP.no_pdu)) {
|
||||||
msg ("[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] MAC_STATUS_INDICATION TX STATUS SUCCESSFUL %d PDUs\n",rlc->module_id,
|
msg ("[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] MAC_STATUS_INDICATION TX STATUS SUCCESSFUL %d PDUs\n",rlc->module_id,
|
||||||
rlc->rb_id, frameP, tx_statusP.no_pdu);
|
rlc->rb_id, ctxt_pP->frame, tx_statusP.no_pdu);
|
||||||
}
|
}
|
||||||
if ((tx_statusP.tx_status == MAC_TX_STATUS_UNSUCCESSFUL) && (tx_statusP.no_pdu)) {
|
if ((tx_statusP.tx_status == MAC_TX_STATUS_UNSUCCESSFUL) && (tx_statusP.no_pdu)) {
|
||||||
msg ("[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] MAC_STATUS_INDICATION TX STATUS UNSUCCESSFUL %d PDUs\n",rlc->module_id, rlc->rb_id,
|
msg ("[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] MAC_STATUS_INDICATION TX STATUS UNSUCCESSFUL %d PDUs\n",rlc->module_id, rlc->rb_id,
|
||||||
frameP, tx_statusP.no_pdu);
|
ctxt_pP->frame, tx_statusP.no_pdu);
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -630,7 +646,10 @@ frameP, tx_statusP.no_pdu);
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
struct mac_data_req
|
struct mac_data_req
|
||||||
rlc_am_mac_data_request (void *rlc_pP, frame_t frameP)
|
rlc_am_mac_data_request (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
void * const rlc_pP
|
||||||
|
)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
struct mac_data_req data_req;
|
struct mac_data_req data_req;
|
||||||
@@ -650,22 +669,22 @@ rlc_am_mac_data_request (void *rlc_pP, frame_t frameP)
|
|||||||
int octet_index, index;
|
int octet_index, index;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
rlc_am_get_pdus (rlc_pP,frameP);
|
rlc_am_get_pdus (ctxt_pP, rlc_pP);
|
||||||
|
|
||||||
list_init (&data_req.data, NULL);
|
list_init (&data_req.data, NULL);
|
||||||
list_add_list (&l_rlc_p->pdus_to_mac_layer, &data_req.data);
|
list_add_list (&l_rlc_p->pdus_to_mac_layer, &data_req.data);
|
||||||
//((rlc_am_entity_t *) rlc_pP)->tx_pdus += data_req.data.nb_elements;
|
//((rlc_am_entity_t *) rlc_pP)->tx_pdus += data_req.data.nb_elements;
|
||||||
if ((nb_bytes_requested_by_mac + data_req.data.nb_elements) > 0) {
|
if ((nb_bytes_requested_by_mac + data_req.data.nb_elements) > 0) {
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] MAC_DATA_REQUEST %05d BYTES REQUESTED -> %d TBs\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] MAC_DATA_REQUEST %05d BYTES REQUESTED -> %d TBs\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(l_rlc_p->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
l_rlc_p->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
l_rlc_p->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
l_rlc_p->rb_id,
|
l_rlc_p->rb_id,
|
||||||
nb_bytes_requested_by_mac,
|
nb_bytes_requested_by_mac,
|
||||||
data_req.data.nb_elements);
|
data_req.data.nb_elements);
|
||||||
}
|
}
|
||||||
data_req.buffer_occupancy_in_bytes = rlc_am_get_buffer_occupancy_in_bytes(l_rlc_p,frameP);
|
data_req.buffer_occupancy_in_bytes = rlc_am_get_buffer_occupancy_in_bytes(ctxt_pP, l_rlc_p);
|
||||||
data_req.rlc_info.rlc_protocol_state = l_rlc_p->protocol_state;
|
data_req.rlc_info.rlc_protocol_state = l_rlc_p->protocol_state;
|
||||||
|
|
||||||
#ifdef TRACE_RLC_AM_PDU
|
#ifdef TRACE_RLC_AM_PDU
|
||||||
@@ -679,7 +698,7 @@ rlc_am_mac_data_request (void *rlc_pP, frame_t frameP)
|
|||||||
tb_size_in_bytes = ((struct mac_tb_req *) (tb_p->data))->tb_size;
|
tb_size_in_bytes = ((struct mac_tb_req *) (tb_p->data))->tb_size;
|
||||||
|
|
||||||
if ((((struct mac_tb_req *) (tb_p->data))->data_ptr[0] & RLC_DC_MASK) == RLC_DC_DATA_PDU ) {
|
if ((((struct mac_tb_req *) (tb_p->data))->data_ptr[0] & RLC_DC_MASK) == RLC_DC_DATA_PDU ) {
|
||||||
if (rlc_am_get_data_pdu_infos(frameP,rlc_am_pdu_sn_10_p, tb_size_in_bytes, &pdu_info) >= 0) {
|
if (rlc_am_get_data_pdu_infos(ctxt_pP,rlc_am_pdu_sn_10_p, tb_size_in_bytes, &pdu_info) >= 0) {
|
||||||
# if defined(ENABLE_ITTI)
|
# if defined(ENABLE_ITTI)
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
|
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "PDU size : %u\n", tb_size_in_bytes);
|
message_string_size += sprintf(&message_string[message_string_size], "PDU size : %u\n", tb_size_in_bytes);
|
||||||
@@ -734,17 +753,17 @@ rlc_am_mac_data_request (void *rlc_pP, frame_t frameP)
|
|||||||
}
|
}
|
||||||
message_string_size += sprintf(&message_string[message_string_size], " |\n");
|
message_string_size += sprintf(&message_string[message_string_size], " |\n");
|
||||||
|
|
||||||
msg_p = itti_alloc_new_message_sized (l_rlc_p->is_enb > 0 ? TASK_RLC_ENB:TASK_RLC_UE , RLC_AM_DATA_PDU_REQ, message_string_size + sizeof (IttiMsgText));
|
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag > 0 ? TASK_RLC_ENB:TASK_RLC_UE , RLC_AM_DATA_PDU_REQ, message_string_size + sizeof (IttiMsgText));
|
||||||
msg_p->ittiMsg.rlc_am_data_pdu_req.size = message_string_size;
|
msg_p->ittiMsg.rlc_am_data_pdu_req.size = message_string_size;
|
||||||
memcpy(&msg_p->ittiMsg.rlc_am_data_pdu_req.text, message_string, message_string_size);
|
memcpy(&msg_p->ittiMsg.rlc_am_data_pdu_req.text, message_string, message_string_size);
|
||||||
|
|
||||||
if (l_rlc_p->is_enb) {
|
if (ctxt_pP->enb_flag) {
|
||||||
itti_send_msg_to_task(TASK_UNKNOWN, l_rlc_p->enb_module_id, msg_p);
|
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->enb_module_id, msg_p);
|
||||||
} else {
|
} else {
|
||||||
itti_send_msg_to_task(TASK_UNKNOWN, l_rlc_p->ue_module_id + NB_eNB_INST, msg_p);
|
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->ue_module_id + NB_eNB_INST, msg_p);
|
||||||
}
|
}
|
||||||
# else
|
# else
|
||||||
rlc_am_display_data_pdu_infos(l_rlc_p, frameP, &pdu_info);
|
rlc_am_display_data_pdu_infos(ctxt_pP, l_rlc_p, &pdu_info);
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -770,14 +789,14 @@ rlc_am_mac_data_request (void *rlc_pP, frame_t frameP)
|
|||||||
message_string_size += sprintf(&message_string[message_string_size], " NACK SN %04d", g_rlc_am_control_pdu_info.nack_list[num_nack].nack_sn);
|
message_string_size += sprintf(&message_string[message_string_size], " NACK SN %04d", g_rlc_am_control_pdu_info.nack_list[num_nack].nack_sn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
msg_p = itti_alloc_new_message_sized (l_rlc_p->is_enb > 0 ? TASK_RLC_ENB:TASK_RLC_UE , RLC_AM_STATUS_PDU_REQ, message_string_size + sizeof (IttiMsgText));
|
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag > 0 ? TASK_RLC_ENB:TASK_RLC_UE , RLC_AM_STATUS_PDU_REQ, message_string_size + sizeof (IttiMsgText));
|
||||||
msg_p->ittiMsg.rlc_am_status_pdu_req.size = message_string_size;
|
msg_p->ittiMsg.rlc_am_status_pdu_req.size = message_string_size;
|
||||||
memcpy(&msg_p->ittiMsg.rlc_am_status_pdu_req.text, message_string, message_string_size);
|
memcpy(&msg_p->ittiMsg.rlc_am_status_pdu_req.text, message_string, message_string_size);
|
||||||
|
|
||||||
if (l_rlc_p->is_enb) {
|
if (ctxt_pP->enb_flag) {
|
||||||
itti_send_msg_to_task(TASK_UNKNOWN, l_rlc_p->enb_module_id, msg_p);
|
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->enb_module_id, msg_p);
|
||||||
} else {
|
} else {
|
||||||
itti_send_msg_to_task(TASK_UNKNOWN, l_rlc_p->ue_module_id + NB_eNB_INST, msg_p);
|
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->ue_module_id + NB_eNB_INST, msg_p);
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
@@ -790,7 +809,11 @@ rlc_am_mac_data_request (void *rlc_pP, frame_t frameP)
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rlc_am_mac_data_indication (void *rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP, struct mac_data_ind data_indP)
|
rlc_am_mac_data_indication (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
void * const rlc_pP,
|
||||||
|
struct mac_data_ind data_indP
|
||||||
|
)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
rlc_am_entity_t *l_rlc_p = (rlc_am_entity_t *) rlc_pP;
|
rlc_am_entity_t *l_rlc_p = (rlc_am_entity_t *) rlc_pP;
|
||||||
@@ -822,7 +845,7 @@ rlc_am_mac_data_indication (void *rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP,
|
|||||||
tb_size_in_bytes = ((struct mac_tb_ind *) (tb_p->data))->size;
|
tb_size_in_bytes = ((struct mac_tb_ind *) (tb_p->data))->size;
|
||||||
|
|
||||||
if ((((struct mac_tb_ind *) (tb_p->data))->data_ptr[0] & RLC_DC_MASK) == RLC_DC_DATA_PDU ) {
|
if ((((struct mac_tb_ind *) (tb_p->data))->data_ptr[0] & RLC_DC_MASK) == RLC_DC_DATA_PDU ) {
|
||||||
if (rlc_am_get_data_pdu_infos(frameP,rlc_am_pdu_sn_10_p, tb_size_in_bytes, &pdu_info) >= 0) {
|
if (rlc_am_get_data_pdu_infos(ctxt_pP,rlc_am_pdu_sn_10_p, tb_size_in_bytes, &pdu_info) >= 0) {
|
||||||
# if defined(ENABLE_ITTI)
|
# if defined(ENABLE_ITTI)
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
|
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "PDU size : %u\n", tb_size_in_bytes);
|
message_string_size += sprintf(&message_string[message_string_size], "PDU size : %u\n", tb_size_in_bytes);
|
||||||
@@ -877,17 +900,17 @@ rlc_am_mac_data_indication (void *rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP,
|
|||||||
}
|
}
|
||||||
message_string_size += sprintf(&message_string[message_string_size], " |\n");
|
message_string_size += sprintf(&message_string[message_string_size], " |\n");
|
||||||
|
|
||||||
msg_p = itti_alloc_new_message_sized (l_rlc_p->is_enb > 0 ? TASK_RLC_ENB:TASK_RLC_UE , RLC_AM_DATA_PDU_IND, message_string_size + sizeof (IttiMsgText));
|
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag > 0 ? TASK_RLC_ENB:TASK_RLC_UE , RLC_AM_DATA_PDU_IND, message_string_size + sizeof (IttiMsgText));
|
||||||
msg_p->ittiMsg.rlc_am_data_pdu_ind.size = message_string_size;
|
msg_p->ittiMsg.rlc_am_data_pdu_ind.size = message_string_size;
|
||||||
memcpy(&msg_p->ittiMsg.rlc_am_data_pdu_ind.text, message_string, message_string_size);
|
memcpy(&msg_p->ittiMsg.rlc_am_data_pdu_ind.text, message_string, message_string_size);
|
||||||
|
|
||||||
if (l_rlc_p->is_enb) {
|
if (ctxt_pP->enb_flag) {
|
||||||
itti_send_msg_to_task(TASK_UNKNOWN, l_rlc_p->enb_module_id, msg_p);
|
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->enb_module_id, msg_p);
|
||||||
} else {
|
} else {
|
||||||
itti_send_msg_to_task(TASK_UNKNOWN, l_rlc_p->ue_module_id + NB_eNB_INST, msg_p);
|
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->ue_module_id + NB_eNB_INST, msg_p);
|
||||||
}
|
}
|
||||||
# else
|
# else
|
||||||
rlc_am_display_data_pdu_infos(l_rlc_p, frameP, &pdu_info);
|
rlc_am_display_data_pdu_infos(ctxt_pP, l_rlc_p, &pdu_info);
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -912,14 +935,14 @@ rlc_am_mac_data_indication (void *rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP,
|
|||||||
message_string_size += sprintf(&message_string[message_string_size], " NACK SN %04d", g_rlc_am_control_pdu_info.nack_list[num_nack].nack_sn);
|
message_string_size += sprintf(&message_string[message_string_size], " NACK SN %04d", g_rlc_am_control_pdu_info.nack_list[num_nack].nack_sn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
msg_p = itti_alloc_new_message_sized (l_rlc_p->is_enb > 0 ? TASK_RLC_ENB:TASK_RLC_UE , RLC_AM_STATUS_PDU_IND, message_string_size + sizeof (IttiMsgText));
|
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag > 0 ? TASK_RLC_ENB:TASK_RLC_UE , RLC_AM_STATUS_PDU_IND, message_string_size + sizeof (IttiMsgText));
|
||||||
msg_p->ittiMsg.rlc_am_status_pdu_ind.size = message_string_size;
|
msg_p->ittiMsg.rlc_am_status_pdu_ind.size = message_string_size;
|
||||||
memcpy(&msg_p->ittiMsg.rlc_am_status_pdu_ind.text, message_string, message_string_size);
|
memcpy(&msg_p->ittiMsg.rlc_am_status_pdu_ind.text, message_string, message_string_size);
|
||||||
|
|
||||||
if (l_rlc_p->is_enb) {
|
if (ctxt_pP->enb_flag) {
|
||||||
itti_send_msg_to_task(TASK_UNKNOWN, l_rlc_p->enb_module_id, msg_p);
|
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->enb_module_id, msg_p);
|
||||||
} else {
|
} else {
|
||||||
itti_send_msg_to_task(TASK_UNKNOWN, l_rlc_p->ue_module_id + NB_eNB_INST, msg_p);
|
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->ue_module_id + NB_eNB_INST, msg_p);
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
@@ -928,12 +951,15 @@ rlc_am_mac_data_indication (void *rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
rlc_am_rx (rlc_pP, frameP, eNB_flagP, data_indP);
|
rlc_am_rx (ctxt_pP, rlc_pP, data_indP);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rlc_am_data_req (void *rlc_pP, frame_t frameP, mem_block_t * sdu_pP)
|
rlc_am_data_req (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
void * const rlc_pP,
|
||||||
|
mem_block_t * const sdu_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
rlc_am_entity_t *l_rlc_p = (rlc_am_entity_t *) rlc_pP;
|
rlc_am_entity_t *l_rlc_p = (rlc_am_entity_t *) rlc_pP;
|
||||||
@@ -998,14 +1024,14 @@ rlc_am_data_req (void *rlc_pP, frame_t frameP, mem_block_t * sdu_pP)
|
|||||||
message_string_size += sprintf(&message_string[message_string_size], " |\n");
|
message_string_size += sprintf(&message_string[message_string_size], " |\n");
|
||||||
|
|
||||||
# if defined(ENABLE_ITTI)
|
# if defined(ENABLE_ITTI)
|
||||||
msg_p = itti_alloc_new_message_sized (l_rlc_p->is_enb > 0 ? TASK_RLC_ENB:TASK_RLC_UE , RLC_AM_SDU_REQ, message_string_size + sizeof (IttiMsgText));
|
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag > 0 ? TASK_RLC_ENB:TASK_RLC_UE , RLC_AM_SDU_REQ, message_string_size + sizeof (IttiMsgText));
|
||||||
msg_p->ittiMsg.rlc_am_sdu_req.size = message_string_size;
|
msg_p->ittiMsg.rlc_am_sdu_req.size = message_string_size;
|
||||||
memcpy(&msg_p->ittiMsg.rlc_am_sdu_req.text, message_string, message_string_size);
|
memcpy(&msg_p->ittiMsg.rlc_am_sdu_req.text, message_string, message_string_size);
|
||||||
|
|
||||||
if (l_rlc_p->is_enb) {
|
if (ctxt_pP->enb_flag) {
|
||||||
itti_send_msg_to_task(TASK_UNKNOWN, l_rlc_p->enb_module_id, msg_p);
|
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->enb_module_id, msg_p);
|
||||||
} else {
|
} else {
|
||||||
itti_send_msg_to_task(TASK_UNKNOWN, l_rlc_p->ue_module_id + NB_eNB_INST, msg_p);
|
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->ue_module_id + NB_eNB_INST, msg_p);
|
||||||
}
|
}
|
||||||
# else
|
# else
|
||||||
LOG_T(RLC, "%s", message_string);
|
LOG_T(RLC, "%s", message_string);
|
||||||
@@ -1026,7 +1052,7 @@ rlc_am_data_req (void *rlc_pP, frame_t frameP, mem_block_t * sdu_pP)
|
|||||||
l_rlc_p->input_sdus[l_rlc_p->next_sdu_index].first_byte = (uint8_t*)(&sdu_pP->data[data_offset]);
|
l_rlc_p->input_sdus[l_rlc_p->next_sdu_index].first_byte = (uint8_t*)(&sdu_pP->data[data_offset]);
|
||||||
l_rlc_p->input_sdus[l_rlc_p->next_sdu_index].sdu_remaining_size = l_rlc_p->input_sdus[l_rlc_p->next_sdu_index].sdu_size;
|
l_rlc_p->input_sdus[l_rlc_p->next_sdu_index].sdu_remaining_size = l_rlc_p->input_sdus[l_rlc_p->next_sdu_index].sdu_size;
|
||||||
l_rlc_p->input_sdus[l_rlc_p->next_sdu_index].sdu_segmented_size = 0;
|
l_rlc_p->input_sdus[l_rlc_p->next_sdu_index].sdu_segmented_size = 0;
|
||||||
l_rlc_p->input_sdus[l_rlc_p->next_sdu_index].sdu_creation_time = frameP;
|
l_rlc_p->input_sdus[l_rlc_p->next_sdu_index].sdu_creation_time = ctxt_pP->frame;
|
||||||
l_rlc_p->input_sdus[l_rlc_p->next_sdu_index].nb_pdus = 0;
|
l_rlc_p->input_sdus[l_rlc_p->next_sdu_index].nb_pdus = 0;
|
||||||
l_rlc_p->input_sdus[l_rlc_p->next_sdu_index].nb_pdus_ack = 0;
|
l_rlc_p->input_sdus[l_rlc_p->next_sdu_index].nb_pdus_ack = 0;
|
||||||
//l_rlc_p->input_sdus[l_rlc_p->next_sdu_index].nb_pdus_time = 0;
|
//l_rlc_p->input_sdus[l_rlc_p->next_sdu_index].nb_pdus_time = 0;
|
||||||
@@ -1038,10 +1064,10 @@ rlc_am_data_req (void *rlc_pP, frame_t frameP, mem_block_t * sdu_pP)
|
|||||||
//l_rlc_p->input_sdus[l_rlc_p->next_sdu_index].li_index_for_discard = -1;
|
//l_rlc_p->input_sdus[l_rlc_p->next_sdu_index].li_index_for_discard = -1;
|
||||||
l_rlc_p->next_sdu_index = (l_rlc_p->next_sdu_index + 1) % RLC_AM_SDU_CONTROL_BUFFER_SIZE;
|
l_rlc_p->next_sdu_index = (l_rlc_p->next_sdu_index + 1) % RLC_AM_SDU_CONTROL_BUFFER_SIZE;
|
||||||
LOG_I(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] RLC_AM_DATA_REQ size %d Bytes, NB SDU %d current_sdu_index=%d next_sdu_index=%d conf %d mui %d\n",
|
LOG_I(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] RLC_AM_DATA_REQ size %d Bytes, NB SDU %d current_sdu_index=%d next_sdu_index=%d conf %d mui %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(l_rlc_p->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
l_rlc_p->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
l_rlc_p->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
l_rlc_p->rb_id,
|
l_rlc_p->rb_id,
|
||||||
data_size,
|
data_size,
|
||||||
l_rlc_p->nb_sdu,
|
l_rlc_p->nb_sdu,
|
||||||
@@ -1051,10 +1077,10 @@ rlc_am_data_req (void *rlc_pP, frame_t frameP, mem_block_t * sdu_pP)
|
|||||||
mui);
|
mui);
|
||||||
} else {
|
} else {
|
||||||
LOG_W(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] RLC_AM_DATA_REQ BUFFER FULL, NB SDU %d current_sdu_index=%d next_sdu_index=%d size_input_sdus_buffer=%d\n",
|
LOG_W(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] RLC_AM_DATA_REQ BUFFER FULL, NB SDU %d current_sdu_index=%d next_sdu_index=%d size_input_sdus_buffer=%d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(l_rlc_p->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
l_rlc_p->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
l_rlc_p->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
l_rlc_p->rb_id,
|
l_rlc_p->rb_id,
|
||||||
l_rlc_p->nb_sdu,
|
l_rlc_p->nb_sdu,
|
||||||
l_rlc_p->current_sdu_index,
|
l_rlc_p->current_sdu_index,
|
||||||
@@ -1066,10 +1092,10 @@ rlc_am_data_req (void *rlc_pP, frame_t frameP, mem_block_t * sdu_pP)
|
|||||||
free_mem_block (sdu_pP);
|
free_mem_block (sdu_pP);
|
||||||
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
|
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
|
||||||
AssertFatal(0, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] RLC_AM_DATA_REQ size %d Bytes, SDU DROPPED, INPUT BUFFER OVERFLOW NB SDU %d current_sdu_index=%d next_sdu_index=%d \n",
|
AssertFatal(0, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] RLC_AM_DATA_REQ size %d Bytes, SDU DROPPED, INPUT BUFFER OVERFLOW NB SDU %d current_sdu_index=%d next_sdu_index=%d \n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(l_rlc_p->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
l_rlc_p->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
l_rlc_p->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
l_rlc_p->rb_id,
|
l_rlc_p->rb_id,
|
||||||
data_size,
|
data_size,
|
||||||
l_rlc_p->nb_sdu,
|
l_rlc_p->nb_sdu,
|
||||||
|
|||||||
@@ -86,57 +86,50 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*! \fn void rlc_am_release (rlc_am_entity_t *rlcP)
|
/*! \fn void rlc_am_release (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP)
|
||||||
* \brief Empty function, TO DO.
|
* \brief Empty function, TO DO.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] ctxt_pP Running context.
|
||||||
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
*/
|
*/
|
||||||
public_rlc_am(void rlc_am_release (rlc_am_entity_t * const rlcP);)
|
public_rlc_am(void rlc_am_release (
|
||||||
|
const protocol_ctxt_t* const ctxtP,
|
||||||
|
rlc_am_entity_t * const rlc_pP);)
|
||||||
|
|
||||||
/** @addtogroup _rlc_am_init_impl_
|
/** @addtogroup _rlc_am_init_impl_
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \fn void config_req_rlc_am (const frame_t frame, const eNB_flag_t eNB_flagP, const srb_flag_t srb_flagP, const module_id_t enb_module_idP, const module_id_t ue_module_idP, rlc_am_info_t * config_amP, rb_id_t rb_idP)
|
/*! \fn void config_req_rlc_am (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, rlc_am_info_t * config_amP, rb_id_t rb_idP)
|
||||||
* \brief Configure the UL and DL parameters of the RLC AM
|
* \brief Configure the UL and DL parameters of the RLC AM
|
||||||
* \param[in] frame Frame index.
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] eNB_flag Flag to indicate eNB (1) or UE (0)
|
|
||||||
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
|
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
|
||||||
* \param[in] enb_module_idP eNB Virtualized module identifier.
|
|
||||||
* \param[in] ue_module_idP UE Virtualized module identifier.
|
|
||||||
* \param[in] config_amP Configuration parameters for RLC AM instance.
|
* \param[in] config_amP Configuration parameters for RLC AM instance.
|
||||||
* \param[in] rb_idP Radio bearer identifier.
|
* \param[in] rb_idP Radio bearer identifier.
|
||||||
*/
|
*/
|
||||||
public_rlc_am(void config_req_rlc_am (
|
public_rlc_am(void config_req_rlc_am (
|
||||||
const frame_t frame,
|
const protocol_ctxt_t* const ctxtP,
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const module_id_t enb_module_idP,
|
|
||||||
const module_id_t ue_module_idP,
|
|
||||||
const rlc_am_info_t * const config_amP,
|
const rlc_am_info_t * const config_amP,
|
||||||
const rb_id_t rb_idP);)
|
const rb_id_t rb_idP);)
|
||||||
|
|
||||||
/*! \fn void config_req_rlc_am_asn1 (const frame_t frame, const eNB_flag_t eNB_flagP, const srb_flag_t srb_flagP, const module_id_t enb_module_idP, const module_id_t ue_module_idP, struct RLC_Config__am * config_amP, rb_id_t rb_idP)
|
/*! \fn void config_req_rlc_am_asn1 (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, struct RLC_Config__am * config_amP, rb_id_t rb_idP)
|
||||||
* \brief Configure the UL and DL parameters of the RLC AM with the asn1c autogenerated pameters structs
|
* \brief Configure the UL and DL parameters of the RLC AM with the asn1c autogenerated pameters structs
|
||||||
* \param[in] frame Frame index.
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] eNB_flag Flag to indicate eNB (1) or UE (0)
|
|
||||||
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
|
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
|
||||||
* \param[in] enb_module_idP eNB Virtualized module identifier.
|
|
||||||
* \param[in] ue_module_idP UE Virtualized module identifier.
|
|
||||||
* \param[in] config_amP Configuration parameters for RLC AM instance.
|
* \param[in] config_amP Configuration parameters for RLC AM instance.
|
||||||
* \param[in] rb_idP Radio bearer identifier.
|
* \param[in] rb_idP Radio bearer identifier.
|
||||||
*/
|
*/
|
||||||
public_rlc_am(void config_req_rlc_am_asn1 (
|
public_rlc_am(void config_req_rlc_am_asn1 (
|
||||||
const const frame_t frame,
|
const protocol_ctxt_t* const ctxtP,
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const module_id_t enb_module_idP,
|
|
||||||
const module_id_t ue_module_idP,
|
|
||||||
const struct RLC_Config__am * const config_amP,
|
const struct RLC_Config__am * const config_amP,
|
||||||
const rb_id_t rb_idP);)
|
const rb_id_t rb_idP);)
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/*! \fn void rlc_am_stat_req (rlc_am_entity_t *rlcP,
|
/*! \fn void rlc_am_stat_req (
|
||||||
|
const protocol_ctxt_t* const ctxtP,
|
||||||
|
rlc_am_entity_t * const rlc_pP,
|
||||||
unsigned int* stat_tx_pdcp_sdu,
|
unsigned int* stat_tx_pdcp_sdu,
|
||||||
unsigned int* stat_tx_pdcp_bytes,
|
unsigned int* stat_tx_pdcp_bytes,
|
||||||
unsigned int* stat_tx_pdcp_sdu_discarded,
|
unsigned int* stat_tx_pdcp_sdu_discarded,
|
||||||
@@ -165,7 +158,8 @@ public_rlc_am(void config_req_rlc_am_asn1 (
|
|||||||
unsigned int* stat_timer_poll_retransmit_timed_out,
|
unsigned int* stat_timer_poll_retransmit_timed_out,
|
||||||
unsigned int* stat_timer_status_prohibit_timed_out)
|
unsigned int* stat_timer_status_prohibit_timed_out)
|
||||||
* \brief Request TX and RX statistics of a RLC AM protocol instance.
|
* \brief Request TX and RX statistics of a RLC AM protocol instance.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] ctxt_pP Running context.
|
||||||
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[out] stat_tx_pdcp_sdu Number of SDUs coming from upper layers.
|
* \param[out] stat_tx_pdcp_sdu Number of SDUs coming from upper layers.
|
||||||
* \param[out] stat_tx_pdcp_bytes Number of bytes coming from upper layers.
|
* \param[out] stat_tx_pdcp_bytes Number of bytes coming from upper layers.
|
||||||
* \param[out] stat_tx_pdcp_sdu_discarded Number of discarded SDUs coming from upper layers.
|
* \param[out] stat_tx_pdcp_sdu_discarded Number of discarded SDUs coming from upper layers.
|
||||||
@@ -194,7 +188,9 @@ public_rlc_am(void config_req_rlc_am_asn1 (
|
|||||||
* \param[out] stat_timer_poll_retransmit_timed_out Number of times the timer "poll_retransmit" has timed-out.
|
* \param[out] stat_timer_poll_retransmit_timed_out Number of times the timer "poll_retransmit" has timed-out.
|
||||||
* \param[out] stat_timer_status_prohibit_timed_out Number of times the timer "status_prohibit" has timed-out.
|
* \param[out] stat_timer_status_prohibit_timed_out Number of times the timer "status_prohibit" has timed-out.
|
||||||
*/
|
*/
|
||||||
public_rlc_am(void rlc_am_stat_req (rlc_am_entity_t *rlcP,
|
public_rlc_am(void rlc_am_stat_req (
|
||||||
|
const protocol_ctxt_t* const ctxtP,
|
||||||
|
rlc_am_entity_t * const rlc_pP,
|
||||||
unsigned int* stat_tx_pdcp_sdu,
|
unsigned int* stat_tx_pdcp_sdu,
|
||||||
unsigned int* stat_tx_pdcp_bytes,
|
unsigned int* stat_tx_pdcp_bytes,
|
||||||
unsigned int* stat_tx_pdcp_sdu_discarded,
|
unsigned int* stat_tx_pdcp_sdu_discarded,
|
||||||
@@ -223,54 +219,53 @@ public_rlc_am(void rlc_am_stat_req (rlc_am_entity_t *rlcP,
|
|||||||
unsigned int* stat_timer_poll_retransmit_timed_out,
|
unsigned int* stat_timer_poll_retransmit_timed_out,
|
||||||
unsigned int* stat_timer_status_prohibit_timed_out);)
|
unsigned int* stat_timer_status_prohibit_timed_out);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_get_pdus (void *rlcP)
|
/*! \fn void rlc_am_get_pdus (const protocol_ctxt_t* const ctxtP, void * const rlc_pP)
|
||||||
* \brief Request the segmentation of SDUs based on status previously sent by MAC.
|
* \brief Request the segmentation of SDUs based on status previously sent by MAC.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] ctxt_pP Running context.
|
||||||
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
*/
|
*/
|
||||||
private_rlc_am( void rlc_am_get_pdus (void *argP);)
|
private_rlc_am( void rlc_am_get_pdus (const protocol_ctxt_t* const ctxtP,void * const rlc_pP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_rx (void *rlcP, uint32_t frame, const eNB_flag_t eNB_flag, struct mac_data_ind data_indication)
|
/*! \fn void rlc_am_rx (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, struct mac_data_ind data_indication)
|
||||||
* \brief Process the received PDUs from lower layer.
|
* \brief Process the received PDUs from lower layer.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] frame Frame index.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] eNB_flag Flag to indicate eNB (1) or UE (0).
|
|
||||||
* \param[in] data_indication PDUs from MAC.
|
* \param[in] data_indication PDUs from MAC.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am( void rlc_am_rx (void *, const frame_t frame, struct mac_data_ind);)
|
protected_rlc_am( void rlc_am_rx (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, struct mac_data_ind);)
|
||||||
|
|
||||||
/*! \fn struct mac_status_resp rlc_am_mac_status_indication (void *rlcP, uint32_t frame,uint16_t tbs_sizeP, struct mac_status_ind tx_statusP)
|
/*! \fn struct mac_status_resp rlc_am_mac_status_indication (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP)
|
||||||
* \brief Request the maximum number of bytes that can be served by RLC instance to MAC and fix the amount of bytes requested by MAC for next RLC transmission.
|
* \brief Request the maximum number of bytes that can be served by RLC instance to MAC and fix the amount of bytes requested by MAC for next RLC transmission.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] frame Frame index.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] tbs_sizeP Number of bytes requested by MAC for next transmission.
|
* \param[in] tbs_sizeP Number of bytes requested by MAC for next transmission.
|
||||||
* \param[in] tx_statusP Transmission status given by MAC on previous MAC transmission of the PDU.
|
* \param[in] tx_statusP Transmission status given by MAC on previous MAC transmission of the PDU.
|
||||||
* \return The maximum number of bytes that can be served by RLC instance to MAC.
|
* \return The maximum number of bytes that can be served by RLC instance to MAC.
|
||||||
*/
|
*/
|
||||||
public_rlc_am( struct mac_status_resp rlc_am_mac_status_indication (void *rlcP, const frame_t frame, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP);)
|
public_rlc_am( struct mac_status_resp rlc_am_mac_status_indication (const protocol_ctxt_t* const ctxtP, void * const rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP);)
|
||||||
|
|
||||||
/*! \fn struct mac_data_req rlc_am_mac_data_request (void *rlcP, uint32_t frame)
|
/*! \fn struct mac_data_req rlc_am_mac_data_request (const protocol_ctxt_t* const ctxtP,void * const rlc_pP)
|
||||||
* \brief Gives PDUs to lower layer MAC.
|
* \brief Gives PDUs to lower layer MAC.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] frame Frame index.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \return A PDU of the previously requested number of bytes, and the updated maximum number of bytes that can be served by RLC instance to MAC for next RLC transmission.
|
* \return A PDU of the previously requested number of bytes, and the updated maximum number of bytes that can be served by RLC instance to MAC for next RLC transmission.
|
||||||
*/
|
*/
|
||||||
public_rlc_am( struct mac_data_req rlc_am_mac_data_request (void *rlcP, const frame_t frame);)
|
public_rlc_am( struct mac_data_req rlc_am_mac_data_request (const protocol_ctxt_t* const ctxtP,void * const rlc_pP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_mac_data_indication (void *rlcP, uint32_t frame, const eNB_flag_t eNB_flag, struct mac_data_ind data_indP)
|
/*! \fn void rlc_am_mac_data_indication (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, struct mac_data_ind data_indP)
|
||||||
* \brief Receive PDUs from lower layer MAC.
|
* \brief Receive PDUs from lower layer MAC.
|
||||||
* \param[in] rlcP RLC UM protocol instance pointer.
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] frame Frame index.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] eNB_flag Flag to indicate eNB (1) or UE (0).
|
|
||||||
* \param[in] data_indP PDUs from MAC.
|
* \param[in] data_indP PDUs from MAC.
|
||||||
*/
|
*/
|
||||||
public_rlc_am( void rlc_am_mac_data_indication (void *rlcP, const frame_t frame, const eNB_flag_t eNB_flag, struct mac_data_ind data_indP);)
|
public_rlc_am( void rlc_am_mac_data_indication (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, struct mac_data_ind data_indP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_data_req (void *rlcP, uint32_t frame, mem_block_t *sduP)
|
/*! \fn void rlc_am_data_req (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, mem_block_t *sduP)
|
||||||
* \brief Interface with higher layers, buffer higher layer SDUS for transmission.
|
* \brief Interface with higher layers, buffer higher layer SDUS for transmission.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] frame Frame index.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] sduP SDU. (A struct rlc_am_data_req is mapped on sduP->data.)
|
* \param[in] sduP SDU. (A struct rlc_am_data_req is mapped on sduP->data.)
|
||||||
*/
|
*/
|
||||||
public_rlc_am( void rlc_am_data_req (void *rlcP, const frame_t frame, mem_block_t *sduP);)
|
public_rlc_am( void rlc_am_data_req (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, mem_block_t *sduP);)
|
||||||
/** @} */
|
/** @} */
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
@@ -57,12 +57,12 @@
|
|||||||
* \brief Structure containing a RLC AM instance protocol variables, statistic variables, allocation variables, buffers and other miscellaneous variables.
|
* \brief Structure containing a RLC AM instance protocol variables, statistic variables, allocation variables, buffers and other miscellaneous variables.
|
||||||
*/
|
*/
|
||||||
typedef struct rlc_am_entity_s {
|
typedef struct rlc_am_entity_s {
|
||||||
module_id_t enb_module_id; /*!< \brief eNB Virtualization index for this protocol instance. */
|
//module_id_t enb_module_id; /*!< \brief eNB Virtualization index for this protocol instance. */
|
||||||
module_id_t ue_module_id; /*!< \brief UE Virtualization index for this protocol instance. */
|
//module_id_t ue_module_id; /*!< \brief UE Virtualization index for this protocol instance. */
|
||||||
rb_id_t rb_id; /*!< \brief Radio bearer identifier, for statistics and trace purpose. */
|
rb_id_t rb_id; /*!< \brief Radio bearer identifier, for statistics and trace purpose. */
|
||||||
logical_chan_id_t channel_id; /*!< \brief Transport channel identifier. */
|
logical_chan_id_t channel_id; /*!< \brief Transport channel identifier. */
|
||||||
boolean_t is_data_plane; /*!< \brief To know if the RLC belongs to a data radio bearer or a signalling radio bearer, for statistics and trace purpose. */
|
boolean_t is_data_plane; /*!< \brief To know if the RLC belongs to a data radio bearer or a signalling radio bearer, for statistics and trace purpose. */
|
||||||
boolean_t is_enb; /*!< \brief To know if the RLC belongs to a eNB or UE. */
|
//boolean_t is_enb; /*!< \brief To know if the RLC belongs to a eNB or UE. */
|
||||||
|
|
||||||
rlc_buffer_occupancy_t sdu_buffer_occupancy; /*!< \brief Number of bytes of unsegmented SDUs. */
|
rlc_buffer_occupancy_t sdu_buffer_occupancy; /*!< \brief Number of bytes of unsegmented SDUs. */
|
||||||
rlc_buffer_occupancy_t retransmission_buffer_occupancy; /*!< \brief Number of bytes of PDUs in retransmission buffer waiting for a ACK. */
|
rlc_buffer_occupancy_t retransmission_buffer_occupancy; /*!< \brief Number of bytes of PDUs in retransmission buffer waiting for a ACK. */
|
||||||
|
|||||||
@@ -43,8 +43,8 @@
|
|||||||
#define TRACE_RLC_AM_FREE_SDU
|
#define TRACE_RLC_AM_FREE_SDU
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_free_in_sdu(
|
void rlc_am_free_in_sdu(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlcP,
|
rlc_am_entity_t *const rlcP,
|
||||||
const frame_t frameP,
|
|
||||||
const unsigned int index_in_bufferP)
|
const unsigned int index_in_bufferP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
@@ -69,10 +69,10 @@ void rlc_am_free_in_sdu(
|
|||||||
}
|
}
|
||||||
#ifdef TRACE_RLC_AM_FREE_SDU
|
#ifdef TRACE_RLC_AM_FREE_SDU
|
||||||
LOG_D(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][FREE SDU] SDU INDEX %03d current_sdu_index=%d next_sdu_index=%d nb_sdu_no_segmented=%d\n",
|
LOG_D(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][FREE SDU] SDU INDEX %03d current_sdu_index=%d next_sdu_index=%d nb_sdu_no_segmented=%d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlcP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlcP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlcP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlcP->rb_id,
|
rlcP->rb_id,
|
||||||
index_in_bufferP,
|
index_in_bufferP,
|
||||||
rlcP->current_sdu_index,
|
rlcP->current_sdu_index,
|
||||||
@@ -82,8 +82,10 @@ void rlc_am_free_in_sdu(
|
|||||||
}
|
}
|
||||||
// called when segmentation is done
|
// called when segmentation is done
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_free_in_sdu_data(
|
void
|
||||||
rlc_am_entity_t *const rlcP,
|
rlc_am_free_in_sdu_data(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t* const rlcP,
|
||||||
const unsigned int index_in_bufferP)
|
const unsigned int index_in_bufferP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
@@ -97,7 +99,10 @@ void rlc_am_free_in_sdu_data(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
signed int rlc_am_in_sdu_is_empty(rlc_am_entity_t *const rlcP)
|
signed int
|
||||||
|
rlc_am_in_sdu_is_empty(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t *const rlcP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
if (rlcP->nb_sdu == 0) {
|
if (rlcP->nb_sdu == 0) {
|
||||||
|
|||||||
@@ -57,30 +57,32 @@
|
|||||||
# define public_rlc_am_in_sdu(x) extern x
|
# define public_rlc_am_in_sdu(x) extern x
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
/*! \fn void rlc_am_free_in_sdu (rlc_am_entity_t *rlcP, frame_t frameP, unsigned int index_in_bufferP)
|
/*! \fn void rlc_am_free_in_sdu (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, unsigned int index_in_bufferP)
|
||||||
* \brief Free a higher layer SDU stored in input_sdus[] buffer.
|
* \brief Free a higher layer SDU stored in input_sdus[] buffer.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||||
* \param[in] frame Frame index.
|
|
||||||
* \param[in] index_in_bufferP Position index of the SDU.
|
* \param[in] index_in_bufferP Position index of the SDU.
|
||||||
* \note Update also the RLC AM instance variables nb_sdu, current_sdu_index, nb_sdu_no_segmented.
|
* \note Update also the RLC AM instance variables nb_sdu, current_sdu_index, nb_sdu_no_segmented.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_in_sdu(void rlc_am_free_in_sdu (rlc_am_entity_t *rlcP, frame_t frameP, unsigned int index_in_bufferP);)
|
protected_rlc_am_in_sdu(void rlc_am_free_in_sdu (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, unsigned int index_in_bufferP);)
|
||||||
|
|
||||||
|
|
||||||
/*! \fn void rlc_am_free_in_sdu_data (rlc_am_entity_t *rlcP, unsigned int index_in_bufferP)
|
/*! \fn void rlc_am_free_in_sdu_data (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, unsigned int index_in_bufferP)
|
||||||
* \brief Free a higher layer SDU data part, the SDU is stored in input_sdus[] buffer.
|
* \brief Free a higher layer SDU data part, the SDU is stored in input_sdus[] buffer.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||||
* \param[in] index_in_bufferP Position index of the SDU.
|
* \param[in] index_in_bufferP Position index of the SDU.
|
||||||
* \note This procedure is called when the SDU segmentation is done for this SDU. Update also the RLC AM instance variable nb_sdu_no_segmented.
|
* \note This procedure is called when the SDU segmentation is done for this SDU. Update also the RLC AM instance variable nb_sdu_no_segmented.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_in_sdu(void rlc_am_free_in_sdu_data (rlc_am_entity_t *rlcP, unsigned int index_in_bufferP);)
|
protected_rlc_am_in_sdu(void rlc_am_free_in_sdu_data (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, unsigned int index_in_bufferP);)
|
||||||
|
|
||||||
|
|
||||||
/*! \fn signed int rlc_am_in_sdu_is_empty(rlc_am_entity_t *rlcP)
|
/*! \fn signed int rlc_am_in_sdu_is_empty(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP)
|
||||||
* \brief Indicates if the input SDU buffer for incoming higher layer SDUs is empty or not.
|
* \brief Indicates if the input SDU buffer for incoming higher layer SDUs is empty or not.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||||
* \return 1 if the buffer is empty, else 0.
|
* \return 1 if the buffer is empty, else 0.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_in_sdu(signed int rlc_am_in_sdu_is_empty(rlc_am_entity_t *rlcP);)
|
protected_rlc_am_in_sdu(signed int rlc_am_in_sdu_is_empty(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP);)
|
||||||
/** @} */
|
/** @} */
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
@@ -36,13 +36,16 @@
|
|||||||
#include "LAYER2/MAC/extern.h"
|
#include "LAYER2/MAC/extern.h"
|
||||||
#include "UTIL/LOG/log.h"
|
#include "UTIL/LOG/log.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_init(rlc_am_entity_t *rlc_pP, frame_t frameP)
|
void
|
||||||
|
rlc_am_init(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t *const rlc_pP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
if (rlc_pP->initialized == TRUE) {
|
if (rlc_pP->initialized == TRUE) {
|
||||||
LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][INIT] INITIALIZATION ALREADY DONE, DOING NOTHING\n", frameP);
|
LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][INIT] INITIALIZATION ALREADY DONE, DOING NOTHING\n", ctxt_pP->frame);
|
||||||
} else {
|
} else {
|
||||||
LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][INIT] INITIALIZATION: STATE VARIABLES, BUFFERS, LISTS\n", frameP);
|
LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][INIT] INITIALIZATION: STATE VARIABLES, BUFFERS, LISTS\n", ctxt_pP->frame);
|
||||||
memset(rlc_pP, 0, sizeof(rlc_am_entity_t));
|
memset(rlc_pP, 0, sizeof(rlc_am_entity_t));
|
||||||
|
|
||||||
list2_init(&rlc_pP->receiver_buffer, "RX BUFFER");
|
list2_init(&rlc_pP->receiver_buffer, "RX BUFFER");
|
||||||
@@ -56,8 +59,8 @@ void rlc_am_init(rlc_am_entity_t *rlc_pP, frame_t frameP)
|
|||||||
#warning "cast the rlc retrans buffer to uint32"
|
#warning "cast the rlc retrans buffer to uint32"
|
||||||
// rlc_pP->pdu_retrans_buffer = calloc(1, (uint16_t)((unsigned int)RLC_AM_PDU_RETRANSMISSION_BUFFER_SIZE*(unsigned int)sizeof(rlc_am_tx_data_pdu_management_t)));
|
// rlc_pP->pdu_retrans_buffer = calloc(1, (uint16_t)((unsigned int)RLC_AM_PDU_RETRANSMISSION_BUFFER_SIZE*(unsigned int)sizeof(rlc_am_tx_data_pdu_management_t)));
|
||||||
rlc_pP->pdu_retrans_buffer = calloc(1, (uint32_t)((unsigned int)RLC_AM_PDU_RETRANSMISSION_BUFFER_SIZE*(unsigned int)sizeof(rlc_am_tx_data_pdu_management_t)));
|
rlc_pP->pdu_retrans_buffer = calloc(1, (uint32_t)((unsigned int)RLC_AM_PDU_RETRANSMISSION_BUFFER_SIZE*(unsigned int)sizeof(rlc_am_tx_data_pdu_management_t)));
|
||||||
LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][INIT] input_sdus[] = %p element size=%d\n", frameP, rlc_pP->input_sdus,sizeof(rlc_am_tx_sdu_management_t));
|
LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][INIT] input_sdus[] = %p element size=%d\n", ctxt_pP->frame, rlc_pP->input_sdus,sizeof(rlc_am_tx_sdu_management_t));
|
||||||
LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][INIT] pdu_retrans_buffer[] = %p element size=%d\n", frameP, rlc_pP->pdu_retrans_buffer,sizeof(rlc_am_tx_data_pdu_management_t));
|
LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][INIT] pdu_retrans_buffer[] = %p element size=%d\n", ctxt_pP->frame, rlc_pP->pdu_retrans_buffer,sizeof(rlc_am_tx_data_pdu_management_t));
|
||||||
|
|
||||||
// TX state variables
|
// TX state variables
|
||||||
//rlc_pP->vt_a = 0;
|
//rlc_pP->vt_a = 0;
|
||||||
@@ -81,7 +84,10 @@ void rlc_am_init(rlc_am_entity_t *rlc_pP, frame_t frameP)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_reestablish(rlc_am_entity_t *rlc_pP, frame_t frameP)
|
void
|
||||||
|
rlc_am_reestablish(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t* const rlc_pP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@@ -98,7 +104,7 @@ void rlc_am_reestablish(rlc_am_entity_t *rlc_pP, frame_t frameP)
|
|||||||
* - stop and reset all timers;
|
* - stop and reset all timers;
|
||||||
* - reset all state variables to their initial values.
|
* - reset all state variables to their initial values.
|
||||||
*/
|
*/
|
||||||
LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][REESTABLISH] RE-INIT STATE VARIABLES, BUFFERS, LISTS\n", frameP);
|
LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][REESTABLISH] RE-INIT STATE VARIABLES, BUFFERS, LISTS\n", ctxt_pP->frame);
|
||||||
|
|
||||||
#warning TODO when possible reassemble RLC SDUs from any byte segments of AMD PDUs with SN inf VR(MR)
|
#warning TODO when possible reassemble RLC SDUs from any byte segments of AMD PDUs with SN inf VR(MR)
|
||||||
list2_free(&rlc_pP->receiver_buffer);
|
list2_free(&rlc_pP->receiver_buffer);
|
||||||
@@ -133,13 +139,16 @@ void rlc_am_reestablish(rlc_am_entity_t *rlc_pP, frame_t frameP)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_cleanup(rlc_am_entity_t *rlc_pP)
|
void
|
||||||
|
rlc_am_cleanup(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t* const rlc_pP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
LOG_I(RLC, "[FRAME ?????][%s][RLC_AM][MOD %u/%u][RB %u][CLEANUP]\n",
|
LOG_I(RLC, "[FRAME ?????][%s][RLC_AM][MOD %u/%u][RB %u][CLEANUP]\n",
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
|
|
||||||
list2_free(&rlc_pP->receiver_buffer);
|
list2_free(&rlc_pP->receiver_buffer);
|
||||||
@@ -177,22 +186,24 @@ void rlc_am_cleanup(rlc_am_entity_t *rlc_pP)
|
|||||||
memset(rlc_pP, 0, sizeof(rlc_am_entity_t));
|
memset(rlc_pP, 0, sizeof(rlc_am_entity_t));
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_configure(rlc_am_entity_t *rlc_pP,
|
void
|
||||||
frame_t frameP,
|
rlc_am_configure(
|
||||||
uint16_t max_retx_thresholdP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
uint16_t poll_pduP,
|
rlc_am_entity_t *const rlc_pP,
|
||||||
uint16_t poll_byteP,
|
const uint16_t max_retx_thresholdP,
|
||||||
uint32_t t_poll_retransmitP,
|
const uint16_t poll_pduP,
|
||||||
uint32_t t_reorderingP,
|
const uint16_t poll_byteP,
|
||||||
uint32_t t_status_prohibitP)
|
const uint32_t t_poll_retransmitP,
|
||||||
|
const uint32_t t_reorderingP,
|
||||||
|
const uint32_t t_status_prohibitP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
if (rlc_pP->configured == TRUE) {
|
if (rlc_pP->configured == TRUE) {
|
||||||
LOG_I(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RECONFIGURE] max_retx_threshold %d poll_pdu %d poll_byte %d t_poll_retransmit %d t_reordering %d t_status_prohibit %d\n",
|
LOG_I(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RECONFIGURE] max_retx_threshold %d poll_pdu %d poll_byte %d t_poll_retransmit %d t_reordering %d t_status_prohibit %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
max_retx_thresholdP,
|
max_retx_thresholdP,
|
||||||
poll_pduP,
|
poll_pduP,
|
||||||
@@ -211,10 +222,10 @@ void rlc_am_configure(rlc_am_entity_t *rlc_pP,
|
|||||||
rlc_pP->t_status_prohibit.time_out = t_status_prohibitP;
|
rlc_pP->t_status_prohibit.time_out = t_status_prohibitP;
|
||||||
} else {
|
} else {
|
||||||
LOG_I(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][CONFIGURE] max_retx_threshold %d poll_pdu %d poll_byte %d t_poll_retransmit %d t_reordering %d t_status_prohibit %d\n",
|
LOG_I(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][CONFIGURE] max_retx_threshold %d poll_pdu %d poll_byte %d t_poll_retransmit %d t_reordering %d t_status_prohibit %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
max_retx_thresholdP,
|
max_retx_thresholdP,
|
||||||
poll_pduP,
|
poll_pduP,
|
||||||
@@ -229,42 +240,39 @@ void rlc_am_configure(rlc_am_entity_t *rlc_pP,
|
|||||||
rlc_pP->protocol_state = RLC_DATA_TRANSFER_READY_STATE;
|
rlc_pP->protocol_state = RLC_DATA_TRANSFER_READY_STATE;
|
||||||
|
|
||||||
|
|
||||||
rlc_am_init_timer_poll_retransmit(rlc_pP, t_poll_retransmitP);
|
rlc_am_init_timer_poll_retransmit(ctxt_pP, rlc_pP, t_poll_retransmitP);
|
||||||
rlc_am_init_timer_reordering (rlc_pP, t_reorderingP);
|
rlc_am_init_timer_reordering (ctxt_pP, rlc_pP, t_reorderingP);
|
||||||
rlc_am_init_timer_status_prohibit(rlc_pP, t_status_prohibitP);
|
rlc_am_init_timer_status_prohibit(ctxt_pP, rlc_pP, t_status_prohibitP);
|
||||||
|
|
||||||
rlc_pP->configured = TRUE;
|
rlc_pP->configured = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_set_debug_infos(rlc_am_entity_t *rlc_pP,
|
void
|
||||||
frame_t frameP,
|
rlc_am_set_debug_infos(
|
||||||
eNB_flag_t eNB_flagP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
srb_flag_t srb_flagP,
|
rlc_am_entity_t *const rlc_pP,
|
||||||
module_id_t enb_module_idP,
|
const srb_flag_t srb_flagP,
|
||||||
module_id_t ue_module_idP,
|
const rb_id_t rb_idP)
|
||||||
rb_id_t rb_idP)
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SET DEBUG INFOS] module_id %d rb_id %d is SRB %d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SET DEBUG INFOS] module_id %d rb_id %d is SRB %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rb_idP,
|
rb_idP,
|
||||||
enb_module_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rb_idP,
|
rb_idP,
|
||||||
(srb_flagP) ? "TRUE" : "FALSE");
|
(srb_flagP) ? "TRUE" : "FALSE");
|
||||||
|
|
||||||
rlc_pP->enb_module_id = enb_module_idP;
|
|
||||||
rlc_pP->ue_module_id = ue_module_idP;
|
|
||||||
rlc_pP->rb_id = rb_idP;
|
rlc_pP->rb_id = rb_idP;
|
||||||
if (srb_flagP) {
|
if (srb_flagP) {
|
||||||
rlc_pP->is_data_plane = 0;
|
rlc_pP->is_data_plane = 0;
|
||||||
} else {
|
} else {
|
||||||
rlc_pP->is_data_plane = 1;
|
rlc_pP->is_data_plane = 1;
|
||||||
}
|
}
|
||||||
rlc_pP->is_enb = eNB_flagP;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,23 +78,24 @@ typedef volatile struct {
|
|||||||
} rlc_am_info_t;
|
} rlc_am_info_t;
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
/*! \fn void rlc_am_init (rlc_am_entity_t* rlc_pP,frame_t frameP)
|
/*! \fn void rlc_am_init (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP)
|
||||||
* \brief Initialize the RLC AM protocol instance, reset variables, allocate buffers, lists, then, the next step in order have a running RLC AM instance is to configure and set debug informations for this RLC instance.
|
* \brief Initialize the RLC AM protocol instance, reset variables, allocate buffers, lists, then, the next step in order have a running RLC AM instance is to configure and set debug informations for this RLC instance.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] frame Frame index
|
|
||||||
*/
|
*/
|
||||||
public_rlc_am_init( void rlc_am_init (rlc_am_entity_t* rlc_pP,frame_t frameP);)
|
public_rlc_am_init( void rlc_am_init (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t* rlc_pP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_cleanup(rlc_am_entity_t* rlc_pP)
|
/*! \fn void rlc_am_cleanup(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t *const rlc_pP)
|
||||||
* \brief Free all memory resources allocated and kept by this RLC AM instance.
|
* \brief Free all memory resources allocated and kept by this RLC AM instance.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
*/
|
*/
|
||||||
public_rlc_am_init( void rlc_am_cleanup(rlc_am_entity_t* rlc_pP);)
|
public_rlc_am_init( void rlc_am_cleanup(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t* rlc_pP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_configure(rlc_am_entity_t *rlc_pP, frame_t frameP, uint16_t max_retx_thresholdP, uint16_t poll_pduP, uint16_t poll_byteP, uint32_t t_poll_retransmitP, uint32_t t_reorderingP, uint32_t t_status_prohibitP)
|
/*! \fn void rlc_am_configure(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, uint16_t max_retx_thresholdP, uint16_t poll_pduP, uint16_t poll_byteP, uint32_t t_poll_retransmitP, uint32_t t_reorderingP, uint32_t t_status_prohibitP)
|
||||||
* \brief Set RLC AM protocol parameters.
|
* \brief Set RLC AM protocol parameters.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] frame Frame index
|
|
||||||
* \param[in] max_retx_thresholdP Limit the number of retransmissions of an
|
* \param[in] max_retx_thresholdP Limit the number of retransmissions of an
|
||||||
AMD PDU.
|
AMD PDU.
|
||||||
* \param[in] poll_pduP Trigger a poll for every poll_pduP PDUs.
|
* \param[in] poll_pduP Trigger a poll for every poll_pduP PDUs.
|
||||||
@@ -103,25 +104,22 @@ AMD PDU.
|
|||||||
* \param[in] t_reorderingP This timer is used by the receiving side of an AM RLC entity in order to detect loss of RLC PDUs at lower layer, value in frames.
|
* \param[in] t_reorderingP This timer is used by the receiving side of an AM RLC entity in order to detect loss of RLC PDUs at lower layer, value in frames.
|
||||||
* \param[in] t_status_prohibitP This timer is used by the receiving side of an AM RLC entity in order to prohibit transmission of a STATUS PDU, value in frames.
|
* \param[in] t_status_prohibitP This timer is used by the receiving side of an AM RLC entity in order to prohibit transmission of a STATUS PDU, value in frames.
|
||||||
*/
|
*/
|
||||||
public_rlc_am_init( void rlc_am_configure(rlc_am_entity_t *rlc_pP,
|
public_rlc_am_init( void rlc_am_configure(const protocol_ctxt_t* const ctxtP,
|
||||||
frame_t frameP,
|
rlc_am_entity_t * const rlc_pP,
|
||||||
uint16_t max_retx_thresholdP,
|
const uint16_t max_retx_thresholdP,
|
||||||
uint16_t poll_pduP,
|
const uint16_t poll_pduP,
|
||||||
uint16_t poll_byteP,
|
const uint16_t poll_byteP,
|
||||||
uint32_t t_poll_retransmitP,
|
const uint32_t t_poll_retransmitP,
|
||||||
uint32_t t_reorderingP,
|
const uint32_t t_reorderingP,
|
||||||
uint32_t t_status_prohibitP);)
|
const uint32_t t_status_prohibitP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_set_debug_infos(rlc_am_entity_t *rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP, srb_flag_t srb_flagP, module_id_t enb_module_idP, module_id_t ue_module_idP, rb_id_t rb_idP)
|
/*! \fn void rlc_am_set_debug_infos(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, const srb_flag_t srb_flagP, const rb_id_t rb_idP)
|
||||||
* \brief Set informations that will be displayed in traces, helping the debug process.
|
* \brief Set informations that will be displayed in traces, helping the debug process.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] frame Frame index
|
|
||||||
* \param[in] eNB_flag Flag to indicate eNB (1) or UE (0)
|
|
||||||
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
|
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
|
||||||
* \param[in] enb_module_idP eNB Virtualization variable, module identifier.
|
|
||||||
* \param[in] ue_module_idP UE Virtualization variable, module identifier.
|
|
||||||
* \param[in] rb_idP Radio bearer identifier.
|
* \param[in] rb_idP Radio bearer identifier.
|
||||||
*/
|
*/
|
||||||
public_rlc_am_init( void rlc_am_set_debug_infos(rlc_am_entity_t *rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP, srb_flag_t srb_flagP, module_id_t enb_module_idP, module_id_t ue_module_idP, rb_id_t rb_idP);)
|
public_rlc_am_init( void rlc_am_set_debug_infos(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, const srb_flag_t srb_flagP, const rb_id_t rb_idP);)
|
||||||
/** @} */
|
/** @} */
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -42,20 +42,28 @@
|
|||||||
|
|
||||||
//#define TRACE_RLC_AM_RX_DECODE
|
//#define TRACE_RLC_AM_RX_DECODE
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
inline void rlc_am_clear_rx_sdu (rlc_am_entity_t *rlc_pP)
|
inline void
|
||||||
|
rlc_am_clear_rx_sdu (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t * const rlc_pP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
rlc_pP->output_sdu_size_to_write = 0;
|
rlc_pP->output_sdu_size_to_write = 0;
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_reassembly (uint8_t * src_pP, int32_t lengthP, rlc_am_entity_t *rlc_pP, frame_t frameP)
|
void
|
||||||
|
rlc_am_reassembly (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t * const rlc_pP,
|
||||||
|
uint8_t * src_pP,
|
||||||
|
const int32_t lengthP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][REASSEMBLY PAYLOAD] reassembly() %d bytes\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][REASSEMBLY PAYLOAD] reassembly() %d bytes\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
lengthP);
|
lengthP);
|
||||||
|
|
||||||
@@ -73,17 +81,17 @@ void rlc_am_reassembly (uint8_t * src_pP, int32_t lengthP, rlc_am_entity_t *rlc_
|
|||||||
rlc_pP->output_sdu_size_to_write += lengthP;
|
rlc_pP->output_sdu_size_to_write += lengthP;
|
||||||
} else {
|
} else {
|
||||||
LOG_E(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][REASSEMBLY PAYLOAD] ERROR SDU SIZE OVERFLOW SDU GARBAGED\n",
|
LOG_E(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][REASSEMBLY PAYLOAD] ERROR SDU SIZE OVERFLOW SDU GARBAGED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
|
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
|
||||||
AssertFatal(0, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] RLC_AM_DATA_IND, SDU SIZE OVERFLOW SDU GARBAGED\n",
|
AssertFatal(0, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] RLC_AM_DATA_IND, SDU SIZE OVERFLOW SDU GARBAGED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
#endif
|
#endif
|
||||||
// erase SDU
|
// erase SDU
|
||||||
@@ -91,23 +99,26 @@ void rlc_am_reassembly (uint8_t * src_pP, int32_t lengthP, rlc_am_entity_t *rlc_
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_E(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][REASSEMBLY PAYLOAD] ERROR OUTPUT SDU IS NULL\n",
|
LOG_E(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][REASSEMBLY PAYLOAD] ERROR OUTPUT SDU IS NULL\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
|
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
|
||||||
AssertFatal(0, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] RLC_AM_DATA_IND, SDU DROPPED, OUT OF MEMORY\n",
|
AssertFatal(0, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] RLC_AM_DATA_IND, SDU DROPPED, OUT OF MEMORY\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_send_sdu (rlc_am_entity_t *rlc_pP,frame_t frameP, eNB_flag_t eNB_flagP)
|
void
|
||||||
|
rlc_am_send_sdu (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t * const rlc_pP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
# if defined(TRACE_RLC_UM_PDU)
|
# if defined(TRACE_RLC_UM_PDU)
|
||||||
@@ -119,10 +130,10 @@ void rlc_am_send_sdu (rlc_am_entity_t *rlc_pP,frame_t frameP, eNB_flag_t eNB_fla
|
|||||||
|
|
||||||
if ((rlc_pP->output_sdu_in_construction)) {
|
if ((rlc_pP->output_sdu_in_construction)) {
|
||||||
LOG_D(RLC, "\n\n\n[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND_SDU] %d bytes sdu %p\n",
|
LOG_D(RLC, "\n\n\n[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND_SDU] %d bytes sdu %p\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->output_sdu_size_to_write,
|
rlc_pP->output_sdu_size_to_write,
|
||||||
rlc_pP->output_sdu_in_construction);
|
rlc_pP->output_sdu_in_construction);
|
||||||
@@ -169,26 +180,22 @@ void rlc_am_send_sdu (rlc_am_entity_t *rlc_pP,frame_t frameP, eNB_flag_t eNB_fla
|
|||||||
message_string_size += sprintf(&message_string[message_string_size], " |\n");
|
message_string_size += sprintf(&message_string[message_string_size], " |\n");
|
||||||
|
|
||||||
# if defined(ENABLE_ITTI)
|
# if defined(ENABLE_ITTI)
|
||||||
msg_p = itti_alloc_new_message_sized (rlc_pP->is_enb > 0 ? TASK_RLC_ENB:TASK_RLC_UE ,
|
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag > 0 ? TASK_RLC_ENB:TASK_RLC_UE ,
|
||||||
RLC_AM_SDU_IND,
|
RLC_AM_SDU_IND,
|
||||||
message_string_size + sizeof (IttiMsgText));
|
message_string_size + sizeof (IttiMsgText));
|
||||||
msg_p->ittiMsg.rlc_am_sdu_ind.size = message_string_size;
|
msg_p->ittiMsg.rlc_am_sdu_ind.size = message_string_size;
|
||||||
memcpy(&msg_p->ittiMsg.rlc_am_sdu_ind.text, message_string, message_string_size);
|
memcpy(&msg_p->ittiMsg.rlc_am_sdu_ind.text, message_string, message_string_size);
|
||||||
|
|
||||||
if (rlc_pP->is_enb) {
|
if (ctxt_pP->enb_flag) {
|
||||||
itti_send_msg_to_task(TASK_UNKNOWN, rlc_pP->enb_module_id, msg_p);
|
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->enb_module_id, msg_p);
|
||||||
} else {
|
} else {
|
||||||
itti_send_msg_to_task(TASK_UNKNOWN, rlc_pP->ue_module_id + NB_eNB_INST, msg_p);
|
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->ue_module_id + NB_eNB_INST, msg_p);
|
||||||
}
|
}
|
||||||
# else
|
# else
|
||||||
LOG_T(RLC, "%s", message_string);
|
LOG_T(RLC, "%s", message_string);
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
rlc_data_ind (
|
rlc_data_ind (ctxt_pP,
|
||||||
rlc_pP->enb_module_id,
|
|
||||||
rlc_pP->ue_module_id,
|
|
||||||
frameP,
|
|
||||||
eNB_flagP,
|
|
||||||
BOOL_NOT(rlc_pP->is_data_plane),
|
BOOL_NOT(rlc_pP->is_data_plane),
|
||||||
MBMS_FLAG_NO,
|
MBMS_FLAG_NO,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
@@ -198,19 +205,19 @@ void rlc_am_send_sdu (rlc_am_entity_t *rlc_pP,frame_t frameP, eNB_flag_t eNB_fla
|
|||||||
rlc_pP->output_sdu_in_construction = NULL;
|
rlc_pP->output_sdu_in_construction = NULL;
|
||||||
} else {
|
} else {
|
||||||
LOG_E(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND_SDU] ERROR SIZE <= 0 ... DO NOTHING, SET SDU SIZE TO 0\n",
|
LOG_E(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND_SDU] ERROR SIZE <= 0 ... DO NOTHING, SET SDU SIZE TO 0\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
//msg("[RLC_AM][MOD %d] Freeing mem_block ...\n", rlc_pP->module_id);
|
//msg("[RLC_AM][MOD %d] Freeing mem_block ...\n", rlc_pP->module_id);
|
||||||
//free_mem_block (rlc_pP->output_sdu_in_construction);
|
//free_mem_block (rlc_pP->output_sdu_in_construction);
|
||||||
AssertFatal(3==4,
|
AssertFatal(3==4,
|
||||||
"[FRAME %5u][%s][RLC_AM][MOD %u/%u][%s %u] SEND SDU REQUESTED %d bytes",
|
"[FRAME %5u][%s][RLC_AM][MOD %u/%u][%s %u] SEND SDU REQUESTED %d bytes",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
|
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->output_sdu_size_to_write);
|
rlc_pP->output_sdu_size_to_write);
|
||||||
@@ -219,73 +226,77 @@ void rlc_am_send_sdu (rlc_am_entity_t *rlc_pP,frame_t frameP, eNB_flag_t eNB_fla
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_reassemble_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP, mem_block_t* tb_pP) {
|
void
|
||||||
|
rlc_am_reassemble_pdu(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t * const rlc_pP,
|
||||||
|
mem_block_t * const tb_pP) {
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
int i,j;
|
int i,j;
|
||||||
|
|
||||||
rlc_am_pdu_info_t* pdu_info = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
|
rlc_am_pdu_info_t* pdu_info = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][REASSEMBLY PDU] TRY REASSEMBLY PDU SN=%03d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][REASSEMBLY PDU] TRY REASSEMBLY PDU SN=%03d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
pdu_info->sn);
|
pdu_info->sn);
|
||||||
#ifdef TRACE_RLC_AM_RX_DECODE
|
#ifdef TRACE_RLC_AM_RX_DECODE
|
||||||
rlc_am_display_data_pdu_infos(rlc_pP, frameP, pdu_info);
|
rlc_am_display_data_pdu_infos(ctxt_pP, rlc_pP, pdu_info);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (pdu_info->e == RLC_E_FIXED_PART_DATA_FIELD_FOLLOW) {
|
if (pdu_info->e == RLC_E_FIXED_PART_DATA_FIELD_FOLLOW) {
|
||||||
switch (pdu_info->fi) {
|
switch (pdu_info->fi) {
|
||||||
case RLC_FI_1ST_BYTE_DATA_IS_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_LAST_BYTE_SDU:
|
case RLC_FI_1ST_BYTE_DATA_IS_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_LAST_BYTE_SDU:
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][REASSEMBLY PDU] TRY REASSEMBLY PDU NO E_LI FI=11 (00)\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][REASSEMBLY PDU] TRY REASSEMBLY PDU NO E_LI FI=11 (00)\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
// one complete SDU
|
// one complete SDU
|
||||||
rlc_am_send_sdu(rlc_pP,frameP,eNB_flagP); // may be not necessary
|
rlc_am_send_sdu(ctxt_pP, rlc_pP); // may be not necessary
|
||||||
rlc_am_reassembly (pdu_info->payload, pdu_info->payload_size, rlc_pP,frameP);
|
rlc_am_reassembly (ctxt_pP, rlc_pP, pdu_info->payload, pdu_info->payload_size);
|
||||||
rlc_am_send_sdu(rlc_pP,frameP,eNB_flagP); // may be not necessary
|
rlc_am_send_sdu(ctxt_pP, rlc_pP); // may be not necessary
|
||||||
//rlc_pP->reassembly_missing_sn_detected = 0;
|
//rlc_pP->reassembly_missing_sn_detected = 0;
|
||||||
break;
|
break;
|
||||||
case RLC_FI_1ST_BYTE_DATA_IS_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_NOT_LAST_BYTE_SDU:
|
case RLC_FI_1ST_BYTE_DATA_IS_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_NOT_LAST_BYTE_SDU:
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][REASSEMBLY PDU] TRY REASSEMBLY PDU NO E_LI FI=10 (01)\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][REASSEMBLY PDU] TRY REASSEMBLY PDU NO E_LI FI=10 (01)\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
// one beginning segment of SDU in PDU
|
// one beginning segment of SDU in PDU
|
||||||
rlc_am_send_sdu(rlc_pP,frameP,eNB_flagP); // may be not necessary
|
rlc_am_send_sdu(ctxt_pP, rlc_pP); // may be not necessary
|
||||||
rlc_am_reassembly (pdu_info->payload, pdu_info->payload_size, rlc_pP,frameP);
|
rlc_am_reassembly (ctxt_pP, rlc_pP,pdu_info->payload, pdu_info->payload_size);
|
||||||
//rlc_pP->reassembly_missing_sn_detected = 0;
|
//rlc_pP->reassembly_missing_sn_detected = 0;
|
||||||
break;
|
break;
|
||||||
case RLC_FI_1ST_BYTE_DATA_IS_NOT_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_LAST_BYTE_SDU:
|
case RLC_FI_1ST_BYTE_DATA_IS_NOT_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_LAST_BYTE_SDU:
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][REASSEMBLY PDU] TRY REASSEMBLY PDU NO E_LI FI=01 (10)\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][REASSEMBLY PDU] TRY REASSEMBLY PDU NO E_LI FI=01 (10)\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
// one last segment of SDU
|
// one last segment of SDU
|
||||||
//if (rlc_pP->reassembly_missing_sn_detected == 0) {
|
//if (rlc_pP->reassembly_missing_sn_detected == 0) {
|
||||||
rlc_am_reassembly (pdu_info->payload, pdu_info->payload_size, rlc_pP,frameP);
|
rlc_am_reassembly (ctxt_pP, rlc_pP, pdu_info->payload, pdu_info->payload_size);
|
||||||
rlc_am_send_sdu(rlc_pP,frameP,eNB_flagP);
|
rlc_am_send_sdu(ctxt_pP, rlc_pP);
|
||||||
//} // else { clear sdu already done
|
//} // else { clear sdu already done
|
||||||
//rlc_pP->reassembly_missing_sn_detected = 0;
|
//rlc_pP->reassembly_missing_sn_detected = 0;
|
||||||
break;
|
break;
|
||||||
case RLC_FI_1ST_BYTE_DATA_IS_NOT_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_NOT_LAST_BYTE_SDU:
|
case RLC_FI_1ST_BYTE_DATA_IS_NOT_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_NOT_LAST_BYTE_SDU:
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][REASSEMBLY PDU] TRY REASSEMBLY PDU NO E_LI FI=00 (11)\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][REASSEMBLY PDU] TRY REASSEMBLY PDU NO E_LI FI=00 (11)\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
//if (rlc_pP->reassembly_missing_sn_detected == 0) {
|
//if (rlc_pP->reassembly_missing_sn_detected == 0) {
|
||||||
// one whole segment of SDU in PDU
|
// one whole segment of SDU in PDU
|
||||||
rlc_am_reassembly (pdu_info->payload, pdu_info->payload_size, rlc_pP,frameP);
|
rlc_am_reassembly (ctxt_pP, rlc_pP, pdu_info->payload, pdu_info->payload_size);
|
||||||
//} else {
|
//} else {
|
||||||
// rlc_pP->reassembly_missing_sn_detected = 1; // not necessary but for readability of the code
|
// rlc_pP->reassembly_missing_sn_detected = 1; // not necessary but for readability of the code
|
||||||
//}
|
//}
|
||||||
@@ -300,10 +311,10 @@ void rlc_am_reassemble_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, eNB_flag_t e
|
|||||||
switch (pdu_info->fi) {
|
switch (pdu_info->fi) {
|
||||||
case RLC_FI_1ST_BYTE_DATA_IS_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_LAST_BYTE_SDU:
|
case RLC_FI_1ST_BYTE_DATA_IS_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_LAST_BYTE_SDU:
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][REASSEMBLY PDU] TRY REASSEMBLY PDU FI=11 (00) Li=",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][REASSEMBLY PDU] TRY REASSEMBLY PDU FI=11 (00) Li=",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
for (i=0; i < pdu_info->num_li; i++) {
|
for (i=0; i < pdu_info->num_li; i++) {
|
||||||
LOG_D(RLC, "%d ",pdu_info->li_list[i]);
|
LOG_D(RLC, "%d ",pdu_info->li_list[i]);
|
||||||
@@ -311,26 +322,26 @@ void rlc_am_reassemble_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, eNB_flag_t e
|
|||||||
LOG_D(RLC, "\n");
|
LOG_D(RLC, "\n");
|
||||||
//msg(" remaining size %d\n",size);
|
//msg(" remaining size %d\n",size);
|
||||||
// N complete SDUs
|
// N complete SDUs
|
||||||
rlc_am_send_sdu(rlc_pP,frameP,eNB_flagP);
|
rlc_am_send_sdu(ctxt_pP, rlc_pP);
|
||||||
j = 0;
|
j = 0;
|
||||||
for (i = 0; i < pdu_info->num_li; i++) {
|
for (i = 0; i < pdu_info->num_li; i++) {
|
||||||
rlc_am_reassembly (&pdu_info->payload[j], pdu_info->li_list[i], rlc_pP,frameP);
|
rlc_am_reassembly (ctxt_pP, rlc_pP, &pdu_info->payload[j], pdu_info->li_list[i]);
|
||||||
rlc_am_send_sdu(rlc_pP,frameP,eNB_flagP);
|
rlc_am_send_sdu(ctxt_pP, rlc_pP);
|
||||||
j = j + pdu_info->li_list[i];
|
j = j + pdu_info->li_list[i];
|
||||||
}
|
}
|
||||||
if (pdu_info->hidden_size > 0) { // normally should always be > 0 but just for help debug
|
if (pdu_info->hidden_size > 0) { // normally should always be > 0 but just for help debug
|
||||||
// data is already ok, done by last loop above
|
// data is already ok, done by last loop above
|
||||||
rlc_am_reassembly (&pdu_info->payload[j], pdu_info->hidden_size, rlc_pP,frameP);
|
rlc_am_reassembly (ctxt_pP, rlc_pP, &pdu_info->payload[j], pdu_info->hidden_size);
|
||||||
rlc_am_send_sdu(rlc_pP,frameP,eNB_flagP);
|
rlc_am_send_sdu(ctxt_pP, rlc_pP);
|
||||||
}
|
}
|
||||||
//rlc_pP->reassembly_missing_sn_detected = 0;
|
//rlc_pP->reassembly_missing_sn_detected = 0;
|
||||||
break;
|
break;
|
||||||
case RLC_FI_1ST_BYTE_DATA_IS_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_NOT_LAST_BYTE_SDU:
|
case RLC_FI_1ST_BYTE_DATA_IS_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_NOT_LAST_BYTE_SDU:
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][REASSEMBLY PDU] TRY REASSEMBLY PDU FI=10 (01) Li=",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][REASSEMBLY PDU] TRY REASSEMBLY PDU FI=10 (01) Li=",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
for (i=0; i < pdu_info->num_li; i++) {
|
for (i=0; i < pdu_info->num_li; i++) {
|
||||||
LOG_D(RLC, "%d ",pdu_info->li_list[i]);
|
LOG_D(RLC, "%d ",pdu_info->li_list[i]);
|
||||||
@@ -338,25 +349,25 @@ void rlc_am_reassemble_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, eNB_flag_t e
|
|||||||
LOG_D(RLC, "\n");
|
LOG_D(RLC, "\n");
|
||||||
//msg(" remaining size %d\n",size);
|
//msg(" remaining size %d\n",size);
|
||||||
// N complete SDUs + one segment of SDU in PDU
|
// N complete SDUs + one segment of SDU in PDU
|
||||||
rlc_am_send_sdu(rlc_pP,frameP,eNB_flagP);
|
rlc_am_send_sdu(ctxt_pP, rlc_pP);
|
||||||
j = 0;
|
j = 0;
|
||||||
for (i = 0; i < pdu_info->num_li; i++) {
|
for (i = 0; i < pdu_info->num_li; i++) {
|
||||||
rlc_am_reassembly (&pdu_info->payload[j], pdu_info->li_list[i], rlc_pP,frameP);
|
rlc_am_reassembly (ctxt_pP, rlc_pP, &pdu_info->payload[j], pdu_info->li_list[i]);
|
||||||
rlc_am_send_sdu(rlc_pP,frameP,eNB_flagP);
|
rlc_am_send_sdu(ctxt_pP, rlc_pP);
|
||||||
j = j + pdu_info->li_list[i];
|
j = j + pdu_info->li_list[i];
|
||||||
}
|
}
|
||||||
if (pdu_info->hidden_size > 0) { // normally should always be > 0 but just for help debug
|
if (pdu_info->hidden_size > 0) { // normally should always be > 0 but just for help debug
|
||||||
// data is already ok, done by last loop above
|
// data is already ok, done by last loop above
|
||||||
rlc_am_reassembly (&pdu_info->payload[j], pdu_info->hidden_size, rlc_pP, frameP);
|
rlc_am_reassembly (ctxt_pP, rlc_pP, &pdu_info->payload[j], pdu_info->hidden_size);
|
||||||
}
|
}
|
||||||
//rlc_pP->reassembly_missing_sn_detected = 0;
|
//rlc_pP->reassembly_missing_sn_detected = 0;
|
||||||
break;
|
break;
|
||||||
case RLC_FI_1ST_BYTE_DATA_IS_NOT_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_LAST_BYTE_SDU:
|
case RLC_FI_1ST_BYTE_DATA_IS_NOT_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_LAST_BYTE_SDU:
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][REASSEMBLY PDU] TRY REASSEMBLY PDU FI=01 (10) Li=",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][REASSEMBLY PDU] TRY REASSEMBLY PDU FI=01 (10) Li=",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
for (i=0; i < pdu_info->num_li; i++) {
|
for (i=0; i < pdu_info->num_li; i++) {
|
||||||
LOG_D(RLC, "%d ",pdu_info->li_list[i]);
|
LOG_D(RLC, "%d ",pdu_info->li_list[i]);
|
||||||
@@ -366,23 +377,23 @@ void rlc_am_reassemble_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, eNB_flag_t e
|
|||||||
// one last segment of SDU + N complete SDUs in PDU
|
// one last segment of SDU + N complete SDUs in PDU
|
||||||
j = 0;
|
j = 0;
|
||||||
for (i = 0; i < pdu_info->num_li; i++) {
|
for (i = 0; i < pdu_info->num_li; i++) {
|
||||||
rlc_am_reassembly (&pdu_info->payload[j], pdu_info->li_list[i], rlc_pP,frameP);
|
rlc_am_reassembly (ctxt_pP, rlc_pP, &pdu_info->payload[j], pdu_info->li_list[i]);
|
||||||
rlc_am_send_sdu(rlc_pP,frameP,eNB_flagP);
|
rlc_am_send_sdu(ctxt_pP, rlc_pP);
|
||||||
j = j + pdu_info->li_list[i];
|
j = j + pdu_info->li_list[i];
|
||||||
}
|
}
|
||||||
if (pdu_info->hidden_size > 0) { // normally should always be > 0 but just for help debug
|
if (pdu_info->hidden_size > 0) { // normally should always be > 0 but just for help debug
|
||||||
// data is already ok, done by last loop above
|
// data is already ok, done by last loop above
|
||||||
rlc_am_reassembly (&pdu_info->payload[j], pdu_info->hidden_size, rlc_pP,frameP);
|
rlc_am_reassembly (ctxt_pP, rlc_pP, &pdu_info->payload[j], pdu_info->hidden_size);
|
||||||
rlc_am_send_sdu(rlc_pP,frameP,eNB_flagP);
|
rlc_am_send_sdu(ctxt_pP, rlc_pP);
|
||||||
}
|
}
|
||||||
//rlc_pP->reassembly_missing_sn_detected = 0;
|
//rlc_pP->reassembly_missing_sn_detected = 0;
|
||||||
break;
|
break;
|
||||||
case RLC_FI_1ST_BYTE_DATA_IS_NOT_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_NOT_LAST_BYTE_SDU:
|
case RLC_FI_1ST_BYTE_DATA_IS_NOT_1ST_BYTE_SDU_LAST_BYTE_DATA_IS_NOT_LAST_BYTE_SDU:
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][REASSEMBLY PDU] TRY REASSEMBLY PDU FI=00 (11) Li=",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][REASSEMBLY PDU] TRY REASSEMBLY PDU FI=00 (11) Li=",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
for (i=0; i < pdu_info->num_li; i++) {
|
for (i=0; i < pdu_info->num_li; i++) {
|
||||||
LOG_D(RLC, "%d ",pdu_info->li_list[i]);
|
LOG_D(RLC, "%d ",pdu_info->li_list[i]);
|
||||||
@@ -391,13 +402,13 @@ void rlc_am_reassemble_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, eNB_flag_t e
|
|||||||
//msg(" remaining size %d\n",size);
|
//msg(" remaining size %d\n",size);
|
||||||
j = 0;
|
j = 0;
|
||||||
for (i = 0; i < pdu_info->num_li; i++) {
|
for (i = 0; i < pdu_info->num_li; i++) {
|
||||||
rlc_am_reassembly (&pdu_info->payload[j], pdu_info->li_list[i], rlc_pP,frameP);
|
rlc_am_reassembly (ctxt_pP, rlc_pP, &pdu_info->payload[j], pdu_info->li_list[i]);
|
||||||
rlc_am_send_sdu(rlc_pP,frameP,eNB_flagP);
|
rlc_am_send_sdu(ctxt_pP, rlc_pP);
|
||||||
j = j + pdu_info->li_list[i];
|
j = j + pdu_info->li_list[i];
|
||||||
}
|
}
|
||||||
if (pdu_info->hidden_size > 0) { // normally should always be > 0 but just for help debug
|
if (pdu_info->hidden_size > 0) { // normally should always be > 0 but just for help debug
|
||||||
// data is already ok, done by last loop above
|
// data is already ok, done by last loop above
|
||||||
rlc_am_reassembly (&pdu_info->payload[j], pdu_info->hidden_size, rlc_pP,frameP);
|
rlc_am_reassembly (ctxt_pP, rlc_pP, &pdu_info->payload[j], pdu_info->hidden_size);
|
||||||
} else {
|
} else {
|
||||||
#ifdef USER_MODE
|
#ifdef USER_MODE
|
||||||
//assert (5!=5);
|
//assert (5!=5);
|
||||||
|
|||||||
@@ -56,36 +56,36 @@
|
|||||||
# define public_rlc_am_reassembly(x) extern x
|
# define public_rlc_am_reassembly(x) extern x
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
/*! \fn void rlc_am_clear_rx_sdu (rlc_am_entity_t *rlc_pP)
|
/*! \fn void rlc_am_clear_rx_sdu (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP)
|
||||||
* \brief Reset the data cursor index in the output SDU buffer to zero.
|
* \brief Reset the data cursor index in the output SDU buffer to zero.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
*/
|
*/
|
||||||
private_rlc_am_reassembly( void rlc_am_clear_rx_sdu (rlc_am_entity_t *rlc_pP);)
|
private_rlc_am_reassembly( void rlc_am_clear_rx_sdu (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_reassembly (uint8_t * srcP, int32_t lengthP, rlc_am_entity_t *rlc_pP,frame_t frameP)
|
/*! \fn void rlc_am_reassembly (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pPuint8_t * srcP, int32_t lengthP)
|
||||||
* \brief Concatenate datas at the tail of the output SDU in construction. This SDU in construction will be sent to higher layer.
|
* \brief Concatenate datas at the tail of the output SDU in construction. This SDU in construction will be sent to higher layer.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] srcP Pointer on data to be reassemblied.
|
* \param[in] srcP Pointer on data to be reassemblied.
|
||||||
* \param[in] lengthP Length of data to be reassemblied.
|
* \param[in] lengthP Length of data to be reassemblied.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
*/
|
*/
|
||||||
private_rlc_am_reassembly( void rlc_am_reassembly (uint8_t * srcP, int32_t lengthP, rlc_am_entity_t *rlc_pP,frame_t frameP);)
|
private_rlc_am_reassembly( void rlc_am_reassembly (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, uint8_t * srcP, int32_t lengthP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_send_sdu (rlc_am_entity_t *rlc_pP,frame_t frameP)
|
/*! \fn void rlc_am_send_sdu (rlc_am_entity_t *rlc_pP,frame_t frameP)
|
||||||
* \brief Send the output SDU in construction to higher layer.
|
* \brief Send the output SDU in construction to higher layer.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
*/
|
*/
|
||||||
private_rlc_am_reassembly( void rlc_am_send_sdu (rlc_am_entity_t *rlc_pP,frame_t frameP, eNB_flag_t eNB_flagP);)
|
private_rlc_am_reassembly( void rlc_am_send_sdu (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_reassemble_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, uint8_t eNB_flagP, mem_block_t* tb_pP)
|
/*! \fn void rlc_am_reassemble_pdu(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, const mem_block_t* const tb_pP)
|
||||||
* \brief Reassembly a RLC AM PDU, depending of the content of this PDU, data will be reassemblied to the current output SDU, the current will be sent to higher layers or not, after or before the reassembly, or no send of SDU will be triggered, depending on FI field in PDU header.
|
* \brief Reassembly a RLC AM PDU, depending of the content of this PDU, data will be reassemblied to the current output SDU, the current will be sent to higher layers or not, after or before the reassembly, or no send of SDU will be triggered, depending on FI field in PDU header.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
* \param[in] eNB_flagP Flag to indicate eNB (1) or UE (0).
|
|
||||||
* \param[in] tb_pP RLC AM PDU embedded in a mem_block_t.
|
* \param[in] tb_pP RLC AM PDU embedded in a mem_block_t.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_reassembly( void rlc_am_reassemble_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP, mem_block_t* tb_pP);)
|
protected_rlc_am_reassembly( void rlc_am_reassemble_pdu(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, mem_block_t* const tb_pP);)
|
||||||
/** @} */
|
/** @} */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,12 @@
|
|||||||
//#define DEBUG_RLC_AM_DISPLAY_TB_DATA
|
//#define DEBUG_RLC_AM_DISPLAY_TB_DATA
|
||||||
//#define RLC_AM_GENERATE_ERRORS
|
//#define RLC_AM_GENERATE_ERRORS
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
signed int rlc_am_get_data_pdu_infos(const const frame_t frameP, rlc_am_pdu_sn_10_t* header_pP, int16_t total_sizeP, rlc_am_pdu_info_t* pdu_info_pP)
|
signed int
|
||||||
|
rlc_am_get_data_pdu_infos(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_pdu_sn_10_t* header_pP,
|
||||||
|
int16_t total_sizeP,
|
||||||
|
rlc_am_pdu_info_t* pdu_info_pP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
memset(pdu_info_pP, 0, sizeof (rlc_am_pdu_info_t));
|
memset(pdu_info_pP, 0, sizeof (rlc_am_pdu_info_t));
|
||||||
@@ -97,7 +102,7 @@ signed int rlc_am_get_data_pdu_infos(const const frame_t frameP, rlc_am_pdu_sn_1
|
|||||||
pdu_info_pP->num_li = pdu_info_pP->num_li + 1;
|
pdu_info_pP->num_li = pdu_info_pP->num_li + 1;
|
||||||
if (pdu_info_pP->num_li > RLC_AM_MAX_SDU_IN_PDU) {
|
if (pdu_info_pP->num_li > RLC_AM_MAX_SDU_IN_PDU) {
|
||||||
LOG_E(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][GET PDU INFO] SN %04d TOO MANY LIs ",
|
LOG_E(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][GET PDU INFO] SN %04d TOO MANY LIs ",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
pdu_info_pP->sn);
|
pdu_info_pP->sn);
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
@@ -115,13 +120,17 @@ signed int rlc_am_get_data_pdu_infos(const const frame_t frameP, rlc_am_pdu_sn_1
|
|||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
LOG_W(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][GET DATA PDU INFO] SN %04d ERROR CONTROL PDU ",
|
LOG_W(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][GET DATA PDU INFO] SN %04d ERROR CONTROL PDU ",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
pdu_info_pP->sn);
|
pdu_info_pP->sn);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_display_data_pdu_infos(rlc_am_entity_t * const rlc_pP, const const frame_t frameP, rlc_am_pdu_info_t* pdu_info_pP)
|
void
|
||||||
|
rlc_am_display_data_pdu_infos(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t * const rlc_pP,
|
||||||
|
rlc_am_pdu_info_t* pdu_info_pP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
int num_li;
|
int num_li;
|
||||||
@@ -129,10 +138,10 @@ void rlc_am_display_data_pdu_infos(rlc_am_entity_t * const rlc_pP, const const f
|
|||||||
if (pdu_info_pP->d_c) {
|
if (pdu_info_pP->d_c) {
|
||||||
if (pdu_info_pP->rf) {
|
if (pdu_info_pP->rf) {
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][DISPLAY DATA PDU] RX DATA PDU SN %04d FI %1d SO %05d LSF %01d POLL %1d ",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][DISPLAY DATA PDU] RX DATA PDU SN %04d FI %1d SO %05d LSF %01d POLL %1d ",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
pdu_info_pP->sn,
|
pdu_info_pP->sn,
|
||||||
pdu_info_pP->fi,
|
pdu_info_pP->fi,
|
||||||
@@ -140,10 +149,10 @@ void rlc_am_display_data_pdu_infos(rlc_am_entity_t * const rlc_pP, const const f
|
|||||||
pdu_info_pP->lsf, pdu_info_pP->p);
|
pdu_info_pP->lsf, pdu_info_pP->p);
|
||||||
} else {
|
} else {
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][DISPLAY DATA PDU] RX DATA PDU SN %04d FI %1d POLL %1d ",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][DISPLAY DATA PDU] RX DATA PDU SN %04d FI %1d POLL %1d ",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
pdu_info_pP->sn,
|
pdu_info_pP->sn,
|
||||||
pdu_info_pP->fi,
|
pdu_info_pP->fi,
|
||||||
@@ -158,16 +167,20 @@ void rlc_am_display_data_pdu_infos(rlc_am_entity_t * const rlc_pP, const const f
|
|||||||
LOG_D(RLC, "\n");
|
LOG_D(RLC, "\n");
|
||||||
} else {
|
} else {
|
||||||
LOG_E(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][DISPLAY DATA PDU] ERROR RX CONTROL PDU\n",
|
LOG_E(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][DISPLAY DATA PDU] ERROR RX CONTROL PDU\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// assumed the sn of the tb_p is equal to VR(MS)
|
// assumed the sn of the tb_p is equal to VR(MS)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_rx_update_vr_ms(rlc_am_entity_t * const rlc_pP, const const frame_t frameP, mem_block_t* tb_pP)
|
void
|
||||||
|
rlc_am_rx_update_vr_ms(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t * const rlc_pP,
|
||||||
|
mem_block_t* tb_pP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
//rlc_am_pdu_info_t* pdu_info_p = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
|
//rlc_am_pdu_info_t* pdu_info_p = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
|
||||||
@@ -181,10 +194,10 @@ void rlc_am_rx_update_vr_ms(rlc_am_entity_t * const rlc_pP, const const frame_t
|
|||||||
if (((rlc_am_rx_pdu_management_t*)(cursor_p->data))->all_segments_received == 0) {
|
if (((rlc_am_rx_pdu_management_t*)(cursor_p->data))->all_segments_received == 0) {
|
||||||
#ifdef TRACE_RLC_AM_RX
|
#ifdef TRACE_RLC_AM_RX
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][UPDATE VR(MS)] UPDATED VR(MS) %04d -> %04d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][UPDATE VR(MS)] UPDATED VR(MS) %04d -> %04d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->vr_ms, pdu_info_cursor_p->sn);
|
rlc_pP->vr_ms, pdu_info_cursor_p->sn);
|
||||||
#endif
|
#endif
|
||||||
@@ -195,10 +208,10 @@ void rlc_am_rx_update_vr_ms(rlc_am_entity_t * const rlc_pP, const const frame_t
|
|||||||
} while (cursor_p != NULL);
|
} while (cursor_p != NULL);
|
||||||
#ifdef TRACE_RLC_AM_RX
|
#ifdef TRACE_RLC_AM_RX
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][UPDATE VR(MS)] UPDATED VR(MS) %04d -> %04d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][UPDATE VR(MS)] UPDATED VR(MS) %04d -> %04d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->vr_ms,
|
rlc_pP->vr_ms,
|
||||||
(pdu_info_cursor_p->sn + 1) & RLC_AM_SN_MASK);
|
(pdu_info_cursor_p->sn + 1) & RLC_AM_SN_MASK);
|
||||||
@@ -208,7 +221,11 @@ void rlc_am_rx_update_vr_ms(rlc_am_entity_t * const rlc_pP, const const frame_t
|
|||||||
}
|
}
|
||||||
// assumed the sn of the tb_p is equal to VR(R)
|
// assumed the sn of the tb_p is equal to VR(R)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_rx_update_vr_r(rlc_am_entity_t * const rlc_pP,const const frame_t frameP,mem_block_t* tb_pP)
|
void
|
||||||
|
rlc_am_rx_update_vr_r(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t * const rlc_pP,
|
||||||
|
mem_block_t* tb_pP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
rlc_am_pdu_info_t* pdu_info_cursor_p = NULL;
|
rlc_am_pdu_info_t* pdu_info_cursor_p = NULL;
|
||||||
@@ -224,10 +241,10 @@ void rlc_am_rx_update_vr_r(rlc_am_entity_t * const rlc_pP,const const frame_t fr
|
|||||||
}
|
}
|
||||||
#ifdef TRACE_RLC_AM_RX
|
#ifdef TRACE_RLC_AM_RX
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][UPDATE VR(R)] UPDATED VR(R) %04d -> %04d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][UPDATE VR(R)] UPDATED VR(R) %04d -> %04d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->vr_r,
|
rlc_pP->vr_r,
|
||||||
(pdu_info_cursor_p->sn + 1) & RLC_AM_SN_MASK);
|
(pdu_info_cursor_p->sn + 1) & RLC_AM_SN_MASK);
|
||||||
@@ -246,7 +263,10 @@ void rlc_am_rx_update_vr_r(rlc_am_entity_t * const rlc_pP,const const frame_t fr
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rlc_am_receive_routing (rlc_am_entity_t * const rlc_pP, const const frame_t frameP, const eNB_flag_t eNB_flagP, struct mac_data_ind data_indP)
|
rlc_am_receive_routing (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t * const rlc_pP,
|
||||||
|
struct mac_data_ind data_indP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
mem_block_t *tb_p = NULL;
|
mem_block_t *tb_p = NULL;
|
||||||
@@ -261,21 +281,21 @@ rlc_am_receive_routing (rlc_am_entity_t * const rlc_pP, const const frame_t fram
|
|||||||
if ((*first_byte_p & 0x80) == 0x80) {
|
if ((*first_byte_p & 0x80) == 0x80) {
|
||||||
rlc_pP->stat_rx_data_bytes += tb_size_in_bytes;
|
rlc_pP->stat_rx_data_bytes += tb_size_in_bytes;
|
||||||
rlc_pP->stat_rx_data_pdu += 1;
|
rlc_pP->stat_rx_data_pdu += 1;
|
||||||
rlc_am_receive_process_data_pdu (rlc_pP, frameP, eNB_flagP, tb_p, first_byte_p, tb_size_in_bytes);
|
rlc_am_receive_process_data_pdu (ctxt_pP, rlc_pP, tb_p, first_byte_p, tb_size_in_bytes);
|
||||||
} else {
|
} else {
|
||||||
rlc_pP->stat_rx_control_bytes += tb_size_in_bytes;
|
rlc_pP->stat_rx_control_bytes += tb_size_in_bytes;
|
||||||
rlc_pP->stat_rx_control_pdu += 1;
|
rlc_pP->stat_rx_control_pdu += 1;
|
||||||
rlc_am_receive_process_control_pdu (rlc_pP, frameP, tb_p, &first_byte_p, &tb_size_in_bytes);
|
rlc_am_receive_process_control_pdu (ctxt_pP, rlc_pP, tb_p, &first_byte_p, &tb_size_in_bytes);
|
||||||
// Test if remaining bytes not processed (up to know, highest probability is bug in MAC)
|
// Test if remaining bytes not processed (up to know, highest probability is bug in MAC)
|
||||||
AssertFatal( tb_size_in_bytes == 0,
|
AssertFatal( tb_size_in_bytes == 0,
|
||||||
"Remaining %d bytes following a control PDU",
|
"Remaining %d bytes following a control PDU",
|
||||||
tb_size_in_bytes);
|
tb_size_in_bytes);
|
||||||
}
|
}
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RX ROUTING] VR(R)=%03d VR(MR)=%03d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RX ROUTING] VR(R)=%03d VR(MR)=%03d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->vr_r,
|
rlc_pP->vr_r,
|
||||||
rlc_pP->vr_mr);
|
rlc_pP->vr_mr);
|
||||||
@@ -283,7 +303,13 @@ rlc_am_receive_routing (rlc_am_entity_t * const rlc_pP, const const frame_t fram
|
|||||||
} // end while
|
} // end while
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_receive_process_data_pdu (rlc_am_entity_t * const rlc_pP, const const frame_t frameP, const eNB_flag_t eNB_flagP, mem_block_t* tb_pP, uint8_t* first_byte_pP, uint16_t tb_size_in_bytesP)
|
void
|
||||||
|
rlc_am_receive_process_data_pdu (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t * const rlc_pP,
|
||||||
|
mem_block_t* tb_pP,
|
||||||
|
uint8_t* first_byte_pP,
|
||||||
|
uint16_t tb_size_in_bytesP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
// 5.1.3.2 Receive operations
|
// 5.1.3.2 Receive operations
|
||||||
@@ -315,25 +341,25 @@ void rlc_am_receive_process_data_pdu (rlc_am_entity_t * const rlc_pP, const cons
|
|||||||
rlc_am_pdu_info_t* pdu_info_p = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
|
rlc_am_pdu_info_t* pdu_info_p = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
|
||||||
rlc_am_pdu_sn_10_t* rlc_am_pdu_sn_10_p = (rlc_am_pdu_sn_10_t*)first_byte_pP;
|
rlc_am_pdu_sn_10_t* rlc_am_pdu_sn_10_p = (rlc_am_pdu_sn_10_t*)first_byte_pP;
|
||||||
|
|
||||||
if (rlc_am_get_data_pdu_infos(frameP,rlc_am_pdu_sn_10_p, tb_size_in_bytesP, pdu_info_p) >= 0) {
|
if (rlc_am_get_data_pdu_infos(ctxt_pP,rlc_am_pdu_sn_10_p, tb_size_in_bytesP, pdu_info_p) >= 0) {
|
||||||
|
|
||||||
((rlc_am_rx_pdu_management_t*)(tb_pP->data))->all_segments_received = 0;
|
((rlc_am_rx_pdu_management_t*)(tb_pP->data))->all_segments_received = 0;
|
||||||
if (rlc_am_in_rx_window(rlc_pP, pdu_info_p->sn)) {
|
if (rlc_am_in_rx_window(ctxt_pP, rlc_pP, pdu_info_p->sn)) {
|
||||||
|
|
||||||
if (pdu_info_p->p) {
|
if (pdu_info_p->p) {
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][PROCESS RX PDU] POLL BIT SET, STATUS REQUESTED:\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][PROCESS RX PDU] POLL BIT SET, STATUS REQUESTED:\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
rlc_pP->status_requested = 1;
|
rlc_pP->status_requested = 1;
|
||||||
}
|
}
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][PROCESS RX PDU] VR(R) %04d VR(H) %04d VR(MR) %04d VR(MS) %04d VR(X) %04d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][PROCESS RX PDU] VR(R) %04d VR(H) %04d VR(MR) %04d VR(MS) %04d VR(X) %04d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->vr_r,
|
rlc_pP->vr_r,
|
||||||
rlc_pP->vr_h,
|
rlc_pP->vr_h,
|
||||||
@@ -341,24 +367,24 @@ void rlc_am_receive_process_data_pdu (rlc_am_entity_t * const rlc_pP, const cons
|
|||||||
rlc_pP->vr_ms,
|
rlc_pP->vr_ms,
|
||||||
rlc_pP->vr_x);
|
rlc_pP->vr_x);
|
||||||
|
|
||||||
if (rlc_am_rx_list_insert_pdu(rlc_pP, frameP,tb_pP) < 0) {
|
if (rlc_am_rx_list_insert_pdu(ctxt_pP, rlc_pP,tb_pP) < 0) {
|
||||||
rlc_pP->stat_rx_data_pdu_dropped += 1;
|
rlc_pP->stat_rx_data_pdu_dropped += 1;
|
||||||
rlc_pP->stat_rx_data_bytes_dropped += tb_size_in_bytesP;
|
rlc_pP->stat_rx_data_bytes_dropped += tb_size_in_bytesP;
|
||||||
free_mem_block (tb_pP);
|
free_mem_block (tb_pP);
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][PROCESS RX PDU] PDU DISCARDED, STATUS REQUESTED:\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][PROCESS RX PDU] PDU DISCARDED, STATUS REQUESTED:\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
rlc_pP->status_requested = 1;
|
rlc_pP->status_requested = 1;
|
||||||
#if defined(RLC_STOP_ON_LOST_PDU)
|
#if defined(RLC_STOP_ON_LOST_PDU)
|
||||||
AssertFatal( 0 == 1,
|
AssertFatal( 0 == 1,
|
||||||
"[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] LOST PDU DETECTED\n",
|
"[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] LOST PDU DETECTED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
@@ -396,45 +422,45 @@ void rlc_am_receive_process_data_pdu (rlc_am_entity_t * const rlc_pP, const cons
|
|||||||
|
|
||||||
#ifdef TRACE_RLC_AM_RX
|
#ifdef TRACE_RLC_AM_RX
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][PROCESS RX PDU] RX LIST AFTER INSERTION:\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][PROCESS RX PDU] RX LIST AFTER INSERTION:\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
rlc_am_rx_list_display(rlc_pP, "rlc_am_receive_process_data_pdu AFTER INSERTION ");
|
rlc_am_rx_list_display(rlc_pP, "rlc_am_receive_process_data_pdu AFTER INSERTION ");
|
||||||
#endif
|
#endif
|
||||||
if (rlc_am_sn_gte_vr_h(rlc_pP, pdu_info_p->sn) > 0) {
|
if (rlc_am_sn_gte_vr_h(ctxt_pP, rlc_pP, pdu_info_p->sn) > 0) {
|
||||||
rlc_pP->vr_h = (pdu_info_p->sn + 1) & RLC_AM_SN_MASK;
|
rlc_pP->vr_h = (pdu_info_p->sn + 1) & RLC_AM_SN_MASK;
|
||||||
}
|
}
|
||||||
rlc_am_rx_check_all_byte_segments(rlc_pP, frameP, tb_pP);
|
rlc_am_rx_check_all_byte_segments(ctxt_pP, rlc_pP, tb_pP);
|
||||||
if ((pdu_info_p->sn == rlc_pP->vr_ms) && (((rlc_am_rx_pdu_management_t*)(tb_pP->data))->all_segments_received)) {
|
if ((pdu_info_p->sn == rlc_pP->vr_ms) && (((rlc_am_rx_pdu_management_t*)(tb_pP->data))->all_segments_received)) {
|
||||||
rlc_am_rx_update_vr_ms(rlc_pP, frameP, tb_pP);
|
rlc_am_rx_update_vr_ms(ctxt_pP, rlc_pP, tb_pP);
|
||||||
}
|
}
|
||||||
if (pdu_info_p->sn == rlc_pP->vr_r) {
|
if (pdu_info_p->sn == rlc_pP->vr_r) {
|
||||||
if (((rlc_am_rx_pdu_management_t*)(tb_pP->data))->all_segments_received) {
|
if (((rlc_am_rx_pdu_management_t*)(tb_pP->data))->all_segments_received) {
|
||||||
rlc_am_rx_update_vr_r(rlc_pP, frameP, tb_pP);
|
rlc_am_rx_update_vr_r(ctxt_pP, rlc_pP, tb_pP);
|
||||||
rlc_pP->vr_mr = (rlc_pP->vr_r + RLC_AM_WINDOW_SIZE) & RLC_AM_SN_MASK;
|
rlc_pP->vr_mr = (rlc_pP->vr_r + RLC_AM_WINDOW_SIZE) & RLC_AM_SN_MASK;
|
||||||
}
|
}
|
||||||
rlc_am_rx_list_reassemble_rlc_sdus(rlc_pP,frameP,eNB_flagP);
|
rlc_am_rx_list_reassemble_rlc_sdus(ctxt_pP, rlc_pP);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rlc_pP->t_reordering.running) {
|
if (rlc_pP->t_reordering.running) {
|
||||||
if ((rlc_pP->vr_x == rlc_pP->vr_r) || ((rlc_am_in_rx_window(rlc_pP, pdu_info_p->sn) == 0) && (rlc_pP->vr_x != rlc_pP->vr_mr))) {
|
if ((rlc_pP->vr_x == rlc_pP->vr_r) || ((rlc_am_in_rx_window(ctxt_pP, rlc_pP, pdu_info_p->sn) == 0) && (rlc_pP->vr_x != rlc_pP->vr_mr))) {
|
||||||
rlc_am_stop_and_reset_timer_reordering(rlc_pP,frameP);
|
rlc_am_stop_and_reset_timer_reordering(ctxt_pP, rlc_pP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!(rlc_pP->t_reordering.running)) {
|
if (!(rlc_pP->t_reordering.running)) {
|
||||||
if (rlc_pP->vr_h != rlc_pP->vr_r) { // - if VR (H) > VR(R) translated to - if VR (H) != VR(R)
|
if (rlc_pP->vr_h != rlc_pP->vr_r) { // - if VR (H) > VR(R) translated to - if VR (H) != VR(R)
|
||||||
rlc_am_start_timer_reordering(rlc_pP,frameP);
|
rlc_am_start_timer_reordering(ctxt_pP, rlc_pP);
|
||||||
rlc_pP->vr_x = rlc_pP->vr_h;
|
rlc_pP->vr_x = rlc_pP->vr_h;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][PROCESS RX PDU] VR(R) %04d VR(H) %04d VR(MS) %04d VR(MR) %04d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][PROCESS RX PDU] VR(R) %04d VR(H) %04d VR(MS) %04d VR(MR) %04d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->vr_r,
|
rlc_pP->vr_r,
|
||||||
rlc_pP->vr_h,
|
rlc_pP->vr_h,
|
||||||
@@ -445,10 +471,10 @@ void rlc_am_receive_process_data_pdu (rlc_am_entity_t * const rlc_pP, const cons
|
|||||||
rlc_pP->stat_rx_data_bytes_out_of_window += tb_size_in_bytesP;
|
rlc_pP->stat_rx_data_bytes_out_of_window += tb_size_in_bytesP;
|
||||||
free_mem_block (tb_pP);
|
free_mem_block (tb_pP);
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][PROCESS RX PDU] PDU OUT OF RX WINDOW, DISCARDED, STATUS REQUESTED:\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][PROCESS RX PDU] PDU OUT OF RX WINDOW, DISCARDED, STATUS REQUESTED:\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
rlc_pP->status_requested = 1;
|
rlc_pP->status_requested = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,60 +56,58 @@
|
|||||||
# define public_rlc_am_receiver(x) extern x
|
# define public_rlc_am_receiver(x) extern x
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
/*! \fn signed int rlc_am_get_data_pdu_infos(const frame_t frameP, rlc_am_pdu_sn_10_t* headerP, int16_t sizeP, rlc_am_pdu_info_t* pdu_infoP)
|
/*! \fn signed int rlc_am_get_data_pdu_infos( const protocol_ctxt_t* const ctxt_pP, rlc_am_pdu_sn_10_t* headerP, int16_t sizeP, rlc_am_pdu_info_t* pdu_infoP)
|
||||||
* \brief Extract PDU informations (header fields, data size, etc) from the serialized PDU.
|
* \brief Extract PDU informations (header fields, data size, etc) from the serialized PDU.
|
||||||
* \param[in] frame Frame index.
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] headerP RLC AM header PDU pointer.
|
* \param[in] headerP RLC AM header PDU pointer.
|
||||||
* \param[in] sizeP Size of RLC AM PDU.
|
* \param[in] sizeP Size of RLC AM PDU.
|
||||||
* \param[in] pdu_infoP Structure containing extracted informations from PDU.
|
* \param[in] pdu_infoP Structure containing extracted informations from PDU.
|
||||||
* \return 0 if no error was encountered during the parsing of the PDU, else -1;
|
* \return 0 if no error was encountered during the parsing of the PDU, else -1;
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_receiver( signed int rlc_am_get_data_pdu_infos(const frame_t frameP, rlc_am_pdu_sn_10_t* headerP, int16_t sizeP, rlc_am_pdu_info_t* pdu_infoP));
|
protected_rlc_am_receiver( signed int rlc_am_get_data_pdu_infos(const protocol_ctxt_t* const ctxt_pP, rlc_am_pdu_sn_10_t* headerP, int16_t sizeP, rlc_am_pdu_info_t* pdu_infoP));
|
||||||
|
|
||||||
/*! \fn void rlc_am_display_data_pdu_infos(rlc_am_entity_t * const rlc_pP, const frame_t frameP, rlc_am_pdu_info_t* pdu_infoP)
|
/*! \fn void rlc_am_display_data_pdu_infos(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, rlc_am_pdu_info_t* pdu_infoP)
|
||||||
* \brief Display RLC AM PDU informations.
|
* \brief Display RLC AM PDU informations.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] frame Frame index.
|
|
||||||
* \param[in] pdu_infoP Structure containing extracted informations of a PDU.
|
* \param[in] pdu_infoP Structure containing extracted informations of a PDU.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_receiver( void rlc_am_display_data_pdu_infos(rlc_am_entity_t * const rlc_pP, const frame_t frameP, rlc_am_pdu_info_t* pdu_infoP);)
|
protected_rlc_am_receiver( void rlc_am_display_data_pdu_infos(const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t * const rlc_pP, rlc_am_pdu_info_t* pdu_infoP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_rx_update_vr_ms(rlc_am_entity_t * const rlc_pP,mem_block_t* tb_pP)
|
/*! \fn void rlc_am_rx_update_vr_ms(const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t * const rlc_pP,mem_block_t* tb_pP)
|
||||||
* \brief Update RLC AM protocol variable VR(MS).
|
* \brief Update RLC AM protocol variable VR(MS).
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] frame Frame index.
|
|
||||||
* \param[in] tb_pP PDU embedded in a mem_block_t struct.
|
* \param[in] tb_pP PDU embedded in a mem_block_t struct.
|
||||||
* \note It is assumed that the sequence number of the transport block is equal to VR(MS)
|
* \note It is assumed that the sequence number of the transport block is equal to VR(MS)
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_receiver( void rlc_am_rx_update_vr_ms(rlc_am_entity_t * const rlc_pP,const frame_t frameP, mem_block_t* tb_pP);)
|
protected_rlc_am_receiver( void rlc_am_rx_update_vr_ms(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, mem_block_t* tb_pP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_rx_update_vr_r (rlc_am_entity_t * const rlc_pP,const frame_t frameP,mem_block_t* tb_pP)
|
/*! \fn void rlc_am_rx_update_vr_r (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP,mem_block_t* tb_pP)
|
||||||
* \brief Update RLC AM protocol variable VR(R).
|
* \brief Update RLC AM protocol variable VR(R).
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] frame Frame index.
|
|
||||||
* \param[in] tb_pP PDU embedded in a mem_block_t struct.
|
* \param[in] tb_pP PDU embedded in a mem_block_t struct.
|
||||||
* \note It is assumed that the sequence number of the transport block is equal to VR(R)
|
* \note It is assumed that the sequence number of the transport block is equal to VR(R)
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_receiver( void rlc_am_rx_update_vr_r (rlc_am_entity_t * const rlc_pP,const frame_t frameP, mem_block_t* tb_pP);)
|
protected_rlc_am_receiver( void rlc_am_rx_update_vr_r (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, mem_block_t* tb_pP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_receive_routing (rlc_am_entity_t * const rlc_pP, const frame_t frameP, uint8_t eNB_flagP, struct mac_data_ind data_indP)
|
/*! \fn void rlc_am_receive_routing (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, struct mac_data_ind data_indP)
|
||||||
* \brief Convert transport blocks received from MAC layer into RLC AM PDUs, and dispatch to the right processing block these PDUS upon their type (CONTROL/DATA).
|
* \brief Convert transport blocks received from MAC layer into RLC AM PDUs, and dispatch to the right processing block these PDUS upon their type (CONTROL/DATA).
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] frame Frame index.
|
|
||||||
* \param[in] eNB_flagP Flag to indicate eNB (1) or UE (0).
|
|
||||||
* \param[in] data_indP Transport blocks received from MAC layer.
|
* \param[in] data_indP Transport blocks received from MAC layer.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_receiver( void rlc_am_receive_routing (rlc_am_entity_t * const rlc_pP, const frame_t frameP, const eNB_flag_t eNB_flagP, struct mac_data_ind data_indP));
|
protected_rlc_am_receiver( void rlc_am_receive_routing (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, struct mac_data_ind data_indP));
|
||||||
|
|
||||||
/*! \fn void rlc_am_receive_process_data_pdu (rlc_am_entity_t * const rlc_pP, const frame_t frameP, uint8_t eNB_flagP, mem_block_t* tb_pP, uint8_t* first_byteP, uint16_t tb_size_in_bytesP)
|
/*! \fn void rlc_am_receive_process_data_pdu (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, mem_block_t* tb_pP, uint8_t* first_byteP, uint16_t tb_size_in_bytesP)
|
||||||
* \brief Process an incoming data PDU received from MAC layer.
|
* \brief Process an incoming data PDU received from MAC layer.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] frame Frame index.
|
|
||||||
* \param[in] eNB_flagP Flag to indicate eNB (1) or UE (0).
|
|
||||||
* \param[in] tb_pP PDU embedded in a mem_block_t struct.
|
* \param[in] tb_pP PDU embedded in a mem_block_t struct.
|
||||||
* \param[in] first_byteP Pointer on first byte of the PDU.
|
* \param[in] first_byteP Pointer on first byte of the PDU.
|
||||||
* \param[in] tb_size_in_bytesP Transport block size in bytes (same as PDU size in bytes).
|
* \param[in] tb_size_in_bytesP Transport block size in bytes (same as PDU size in bytes).
|
||||||
*/
|
*/
|
||||||
private_rlc_am_receiver( void rlc_am_receive_process_data_pdu (rlc_am_entity_t * const rlc_pP, const frame_t frameP, const eNB_flag_t eNB_flagP, mem_block_t* tb_pP, uint8_t* first_byteP, uint16_t tb_size_in_bytesP));
|
private_rlc_am_receiver( void rlc_am_receive_process_data_pdu (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlc_pP, mem_block_t* tb_pP, uint8_t* first_byteP, uint16_t tb_size_in_bytesP));
|
||||||
/** @} */
|
/** @} */
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
@@ -41,8 +41,8 @@
|
|||||||
//#define TRACE_RLC_AM_ACK
|
//#define TRACE_RLC_AM_ACK
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_nack_pdu (
|
void rlc_am_nack_pdu (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_entity_t *const rlc_pP,
|
||||||
const frame_t frameP,
|
|
||||||
const rlc_sn_t snP,
|
const rlc_sn_t snP,
|
||||||
const sdu_size_t so_startP,
|
const sdu_size_t so_startP,
|
||||||
const sdu_size_t so_endP)
|
const sdu_size_t so_endP)
|
||||||
@@ -74,25 +74,25 @@ void rlc_am_nack_pdu (
|
|||||||
// increasing order among calls refering to only one status PDU
|
// increasing order among calls refering to only one status PDU
|
||||||
// and among time
|
// and among time
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
if (rlc_pP->pdu_retrans_buffer[snP].last_nack_time != frameP) {
|
if (rlc_pP->pdu_retrans_buffer[snP].last_nack_time != ctxt_pP->frame) {
|
||||||
rlc_pP->pdu_retrans_buffer[snP].last_nack_time = frameP;
|
rlc_pP->pdu_retrans_buffer[snP].last_nack_time = ctxt_pP->frame;
|
||||||
rlc_am_clear_holes(rlc_pP, snP);
|
rlc_am_clear_holes(ctxt_pP, rlc_pP, snP);
|
||||||
}
|
}
|
||||||
if (!((so_startP == 0) && (so_endP == 0x7FFF))) {
|
if (!((so_startP == 0) && (so_endP == 0x7FFF))) {
|
||||||
rlc_pP->num_nack_so += 1;
|
rlc_pP->num_nack_so += 1;
|
||||||
}
|
}
|
||||||
rlc_am_add_hole(rlc_pP, frameP, snP, so_startP, so_endP);
|
rlc_am_add_hole(ctxt_pP, rlc_pP, snP, so_startP, so_endP);
|
||||||
|
|
||||||
if (rlc_pP->first_retrans_pdu_sn < 0) {
|
if (rlc_pP->first_retrans_pdu_sn < 0) {
|
||||||
rlc_pP->first_retrans_pdu_sn = snP;
|
rlc_pP->first_retrans_pdu_sn = snP;
|
||||||
} else if (rlc_am_tx_sn1_gt_sn2(rlc_pP, rlc_pP->first_retrans_pdu_sn, snP)){
|
} else if (rlc_am_tx_sn1_gt_sn2(ctxt_pP, rlc_pP, rlc_pP->first_retrans_pdu_sn, snP)){
|
||||||
rlc_pP->first_retrans_pdu_sn = snP;
|
rlc_pP->first_retrans_pdu_sn = snP;
|
||||||
}
|
}
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][NACK-PDU] NACK PDU SN %04d previous retx_count %d 1ST_RETRANS_PDU %04d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][NACK-PDU] NACK PDU SN %04d previous retx_count %d 1ST_RETRANS_PDU %04d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
snP,
|
snP,
|
||||||
rlc_pP->pdu_retrans_buffer[snP].retx_count,
|
rlc_pP->pdu_retrans_buffer[snP].retx_count,
|
||||||
@@ -116,20 +116,20 @@ void rlc_am_nack_pdu (
|
|||||||
#ifdef TEST_RLC_AM
|
#ifdef TEST_RLC_AM
|
||||||
rlc_am_v9_3_0_test_data_conf (rlc_pP->module_id, rlc_pP->rb_id, rlc_pP->input_sdus[sdu_index].mui, RLC_SDU_CONFIRM_NO);
|
rlc_am_v9_3_0_test_data_conf (rlc_pP->module_id, rlc_pP->rb_id, rlc_pP->input_sdus[sdu_index].mui, RLC_SDU_CONFIRM_NO);
|
||||||
#else
|
#else
|
||||||
rlc_data_conf(rlc_pP->enb_module_id, rlc_pP->ue_module_id, frameP, rlc_pP->is_enb, rlc_pP->rb_id, rlc_pP->input_sdus[sdu_index].mui, RLC_SDU_CONFIRM_NO, rlc_pP->is_data_plane);
|
rlc_data_conf(ctxt_pP, rlc_pP->rb_id, rlc_pP->input_sdus[sdu_index].mui, RLC_SDU_CONFIRM_NO, rlc_pP->is_data_plane);
|
||||||
#endif
|
#endif
|
||||||
rlc_pP->stat_tx_pdcp_sdu_discarded += 1;
|
rlc_pP->stat_tx_pdcp_sdu_discarded += 1;
|
||||||
rlc_pP->stat_tx_pdcp_bytes_discarded += rlc_pP->input_sdus[sdu_index].sdu_size;
|
rlc_pP->stat_tx_pdcp_bytes_discarded += rlc_pP->input_sdus[sdu_index].sdu_size;
|
||||||
rlc_am_free_in_sdu(rlc_pP, frameP, sdu_index);
|
rlc_am_free_in_sdu(ctxt_pP, rlc_pP, sdu_index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][NACK-PDU] ERROR NACK MISSING PDU SN %05d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][NACK-PDU] ERROR NACK MISSING PDU SN %05d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
snP);
|
snP);
|
||||||
//assert(2==3);
|
//assert(2==3);
|
||||||
@@ -137,8 +137,8 @@ void rlc_am_nack_pdu (
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_ack_pdu (
|
void rlc_am_ack_pdu (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_entity_t *const rlc_pP,
|
||||||
const frame_t frameP,
|
|
||||||
const rlc_sn_t snP)
|
const rlc_sn_t snP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
@@ -153,10 +153,10 @@ void rlc_am_ack_pdu (
|
|||||||
free_mem_block(mb_p);
|
free_mem_block(mb_p);
|
||||||
rlc_pP->pdu_retrans_buffer[snP].mem_block = NULL;
|
rlc_pP->pdu_retrans_buffer[snP].mem_block = NULL;
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][ACK-PDU] ACK PDU SN %05d previous retx_count %d \n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][ACK-PDU] ACK PDU SN %05d previous retx_count %d \n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
snP,
|
snP,
|
||||||
rlc_pP->pdu_retrans_buffer[snP].retx_count);
|
rlc_pP->pdu_retrans_buffer[snP].retx_count);
|
||||||
@@ -182,16 +182,13 @@ void rlc_am_ack_pdu (
|
|||||||
RLC_SDU_CONFIRM_YES);
|
RLC_SDU_CONFIRM_YES);
|
||||||
#else
|
#else
|
||||||
rlc_data_conf(
|
rlc_data_conf(
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP,
|
||||||
rlc_pP->ue_module_id,
|
|
||||||
frameP,
|
|
||||||
rlc_pP->is_enb,
|
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->input_sdus[sdu_index].mui,
|
rlc_pP->input_sdus[sdu_index].mui,
|
||||||
RLC_SDU_CONFIRM_YES,
|
RLC_SDU_CONFIRM_YES,
|
||||||
rlc_pP->is_data_plane);
|
rlc_pP->is_data_plane);
|
||||||
#endif
|
#endif
|
||||||
rlc_am_free_in_sdu(rlc_pP, frameP, sdu_index);
|
rlc_am_free_in_sdu(ctxt_pP, rlc_pP, sdu_index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 7.1...
|
// 7.1...
|
||||||
@@ -213,10 +210,10 @@ void rlc_am_ack_pdu (
|
|||||||
|
|
||||||
rlc_pP->vt_ms = (rlc_pP->vt_a + RLC_AM_WINDOW_SIZE) & RLC_AM_SN_MASK;
|
rlc_pP->vt_ms = (rlc_pP->vt_a + RLC_AM_WINDOW_SIZE) & RLC_AM_SN_MASK;
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][ACK-PDU] UPDATED VT(A) %04d VT(MS) %04d VT(S) %04d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][ACK-PDU] UPDATED VT(A) %04d VT(MS) %04d VT(S) %04d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->vt_a,
|
rlc_pP->vt_a,
|
||||||
rlc_pP->vt_ms,
|
rlc_pP->vt_ms,
|
||||||
@@ -227,10 +224,10 @@ void rlc_am_ack_pdu (
|
|||||||
rlc_pP->first_retrans_pdu_sn = (rlc_pP->first_retrans_pdu_sn + 1) & RLC_AM_SN_MASK;
|
rlc_pP->first_retrans_pdu_sn = (rlc_pP->first_retrans_pdu_sn + 1) & RLC_AM_SN_MASK;
|
||||||
if (rlc_pP->pdu_retrans_buffer[rlc_pP->first_retrans_pdu_sn].retx_count >= 0) {
|
if (rlc_pP->pdu_retrans_buffer[rlc_pP->first_retrans_pdu_sn].retx_count >= 0) {
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][ACK-PDU] UPDATED first_retrans_pdu_sn -> %04d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][ACK-PDU] UPDATED first_retrans_pdu_sn -> %04d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->first_retrans_pdu_sn);
|
rlc_pP->first_retrans_pdu_sn);
|
||||||
break;
|
break;
|
||||||
@@ -239,20 +236,20 @@ void rlc_am_ack_pdu (
|
|||||||
if (rlc_pP->vt_s == rlc_pP->first_retrans_pdu_sn) {
|
if (rlc_pP->vt_s == rlc_pP->first_retrans_pdu_sn) {
|
||||||
rlc_pP->first_retrans_pdu_sn = -1;
|
rlc_pP->first_retrans_pdu_sn = -1;
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][ACK-PDU] UPDATED first_retrans_pdu_sn -> %04d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][ACK-PDU] UPDATED first_retrans_pdu_sn -> %04d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->first_retrans_pdu_sn);
|
rlc_pP->first_retrans_pdu_sn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][ACK-PDU] WARNING ACK PDU SN %05d -> NO PDU TO ACK\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][ACK-PDU] WARNING ACK PDU SN %05d -> NO PDU TO ACK\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
snP);
|
snP);
|
||||||
if (mb_p != NULL) {
|
if (mb_p != NULL) {
|
||||||
@@ -272,10 +269,10 @@ void rlc_am_ack_pdu (
|
|||||||
|
|
||||||
rlc_pP->vt_ms = (rlc_pP->vt_a + RLC_AM_WINDOW_SIZE) & RLC_AM_SN_MASK;
|
rlc_pP->vt_ms = (rlc_pP->vt_a + RLC_AM_WINDOW_SIZE) & RLC_AM_SN_MASK;
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][ACK-PDU] UPDATED VT(A) %04d VT(MS) %04d VT(S) %04d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][ACK-PDU] UPDATED VT(A) %04d VT(MS) %04d VT(S) %04d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->vt_a,
|
rlc_pP->vt_a,
|
||||||
rlc_pP->vt_ms,
|
rlc_pP->vt_ms,
|
||||||
@@ -286,8 +283,8 @@ void rlc_am_ack_pdu (
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
mem_block_t* rlc_am_retransmit_get_copy (
|
mem_block_t* rlc_am_retransmit_get_copy (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_entity_t *const rlc_pP,
|
||||||
const frame_t frameP,
|
|
||||||
const rlc_sn_t snP)
|
const rlc_sn_t snP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
@@ -305,7 +302,7 @@ mem_block_t* rlc_am_retransmit_get_copy (
|
|||||||
|
|
||||||
pdu_mngt->flags.retransmit = 0;
|
pdu_mngt->flags.retransmit = 0;
|
||||||
|
|
||||||
rlc_am_pdu_polling(rlc_pP, frameP, pdu_p, pdu_mngt->payload_size);
|
rlc_am_pdu_polling(ctxt_pP, rlc_pP, pdu_p, pdu_mngt->payload_size);
|
||||||
return mb_copy;
|
return mb_copy;
|
||||||
} else {
|
} else {
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -313,8 +310,8 @@ mem_block_t* rlc_am_retransmit_get_copy (
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
mem_block_t* rlc_am_retransmit_get_subsegment(
|
mem_block_t* rlc_am_retransmit_get_subsegment(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_entity_t *const rlc_pP,
|
||||||
const frame_t frameP,
|
|
||||||
const rlc_sn_t snP,
|
const rlc_sn_t snP,
|
||||||
sdu_size_t * const sizeP /* in-out*/)
|
sdu_size_t * const sizeP /* in-out*/)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -376,19 +373,19 @@ mem_block_t* rlc_am_retransmit_get_subsegment(
|
|||||||
|
|
||||||
((struct mac_tb_req*)(mb_sub_segment_p->data))->data_ptr = (uint8_t*)&(mb_sub_segment_p->data[sizeof(struct mac_tb_req)]);
|
((struct mac_tb_req*)(mb_sub_segment_p->data))->data_ptr = (uint8_t*)&(mb_sub_segment_p->data[sizeof(struct mac_tb_req)]);
|
||||||
|
|
||||||
if (rlc_am_get_data_pdu_infos(frameP,pdu_original_p, rlc_pP->pdu_retrans_buffer[snP].header_and_payload_size, &pdu_info) >= 0) {
|
if (rlc_am_get_data_pdu_infos(ctxt_pP,pdu_original_p, rlc_pP->pdu_retrans_buffer[snP].header_and_payload_size, &pdu_info) >= 0) {
|
||||||
int li_index = 0;
|
int li_index = 0;
|
||||||
int start_offset = rlc_pP->pdu_retrans_buffer[snP].nack_so_start;
|
int start_offset = rlc_pP->pdu_retrans_buffer[snP].nack_so_start;
|
||||||
int stop_offset = rlc_pP->pdu_retrans_buffer[snP].nack_so_stop;
|
int stop_offset = rlc_pP->pdu_retrans_buffer[snP].nack_so_stop;
|
||||||
|
|
||||||
LOG_D(RLC, "\n[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] ORIGINAL PDU SN %04d:\n",
|
LOG_D(RLC, "\n[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] ORIGINAL PDU SN %04d:\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
snP);
|
snP);
|
||||||
rlc_am_display_data_pdu_infos(rlc_pP, frameP,&pdu_info);
|
rlc_am_display_data_pdu_infos(ctxt_pP, rlc_pP, &pdu_info);
|
||||||
|
|
||||||
// all 15 bits set to 1 (indicate that the missing portion of the AMD PDU includes all bytes
|
// all 15 bits set to 1 (indicate that the missing portion of the AMD PDU includes all bytes
|
||||||
// to the last byte of the AMD PDU)
|
// to the last byte of the AMD PDU)
|
||||||
@@ -396,10 +393,10 @@ mem_block_t* rlc_am_retransmit_get_subsegment(
|
|||||||
rlc_pP->pdu_retrans_buffer[snP].nack_so_stop = rlc_pP->pdu_retrans_buffer[snP].payload_size - 1;
|
rlc_pP->pdu_retrans_buffer[snP].nack_so_stop = rlc_pP->pdu_retrans_buffer[snP].payload_size - 1;
|
||||||
stop_offset = rlc_pP->pdu_retrans_buffer[snP].nack_so_stop;
|
stop_offset = rlc_pP->pdu_retrans_buffer[snP].nack_so_stop;
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] UPDATED RETRANS PDU SN %04d nack_so_stop FROM 0x7FFF to %05d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] UPDATED RETRANS PDU SN %04d nack_so_stop FROM 0x7FFF to %05d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
snP, stop_offset);
|
snP, stop_offset);
|
||||||
}
|
}
|
||||||
@@ -446,32 +443,32 @@ mem_block_t* rlc_am_retransmit_get_subsegment(
|
|||||||
//-------------------------------------------------------
|
//-------------------------------------------------------
|
||||||
// set MAX payload size that can be copied
|
// set MAX payload size that can be copied
|
||||||
// first constraint : the size of the hole to retransmit
|
// first constraint : the size of the hole to retransmit
|
||||||
rlc_am_get_next_hole(rlc_pP, frameP, snP, &start_offset, &stop_offset);
|
rlc_am_get_next_hole(ctxt_pP, rlc_pP, snP, &start_offset, &stop_offset);
|
||||||
max_copy_payload_size = stop_offset - start_offset + 1;
|
max_copy_payload_size = stop_offset - start_offset + 1;
|
||||||
assert(max_copy_payload_size > 0);
|
assert(max_copy_payload_size > 0);
|
||||||
assert(test_pdu_remaining_size > 0);
|
assert(test_pdu_remaining_size > 0);
|
||||||
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] HOLE FOUND SO %d -> %d\n",
|
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] HOLE FOUND SO %d -> %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
start_offset,
|
start_offset,
|
||||||
stop_offset);
|
stop_offset);
|
||||||
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] ORIGINAL FI %d\n",
|
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] ORIGINAL FI %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
(pdu_original_p->b1 & 0x18) >> 3);
|
(pdu_original_p->b1 & 0x18) >> 3);
|
||||||
// second constraint the size of the pdu_p requested by MAC layer
|
// second constraint the size of the pdu_p requested by MAC layer
|
||||||
if (max_copy_payload_size > test_pdu_remaining_size) {
|
if (max_copy_payload_size > test_pdu_remaining_size) {
|
||||||
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] CUT max_copy_payload_size with test_pdu_remaining_size %d -> %d\n",
|
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] CUT max_copy_payload_size with test_pdu_remaining_size %d -> %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
max_copy_payload_size,
|
max_copy_payload_size,
|
||||||
test_pdu_remaining_size);
|
test_pdu_remaining_size);
|
||||||
@@ -487,26 +484,26 @@ mem_block_t* rlc_am_retransmit_get_subsegment(
|
|||||||
//.find the li corresponding to the nack_so_start (start_offset)
|
//.find the li corresponding to the nack_so_start (start_offset)
|
||||||
if (pdu_info.num_li > 0) {
|
if (pdu_info.num_li > 0) {
|
||||||
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] ORIGINAL NUM LI %d\n",
|
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] ORIGINAL NUM LI %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
pdu_info.num_li);
|
pdu_info.num_li);
|
||||||
while ((li_index < pdu_info.num_li) && (continue_fill_pdu_with_pdu)) {
|
while ((li_index < pdu_info.num_li) && (continue_fill_pdu_with_pdu)) {
|
||||||
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] FIND LI %d\n",
|
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] FIND LI %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
pdu_info.li_list[li_index]);
|
pdu_info.li_list[li_index]);
|
||||||
if (max_copy_payload_size > test_pdu_remaining_size) {
|
if (max_copy_payload_size > test_pdu_remaining_size) {
|
||||||
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] CUT max_copy_payload_size with test_pdu_remaining_size %d -> %d\n",
|
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] CUT max_copy_payload_size with test_pdu_remaining_size %d -> %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
max_copy_payload_size,
|
max_copy_payload_size,
|
||||||
test_pdu_remaining_size);
|
test_pdu_remaining_size);
|
||||||
@@ -521,35 +518,35 @@ mem_block_t* rlc_am_retransmit_get_subsegment(
|
|||||||
if (test_start_offset < test_li_sum) {
|
if (test_start_offset < test_li_sum) {
|
||||||
|
|
||||||
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] test_start_offset < test_li_sum %d < %d\n",
|
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] test_start_offset < test_li_sum %d < %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
test_start_offset,
|
test_start_offset,
|
||||||
test_li_sum);
|
test_li_sum);
|
||||||
/*if (test_max_copy_payload_size > (test_li_sum - test_start_offset)) {
|
/*if (test_max_copy_payload_size > (test_li_sum - test_start_offset)) {
|
||||||
#ifdef TRACE_RLC_AM_RESEGMENT
|
#ifdef TRACE_RLC_AM_RESEGMENT
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] CUT test_max_copy_payload_size with test_li_sum - test_start_offset %d -> %d\n",frameP, rlc_pP->module_id, rlc_pP->rb_id, test_max_copy_payload_size, test_li_sum - test_start_offset);
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] CUT test_max_copy_payload_size with test_li_sum - test_start_offset %d -> %d\n",ctxt_pP->frame, rlc_pP->module_id, rlc_pP->rb_id, test_max_copy_payload_size, test_li_sum - test_start_offset);
|
||||||
#endif
|
#endif
|
||||||
test_max_copy_payload_size = test_li_sum - test_start_offset;
|
test_max_copy_payload_size = test_li_sum - test_start_offset;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
if ((max_copy_payload_size + test_start_offset) < test_li_sum) {
|
if ((max_copy_payload_size + test_start_offset) < test_li_sum) {
|
||||||
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] (max_copy_payload_size %d + test_start_offset %d) < test_li_sum %d\n",
|
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] (max_copy_payload_size %d + test_start_offset %d) < test_li_sum %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
max_copy_payload_size,
|
max_copy_payload_size,
|
||||||
test_start_offset,
|
test_start_offset,
|
||||||
test_li_sum);
|
test_li_sum);
|
||||||
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] COPY SO %d -> %d %d BYTES\n",
|
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] COPY SO %d -> %d %d BYTES\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
test_start_offset ,
|
test_start_offset ,
|
||||||
test_start_offset + max_copy_payload_size - 1,
|
test_start_offset + max_copy_payload_size - 1,
|
||||||
@@ -563,18 +560,18 @@ mem_block_t* rlc_am_retransmit_get_subsegment(
|
|||||||
|
|
||||||
} else if ((max_copy_payload_size + test_start_offset) == test_li_sum) {
|
} else if ((max_copy_payload_size + test_start_offset) == test_li_sum) {
|
||||||
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] (max_copy_payload_size + test_start_offset) == test_li_sum %d == %d\n",
|
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] (max_copy_payload_size + test_start_offset) == test_li_sum %d == %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
(max_copy_payload_size + test_start_offset) ,
|
(max_copy_payload_size + test_start_offset) ,
|
||||||
test_li_sum);
|
test_li_sum);
|
||||||
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] COPY SO %d -> %d %d BYTES\n",
|
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] COPY SO %d -> %d %d BYTES\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
test_start_offset ,
|
test_start_offset ,
|
||||||
test_start_offset + max_copy_payload_size - 1,
|
test_start_offset + max_copy_payload_size - 1,
|
||||||
@@ -588,19 +585,19 @@ mem_block_t* rlc_am_retransmit_get_subsegment(
|
|||||||
|
|
||||||
} else if ((max_copy_payload_size + test_start_offset - (test_li_length_in_bytes ^ 3)) > test_li_sum) {
|
} else if ((max_copy_payload_size + test_start_offset - (test_li_length_in_bytes ^ 3)) > test_li_sum) {
|
||||||
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] (max_copy_payload_size + test_start_offset - (test_li_length_in_bytes ^ 3)) > test_li_sum %d > %d\n SET LI %d\n",
|
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] (max_copy_payload_size + test_start_offset - (test_li_length_in_bytes ^ 3)) > test_li_sum %d > %d\n SET LI %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
(max_copy_payload_size + test_start_offset) + (test_li_length_in_bytes ^ 3),
|
(max_copy_payload_size + test_start_offset) + (test_li_length_in_bytes ^ 3),
|
||||||
test_li_sum,
|
test_li_sum,
|
||||||
test_li_sum - test_start_offset);
|
test_li_sum - test_start_offset);
|
||||||
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] COPY SO %d -> %d %d BYTES\n",
|
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] COPY SO %d -> %d %d BYTES\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
test_start_offset ,
|
test_start_offset ,
|
||||||
test_li_sum - 1,
|
test_li_sum - 1,
|
||||||
@@ -615,10 +612,10 @@ mem_block_t* rlc_am_retransmit_get_subsegment(
|
|||||||
|
|
||||||
max_copy_payload_size = max_copy_payload_size - test_li_sum + test_start_offset - test_li_length_in_bytes;
|
max_copy_payload_size = max_copy_payload_size - test_li_sum + test_start_offset - test_li_length_in_bytes;
|
||||||
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] NOW max_copy_payload_size %d BYTES test_start_offset %d\n",
|
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] NOW max_copy_payload_size %d BYTES test_start_offset %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
max_copy_payload_size,
|
max_copy_payload_size,
|
||||||
test_li_sum);
|
test_li_sum);
|
||||||
@@ -628,18 +625,18 @@ mem_block_t* rlc_am_retransmit_get_subsegment(
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] (test_max_copy_payload_size + test_start_offset ) > test_li_sum %d > %d\n NO REMAINING SIZE FOR LI",
|
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] (test_max_copy_payload_size + test_start_offset ) > test_li_sum %d > %d\n NO REMAINING SIZE FOR LI",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
(max_copy_payload_size + test_start_offset),
|
(max_copy_payload_size + test_start_offset),
|
||||||
test_li_sum);
|
test_li_sum);
|
||||||
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] COPY SO %d -> %d %d BYTES\n",
|
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] COPY SO %d -> %d %d BYTES\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
test_start_offset ,
|
test_start_offset ,
|
||||||
test_li_sum - 1,
|
test_li_sum - 1,
|
||||||
@@ -659,10 +656,10 @@ mem_block_t* rlc_am_retransmit_get_subsegment(
|
|||||||
// and it cant be the first data field of the original PDU
|
// and it cant be the first data field of the original PDU
|
||||||
} else if (test_start_offset == test_li_sum) {
|
} else if (test_start_offset == test_li_sum) {
|
||||||
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] (test_start_offset == test_li_sum) %d == %d\n",
|
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] (test_start_offset == test_li_sum) %d == %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
test_start_offset ,
|
test_start_offset ,
|
||||||
test_li_sum);
|
test_li_sum);
|
||||||
@@ -680,10 +677,10 @@ mem_block_t* rlc_am_retransmit_get_subsegment(
|
|||||||
|
|
||||||
if (max_copy_payload_size > test_pdu_remaining_size) {
|
if (max_copy_payload_size > test_pdu_remaining_size) {
|
||||||
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] TRYING HIDDEN SIZE...CUT max_copy_payload_size with test_pdu_remaining_size %d -> %d\n",
|
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] TRYING HIDDEN SIZE...CUT max_copy_payload_size with test_pdu_remaining_size %d -> %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
max_copy_payload_size,
|
max_copy_payload_size,
|
||||||
test_pdu_remaining_size);
|
test_pdu_remaining_size);
|
||||||
@@ -693,10 +690,10 @@ mem_block_t* rlc_am_retransmit_get_subsegment(
|
|||||||
if ((max_copy_payload_size + test_start_offset) >= (pdu_info.hidden_size + test_li_sum)) {
|
if ((max_copy_payload_size + test_start_offset) >= (pdu_info.hidden_size + test_li_sum)) {
|
||||||
test_pdu_copy_size += (pdu_info.hidden_size + test_li_sum - test_start_offset);
|
test_pdu_copy_size += (pdu_info.hidden_size + test_li_sum - test_start_offset);
|
||||||
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] COPYING WHOLE REMAINING SIZE %d (max_copy_payload_size %d, test_start_offset %d, pdu_info.hidden_size %d test_li_sum %d test_pdu_copy_size %d)\n",
|
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] COPYING WHOLE REMAINING SIZE %d (max_copy_payload_size %d, test_start_offset %d, pdu_info.hidden_size %d test_li_sum %d test_pdu_copy_size %d)\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
pdu_info.hidden_size + test_li_sum - test_start_offset,
|
pdu_info.hidden_size + test_li_sum - test_start_offset,
|
||||||
max_copy_payload_size,
|
max_copy_payload_size,
|
||||||
@@ -708,10 +705,10 @@ mem_block_t* rlc_am_retransmit_get_subsegment(
|
|||||||
not_test_fi = (not_test_fi & 0x2) | (not_fi_original & 0x1); // set b0 idendical to the b0 of the non segmented PDU
|
not_test_fi = (not_test_fi & 0x2) | (not_fi_original & 0x1); // set b0 idendical to the b0 of the non segmented PDU
|
||||||
} else {
|
} else {
|
||||||
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] COPYING REMAINING SIZE %d (/%d)\n",
|
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] COPYING REMAINING SIZE %d (/%d)\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
max_copy_payload_size,
|
max_copy_payload_size,
|
||||||
pdu_info.hidden_size);
|
pdu_info.hidden_size);
|
||||||
@@ -722,10 +719,10 @@ mem_block_t* rlc_am_retransmit_get_subsegment(
|
|||||||
}
|
}
|
||||||
} else { // num_li == 0
|
} else { // num_li == 0
|
||||||
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] (num_li == 0)\n",
|
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] (num_li == 0)\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
test_pdu_copy_size = max_copy_payload_size;
|
test_pdu_copy_size = max_copy_payload_size;
|
||||||
if ((stop_offset == (start_offset + max_copy_payload_size - 1)) && (stop_offset == rlc_pP->pdu_retrans_buffer[snP].payload_size - 1)) {
|
if ((stop_offset == (start_offset + max_copy_payload_size - 1)) && (stop_offset == rlc_pP->pdu_retrans_buffer[snP].payload_size - 1)) {
|
||||||
@@ -774,19 +771,19 @@ mem_block_t* rlc_am_retransmit_get_subsegment(
|
|||||||
*sizeP = *sizeP - 1;
|
*sizeP = *sizeP - 1;
|
||||||
}
|
}
|
||||||
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] ADD LI %d\n",
|
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] ADD LI %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
test_li_list[fill_num_li]);
|
test_li_list[fill_num_li]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] ADD NO LI\n",
|
LOG_T(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] ADD NO LI\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
fill_payload_p = (uint8_t*)e_li_sub_segment;
|
fill_payload_p = (uint8_t*)e_li_sub_segment;
|
||||||
}
|
}
|
||||||
@@ -806,10 +803,10 @@ mem_block_t* rlc_am_retransmit_get_subsegment(
|
|||||||
rlc_pP->pdu_retrans_buffer[snP].flags.retransmit = 0;
|
rlc_pP->pdu_retrans_buffer[snP].flags.retransmit = 0;
|
||||||
|
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] RE-SEND DATA PDU SN %04d SO %d %d BYTES PAYLOAD %d BYTES LSF!\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] RE-SEND DATA PDU SN %04d SO %d %d BYTES PAYLOAD %d BYTES LSF!\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
snP,
|
snP,
|
||||||
start_offset,
|
start_offset,
|
||||||
@@ -818,10 +815,10 @@ mem_block_t* rlc_am_retransmit_get_subsegment(
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] RE-SEND DATA PDU SN %04d SO %d %d BYTES PAYLOAD %d BYTES\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] RE-SEND DATA PDU SN %04d SO %d %d BYTES PAYLOAD %d BYTES\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
snP,
|
snP,
|
||||||
start_offset,
|
start_offset,
|
||||||
@@ -836,13 +833,13 @@ mem_block_t* rlc_am_retransmit_get_subsegment(
|
|||||||
//---------------------------------------------------------------
|
//---------------------------------------------------------------
|
||||||
// update nack_so_start
|
// update nack_so_start
|
||||||
//---------------------------------------------------------------
|
//---------------------------------------------------------------
|
||||||
rlc_am_remove_hole(rlc_pP, frameP, snP, start_offset, test_pdu_copy_size+start_offset - 1);
|
rlc_am_remove_hole(ctxt_pP, rlc_pP, snP, start_offset, test_pdu_copy_size+start_offset - 1);
|
||||||
//rlc_pP->pdu_retrans_buffer[snP].nack_so_start = rlc_pP->pdu_retrans_buffer[snP].nack_so_start + test_pdu_copy_size;
|
//rlc_pP->pdu_retrans_buffer[snP].nack_so_start = rlc_pP->pdu_retrans_buffer[snP].nack_so_start + test_pdu_copy_size;
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] RE-SEND DATA PDU SN %04d NOW nack_so_start %d nack_so_stop %d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] RE-SEND DATA PDU SN %04d NOW nack_so_start %d nack_so_stop %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
snP,
|
snP,
|
||||||
rlc_pP->pdu_retrans_buffer[snP].nack_so_start,
|
rlc_pP->pdu_retrans_buffer[snP].nack_so_start,
|
||||||
@@ -853,22 +850,22 @@ mem_block_t* rlc_am_retransmit_get_subsegment(
|
|||||||
}*/
|
}*/
|
||||||
} else {
|
} else {
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] COULD NOT GET INFO FOR DATA PDU SN %04d -> RETURN NULL\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] COULD NOT GET INFO FOR DATA PDU SN %04d -> RETURN NULL\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id, snP);
|
rlc_pP->rb_id, snP);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
rlc_am_pdu_polling(rlc_pP, frameP, pdu_sub_segment_p, test_pdu_copy_size);
|
rlc_am_pdu_polling(ctxt_pP, rlc_pP, pdu_sub_segment_p, test_pdu_copy_size);
|
||||||
|
|
||||||
return mb_sub_segment_p;
|
return mb_sub_segment_p;
|
||||||
} else {
|
} else {
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] RE-SEND DATA PDU SN %04d BUT NO PDU AVAILABLE -> RETURN NULL\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RE-SEGMENT] RE-SEND DATA PDU SN %04d BUT NO PDU AVAILABLE -> RETURN NULL\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
snP);
|
snP);
|
||||||
assert(3==4);
|
assert(3==4);
|
||||||
@@ -877,8 +874,8 @@ mem_block_t* rlc_am_retransmit_get_subsegment(
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_tx_buffer_display (
|
void rlc_am_tx_buffer_display (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t* const rlc_pP,
|
rlc_am_entity_t* const rlc_pP,
|
||||||
const frame_t frameP,
|
|
||||||
char* const message_pP)
|
char* const message_pP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
@@ -887,20 +884,20 @@ void rlc_am_tx_buffer_display (
|
|||||||
|
|
||||||
if (message_pP) {
|
if (message_pP) {
|
||||||
LOG_D(RLC, "\n[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] Retransmission buffer %s VT(A)=%04d VT(S)=%04d:",
|
LOG_D(RLC, "\n[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] Retransmission buffer %s VT(A)=%04d VT(S)=%04d:",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
message_pP,
|
message_pP,
|
||||||
rlc_pP->vt_a,
|
rlc_pP->vt_a,
|
||||||
rlc_pP->vt_s);
|
rlc_pP->vt_s);
|
||||||
} else {
|
} else {
|
||||||
LOG_D(RLC, "\n[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] Retransmission buffer VT(A)=%04d VT(S)=%04d:",
|
LOG_D(RLC, "\n[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] Retransmission buffer VT(A)=%04d VT(S)=%04d:",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->vt_a,
|
rlc_pP->vt_a,
|
||||||
rlc_pP->vt_s);
|
rlc_pP->vt_s);
|
||||||
@@ -932,8 +929,8 @@ void rlc_am_tx_buffer_display (
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_retransmit_any_pdu(
|
void rlc_am_retransmit_any_pdu(
|
||||||
rlc_am_entity_t* const rlc_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const frame_t frameP)
|
rlc_am_entity_t* const rlc_pP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
rlc_sn_t sn = (rlc_pP->vt_s - 1) & RLC_AM_SN_MASK;
|
rlc_sn_t sn = (rlc_pP->vt_s - 1) & RLC_AM_SN_MASK;
|
||||||
@@ -944,10 +941,10 @@ void rlc_am_retransmit_any_pdu(
|
|||||||
rlc_am_pdu_sn_10_t* pdu_sn_10_p = NULL;
|
rlc_am_pdu_sn_10_t* pdu_sn_10_p = NULL;
|
||||||
|
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][FORCE-TRAFFIC] rlc_am_retransmit_any_pdu()\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][FORCE-TRAFFIC] rlc_am_retransmit_any_pdu()\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
while (sn != sn_end) {
|
while (sn != sn_end) {
|
||||||
if (rlc_pP->pdu_retrans_buffer[sn].mem_block != NULL) {
|
if (rlc_pP->pdu_retrans_buffer[sn].mem_block != NULL) {
|
||||||
@@ -957,21 +954,21 @@ void rlc_am_retransmit_any_pdu(
|
|||||||
}
|
}
|
||||||
if (rlc_pP->pdu_retrans_buffer[sn].header_and_payload_size <= rlc_pP->nb_bytes_requested_by_mac) {
|
if (rlc_pP->pdu_retrans_buffer[sn].header_and_payload_size <= rlc_pP->nb_bytes_requested_by_mac) {
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][FORCE-TRAFFIC] RE-SEND DATA PDU SN %04d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][FORCE-TRAFFIC] RE-SEND DATA PDU SN %04d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id, sn);
|
rlc_pP->rb_id, sn);
|
||||||
rlc_am_nack_pdu (rlc_pP, frameP, sn, 0, 0x7FFF);
|
rlc_am_nack_pdu (ctxt_pP, rlc_pP, sn, 0, 0x7FFF);
|
||||||
// no need for update rlc_pP->nb_bytes_requested_by_mac
|
// no need for update rlc_pP->nb_bytes_requested_by_mac
|
||||||
pdu_p = rlc_am_retransmit_get_copy(rlc_pP, frameP, sn);
|
pdu_p = rlc_am_retransmit_get_copy(ctxt_pP, rlc_pP, sn);
|
||||||
pdu_sn_10_p = (rlc_am_pdu_sn_10_t*) (&pdu_p->data[sizeof(struct mac_tb_req)]);
|
pdu_sn_10_p = (rlc_am_pdu_sn_10_t*) (&pdu_p->data[sizeof(struct mac_tb_req)]);
|
||||||
rlc_am_pdu_polling(rlc_pP, frameP, pdu_sn_10_p, rlc_pP->pdu_retrans_buffer[sn].header_and_payload_size);
|
rlc_am_pdu_polling(ctxt_pP, rlc_pP, pdu_sn_10_p, rlc_pP->pdu_retrans_buffer[sn].header_and_payload_size);
|
||||||
pdu_sn_10_p->b1 = pdu_sn_10_p->b1 | 0x20;
|
pdu_sn_10_p->b1 = pdu_sn_10_p->b1 | 0x20;
|
||||||
rlc_pP->c_pdu_without_poll = 0;
|
rlc_pP->c_pdu_without_poll = 0;
|
||||||
rlc_pP->c_byte_without_poll = 0;
|
rlc_pP->c_byte_without_poll = 0;
|
||||||
//rlc_pP->poll_sn = (rlc_pP->vt_s -1) & RLC_AM_SN_MASK;
|
//rlc_pP->poll_sn = (rlc_pP->vt_s -1) & RLC_AM_SN_MASK;
|
||||||
rlc_am_start_timer_poll_retransmit(rlc_pP,frameP);
|
rlc_am_start_timer_poll_retransmit(ctxt_pP, rlc_pP);
|
||||||
rlc_pP->stat_tx_data_pdu += 1;
|
rlc_pP->stat_tx_data_pdu += 1;
|
||||||
rlc_pP->stat_tx_retransmit_pdu += 1;
|
rlc_pP->stat_tx_retransmit_pdu += 1;
|
||||||
rlc_pP->stat_tx_data_bytes += ((struct mac_tb_req*)(pdu_p->data))->tb_size;
|
rlc_pP->stat_tx_data_bytes += ((struct mac_tb_req*)(pdu_p->data))->tb_size;
|
||||||
@@ -986,22 +983,22 @@ void rlc_am_retransmit_any_pdu(
|
|||||||
// so re-segment a pdu_p if possible
|
// so re-segment a pdu_p if possible
|
||||||
if (found_pdu) {
|
if (found_pdu) {
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][FORCE-TRAFFIC] SEND SEGMENT OF DATA PDU SN %04d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][FORCE-TRAFFIC] SEND SEGMENT OF DATA PDU SN %04d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
found_pdu_sn);
|
found_pdu_sn);
|
||||||
if (rlc_pP->nb_bytes_requested_by_mac > 4) {
|
if (rlc_pP->nb_bytes_requested_by_mac > 4) {
|
||||||
rlc_am_nack_pdu (rlc_pP, frameP, found_pdu_sn, 0, 0x7FFF);
|
rlc_am_nack_pdu (ctxt_pP, rlc_pP, found_pdu_sn, 0, 0x7FFF);
|
||||||
pdu_p = rlc_am_retransmit_get_subsegment(rlc_pP, frameP, found_pdu_sn, &rlc_pP->nb_bytes_requested_by_mac);
|
pdu_p = rlc_am_retransmit_get_subsegment(ctxt_pP, rlc_pP, found_pdu_sn, &rlc_pP->nb_bytes_requested_by_mac);
|
||||||
pdu_sn_10_p = (rlc_am_pdu_sn_10_t*) (&pdu_p->data[sizeof(struct mac_tb_req)]);
|
pdu_sn_10_p = (rlc_am_pdu_sn_10_t*) (&pdu_p->data[sizeof(struct mac_tb_req)]);
|
||||||
rlc_am_pdu_polling(rlc_pP, frameP, pdu_sn_10_p, rlc_pP->pdu_retrans_buffer[found_pdu_sn].header_and_payload_size);
|
rlc_am_pdu_polling(ctxt_pP, rlc_pP, pdu_sn_10_p, rlc_pP->pdu_retrans_buffer[found_pdu_sn].header_and_payload_size);
|
||||||
pdu_sn_10_p->b1 = pdu_sn_10_p->b1 | 0x20;
|
pdu_sn_10_p->b1 = pdu_sn_10_p->b1 | 0x20;
|
||||||
rlc_pP->c_pdu_without_poll = 0;
|
rlc_pP->c_pdu_without_poll = 0;
|
||||||
rlc_pP->c_byte_without_poll = 0;
|
rlc_pP->c_byte_without_poll = 0;
|
||||||
//rlc_pP->poll_sn = (rlc_pP->vt_s -1) & RLC_AM_SN_MASK;
|
//rlc_pP->poll_sn = (rlc_pP->vt_s -1) & RLC_AM_SN_MASK;
|
||||||
rlc_am_start_timer_poll_retransmit(rlc_pP,frameP);
|
rlc_am_start_timer_poll_retransmit(ctxt_pP, rlc_pP);
|
||||||
rlc_pP->stat_tx_data_pdu += 1;
|
rlc_pP->stat_tx_data_pdu += 1;
|
||||||
rlc_pP->stat_tx_retransmit_pdu += 1;
|
rlc_pP->stat_tx_retransmit_pdu += 1;
|
||||||
rlc_pP->stat_tx_data_bytes += ((struct mac_tb_req*)(pdu_p->data))->tb_size;
|
rlc_pP->stat_tx_data_bytes += ((struct mac_tb_req*)(pdu_p->data))->tb_size;
|
||||||
@@ -1010,10 +1007,10 @@ void rlc_am_retransmit_any_pdu(
|
|||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][FORCE-TRAFFIC] ... BUT NOT ENOUGH BYTES ALLOWED BY MAC %0d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][FORCE-TRAFFIC] ... BUT NOT ENOUGH BYTES ALLOWED BY MAC %0d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->nb_bytes_requested_by_mac);
|
rlc_pP->nb_bytes_requested_by_mac);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,78 +57,78 @@
|
|||||||
# define public_rlc_am_retransmit(x) extern x
|
# define public_rlc_am_retransmit(x) extern x
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
/*! \fn void rlc_am_nack_pdu (rlc_am_entity_t *rlcP, frame_t frameP, uint16_t snP, sdu_size_t so_startP, sdu_size_t so_endP)
|
/*! \fn void rlc_am_nack_pdu (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, uint16_t snP, sdu_size_t so_startP, sdu_size_t so_endP)
|
||||||
* \brief The RLC AM PDU which have the sequence number snP is marked NACKed with segment offset fields.
|
* \brief The RLC AM PDU which have the sequence number snP is marked NACKed with segment offset fields.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
* \param[in] snP Sequence number of the PDU that is negative acknowledged.
|
* \param[in] snP Sequence number of the PDU that is negative acknowledged.
|
||||||
* \param[in] so_startP Start of the segment offset of the PDU that .
|
* \param[in] so_startP Start of the segment offset of the PDU that .
|
||||||
* \param[in] so_endP Transport blocks received from MAC layer.
|
* \param[in] so_endP Transport blocks received from MAC layer.
|
||||||
* \note It may appear a new hole in the retransmission buffer depending on the segment offset informations. Depending on the state of the retransmission buffer, negative confirmation can be sent to higher layers about the drop by the RLC AM instance of a particular SDU.
|
* \note It may appear a new hole in the retransmission buffer depending on the segment offset informations. Depending on the state of the retransmission buffer, negative confirmation can be sent to higher layers about the drop by the RLC AM instance of a particular SDU.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_retransmit(void rlc_am_nack_pdu (
|
protected_rlc_am_retransmit(void rlc_am_nack_pdu (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlcP,
|
rlc_am_entity_t *const rlcP,
|
||||||
const frame_t frameP,
|
|
||||||
const rlc_sn_t snP,
|
const rlc_sn_t snP,
|
||||||
const sdu_size_t so_startP,
|
const sdu_size_t so_startP,
|
||||||
const sdu_size_t so_endP);)
|
const sdu_size_t so_endP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_ack_pdu (rlc_am_entity_t *rlcP, frame_t frameP, rlc_sn_t snP)
|
/*! \fn void rlc_am_ack_pdu (const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t *rlcP, rlc_sn_t snP)
|
||||||
* \brief The RLC AM PDU which have the sequence number snP is marked ACKed.
|
* \brief The RLC AM PDU which have the sequence number snP is marked ACKed.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
* \param[in] snP Sequence number of the PDU that is acknowledged.
|
* \param[in] snP Sequence number of the PDU that is acknowledged.
|
||||||
* \note Depending on the state of the retransmission buffer, positive confirmation can be sent to higher layers about the receiving by the peer RLC AM instance of a particular SDU.
|
* \note Depending on the state of the retransmission buffer, positive confirmation can be sent to higher layers about the receiving by the peer RLC AM instance of a particular SDU.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_retransmit(void rlc_am_ack_pdu (
|
protected_rlc_am_retransmit(void rlc_am_ack_pdu (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlcP,
|
rlc_am_entity_t *const rlcP,
|
||||||
const frame_t frameP,
|
|
||||||
const rlc_sn_t snP);)
|
const rlc_sn_t snP);)
|
||||||
|
|
||||||
/*! \fn mem_block_t* rlc_am_retransmit_get_copy (rlc_am_entity_t *rlcP, frame_t frameP, rlc_sn_t snP)
|
/*! \fn mem_block_t* rlc_am_retransmit_get_copy (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, rlc_sn_t snP)
|
||||||
* \brief The RLC AM PDU which have the sequence number snP is marked ACKed.
|
* \brief The RLC AM PDU which have the sequence number snP is marked ACKed.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
* \param[in] snP Sequence number of the PDU to be copied.
|
* \param[in] snP Sequence number of the PDU to be copied.
|
||||||
* \return A copy of the PDU having sequence number equal to parameter snP.
|
* \return A copy of the PDU having sequence number equal to parameter snP.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_retransmit(mem_block_t* rlc_am_retransmit_get_copy (
|
protected_rlc_am_retransmit(mem_block_t* rlc_am_retransmit_get_copy (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlcP,
|
rlc_am_entity_t *const rlcP,
|
||||||
const frame_t frameP,
|
|
||||||
const rlc_sn_t snP));
|
const rlc_sn_t snP));
|
||||||
|
|
||||||
/*! \fn mem_block_t* rlc_am_retransmit_get_subsegment (rlc_am_entity_t *rlcP, frame_t frameP, rlc_sn_t snP, sdu_size_t *sizeP)
|
/*! \fn mem_block_t* rlc_am_retransmit_get_subsegment (const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t *rlcP,rlc_sn_t snP, sdu_size_t *sizeP)
|
||||||
* \brief The RLC AM PDU which have the sequence number snP is marked ACKed.
|
* \brief The RLC AM PDU which have the sequence number snP is marked ACKed.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index
|
|
||||||
* \param[in] snP Sequence number of the PDU to be copied.
|
* \param[in] snP Sequence number of the PDU to be copied.
|
||||||
* \param[in,out] sizeP Maximum size allowed for the subsegment, it is updated with the amount of bytes not used (sizeP[out] = sizeP[in] - size of segment).
|
* \param[in,out] sizeP Maximum size allowed for the subsegment, it is updated with the amount of bytes not used (sizeP[out] = sizeP[in] - size of segment).
|
||||||
* \return A copy of a segment of the PDU having sequence number equal to parameter snP.
|
* \return A copy of a segment of the PDU having sequence number equal to parameter snP.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_retransmit(mem_block_t* rlc_am_retransmit_get_subsegment (
|
protected_rlc_am_retransmit(mem_block_t* rlc_am_retransmit_get_subsegment (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlcP,
|
rlc_am_entity_t *const rlcP,
|
||||||
const frame_t frameP,
|
|
||||||
const rlc_sn_t snP,
|
const rlc_sn_t snP,
|
||||||
sdu_size_t *const sizeP));
|
sdu_size_t *const sizeP));
|
||||||
|
|
||||||
/*! \fn void rlc_am_retransmit_any_pdu(rlc_am_entity_t* rlcP,frame_t frameP)
|
/*! \fn void rlc_am_retransmit_any_pdu(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* rlcP)
|
||||||
* \brief Retransmit any PDU in order to unblock peer entity, if no suitable PDU is found (depending on requested MAC size) to be retransmitted, then try to retransmit a subsegment of any PDU.
|
* \brief Retransmit any PDU in order to unblock peer entity, if no suitable PDU is found (depending on requested MAC size) to be retransmitted, then try to retransmit a subsegment of any PDU.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_retransmit(void rlc_am_retransmit_any_pdu(
|
protected_rlc_am_retransmit(void rlc_am_retransmit_any_pdu(
|
||||||
rlc_am_entity_t* const rlcP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const frame_t frameP);)
|
rlc_am_entity_t* const rlcP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_tx_buffer_display (rlc_am_entity_t* rlcP, frame_t frameP, char* message_pP)
|
/*! \fn void rlc_am_tx_buffer_display (const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t* rlcP, char* message_pP)
|
||||||
* \brief Display the dump of the retransmission buffer.
|
* \brief Display the dump of the retransmission buffer.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
* \param[in] message_pP Message to be displayed along with the display of the dump of the retransmission buffer.
|
* \param[in] message_pP Message to be displayed along with the display of the dump of the retransmission buffer.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_retransmit(void rlc_am_tx_buffer_display (
|
protected_rlc_am_retransmit(void rlc_am_tx_buffer_display (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t* const rlcP,
|
rlc_am_entity_t* const rlcP,
|
||||||
const frame_t frameP,
|
|
||||||
char* const message_pP);)
|
char* const message_pP);)
|
||||||
/** @} */
|
/** @} */
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
@@ -44,7 +44,11 @@
|
|||||||
// returns 0 if success
|
// returns 0 if success
|
||||||
// returns neg value if failure
|
// returns neg value if failure
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, mem_block_t* tb_pP)
|
signed int
|
||||||
|
rlc_am_rx_list_insert_pdu(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t* const rlc_pP,
|
||||||
|
mem_block_t* const tb_pP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
rlc_am_pdu_info_t* pdu_info_p = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
|
rlc_am_pdu_info_t* pdu_info_p = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
|
||||||
@@ -67,10 +71,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
if ((pdu_info_previous_cursor_p->sn == pdu_info_p->sn)) {
|
if ((pdu_info_previous_cursor_p->sn == pdu_info_p->sn)) {
|
||||||
if (pdu_info_p->rf != pdu_info_previous_cursor_p->rf) {
|
if (pdu_info_p->rf != pdu_info_previous_cursor_p->rf) {
|
||||||
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d WRONG RF -> DROPPED (vr(mr) < vr(r) and sn >= vr(r))\n",
|
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d WRONG RF -> DROPPED (vr(mr) < vr(r) and sn >= vr(r))\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -78,10 +82,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
} else if (pdu_info_p->rf == 1) {
|
} else if (pdu_info_p->rf == 1) {
|
||||||
if ((pdu_info_previous_cursor_p->so + pdu_info_previous_cursor_p->payload_size - 1) >= pdu_info_p->so) {
|
if ((pdu_info_previous_cursor_p->so + pdu_info_previous_cursor_p->payload_size - 1) >= pdu_info_p->so) {
|
||||||
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d SO OVERLAP -> DROPPED (vr(mr) < vr(r) and sn >= vr(r))\n",
|
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d SO OVERLAP -> DROPPED (vr(mr) < vr(r) and sn >= vr(r))\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -91,10 +95,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) > vr(r))\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) > vr(r))\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -104,10 +108,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
} else if (pdu_info_p->sn == pdu_info_cursor_p->sn) {
|
} else if (pdu_info_p->sn == pdu_info_cursor_p->sn) {
|
||||||
if (pdu_info_cursor_p->rf == 0) {
|
if (pdu_info_cursor_p->rf == 0) {
|
||||||
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d DUPLICATE -> DROPPED\n",
|
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d DUPLICATE -> DROPPED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -121,10 +125,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
if ((pdu_info_previous_cursor_p->so + pdu_info_previous_cursor_p->payload_size - 1) < pdu_info_p->so) {
|
if ((pdu_info_previous_cursor_p->so + pdu_info_previous_cursor_p->payload_size - 1) < pdu_info_p->so) {
|
||||||
|
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d SEGMENT OFFSET %05d (vr(mr) < vr(r) and sn >= vr(r))\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d SEGMENT OFFSET %05d (vr(mr) < vr(r) and sn >= vr(r))\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn,
|
pdu_info_p->sn,
|
||||||
@@ -133,10 +137,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d OVERLAP PREVIOUS SO DUPLICATE -> DROPPED\n",
|
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d OVERLAP PREVIOUS SO DUPLICATE -> DROPPED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -145,10 +149,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d SEGMENT OFFSET %05d (vr(mr) < vr(r) and sn >= vr(r))\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d SEGMENT OFFSET %05d (vr(mr) < vr(r) and sn >= vr(r))\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn,
|
pdu_info_p->sn,
|
||||||
@@ -158,10 +162,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
|
|
||||||
} else if (pdu_info_p->so <= pdu_info_cursor_p->so) {
|
} else if (pdu_info_p->so <= pdu_info_cursor_p->so) {
|
||||||
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d OVERLAP SO DUPLICATE -> DROPPED\n",
|
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d OVERLAP SO DUPLICATE -> DROPPED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -169,10 +173,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d DROPPED\n",
|
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d DROPPED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -187,10 +191,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
}
|
}
|
||||||
if (cursor_p != NULL) {
|
if (cursor_p != NULL) {
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r) and sn >= vr(r))\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r) and sn >= vr(r))\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -199,10 +203,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
} else {
|
} else {
|
||||||
if (pdu_info_cursor_p->rf == 0) {
|
if (pdu_info_cursor_p->rf == 0) {
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r) and vr(h) > vr(r) and sn >= vr(r))\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r) and vr(h) > vr(r) and sn >= vr(r))\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -211,10 +215,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
} else if ((pdu_info_p->rf == 1) && (pdu_info_cursor_p->rf == 1) && (pdu_info_p->sn == pdu_info_cursor_p->sn)) {
|
} else if ((pdu_info_p->rf == 1) && (pdu_info_cursor_p->rf == 1) && (pdu_info_p->sn == pdu_info_cursor_p->sn)) {
|
||||||
if ((pdu_info_cursor_p->so + pdu_info_cursor_p->payload_size - 1) < pdu_info_p->so) {
|
if ((pdu_info_cursor_p->so + pdu_info_cursor_p->payload_size - 1) < pdu_info_p->so) {
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r) and vr(h) > vr(r) and sn >= vr(r))\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r) and vr(h) > vr(r) and sn >= vr(r))\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -222,10 +226,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d DROPPED\n",
|
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d DROPPED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -233,10 +237,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
}
|
}
|
||||||
} else if (pdu_info_p->sn != pdu_info_cursor_p->sn) {
|
} else if (pdu_info_p->sn != pdu_info_cursor_p->sn) {
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r) and vr(h) > vr(r) and sn >= vr(r))\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r) and vr(h) > vr(r) and sn >= vr(r))\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -245,10 +249,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d DROPPED\n",
|
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d DROPPED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -264,20 +268,20 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
if ((pdu_info_previous_cursor_p->sn == pdu_info_cursor_p->sn)) {
|
if ((pdu_info_previous_cursor_p->sn == pdu_info_cursor_p->sn)) {
|
||||||
if (pdu_info_p->rf != pdu_info_previous_cursor_p->rf) {
|
if (pdu_info_p->rf != pdu_info_previous_cursor_p->rf) {
|
||||||
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d WRONG RF -> DROPPED (vr(mr) < vr(r) and sn >= vr(r))\n",
|
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d WRONG RF -> DROPPED (vr(mr) < vr(r) and sn >= vr(r))\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__, pdu_info_p->sn);
|
__LINE__, pdu_info_p->sn);
|
||||||
return -2;
|
return -2;
|
||||||
} else if (pdu_info_p->rf == 1) {
|
} else if (pdu_info_p->rf == 1) {
|
||||||
if ((pdu_info_p->so + pdu_info_p->payload_size - 1) >= pdu_info_previous_cursor_p->so) {
|
if ((pdu_info_p->so + pdu_info_p->payload_size - 1) >= pdu_info_previous_cursor_p->so) {
|
||||||
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d SO OVERLAP -> DROPPED (vr(mr) < vr(r) and sn >= vr(r))\n",
|
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d SO OVERLAP -> DROPPED (vr(mr) < vr(r) and sn >= vr(r))\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -287,10 +291,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r))\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r))\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -299,10 +303,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
} else if (pdu_info_p->sn == pdu_info_cursor_p->sn) {
|
} else if (pdu_info_p->sn == pdu_info_cursor_p->sn) {
|
||||||
if (pdu_info_cursor_p->rf == 0) {
|
if (pdu_info_cursor_p->rf == 0) {
|
||||||
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d DUPLICATE -> DROPPED\n",
|
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d DUPLICATE -> DROPPED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -316,10 +320,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
if ((pdu_info_p->so + pdu_info_p->payload_size - 1) < pdu_info_previous_cursor_p->so) {
|
if ((pdu_info_p->so + pdu_info_p->payload_size - 1) < pdu_info_previous_cursor_p->so) {
|
||||||
|
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d SEGMENT OFFSET %05d (vr(mr) < vr(r) and sn < vr(r))\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d SEGMENT OFFSET %05d (vr(mr) < vr(r) and sn < vr(r))\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn,
|
pdu_info_p->sn,
|
||||||
@@ -328,10 +332,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d OVERLAP PREVIOUS SO DUPLICATE -> DROPPED\n",
|
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d OVERLAP PREVIOUS SO DUPLICATE -> DROPPED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -340,10 +344,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d SEGMENT OFFSET %05d (vr(mr) < vr(r) and sn < vr(r))\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d SEGMENT OFFSET %05d (vr(mr) < vr(r) and sn < vr(r))\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn,
|
pdu_info_p->sn,
|
||||||
@@ -353,10 +357,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
|
|
||||||
} else if (pdu_info_cursor_p->so <= pdu_info_p->so) {
|
} else if (pdu_info_cursor_p->so <= pdu_info_p->so) {
|
||||||
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d OVERLAP SO DUPLICATE -> DROPPED\n",
|
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d OVERLAP SO DUPLICATE -> DROPPED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -364,10 +368,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d DROPPED\n",
|
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d DROPPED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -382,10 +386,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
}
|
}
|
||||||
if (cursor_p != NULL) {
|
if (cursor_p != NULL) {
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r) and sn < vr(r))\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r) and sn < vr(r))\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -394,10 +398,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
} else {
|
} else {
|
||||||
if (pdu_info_cursor_p->rf == 0) {
|
if (pdu_info_cursor_p->rf == 0) {
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r) and vr(h) > vr(r) and sn >= vr(r))\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r) and vr(h) > vr(r) and sn >= vr(r))\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -406,10 +410,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
} else if ((pdu_info_p->rf == 1) && (pdu_info_cursor_p->rf == 1) && (pdu_info_p->sn == pdu_info_cursor_p->sn)) {
|
} else if ((pdu_info_p->rf == 1) && (pdu_info_cursor_p->rf == 1) && (pdu_info_p->sn == pdu_info_cursor_p->sn)) {
|
||||||
if ((pdu_info_cursor_p->so + pdu_info_cursor_p->payload_size - 1) < pdu_info_p->so) {
|
if ((pdu_info_cursor_p->so + pdu_info_cursor_p->payload_size - 1) < pdu_info_p->so) {
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r) and vr(h) > vr(r) and sn >= vr(r))\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r) and vr(h) > vr(r) and sn >= vr(r))\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -417,10 +421,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d DROPPED\n",
|
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d DROPPED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -428,10 +432,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
}
|
}
|
||||||
} else if (pdu_info_p->sn != pdu_info_cursor_p->sn) {
|
} else if (pdu_info_p->sn != pdu_info_cursor_p->sn) {
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r) and vr(h) > vr(r) and sn >= vr(r))\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) < vr(r) and vr(h) > vr(r) and sn >= vr(r))\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -440,10 +444,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d DROPPED\n",
|
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d DROPPED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -452,7 +456,7 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
} else { // (pdu_info_p->vr_mr > rlc_pP->vr_r), > and not >=
|
} else { // (pdu_info_p->vr_mr > rlc_pP->vr_r), > and not >=
|
||||||
// FAR MORE SIMPLE CASE
|
// FAR MORE SIMPLE CASE
|
||||||
while (cursor_p != NULL){
|
while (cursor_p != NULL){
|
||||||
//msg ("[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d cursor_p %p\n", frameP, rlc_pP->module_id, rlc_pP->rb_id, __LINE__, cursor_p);
|
//msg ("[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d cursor_p %p\n", ctxt_pP->frame, rlc_pP->module_id, rlc_pP->rb_id, __LINE__, cursor_p);
|
||||||
pdu_info_cursor_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
|
pdu_info_cursor_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
|
||||||
if (pdu_info_p->sn < pdu_info_cursor_p->sn) {
|
if (pdu_info_p->sn < pdu_info_cursor_p->sn) {
|
||||||
|
|
||||||
@@ -461,10 +465,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
if ((pdu_info_previous_cursor_p->sn == pdu_info_p->sn)) {
|
if ((pdu_info_previous_cursor_p->sn == pdu_info_p->sn)) {
|
||||||
if (pdu_info_p->rf != pdu_info_previous_cursor_p->rf) {
|
if (pdu_info_p->rf != pdu_info_previous_cursor_p->rf) {
|
||||||
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d WRONG RF -> DROPPED (vr(mr) > vr(r))\n",
|
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d WRONG RF -> DROPPED (vr(mr) > vr(r))\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -472,10 +476,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
} else if (pdu_info_p->rf == 1) {
|
} else if (pdu_info_p->rf == 1) {
|
||||||
if ((pdu_info_previous_cursor_p->so + pdu_info_previous_cursor_p->payload_size - 1) >= pdu_info_p->so) {
|
if ((pdu_info_previous_cursor_p->so + pdu_info_previous_cursor_p->payload_size - 1) >= pdu_info_p->so) {
|
||||||
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d SO OVERLAP -> DROPPED (vr(mr) > vr(r))\n",
|
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d SO OVERLAP -> DROPPED (vr(mr) > vr(r))\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -485,10 +489,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) > vr(r))\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) > vr(r))\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -498,10 +502,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
} else if (pdu_info_p->sn == pdu_info_cursor_p->sn) {
|
} else if (pdu_info_p->sn == pdu_info_cursor_p->sn) {
|
||||||
if (pdu_info_cursor_p->rf == 0) {
|
if (pdu_info_cursor_p->rf == 0) {
|
||||||
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d WRONG RF -> DROPPED (vr(mr) > vr(r))\n",
|
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d WRONG RF -> DROPPED (vr(mr) > vr(r))\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -516,19 +520,19 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
if ((pdu_info_previous_cursor_p->so + pdu_info_previous_cursor_p->payload_size - 1) < pdu_info_p->so) {
|
if ((pdu_info_previous_cursor_p->so + pdu_info_previous_cursor_p->payload_size - 1) < pdu_info_p->so) {
|
||||||
|
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d SEGMENT OFFSET %05d (vr(mr) > vr(r) and sn >= vr(r))\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d SEGMENT OFFSET %05d (vr(mr) > vr(r) and sn >= vr(r))\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn,
|
pdu_info_p->sn,
|
||||||
pdu_info_p->so);
|
pdu_info_p->so);
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] PREVIOUS SO %d PAYLOAD SIZE %d\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] PREVIOUS SO %d PAYLOAD SIZE %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
pdu_info_previous_cursor_p->so,
|
pdu_info_previous_cursor_p->so,
|
||||||
pdu_info_previous_cursor_p->payload_size);
|
pdu_info_previous_cursor_p->payload_size);
|
||||||
@@ -536,10 +540,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d OVERLAP PREVIOUS SO DUPLICATE -> DROPPED\n",
|
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d OVERLAP PREVIOUS SO DUPLICATE -> DROPPED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -548,10 +552,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d SEGMENT OFFSET %05d (vr(mr) > vr(r) and sn >= vr(r))\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d SEGMENT OFFSET %05d (vr(mr) > vr(r) and sn >= vr(r))\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn,
|
pdu_info_p->sn,
|
||||||
@@ -560,10 +564,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
return 0;
|
return 0;
|
||||||
} else if (pdu_info_p->so <= pdu_info_cursor_p->so) {
|
} else if (pdu_info_p->so <= pdu_info_cursor_p->so) {
|
||||||
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d OVERLAP SO DUPLICATE -> DROPPED\n",
|
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d OVERLAP SO DUPLICATE -> DROPPED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -571,10 +575,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d DROPPED\n",
|
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d DROPPED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -585,10 +589,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
cursor_p = cursor_p->next;
|
cursor_p = cursor_p->next;
|
||||||
}
|
}
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) > vr(r))(last inserted)\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d (vr(mr) > vr(r))(last inserted)\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -599,10 +603,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d OVERLAP SO DUPLICATE -> DROPPED\n",
|
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d OVERLAP SO DUPLICATE -> DROPPED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -615,10 +619,10 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d (only inserted)\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d (only inserted)\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
@@ -626,17 +630,21 @@ signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, me
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d DROPPED @4\n",
|
LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d DROPPED @4\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_info_p->sn);
|
pdu_info_p->sn);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_rx_check_all_byte_segments(rlc_am_entity_t* rlc_pP, frame_t frameP, mem_block_t* tb_pP)
|
void
|
||||||
|
rlc_am_rx_check_all_byte_segments(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t* const rlc_pP,
|
||||||
|
mem_block_t* const tb_pP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
rlc_am_pdu_info_t *pdu_info_p = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
|
rlc_am_pdu_info_t *pdu_info_p = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
|
||||||
@@ -702,7 +710,7 @@ void rlc_am_rx_check_all_byte_segments(rlc_am_entity_t* rlc_pP, frame_t frameP,
|
|||||||
}
|
}
|
||||||
if (pdu_info_p->lsf > 0) {
|
if (pdu_info_p->lsf > 0) {
|
||||||
//msg("rlc_am_rx_check_all_byte_segments(%d) @8\n",sn);
|
//msg("rlc_am_rx_check_all_byte_segments(%d) @8\n",sn);
|
||||||
rlc_am_rx_mark_all_segments_received(rlc_pP, frameP, first_cursor_p);
|
rlc_am_rx_mark_all_segments_received(ctxt_pP, rlc_pP, first_cursor_p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
last_end_so = pdu_info_p->so + pdu_info_p->payload_size;
|
last_end_so = pdu_info_p->so + pdu_info_p->payload_size;
|
||||||
@@ -713,7 +721,11 @@ void rlc_am_rx_check_all_byte_segments(rlc_am_entity_t* rlc_pP, frame_t frameP,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_rx_mark_all_segments_received(rlc_am_entity_t* rlc_pP, frame_t frameP, mem_block_t* fisrt_segment_tbP)
|
void
|
||||||
|
rlc_am_rx_mark_all_segments_received(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t* const rlc_pP,
|
||||||
|
mem_block_t* const fisrt_segment_tbP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
rlc_am_pdu_info_t* pdu_info_p = &((rlc_am_rx_pdu_management_t*)(fisrt_segment_tbP->data))->pdu_info;
|
rlc_am_pdu_info_t* pdu_info_p = &((rlc_am_rx_pdu_management_t*)(fisrt_segment_tbP->data))->pdu_info;
|
||||||
@@ -724,10 +736,10 @@ void rlc_am_rx_mark_all_segments_received(rlc_am_entity_t* rlc_pP, frame_t frame
|
|||||||
cursor_p = fisrt_segment_tbP;
|
cursor_p = fisrt_segment_tbP;
|
||||||
if (cursor_p) {
|
if (cursor_p) {
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][PROCESS RX PDU] ALL SEGMENTS RECEIVED SN %04d:\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][PROCESS RX PDU] ALL SEGMENTS RECEIVED SN %04d:\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
sn);
|
sn);
|
||||||
do {
|
do {
|
||||||
@@ -742,7 +754,10 @@ void rlc_am_rx_mark_all_segments_received(rlc_am_entity_t* rlc_pP, frame_t frame
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_rx_list_reassemble_rlc_sdus(rlc_am_entity_t* rlc_pP,frame_t frameP, uint8_t eNB_flag)
|
void
|
||||||
|
rlc_am_rx_list_reassemble_rlc_sdus(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t* const rlc_pP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
mem_block_t* cursor_p = NULL;
|
mem_block_t* cursor_p = NULL;
|
||||||
@@ -758,7 +773,7 @@ void rlc_am_rx_list_reassemble_rlc_sdus(rlc_am_entity_t* rlc_pP,frame_t frameP,
|
|||||||
do {
|
do {
|
||||||
if (rlc_am_rx_pdu_management_p->all_segments_received > 0) {
|
if (rlc_am_rx_pdu_management_p->all_segments_received > 0) {
|
||||||
cursor_p = list2_remove_head(&rlc_pP->receiver_buffer);
|
cursor_p = list2_remove_head(&rlc_pP->receiver_buffer);
|
||||||
rlc_am_reassemble_pdu(rlc_pP, frameP, eNB_flag, cursor_p);
|
rlc_am_reassemble_pdu(ctxt_pP, rlc_pP, cursor_p);
|
||||||
rlc_am_rx_old_pdu_management = rlc_am_rx_pdu_management_p;
|
rlc_am_rx_old_pdu_management = rlc_am_rx_pdu_management_p;
|
||||||
cursor_p = list2_get_head(&rlc_pP->receiver_buffer);
|
cursor_p = list2_get_head(&rlc_pP->receiver_buffer);
|
||||||
if (cursor_p == NULL) {
|
if (cursor_p == NULL) {
|
||||||
@@ -770,10 +785,10 @@ void rlc_am_rx_list_reassemble_rlc_sdus(rlc_am_entity_t* rlc_pP,frame_t frameP,
|
|||||||
if (list2_get_head(&rlc_pP->receiver_buffer) != cursor_p) {
|
if (list2_get_head(&rlc_pP->receiver_buffer) != cursor_p) {
|
||||||
AssertFatal( 0 == 1,
|
AssertFatal( 0 == 1,
|
||||||
"[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u] LOST PDU DETECTED\n",
|
"[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u] LOST PDU DETECTED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -784,7 +799,10 @@ void rlc_am_rx_list_reassemble_rlc_sdus(rlc_am_entity_t* rlc_pP,frame_t frameP,
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
mem_block_t *
|
mem_block_t *
|
||||||
list2_insert_before_element (mem_block_t * element_to_insert_pP, mem_block_t * element_pP, list2_t * list_pP)
|
list2_insert_before_element (
|
||||||
|
mem_block_t * element_to_insert_pP,
|
||||||
|
mem_block_t * element_pP,
|
||||||
|
list2_t * list_pP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
if ((element_to_insert_pP != NULL) && (element_pP != NULL)) {
|
if ((element_to_insert_pP != NULL) && (element_pP != NULL)) {
|
||||||
@@ -806,7 +824,10 @@ list2_insert_before_element (mem_block_t * element_to_insert_pP, mem_block_t * e
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
mem_block_t *
|
mem_block_t *
|
||||||
list2_insert_after_element (mem_block_t * element_to_insert_pP, mem_block_t * element_pP, list2_t * list_pP)
|
list2_insert_after_element (
|
||||||
|
mem_block_t * element_to_insert_pP,
|
||||||
|
mem_block_t * element_pP,
|
||||||
|
list2_t * list_pP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -828,7 +849,10 @@ list2_insert_after_element (mem_block_t * element_to_insert_pP, mem_block_t * el
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_rx_list_display (rlc_am_entity_t* rlc_pP, char* message_pP)
|
void
|
||||||
|
rlc_am_rx_list_display (
|
||||||
|
const rlc_am_entity_t* const rlc_pP,
|
||||||
|
char* message_pP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
mem_block_t *cursor_p = NULL;
|
mem_block_t *cursor_p = NULL;
|
||||||
|
|||||||
@@ -66,38 +66,37 @@
|
|||||||
#include "PHY/defs.h"
|
#include "PHY/defs.h"
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
/*! \fn signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlcP frame_t frameP, mem_block_t* tbP)
|
/*! \fn signed int rlc_am_rx_list_insert_pdu(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP , mem_block_t* const tbP)
|
||||||
* \brief Insert a PDU in the RX buffer (implemented with a list).
|
* \brief Insert a PDU in the RX buffer (implemented with a list).
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||||
* \param[in] frame Frame index.
|
|
||||||
* \param[in] tbP A PDU embedded in a mem_block_t.
|
* \param[in] tbP A PDU embedded in a mem_block_t.
|
||||||
* \return Zero if the PDU could be inserted in the RX buffer, a negative value if the PDU could not be inserted.
|
* \return Zero if the PDU could be inserted in the RX buffer, a negative value if the PDU could not be inserted.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_rx_list( signed int rlc_am_rx_list_insert_pdu(rlc_am_entity_t* rlcP, frame_t frameP, mem_block_t* tbP);)
|
protected_rlc_am_rx_list( signed int rlc_am_rx_list_insert_pdu(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP, mem_block_t* const tbP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_rx_check_all_byte_segments(rlc_am_entity_t* rlcP, frame_t frameP, mem_block_t* tbP)
|
/*! \fn void rlc_am_rx_check_all_byte_segments(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP, mem_block_t* const tbP)
|
||||||
* \brief Check if all sub-segments of a PDU are received, if yes then call rlc_am_rx_mark_all_segments_received() procedure.
|
* \brief Check if all sub-segments of a PDU are received, if yes then call rlc_am_rx_mark_all_segments_received() procedure.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||||
* \param[in] frame Frame index.
|
|
||||||
* \param[in] tbP A PDU embedded in a mem_block_t.
|
* \param[in] tbP A PDU embedded in a mem_block_t.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_rx_list( void rlc_am_rx_check_all_byte_segments(rlc_am_entity_t* rlcP, frame_t frameP, mem_block_t* tbP);)
|
protected_rlc_am_rx_list( void rlc_am_rx_check_all_byte_segments(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP, mem_block_t* const tbP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_rx_mark_all_segments_received (rlc_am_entity_t* rlcP, frame_t frameP, mem_block_t* first_segment_tbP)
|
/*! \fn void rlc_am_rx_mark_all_segments_received (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP, mem_block_t* const first_segment_tbP)
|
||||||
* \brief Mark all PDUs having the same sequence number as first_segment_tbP with the information that all segments have been received.
|
* \brief Mark all PDUs having the same sequence number as first_segment_tbP with the information that all segments have been received.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||||
* \param[in] frame Frame index.
|
|
||||||
* \param[in] first_segment_tbP A PDU embedded in a mem_block_t, it is the first PDU in the RX buffer (list) that have its sequence number.
|
* \param[in] first_segment_tbP A PDU embedded in a mem_block_t, it is the first PDU in the RX buffer (list) that have its sequence number.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_rx_list( void rlc_am_rx_mark_all_segments_received(rlc_am_entity_t* rlcP, frame_t frameP, mem_block_t* first_segment_tbP);)
|
protected_rlc_am_rx_list( void rlc_am_rx_mark_all_segments_received(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP, mem_block_t* const first_segment_tbP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_rx_list_reassemble_rlc_sdus(rlc_am_entity_t* rlcP,frame_t frameP,uint8_t eNB_flag)
|
/*! \fn void rlc_am_rx_list_reassemble_rlc_sdus(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP)
|
||||||
* \brief Reassembly all SDUS that it is possible to reassembly by parsing the RX buffer and looking for PDUs having the flag 'all segments received'.
|
* \brief Reassembly all SDUS that it is possible to reassembly by parsing the RX buffer and looking for PDUs having the flag 'all segments received'.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||||
* \param[in] frame Frame index.
|
|
||||||
* \param[in] eNB_flag Flag to indicate eNB (1) or UE (0).
|
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_rx_list( void rlc_am_rx_list_reassemble_rlc_sdus(rlc_am_entity_t* rlcP,frame_t frameP,uint8_t eNB_flag);)
|
protected_rlc_am_rx_list( void rlc_am_rx_list_reassemble_rlc_sdus(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP);)
|
||||||
|
|
||||||
/*! \fn mem_block_t* list2_insert_before_element (mem_block_t * element_to_insertP, mem_block_t * elementP, list2_t * listP)
|
/*! \fn mem_block_t* list2_insert_before_element (mem_block_t * element_to_insertP, mem_block_t * elementP, list2_t * listP)
|
||||||
* \brief Insert a PDU embedded in a mem_block_t in a list at a position before a designated element of the list.
|
* \brief Insert a PDU embedded in a mem_block_t in a list at a position before a designated element of the list.
|
||||||
@@ -115,11 +114,11 @@ public_rlc_am_rx_list( mem_block_t* list2_insert_before_element (mem_block_t * e
|
|||||||
*/
|
*/
|
||||||
public_rlc_am_rx_list( mem_block_t* list2_insert_after_element (mem_block_t * element_to_insertP, mem_block_t * elementP, list2_t * listP);)
|
public_rlc_am_rx_list( mem_block_t* list2_insert_after_element (mem_block_t * element_to_insertP, mem_block_t * elementP, list2_t * listP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_rx_list_display (rlc_am_entity_t* rlcP, char* messageP)
|
/*! \fn void rlc_am_rx_list_display (const rlc_am_entity_t* const rlcP, char* messageP)
|
||||||
* \brief Display the dump of the RX buffer.
|
* \brief Display the dump of the RX buffer.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||||
* \param[in] messageP Message to be displayed along with the display of the dump of the RX buffer.
|
* \param[in] messageP Message to be displayed along with the display of the dump of the RX buffer.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_rx_list( void rlc_am_rx_list_display (rlc_am_entity_t* rlcP, char* messageP);)
|
protected_rlc_am_rx_list( void rlc_am_rx_list_display (const rlc_am_entity_t* const rlcP, char* messageP);)
|
||||||
/** @} */
|
/** @} */
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -43,8 +43,8 @@
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_pdu_polling (
|
void rlc_am_pdu_polling (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_entity_t *const rlc_pP,
|
||||||
const frame_t frameP,
|
|
||||||
rlc_am_pdu_sn_10_t *const pdu_pP,
|
rlc_am_pdu_sn_10_t *const pdu_pP,
|
||||||
const int16_t payload_sizeP)
|
const int16_t payload_sizeP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -88,36 +88,36 @@ void rlc_am_pdu_polling (
|
|||||||
|
|
||||||
if (rlc_pP->c_pdu_without_poll >= rlc_pP->poll_pdu) {
|
if (rlc_pP->c_pdu_without_poll >= rlc_pP->poll_pdu) {
|
||||||
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][POLL] SET POLL BECAUSE TX NUM PDU THRESHOLD %d HAS BEEN REACHED\n",
|
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][POLL] SET POLL BECAUSE TX NUM PDU THRESHOLD %d HAS BEEN REACHED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->poll_pdu);
|
rlc_pP->poll_pdu);
|
||||||
}
|
}
|
||||||
if (rlc_pP->c_pdu_without_poll >= rlc_pP->poll_pdu) {
|
if (rlc_pP->c_pdu_without_poll >= rlc_pP->poll_pdu) {
|
||||||
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][POLL] SET POLL BECAUSE TX NUM BYTES THRESHOLD %d HAS BEEN REACHED\n",
|
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][POLL] SET POLL BECAUSE TX NUM BYTES THRESHOLD %d HAS BEEN REACHED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->poll_byte);
|
rlc_pP->poll_byte);
|
||||||
}
|
}
|
||||||
if ((rlc_pP->sdu_buffer_occupancy == 0) && (rlc_pP->retrans_num_bytes_to_retransmit == 0)) {
|
if ((rlc_pP->sdu_buffer_occupancy == 0) && (rlc_pP->retrans_num_bytes_to_retransmit == 0)) {
|
||||||
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][POLL] SET POLL BECAUSE TX BUFFERS ARE EMPTY\n",
|
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][POLL] SET POLL BECAUSE TX BUFFERS ARE EMPTY\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
}
|
}
|
||||||
if (rlc_pP->vt_s == rlc_pP->vt_ms) {
|
if (rlc_pP->vt_s == rlc_pP->vt_ms) {
|
||||||
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][POLL] SET POLL BECAUSE OF WINDOW STALLING\n",
|
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][POLL] SET POLL BECAUSE OF WINDOW STALLING\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
}
|
}
|
||||||
pdu_pP->b1 = pdu_pP->b1 | 0x20;
|
pdu_pP->b1 = pdu_pP->b1 | 0x20;
|
||||||
@@ -126,9 +126,9 @@ void rlc_am_pdu_polling (
|
|||||||
|
|
||||||
rlc_pP->poll_sn = (rlc_pP->vt_s -1) & RLC_AM_SN_MASK;
|
rlc_pP->poll_sn = (rlc_pP->vt_s -1) & RLC_AM_SN_MASK;
|
||||||
//optimisation if (!rlc_pP->t_poll_retransmit.running) {
|
//optimisation if (!rlc_pP->t_poll_retransmit.running) {
|
||||||
rlc_am_start_timer_poll_retransmit(rlc_pP,frameP);
|
rlc_am_start_timer_poll_retransmit(ctxt_pP, rlc_pP);
|
||||||
//optimisation } else {
|
//optimisation } else {
|
||||||
//optimisation rlc_pP->t_poll_retransmit.frame_time_out = frameP + rlc_pP->t_poll_retransmit.time_out;
|
//optimisation rlc_pP->t_poll_retransmit.frame_time_out = ctxt_pP->frame + rlc_pP->t_poll_retransmit.time_out;
|
||||||
//optimisation }
|
//optimisation }
|
||||||
} else {
|
} else {
|
||||||
pdu_pP->b1 = pdu_pP->b1 & 0xDF;
|
pdu_pP->b1 = pdu_pP->b1 & 0xDF;
|
||||||
@@ -136,8 +136,8 @@ void rlc_am_pdu_polling (
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_segment_10 (
|
void rlc_am_segment_10 (
|
||||||
rlc_am_entity_t *const rlc_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const frame_t frameP)
|
rlc_am_entity_t *const rlc_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
list_t pdus;
|
list_t pdus;
|
||||||
@@ -171,10 +171,10 @@ void rlc_am_segment_10 (
|
|||||||
signed int max_li_overhead = 0;
|
signed int max_li_overhead = 0;
|
||||||
|
|
||||||
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] rlc_pP->current_sdu_index %d rlc_pP->next_sdu_index %d rlc_pP->input_sdus[rlc_pP->current_sdu_index].mem_block %p sdu_buffer_occupancy %d\n",
|
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] rlc_pP->current_sdu_index %d rlc_pP->next_sdu_index %d rlc_pP->input_sdus[rlc_pP->current_sdu_index].mem_block %p sdu_buffer_occupancy %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->current_sdu_index,
|
rlc_pP->current_sdu_index,
|
||||||
rlc_pP->next_sdu_index,
|
rlc_pP->next_sdu_index,
|
||||||
@@ -184,7 +184,7 @@ void rlc_am_segment_10 (
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//msg ("[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT]\n", rlc_pP->module_id, rlc_pP->rb_id, frameP);
|
//msg ("[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT]\n", rlc_pP->module_id, rlc_pP->rb_id, ctxt_pP->frame);
|
||||||
list_init (&pdus, NULL); // param string identifying the list is NULL
|
list_init (&pdus, NULL); // param string identifying the list is NULL
|
||||||
pdu_mem_p = NULL;
|
pdu_mem_p = NULL;
|
||||||
|
|
||||||
@@ -192,10 +192,10 @@ void rlc_am_segment_10 (
|
|||||||
pthread_mutex_lock(&rlc_pP->lock_input_sdus);
|
pthread_mutex_lock(&rlc_pP->lock_input_sdus);
|
||||||
while ((rlc_pP->input_sdus[rlc_pP->current_sdu_index].mem_block) && (nb_bytes_to_transmit > 0) ) {
|
while ((rlc_pP->input_sdus[rlc_pP->current_sdu_index].mem_block) && (nb_bytes_to_transmit > 0) ) {
|
||||||
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] nb_bytes_to_transmit %d BO %d\n",
|
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] nb_bytes_to_transmit %d BO %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
nb_bytes_to_transmit,
|
nb_bytes_to_transmit,
|
||||||
rlc_pP->sdu_buffer_occupancy);
|
rlc_pP->sdu_buffer_occupancy);
|
||||||
@@ -207,46 +207,46 @@ void rlc_am_segment_10 (
|
|||||||
max_li_overhead = (((rlc_pP->nb_sdu_no_segmented - 1) * 3) / 2) + ((rlc_pP->nb_sdu_no_segmented - 1) % 2);
|
max_li_overhead = (((rlc_pP->nb_sdu_no_segmented - 1) * 3) / 2) + ((rlc_pP->nb_sdu_no_segmented - 1) % 2);
|
||||||
}
|
}
|
||||||
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] max_li_overhead %d\n",
|
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] max_li_overhead %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
max_li_overhead);
|
max_li_overhead);
|
||||||
if (nb_bytes_to_transmit >= (rlc_pP->sdu_buffer_occupancy + RLC_AM_HEADER_MIN_SIZE + max_li_overhead)) {
|
if (nb_bytes_to_transmit >= (rlc_pP->sdu_buffer_occupancy + RLC_AM_HEADER_MIN_SIZE + max_li_overhead)) {
|
||||||
data_pdu_size = rlc_pP->sdu_buffer_occupancy + RLC_AM_HEADER_MIN_SIZE + max_li_overhead;
|
data_pdu_size = rlc_pP->sdu_buffer_occupancy + RLC_AM_HEADER_MIN_SIZE + max_li_overhead;
|
||||||
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] alloc PDU size %d bytes to contain not all bytes requested by MAC but all BO of RLC@1\n",
|
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] alloc PDU size %d bytes to contain not all bytes requested by MAC but all BO of RLC@1\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
data_pdu_size);
|
data_pdu_size);
|
||||||
} else {
|
} else {
|
||||||
data_pdu_size = nb_bytes_to_transmit;
|
data_pdu_size = nb_bytes_to_transmit;
|
||||||
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] alloc PDU size %d bytes to contain all bytes requested by MAC@1\n",
|
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] alloc PDU size %d bytes to contain all bytes requested by MAC@1\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
data_pdu_size);
|
data_pdu_size);
|
||||||
}
|
}
|
||||||
if (!(pdu_mem_p = get_free_mem_block (data_pdu_size + sizeof(struct mac_tb_req)))) {
|
if (!(pdu_mem_p = get_free_mem_block (data_pdu_size + sizeof(struct mac_tb_req)))) {
|
||||||
LOG_C(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] ERROR COULD NOT GET NEW PDU, EXIT\n",
|
LOG_C(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] ERROR COULD NOT GET NEW PDU, EXIT\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
pthread_mutex_unlock(&rlc_pP->lock_input_sdus);
|
pthread_mutex_unlock(&rlc_pP->lock_input_sdus);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] get new PDU %d bytes\n",
|
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] get new PDU %d bytes\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
data_pdu_size);
|
data_pdu_size);
|
||||||
pdu_remaining_size = data_pdu_size - RLC_AM_HEADER_MIN_SIZE;
|
pdu_remaining_size = data_pdu_size - RLC_AM_HEADER_MIN_SIZE;
|
||||||
@@ -314,10 +314,10 @@ void rlc_am_segment_10 (
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] sdu_mngt_p->sdu_remaining_size=%d test_pdu_remaining_size=%d test_li_length_in_bytes=%d\n",
|
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] sdu_mngt_p->sdu_remaining_size=%d test_pdu_remaining_size=%d test_li_length_in_bytes=%d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
sdu_mngt_p->sdu_remaining_size,
|
sdu_mngt_p->sdu_remaining_size,
|
||||||
test_pdu_remaining_size,
|
test_pdu_remaining_size,
|
||||||
@@ -344,10 +344,10 @@ void rlc_am_segment_10 (
|
|||||||
// Do the real filling of the pdu_p
|
// Do the real filling of the pdu_p
|
||||||
//----------------------------------------
|
//----------------------------------------
|
||||||
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u] data shift %d Bytes num_li %d\n",
|
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u] data shift %d Bytes num_li %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
((test_num_li*3) +1) >> 1,
|
((test_num_li*3) +1) >> 1,
|
||||||
test_num_li);
|
test_num_li);
|
||||||
@@ -368,19 +368,19 @@ void rlc_am_segment_10 (
|
|||||||
sdu_mngt_p = &rlc_pP->input_sdus[rlc_pP->current_sdu_index];
|
sdu_mngt_p = &rlc_pP->input_sdus[rlc_pP->current_sdu_index];
|
||||||
if (sdu_mngt_p->sdu_segmented_size == 0) {
|
if (sdu_mngt_p->sdu_segmented_size == 0) {
|
||||||
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] GET NEW SDU %p AVAILABLE SIZE %d Bytes\n",
|
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] GET NEW SDU %p AVAILABLE SIZE %d Bytes\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
sdu_mngt_p,
|
sdu_mngt_p,
|
||||||
sdu_mngt_p->sdu_remaining_size);
|
sdu_mngt_p->sdu_remaining_size);
|
||||||
} else {
|
} else {
|
||||||
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] GET AGAIN SDU %p REMAINING AVAILABLE SIZE %d Bytes / %d Bytes LENGTH \n",
|
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] GET AGAIN SDU %p REMAINING AVAILABLE SIZE %d Bytes / %d Bytes LENGTH \n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
sdu_mngt_p,
|
sdu_mngt_p,
|
||||||
sdu_mngt_p->sdu_remaining_size,
|
sdu_mngt_p->sdu_remaining_size,
|
||||||
@@ -390,13 +390,13 @@ void rlc_am_segment_10 (
|
|||||||
|
|
||||||
if (sdu_mngt_p->sdu_remaining_size > pdu_remaining_size) {
|
if (sdu_mngt_p->sdu_remaining_size > pdu_remaining_size) {
|
||||||
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] Filling all remaining PDU with %d bytes\n",
|
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] Filling all remaining PDU with %d bytes\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
pdu_remaining_size);
|
pdu_remaining_size);
|
||||||
//msg ("[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] pdu_mem_p %p pdu_p %p pdu_p->data %p data %p data_sdu_p %p pdu_remaining_size %d\n", rlc_pP->module_id, rlc_pP->rb_id, frameP, pdu_mem_p, pdu_p, pdu_p->data, data, data_sdu_p,pdu_remaining_size);
|
//msg ("[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] pdu_mem_p %p pdu_p %p pdu_p->data %p data %p data_sdu_p %p pdu_remaining_size %d\n", rlc_pP->module_id, rlc_pP->rb_id, ctxt_pP->frame, pdu_mem_p, pdu_p, pdu_p->data, data, data_sdu_p,pdu_remaining_size);
|
||||||
|
|
||||||
memcpy(data, data_sdu_p, pdu_remaining_size);
|
memcpy(data, data_sdu_p, pdu_remaining_size);
|
||||||
pdu_mngt_p->payload_size += pdu_remaining_size;
|
pdu_mngt_p->payload_size += pdu_remaining_size;
|
||||||
@@ -408,19 +408,19 @@ void rlc_am_segment_10 (
|
|||||||
continue_fill_pdu_with_sdu = 0;
|
continue_fill_pdu_with_sdu = 0;
|
||||||
pdu_remaining_size = 0;
|
pdu_remaining_size = 0;
|
||||||
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] sdu_remaining_size %d bytes sdu_segmented_size %d bytes\n",
|
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] sdu_remaining_size %d bytes sdu_segmented_size %d bytes\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
sdu_mngt_p->sdu_remaining_size,
|
sdu_mngt_p->sdu_remaining_size,
|
||||||
sdu_mngt_p->sdu_segmented_size);
|
sdu_mngt_p->sdu_segmented_size);
|
||||||
} else if (sdu_mngt_p->sdu_remaining_size == pdu_remaining_size) {
|
} else if (sdu_mngt_p->sdu_remaining_size == pdu_remaining_size) {
|
||||||
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] Exactly Filling remaining PDU with %d remaining bytes of SDU\n",
|
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] Exactly Filling remaining PDU with %d remaining bytes of SDU\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
pdu_remaining_size);
|
pdu_remaining_size);
|
||||||
memcpy(data, data_sdu_p, pdu_remaining_size);
|
memcpy(data, data_sdu_p, pdu_remaining_size);
|
||||||
@@ -428,7 +428,7 @@ void rlc_am_segment_10 (
|
|||||||
|
|
||||||
// free SDU
|
// free SDU
|
||||||
rlc_pP->sdu_buffer_occupancy -= sdu_mngt_p->sdu_remaining_size;
|
rlc_pP->sdu_buffer_occupancy -= sdu_mngt_p->sdu_remaining_size;
|
||||||
rlc_am_free_in_sdu_data(rlc_pP, rlc_pP->current_sdu_index);
|
rlc_am_free_in_sdu_data(ctxt_pP, rlc_pP, rlc_pP->current_sdu_index);
|
||||||
//free_mem_block (rlc_pP->input_sdus[rlc_pP->current_sdu_index]);
|
//free_mem_block (rlc_pP->input_sdus[rlc_pP->current_sdu_index]);
|
||||||
//rlc_pP->input_sdus[rlc_pP->current_sdu_index] = NULL;
|
//rlc_pP->input_sdus[rlc_pP->current_sdu_index] = NULL;
|
||||||
//rlc_pP->nb_sdu -= 1;
|
//rlc_pP->nb_sdu -= 1;
|
||||||
@@ -441,10 +441,10 @@ void rlc_am_segment_10 (
|
|||||||
} else if ((sdu_mngt_p->sdu_remaining_size + (li_length_in_bytes ^ 3)) < pdu_remaining_size ) {
|
} else if ((sdu_mngt_p->sdu_remaining_size + (li_length_in_bytes ^ 3)) < pdu_remaining_size ) {
|
||||||
if (fill_num_li == (RLC_AM_MAX_SDU_IN_PDU - 1)) {
|
if (fill_num_li == (RLC_AM_MAX_SDU_IN_PDU - 1)) {
|
||||||
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] [SIZE %d] REACHING RLC_AM_MAX_SDU_IN_PDU LIs -> STOP SEGMENTATION FOR THIS PDU SDU\n",
|
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] [SIZE %d] REACHING RLC_AM_MAX_SDU_IN_PDU LIs -> STOP SEGMENTATION FOR THIS PDU SDU\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
sdu_mngt_p->sdu_remaining_size);
|
sdu_mngt_p->sdu_remaining_size);
|
||||||
memcpy(data, data_sdu_p, sdu_mngt_p->sdu_remaining_size);
|
memcpy(data, data_sdu_p, sdu_mngt_p->sdu_remaining_size);
|
||||||
@@ -452,7 +452,7 @@ void rlc_am_segment_10 (
|
|||||||
pdu_remaining_size = 0; //Forced to 0 pdu_remaining_size - sdu_mngt_p->sdu_remaining_size;
|
pdu_remaining_size = 0; //Forced to 0 pdu_remaining_size - sdu_mngt_p->sdu_remaining_size;
|
||||||
// free SDU
|
// free SDU
|
||||||
rlc_pP->sdu_buffer_occupancy -= sdu_mngt_p->sdu_remaining_size;
|
rlc_pP->sdu_buffer_occupancy -= sdu_mngt_p->sdu_remaining_size;
|
||||||
rlc_am_free_in_sdu_data(rlc_pP, rlc_pP->current_sdu_index);
|
rlc_am_free_in_sdu_data(ctxt_pP, rlc_pP, rlc_pP->current_sdu_index);
|
||||||
//rlc_pP->input_sdus[rlc_pP->current_sdu_index] = NULL;
|
//rlc_pP->input_sdus[rlc_pP->current_sdu_index] = NULL;
|
||||||
//rlc_pP->nb_sdu -= 1;
|
//rlc_pP->nb_sdu -= 1;
|
||||||
rlc_pP->current_sdu_index = (rlc_pP->current_sdu_index + 1) % RLC_AM_SDU_CONTROL_BUFFER_SIZE;
|
rlc_pP->current_sdu_index = (rlc_pP->current_sdu_index + 1) % RLC_AM_SDU_CONTROL_BUFFER_SIZE;
|
||||||
@@ -462,10 +462,10 @@ void rlc_am_segment_10 (
|
|||||||
fi_last_byte_pdu_is_last_byte_sdu = 1;
|
fi_last_byte_pdu_is_last_byte_sdu = 1;
|
||||||
} else {
|
} else {
|
||||||
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] Filling PDU with %d all remaining bytes of SDU\n",
|
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] Filling PDU with %d all remaining bytes of SDU\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
sdu_mngt_p->sdu_remaining_size);
|
sdu_mngt_p->sdu_remaining_size);
|
||||||
memcpy(data, data_sdu_p, sdu_mngt_p->sdu_remaining_size);
|
memcpy(data, data_sdu_p, sdu_mngt_p->sdu_remaining_size);
|
||||||
@@ -485,10 +485,10 @@ void rlc_am_segment_10 (
|
|||||||
e_li_p->b1 = e_li_p->b1 | (sdu_mngt_p->sdu_remaining_size >> 4);
|
e_li_p->b1 = e_li_p->b1 | (sdu_mngt_p->sdu_remaining_size >> 4);
|
||||||
e_li_p->b2 = sdu_mngt_p->sdu_remaining_size << 4;
|
e_li_p->b2 = sdu_mngt_p->sdu_remaining_size << 4;
|
||||||
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] set e_li_p->b1=0x%02X set e_li_p->b2=0x%02X fill_num_li=%d test_num_li=%d\n",
|
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] set e_li_p->b1=0x%02X set e_li_p->b2=0x%02X fill_num_li=%d test_num_li=%d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
e_li_p->b1,
|
e_li_p->b1,
|
||||||
e_li_p->b2,
|
e_li_p->b2,
|
||||||
@@ -503,10 +503,10 @@ void rlc_am_segment_10 (
|
|||||||
e_li_p->b2 = e_li_p->b2 | (sdu_mngt_p->sdu_remaining_size >> 8);
|
e_li_p->b2 = e_li_p->b2 | (sdu_mngt_p->sdu_remaining_size >> 8);
|
||||||
e_li_p->b3 = sdu_mngt_p->sdu_remaining_size & 0xFF;
|
e_li_p->b3 = sdu_mngt_p->sdu_remaining_size & 0xFF;
|
||||||
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] set e_li_p->b2=0x%02X set e_li_p->b3=0x%02X fill_num_li=%d test_num_li=%d\n",
|
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] set e_li_p->b2=0x%02X set e_li_p->b3=0x%02X fill_num_li=%d test_num_li=%d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
e_li_p->b2,
|
e_li_p->b2,
|
||||||
e_li_p->b3,
|
e_li_p->b3,
|
||||||
@@ -520,7 +520,7 @@ void rlc_am_segment_10 (
|
|||||||
rlc_pP->sdu_buffer_occupancy -= sdu_mngt_p->sdu_remaining_size;
|
rlc_pP->sdu_buffer_occupancy -= sdu_mngt_p->sdu_remaining_size;
|
||||||
sdu_mngt_p->sdu_remaining_size = 0;
|
sdu_mngt_p->sdu_remaining_size = 0;
|
||||||
|
|
||||||
rlc_am_free_in_sdu_data(rlc_pP, rlc_pP->current_sdu_index);
|
rlc_am_free_in_sdu_data(ctxt_pP, rlc_pP, rlc_pP->current_sdu_index);
|
||||||
//free_mem_block (rlc_pP->input_sdus[rlc_pP->current_sdu_index]);
|
//free_mem_block (rlc_pP->input_sdus[rlc_pP->current_sdu_index]);
|
||||||
//rlc_pP->input_sdus[rlc_pP->current_sdu_index] = NULL;
|
//rlc_pP->input_sdus[rlc_pP->current_sdu_index] = NULL;
|
||||||
//rlc_pP->nb_sdu -= 1;
|
//rlc_pP->nb_sdu -= 1;
|
||||||
@@ -528,10 +528,10 @@ void rlc_am_segment_10 (
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] Filling PDU with %d all remaining bytes of SDU and reduce TB size by %d bytes\n",
|
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] Filling PDU with %d all remaining bytes of SDU and reduce TB size by %d bytes\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
sdu_mngt_p->sdu_remaining_size,
|
sdu_mngt_p->sdu_remaining_size,
|
||||||
pdu_remaining_size - sdu_mngt_p->sdu_remaining_size);
|
pdu_remaining_size - sdu_mngt_p->sdu_remaining_size);
|
||||||
@@ -543,7 +543,7 @@ void rlc_am_segment_10 (
|
|||||||
pdu_remaining_size = pdu_remaining_size - sdu_mngt_p->sdu_remaining_size;
|
pdu_remaining_size = pdu_remaining_size - sdu_mngt_p->sdu_remaining_size;
|
||||||
// free SDU
|
// free SDU
|
||||||
rlc_pP->sdu_buffer_occupancy -= sdu_mngt_p->sdu_remaining_size;
|
rlc_pP->sdu_buffer_occupancy -= sdu_mngt_p->sdu_remaining_size;
|
||||||
rlc_am_free_in_sdu_data(rlc_pP, rlc_pP->current_sdu_index);
|
rlc_am_free_in_sdu_data(ctxt_pP, rlc_pP, rlc_pP->current_sdu_index);
|
||||||
//rlc_pP->input_sdus[rlc_pP->current_sdu_index] = NULL;
|
//rlc_pP->input_sdus[rlc_pP->current_sdu_index] = NULL;
|
||||||
//rlc_pP->nb_sdu -= 1;
|
//rlc_pP->nb_sdu -= 1;
|
||||||
rlc_pP->current_sdu_index = (rlc_pP->current_sdu_index + 1) % RLC_AM_SDU_CONTROL_BUFFER_SIZE;
|
rlc_pP->current_sdu_index = (rlc_pP->current_sdu_index + 1) % RLC_AM_SDU_CONTROL_BUFFER_SIZE;
|
||||||
@@ -570,10 +570,10 @@ void rlc_am_segment_10 (
|
|||||||
pdu_p->b1 = pdu_p->b1 | 0x04;
|
pdu_p->b1 = pdu_p->b1 | 0x04;
|
||||||
}
|
}
|
||||||
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] SEND PDU SN %04d SIZE %d BYTES PAYLOAD SIZE %d BYTES\n",
|
LOG_T(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][SEGMENT] SEND PDU SN %04d SIZE %d BYTES PAYLOAD SIZE %d BYTES\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->vt_s,
|
rlc_pP->vt_s,
|
||||||
data_pdu_size - pdu_remaining_size,
|
data_pdu_size - pdu_remaining_size,
|
||||||
@@ -592,7 +592,7 @@ void rlc_am_segment_10 (
|
|||||||
pdu_tb_req_p->tb_size = data_pdu_size - pdu_remaining_size;
|
pdu_tb_req_p->tb_size = data_pdu_size - pdu_remaining_size;
|
||||||
#warning "why 3000: changed to RLC_SDU_MAX_SIZE "
|
#warning "why 3000: changed to RLC_SDU_MAX_SIZE "
|
||||||
assert(pdu_tb_req_p->tb_size < RLC_SDU_MAX_SIZE );
|
assert(pdu_tb_req_p->tb_size < RLC_SDU_MAX_SIZE );
|
||||||
rlc_am_pdu_polling(rlc_pP, frameP,pdu_p, pdu_mngt_p->payload_size);
|
rlc_am_pdu_polling(ctxt_pP, rlc_pP, pdu_p, pdu_mngt_p->payload_size);
|
||||||
|
|
||||||
//list_add_tail_eurecom (pdu_mem_p, &rlc_pP->segmentation_pdu_list);
|
//list_add_tail_eurecom (pdu_mem_p, &rlc_pP->segmentation_pdu_list);
|
||||||
pdu_mngt_p->mem_block = pdu_mem_p;
|
pdu_mngt_p->mem_block = pdu_mem_p;
|
||||||
@@ -609,7 +609,7 @@ void rlc_am_segment_10 (
|
|||||||
//nb_bytes_to_transmit = nb_bytes_to_transmit - data_pdu_size;
|
//nb_bytes_to_transmit = nb_bytes_to_transmit - data_pdu_size;
|
||||||
nb_bytes_to_transmit = 0; // 1 PDU only
|
nb_bytes_to_transmit = 0; // 1 PDU only
|
||||||
|
|
||||||
mem_block_t* copy = rlc_am_retransmit_get_copy (rlc_pP, frameP,(rlc_pP->vt_s-1) & RLC_AM_SN_MASK);
|
mem_block_t* copy = rlc_am_retransmit_get_copy (ctxt_pP, rlc_pP, (rlc_pP->vt_s-1) & RLC_AM_SN_MASK);
|
||||||
list_add_tail_eurecom (copy, &rlc_pP->segmentation_pdu_list);
|
list_add_tail_eurecom (copy, &rlc_pP->segmentation_pdu_list);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,20 +58,20 @@
|
|||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/*! \fn void rlc_am_pdu_polling (rlc_am_entity_t *rlcP, frame_t frameP, rlc_am_pdu_sn_10_t *pduP, int16_t payload_sizeP)
|
/*! \fn void rlc_am_pdu_polling (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *const rlcP, rlc_am_pdu_sn_10_t *pduP, int16_t payload_sizeP)
|
||||||
* \brief Set or not the poll bit in the PDU header depending on RLC AM protocol variables.
|
* \brief Set or not the poll bit in the PDU header depending on RLC AM protocol variables.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||||
* \param[in[ frame Frame index.
|
|
||||||
* \param[in] pduP Pointer on the header of the PDU in order to be able to set the poll bit if necessary.
|
* \param[in] pduP Pointer on the header of the PDU in order to be able to set the poll bit if necessary.
|
||||||
* \param[in] payload_sizeP Size of the payload of the PDU.
|
* \param[in] payload_sizeP Size of the payload of the PDU.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_segment(void rlc_am_pdu_polling (rlc_am_entity_t *rlcP, frame_t frameP, rlc_am_pdu_sn_10_t *pduP, int16_t payload_sizeP);)
|
protected_rlc_am_segment(void rlc_am_pdu_polling (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *const rlcP, rlc_am_pdu_sn_10_t *pduP, int16_t payload_sizeP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_segment_10 (rlc_am_entity_t *rlcP)
|
/*! \fn void rlc_am_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlcP)
|
||||||
* \brief Segment a PDU with 10 bits sequence number, based on segmentation information given by MAC (size to transmit).
|
* \brief Segment a PDU with 10 bits sequence number, based on segmentation information given by MAC (size to transmit).
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||||
* \param[in[ frame Frame index.
|
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_segment(void rlc_am_segment_10 (rlc_am_entity_t *rlcP,frame_t frameP);)
|
protected_rlc_am_segment(void rlc_am_segment_10 (const protocol_ctxt_t* const ctxt_pP,rlc_am_entity_t *const rlcP);)
|
||||||
/** @} */
|
/** @} */
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
@@ -36,7 +36,8 @@
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_clear_holes (
|
void rlc_am_clear_holes (
|
||||||
rlc_am_entity_t * const rlc_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t *const rlc_pP,
|
||||||
const rlc_sn_t snP)
|
const rlc_sn_t snP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
@@ -44,6 +45,7 @@ void rlc_am_clear_holes (
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_shift_down_holes (
|
void rlc_am_shift_down_holes (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_entity_t *const rlc_pP,
|
||||||
const rlc_sn_t snP,
|
const rlc_sn_t snP,
|
||||||
const int indexP)
|
const int indexP)
|
||||||
@@ -58,6 +60,7 @@ void rlc_am_shift_down_holes (
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_shift_up_holes (
|
void rlc_am_shift_up_holes (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_entity_t *const rlc_pP,
|
||||||
const rlc_sn_t snP,
|
const rlc_sn_t snP,
|
||||||
const int indexP)
|
const int indexP)
|
||||||
@@ -74,8 +77,8 @@ void rlc_am_shift_up_holes (
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_remove_hole (
|
void rlc_am_remove_hole (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_entity_t *const rlc_pP,
|
||||||
const frame_t frameP,
|
|
||||||
const rlc_sn_t snP,
|
const rlc_sn_t snP,
|
||||||
const sdu_size_t so_startP,
|
const sdu_size_t so_startP,
|
||||||
const sdu_size_t so_stopP)
|
const sdu_size_t so_stopP)
|
||||||
@@ -84,10 +87,10 @@ void rlc_am_remove_hole (
|
|||||||
int i;
|
int i;
|
||||||
#ifdef TRACE_RLC_AM_HOLE
|
#ifdef TRACE_RLC_AM_HOLE
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][HOLE] REMOVE HOLE SN %04d so_startP %05d so_stopP %05d rlc_pP->pdu_retrans_buffer[snP].nack_so_start %05d rlc_pP->pdu_retrans_buffer[snP].nack_so_stop %05d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][HOLE] REMOVE HOLE SN %04d so_startP %05d so_stopP %05d rlc_pP->pdu_retrans_buffer[snP].nack_so_start %05d rlc_pP->pdu_retrans_buffer[snP].nack_so_stop %05d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
snP,
|
snP,
|
||||||
so_startP,
|
so_startP,
|
||||||
@@ -102,10 +105,10 @@ void rlc_am_remove_hole (
|
|||||||
assert(so_stopP <= rlc_pP->pdu_retrans_buffer[snP].nack_so_stop);
|
assert(so_stopP <= rlc_pP->pdu_retrans_buffer[snP].nack_so_stop);
|
||||||
#ifdef TRACE_RLC_AM_HOLE
|
#ifdef TRACE_RLC_AM_HOLE
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][HOLE] REMOVE HOLE SN %04d MODIFIED nack_so_start %05d->%05d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][HOLE] REMOVE HOLE SN %04d MODIFIED nack_so_start %05d->%05d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
snP,
|
snP,
|
||||||
rlc_pP->pdu_retrans_buffer[snP].nack_so_start,
|
rlc_pP->pdu_retrans_buffer[snP].nack_so_start,
|
||||||
@@ -121,7 +124,7 @@ void rlc_am_remove_hole (
|
|||||||
for (i = 0; i < rlc_pP->pdu_retrans_buffer[snP].num_holes; i++) {
|
for (i = 0; i < rlc_pP->pdu_retrans_buffer[snP].num_holes; i++) {
|
||||||
if (so_startP <= rlc_pP->pdu_retrans_buffer[snP].hole_so_start[i]) {
|
if (so_startP <= rlc_pP->pdu_retrans_buffer[snP].hole_so_start[i]) {
|
||||||
if (so_stopP >= rlc_pP->pdu_retrans_buffer[snP].hole_so_stop[i]) {
|
if (so_stopP >= rlc_pP->pdu_retrans_buffer[snP].hole_so_stop[i]) {
|
||||||
rlc_am_shift_down_holes(rlc_pP, snP, i);
|
rlc_am_shift_down_holes(ctxt_pP, rlc_pP, snP, i);
|
||||||
i = i - 1;
|
i = i - 1;
|
||||||
} else {
|
} else {
|
||||||
rlc_pP->pdu_retrans_buffer[snP].hole_so_start[i] = so_stopP;
|
rlc_pP->pdu_retrans_buffer[snP].hole_so_start[i] = so_stopP;
|
||||||
@@ -134,10 +137,10 @@ void rlc_am_remove_hole (
|
|||||||
}
|
}
|
||||||
#ifdef TRACE_RLC_AM_HOLE
|
#ifdef TRACE_RLC_AM_HOLE
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][HOLE] REMOVE HOLE SN %04d NOW nack_so_start %05d nack_so_stop %05d num holes %d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][HOLE] REMOVE HOLE SN %04d NOW nack_so_start %05d nack_so_stop %05d num holes %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
snP,
|
snP,
|
||||||
rlc_pP->pdu_retrans_buffer[snP].nack_so_start,
|
rlc_pP->pdu_retrans_buffer[snP].nack_so_start,
|
||||||
@@ -150,7 +153,7 @@ void rlc_am_remove_hole (
|
|||||||
if (so_startP <= rlc_pP->pdu_retrans_buffer[snP].hole_so_stop[i]) {
|
if (so_startP <= rlc_pP->pdu_retrans_buffer[snP].hole_so_stop[i]) {
|
||||||
if (so_stopP < rlc_pP->pdu_retrans_buffer[snP].hole_so_stop[i]) {
|
if (so_stopP < rlc_pP->pdu_retrans_buffer[snP].hole_so_stop[i]) {
|
||||||
// BAD CASE: 1 HOLE IS SPLITTED IN 2 HOLES
|
// BAD CASE: 1 HOLE IS SPLITTED IN 2 HOLES
|
||||||
rlc_am_shift_up_holes(rlc_pP, snP, i+1);
|
rlc_am_shift_up_holes(ctxt_pP, rlc_pP, snP, i+1);
|
||||||
rlc_pP->pdu_retrans_buffer[snP].hole_so_start[i+1] = so_startP+1;
|
rlc_pP->pdu_retrans_buffer[snP].hole_so_start[i+1] = so_startP+1;
|
||||||
rlc_pP->pdu_retrans_buffer[snP].hole_so_stop[i+1] = rlc_pP->pdu_retrans_buffer[snP].hole_so_stop[i];
|
rlc_pP->pdu_retrans_buffer[snP].hole_so_stop[i+1] = rlc_pP->pdu_retrans_buffer[snP].hole_so_stop[i];
|
||||||
|
|
||||||
@@ -171,10 +174,10 @@ void rlc_am_remove_hole (
|
|||||||
}
|
}
|
||||||
#ifdef TRACE_RLC_AM_HOLE
|
#ifdef TRACE_RLC_AM_HOLE
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][HOLE] REMOVE HOLE SN %04d NOW nack_so_start %05d nack_so_stop %05d num holes %d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][HOLE] REMOVE HOLE SN %04d NOW nack_so_start %05d nack_so_stop %05d num holes %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
snP,
|
snP,
|
||||||
rlc_pP->pdu_retrans_buffer[snP].nack_so_start,
|
rlc_pP->pdu_retrans_buffer[snP].nack_so_start,
|
||||||
@@ -185,8 +188,8 @@ void rlc_am_remove_hole (
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_get_next_hole (
|
void rlc_am_get_next_hole (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_entity_t *const rlc_pP,
|
||||||
const frame_t frameP,
|
|
||||||
const rlc_sn_t snP,
|
const rlc_sn_t snP,
|
||||||
sdu_size_t* const so_startP,
|
sdu_size_t* const so_startP,
|
||||||
sdu_size_t* const so_stopP)
|
sdu_size_t* const so_stopP)
|
||||||
@@ -197,10 +200,10 @@ void rlc_am_get_next_hole (
|
|||||||
*so_stopP = rlc_pP->pdu_retrans_buffer[snP].nack_so_stop;
|
*so_stopP = rlc_pP->pdu_retrans_buffer[snP].nack_so_stop;
|
||||||
#ifdef TRACE_RLC_AM_HOLE
|
#ifdef TRACE_RLC_AM_HOLE
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][HOLE] rlc_am_get_next_hole(SN %04d) %05d->%05d (NUM HOLES == 0)\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][HOLE] rlc_am_get_next_hole(SN %04d) %05d->%05d (NUM HOLES == 0)\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
snP,
|
snP,
|
||||||
*so_startP,
|
*so_startP,
|
||||||
@@ -211,10 +214,10 @@ void rlc_am_get_next_hole (
|
|||||||
*so_stopP = rlc_pP->pdu_retrans_buffer[snP].hole_so_stop[0];
|
*so_stopP = rlc_pP->pdu_retrans_buffer[snP].hole_so_stop[0];
|
||||||
#ifdef TRACE_RLC_AM_HOLE
|
#ifdef TRACE_RLC_AM_HOLE
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][HOLE] rlc_am_get_next_hole(SN %04d) %05d->%05d (NUM HOLES == %d)\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][HOLE] rlc_am_get_next_hole(SN %04d) %05d->%05d (NUM HOLES == %d)\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
snP,
|
snP,
|
||||||
*so_startP,
|
*so_startP,
|
||||||
@@ -225,10 +228,10 @@ void rlc_am_get_next_hole (
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_add_hole (
|
void rlc_am_add_hole (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_entity_t *const rlc_pP,
|
||||||
const frame_t frameP,
|
|
||||||
const rlc_sn_t snP,
|
const rlc_sn_t snP,
|
||||||
sdu_size_t so_startP,
|
const sdu_size_t so_startP,
|
||||||
sdu_size_t so_stopP)
|
sdu_size_t so_stopP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
@@ -246,10 +249,10 @@ void rlc_am_add_hole (
|
|||||||
rlc_pP->pdu_retrans_buffer[snP].nack_so_stop = so_stopP;
|
rlc_pP->pdu_retrans_buffer[snP].nack_so_stop = so_stopP;
|
||||||
#ifdef TRACE_RLC_AM_HOLE
|
#ifdef TRACE_RLC_AM_HOLE
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][HOLE] SN %04d GLOBAL NACK 0->%05d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][HOLE] SN %04d GLOBAL NACK 0->%05d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
snP,
|
snP,
|
||||||
so_stopP);
|
so_stopP);
|
||||||
@@ -272,10 +275,10 @@ void rlc_am_add_hole (
|
|||||||
rlc_pP->pdu_retrans_buffer[snP].nack_so_stop = so_stopP;
|
rlc_pP->pdu_retrans_buffer[snP].nack_so_stop = so_stopP;
|
||||||
#ifdef TRACE_RLC_AM_HOLE
|
#ifdef TRACE_RLC_AM_HOLE
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][HOLE] FIRST HOLE SN %04d GLOBAL NACK %05d->%05d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][HOLE] FIRST HOLE SN %04d GLOBAL NACK %05d->%05d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
snP,
|
snP,
|
||||||
so_startP,
|
so_startP,
|
||||||
@@ -306,10 +309,10 @@ void rlc_am_add_hole (
|
|||||||
rlc_pP->pdu_retrans_buffer[snP].num_holes += 1;
|
rlc_pP->pdu_retrans_buffer[snP].num_holes += 1;
|
||||||
#ifdef TRACE_RLC_AM_HOLE
|
#ifdef TRACE_RLC_AM_HOLE
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][HOLE] INSERT %d th HOLE SN %04d GLOBAL NACK %05d->%05d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][HOLE] INSERT %d th HOLE SN %04d GLOBAL NACK %05d->%05d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->pdu_retrans_buffer[snP].num_holes,
|
rlc_pP->pdu_retrans_buffer[snP].num_holes,
|
||||||
snP,
|
snP,
|
||||||
@@ -333,10 +336,10 @@ void rlc_am_add_hole (
|
|||||||
rlc_pP->pdu_retrans_buffer[snP].nack_so_stop = so_stopP;
|
rlc_pP->pdu_retrans_buffer[snP].nack_so_stop = so_stopP;
|
||||||
#ifdef TRACE_RLC_AM_HOLE
|
#ifdef TRACE_RLC_AM_HOLE
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][HOLE] INSERT THE %d th LAST HOLE SN %04d GLOBAL NACK %05d->%05d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][HOLE] INSERT THE %d th LAST HOLE SN %04d GLOBAL NACK %05d->%05d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->pdu_retrans_buffer[snP].num_holes,
|
rlc_pP->pdu_retrans_buffer[snP].num_holes,
|
||||||
snP,
|
snP,
|
||||||
|
|||||||
@@ -58,58 +58,60 @@
|
|||||||
# define public_rlc_am_segments_holes(x) extern x
|
# define public_rlc_am_segments_holes(x) extern x
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
/*! \fn void rlc_am_clear_holes (rlc_am_entity_t *rlcP, rlc_sn_t snP)
|
/*! \fn void rlc_am_clear_holes (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlcP, rlc_sn_t snP)
|
||||||
* \brief Remove all marked holes for PDU with sequence number "snP".
|
* \brief Remove all marked holes for PDU with sequence number "snP".
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||||
* \param[in] snP Sequence number.
|
* \param[in] snP Sequence number.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_segments_holes(void rlc_am_clear_holes (
|
protected_rlc_am_segments_holes(void rlc_am_clear_holes (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlcP,
|
rlc_am_entity_t *const rlcP,
|
||||||
const rlc_sn_t snP);)
|
const rlc_sn_t snP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_remove_hole (rlc_am_entity_t *rlcP, frame_t frameP, rlc_sn_t snP, sdu_size_t so_startP, sdu_size_t so_stopP)
|
/*! \fn void rlc_am_remove_hole (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlcP, rlc_sn_t snP, sdu_size_t so_startP, sdu_size_t so_stopP)
|
||||||
* \brief Remove for PDU with sequence number "snP" a NACK for byte segment offset [so_startP, so_stopP].
|
* \brief Remove for PDU with sequence number "snP" a NACK for byte segment offset [so_startP, so_stopP].
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||||
* \param[in[ frame Frame index.
|
|
||||||
* \param[in] snP Sequence number.
|
* \param[in] snP Sequence number.
|
||||||
* \param[in] so_startP Start of segment offset.
|
* \param[in] so_startP Start of segment offset.
|
||||||
* \param[in] so_stopP End of segment offset.
|
* \param[in] so_stopP End of segment offset.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_segments_holes(void rlc_am_remove_hole (
|
protected_rlc_am_segments_holes(void rlc_am_remove_hole (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlcP,
|
rlc_am_entity_t *const rlcP,
|
||||||
const frame_t frameP,
|
|
||||||
const rlc_sn_t snP,
|
const rlc_sn_t snP,
|
||||||
const sdu_size_t so_startP,
|
const sdu_size_t so_startP,
|
||||||
const sdu_size_t so_stopP);)
|
const sdu_size_t so_stopP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_get_next_hole (rlc_am_entity_t *rlcP, frame_t frameP, rlc_sn_t snP, sdu_size_t* so_startP, sdu_size_t* so_stopP)
|
/*! \fn void rlc_am_get_next_hole (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlcP, rlc_sn_t snP, sdu_size_t* so_startP, sdu_size_t* so_stopP)
|
||||||
* \brief Get for PDU with sequence number "snP" the first hole start and stop parameters.
|
* \brief Get for PDU with sequence number "snP" the first hole start and stop parameters.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||||
* \param[in[ frame Frame index.
|
|
||||||
* \param[in] snP Sequence number.
|
* \param[in] snP Sequence number.
|
||||||
* \param[in,out] so_startP Start of segment offset.
|
* \param[in,out] so_startP Start of segment offset.
|
||||||
* \param[in,out] so_stopP End of segment offset.
|
* \param[in,out] so_stopP End of segment offset.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_segments_holes(void rlc_am_get_next_hole (
|
protected_rlc_am_segments_holes(void rlc_am_get_next_hole (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlcP,
|
rlc_am_entity_t *const rlcP,
|
||||||
const frame_t frameP,
|
|
||||||
const rlc_sn_t snP,
|
const rlc_sn_t snP,
|
||||||
sdu_size_t* const so_startP,
|
sdu_size_t* const so_startP,
|
||||||
sdu_size_t* const so_stopP);)
|
sdu_size_t* const so_stopP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_add_hole (rlc_am_entity_t *rlcP, frame_t frameP, rlc_sn_t snP, sdu_size_t so_startP, sdu_size_t so_stopP)
|
/*! \fn void rlc_am_add_hole (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t * const rlcP, rlc_sn_t snP, sdu_size_t so_startP, sdu_size_t so_stopP)
|
||||||
* \brief Mark for PDU with sequence number "snP" a NACK for byte segment offset [so_startP, so_stopP].
|
* \brief Mark for PDU with sequence number "snP" a NACK for byte segment offset [so_startP, so_stopP].
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] rlcP RLC AM protocol instance pointer.
|
||||||
* \param[in[ frame Frame index.
|
|
||||||
* \param[in] snP Sequence number.
|
* \param[in] snP Sequence number.
|
||||||
* \param[in,out] so_startP Start of segment offset.
|
* \param[in,out] so_startP Start of segment offset.
|
||||||
* \param[in,out] so_stopP End of segment offset.
|
* \param[in,out] so_stopP End of segment offset.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_segments_holes(void rlc_am_add_hole (
|
protected_rlc_am_segments_holes(void rlc_am_add_hole (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlcP,
|
rlc_am_entity_t *const rlcP,
|
||||||
const frame_t frameP,
|
|
||||||
const rlc_sn_t snP,
|
const rlc_sn_t snP,
|
||||||
sdu_size_t so_startP,
|
const sdu_size_t so_startP,
|
||||||
sdu_size_t so_stopP);)
|
sdu_size_t so_stopP);)
|
||||||
/** @} */
|
/** @} */
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -41,14 +41,19 @@
|
|||||||
#include "rlc_am.h"
|
#include "rlc_am.h"
|
||||||
#include "LAYER2/MAC/extern.h"
|
#include "LAYER2/MAC/extern.h"
|
||||||
#include "UTIL/LOG/log.h"
|
#include "UTIL/LOG/log.h"
|
||||||
#define TRACE_STATUS_CREATION
|
|
||||||
|
//#define TRACE_STATUS_CREATION 1
|
||||||
|
|
||||||
rlc_am_control_pdu_info_t g_rlc_am_control_pdu_info;
|
rlc_am_control_pdu_info_t g_rlc_am_control_pdu_info;
|
||||||
|
|
||||||
|
|
||||||
# if defined(ENABLE_ITTI)
|
# if defined(ENABLE_ITTI)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_itti_display_status_ind_infos(const rlc_am_entity_t const * rlc_pP, const rlc_am_control_pdu_info_t const * pdu_info_pP)
|
void
|
||||||
|
rlc_am_itti_display_status_ind_infos(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
const rlc_am_entity_t *const rlc_pP,
|
||||||
|
const rlc_am_control_pdu_info_t *const pdu_info_pP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
char message_string[1000];
|
char message_string[1000];
|
||||||
@@ -72,14 +77,14 @@ void rlc_am_itti_display_status_ind_infos(const rlc_am_entity_t const * rlc_pP,
|
|||||||
}
|
}
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "\n");
|
message_string_size += sprintf(&message_string[message_string_size], "\n");
|
||||||
|
|
||||||
msg_p = itti_alloc_new_message_sized (rlc_pP->is_enb > 0 ? TASK_RLC_ENB:TASK_RLC_UE , RLC_AM_STATUS_PDU_IND, message_string_size + sizeof (IttiMsgText));
|
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag > 0 ? TASK_RLC_ENB:TASK_RLC_UE , RLC_AM_STATUS_PDU_IND, message_string_size + sizeof (IttiMsgText));
|
||||||
msg_p->ittiMsg.rlc_am_status_pdu_ind.size = message_string_size;
|
msg_p->ittiMsg.rlc_am_status_pdu_ind.size = message_string_size;
|
||||||
memcpy(&msg_p->ittiMsg.rlc_am_status_pdu_ind.text, message_string, message_string_size);
|
memcpy(&msg_p->ittiMsg.rlc_am_status_pdu_ind.text, message_string, message_string_size);
|
||||||
|
|
||||||
if (rlc_pP->is_enb) {
|
if (ctxt_pP->enb_flag) {
|
||||||
itti_send_msg_to_task(TASK_UNKNOWN, rlc_pP->enb_module_id, msg_p);
|
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->enb_module_id, msg_p);
|
||||||
} else {
|
} else {
|
||||||
itti_send_msg_to_task(TASK_UNKNOWN, rlc_pP->ue_module_id + NB_eNB_INST, msg_p);
|
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->ue_module_id + NB_eNB_INST, msg_p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -87,21 +92,25 @@ void rlc_am_itti_display_status_ind_infos(const rlc_am_entity_t const * rlc_pP,
|
|||||||
# endif
|
# endif
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
uint16_t rlc_am_read_bit_field(uint8_t** data_ppP, unsigned int* bit_pos_pP, signed int bits_to_readP) {
|
uint16_t rlc_am_read_bit_field(
|
||||||
|
uint8_t** data_ppP,
|
||||||
|
unsigned int* bit_pos_pP,
|
||||||
|
const signed int bits_to_readP) {
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
uint16_t value = 0;
|
uint16_t value = 0;
|
||||||
unsigned int bits_read = 0;
|
unsigned int bits_read = 0;
|
||||||
|
signed int bits_to_read = bits_to_readP;
|
||||||
do {
|
do {
|
||||||
// bits read > bits to read
|
// bits read > bits to read
|
||||||
if ((8 - *bit_pos_pP) > bits_to_readP) {
|
if ((8 - *bit_pos_pP) > bits_to_read) {
|
||||||
bits_read = 8 - *bit_pos_pP;
|
bits_read = 8 - *bit_pos_pP;
|
||||||
value = (value << bits_to_readP) | ((((uint16_t)(**data_ppP)) & (uint16_t)(0x00FF >> *bit_pos_pP)) >> (bits_read -
|
value = (value << bits_to_read) | ((((uint16_t)(**data_ppP)) & (uint16_t)(0x00FF >> *bit_pos_pP)) >> (bits_read -
|
||||||
bits_to_readP));
|
bits_to_read));
|
||||||
*bit_pos_pP = *bit_pos_pP + bits_to_readP;
|
*bit_pos_pP = *bit_pos_pP + bits_to_read;
|
||||||
return value;
|
return value;
|
||||||
// bits read == bits to read
|
// bits read == bits to read
|
||||||
} else if ((8 - *bit_pos_pP) == bits_to_readP) {
|
} else if ((8 - *bit_pos_pP) == bits_to_read) {
|
||||||
value = (value << bits_to_readP) | (((uint16_t)(**data_ppP)) & (uint16_t)(0x00FF >> *bit_pos_pP));
|
value = (value << bits_to_read) | (((uint16_t)(**data_ppP)) & (uint16_t)(0x00FF >> *bit_pos_pP));
|
||||||
*bit_pos_pP = 0;
|
*bit_pos_pP = 0;
|
||||||
*data_ppP = *data_ppP + 1;
|
*data_ppP = *data_ppP + 1;
|
||||||
return value;
|
return value;
|
||||||
@@ -111,41 +120,52 @@ bits_to_readP));
|
|||||||
value = (value << bits_read) | ((((uint16_t)(**data_ppP)) & (uint16_t)(0x00FF >> *bit_pos_pP)));
|
value = (value << bits_read) | ((((uint16_t)(**data_ppP)) & (uint16_t)(0x00FF >> *bit_pos_pP)));
|
||||||
*bit_pos_pP = 0;
|
*bit_pos_pP = 0;
|
||||||
*data_ppP = *data_ppP + 1;
|
*data_ppP = *data_ppP + 1;
|
||||||
bits_to_readP = bits_to_readP - bits_read;
|
bits_to_read = bits_to_read - bits_read;
|
||||||
}
|
}
|
||||||
} while (bits_to_readP > 0);
|
} while (bits_to_read > 0);
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_write8_bit_field(uint8_t** data_ppP, unsigned int* bit_pos_pP, signed int bits_to_writeP, uint8_t valueP) {
|
void
|
||||||
|
rlc_am_write8_bit_field(
|
||||||
|
uint8_t** data_ppP,
|
||||||
|
unsigned int* bit_pos_pP,
|
||||||
|
const signed int bits_to_writeP,
|
||||||
|
const uint8_t valueP) {
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
unsigned int available_bits;
|
unsigned int available_bits;
|
||||||
|
signed int bits_to_write= bits_to_writeP;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
available_bits = 8 - *bit_pos_pP;
|
available_bits = 8 - *bit_pos_pP;
|
||||||
// available_bits > bits to write
|
// available_bits > bits to write
|
||||||
if (available_bits > bits_to_writeP) {
|
if (available_bits > bits_to_write) {
|
||||||
**data_ppP = **data_ppP | (((valueP & (((uint8_t)0xFF) >> (available_bits - bits_to_writeP)))) << (available_bits -
|
**data_ppP = **data_ppP | (((valueP & (((uint8_t)0xFF) >> (available_bits - bits_to_write)))) << (available_bits -
|
||||||
bits_to_writeP));
|
bits_to_write));
|
||||||
*bit_pos_pP = *bit_pos_pP + bits_to_writeP;
|
*bit_pos_pP = *bit_pos_pP + bits_to_write;
|
||||||
return;
|
return;
|
||||||
// bits read == bits to read
|
// bits read == bits to read
|
||||||
} else if (available_bits == bits_to_writeP) {
|
} else if (available_bits == bits_to_write) {
|
||||||
**data_ppP = **data_ppP | (valueP & (((uint8_t)0xFF) >> (8 - bits_to_writeP)));
|
**data_ppP = **data_ppP | (valueP & (((uint8_t)0xFF) >> (8 - bits_to_write)));
|
||||||
*bit_pos_pP = 0;
|
*bit_pos_pP = 0;
|
||||||
*data_ppP = *data_ppP + 1;
|
*data_ppP = *data_ppP + 1;
|
||||||
return;
|
return;
|
||||||
// available_bits < bits to write
|
// available_bits < bits to write
|
||||||
} else {
|
} else {
|
||||||
**data_ppP = **data_ppP | (valueP >> (bits_to_writeP - available_bits));
|
**data_ppP = **data_ppP | (valueP >> (bits_to_write - available_bits));
|
||||||
*bit_pos_pP = 0;
|
*bit_pos_pP = 0;
|
||||||
*data_ppP = *data_ppP + 1;
|
*data_ppP = *data_ppP + 1;
|
||||||
bits_to_writeP = bits_to_writeP - available_bits;
|
bits_to_write = bits_to_write - available_bits;
|
||||||
}
|
}
|
||||||
} while (bits_to_writeP > 0);
|
} while (bits_to_write > 0);
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_write16_bit_field(uint8_t** data_ppP, unsigned int* bit_pos_pP, signed int bits_to_writeP, uint16_t valueP) {
|
void
|
||||||
|
rlc_am_write16_bit_field(
|
||||||
|
uint8_t** data_ppP,
|
||||||
|
unsigned int* bit_pos_pP,
|
||||||
|
signed int bits_to_writeP,
|
||||||
|
const uint16_t valueP) {
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
assert(bits_to_writeP <= 16);
|
assert(bits_to_writeP <= 16);
|
||||||
|
|
||||||
@@ -157,7 +177,11 @@ void rlc_am_write16_bit_field(uint8_t** data_ppP, unsigned int* bit_pos_pP, sign
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
signed int rlc_am_get_control_pdu_infos(rlc_am_pdu_sn_10_t* header_pP, sdu_size_t *total_size_pP, rlc_am_control_pdu_info_t* pdu_info_pP)
|
signed int
|
||||||
|
rlc_am_get_control_pdu_infos(
|
||||||
|
rlc_am_pdu_sn_10_t* const header_pP,
|
||||||
|
sdu_size_t * const total_size_pP,
|
||||||
|
rlc_am_control_pdu_info_t* const pdu_info_pP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
memset(pdu_info_pP, 0, sizeof (rlc_am_control_pdu_info_t));
|
memset(pdu_info_pP, 0, sizeof (rlc_am_control_pdu_info_t));
|
||||||
@@ -214,7 +238,10 @@ signed int rlc_am_get_control_pdu_infos(rlc_am_pdu_sn_10_t* header_pP, sdu_size_
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_display_control_pdu_infos(rlc_am_control_pdu_info_t* pdu_info_pP)
|
void
|
||||||
|
rlc_am_display_control_pdu_infos(
|
||||||
|
const rlc_am_control_pdu_info_t* const pdu_info_pP
|
||||||
|
)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
int num_nack;
|
int num_nack;
|
||||||
@@ -237,7 +264,13 @@ void rlc_am_display_control_pdu_infos(rlc_am_control_pdu_info_t* pdu_info_pP)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_receive_process_control_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP, mem_block_t* tb_pP, uint8_t** first_byte_ppP, sdu_size_t *tb_size_in_bytes_pP)
|
void
|
||||||
|
rlc_am_receive_process_control_pdu(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t *const rlc_pP,
|
||||||
|
mem_block_t* const tb_pP,
|
||||||
|
uint8_t** first_byte_ppP,
|
||||||
|
sdu_size_t * const tb_size_in_bytes_pP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
rlc_am_pdu_sn_10_t *rlc_am_pdu_sn_10_p = (rlc_am_pdu_sn_10_t*)*first_byte_ppP;
|
rlc_am_pdu_sn_10_t *rlc_am_pdu_sn_10_p = (rlc_am_pdu_sn_10_t*)*first_byte_ppP;
|
||||||
@@ -245,12 +278,12 @@ void rlc_am_receive_process_control_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP,
|
|||||||
|
|
||||||
if (rlc_am_get_control_pdu_infos(rlc_am_pdu_sn_10_p, tb_size_in_bytes_pP, &g_rlc_am_control_pdu_info) >= 0) {
|
if (rlc_am_get_control_pdu_infos(rlc_am_pdu_sn_10_p, tb_size_in_bytes_pP, &g_rlc_am_control_pdu_info) >= 0) {
|
||||||
|
|
||||||
rlc_am_tx_buffer_display(rlc_pP, frameP, " TX BUFFER BEFORE PROCESS OF STATUS PDU");
|
rlc_am_tx_buffer_display(ctxt_pP, rlc_pP, " TX BUFFER BEFORE PROCESS OF STATUS PDU");
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] RX CONTROL PDU VT(A) %04d VT(S) %04d POLL_SN %04d ACK_SN %04d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] RX CONTROL PDU VT(A) %04d VT(S) %04d POLL_SN %04d ACK_SN %04d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->vt_a,
|
rlc_pP->vt_a,
|
||||||
rlc_pP->vt_s,
|
rlc_pP->vt_s,
|
||||||
@@ -286,16 +319,16 @@ void rlc_am_receive_process_control_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP,
|
|||||||
assert(ack_sn < RLC_AM_SN_MODULO);
|
assert(ack_sn < RLC_AM_SN_MODULO);
|
||||||
assert(g_rlc_am_control_pdu_info.num_nack < RLC_AM_MAX_NACK_IN_STATUS_PDU);
|
assert(g_rlc_am_control_pdu_info.num_nack < RLC_AM_MAX_NACK_IN_STATUS_PDU);
|
||||||
|
|
||||||
if (rlc_am_in_tx_window(rlc_pP, ack_sn) > 0) {
|
if (rlc_am_in_tx_window(ctxt_pP, rlc_pP, ack_sn) > 0) {
|
||||||
rlc_pP->num_nack_so = 0;
|
rlc_pP->num_nack_so = 0;
|
||||||
rlc_pP->num_nack_sn = 0;
|
rlc_pP->num_nack_sn = 0;
|
||||||
|
|
||||||
if (g_rlc_am_control_pdu_info.num_nack == 0) {
|
if (g_rlc_am_control_pdu_info.num_nack == 0) {
|
||||||
while (sn_cursor != ack_sn) {
|
while (sn_cursor != ack_sn) {
|
||||||
if (sn_cursor == rlc_pP->poll_sn) {
|
if (sn_cursor == rlc_pP->poll_sn) {
|
||||||
rlc_am_stop_and_reset_timer_poll_retransmit(rlc_pP,frameP);
|
rlc_am_stop_and_reset_timer_poll_retransmit(ctxt_pP, rlc_pP);
|
||||||
}
|
}
|
||||||
rlc_am_ack_pdu(rlc_pP, frameP, sn_cursor);
|
rlc_am_ack_pdu(ctxt_pP, rlc_pP, sn_cursor);
|
||||||
sn_cursor = (sn_cursor + 1) & RLC_AM_SN_MASK;
|
sn_cursor = (sn_cursor + 1) & RLC_AM_SN_MASK;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -303,12 +336,15 @@ void rlc_am_receive_process_control_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP,
|
|||||||
nack_sn = g_rlc_am_control_pdu_info.nack_list[nack_index].nack_sn;
|
nack_sn = g_rlc_am_control_pdu_info.nack_list[nack_index].nack_sn;
|
||||||
while (sn_cursor != ack_sn) {
|
while (sn_cursor != ack_sn) {
|
||||||
if (sn_cursor == rlc_pP->poll_sn) {
|
if (sn_cursor == rlc_pP->poll_sn) {
|
||||||
rlc_am_stop_and_reset_timer_poll_retransmit(rlc_pP,frameP);
|
rlc_am_stop_and_reset_timer_poll_retransmit(ctxt_pP, rlc_pP);
|
||||||
}
|
}
|
||||||
if (sn_cursor != nack_sn) {
|
if (sn_cursor != nack_sn) {
|
||||||
rlc_am_ack_pdu(rlc_pP, frameP, sn_cursor);
|
rlc_am_ack_pdu(ctxt_pP,
|
||||||
|
rlc_pP,
|
||||||
|
sn_cursor);
|
||||||
} else {
|
} else {
|
||||||
rlc_am_nack_pdu (rlc_pP, frameP,
|
rlc_am_nack_pdu (ctxt_pP,
|
||||||
|
rlc_pP,
|
||||||
sn_cursor,
|
sn_cursor,
|
||||||
g_rlc_am_control_pdu_info.nack_list[nack_index].so_start,
|
g_rlc_am_control_pdu_info.nack_list[nack_index].so_start,
|
||||||
g_rlc_am_control_pdu_info.nack_list[nack_index].so_end);
|
g_rlc_am_control_pdu_info.nack_list[nack_index].so_end);
|
||||||
@@ -331,27 +367,32 @@ void rlc_am_receive_process_control_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP,
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_N(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] WARNING CONTROL PDU ACK SN OUT OF WINDOW\n",
|
LOG_N(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] WARNING CONTROL PDU ACK SN OUT OF WINDOW\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_W(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] ERROR IN DECODING CONTROL PDU\n",
|
LOG_W(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] ERROR IN DECODING CONTROL PDU\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
}
|
}
|
||||||
*first_byte_ppP = (uint8_t*)((uint64_t)*first_byte_ppP + initial_pdu_size - *tb_size_in_bytes_pP);
|
*first_byte_ppP = (uint8_t*)((uint64_t)*first_byte_ppP + initial_pdu_size - *tb_size_in_bytes_pP);
|
||||||
|
|
||||||
free_mem_block(tb_pP);
|
free_mem_block(tb_pP);
|
||||||
rlc_am_tx_buffer_display(rlc_pP, frameP, NULL);
|
rlc_am_tx_buffer_display(ctxt_pP, rlc_pP, NULL);
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
int rlc_am_write_status_pdu(frame_t frameP, rlc_am_pdu_sn_10_t* rlc_am_pdu_sn_10_pP, rlc_am_control_pdu_info_t* pdu_info_pP)
|
int
|
||||||
|
rlc_am_write_status_pdu(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t *const rlc_pP,
|
||||||
|
rlc_am_pdu_sn_10_t* const rlc_am_pdu_sn_10_pP,
|
||||||
|
rlc_am_control_pdu_info_t* const pdu_info_pP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
unsigned int bit_pos = 4; // range from 0 (MSB/left) to 7 (LSB/right)
|
unsigned int bit_pos = 4; // range from 0 (MSB/left) to 7 (LSB/right)
|
||||||
@@ -381,12 +422,16 @@ int rlc_am_write_status_pdu(frame_t frameP, rlc_am_pdu_sn_10_t* rlc_am_pdu_sn_10
|
|||||||
}
|
}
|
||||||
#ifdef TRACE_STATUS_CREATION
|
#ifdef TRACE_STATUS_CREATION
|
||||||
LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX] WROTE STATUS PDU %d BYTES\n",
|
LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX] WROTE STATUS PDU %d BYTES\n",
|
||||||
frameP, num_bytes);
|
ctxt_pP->frame, num_bytes);
|
||||||
#endif
|
#endif
|
||||||
return num_bytes;
|
return num_bytes;
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_send_status_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP)
|
void
|
||||||
|
rlc_am_send_status_pdu(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t *const rlc_pP
|
||||||
|
)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
// When STATUS reporting has been triggered, the receiving side of an AM RLC entity shall:
|
// When STATUS reporting has been triggered, the receiving side of an AM RLC entity shall:
|
||||||
@@ -427,10 +472,10 @@ void rlc_am_send_status_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP)
|
|||||||
nb_bits_to_transmit = nb_bits_to_transmit - 15;
|
nb_bits_to_transmit = nb_bits_to_transmit - 15;
|
||||||
#ifdef TRACE_STATUS_CREATION
|
#ifdef TRACE_STATUS_CREATION
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] nb_bits_to_transmit %d (15 already allocated for header)\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] nb_bits_to_transmit %d (15 already allocated for header)\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
nb_bits_to_transmit);
|
nb_bits_to_transmit);
|
||||||
rlc_am_rx_list_display(rlc_pP, " DISPLAY BEFORE CONSTRUCTION OF STATUS REPORT");
|
rlc_am_rx_list_display(rlc_pP, " DISPLAY BEFORE CONSTRUCTION OF STATUS REPORT");
|
||||||
@@ -440,7 +485,7 @@ void rlc_am_send_status_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP)
|
|||||||
pdu_info_cursor_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
|
pdu_info_cursor_p = &((rlc_am_rx_pdu_management_t*)(cursor_p->data))->pdu_info;
|
||||||
sn_cursor = pdu_info_cursor_p->sn;
|
sn_cursor = pdu_info_cursor_p->sn;
|
||||||
|
|
||||||
while (rlc_am_in_rx_window(rlc_pP, sn_cursor) == 0) {
|
while (rlc_am_in_rx_window(ctxt_pP, rlc_pP, sn_cursor) == 0) {
|
||||||
cursor_p = cursor_p->next;
|
cursor_p = cursor_p->next;
|
||||||
previous_sn_cursor = sn_cursor;
|
previous_sn_cursor = sn_cursor;
|
||||||
|
|
||||||
@@ -448,10 +493,10 @@ void rlc_am_send_status_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP)
|
|||||||
sn_cursor = pdu_info_cursor_p->sn;
|
sn_cursor = pdu_info_cursor_p->sn;
|
||||||
#ifdef TRACE_STATUS_CREATION
|
#ifdef TRACE_STATUS_CREATION
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d FIND VR(R) <= SN sn_cursor %04d -> %04d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d FIND VR(R) <= SN sn_cursor %04d -> %04d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
previous_sn_cursor,
|
previous_sn_cursor,
|
||||||
@@ -467,10 +512,10 @@ void rlc_am_send_status_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP)
|
|||||||
sn_cursor = pdu_info_cursor_p->sn;
|
sn_cursor = pdu_info_cursor_p->sn;
|
||||||
#ifdef TRACE_STATUS_CREATION
|
#ifdef TRACE_STATUS_CREATION
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d LOOPING sn_cursor %04d previous sn_cursor %04d \n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d LOOPING sn_cursor %04d previous sn_cursor %04d \n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
sn_cursor,
|
sn_cursor,
|
||||||
@@ -489,10 +534,10 @@ void rlc_am_send_status_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP)
|
|||||||
sn_cursor = pdu_info_cursor_p->sn;
|
sn_cursor = pdu_info_cursor_p->sn;
|
||||||
#ifdef TRACE_STATUS_CREATION
|
#ifdef TRACE_STATUS_CREATION
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d NOW sn_cursor %04d \n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d NOW sn_cursor %04d \n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
sn_cursor);
|
sn_cursor);
|
||||||
@@ -502,10 +547,10 @@ void rlc_am_send_status_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP)
|
|||||||
control_pdu_info.ack_sn = (sn_cursor + 1) & RLC_AM_SN_MASK;
|
control_pdu_info.ack_sn = (sn_cursor + 1) & RLC_AM_SN_MASK;
|
||||||
#ifdef TRACE_STATUS_CREATION
|
#ifdef TRACE_STATUS_CREATION
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d PREPARE SENDING ACK SN %04d \n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d PREPARE SENDING ACK SN %04d \n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
control_pdu_info.ack_sn);
|
control_pdu_info.ack_sn);
|
||||||
@@ -514,10 +559,10 @@ void rlc_am_send_status_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP)
|
|||||||
control_pdu_info.ack_sn = (previous_sn_cursor + 1) & RLC_AM_SN_MASK;
|
control_pdu_info.ack_sn = (previous_sn_cursor + 1) & RLC_AM_SN_MASK;
|
||||||
#ifdef TRACE_STATUS_CREATION
|
#ifdef TRACE_STATUS_CREATION
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d PREPARE SENDING ACK SN %04d (CASE PREVIOUS SN)\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d PREPARE SENDING ACK SN %04d (CASE PREVIOUS SN)\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
control_pdu_info.ack_sn);
|
control_pdu_info.ack_sn);
|
||||||
@@ -542,10 +587,10 @@ void rlc_am_send_status_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP)
|
|||||||
nb_bits_to_transmit = nb_bits_to_transmit - 12;
|
nb_bits_to_transmit = nb_bits_to_transmit - 12;
|
||||||
#ifdef TRACE_STATUS_CREATION
|
#ifdef TRACE_STATUS_CREATION
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d PREPARE SENDING NACK %04d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d PREPARE SENDING NACK %04d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
previous_sn_cursor);
|
previous_sn_cursor);
|
||||||
@@ -554,10 +599,10 @@ void rlc_am_send_status_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP)
|
|||||||
control_pdu_info.ack_sn = (previous_sn_cursor + 1) & RLC_AM_SN_MASK;
|
control_pdu_info.ack_sn = (previous_sn_cursor + 1) & RLC_AM_SN_MASK;
|
||||||
#ifdef TRACE_STATUS_CREATION
|
#ifdef TRACE_STATUS_CREATION
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d NO MORE BITS FOR SENDING NACK %04d -> ABORT AND SET FINAL ACK %04d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d NO MORE BITS FOR SENDING NACK %04d -> ABORT AND SET FINAL ACK %04d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
previous_sn_cursor,
|
previous_sn_cursor,
|
||||||
@@ -573,10 +618,10 @@ void rlc_am_send_status_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP)
|
|||||||
waited_so = 0;
|
waited_so = 0;
|
||||||
#ifdef TRACE_STATUS_CREATION
|
#ifdef TRACE_STATUS_CREATION
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] if (all_segments_received == 0) \n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] if (all_segments_received == 0) \n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
#endif
|
#endif
|
||||||
do {
|
do {
|
||||||
@@ -591,10 +636,10 @@ void rlc_am_send_status_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP)
|
|||||||
nb_bits_to_transmit = nb_bits_to_transmit - 42;
|
nb_bits_to_transmit = nb_bits_to_transmit - 42;
|
||||||
#ifdef TRACE_STATUS_CREATION
|
#ifdef TRACE_STATUS_CREATION
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d PREPARE SENDING NACK %04d SO START %05d SO END %05d (CASE SO %d > WAITED SO %d)\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d PREPARE SENDING NACK %04d SO START %05d SO END %05d (CASE SO %d > WAITED SO %d)\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
sn_cursor,
|
sn_cursor,
|
||||||
@@ -608,10 +653,10 @@ void rlc_am_send_status_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP)
|
|||||||
waited_so = 0x7FFF;
|
waited_so = 0x7FFF;
|
||||||
#ifdef TRACE_STATUS_CREATION
|
#ifdef TRACE_STATUS_CREATION
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d SN %04d SET WAITED SO 0x7FFF)\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d SN %04d SET WAITED SO 0x7FFF)\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__, sn_cursor);
|
__LINE__, sn_cursor);
|
||||||
#endif
|
#endif
|
||||||
@@ -620,10 +665,10 @@ void rlc_am_send_status_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP)
|
|||||||
waited_so = pdu_info_cursor_p->so + pdu_info_cursor_p->payload_size;
|
waited_so = pdu_info_cursor_p->so + pdu_info_cursor_p->payload_size;
|
||||||
#ifdef TRACE_STATUS_CREATION
|
#ifdef TRACE_STATUS_CREATION
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d SN %04d SET WAITED SO %d @1\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d SN %04d SET WAITED SO %d @1\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
sn_cursor,
|
sn_cursor,
|
||||||
@@ -643,10 +688,10 @@ void rlc_am_send_status_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP)
|
|||||||
|
|
||||||
#ifdef TRACE_STATUS_CREATION
|
#ifdef TRACE_STATUS_CREATION
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d SN %04d SET WAITED SO %d @2\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d SN %04d SET WAITED SO %d @2\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
sn_cursor, waited_so);
|
sn_cursor, waited_so);
|
||||||
@@ -680,10 +725,10 @@ void rlc_am_send_status_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP)
|
|||||||
nb_bits_to_transmit = nb_bits_to_transmit - 42;
|
nb_bits_to_transmit = nb_bits_to_transmit - 42;
|
||||||
#ifdef TRACE_STATUS_CREATION
|
#ifdef TRACE_STATUS_CREATION
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d PREPARE SENDING NACK %04d SO START %05d SO END %05d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d PREPARE SENDING NACK %04d SO START %05d SO END %05d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
previous_sn_cursor,
|
previous_sn_cursor,
|
||||||
@@ -707,10 +752,10 @@ void rlc_am_send_status_pdu(rlc_am_entity_t* rlc_pP, frame_t frameP)
|
|||||||
control_pdu_info.ack_sn = rlc_pP->vr_r;
|
control_pdu_info.ack_sn = rlc_pP->vr_r;
|
||||||
#ifdef TRACE_STATUS_CREATION
|
#ifdef TRACE_STATUS_CREATION
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d PREPARE SENDING ACK %04d = VR(R)\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d PREPARE SENDING ACK %04d = VR(R)\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
control_pdu_info.ack_sn);
|
control_pdu_info.ack_sn);
|
||||||
@@ -722,14 +767,14 @@ end_push_nack:
|
|||||||
control_pdu_info.nack_list[control_pdu_info.num_nack - 1].e1 = 0;
|
control_pdu_info.nack_list[control_pdu_info.num_nack - 1].e1 = 0;
|
||||||
}
|
}
|
||||||
//msg ("[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] nb_bits_to_transmit %d\n",
|
//msg ("[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] nb_bits_to_transmit %d\n",
|
||||||
// rlc_pP->module_id, rlc_pP->rb_id, frameP,nb_bits_to_transmit);
|
// rlc_pP->module_id, rlc_pP->rb_id, ctxt_pP->frame,nb_bits_to_transmit);
|
||||||
|
|
||||||
#ifdef TRACE_STATUS_CREATION
|
#ifdef TRACE_STATUS_CREATION
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d PREPARE SENDING ACK %04d NUM NACK %d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d PREPARE SENDING ACK %04d NUM NACK %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
control_pdu_info.ack_sn,
|
control_pdu_info.ack_sn,
|
||||||
@@ -740,10 +785,10 @@ end_push_nack:
|
|||||||
|
|
||||||
#ifdef TRACE_STATUS_CREATION
|
#ifdef TRACE_STATUS_CREATION
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d forecast pdu_size %d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] LINE %d forecast pdu_size %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
__LINE__,
|
__LINE__,
|
||||||
pdu_size);
|
pdu_size);
|
||||||
@@ -754,16 +799,16 @@ end_push_nack:
|
|||||||
((struct mac_tb_req*)(tb_p->data))->data_ptr = (uint8_t*)&(tb_p->data[sizeof(struct mac_tb_req)]);
|
((struct mac_tb_req*)(tb_p->data))->data_ptr = (uint8_t*)&(tb_p->data[sizeof(struct mac_tb_req)]);
|
||||||
|
|
||||||
// warning reuse of pdu_size
|
// warning reuse of pdu_size
|
||||||
pdu_size = rlc_am_write_status_pdu(frameP,(rlc_am_pdu_sn_10_t*)(((struct mac_tb_req*)(tb_p->data))->data_ptr), &control_pdu_info);
|
pdu_size = rlc_am_write_status_pdu(ctxt_pP, rlc_pP,(rlc_am_pdu_sn_10_t*)(((struct mac_tb_req*)(tb_p->data))->data_ptr), &control_pdu_info);
|
||||||
((struct mac_tb_req*)(tb_p->data))->tb_size = pdu_size;
|
((struct mac_tb_req*)(tb_p->data))->tb_size = pdu_size;
|
||||||
//assert((((struct mac_tb_req*)(tb_p->data))->tb_size) < 3000);
|
//assert((((struct mac_tb_req*)(tb_p->data))->tb_size) < 3000);
|
||||||
|
|
||||||
#ifdef TRACE_STATUS_CREATION
|
#ifdef TRACE_STATUS_CREATION
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] SEND STATUS PDU SIZE %d, rlc_pP->nb_bytes_requested_by_mac %d, nb_bits_to_transmit>>3 %d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SEND-STATUS] SEND STATUS PDU SIZE %d, rlc_pP->nb_bytes_requested_by_mac %d, nb_bits_to_transmit>>3 %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
pdu_size,
|
pdu_size,
|
||||||
rlc_pP->nb_bytes_requested_by_mac,
|
rlc_pP->nb_bytes_requested_by_mac,
|
||||||
|
|||||||
@@ -65,25 +65,25 @@
|
|||||||
#include "PHY/defs.h"
|
#include "PHY/defs.h"
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
/*! \fn uint16_t rlc_am_read_bit_field (uint8_t** dataP, unsigned int* bit_posP, signed int bits_to_readP)
|
/*! \fn uint16_t rlc_am_read_bit_field (uint8_t** dataP, unsigned int* bit_posP, const signed int bits_to_readP)
|
||||||
* \brief Read N bits in a byte area seen as a bit-field with the help of a byte index and a modulo 8 bit index.
|
* \brief Read N bits in a byte area seen as a bit-field with the help of a byte index and a modulo 8 bit index.
|
||||||
* \param[in,out] dataP Data pointer on area to read, updated after the read.
|
* \param[in,out] dataP Data pointer on area to read, updated after the read.
|
||||||
* \param[in,out] bit_posP Last ending read bit position, updated after the read.
|
* \param[in,out] bit_posP Last ending read bit position, updated after the read.
|
||||||
* \param[in] bits_to_readP Number of bits to read (max 16).
|
* \param[in] bits_to_readP Number of bits to read (max 16).
|
||||||
* \return Value read on 16 bits, bits read are shifted to least significant bits of returned short value.
|
* \return Value read on 16 bits, bits read are shifted to least significant bits of returned short value.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_status_report( uint16_t rlc_am_read_bit_field (uint8_t** dataP, unsigned int* bit_posP, signed int bits_to_readP);)
|
protected_rlc_am_status_report( uint16_t rlc_am_read_bit_field (uint8_t** dataP, unsigned int* bit_posP, const signed int bits_to_readP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_write8_bit_field(uint8_t** dataP, unsigned int* bit_posP, signed int bits_to_writeP, uint8_t valueP)
|
/*! \fn void rlc_am_write8_bit_field(uint8_t** dataP, unsigned int* bit_posP, signed int bits_to_writeP, const uint8_t valueP)
|
||||||
* \brief Write N bits (max 8) in a byte area seen as a bit-field with the help of a byte index and a modulo 8 bit index.
|
* \brief Write N bits (max 8) in a byte area seen as a bit-field with the help of a byte index and a modulo 8 bit index.
|
||||||
* \param[in,out] dataP Data pointer on area to write, updated after the write.
|
* \param[in,out] dataP Data pointer on area to write, updated after the write.
|
||||||
* \param[in,out] bit_posP Last ending read write position, updated after the write.
|
* \param[in,out] bit_posP Last ending read write position, updated after the write.
|
||||||
* \param[in] bits_to_writeP Number of bits to write (max 8).
|
* \param[in] bits_to_writeP Number of bits to write (max 8).
|
||||||
* \param[in] valueP Value to write.
|
* \param[in] valueP Value to write.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_status_report(void rlc_am_write8_bit_field(uint8_t** dataP, unsigned int* bit_posP, signed int bits_to_writeP, uint8_t valueP);)
|
protected_rlc_am_status_report(void rlc_am_write8_bit_field(uint8_t** dataP, unsigned int* bit_posP, signed int bits_to_writeP, const uint8_t valueP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_write16_bit_field(uint8_t** dataP, unsigned int* bit_posP, signed int bits_to_writeP, uint16_t valueP)
|
/*! \fn void rlc_am_write16_bit_field(uint8_t** dataP, unsigned int* bit_posP, signed int bits_to_writeP, const uint16_t valueP)
|
||||||
* \brief Write N bits (max 16) in a byte area seen as a bit-field with the help of a byte index and a modulo 8 bit index.
|
* \brief Write N bits (max 16) in a byte area seen as a bit-field with the help of a byte index and a modulo 8 bit index.
|
||||||
* \param[in,out] dataP Data pointer on area to write, updated after the write.
|
* \param[in,out] dataP Data pointer on area to write, updated after the write.
|
||||||
* \param[in,out] bit_posP Last ending read write position, updated after the write.
|
* \param[in,out] bit_posP Last ending read write position, updated after the write.
|
||||||
@@ -94,54 +94,61 @@ protected_rlc_am_status_report(void rlc_am_write16_bit_field(
|
|||||||
uint8_t** dataP,
|
uint8_t** dataP,
|
||||||
unsigned int* bit_posP,
|
unsigned int* bit_posP,
|
||||||
signed int bits_to_writeP,
|
signed int bits_to_writeP,
|
||||||
uint16_t valueP);)
|
const uint16_t valueP);)
|
||||||
|
|
||||||
/*! \fn signed int rlc_am_get_control_pdu_infos (rlc_am_pdu_sn_10_t* headerP, sdu_size_t *total_sizeP, rlc_am_control_pdu_info_t* pdu_infoP)
|
/*! \fn signed int rlc_am_get_control_pdu_infos (rlc_am_pdu_sn_10_t* const headerP, sdu_size_t * const total_sizeP, rlc_am_control_pdu_info_t* const pdu_infoP)
|
||||||
* \brief Retrieve control PDU informations from a serialized control PDU.
|
* \brief Retrieve control PDU informations from a serialized control PDU.
|
||||||
* \param[in] headerP Pointer on the header of the RLC AM PDU.
|
* \param[in] headerP Pointer on the header of the RLC AM PDU.
|
||||||
* \param[in] total_size_pP Pointer on PDU size in bytes.
|
* \param[in] total_size_pP Pointer on PDU size in bytes.
|
||||||
* \param[in,out] pdu_infoP Struct containing interpreted PDU control informations.
|
* \param[in,out] pdu_infoP Struct containing interpreted PDU control informations.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_status_report( signed int rlc_am_get_control_pdu_infos (
|
protected_rlc_am_status_report( signed int rlc_am_get_control_pdu_infos (
|
||||||
rlc_am_pdu_sn_10_t* headerP,
|
rlc_am_pdu_sn_10_t* const headerP,
|
||||||
sdu_size_t *total_size_pP,
|
sdu_size_t * const total_size_pP,
|
||||||
rlc_am_control_pdu_info_t* pdu_infoP);)
|
rlc_am_control_pdu_info_t* const pdu_infoP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_display_control_pdu_infos(rlc_am_control_pdu_info_t* pdu_infoP)
|
/*! \fn void rlc_am_display_control_pdu_infos(const rlc_am_control_pdu_info_t* const pdu_infoP)
|
||||||
* \brief Dump on LOG output the informations contained in the pdu_infoP structure.
|
* \brief Dump on LOG output the informations contained in the pdu_infoP structure.
|
||||||
* \param[in] pdu_infoP Struct containing interpreted PDU control informations.
|
* \param[in] pdu_infoP Struct containing interpreted PDU control informations.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_status_report( void rlc_am_display_control_pdu_infos(rlc_am_control_pdu_info_t* pdu_infoP);)
|
protected_rlc_am_status_report( void rlc_am_display_control_pdu_infos(const rlc_am_control_pdu_info_t* const pdu_infoP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_receive_process_control_pdu(rlc_am_entity_t* rlcP, frame_t frameP, mem_block_t* tbP, uint8_t* first_byte, uint16_t tb_size_in_bytes)
|
/*! \fn void rlc_am_receive_process_control_pdu(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP, mem_block_t* const tbP, uint8_t* first_byte, const uint16_t tb_size_in_bytes)
|
||||||
* \brief Process the informations contained in the control PDU.
|
* \brief Process the informations contained in the control PDU.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] frame Frame index.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] tbP Control PDU embedded in a mem_block_t structure.
|
* \param[in] tbP Control PDU embedded in a mem_block_t structure.
|
||||||
* \param[in] first_byte Pointer on first byte of control PDU.
|
* \param[in] first_byte Pointer on first byte of control PDU.
|
||||||
* \param[in] tb_size_in_bytes Pointer on size of serialized control PDU in bytes.
|
* \param[in] tb_size_in_bytes Pointer on size of serialized control PDU in bytes.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_status_report( void rlc_am_receive_process_control_pdu(
|
protected_rlc_am_status_report( void rlc_am_receive_process_control_pdu(
|
||||||
rlc_am_entity_t* rlcP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
frame_t frameP,
|
rlc_am_entity_t* const rlc_pP,
|
||||||
mem_block_t* tbP,
|
mem_block_t* const tbP,
|
||||||
uint8_t** first_byte,
|
uint8_t** first_byte,
|
||||||
sdu_size_t *tb_size_in_bytes);)
|
sdu_size_t * const tb_size_in_bytes);)
|
||||||
|
|
||||||
/*! \fn int rlc_am_write_status_pdu(frame_t frameP,rlc_am_pdu_sn_10_t* rlc_am_pdu_sn_10P, rlc_am_control_pdu_info_t* pdu_infoP)
|
/*! \fn int rlc_am_write_status_pdu(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP, rlc_am_pdu_sn_10_t* const rlc_am_pdu_sn_10P, rlc_am_control_pdu_info_t* const pdu_infoP)
|
||||||
* \brief Remove all marked holes for PDU with sequence number "snP".
|
* \brief Remove all marked holes for PDU with sequence number "snP".
|
||||||
* \param[in] frame Frame index.
|
* \param[in] ctxt_pP Running context.
|
||||||
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] rlc_am_pdu_sn_10P Pointer on the header of the RLC AM control PDU.
|
* \param[in] rlc_am_pdu_sn_10P Pointer on the header of the RLC AM control PDU.
|
||||||
* \param[in] pdu_infoP Struct containing PDU control informations elements.
|
* \param[in] pdu_infoP Struct containing PDU control informations elements.
|
||||||
* \return The number of bytes that have been written.
|
* \return The number of bytes that have been written.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_status_report(int rlc_am_write_status_pdu(frame_t frameP, rlc_am_pdu_sn_10_t* rlc_am_pdu_sn_10P, rlc_am_control_pdu_info_t* pdu_infoP);)
|
protected_rlc_am_status_report(int rlc_am_write_status_pdu(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t *const rlc_pP,
|
||||||
|
rlc_am_pdu_sn_10_t* const rlc_am_pdu_sn_10P,
|
||||||
|
rlc_am_control_pdu_info_t* const pdu_infoP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_send_status_pdu(rlc_am_entity_t* rlcP, frame_t frameP)
|
/*! \fn void rlc_am_send_status_pdu(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP)
|
||||||
* \brief Send a status PDU based on the receiver buffer content.
|
* \brief Send a status PDU based on the receiver buffer content.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] frame Frame index.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_status_report(void rlc_am_send_status_pdu(rlc_am_entity_t* rlcP, frame_t frameP);)
|
protected_rlc_am_status_report(void rlc_am_send_status_pdu(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t *const rlc_pP);)
|
||||||
/** @} */
|
/** @} */
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -37,9 +37,11 @@
|
|||||||
#include "LAYER2/MAC/extern.h"
|
#include "LAYER2/MAC/extern.h"
|
||||||
#include "UTIL/LOG/log.h"
|
#include "UTIL/LOG/log.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_check_timer_poll_retransmit(
|
void
|
||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_check_timer_poll_retransmit(
|
||||||
const frame_t frameP)
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t * const rlc_pP
|
||||||
|
)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
// 5.2.2.3 Expiry of t-PollRetransmit
|
// 5.2.2.3 Expiry of t-PollRetransmit
|
||||||
@@ -59,50 +61,56 @@ void rlc_am_check_timer_poll_retransmit(
|
|||||||
// +-----------+------------------+----------+
|
// +-----------+------------------+----------+
|
||||||
//FRAME # 0 FRAME MAX
|
//FRAME # 0 FRAME MAX
|
||||||
((rlc_pP->t_poll_retransmit.frame_start < rlc_pP->t_poll_retransmit.frame_time_out) &&
|
((rlc_pP->t_poll_retransmit.frame_start < rlc_pP->t_poll_retransmit.frame_time_out) &&
|
||||||
((frameP >= rlc_pP->t_poll_retransmit.frame_time_out) ||
|
((ctxt_pP->frame >= rlc_pP->t_poll_retransmit.frame_time_out) ||
|
||||||
(frameP < rlc_pP->t_poll_retransmit.frame_start))) ||
|
(ctxt_pP->frame < rlc_pP->t_poll_retransmit.frame_start))) ||
|
||||||
// CASE 2: time out start
|
// CASE 2: time out start
|
||||||
// +-----------+------------------+----------+
|
// +-----------+------------------+----------+
|
||||||
// |***********| |**********|
|
// |***********| |**********|
|
||||||
// +-----------+------------------+----------+
|
// +-----------+------------------+----------+
|
||||||
//FRAME # 0 FRAME MAX VALUE
|
//FRAME # 0 FRAME MAX VALUE
|
||||||
((rlc_pP->t_poll_retransmit.frame_start > rlc_pP->t_poll_retransmit.frame_time_out) &&
|
((rlc_pP->t_poll_retransmit.frame_start > rlc_pP->t_poll_retransmit.frame_time_out) &&
|
||||||
(frameP < rlc_pP->t_poll_retransmit.frame_start) && (frameP >= rlc_pP->t_poll_retransmit.frame_time_out))
|
(ctxt_pP->frame < rlc_pP->t_poll_retransmit.frame_start) && (ctxt_pP->frame >= rlc_pP->t_poll_retransmit.frame_time_out))
|
||||||
) {
|
) {
|
||||||
//if (rlc_pP->t_poll_retransmit.frame_time_out <= frameP) {
|
//if (rlc_pP->t_poll_retransmit.frame_time_out <= ctxt_pP->frame) {
|
||||||
rlc_pP->t_poll_retransmit.running = 0;
|
rlc_pP->t_poll_retransmit.running = 0;
|
||||||
rlc_pP->t_poll_retransmit.timed_out = 1;
|
rlc_pP->t_poll_retransmit.timed_out = 1;
|
||||||
rlc_pP->stat_timer_poll_retransmit_timed_out += 1;
|
rlc_pP->stat_timer_poll_retransmit_timed_out += 1;
|
||||||
|
|
||||||
LOG_D(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][T_POLL_RETRANSMIT] TIME-OUT\n",
|
LOG_D(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][T_POLL_RETRANSMIT] TIME-OUT\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
|
|
||||||
//#warning TO DO rlc_am_check_timer_poll_retransmit
|
//#warning TO DO rlc_am_check_timer_poll_retransmit
|
||||||
rlc_pP->t_poll_retransmit.frame_time_out = frameP + rlc_pP->t_poll_retransmit.time_out;
|
rlc_pP->t_poll_retransmit.frame_time_out = ctxt_pP->frame + rlc_pP->t_poll_retransmit.time_out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
int rlc_am_is_timer_poll_retransmit_timed_out(rlc_am_entity_t *const rlc_pP)
|
int
|
||||||
|
rlc_am_is_timer_poll_retransmit_timed_out(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t * const rlc_pP
|
||||||
|
)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
return rlc_pP->t_poll_retransmit.timed_out;
|
return rlc_pP->t_poll_retransmit.timed_out;
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_stop_and_reset_timer_poll_retransmit(
|
void
|
||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_stop_and_reset_timer_poll_retransmit(
|
||||||
const frame_t frameP)
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t * const rlc_pP
|
||||||
|
)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
LOG_D(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][T_POLL_RETRANSMIT] STOPPED AND RESET\n",
|
LOG_D(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][T_POLL_RETRANSMIT] STOPPED AND RESET\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
rlc_pP->t_poll_retransmit.running = 0;
|
rlc_pP->t_poll_retransmit.running = 0;
|
||||||
rlc_pP->t_poll_retransmit.frame_time_out = 0;
|
rlc_pP->t_poll_retransmit.frame_time_out = 0;
|
||||||
@@ -110,26 +118,30 @@ void rlc_am_stop_and_reset_timer_poll_retransmit(
|
|||||||
rlc_pP->t_poll_retransmit.timed_out = 0;
|
rlc_pP->t_poll_retransmit.timed_out = 0;
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_start_timer_poll_retransmit(
|
void
|
||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_start_timer_poll_retransmit(
|
||||||
const frame_t frameP)
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t * const rlc_pP
|
||||||
|
)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
rlc_pP->t_poll_retransmit.running = 1;
|
rlc_pP->t_poll_retransmit.running = 1;
|
||||||
rlc_pP->t_poll_retransmit.frame_time_out = frameP + rlc_pP->t_poll_retransmit.time_out;
|
rlc_pP->t_poll_retransmit.frame_time_out = ctxt_pP->frame + rlc_pP->t_poll_retransmit.time_out;
|
||||||
rlc_pP->t_poll_retransmit.frame_start = frameP;
|
rlc_pP->t_poll_retransmit.frame_start = ctxt_pP->frame;
|
||||||
rlc_pP->t_poll_retransmit.timed_out = 0;
|
rlc_pP->t_poll_retransmit.timed_out = 0;
|
||||||
LOG_D(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][T_POLL_RETRANSMIT] STARTED (TIME-OUT = FRAME %05d)\n",
|
LOG_D(RLC, "[FRAME %05d][%s][RLC_AM][MOD %u/%u][RB %u][T_POLL_RETRANSMIT] STARTED (TIME-OUT = FRAME %05d)\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->t_poll_retransmit.frame_time_out);
|
rlc_pP->t_poll_retransmit.frame_time_out);
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_init_timer_poll_retransmit(
|
void
|
||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_init_timer_poll_retransmit(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t * const rlc_pP,
|
||||||
const uint32_t time_outP)
|
const uint32_t time_outP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -58,47 +58,55 @@
|
|||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/*! \fn void rlc_am_check_timer_poll_retransmit(rlc_am_entity_t *rlc_pP,frame_t frameP)
|
/*! \fn void rlc_am_check_timer_poll_retransmit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP)
|
||||||
* \brief Check if timer Poll-retransmit has timed-out, if so it is stopped and has the status "timed-out".
|
* \brief Check if timer Poll-retransmit has timed-out, if so it is stopped and has the status "timed-out".
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] frame Frame index
|
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_timer_poll_retransmit(void rlc_am_check_timer_poll_retransmit(
|
protected_rlc_am_timer_poll_retransmit(void rlc_am_check_timer_poll_retransmit(
|
||||||
rlc_am_entity_t *const rlc_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const frame_t frameP));
|
rlc_am_entity_t* const rlc_pP));
|
||||||
|
|
||||||
/*! \fn int rlc_am_is_timer_poll_retransmit_timed_out(rlc_am_entity_t *rlc_pP)
|
/*! \fn int rlc_am_is_timer_poll_retransmit_timed_out(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP)
|
||||||
* \brief Boolean function, check if timer Poll-retransmit has timed-out.
|
* \brief Boolean function, check if timer Poll-retransmit has timed-out.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \return 1 if timer Poll-retransmit has timed-out, else 0.
|
* \return 1 if timer Poll-retransmit has timed-out, else 0.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_timer_poll_retransmit(int rlc_am_is_timer_poll_retransmit_timed_out(rlc_am_entity_t *const rlc_pP);)
|
protected_rlc_am_timer_poll_retransmit(int rlc_am_is_timer_poll_retransmit_timed_out(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t* const rlc_pP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_stop_and_reset_timer_poll_retransmit(rlc_am_entity_t *rlc_pP,frame_t frameP)
|
/*! \fn void rlc_am_stop_and_reset_timer_poll_retransmit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP)
|
||||||
* \brief Stop and reset the timer Poll-retransmit.
|
* \brief Stop and reset the timer Poll-retransmit.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] frame Frame index
|
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_timer_poll_retransmit(void rlc_am_stop_and_reset_timer_poll_retransmit(
|
protected_rlc_am_timer_poll_retransmit(void rlc_am_stop_and_reset_timer_poll_retransmit(
|
||||||
rlc_am_entity_t *const rlc_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const frame_t frameP);)
|
rlc_am_entity_t* const rlc_pP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_start_timer_poll_retransmit(rlc_am_entity_t *rlc_pP,frame_t frameP)
|
/*! \fn void rlc_am_start_timer_poll_retransmit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP)
|
||||||
* \brief Re-arm (based on RLC AM config parameter) and start timer Poll-retransmit.
|
* \brief Re-arm (based on RLC AM config parameter) and start timer Poll-retransmit.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] frame Frame index
|
* \param[in] frame Frame index
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_timer_poll_retransmit(void rlc_am_start_timer_poll_retransmit(
|
protected_rlc_am_timer_poll_retransmit(void rlc_am_start_timer_poll_retransmit(
|
||||||
rlc_am_entity_t *const rlc_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const frame_t frameP);)
|
rlc_am_entity_t* const rlc_pP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_init_timer_poll_retransmit(rlc_am_entity_t *rlc_pP, uint32_t time_outP)
|
/*! \fn void rlc_am_init_timer_poll_retransmit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP, const uint32_t time_outP)
|
||||||
* \brief Initialize the timer Poll-retransmit with RLC AM time-out config parameter.
|
* \brief Initialize the timer Poll-retransmit with RLC AM time-out config parameter.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] time_outP Time-out in frame units.
|
* \param[in] time_outP Time-out in frame units.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_timer_poll_retransmit(void rlc_am_init_timer_poll_retransmit(
|
protected_rlc_am_timer_poll_retransmit(void rlc_am_init_timer_poll_retransmit(
|
||||||
rlc_am_entity_t *const rlc_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t* const rlc_pP,
|
||||||
const uint32_t time_outP);)
|
const uint32_t time_outP);)
|
||||||
/** @} */
|
/** @} */
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -37,7 +37,10 @@
|
|||||||
# include "LAYER2/MAC/extern.h"
|
# include "LAYER2/MAC/extern.h"
|
||||||
#include "UTIL/LOG/log.h"
|
#include "UTIL/LOG/log.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_check_timer_reordering(rlc_am_entity_t *rlc_pP,frame_t frameP)
|
void
|
||||||
|
rlc_am_check_timer_reordering(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t * const rlc_pP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
return ; // for debug
|
return ; // for debug
|
||||||
@@ -51,17 +54,17 @@ void rlc_am_check_timer_reordering(rlc_am_entity_t *rlc_pP,frame_t frameP)
|
|||||||
// +-----------+------------------+----------+
|
// +-----------+------------------+----------+
|
||||||
//FRAME # 0 FRAME MAX
|
//FRAME # 0 FRAME MAX
|
||||||
((rlc_pP->t_reordering.frame_start < rlc_pP->t_reordering.frame_time_out) &&
|
((rlc_pP->t_reordering.frame_start < rlc_pP->t_reordering.frame_time_out) &&
|
||||||
((frameP >= rlc_pP->t_reordering.frame_time_out) ||
|
((ctxt_pP->frame >= rlc_pP->t_reordering.frame_time_out) ||
|
||||||
(frameP < rlc_pP->t_reordering.frame_start))) ||
|
(ctxt_pP->frame < rlc_pP->t_reordering.frame_start))) ||
|
||||||
// CASE 2: time out start
|
// CASE 2: time out start
|
||||||
// +-----------+------------------+----------+
|
// +-----------+------------------+----------+
|
||||||
// |***********| |**********|
|
// |***********| |**********|
|
||||||
// +-----------+------------------+----------+
|
// +-----------+------------------+----------+
|
||||||
//FRAME # 0 FRAME MAX VALUE
|
//FRAME # 0 FRAME MAX VALUE
|
||||||
((rlc_pP->t_reordering.frame_start > rlc_pP->t_reordering.frame_time_out) &&
|
((rlc_pP->t_reordering.frame_start > rlc_pP->t_reordering.frame_time_out) &&
|
||||||
(frameP < rlc_pP->t_reordering.frame_start) && (frameP >= rlc_pP->t_reordering.frame_time_out))
|
(ctxt_pP->frame < rlc_pP->t_reordering.frame_start) && (ctxt_pP->frame >= rlc_pP->t_reordering.frame_time_out))
|
||||||
) {
|
) {
|
||||||
//if (rlc_pP->t_reordering.frame_time_out == frameP) {
|
//if (rlc_pP->t_reordering.frame_time_out == ctxt_pP->frame) {
|
||||||
// 5.1.3.2.4 Actions when t-Reordering expires
|
// 5.1.3.2.4 Actions when t-Reordering expires
|
||||||
// When t-Reordering expires, the receiving side of an AM RLC entity shall:
|
// When t-Reordering expires, the receiving side of an AM RLC entity shall:
|
||||||
// - update VR(MS) to the SN of the first AMD PDU with SN >= VR(X) for which not all byte segments have been
|
// - update VR(MS) to the SN of the first AMD PDU with SN >= VR(X) for which not all byte segments have been
|
||||||
@@ -86,7 +89,7 @@ void rlc_am_check_timer_reordering(rlc_am_entity_t *rlc_pP,frame_t frameP)
|
|||||||
// NOT VERY SURE ABOUT THAT, THINK ABOUT IT
|
// NOT VERY SURE ABOUT THAT, THINK ABOUT IT
|
||||||
rlc_pP->vr_ms = (pdu_info->sn + 1) & RLC_AM_SN_MASK;
|
rlc_pP->vr_ms = (pdu_info->sn + 1) & RLC_AM_SN_MASK;
|
||||||
|
|
||||||
if (rlc_am_sn_gte_vr_x(rlc_pP, pdu_info->sn)) {
|
if (rlc_am_sn_gte_vr_x(ctxt_pP, rlc_pP, pdu_info->sn)) {
|
||||||
if (((rlc_am_rx_pdu_management_t*)(cursor->data))->all_segments_received == 0) {
|
if (((rlc_am_rx_pdu_management_t*)(cursor->data))->all_segments_received == 0) {
|
||||||
rlc_pP->vr_ms = pdu_info->sn;
|
rlc_pP->vr_ms = pdu_info->sn;
|
||||||
break;
|
break;
|
||||||
@@ -95,22 +98,22 @@ void rlc_am_check_timer_reordering(rlc_am_entity_t *rlc_pP,frame_t frameP)
|
|||||||
cursor = cursor->next;
|
cursor = cursor->next;
|
||||||
} while (cursor != NULL);
|
} while (cursor != NULL);
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][T-REORDERING] TIME-OUT UPDATED VR(MS) %04d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][T-REORDERING] TIME-OUT UPDATED VR(MS) %04d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->vr_ms);
|
rlc_pP->vr_ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rlc_am_sn_gt_vr_ms(rlc_pP, rlc_pP->vr_h)) {
|
if (rlc_am_sn_gt_vr_ms(ctxt_pP, rlc_pP, rlc_pP->vr_h)) {
|
||||||
rlc_pP->vr_x = rlc_pP->vr_h;
|
rlc_pP->vr_x = rlc_pP->vr_h;
|
||||||
rlc_pP->t_reordering.frame_time_out = frameP + rlc_pP->t_reordering.time_out;
|
rlc_pP->t_reordering.frame_time_out = ctxt_pP->frame + rlc_pP->t_reordering.time_out;
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][T-REORDERING] TIME-OUT, RESTARTED T-REORDERING, UPDATED VR(X) to VR(R) %04d\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][T-REORDERING] TIME-OUT, RESTARTED T-REORDERING, UPDATED VR(X) to VR(R) %04d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->vr_x);
|
rlc_pP->vr_x);
|
||||||
}
|
}
|
||||||
@@ -120,14 +123,17 @@ void rlc_am_check_timer_reordering(rlc_am_entity_t *rlc_pP,frame_t frameP)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_stop_and_reset_timer_reordering(rlc_am_entity_t *rlc_pP,frame_t frameP)
|
void
|
||||||
|
rlc_am_stop_and_reset_timer_reordering(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t * const rlc_pP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][T-REORDERING] STOPPED AND RESET\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][T-REORDERING] STOPPED AND RESET\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
rlc_pP->t_reordering.running = 0;
|
rlc_pP->t_reordering.running = 0;
|
||||||
rlc_pP->t_reordering.frame_time_out = 0;
|
rlc_pP->t_reordering.frame_time_out = 0;
|
||||||
@@ -135,23 +141,30 @@ void rlc_am_stop_and_reset_timer_reordering(rlc_am_entity_t *rlc_pP,frame_t fram
|
|||||||
rlc_pP->t_reordering.timed_out = 0;
|
rlc_pP->t_reordering.timed_out = 0;
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_start_timer_reordering(rlc_am_entity_t *rlc_pP,frame_t frameP)
|
void
|
||||||
|
rlc_am_start_timer_reordering(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t * const rlc_pP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
rlc_pP->t_reordering.running = 1;
|
rlc_pP->t_reordering.running = 1;
|
||||||
rlc_pP->t_reordering.frame_time_out = frameP + rlc_pP->t_reordering.time_out;
|
rlc_pP->t_reordering.frame_time_out = ctxt_pP->frame + rlc_pP->t_reordering.time_out;
|
||||||
rlc_pP->t_reordering.frame_start = frameP;
|
rlc_pP->t_reordering.frame_start = ctxt_pP->frame;
|
||||||
rlc_pP->t_reordering.timed_out = 0;
|
rlc_pP->t_reordering.timed_out = 0;
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][T-REORDERING] STARTED (TIME-OUT = FRAME %5u)\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][T-REORDERING] STARTED (TIME-OUT = FRAME %5u)\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->t_reordering.frame_time_out);
|
rlc_pP->t_reordering.frame_time_out);
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_init_timer_reordering(rlc_am_entity_t *rlc_pP, uint32_t time_outP)
|
void
|
||||||
|
rlc_am_init_timer_reordering(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t * const rlc_pP,
|
||||||
|
const uint32_t time_outP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
rlc_pP->t_reordering.running = 0;
|
rlc_pP->t_reordering.running = 0;
|
||||||
|
|||||||
@@ -57,32 +57,42 @@
|
|||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/*! \fn void rlc_am_check_timer_reordering(rlc_am_entity_t *rlc_pP,frame_t frameP)
|
/*! \fn void rlc_am_check_timer_reordering(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP)
|
||||||
* \brief Check if timer reordering has timed-out, if so it is stopped and has the status "timed-out".
|
* \brief Check if timer reordering has timed-out, if so it is stopped and has the status "timed-out".
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index
|
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_timer_reordering(void rlc_am_check_timer_reordering(rlc_am_entity_t *rlc_pP,frame_t frameP));
|
protected_rlc_am_timer_reordering(void rlc_am_check_timer_reordering(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t* const rlc_pP));
|
||||||
|
|
||||||
/*! \fn void rlc_am_stop_and_reset_timer_reordering(rlc_am_entity_t *rlc_pP,frame_t frameP)
|
/*! \fn void rlc_am_stop_and_reset_timer_reordering(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP)
|
||||||
* \brief Stop and reset the timer reordering.
|
* \brief Stop and reset the timer reordering.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_timer_reordering(void rlc_am_stop_and_reset_timer_reordering(rlc_am_entity_t *rlc_pP,frame_t frameP);)
|
protected_rlc_am_timer_reordering(void rlc_am_stop_and_reset_timer_reordering(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t* const rlc_pP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_start_timer_reordering(rlc_am_entity_t *rlc_pP,frame_t frameP)
|
/*! \fn void rlc_am_start_timer_reordering(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP)
|
||||||
* \brief Re-arm (based on RLC AM config parameter) and start timer reordering.
|
* \brief Re-arm (based on RLC AM config parameter) and start timer reordering.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_timer_reordering(void rlc_am_start_timer_reordering(rlc_am_entity_t *rlc_pP,frame_t frameP);)
|
protected_rlc_am_timer_reordering(void rlc_am_start_timer_reordering(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t* const rlc_pP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_init_timer_reordering(rlc_am_entity_t *rlc_pP, uint32_t time_outP)
|
/*! \fn void rlc_am_init_timer_reordering(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP, const uint32_t time_outP)
|
||||||
* \brief Initialize the timer reordering with RLC AM time-out config parameter.
|
* \brief Initialize the timer reordering with RLC AM time-out config parameter.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] time_outP Time-out in frameP units.
|
* \param[in] time_outP Time-out in frameP units.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_timer_reordering(void rlc_am_init_timer_reordering(rlc_am_entity_t *rlc_pP, uint32_t time_outP);)
|
protected_rlc_am_timer_reordering(void rlc_am_init_timer_reordering(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t* const rlc_pP,
|
||||||
|
const uint32_t time_outP);)
|
||||||
/** @} */
|
/** @} */
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -37,9 +37,10 @@
|
|||||||
#include "LAYER2/MAC/extern.h"
|
#include "LAYER2/MAC/extern.h"
|
||||||
#include "UTIL/LOG/log.h"
|
#include "UTIL/LOG/log.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_check_timer_status_prohibit(
|
void
|
||||||
rlc_am_entity_t * const rlc_pP,
|
rlc_am_check_timer_status_prohibit(
|
||||||
const frame_t frameP)
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t * const rlc_pP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
if (rlc_pP->t_status_prohibit.time_out > 0) {
|
if (rlc_pP->t_status_prohibit.time_out > 0) {
|
||||||
@@ -51,47 +52,49 @@ void rlc_am_check_timer_status_prohibit(
|
|||||||
// +-----------+------------------+----------+
|
// +-----------+------------------+----------+
|
||||||
//FRAME # 0 FRAME MAX
|
//FRAME # 0 FRAME MAX
|
||||||
((rlc_pP->t_status_prohibit.frame_start < rlc_pP->t_status_prohibit.frame_time_out) &&
|
((rlc_pP->t_status_prohibit.frame_start < rlc_pP->t_status_prohibit.frame_time_out) &&
|
||||||
((frameP >= rlc_pP->t_status_prohibit.frame_time_out) ||
|
((ctxt_pP->frame >= rlc_pP->t_status_prohibit.frame_time_out) ||
|
||||||
(frameP < rlc_pP->t_status_prohibit.frame_start))) ||
|
(ctxt_pP->frame < rlc_pP->t_status_prohibit.frame_start))) ||
|
||||||
// CASE 2: time out start
|
// CASE 2: time out start
|
||||||
// +-----------+------------------+----------+
|
// +-----------+------------------+----------+
|
||||||
// |***********| |**********|
|
// |***********| |**********|
|
||||||
// +-----------+------------------+----------+
|
// +-----------+------------------+----------+
|
||||||
//FRAME # 0 FRAME MAX VALUE
|
//FRAME # 0 FRAME MAX VALUE
|
||||||
((rlc_pP->t_status_prohibit.frame_start > rlc_pP->t_status_prohibit.frame_time_out) &&
|
((rlc_pP->t_status_prohibit.frame_start > rlc_pP->t_status_prohibit.frame_time_out) &&
|
||||||
(frameP < rlc_pP->t_status_prohibit.frame_start) && (frameP >= rlc_pP->t_status_prohibit.frame_time_out))
|
(ctxt_pP->frame < rlc_pP->t_status_prohibit.frame_start) && (ctxt_pP->frame >= rlc_pP->t_status_prohibit.frame_time_out))
|
||||||
) {
|
) {
|
||||||
|
|
||||||
//if ((rlc_pP->t_status_prohibit.frame_time_out <= frameP) && (rlc_pP->t_status_prohibit.frame_start)) {
|
//if ((rlc_pP->t_status_prohibit.frame_time_out <= ctxt_pP->frame) && (rlc_pP->t_status_prohibit.frame_start)) {
|
||||||
rlc_pP->t_status_prohibit.running = 0;
|
rlc_pP->t_status_prohibit.running = 0;
|
||||||
rlc_pP->t_status_prohibit.timed_out = 1;
|
rlc_pP->t_status_prohibit.timed_out = 1;
|
||||||
rlc_pP->stat_timer_status_prohibit_timed_out += 1;
|
rlc_pP->stat_timer_status_prohibit_timed_out += 1;
|
||||||
|
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][T-STATUS-PROHIBIT] TIME-OUT\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][T-STATUS-PROHIBIT] TIME-OUT\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
//#warning TO DO rlc_am_check_timer_status_prohibit
|
//#warning TO DO rlc_am_check_timer_status_prohibit
|
||||||
rlc_am_stop_and_reset_timer_status_prohibit(rlc_pP, frameP);
|
rlc_am_stop_and_reset_timer_status_prohibit(ctxt_pP, rlc_pP);
|
||||||
//rlc_pP->t_status_prohibit.frame_time_out = frameP + rlc_pP->t_status_prohibit.time_out;
|
//rlc_pP->t_status_prohibit.frame_time_out = ctxt_pP->frame + rlc_pP->t_status_prohibit.time_out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_stop_and_reset_timer_status_prohibit(
|
void
|
||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_stop_and_reset_timer_status_prohibit(
|
||||||
const frame_t frameP)
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t *const rlc_pP
|
||||||
|
)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
if (rlc_pP->t_status_prohibit.time_out > 0) {
|
if (rlc_pP->t_status_prohibit.time_out > 0) {
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][T-STATUS-PROHIBIT] STOPPED AND RESET\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][T-STATUS-PROHIBIT] STOPPED AND RESET\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
rlc_pP->t_status_prohibit.running = 0;
|
rlc_pP->t_status_prohibit.running = 0;
|
||||||
rlc_pP->t_status_prohibit.frame_time_out = 0;
|
rlc_pP->t_status_prohibit.frame_time_out = 0;
|
||||||
@@ -100,21 +103,23 @@ void rlc_am_stop_and_reset_timer_status_prohibit(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_start_timer_status_prohibit(
|
void
|
||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_start_timer_status_prohibit(
|
||||||
const frame_t frameP)
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_am_entity_t *const rlc_pP
|
||||||
|
)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
if (rlc_pP->t_status_prohibit.time_out > 0) {
|
if (rlc_pP->t_status_prohibit.time_out > 0) {
|
||||||
rlc_pP->t_status_prohibit.running = 1;
|
rlc_pP->t_status_prohibit.running = 1;
|
||||||
rlc_pP->t_status_prohibit.frame_time_out = rlc_pP->t_status_prohibit.time_out + frameP;
|
rlc_pP->t_status_prohibit.frame_time_out = rlc_pP->t_status_prohibit.time_out + ctxt_pP->frame;
|
||||||
rlc_pP->t_status_prohibit.frame_start = frameP;
|
rlc_pP->t_status_prohibit.frame_start = ctxt_pP->frame;
|
||||||
rlc_pP->t_status_prohibit.timed_out = 0;
|
rlc_pP->t_status_prohibit.timed_out = 0;
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][T-STATUS-PROHIBIT] STARTED (TIME-OUT = FRAME %5u)\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][T-STATUS-PROHIBIT] STARTED (TIME-OUT = FRAME %5u)\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->t_status_prohibit.frame_time_out);
|
rlc_pP->t_status_prohibit.frame_time_out);
|
||||||
LOG_D(RLC, "TIME-OUT = FRAME %5u\n", rlc_pP->t_status_prohibit.frame_time_out);
|
LOG_D(RLC, "TIME-OUT = FRAME %5u\n", rlc_pP->t_status_prohibit.frame_time_out);
|
||||||
@@ -122,6 +127,7 @@ void rlc_am_start_timer_status_prohibit(
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_am_init_timer_status_prohibit(
|
void rlc_am_init_timer_status_prohibit(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_am_entity_t *const rlc_pP,
|
rlc_am_entity_t *const rlc_pP,
|
||||||
const uint32_t time_outP)
|
const uint32_t time_outP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -57,32 +57,33 @@
|
|||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/*! \fn void rlc_am_check_timer_status_prohibit(rlc_am_entity_t *rlc_pP,frame_t frameP)
|
/*! \fn void rlc_am_check_timer_status_prohibit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP)
|
||||||
* \brief Check if timer status-prohibit has timed-out, if so it is stopped and has the status "timed-out".
|
* \brief Check if timer status-prohibit has timed-out, if so it is stopped and has the status "timed-out".
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index
|
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_timer_status_prohibit(void rlc_am_check_timer_status_prohibit(rlc_am_entity_t *rlc_pP,frame_t frameP));
|
protected_rlc_am_timer_status_prohibit(void rlc_am_check_timer_status_prohibit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP));
|
||||||
|
|
||||||
/*! \fn void rlc_am_stop_and_reset_timer_status_prohibit(rlc_am_entity_t *rlc_pP)
|
/*! \fn void rlc_am_stop_and_reset_timer_status_prohibit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP)
|
||||||
* \brief Stop and reset the timer status-prohibit.
|
* \brief Stop and reset the timer status-prohibit.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index
|
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_timer_status_prohibit(void rlc_am_stop_and_reset_timer_status_prohibit(rlc_am_entity_t *rlc_pP,frame_t frameP);)
|
protected_rlc_am_timer_status_prohibit(void rlc_am_stop_and_reset_timer_status_prohibit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_start_timer_status_prohibit(rlc_am_entity_t *rlc_pP,frame_t frameP)
|
/*! \fn void rlc_am_start_timer_status_prohibit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP)
|
||||||
* \brief Re-arm (based on RLC AM config parameter) and start timer status-prohibit.
|
* \brief Re-arm (based on RLC AM config parameter) and start timer status-prohibit.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index
|
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_timer_status_prohibit(void rlc_am_start_timer_status_prohibit(rlc_am_entity_t *rlc_pP,frame_t frameP);)
|
protected_rlc_am_timer_status_prohibit(void rlc_am_start_timer_status_prohibit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP);)
|
||||||
|
|
||||||
/*! \fn void rlc_am_init_timer_status_prohibit(rlc_am_entity_t *rlc_pP, uint32_t time_outP)
|
/*! \fn void rlc_am_init_timer_status_prohibit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP, const uint32_t time_outP)
|
||||||
* \brief Initialize the timer status-prohibit with RLC AM time-out config parameter.
|
* \brief Initialize the timer status-prohibit with RLC AM time-out config parameter.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] time_outP Time-out in frameP units.
|
* \param[in] time_outP Time-out in frameP units.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_timer_status_prohibit(void rlc_am_init_timer_status_prohibit(rlc_am_entity_t *rlc_pP, uint32_t time_outP);)
|
protected_rlc_am_timer_status_prohibit(void rlc_am_init_timer_status_prohibit(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlc_pP, const uint32_t time_outP);)
|
||||||
/** @} */
|
/** @} */
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -39,7 +39,10 @@
|
|||||||
#include "rlc_am.h"
|
#include "rlc_am.h"
|
||||||
#include "UTIL/LOG/log.h"
|
#include "UTIL/LOG/log.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
signed int rlc_am_in_tx_window(rlc_am_entity_t* rlc_pP, rlc_sn_t snP)
|
signed int rlc_am_in_tx_window(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
const rlc_am_entity_t* const rlc_pP,
|
||||||
|
const rlc_sn_t snP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
rlc_usn_t shifted_sn;
|
rlc_usn_t shifted_sn;
|
||||||
@@ -57,7 +60,11 @@ signed int rlc_am_in_tx_window(rlc_am_entity_t* rlc_pP, rlc_sn_t snP)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
signed int rlc_am_in_rx_window(rlc_am_entity_t* rlc_pP, rlc_sn_t snP)
|
signed int
|
||||||
|
rlc_am_in_rx_window(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
const rlc_am_entity_t* const rlc_pP,
|
||||||
|
const rlc_sn_t snP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
rlc_usn_t shifted_sn;
|
rlc_usn_t shifted_sn;
|
||||||
@@ -75,7 +82,11 @@ signed int rlc_am_in_rx_window(rlc_am_entity_t* rlc_pP, rlc_sn_t snP)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
signed int rlc_am_sn_gte_vr_h(rlc_am_entity_t* rlc_pP, rlc_sn_t snP)
|
signed int
|
||||||
|
rlc_am_sn_gte_vr_h(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
const rlc_am_entity_t* const rlc_pP,
|
||||||
|
const rlc_sn_t snP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
rlc_usn_t shifted_sn;
|
rlc_usn_t shifted_sn;
|
||||||
@@ -93,7 +104,10 @@ signed int rlc_am_sn_gte_vr_h(rlc_am_entity_t* rlc_pP, rlc_sn_t snP)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
signed int rlc_am_sn_gte_vr_x(rlc_am_entity_t* rlc_pP, rlc_sn_t snP)
|
signed int rlc_am_sn_gte_vr_x(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
const rlc_am_entity_t* const rlc_pP,
|
||||||
|
const rlc_sn_t snP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
rlc_usn_t shifted_sn;
|
rlc_usn_t shifted_sn;
|
||||||
@@ -111,7 +125,11 @@ signed int rlc_am_sn_gte_vr_x(rlc_am_entity_t* rlc_pP, rlc_sn_t snP)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
signed int rlc_am_sn_gt_vr_ms(rlc_am_entity_t* rlc_pP, rlc_sn_t snP)
|
signed int
|
||||||
|
rlc_am_sn_gt_vr_ms(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
const rlc_am_entity_t* const rlc_pP,
|
||||||
|
const rlc_sn_t snP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
rlc_usn_t shifted_sn;
|
rlc_usn_t shifted_sn;
|
||||||
@@ -129,7 +147,12 @@ signed int rlc_am_sn_gt_vr_ms(rlc_am_entity_t* rlc_pP, rlc_sn_t snP)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
signed int rlc_am_tx_sn1_gt_sn2(rlc_am_entity_t* rlc_pP, rlc_sn_t sn1P, rlc_sn_t sn2P)
|
signed int
|
||||||
|
rlc_am_tx_sn1_gt_sn2(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
const rlc_am_entity_t* const rlc_pP,
|
||||||
|
const rlc_sn_t sn1P,
|
||||||
|
const rlc_sn_t sn2P)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
rlc_usn_t shifted_sn;
|
rlc_usn_t shifted_sn;
|
||||||
@@ -147,7 +170,12 @@ signed int rlc_am_tx_sn1_gt_sn2(rlc_am_entity_t* rlc_pP, rlc_sn_t sn1P, rlc_sn_t
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
signed int rlc_am_rx_sn1_gt_sn2(rlc_am_entity_t* rlc_pP, rlc_sn_t sn1P, rlc_sn_t sn2P)
|
signed int
|
||||||
|
rlc_am_rx_sn1_gt_sn2(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
const rlc_am_entity_t* const rlc_pP,
|
||||||
|
const rlc_sn_t sn1P,
|
||||||
|
const rlc_sn_t sn2P)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
rlc_usn_t shifted_sn;
|
rlc_usn_t shifted_sn;
|
||||||
|
|||||||
@@ -58,62 +58,92 @@
|
|||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/*! \fn signed int rlc_am_in_tx_window(rlc_am_entity_t* rlc_pP, rlc_sn_t snP)
|
/*! \fn signed int rlc_am_in_tx_window(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP, const rlc_sn_t snP)
|
||||||
* \brief Boolean function, check if sequence number is VT(A) <= snP < VT(MS).
|
* \brief Boolean function, check if sequence number is VT(A) <= snP < VT(MS).
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] snP Sequence number.
|
* \param[in] snP Sequence number.
|
||||||
* \return 1 if snP in tx window, else 0.
|
* \return 1 if snP in tx window, else 0.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_windows(signed int rlc_am_in_tx_window(rlc_am_entity_t* rlc_pP, rlc_sn_t snP);)
|
protected_rlc_am_windows(signed int rlc_am_in_tx_window(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
const rlc_am_entity_t* const rlc_pP,
|
||||||
|
const rlc_sn_t snP);)
|
||||||
|
|
||||||
/*! \fn signed int rlc_am_in_rx_window(rlc_am_entity_t* rlc_pP, rlc_sn_t snP)
|
/*! \fn signed int rlc_am_in_rx_window(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP, const rlc_sn_t snP)
|
||||||
* \brief Boolean function, check if sequence number is VR(R) <= snP < VR(MR).
|
* \brief Boolean function, check if sequence number is VR(R) <= snP < VR(MR).
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] snP Sequence number.
|
* \param[in] snP Sequence number.
|
||||||
* \return 1 if snP in rx window, else 0.
|
* \return 1 if snP in rx window, else 0.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_windows(signed int rlc_am_in_rx_window(rlc_am_entity_t* rlc_pP, rlc_sn_t snP);)
|
protected_rlc_am_windows(signed int rlc_am_in_rx_window(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
const rlc_am_entity_t* const rlc_pP,
|
||||||
|
const rlc_sn_t snP);)
|
||||||
|
|
||||||
/*! \fn signed int rlc_am_sn_gte_vr_h (rlc_am_entity_t* rlc_pP, rlc_sn_t snP)
|
/*! \fn signed int rlc_am_sn_gte_vr_h (const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP, const rlc_sn_t snP)
|
||||||
* \brief Boolean function, check if sequence number is greater than or equal VR(R).
|
* \brief Boolean function, check if sequence number is greater than or equal VR(R).
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] snP Sequence number.
|
* \param[in] snP Sequence number.
|
||||||
* \return 1 if sequence number is greater than or equal VR(R), else 0.
|
* \return 1 if sequence number is greater than or equal VR(R), else 0.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_windows(signed int rlc_am_sn_gte_vr_h (rlc_am_entity_t* rlc_pP, rlc_sn_t snP);)
|
protected_rlc_am_windows(signed int rlc_am_sn_gte_vr_h (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
const rlc_am_entity_t* const rlc_pP,
|
||||||
|
const rlc_sn_t snP);)
|
||||||
|
|
||||||
/*! \fn signed int rlc_am_sn_gte_vr_x (rlc_am_entity_t* rlc_pP, rlc_sn_t snP)
|
/*! \fn signed int rlc_am_sn_gte_vr_x (const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP, const rlc_sn_t snP)
|
||||||
* \brief Boolean function, check if sequence number is greater than or equal VR(X).
|
* \brief Boolean function, check if sequence number is greater than or equal VR(X).
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] snP Sequence number.
|
* \param[in] snP Sequence number.
|
||||||
* \return 1 if sequence number is greater than or equal VR(X), else 0.
|
* \return 1 if sequence number is greater than or equal VR(X), else 0.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_windows(signed int rlc_am_sn_gte_vr_x (rlc_am_entity_t* rlc_pP, rlc_sn_t snP);)
|
protected_rlc_am_windows(signed int rlc_am_sn_gte_vr_x (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
const rlc_am_entity_t* const rlc_pP,
|
||||||
|
const rlc_sn_t snP);)
|
||||||
|
|
||||||
/*! \fn signed int rlc_am_sn_gt_vr_ms (rlc_am_entity_t* rlc_pP, rlc_sn_t snP)
|
/*! \fn signed int rlc_am_sn_gt_vr_ms (const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP, const rlc_sn_t snP)
|
||||||
* \brief Boolean function, check if sequence number is greater than VR(MS).
|
* \brief Boolean function, check if sequence number is greater than VR(MS).
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] snP Sequence number.
|
* \param[in] snP Sequence number.
|
||||||
* \return 1 if sequence number is greater than VR(MS), else 0.
|
* \return 1 if sequence number is greater than VR(MS), else 0.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_windows(signed int rlc_am_sn_gt_vr_ms(rlc_am_entity_t* rlc_pP, rlc_sn_t snP);)
|
protected_rlc_am_windows(signed int rlc_am_sn_gt_vr_ms(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
const rlc_am_entity_t* const rlc_pP,
|
||||||
|
const rlc_sn_t snP);)
|
||||||
|
|
||||||
/*! \fn signed int rlc_am_tx_sn1_gt_sn2 (rlc_am_entity_t* rlc_pP, rlc_sn_t sn1P, rlc_sn_t sn2P)
|
/*! \fn signed int rlc_am_tx_sn1_gt_sn2 (const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP, const rlc_sn_t sn1P, const rlc_sn_t sn2P)
|
||||||
* \brief Boolean function, in the context of the tx window, check if sn1P is greater than sn2P.
|
* \brief Boolean function, in the context of the tx window, check if sn1P is greater than sn2P.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] sn1P Sequence number.
|
* \param[in] sn1P Sequence number.
|
||||||
* \param[in] sn2P Sequence number.
|
* \param[in] sn2P Sequence number.
|
||||||
* \return 1 if sn1P is greater than sn2P, else 0.
|
* \return 1 if sn1P is greater than sn2P, else 0.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_windows(signed int rlc_am_tx_sn1_gt_sn2(rlc_am_entity_t* rlc_pP, rlc_sn_t sn1P, rlc_sn_t sn2P);)
|
protected_rlc_am_windows(signed int rlc_am_tx_sn1_gt_sn2(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
const rlc_am_entity_t* const rlc_pP,
|
||||||
|
const rlc_sn_t sn1P,
|
||||||
|
const rlc_sn_t sn2P);)
|
||||||
|
|
||||||
/*! \fn signed int rlc_am_rx_sn1_gt_sn2(rlc_am_entity_t* rlc_pP, rlc_sn_t sn1P, rlc_sn_t sn2P)
|
/*! \fn signed int rlc_am_rx_sn1_gt_sn2(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP, const rlc_sn_t sn1P, const rlc_sn_t sn2P)
|
||||||
* \brief Boolean function, in the context of the rx window, check if sn1P is greater than sn2P.
|
* \brief Boolean function, in the context of the rx window, check if sn1P is greater than sn2P.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
* \param[in] rlc_pP RLC AM protocol instance pointer.
|
||||||
* \param[in] sn1P Sequence number.
|
* \param[in] sn1P Sequence number.
|
||||||
* \param[in] sn2P Sequence number.
|
* \param[in] sn2P Sequence number.
|
||||||
* \return 1 if sn1P is greater than sn2P, else 0.
|
* \return 1 if sn1P is greater than sn2P, else 0.
|
||||||
*/
|
*/
|
||||||
protected_rlc_am_windows(signed int rlc_am_rx_sn1_gt_sn2(rlc_am_entity_t* rlc_pP, rlc_sn_t sn1P, rlc_sn_t sn2P);)
|
protected_rlc_am_windows(signed int rlc_am_rx_sn1_gt_sn2(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
const rlc_am_entity_t* const rlc_pP,
|
||||||
|
const rlc_sn_t sn1P,
|
||||||
|
const rlc_sn_t sn2P);)
|
||||||
/** @} */
|
/** @} */
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
@@ -40,9 +40,8 @@
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rlc_tm_send_sdu (
|
rlc_tm_send_sdu (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_tm_entity_t * const rlc_pP,
|
rlc_tm_entity_t * const rlc_pP,
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t eNB_flag,
|
|
||||||
const boolean_t error_indicationP,
|
const boolean_t error_indicationP,
|
||||||
uint8_t * const srcP,
|
uint8_t * const srcP,
|
||||||
const sdu_size_t length_in_bitsP)
|
const sdu_size_t length_in_bitsP)
|
||||||
@@ -71,10 +70,7 @@ rlc_tm_send_sdu (
|
|||||||
memcpy (&rlc_pP->output_sdu_in_construction->data[rlc_pP->output_sdu_size_to_write], srcP, length_in_bytes);
|
memcpy (&rlc_pP->output_sdu_in_construction->data[rlc_pP->output_sdu_size_to_write], srcP, length_in_bytes);
|
||||||
|
|
||||||
rlc_data_ind (
|
rlc_data_ind (
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP,
|
||||||
rlc_pP->ue_module_id,
|
|
||||||
frameP,
|
|
||||||
eNB_flag,
|
|
||||||
BOOL_NOT(rlc_pP->is_data_plane),
|
BOOL_NOT(rlc_pP->is_data_plane),
|
||||||
MBMS_FLAG_NO,
|
MBMS_FLAG_NO,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
@@ -88,6 +84,7 @@ rlc_tm_send_sdu (
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rlc_tm_no_segment (
|
rlc_tm_no_segment (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_tm_entity_t *const rlc_pP
|
rlc_tm_entity_t *const rlc_pP
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@@ -129,9 +126,8 @@ rlc_tm_no_segment (
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rlc_tm_rx (
|
rlc_tm_rx (
|
||||||
void *const argP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const frame_t frameP,
|
void * const argP,
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
struct mac_data_ind data_indP)
|
struct mac_data_ind data_indP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -146,7 +142,7 @@ rlc_tm_rx (
|
|||||||
|
|
||||||
((struct rlc_tm_rx_pdu_management *) (tb_p->data))->first_byte = first_byte_p;
|
((struct rlc_tm_rx_pdu_management *) (tb_p->data))->first_byte = first_byte_p;
|
||||||
|
|
||||||
rlc_tm_send_sdu (rlc_p, frameP, eNB_flagP, (((struct mac_tb_ind *) (tb_p->data))->error_indication), first_byte_p, data_indP.tb_size);
|
rlc_tm_send_sdu (ctxt_pP, rlc_p, (((struct mac_tb_ind *) (tb_p->data))->error_indication), first_byte_p, data_indP.tb_size);
|
||||||
free_mem_block (tb_p);
|
free_mem_block (tb_p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -154,7 +150,8 @@ rlc_tm_rx (
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
struct mac_status_resp
|
struct mac_status_resp
|
||||||
rlc_tm_mac_status_indication (
|
rlc_tm_mac_status_indication (
|
||||||
void *const rlc_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
void * const rlc_pP,
|
||||||
const tb_size_t tb_sizeP,
|
const tb_size_t tb_sizeP,
|
||||||
struct mac_status_ind tx_statusP)
|
struct mac_status_ind tx_statusP)
|
||||||
{
|
{
|
||||||
@@ -172,14 +169,14 @@ rlc_tm_mac_status_indication (
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
struct mac_data_req
|
struct mac_data_req
|
||||||
rlc_tm_mac_data_request (
|
rlc_tm_mac_data_request (
|
||||||
void * const rlc_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const frame_t frameP)
|
void * const rlc_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
rlc_tm_entity_t *l_rlc_p = (rlc_tm_entity_t *) rlc_pP;
|
rlc_tm_entity_t *l_rlc_p = (rlc_tm_entity_t *) rlc_pP;
|
||||||
struct mac_data_req data_req;
|
struct mac_data_req data_req;
|
||||||
|
|
||||||
rlc_tm_no_segment (l_rlc_p);
|
rlc_tm_no_segment (ctxt_pP, l_rlc_p);
|
||||||
list_init (&data_req.data, NULL);
|
list_init (&data_req.data, NULL);
|
||||||
list_add_list (&l_rlc_p->pdus_to_mac_layer, &data_req.data);
|
list_add_list (&l_rlc_p->pdus_to_mac_layer, &data_req.data);
|
||||||
|
|
||||||
@@ -188,11 +185,11 @@ rlc_tm_mac_data_request (
|
|||||||
data_req.rlc_info.rlc_protocol_state = l_rlc_p->protocol_state;
|
data_req.rlc_info.rlc_protocol_state = l_rlc_p->protocol_state;
|
||||||
if (data_req.data.nb_elements > 0) {
|
if (data_req.data.nb_elements > 0) {
|
||||||
LOG_D(RLC, "[RLC_TM][%s][MOD %02u/%02u][RB %d][FRAME %05d] MAC_DATA_REQUEST %d TBs\n",
|
LOG_D(RLC, "[RLC_TM][%s][MOD %02u/%02u][RB %d][FRAME %05d] MAC_DATA_REQUEST %d TBs\n",
|
||||||
(l_rlc_p->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
l_rlc_p->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
l_rlc_p->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
l_rlc_p->rb_id,
|
l_rlc_p->rb_id,
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
data_req.data.nb_elements);
|
data_req.data.nb_elements);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -202,9 +199,8 @@ rlc_tm_mac_data_request (
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rlc_tm_mac_data_indication (
|
rlc_tm_mac_data_indication (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
void * const rlc_pP,
|
void * const rlc_pP,
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t eNB_flag,
|
|
||||||
struct mac_data_ind data_indP)
|
struct mac_data_ind data_indP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -212,19 +208,20 @@ rlc_tm_mac_data_indication (
|
|||||||
|
|
||||||
if (data_indP.data.nb_elements > 0) {
|
if (data_indP.data.nb_elements > 0) {
|
||||||
LOG_D(RLC, "[RLC_TM][%s][MOD %02u/%02u][RB %d][FRAME %05d] MAC_DATA_IND %d TBs\n",
|
LOG_D(RLC, "[RLC_TM][%s][MOD %02u/%02u][RB %d][FRAME %05d] MAC_DATA_IND %d TBs\n",
|
||||||
(l_rlc_p->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
l_rlc_p->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
l_rlc_p->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
l_rlc_p->rb_id,
|
l_rlc_p->rb_id,
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
data_indP.data.nb_elements);
|
data_indP.data.nb_elements);
|
||||||
}
|
}
|
||||||
rlc_tm_rx (rlc_pP, frameP, eNB_flag, data_indP);
|
rlc_tm_rx (ctxt_pP, rlc_pP, data_indP);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rlc_tm_data_req (
|
rlc_tm_data_req (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
void *const rlc_pP,
|
void *const rlc_pP,
|
||||||
mem_block_t *const sdu_pP)
|
mem_block_t *const sdu_pP)
|
||||||
{
|
{
|
||||||
@@ -233,9 +230,9 @@ rlc_tm_data_req (
|
|||||||
|
|
||||||
#ifdef DEBUG_RLC_TM_DATA_REQUEST
|
#ifdef DEBUG_RLC_TM_DATA_REQUEST
|
||||||
LOG_D (RLC, "[RLC_TM][%s][MOD %02u/%02u] RLC_TM_DATA_REQ size %d Bytes, BO %ld , NB SDU %d current_sdu_index=%d next_sdu_index=%d\n",
|
LOG_D (RLC, "[RLC_TM][%s][MOD %02u/%02u] RLC_TM_DATA_REQ size %d Bytes, BO %ld , NB SDU %d current_sdu_index=%d next_sdu_index=%d\n",
|
||||||
(l_rlc_p->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
l_rlc_p->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
l_rlc_p->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
((struct rlc_um_data_req *) (sdu_pP->data))->data_size,
|
((struct rlc_um_data_req *) (sdu_pP->data))->data_size,
|
||||||
rlc_p->buffer_occupancy,
|
rlc_p->buffer_occupancy,
|
||||||
rlc_p->nb_sdu,
|
rlc_p->nb_sdu,
|
||||||
|
|||||||
@@ -67,9 +67,8 @@
|
|||||||
|
|
||||||
|
|
||||||
/*! \fn void rlc_tm_send_sdu (
|
/*! \fn void rlc_tm_send_sdu (
|
||||||
|
* const protocol_ctxt_t* const ctxt_pP,
|
||||||
* rlc_tm_entity_t * const rlc_pP,
|
* rlc_tm_entity_t * const rlc_pP,
|
||||||
* const frame_t frameP,
|
|
||||||
* const eNB_flag_t eNB_flag,
|
|
||||||
* const boolean_t error_indicationP,
|
* const boolean_t error_indicationP,
|
||||||
* uint8_t * const srcP,
|
* uint8_t * const srcP,
|
||||||
* const sdu_size_t length_in_bitsP)
|
* const sdu_size_t length_in_bitsP)
|
||||||
@@ -80,67 +79,81 @@
|
|||||||
* \param[in] length_in_bitsP Length of SDU in bits.
|
* \param[in] length_in_bitsP Length of SDU in bits.
|
||||||
*/
|
*/
|
||||||
private_rlc_tm(void rlc_tm_send_sdu (
|
private_rlc_tm(void rlc_tm_send_sdu (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_tm_entity_t * const rlc_pP,
|
rlc_tm_entity_t * const rlc_pP,
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t eNB_flag,
|
|
||||||
const boolean_t error_indicationP,
|
const boolean_t error_indicationP,
|
||||||
uint8_t * const srcP,
|
uint8_t * const srcP,
|
||||||
const sdu_size_t length_in_bitsP);)
|
const sdu_size_t length_in_bitsP);)
|
||||||
|
|
||||||
/*! \fn void rlc_tm_no_segment (rlc_tm_entity_t *rlcP)
|
/*! \fn void rlc_tm_no_segment (const protocol_ctxt_t* const ctxt_pP, rlc_tm_entity_t * const rlcP)
|
||||||
* \brief Schedule a SDU to be transmited by lower layers.
|
* \brief Schedule a SDU to be transmited by lower layers.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlcP RLC TM protocol instance pointer.
|
* \param[in] rlcP RLC TM protocol instance pointer.
|
||||||
*/
|
*/
|
||||||
private_rlc_tm(void rlc_tm_no_segment (rlc_tm_entity_t *const rlcP);)
|
private_rlc_tm(void rlc_tm_no_segment (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_tm_entity_t *const rlcP);)
|
||||||
|
|
||||||
/*! \fn void rlc_tm_rx (void *const rlcP, const frame_t frameP, struct mac_data_ind data_indP)
|
/*! \fn void rlc_tm_rx (const protocol_ctxt_t* const ctxt_pP,void *const rlcP, struct mac_data_ind data_indP)
|
||||||
* \brief Process the received PDUs from lower layer.
|
* \brief Process the received PDUs from lower layer.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlcP RLC TM protocol instance pointer.
|
* \param[in] rlcP RLC TM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
* \param[in] data_indP PDUs from MAC.
|
* \param[in] data_indP PDUs from MAC.
|
||||||
*/
|
*/
|
||||||
private_rlc_tm( void rlc_tm_rx (
|
private_rlc_tm( void rlc_tm_rx (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
void *const rlcP,
|
void *const rlcP,
|
||||||
const frame_t frameP,
|
|
||||||
struct mac_data_ind data_indP);)
|
struct mac_data_ind data_indP);)
|
||||||
|
|
||||||
|
|
||||||
/*! \fn struct mac_status_resp rlc_tm_mac_status_indication (void *rlcP, const frame_t frameP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP)
|
/*! \fn struct mac_status_resp rlc_tm_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, void * const rlcP, const uint16_t tbs_sizeP, struct mac_status_ind tx_statusP)
|
||||||
* \brief Request the maximum number of bytes that can be served by RLC instance to MAC and fix the amount of bytes requested by MAC for next RLC transmission.
|
* \brief Request the maximum number of bytes that can be served by RLC instance to MAC and fix the amount of bytes requested by MAC for next RLC transmission.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlcP RLC TM protocol instance pointer.
|
* \param[in] rlcP RLC TM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
* \param[in] tbs_sizeP Number of bytes requested by MAC for next transmission.
|
* \param[in] tbs_sizeP Number of bytes requested by MAC for next transmission.
|
||||||
* \param[in] tx_statusP Transmission status given by MAC on previous MAC transmission of the PDU.
|
* \param[in] tx_statusP Transmission status given by MAC on previous MAC transmission of the PDU.
|
||||||
* \return The maximum number of bytes that can be served by RLC instance to MAC.
|
* \return The maximum number of bytes that can be served by RLC instance to MAC.
|
||||||
*/
|
*/
|
||||||
public_rlc_tm( struct mac_status_resp rlc_tm_mac_status_indication (void *rlcP, const frame_t frameP, uint16_t tb_sizeP, struct mac_status_ind tx_statusP);)
|
public_rlc_tm( struct mac_status_resp rlc_tm_mac_status_indication (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
void * const rlcP,
|
||||||
|
const uint16_t tb_sizeP,
|
||||||
|
struct mac_status_ind tx_statusP);)
|
||||||
|
|
||||||
|
|
||||||
/*! \fn struct mac_data_req rlc_tm_mac_data_request (void *rlcP, const frame_t frameP)
|
/*! \fn struct mac_data_req rlc_tm_mac_data_request (const protocol_ctxt_t* const ctxt_pP, void * const rlcP)
|
||||||
* \brief Gives PDUs to lower layer MAC.
|
* \brief Gives PDUs to lower layer MAC.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlcP RLC TM protocol instance pointer.
|
* \param[in] rlcP RLC TM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
* \return A PDU of the previously requested number of bytes, and the updated maximum number of bytes that can be served by RLC instance to MAC for next RLC transmission.
|
* \return A PDU of the previously requested number of bytes, and the updated maximum number of bytes that can be served by RLC instance to MAC for next RLC transmission.
|
||||||
*/
|
*/
|
||||||
public_rlc_tm( struct mac_data_req rlc_tm_mac_data_request (void *rlcP, const frame_t frameP);)
|
public_rlc_tm( struct mac_data_req rlc_tm_mac_data_request (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
void * const rlcP);)
|
||||||
|
|
||||||
|
|
||||||
/*! \fn void rlc_tm_mac_data_indication (void *rlcP, const frame_t frameP, uint8_t eNB_flag, struct mac_data_ind data_indP)
|
/*! \fn void rlc_tm_mac_data_indication (const protocol_ctxt_t* const ctxt_pP,void * const rlcP, struct mac_data_ind data_indP)
|
||||||
* \brief Receive PDUs from lower layer MAC.
|
* \brief Receive PDUs from lower layer MAC.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlcP RLC TM protocol instance pointer.
|
* \param[in] rlcP RLC TM protocol instance pointer.
|
||||||
* \param[in] frameP Frame Index.
|
|
||||||
* \param[in] eNB_flag Flag to indicate eNB (1) or UE (0).
|
|
||||||
* \param[in] data_indP PDUs from MAC.
|
* \param[in] data_indP PDUs from MAC.
|
||||||
*/
|
*/
|
||||||
public_rlc_tm( void rlc_tm_mac_data_indication (void *rlcP, const frame_t frameP, uint8_t eNB_flag, struct mac_data_ind data_indP);)
|
public_rlc_tm( void rlc_tm_mac_data_indication (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
void * const rlcP,
|
||||||
|
struct mac_data_ind data_indP);)
|
||||||
|
|
||||||
|
|
||||||
/*! \fn void rlc_tm_data_req (void *rlcP, mem_block_t *sduP)
|
/*! \fn void rlc_tm_data_req (const protocol_ctxt_t* const ctxt_pP,void * const rlcP, mem_block_t * const sduP)
|
||||||
* \brief Interface with higher layers, buffer higher layer SDUS for transmission.
|
* \brief Interface with higher layers, buffer higher layer SDUS for transmission.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlcP RLC TM protocol instance pointer.
|
* \param[in] rlcP RLC TM protocol instance pointer.
|
||||||
* \param[in] sduP SDU. (A struct rlc_tm_data_req is mapped on sduP->data.)
|
* \param[in] sduP SDU. (A struct rlc_tm_data_req is mapped on sduP->data.)
|
||||||
*/
|
*/
|
||||||
public_rlc_tm( void rlc_tm_data_req (void *rlcP, mem_block_t *sduP);)
|
public_rlc_tm( void rlc_tm_data_req (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
void * const rlcP,
|
||||||
|
mem_block_t * const sduP);)
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
@@ -47,8 +47,8 @@
|
|||||||
* \brief Structure containing a RLC TM instance protocol variables, allocation variables, buffers and other miscellaneous variables.
|
* \brief Structure containing a RLC TM instance protocol variables, allocation variables, buffers and other miscellaneous variables.
|
||||||
*/
|
*/
|
||||||
typedef struct rlc_tm_entity {
|
typedef struct rlc_tm_entity {
|
||||||
module_id_t enb_module_id; /*!< \brief eNB Virtualization index for this protocol instance, meaningful if is_enb is set. */
|
//module_id_t enb_module_id; /*!< \brief eNB Virtualization index for this protocol instance, meaningful if is_enb is set. */
|
||||||
module_id_t ue_module_id; /*!< \brief UE Virtualization index for this protocol instance, meaningful if is_enb is set. */
|
//module_id_t ue_module_id; /*!< \brief UE Virtualization index for this protocol instance, meaningful if is_enb is set. */
|
||||||
boolean_t allocation; /*!< \brief Boolean for rlc_tm_entity_t struct allocation. */
|
boolean_t allocation; /*!< \brief Boolean for rlc_tm_entity_t struct allocation. */
|
||||||
rlc_protocol_state_t protocol_state; /*!< \brief Protocol state, can be RLC_NULL_STATE, RLC_DATA_TRANSFER_READY_STATE, RLC_LOCAL_SUSPEND_STATE. */
|
rlc_protocol_state_t protocol_state; /*!< \brief Protocol state, can be RLC_NULL_STATE, RLC_DATA_TRANSFER_READY_STATE, RLC_LOCAL_SUSPEND_STATE. */
|
||||||
boolean_t is_uplink_downlink; /*!< \brief Is this instance is a transmitter, a receiver or both? */
|
boolean_t is_uplink_downlink; /*!< \brief Is this instance is a transmitter, a receiver or both? */
|
||||||
@@ -56,7 +56,7 @@ typedef struct rlc_tm_entity {
|
|||||||
// for stats and trace purpose :
|
// for stats and trace purpose :
|
||||||
logical_chan_id_t channel_id; /*!< \brief Transport channel identifier. */
|
logical_chan_id_t channel_id; /*!< \brief Transport channel identifier. */
|
||||||
rb_id_t rb_id; /*!< \brief Radio bearer identifier, for statistics and trace purpose. */
|
rb_id_t rb_id; /*!< \brief Radio bearer identifier, for statistics and trace purpose. */
|
||||||
boolean_t is_enb; /*!< \brief To know if the RLC belongs to a eNB or UE. */
|
//boolean_t is_enb; /*!< \brief To know if the RLC belongs to a eNB or UE. */
|
||||||
//-----------------------------
|
//-----------------------------
|
||||||
// tranmission
|
// tranmission
|
||||||
//-----------------------------
|
//-----------------------------
|
||||||
|
|||||||
@@ -33,51 +33,52 @@
|
|||||||
#include "LAYER2/MAC/extern.h"
|
#include "LAYER2/MAC/extern.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void config_req_rlc_tm (
|
void config_req_rlc_tm (
|
||||||
const module_id_t enb_module_idP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const module_id_t ue_module_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const rlc_tm_info_t * const config_tmP,
|
const rlc_tm_info_t * const config_tmP,
|
||||||
const rb_id_t rb_idP)
|
const rb_id_t rb_idP
|
||||||
|
)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
rlc_union_t *rlc_union_p = NULL;
|
rlc_union_t *rlc_union_p = NULL;
|
||||||
rlc_tm_entity_t *rlc_p = NULL;
|
rlc_tm_entity_t *rlc_p = NULL;
|
||||||
hash_key_t key = RLC_COLL_KEY_VALUE(enb_module_idP, ue_module_idP, eNB_flagP, rb_idP, srb_flagP);
|
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->enb_module_id, ctxt_pP->ue_module_id, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||||
hashtable_rc_t h_rc;
|
hashtable_rc_t h_rc;
|
||||||
|
|
||||||
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
||||||
if (h_rc == HASH_TABLE_OK) {
|
if (h_rc == HASH_TABLE_OK) {
|
||||||
rlc_p = &rlc_union_p->rlc.tm;
|
rlc_p = &rlc_union_p->rlc.tm;
|
||||||
LOG_D(RLC, "[FRAME %05d][%s][RRC][MOD %u/%u][][--- CONFIG_REQ (is_uplink_downlink=%d) --->][RLC_TM][MOD %u/%u][RB %u]\n",
|
LOG_D(RLC, "[FRAME %05d][%s][RRC][MOD %u/%u][][--- CONFIG_REQ (is_uplink_downlink=%d) --->][RLC_TM][MOD %u/%u][RB %u]\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
( eNB_flagP > 0) ? "eNB":"UE",
|
( ctxt_pP->enb_flag > 0) ? "eNB":"UE",
|
||||||
enb_module_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxt_pP->ue_module_id,
|
||||||
config_tmP->is_uplink_downlink,
|
config_tmP->is_uplink_downlink,
|
||||||
enb_module_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rb_idP);
|
rb_idP);
|
||||||
|
|
||||||
rlc_tm_init(rlc_p);
|
rlc_tm_init(ctxt_pP, rlc_p);
|
||||||
rlc_p->protocol_state = RLC_DATA_TRANSFER_READY_STATE;
|
rlc_p->protocol_state = RLC_DATA_TRANSFER_READY_STATE;
|
||||||
rlc_tm_set_debug_infos(rlc_p, frameP, eNB_flagP, enb_module_idP, ue_module_idP, rb_idP, srb_flagP);
|
rlc_tm_set_debug_infos(ctxt_pP, rlc_p, rb_idP, srb_flagP);
|
||||||
rlc_tm_configure(rlc_p, config_tmP->is_uplink_downlink);
|
rlc_tm_configure(ctxt_pP, rlc_p, config_tmP->is_uplink_downlink);
|
||||||
} else {
|
} else {
|
||||||
LOG_E(RLC, "[FRAME %05d][%s][RRC][MOD %u/%u][][--- CONFIG_REQ --->][RLC_TM][MOD %u/%u][RB %u], RLC NOT FOUND\n",
|
LOG_E(RLC, "[FRAME %05d][%s][RRC][MOD %u/%u][][--- CONFIG_REQ --->][RLC_TM][MOD %u/%u][RB %u], RLC NOT FOUND\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
( eNB_flagP > 0) ? "eNB":"UE",
|
( ctxt_pP->enb_flag > 0) ? "eNB":"UE",
|
||||||
enb_module_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxt_pP->ue_module_id,
|
||||||
enb_module_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rb_idP);
|
rb_idP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_tm_init (rlc_tm_entity_t * const rlcP)
|
void rlc_tm_init (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_tm_entity_t * const rlcP
|
||||||
|
)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
int saved_allocation = rlcP->allocation;
|
int saved_allocation = rlcP->allocation;
|
||||||
@@ -105,7 +106,11 @@ void rlc_tm_init (rlc_tm_entity_t * const rlcP)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_tm_reset_state_variables (struct rlc_tm_entity * const rlcP)
|
void
|
||||||
|
rlc_tm_reset_state_variables (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
struct rlc_tm_entity * const rlcP
|
||||||
|
)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
rlcP->output_sdu_size_to_write = 0;
|
rlcP->output_sdu_size_to_write = 0;
|
||||||
@@ -116,7 +121,10 @@ void rlc_tm_reset_state_variables (struct rlc_tm_entity * const rlcP)
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rlc_tm_cleanup (rlc_tm_entity_t * const rlcP)
|
rlc_tm_cleanup (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_tm_entity_t * const rlcP
|
||||||
|
)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
int index;
|
int index;
|
||||||
@@ -141,43 +149,37 @@ rlc_tm_cleanup (rlc_tm_entity_t * const rlcP)
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_tm_configure(
|
void rlc_tm_configure(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_tm_entity_t * const rlcP,
|
rlc_tm_entity_t * const rlcP,
|
||||||
const boolean_t is_uplink_downlinkP)
|
const boolean_t is_uplink_downlinkP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
rlcP->is_uplink_downlink = is_uplink_downlinkP;
|
rlcP->is_uplink_downlink = is_uplink_downlinkP;
|
||||||
rlc_tm_reset_state_variables (rlcP);
|
rlc_tm_reset_state_variables (ctxt_pP, rlcP);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_tm_set_debug_infos(
|
void rlc_tm_set_debug_infos(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_tm_entity_t * const rlcP,
|
rlc_tm_entity_t * const rlcP,
|
||||||
const module_id_t enb_module_idP,
|
|
||||||
const module_id_t ue_module_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const rb_id_t rb_idP)
|
const rb_id_t rb_idP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
msg ("[FRAME %05d][%s][RLC_TM][MOD %02u/%02u][RB %u][SET DEBUG INFOS] enb module_id %d ue module_id %d rb_id %d srb_flag %d\n",
|
msg ("[FRAME %05d][%s][RLC_TM][MOD %02u/%02u][RB %u][SET DEBUG INFOS] rb_id %d srb_flag %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(eNB_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_module_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rb_idP,
|
rb_idP,
|
||||||
enb_module_idP,
|
|
||||||
ue_module_idP,
|
|
||||||
rb_idP,
|
rb_idP,
|
||||||
srb_flagP);
|
srb_flagP);
|
||||||
|
|
||||||
rlcP->enb_module_id = enb_module_idP;
|
|
||||||
rlcP->ue_module_id = ue_module_idP;
|
|
||||||
rlcP->rb_id = rb_idP;
|
rlcP->rb_id = rb_idP;
|
||||||
if (srb_flagP) {
|
if (srb_flagP) {
|
||||||
rlcP->is_data_plane = 0;
|
rlcP->is_data_plane = 0;
|
||||||
} else {
|
} else {
|
||||||
rlcP->is_data_plane = 1;
|
rlcP->is_data_plane = 1;
|
||||||
}
|
}
|
||||||
rlcP->is_enb = eNB_flagP;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,75 +71,67 @@ typedef volatile struct rlc_tm_info_s{
|
|||||||
|
|
||||||
|
|
||||||
/*! \fn void config_req_rlc_tm (void config_req_rlc_tm (
|
/*! \fn void config_req_rlc_tm (void config_req_rlc_tm (
|
||||||
const module_id_t enb_module_idP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const module_id_t ue_module_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const rlc_tm_info_t * const config_tmP,
|
const rlc_tm_info_t * const config_tmP,
|
||||||
const rb_id_t rb_idP,
|
const rb_id_t rb_idP,
|
||||||
const srb_flag_t srb_flagP)
|
const srb_flag_t srb_flagP)
|
||||||
* \brief Allocate memory for RLC TM instance, reset protocol variables, and set protocol parameters.
|
* \brief Allocate memory for RLC TM instance, reset protocol variables, and set protocol parameters.
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
* \param[in] eNB_flag Flag to indicate eNB (1) or UE (0)
|
|
||||||
* \param[in] srb_flagP Flag to indicate SRB (1) or DRB (0)
|
* \param[in] srb_flagP Flag to indicate SRB (1) or DRB (0)
|
||||||
* \param[in] enb_module_idP eNB Virtualized module identifier.
|
|
||||||
* \param[in] ue_module_idP UE Virtualized module identifier.
|
|
||||||
* \param[in] config_tmP Configuration parameters for RLC TM instance.
|
* \param[in] config_tmP Configuration parameters for RLC TM instance.
|
||||||
* \param[in] rb_idP Radio bearer identifier.
|
* \param[in] rb_idP Radio bearer identifier.
|
||||||
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
|
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
|
||||||
*/
|
*/
|
||||||
public_rlc_tm_init( void config_req_rlc_tm (
|
public_rlc_tm_init( void config_req_rlc_tm (
|
||||||
const module_id_t enb_module_idP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const module_id_t ue_module_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const rlc_tm_info_t * const config_tmP,
|
const rlc_tm_info_t * const config_tmP,
|
||||||
const rb_id_t rb_idP);)
|
const rb_id_t rb_idP);)
|
||||||
|
|
||||||
/*! \fn void rlc_tm_init (rlc_tm_entity_t *rlcP)
|
/*! \fn void rlc_tm_init (const protocol_ctxt_t* const ctxt_pP, rlc_tm_entity_t * const rlcP)
|
||||||
* \brief Initialize a RLC TM protocol instance, initialize all variables, lists, allocate buffers for making this instance ready to be configured with protocol configuration parameters. After this initialization the RLC TM protocol instance will be in RLC_NULL_STATE state.
|
* \brief Initialize a RLC TM protocol instance, initialize all variables, lists, allocate buffers for making this instance ready to be configured with protocol configuration parameters. After this initialization the RLC TM protocol instance will be in RLC_NULL_STATE state.
|
||||||
* \param[in] rlcP RLC TM protocol instance pointer.
|
* \param[in] rlcP RLC TM protocol instance pointer.
|
||||||
*/
|
*/
|
||||||
protected_rlc_tm_init(void rlc_tm_init (rlc_tm_entity_t * const rlcP);)
|
protected_rlc_tm_init(void rlc_tm_init (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_tm_entity_t * const rlcP);)
|
||||||
|
|
||||||
/*! \fn void rlc_tm_reset_state_variables (rlc_tm_entity_t *rlcP)
|
/*! \fn void rlc_tm_reset_state_variables (const protocol_ctxt_t* const ctxt_pP, rlc_tm_entity_t * const rlcP)
|
||||||
* \brief Reset protocol variables and state variables to initial values.
|
* \brief Reset protocol variables and state variables to initial values.
|
||||||
* \param[in] rlcP RLC TM protocol instance pointer.
|
* \param[in] rlcP RLC TM protocol instance pointer.
|
||||||
*/
|
*/
|
||||||
protected_rlc_tm_init(void rlc_tm_reset_state_variables (rlc_tm_entity_t * const rlcP);)
|
protected_rlc_tm_init(void rlc_tm_reset_state_variables (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_tm_entity_t * const rlcP);)
|
||||||
|
|
||||||
/*! \fn void rlc_tm_cleanup(rlc_tm_entity_t *rlcP)
|
/*! \fn void rlc_tm_cleanup(const protocol_ctxt_t* const ctxt_pP,rlc_tm_entity_t * const rlcP)
|
||||||
* \brief Free all allocated memory (lists and buffers) previously allocated by this RLC TM instance.
|
* \brief Free all allocated memory (lists and buffers) previously allocated by this RLC TM instance.
|
||||||
* \param[in] rlcP RLC TM protocol instance pointer.
|
* \param[in] rlcP RLC TM protocol instance pointer.
|
||||||
*/
|
*/
|
||||||
public_rlc_tm_init( void rlc_tm_cleanup(rlc_tm_entity_t * const rlcP);)
|
public_rlc_tm_init( void rlc_tm_cleanup(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_tm_entity_t * const rlcP);)
|
||||||
|
|
||||||
/*! \fn void rlc_tm_configure(rlc_tm_entity_t * const rlcP, const boolean_t is_uplink_downlinkP)
|
/*! \fn void rlc_tm_configure(const protocol_ctxt_t* const ctxt_pP,rlc_tm_entity_t * const rlcP, const boolean_t is_uplink_downlinkP)
|
||||||
* \brief Configure RLC TM protocol parameters.
|
* \brief Configure RLC TM protocol parameters.
|
||||||
* \param[in] rlcP RLC TM protocol instance pointer.
|
* \param[in] rlcP RLC TM protocol instance pointer.
|
||||||
* \param[in] is_uplink_downlinkP Is this instance is TRANSMITTER_ONLY,
|
* \param[in] is_uplink_downlinkP Is this instance is TRANSMITTER_ONLY,
|
||||||
RECEIVER_ONLY, or TRANSMITTER_AND_RECEIVER.
|
RECEIVER_ONLY, or TRANSMITTER_AND_RECEIVER.
|
||||||
*/
|
*/
|
||||||
protected_rlc_tm_init(void rlc_tm_configure(rlc_tm_entity_t * const rlcP, const boolean_t is_uplink_downlinkP);)
|
protected_rlc_tm_init(void rlc_tm_configure(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_tm_entity_t * const rlcP,
|
||||||
|
const boolean_t is_uplink_downlinkP);)
|
||||||
|
|
||||||
/*! \fn void rlc_tm_set_debug_infos(rlc_tm_entity_t *rlcP, const frame_t frameP, uint8_t eNB_flagP, const module_id_t enb_module_idP, const module_id_t ue_module_idP, const rb_id_t rb_idP, const srb_flag_t srb_flagP)
|
/*! \fn void rlc_tm_set_debug_infos(const protocol_ctxt_t* const ctxt_pP, rlc_tm_entity_t * const rlcP, const rb_id_t rb_idP, const srb_flag_t srb_flagP)
|
||||||
* \brief Set debug informations for a RLC TM protocol instance, these informations are only for trace purpose.
|
* \brief Set debug informations for a RLC TM protocol instance, these informations are only for trace purpose.
|
||||||
* \param[in] rlcP RLC TM protocol instance pointer.
|
* \param[in] rlcP RLC TM protocol instance pointer.
|
||||||
* \param[in] enb_module_idP eNB Virtualized module identifier.
|
|
||||||
* \param[in] ue_module_idP UE Virtualized module identifier.
|
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
* \param[in] eNB_flag Flag to indicate eNB (1) or UE (0)
|
|
||||||
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
|
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
|
||||||
* \param[in] rb_idP Radio bearer identifier.
|
* \param[in] rb_idP Radio bearer identifier.
|
||||||
*/
|
*/
|
||||||
protected_rlc_tm_init(void rlc_tm_set_debug_infos(
|
protected_rlc_tm_init(void rlc_tm_set_debug_infos(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_tm_entity_t * const rlcP,
|
rlc_tm_entity_t * const rlcP,
|
||||||
const module_id_t enb_module_idP,
|
|
||||||
const module_id_t ue_module_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const rb_id_t rb_idP);)
|
const rb_id_t rb_idP);)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ rlc_um_get_buffer_occupancy (rlc_um_entity_t *rlc_pP)
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rlc_um_get_pdus (void *argP, frame_t frameP)
|
rlc_um_get_pdus (const protocol_ctxt_t* const ctxt_pP, void *argP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
rlc_um_entity_t *rlc_p = (rlc_um_entity_t *) argP;
|
rlc_um_entity_t *rlc_p = (rlc_um_entity_t *) argP;
|
||||||
@@ -140,10 +140,10 @@ rlc_um_get_pdus (void *argP, frame_t frameP)
|
|||||||
|
|
||||||
// SEND DATA TO MAC
|
// SEND DATA TO MAC
|
||||||
if (rlc_p->tx_sn_length == 10) {
|
if (rlc_p->tx_sn_length == 10) {
|
||||||
rlc_um_segment_10 (rlc_p,frameP);
|
rlc_um_segment_10 (ctxt_pP, rlc_p);
|
||||||
}
|
}
|
||||||
if (rlc_p->tx_sn_length == 5) {
|
if (rlc_p->tx_sn_length == 5) {
|
||||||
rlc_um_segment_5 (rlc_p,frameP);
|
rlc_um_segment_5 (ctxt_pP, rlc_p);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -170,10 +170,10 @@ rlc_um_get_pdus (void *argP, frame_t frameP)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_E(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] MAC_DATA_REQ UNKNOWN PROTOCOL STATE %02X hex\n",
|
LOG_E(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] MAC_DATA_REQ UNKNOWN PROTOCOL STATE %02X hex\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_p->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_p->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_p->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
(rlc_p->is_data_plane) ? "DRB" : "SRB",
|
(rlc_p->is_data_plane) ? "DRB" : "SRB",
|
||||||
rlc_p->rb_id,
|
rlc_p->rb_id,
|
||||||
rlc_p->protocol_state);
|
rlc_p->protocol_state);
|
||||||
@@ -182,7 +182,7 @@ rlc_um_get_pdus (void *argP, frame_t frameP)
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rlc_um_rx (void *argP, frame_t frameP, eNB_flag_t eNB_flagP, struct mac_data_ind data_indP)
|
rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind data_indP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
rlc_um_entity_t *l_rlc_p = (rlc_um_entity_t *) argP;
|
rlc_um_entity_t *l_rlc_p = (rlc_um_entity_t *) argP;
|
||||||
@@ -207,13 +207,13 @@ rlc_um_rx (void *argP, frame_t frameP, eNB_flag_t eNB_flagP, struct mac_data_ind
|
|||||||
// establishment, the RLC entity:
|
// establishment, the RLC entity:
|
||||||
// - is created; and
|
// - is created; and
|
||||||
// - enters the DATA_TRANSFER_READY state.
|
// - enters the DATA_TRANSFER_READY state.
|
||||||
LOG_N(RLC, "[RLC_UM][MOD %02u/%02u] ERROR MAC_DATA_IND IN RLC_NULL_STATE\n", l_rlc_p->enb_module_id, l_rlc_p->ue_module_id);
|
LOG_N(RLC, "[RLC_UM][MOD %02u/%02u] ERROR MAC_DATA_IND IN RLC_NULL_STATE\n", ctxt_pP->enb_module_id, ctxt_pP->ue_module_id);
|
||||||
|
|
||||||
/*if (data_indP.data.nb_elements > 0) {
|
/*if (data_indP.data.nb_elements > 0) {
|
||||||
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][RB %02d] MAC_DATA_IND %d TBs\n", l_rlc_p->module_id, l_rlc_p->rb_id, frameP, data_indP.data.nb_elements);
|
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][RB %02d] MAC_DATA_IND %d TBs\n", l_rlc_p->module_id, l_rlc_p->rb_id, ctxt_pP->frame, data_indP.data.nb_elements);
|
||||||
rlc_p[l_rlc_p->module_id].m_mscgen_trace_length = sprintf(rlc_p[l_rlc_p->module_id].m_mscgen_trace, "[MSC_MSG][FRAME %05d][MAC_%s][MOD %02d][][--- MAC_DATA_IND/ %d TB(s) ",
|
rlc_p[l_rlc_p->module_id].m_mscgen_trace_length = sprintf(rlc_p[l_rlc_p->module_id].m_mscgen_trace, "[MSC_MSG][FRAME %05d][MAC_%s][MOD %02d][][--- MAC_DATA_IND/ %d TB(s) ",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(l_rlc_p->is_enb) ? "eNB":"UE",
|
(ctxt_pP->enb_flag) ? "eNB":"UE",
|
||||||
l_rlc_p->module_id,
|
l_rlc_p->module_id,
|
||||||
data_indP.data.nb_elements);
|
data_indP.data.nb_elements);
|
||||||
|
|
||||||
@@ -258,10 +258,10 @@ rlc_um_rx (void *argP, frame_t frameP, eNB_flag_t eNB_flagP, struct mac_data_ind
|
|||||||
#ifdef TRACE_RLC_UM_PDU
|
#ifdef TRACE_RLC_UM_PDU
|
||||||
if (data_indP.data.nb_elements > 0) {
|
if (data_indP.data.nb_elements > 0) {
|
||||||
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] MAC_DATA_IND %d TBs\n",
|
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] MAC_DATA_IND %d TBs\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(l_rlc_p->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
l_rlc_p->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
l_rlc_p->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
(l_rlc_p->is_data_plane) ? "DRB" : "SRB",
|
(l_rlc_p->is_data_plane) ? "DRB" : "SRB",
|
||||||
l_rlc_p->rb_id,
|
l_rlc_p->rb_id,
|
||||||
data_indP.data.nb_elements);
|
data_indP.data.nb_elements);
|
||||||
@@ -270,7 +270,7 @@ rlc_um_rx (void *argP, frame_t frameP, eNB_flag_t eNB_flagP, struct mac_data_ind
|
|||||||
while (tb_p != NULL) {
|
while (tb_p != NULL) {
|
||||||
tb_size_in_bytes = ((struct mac_tb_ind *) (tb_p->data))->size;
|
tb_size_in_bytes = ((struct mac_tb_ind *) (tb_p->data))->size;
|
||||||
|
|
||||||
rlc_um_get_pdu_infos(frameP,(rlc_um_pdu_sn_10_t*) ((struct mac_tb_ind *) (tb_p->data))->data_ptr, tb_size_in_bytes, &pdu_info, l_rlc_p->rx_sn_length);
|
rlc_um_get_pdu_infos(ctxt_pP->frame,(rlc_um_pdu_sn_10_t*) ((struct mac_tb_ind *) (tb_p->data))->data_ptr, tb_size_in_bytes, &pdu_info, l_rlc_p->rx_sn_length);
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
|
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "PDU size : %u\n", tb_size_in_bytes);
|
message_string_size += sprintf(&message_string[message_string_size], "PDU size : %u\n", tb_size_in_bytes);
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "Header size : %u\n", pdu_info.header_size);
|
message_string_size += sprintf(&message_string[message_string_size], "Header size : %u\n", pdu_info.header_size);
|
||||||
@@ -316,14 +316,14 @@ rlc_um_rx (void *argP, frame_t frameP, eNB_flag_t eNB_flagP, struct mac_data_ind
|
|||||||
message_string_size += sprintf(&message_string[message_string_size], " |\n");
|
message_string_size += sprintf(&message_string[message_string_size], " |\n");
|
||||||
|
|
||||||
# if defined(ENABLE_ITTI)
|
# if defined(ENABLE_ITTI)
|
||||||
msg_p = itti_alloc_new_message_sized (l_rlc_p->is_enb ? TASK_RLC_ENB:TASK_RLC_UE , RLC_UM_DATA_PDU_IND, message_string_size + sizeof (IttiMsgText));
|
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag ? TASK_RLC_ENB:TASK_RLC_UE , RLC_UM_DATA_PDU_IND, message_string_size + sizeof (IttiMsgText));
|
||||||
msg_p->ittiMsg.rlc_um_data_pdu_ind.size = message_string_size;
|
msg_p->ittiMsg.rlc_um_data_pdu_ind.size = message_string_size;
|
||||||
memcpy(&msg_p->ittiMsg.rlc_um_data_pdu_ind.text, message_string, message_string_size);
|
memcpy(&msg_p->ittiMsg.rlc_um_data_pdu_ind.text, message_string, message_string_size);
|
||||||
|
|
||||||
if (l_rlc_p->is_enb) {
|
if (ctxt_pP->enb_flag) {
|
||||||
itti_send_msg_to_task(TASK_UNKNOWN, l_rlc_p->enb_module_id, msg_p);
|
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->enb_module_id, msg_p);
|
||||||
} else {
|
} else {
|
||||||
itti_send_msg_to_task(TASK_UNKNOWN, l_rlc_p->ue_module_id + NB_eNB_INST, msg_p);
|
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->ue_module_id + NB_eNB_INST, msg_p);
|
||||||
}
|
}
|
||||||
# else
|
# else
|
||||||
LOG_T(RLC, "%s", message_string);
|
LOG_T(RLC, "%s", message_string);
|
||||||
@@ -333,7 +333,7 @@ rlc_um_rx (void *argP, frame_t frameP, eNB_flag_t eNB_flagP, struct mac_data_ind
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
rlc_um_receive (l_rlc_p, frameP, eNB_flagP, data_indP);
|
rlc_um_receive (ctxt_pP, l_rlc_p, data_indP);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RLC_LOCAL_SUSPEND_STATE:
|
case RLC_LOCAL_SUSPEND_STATE:
|
||||||
@@ -354,17 +354,17 @@ rlc_um_rx (void *argP, frame_t frameP, eNB_flag_t eNB_flagP, struct mac_data_ind
|
|||||||
// - modifies only the protocol parameters and timers as indicated by
|
// - modifies only the protocol parameters and timers as indicated by
|
||||||
// upper layers.
|
// upper layers.
|
||||||
LOG_N(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] RLC_LOCAL_SUSPEND_STATE\n",
|
LOG_N(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] RLC_LOCAL_SUSPEND_STATE\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(l_rlc_p->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
l_rlc_p->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
l_rlc_p->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
(l_rlc_p->is_data_plane) ? "DRB" : "SRB",
|
(l_rlc_p->is_data_plane) ? "DRB" : "SRB",
|
||||||
l_rlc_p->rb_id);
|
l_rlc_p->rb_id);
|
||||||
/*if (data_indP.data.nb_elements > 0) {
|
/*if (data_indP.data.nb_elements > 0) {
|
||||||
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][RB %02d] MAC_DATA_IND %d TBs\n", l_rlc_p->module_id, l_rlc_p->rb_id, frameP, data_indP.data.nb_elements);
|
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][RB %02d] MAC_DATA_IND %d TBs\n", l_rlc_p->module_id, l_rlc_p->rb_id, ctxt_pP->frame, data_indP.data.nb_elements);
|
||||||
rlc_p[l_rlc_p->module_id].m_mscgen_trace_length = sprintf(rlc_p[l_rlc_p->module_id].m_mscgen_trace, "[MSC_MSG][FRAME %05d][MAC_%s][MOD %02d][][--- MAC_DATA_IND/ %d TB(s) ",
|
rlc_p[l_rlc_p->module_id].m_mscgen_trace_length = sprintf(rlc_p[l_rlc_p->module_id].m_mscgen_trace, "[MSC_MSG][FRAME %05d][MAC_%s][MOD %02d][][--- MAC_DATA_IND/ %d TB(s) ",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(l_rlc_p->is_enb) ? "eNB":"UE",
|
(ctxt_pP->enb_flag) ? "eNB":"UE",
|
||||||
l_rlc_p->module_id,
|
l_rlc_p->module_id,
|
||||||
data_indP.data.nb_elements);
|
data_indP.data.nb_elements);
|
||||||
|
|
||||||
@@ -390,10 +390,10 @@ rlc_um_rx (void *argP, frame_t frameP, eNB_flag_t eNB_flagP, struct mac_data_ind
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_E(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] TX UNKNOWN PROTOCOL STATE %02X hex\n",
|
LOG_E(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] TX UNKNOWN PROTOCOL STATE %02X hex\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(l_rlc_p->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
l_rlc_p->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
l_rlc_p->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
(l_rlc_p->is_data_plane) ? "DRB" : "SRB",
|
(l_rlc_p->is_data_plane) ? "DRB" : "SRB",
|
||||||
l_rlc_p->rb_id,
|
l_rlc_p->rb_id,
|
||||||
l_rlc_p->protocol_state);
|
l_rlc_p->protocol_state);
|
||||||
@@ -402,7 +402,7 @@ rlc_um_rx (void *argP, frame_t frameP, eNB_flag_t eNB_flagP, struct mac_data_ind
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
struct mac_status_resp
|
struct mac_status_resp
|
||||||
rlc_um_mac_status_indication (void *rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP)
|
rlc_um_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
struct mac_status_resp status_resp;
|
struct mac_status_resp status_resp;
|
||||||
@@ -421,7 +421,7 @@ rlc_um_mac_status_indication (void *rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP
|
|||||||
|
|
||||||
if (rlc_pP) {
|
if (rlc_pP) {
|
||||||
rlc_p = (rlc_um_entity_t *) rlc_pP;
|
rlc_p = (rlc_um_entity_t *) rlc_pP;
|
||||||
rlc_um_check_timer_dar_time_out(rlc_p,frameP,eNB_flagP);
|
rlc_um_check_timer_dar_time_out(ctxt_pP, rlc_p);
|
||||||
|
|
||||||
rlc_p->nb_bytes_requested_by_mac = tbs_sizeP;
|
rlc_p->nb_bytes_requested_by_mac = tbs_sizeP;
|
||||||
|
|
||||||
@@ -431,9 +431,9 @@ rlc_um_mac_status_indication (void *rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP
|
|||||||
status_resp.buffer_occupancy_in_bytes += rlc_p->tx_header_min_length_in_bytes;
|
status_resp.buffer_occupancy_in_bytes += rlc_p->tx_header_min_length_in_bytes;
|
||||||
status_resp.buffer_occupancy_in_pdus = rlc_p->input_sdus.nb_elements;
|
status_resp.buffer_occupancy_in_pdus = rlc_p->input_sdus.nb_elements;
|
||||||
|
|
||||||
diff_time = frameP - ((struct rlc_um_tx_sdu_management *)mb_p->data)->sdu_creation_time;
|
diff_time = ctxt_pP->frame - ((struct rlc_um_tx_sdu_management *)mb_p->data)->sdu_creation_time;
|
||||||
status_resp.head_sdu_creation_time = (diff_time > 0 ) ? (uint32_t) diff_time : (uint32_t)(0xffffffff - diff_time + frameP) ;
|
status_resp.head_sdu_creation_time = (diff_time > 0 ) ? (uint32_t) diff_time : (uint32_t)(0xffffffff - diff_time + ctxt_pP->frame) ;
|
||||||
//msg("rlc_p status for frameP %d diff time %d resp %d\n", frameP, diff_time,status_resp.head_sdu_creation_time) ;
|
//msg("rlc_p status for ctxt_pP->frame %d diff time %d resp %d\n", ctxt_pP->frame, diff_time,status_resp.head_sdu_creation_time) ;
|
||||||
|
|
||||||
sdu_size = ((struct rlc_um_tx_sdu_management *) mb_p->data)->sdu_size;
|
sdu_size = ((struct rlc_um_tx_sdu_management *) mb_p->data)->sdu_size;
|
||||||
sdu_remaining_size = ((struct rlc_um_tx_sdu_management *) mb_p->data)->sdu_remaining_size;
|
sdu_remaining_size = ((struct rlc_um_tx_sdu_management *) mb_p->data)->sdu_remaining_size;
|
||||||
@@ -454,10 +454,10 @@ rlc_um_mac_status_indication (void *rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP
|
|||||||
#ifdef DEBUG_RLC_UM_TX_STATUS
|
#ifdef DEBUG_RLC_UM_TX_STATUS
|
||||||
if ((((rlc_um_entity_t *) rlc_pP)->rb_id > 0) && (status_resp.buffer_occupancy_in_bytes > 0)) {
|
if ((((rlc_um_entity_t *) rlc_pP)->rb_id > 0) && (status_resp.buffer_occupancy_in_bytes > 0)) {
|
||||||
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] MAC_STATUS_INDICATION (DATA) %d bytes requested -> %d bytes available\n",
|
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] MAC_STATUS_INDICATION (DATA) %d bytes requested -> %d bytes available\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_p->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_p->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_p->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
(rlc_p->is_data_plane) ? "DRB" : "SRB",
|
(rlc_p->is_data_plane) ? "DRB" : "SRB",
|
||||||
rlc_p->rb_id,
|
rlc_p->rb_id,
|
||||||
tbs_sizeP,
|
tbs_sizeP,
|
||||||
@@ -465,20 +465,20 @@ rlc_um_mac_status_indication (void *rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP
|
|||||||
|
|
||||||
if ((tx_statusP.tx_status == MAC_TX_STATUS_SUCCESSFUL) && (tx_statusP.no_pdu)) {
|
if ((tx_statusP.tx_status == MAC_TX_STATUS_SUCCESSFUL) && (tx_statusP.no_pdu)) {
|
||||||
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] MAC_STATUS_INDICATION TX STATUS SUCCESSFUL %d PDUs\n",
|
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] MAC_STATUS_INDICATION TX STATUS SUCCESSFUL %d PDUs\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_p->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_p->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_p->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
(rlc_p->is_data_plane) ? "DRB" : "SRB",
|
(rlc_p->is_data_plane) ? "DRB" : "SRB",
|
||||||
rlc_p->rb_id,
|
rlc_p->rb_id,
|
||||||
tx_statusP.no_pdu);
|
tx_statusP.no_pdu);
|
||||||
}
|
}
|
||||||
if ((tx_statusP.tx_status == MAC_TX_STATUS_UNSUCCESSFUL) && (tx_statusP.no_pdu)) {
|
if ((tx_statusP.tx_status == MAC_TX_STATUS_UNSUCCESSFUL) && (tx_statusP.no_pdu)) {
|
||||||
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] MAC_STATUS_INDICATION TX STATUS UNSUCCESSFUL %d PDUs\n",
|
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] MAC_STATUS_INDICATION TX STATUS UNSUCCESSFUL %d PDUs\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_p->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_p->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_p->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
(rlc_p->is_data_plane) ? "DRB" : "SRB",
|
(rlc_p->is_data_plane) ? "DRB" : "SRB",
|
||||||
rlc_p->rb_id,
|
rlc_p->rb_id,
|
||||||
tx_statusP.no_pdu);
|
tx_statusP.no_pdu);
|
||||||
@@ -493,7 +493,7 @@ rlc_um_mac_status_indication (void *rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
struct mac_data_req
|
struct mac_data_req
|
||||||
rlc_um_mac_data_request (void *rlc_pP,frame_t frameP)
|
rlc_um_mac_data_request (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
struct mac_data_req data_req;
|
struct mac_data_req data_req;
|
||||||
@@ -509,7 +509,7 @@ rlc_um_mac_data_request (void *rlc_pP,frame_t frameP)
|
|||||||
#endif
|
#endif
|
||||||
rlc_um_entity_t *l_rlc_p = (rlc_um_entity_t *) rlc_pP;
|
rlc_um_entity_t *l_rlc_p = (rlc_um_entity_t *) rlc_pP;
|
||||||
|
|
||||||
rlc_um_get_pdus (rlc_pP,frameP);
|
rlc_um_get_pdus (ctxt_pP, rlc_pP);
|
||||||
|
|
||||||
list_init (&data_req.data, NULL);
|
list_init (&data_req.data, NULL);
|
||||||
list_add_list (&l_rlc_p->pdus_to_mac_layer, &data_req.data);
|
list_add_list (&l_rlc_p->pdus_to_mac_layer, &data_req.data);
|
||||||
@@ -526,10 +526,10 @@ rlc_um_mac_data_request (void *rlc_pP,frame_t frameP)
|
|||||||
tb_size_in_bytes = ((struct mac_tb_req *) (tb_p->data))->tb_size;
|
tb_size_in_bytes = ((struct mac_tb_req *) (tb_p->data))->tb_size;
|
||||||
|
|
||||||
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] MAC_DATA_REQUEST TB SIZE %u\n",
|
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] MAC_DATA_REQUEST TB SIZE %u\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(l_rlc_p->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
l_rlc_p->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
l_rlc_p->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
(l_rlc_p->is_data_plane) ? "DRB" : "SRB",
|
(l_rlc_p->is_data_plane) ? "DRB" : "SRB",
|
||||||
l_rlc_p->rb_id,
|
l_rlc_p->rb_id,
|
||||||
((struct mac_tb_req *) (tb_p->data))->tb_size);
|
((struct mac_tb_req *) (tb_p->data))->tb_size);
|
||||||
@@ -539,7 +539,7 @@ rlc_um_mac_data_request (void *rlc_pP,frame_t frameP)
|
|||||||
AssertFatal( tb_size_in_bytes > 0 , "RLC UM PDU LENGTH %d", tb_size_in_bytes);
|
AssertFatal( tb_size_in_bytes > 0 , "RLC UM PDU LENGTH %d", tb_size_in_bytes);
|
||||||
|
|
||||||
#ifdef TRACE_RLC_UM_PDU
|
#ifdef TRACE_RLC_UM_PDU
|
||||||
rlc_um_get_pdu_infos(frameP,(rlc_um_pdu_sn_10_t*) ((struct mac_tb_req *) (tb_p->data))->data_ptr, tb_size_in_bytes, &pdu_info, l_rlc_p->rx_sn_length);
|
rlc_um_get_pdu_infos(ctxt_pP->frame,(rlc_um_pdu_sn_10_t*) ((struct mac_tb_req *) (tb_p->data))->data_ptr, tb_size_in_bytes, &pdu_info, l_rlc_p->rx_sn_length);
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
|
message_string_size += sprintf(&message_string[message_string_size], "Bearer : %u\n", l_rlc_p->rb_id);
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "PDU size : %u\n", tb_size_in_bytes);
|
message_string_size += sprintf(&message_string[message_string_size], "PDU size : %u\n", tb_size_in_bytes);
|
||||||
message_string_size += sprintf(&message_string[message_string_size], "Header size : %u\n", pdu_info.header_size);
|
message_string_size += sprintf(&message_string[message_string_size], "Header size : %u\n", pdu_info.header_size);
|
||||||
@@ -585,14 +585,14 @@ rlc_um_mac_data_request (void *rlc_pP,frame_t frameP)
|
|||||||
message_string_size += sprintf(&message_string[message_string_size], " |\n");
|
message_string_size += sprintf(&message_string[message_string_size], " |\n");
|
||||||
|
|
||||||
# if defined(ENABLE_ITTI)
|
# if defined(ENABLE_ITTI)
|
||||||
msg_p = itti_alloc_new_message_sized (l_rlc_p->is_enb > 0 ? TASK_RLC_ENB:TASK_RLC_UE , RLC_UM_DATA_PDU_REQ, message_string_size + sizeof (IttiMsgText));
|
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag > 0 ? TASK_RLC_ENB:TASK_RLC_UE , RLC_UM_DATA_PDU_REQ, message_string_size + sizeof (IttiMsgText));
|
||||||
msg_p->ittiMsg.rlc_um_data_pdu_req.size = message_string_size;
|
msg_p->ittiMsg.rlc_um_data_pdu_req.size = message_string_size;
|
||||||
memcpy(&msg_p->ittiMsg.rlc_um_data_pdu_req.text, message_string, message_string_size);
|
memcpy(&msg_p->ittiMsg.rlc_um_data_pdu_req.text, message_string, message_string_size);
|
||||||
|
|
||||||
if (l_rlc_p->is_enb) {
|
if (ctxt_pP->enb_flag) {
|
||||||
itti_send_msg_to_task(TASK_UNKNOWN, l_rlc_p->enb_module_id, msg_p);
|
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->enb_module_id, msg_p);
|
||||||
} else {
|
} else {
|
||||||
itti_send_msg_to_task(TASK_UNKNOWN, l_rlc_p->ue_module_id + NB_eNB_INST, msg_p);
|
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->ue_module_id + NB_eNB_INST, msg_p);
|
||||||
}
|
}
|
||||||
# else
|
# else
|
||||||
LOG_T(RLC, "%s", message_string);
|
LOG_T(RLC, "%s", message_string);
|
||||||
@@ -606,16 +606,16 @@ rlc_um_mac_data_request (void *rlc_pP,frame_t frameP)
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rlc_um_mac_data_indication (void *rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP, struct mac_data_ind data_indP)
|
rlc_um_mac_data_indication (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, struct mac_data_ind data_indP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
rlc_um_rx (rlc_pP, frameP, eNB_flagP, data_indP);
|
rlc_um_rx (ctxt_pP, rlc_pP, data_indP);
|
||||||
rlc_um_check_timer_dar_time_out(rlc_pP,frameP,eNB_flagP);
|
rlc_um_check_timer_dar_time_out(ctxt_pP, rlc_pP);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rlc_um_data_req (void *rlc_pP, frame_t frameP, mem_block_t *sdu_pP)
|
rlc_um_data_req (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, mem_block_t *sdu_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
rlc_um_entity_t *rlc_p = (rlc_um_entity_t *) rlc_pP;
|
rlc_um_entity_t *rlc_p = (rlc_um_entity_t *) rlc_pP;
|
||||||
@@ -634,10 +634,10 @@ rlc_um_data_req (void *rlc_pP, frame_t frameP, mem_block_t *sdu_pP)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] RLC_UM_DATA_REQ size %d Bytes, BO %d , NB SDU %d\n",
|
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] RLC_UM_DATA_REQ size %d Bytes, BO %d , NB SDU %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_p->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_p->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_p->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
(rlc_p->is_data_plane) ? "DRB" : "SRB",
|
(rlc_p->is_data_plane) ? "DRB" : "SRB",
|
||||||
rlc_p->rb_id,
|
rlc_p->rb_id,
|
||||||
((struct rlc_um_data_req *) (sdu_pP->data))->data_size,
|
((struct rlc_um_data_req *) (sdu_pP->data))->data_size,
|
||||||
@@ -656,7 +656,7 @@ rlc_um_data_req (void *rlc_pP, frame_t frameP, mem_block_t *sdu_pP)
|
|||||||
((struct rlc_um_tx_sdu_management *) (sdu_pP->data))->sdu_remaining_size = ((struct rlc_um_tx_sdu_management *)
|
((struct rlc_um_tx_sdu_management *) (sdu_pP->data))->sdu_remaining_size = ((struct rlc_um_tx_sdu_management *)
|
||||||
(sdu_pP->data))->sdu_size;
|
(sdu_pP->data))->sdu_size;
|
||||||
((struct rlc_um_tx_sdu_management *) (sdu_pP->data))->sdu_segmented_size = 0;
|
((struct rlc_um_tx_sdu_management *) (sdu_pP->data))->sdu_segmented_size = 0;
|
||||||
((struct rlc_um_tx_sdu_management *) (sdu_pP->data))->sdu_creation_time = frameP;
|
((struct rlc_um_tx_sdu_management *) (sdu_pP->data))->sdu_creation_time = ctxt_pP->frame;
|
||||||
//rlc_p->next_sdu_index = (rlc_p->next_sdu_index + 1) % rlc_p->size_input_sdus_buffer;
|
//rlc_p->next_sdu_index = (rlc_p->next_sdu_index + 1) % rlc_p->size_input_sdus_buffer;
|
||||||
|
|
||||||
rlc_p->stat_tx_pdcp_sdu += 1;
|
rlc_p->stat_tx_pdcp_sdu += 1;
|
||||||
@@ -695,14 +695,14 @@ rlc_um_data_req (void *rlc_pP, frame_t frameP, mem_block_t *sdu_pP)
|
|||||||
message_string_size += sprintf(&message_string[message_string_size], " |\n");
|
message_string_size += sprintf(&message_string[message_string_size], " |\n");
|
||||||
|
|
||||||
# if defined(ENABLE_ITTI)
|
# if defined(ENABLE_ITTI)
|
||||||
msg_p = itti_alloc_new_message_sized (rlc_p->is_enb > 0 ? TASK_RLC_ENB:TASK_RLC_UE , RLC_UM_SDU_REQ, message_string_size + sizeof (IttiMsgText));
|
msg_p = itti_alloc_new_message_sized (ctxt_pP->enb_flag > 0 ? TASK_RLC_ENB:TASK_RLC_UE , RLC_UM_SDU_REQ, message_string_size + sizeof (IttiMsgText));
|
||||||
msg_p->ittiMsg.rlc_um_sdu_req.size = message_string_size;
|
msg_p->ittiMsg.rlc_um_sdu_req.size = message_string_size;
|
||||||
memcpy(&msg_p->ittiMsg.rlc_um_sdu_req.text, message_string, message_string_size);
|
memcpy(&msg_p->ittiMsg.rlc_um_sdu_req.text, message_string, message_string_size);
|
||||||
|
|
||||||
if (rlc_p->is_enb) {
|
if (ctxt_pP->enb_flag) {
|
||||||
itti_send_msg_to_task(TASK_UNKNOWN, rlc_p->enb_module_id, msg_p);
|
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->enb_module_id, msg_p);
|
||||||
} else {
|
} else {
|
||||||
itti_send_msg_to_task(TASK_UNKNOWN, rlc_p->ue_module_id + NB_eNB_INST, msg_p);
|
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->ue_module_id + NB_eNB_INST, msg_p);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
LOG_T(RLC, "%s", message_string);
|
LOG_T(RLC, "%s", message_string);
|
||||||
@@ -712,26 +712,4 @@ rlc_um_data_req (void *rlc_pP, frame_t frameP, mem_block_t *sdu_pP)
|
|||||||
rlc_p->buffer_occupancy += ((struct rlc_um_tx_sdu_management *) (sdu_pP->data))->sdu_size;
|
rlc_p->buffer_occupancy += ((struct rlc_um_tx_sdu_management *) (sdu_pP->data))->sdu_size;
|
||||||
list_add_tail_eurecom(sdu_pP, &rlc_p->input_sdus);
|
list_add_tail_eurecom(sdu_pP, &rlc_p->input_sdus);
|
||||||
pthread_mutex_unlock(&rlc_p->lock_input_sdus);
|
pthread_mutex_unlock(&rlc_p->lock_input_sdus);
|
||||||
|
|
||||||
/*} else {
|
|
||||||
LOG_W(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][RB %02d] RLC-UM_DATA_REQ input buffer full SDU garbaged\n",
|
|
||||||
frameP,
|
|
||||||
(rlc_p->is_enb) ? "eNB" : "UE",
|
|
||||||
rlc_p->enb_module_id,
|
|
||||||
rlc_p->ue_module_id,
|
|
||||||
rlc_p->rb_id);
|
|
||||||
rlc_p->stat_tx_pdcp_sdu += 1;
|
|
||||||
rlc_p->stat_tx_pdcp_bytes += ((struct rlc_um_tx_sdu_management *) (sdu_pP->data))->sdu_size;
|
|
||||||
rlc_p->stat_tx_pdcp_sdu_discarded += 1;
|
|
||||||
rlc_p->stat_tx_pdcp_bytes_discarded += ((struct rlc_um_tx_sdu_management *) (sdu_pP->data))->sdu_size;
|
|
||||||
free_mem_block (sdu_pP);
|
|
||||||
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
|
|
||||||
AssertFatal(0, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] RLC_UM_DATA_REQ, SDU DROPPED, INPUT BUFFER OVERFLOW\n",
|
|
||||||
frameP,
|
|
||||||
(rlc_p->is_enb) ? "eNB" : "UE",
|
|
||||||
rlc_p->enb_module_id,
|
|
||||||
rlc_p->ue_module_id,
|
|
||||||
rlc_p->rb_id);
|
|
||||||
#endif
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,7 +75,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*! \fn void rlc_um_stat_req (rlc_um_entity_t *rlcP,
|
/*! \fn void rlc_um_stat_req (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP,
|
||||||
unsigned int* stat_tx_pdcp_sdu,
|
unsigned int* stat_tx_pdcp_sdu,
|
||||||
unsigned int* stat_tx_pdcp_bytes,
|
unsigned int* stat_tx_pdcp_bytes,
|
||||||
unsigned int* stat_tx_pdcp_sdu_discarded,
|
unsigned int* stat_tx_pdcp_sdu_discarded,
|
||||||
@@ -94,7 +94,8 @@
|
|||||||
unsigned int* stat_rx_data_bytes_out_of_window,
|
unsigned int* stat_rx_data_bytes_out_of_window,
|
||||||
unsigned int* stat_timer_reordering_timed_out)
|
unsigned int* stat_timer_reordering_timed_out)
|
||||||
* \brief Request TX and RX statistics of a RLC AM protocol instance.
|
* \brief Request TX and RX statistics of a RLC AM protocol instance.
|
||||||
* \param[in] rlcP RLC AM protocol instance pointer.
|
* \param[in] ctxt_pP Running context.
|
||||||
|
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||||
* \param[out] stat_tx_pdcp_sdu Number of SDUs coming from upper layers.
|
* \param[out] stat_tx_pdcp_sdu Number of SDUs coming from upper layers.
|
||||||
* \param[out] stat_tx_pdcp_bytes Number of bytes coming from upper layers.
|
* \param[out] stat_tx_pdcp_bytes Number of bytes coming from upper layers.
|
||||||
* \param[out] stat_tx_pdcp_sdu_discarded Number of discarded SDUs coming from upper layers.
|
* \param[out] stat_tx_pdcp_sdu_discarded Number of discarded SDUs coming from upper layers.
|
||||||
@@ -113,7 +114,7 @@
|
|||||||
* \param[out] stat_rx_data_bytes_out_of_window Number of data bytes received out of the receive window.
|
* \param[out] stat_rx_data_bytes_out_of_window Number of data bytes received out of the receive window.
|
||||||
* \param[out] stat_timer_reordering_timed_out Number of times the timer "reordering" has timed-out.
|
* \param[out] stat_timer_reordering_timed_out Number of times the timer "reordering" has timed-out.
|
||||||
*/
|
*/
|
||||||
public_rlc_um(void rlc_um_stat_req (rlc_um_entity_t *rlcP,
|
public_rlc_um(void rlc_um_stat_req (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP,
|
||||||
unsigned int* stat_tx_pdcp_sdu,
|
unsigned int* stat_tx_pdcp_sdu,
|
||||||
unsigned int* stat_tx_pdcp_bytes,
|
unsigned int* stat_tx_pdcp_bytes,
|
||||||
unsigned int* stat_tx_pdcp_sdu_discarded,
|
unsigned int* stat_tx_pdcp_sdu_discarded,
|
||||||
@@ -132,57 +133,55 @@ public_rlc_um(void rlc_um_stat_req (rlc_um_entity_t *rlcP,
|
|||||||
unsigned int* stat_rx_data_bytes_out_of_window,
|
unsigned int* stat_rx_data_bytes_out_of_window,
|
||||||
unsigned int* stat_timer_reordering_timed_out);)
|
unsigned int* stat_timer_reordering_timed_out);)
|
||||||
|
|
||||||
/*! \fn void rlc_um_get_pdus (void *rlcP)
|
/*! \fn void rlc_um_get_pdus (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP)
|
||||||
* \brief Request the segmentation of SDUs based on status previously sent by MAC.
|
* \brief Request the segmentation of SDUs based on status previously sent by MAC.
|
||||||
* \param[in] rlcP RLC UM protocol instance pointer.
|
* \param[in] ctxt_pP Running context.
|
||||||
|
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||||
*/
|
*/
|
||||||
private_rlc_um( void rlc_um_get_pdus (void *rlcP);)
|
private_rlc_um( void rlc_um_get_pdus (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP);)
|
||||||
|
|
||||||
/*! \fn void rlc_um_rx (void *rlcP, uint32_t frame, uint8_t eNB_flag, struct mac_data_ind data_indication)
|
/*! \fn void rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, struct mac_data_ind data_indication)
|
||||||
* \brief Process the received PDUs from lower layer.
|
* \brief Process the received PDUs from lower layer.
|
||||||
* \param[in] rlcP RLC UM protocol instance pointer.
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] frame Frame Index.
|
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||||
* \param[in] eNB_flag Flag to indicate eNB (1) or UE (0).
|
|
||||||
* \param[in] data_indication PDUs from MAC.
|
* \param[in] data_indication PDUs from MAC.
|
||||||
*/
|
*/
|
||||||
protected_rlc_um( void rlc_um_rx (void *rlcP, uint32_t frame, uint8_t eNB_flag, struct mac_data_ind data_indication);)
|
protected_rlc_um( void rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, struct mac_data_ind data_indication);)
|
||||||
|
|
||||||
/*! \fn struct mac_status_resp rlc_um_mac_status_indication (void *rlcP, uint32_t frame, uint8_t eNB_flag, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP)
|
/*! \fn struct mac_status_resp rlc_um_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP)
|
||||||
* \brief Request the maximum number of bytes that can be served by RLC instance to MAC and fix the amount of bytes requested by MAC for next RLC transmission.
|
* \brief Request the maximum number of bytes that can be served by RLC instance to MAC and fix the amount of bytes requested by MAC for next RLC transmission.
|
||||||
* \param[in] rlcP RLC UM protocol instance pointer.
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] frame Frame index.
|
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||||
* \param[in] eNB_flag Flag to indicate eNB (1) or UE (0).
|
|
||||||
* \param[in] tbs_sizeP Number of bytes requested by MAC for next transmission.
|
* \param[in] tbs_sizeP Number of bytes requested by MAC for next transmission.
|
||||||
* \param[in] tx_statusP Transmission status given by MAC on previous MAC transmission of the PDU.
|
* \param[in] tx_statusP Transmission status given by MAC on previous MAC transmission of the PDU.
|
||||||
* \return The maximum number of bytes that can be served by RLC instance to MAC.
|
* \return The maximum number of bytes that can be served by RLC instance to MAC.
|
||||||
*/
|
*/
|
||||||
public_rlc_um( struct mac_status_resp rlc_um_mac_status_indication (void *rlcP, uint32_t frame, uint8_t eNB_flag, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP);)
|
public_rlc_um( struct mac_status_resp rlc_um_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP);)
|
||||||
|
|
||||||
/*! \fn struct mac_data_req rlc_um_mac_data_request (void *rlcP, uint32_t frame)
|
/*! \fn struct mac_data_req rlc_um_mac_data_request (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP)
|
||||||
* \brief Gives PDUs to lower layer MAC.
|
* \brief Gives PDUs to lower layer MAC.
|
||||||
* \param[in] rlcP RLC UM protocol instance pointer.
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] frame Frame Index.
|
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||||
* \return A PDU of the previously requested number of bytes, and the updated maximum number of bytes that can be served by RLC instance to MAC for next RLC transmission.
|
* \return A PDU of the previously requested number of bytes, and the updated maximum number of bytes that can be served by RLC instance to MAC for next RLC transmission.
|
||||||
*/
|
*/
|
||||||
public_rlc_um( struct mac_data_req rlc_um_mac_data_request (void *rlcP, uint32_t frame);)
|
public_rlc_um( struct mac_data_req rlc_um_mac_data_request (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP);)
|
||||||
|
|
||||||
|
|
||||||
/*! \fn void rlc_um_mac_data_indication (void *rlcP, uint32_t frame, uint8_t eNB_flag,struct mac_data_ind data_indP)
|
/*! \fn void rlc_um_mac_data_indication (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP,struct mac_data_ind data_indP)
|
||||||
* \brief Receive PDUs from lower layer MAC.
|
* \brief Receive PDUs from lower layer MAC.
|
||||||
* \param[in] rlcP RLC UM protocol instance pointer.
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] frame Frame index.
|
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||||
* \param[in] eNB_flag Flag to indicate eNB (1) or UE (0).
|
|
||||||
* \param[in] data_indP PDUs from MAC.
|
* \param[in] data_indP PDUs from MAC.
|
||||||
*/
|
*/
|
||||||
public_rlc_um( void rlc_um_mac_data_indication (void *rlcP, uint32_t frame, uint8_t eNB_flag, struct mac_data_ind data_indP);)
|
public_rlc_um( void rlc_um_mac_data_indication (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, struct mac_data_ind data_indP);)
|
||||||
|
|
||||||
|
|
||||||
/*! \fn void rlc_um_data_req (void *rlcP, uint32_t frame, mem_block_t *sduP)
|
/*! \fn void rlc_um_data_req (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, mem_block_t *sduP)
|
||||||
* \brief Interface with higher layers, buffer higher layer SDUS for transmission.
|
* \brief Interface with higher layers, buffer higher layer SDUS for transmission.
|
||||||
* \param[in] rlcP RLC UM protocol instance pointer.
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] frame Frame Index
|
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||||
* \param[in] sduP SDU. (A struct rlc_um_data_req is mapped on sduP->data.)
|
* \param[in] sduP SDU. (A struct rlc_um_data_req is mapped on sduP->data.)
|
||||||
*/
|
*/
|
||||||
public_rlc_um( void rlc_um_data_req (void *rlcP, uint32_t frame, mem_block_t *sduP);)
|
public_rlc_um( void rlc_um_data_req (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, mem_block_t *sduP);)
|
||||||
/** @} */
|
/** @} */
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
@@ -43,10 +43,7 @@
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void config_req_rlc_um (
|
void config_req_rlc_um (
|
||||||
const module_id_t enb_module_idP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const module_id_t ue_module_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const rlc_um_info_t * const config_um_pP,
|
const rlc_um_info_t * const config_um_pP,
|
||||||
const rb_id_t rb_idP)
|
const rb_id_t rb_idP)
|
||||||
@@ -54,29 +51,30 @@ void config_req_rlc_um (
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
rlc_union_t *rlc_union_p = NULL;
|
rlc_union_t *rlc_union_p = NULL;
|
||||||
rlc_um_entity_t *rlc_p = NULL;
|
rlc_um_entity_t *rlc_p = NULL;
|
||||||
hash_key_t key = RLC_COLL_KEY_VALUE(enb_module_idP, ue_module_idP, eNB_flagP, rb_idP, srb_flagP);
|
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->enb_module_id, ctxt_pP->ue_module_id, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||||
hashtable_rc_t h_rc;
|
hashtable_rc_t h_rc;
|
||||||
|
|
||||||
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
||||||
if (h_rc == HASH_TABLE_OK) {
|
if (h_rc == HASH_TABLE_OK) {
|
||||||
rlc_p = &rlc_union_p->rlc.um;
|
rlc_p = &rlc_union_p->rlc.um;
|
||||||
LOG_D(RLC, "[FRAME %05d][%s][RRC][MOD %u/%u][][--- CONFIG_REQ timer_reordering=%d sn_field_length=%d is_mXch=%d --->][RLC_UM][MOD %u/%u][RB %u] \n",
|
LOG_D(RLC, "[FRAME %05d][%s][RRC][MOD %u/%u][][--- CONFIG_REQ timer_reordering=%d sn_field_length=%d is_mXch=%d --->][RLC_UM][MOD %u/%u][RB %u] \n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(eNB_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_module_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxt_pP->ue_module_id,
|
||||||
config_um_pP->timer_reordering,
|
config_um_pP->timer_reordering,
|
||||||
config_um_pP->sn_field_length,
|
config_um_pP->sn_field_length,
|
||||||
config_um_pP->is_mXch,
|
config_um_pP->is_mXch,
|
||||||
enb_module_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rb_idP);
|
rb_idP);
|
||||||
|
|
||||||
rlc_um_init(rlc_p);
|
rlc_um_init(ctxt_pP, rlc_p);
|
||||||
if (rlc_um_fsm_notify_event (rlc_p, RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_DATA_TRANSFER_READY_STATE_EVENT)) {
|
if (rlc_um_fsm_notify_event (ctxt_pP, rlc_p, RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_DATA_TRANSFER_READY_STATE_EVENT)) {
|
||||||
rlc_um_set_debug_infos(rlc_p, enb_module_idP, ue_module_idP, frameP, eNB_flagP, srb_flagP, rb_idP);
|
rlc_um_set_debug_infos(ctxt_pP, rlc_p, srb_flagP, rb_idP);
|
||||||
rlc_um_configure(rlc_p,
|
rlc_um_configure(
|
||||||
frameP,
|
ctxt_pP,
|
||||||
|
rlc_p,
|
||||||
config_um_pP->timer_reordering,
|
config_um_pP->timer_reordering,
|
||||||
config_um_pP->sn_field_length,
|
config_um_pP->sn_field_length,
|
||||||
config_um_pP->sn_field_length,
|
config_um_pP->sn_field_length,
|
||||||
@@ -84,22 +82,19 @@ void config_req_rlc_um (
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_E(RLC, "[FRAME %05d][%s][RRC][MOD %u/%u][][--- CONFIG_REQ --->][RLC_UM][MOD %u/%u][RB %u] RLC NOT FOUND\n",
|
LOG_E(RLC, "[FRAME %05d][%s][RRC][MOD %u/%u][][--- CONFIG_REQ --->][RLC_UM][MOD %u/%u][RB %u] RLC NOT FOUND\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(eNB_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_module_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxt_pP->ue_module_id,
|
||||||
enb_module_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rb_idP); }
|
rb_idP); }
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
const uint32_t const t_Reordering_tab[T_Reordering_spare1] = {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200};
|
const uint32_t const t_Reordering_tab[T_Reordering_spare1] = {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200};
|
||||||
|
|
||||||
void config_req_rlc_um_asn1 (
|
void config_req_rlc_um_asn1 (
|
||||||
const module_id_t enb_module_idP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const module_id_t ue_module_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const MBMS_flag_t mbms_flagP,
|
const MBMS_flag_t mbms_flagP,
|
||||||
const mbms_session_id_t mbms_session_idP,
|
const mbms_session_id_t mbms_session_idP,
|
||||||
@@ -113,19 +108,19 @@ void config_req_rlc_um_asn1 (
|
|||||||
uint32_t t_Reordering = 0;
|
uint32_t t_Reordering = 0;
|
||||||
rlc_union_t *rlc_union_p = NULL;
|
rlc_union_t *rlc_union_p = NULL;
|
||||||
rlc_um_entity_t *rlc_p = NULL;
|
rlc_um_entity_t *rlc_p = NULL;
|
||||||
hash_key_t key = RLC_COLL_KEY_VALUE(enb_module_idP, ue_module_idP, eNB_flagP, rb_idP, srb_flagP);
|
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->enb_module_id, ctxt_pP->ue_module_id, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||||
hashtable_rc_t h_rc;
|
hashtable_rc_t h_rc;
|
||||||
|
|
||||||
#if defined(Rel10)
|
#if defined(Rel10)
|
||||||
if (mbms_flagP) {
|
if (mbms_flagP) {
|
||||||
AssertFatal(dl_rlc_pP, "No RLC UM DL config");
|
AssertFatal(dl_rlc_pP, "No RLC UM DL config");
|
||||||
AssertFatal(ul_rlc_pP == NULL, "RLC UM UL config present");
|
AssertFatal(ul_rlc_pP == NULL, "RLC UM UL config present");
|
||||||
key = RLC_COLL_KEY_MBMS_VALUE(enb_module_idP, ue_module_idP, eNB_flagP, mbms_service_idP, mbms_session_idP);
|
key = RLC_COLL_KEY_MBMS_VALUE(ctxt_pP->enb_module_id, ctxt_pP->ue_module_id, ctxt_pP->enb_flag, mbms_service_idP, mbms_session_idP);
|
||||||
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
||||||
AssertFatal (h_rc == HASH_TABLE_OK, "RLC NOT FOUND enb id %u ue id %i enb flag %u service id %u, session id %u",
|
AssertFatal (h_rc == HASH_TABLE_OK, "RLC NOT FOUND enb id %u ue id %i enb flag %u service id %u, session id %u",
|
||||||
enb_module_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxt_pP->ue_module_id,
|
||||||
eNB_flagP,
|
ctxt_pP->enb_flag,
|
||||||
mbms_service_idP,
|
mbms_service_idP,
|
||||||
mbms_session_idP);
|
mbms_session_idP);
|
||||||
rlc_p = &rlc_union_p->rlc.um;
|
rlc_p = &rlc_union_p->rlc.um;
|
||||||
@@ -133,12 +128,12 @@ void config_req_rlc_um_asn1 (
|
|||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
key = RLC_COLL_KEY_VALUE(enb_module_idP, ue_module_idP, eNB_flagP, rb_idP, srb_flagP);
|
key = RLC_COLL_KEY_VALUE(ctxt_pP->enb_module_id, ctxt_pP->ue_module_id, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||||
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
||||||
AssertFatal (h_rc == HASH_TABLE_OK, "RLC NOT FOUND enb id %u ue id %i enb flag %u rb id %u, srb flag %u",
|
AssertFatal (h_rc == HASH_TABLE_OK, "RLC NOT FOUND enb id %u ue id %i enb flag %u rb id %u, srb flag %u",
|
||||||
enb_module_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxt_pP->ue_module_id,
|
||||||
eNB_flagP,
|
ctxt_pP->enb_flag,
|
||||||
rb_idP,
|
rb_idP,
|
||||||
srb_flagP);
|
srb_flagP);
|
||||||
rlc_p = &rlc_union_p->rlc.um;
|
rlc_p = &rlc_union_p->rlc.um;
|
||||||
@@ -146,18 +141,18 @@ void config_req_rlc_um_asn1 (
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
LOG_D(RLC, "[FRAME %05d][%s][RRC][MOD %u/%u][][--- CONFIG_REQ timer_reordering=%dms sn_field_length= --->][RLC_UM][MOD %u/%u][RB %u] \n",
|
LOG_D(RLC, "[FRAME %05d][%s][RRC][MOD %u/%u][][--- CONFIG_REQ timer_reordering=%dms sn_field_length= --->][RLC_UM][MOD %u/%u][RB %u] \n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(eNB_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_module_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxt_pP->ue_module_id,
|
||||||
(dl_rlc_pP->t_Reordering<31)?t_Reordering_tab[dl_rlc_pP->t_Reordering]:-1,
|
(dl_rlc_pP->t_Reordering<31)?t_Reordering_tab[dl_rlc_pP->t_Reordering]:-1,
|
||||||
enb_module_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rb_idP);
|
rb_idP);
|
||||||
|
|
||||||
rlc_um_init(rlc_p);
|
rlc_um_init(ctxt_pP, rlc_p);
|
||||||
if (rlc_um_fsm_notify_event (rlc_p, RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_DATA_TRANSFER_READY_STATE_EVENT)) {
|
if (rlc_um_fsm_notify_event (ctxt_pP, rlc_p, RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_DATA_TRANSFER_READY_STATE_EVENT)) {
|
||||||
rlc_um_set_debug_infos(rlc_p, enb_module_idP, ue_module_idP, frameP, eNB_flagP, srb_flagP, rb_idP);
|
rlc_um_set_debug_infos(ctxt_pP,rlc_p, srb_flagP, rb_idP);
|
||||||
if (ul_rlc_pP != NULL) {
|
if (ul_rlc_pP != NULL) {
|
||||||
switch (ul_rlc_pP->sn_FieldLength) {
|
switch (ul_rlc_pP->sn_FieldLength) {
|
||||||
case SN_FieldLength_size5:
|
case SN_FieldLength_size5:
|
||||||
@@ -168,10 +163,10 @@ void config_req_rlc_um_asn1 (
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOG_E(RLC,"[FRAME %05d][%s][RLC_UM][MOD %u/%u][RB %u][CONFIGURE] INVALID Uplink sn_FieldLength %d, RLC NOT CONFIGURED\n",
|
LOG_E(RLC,"[FRAME %05d][%s][RLC_UM][MOD %u/%u][RB %u][CONFIGURE] INVALID Uplink sn_FieldLength %d, RLC NOT CONFIGURED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_p->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_p->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_p->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_p->rb_id,
|
rlc_p->rb_id,
|
||||||
ul_rlc_pP->sn_FieldLength);
|
ul_rlc_pP->sn_FieldLength);
|
||||||
return;
|
return;
|
||||||
@@ -188,10 +183,10 @@ void config_req_rlc_um_asn1 (
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOG_E(RLC,"[FRAME %05d][%s][RLC_UM][MOD %u/%u][RB %u][CONFIGURE] INVALID Downlink sn_FieldLength %d, RLC NOT CONFIGURED\n",
|
LOG_E(RLC,"[FRAME %05d][%s][RLC_UM][MOD %u/%u][RB %u][CONFIGURE] INVALID Downlink sn_FieldLength %d, RLC NOT CONFIGURED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_p->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_p->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_p->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_p->rb_id,
|
rlc_p->rb_id,
|
||||||
dl_rlc_pP->sn_FieldLength);
|
dl_rlc_pP->sn_FieldLength);
|
||||||
return;
|
return;
|
||||||
@@ -200,25 +195,23 @@ void config_req_rlc_um_asn1 (
|
|||||||
t_Reordering = t_Reordering_tab[dl_rlc_pP->t_Reordering];
|
t_Reordering = t_Reordering_tab[dl_rlc_pP->t_Reordering];
|
||||||
} else {
|
} else {
|
||||||
LOG_E(RLC,"[FRAME %05d][%s][RLC_UM][MOD %u/%u][RB %u][CONFIGURE] INVALID T_Reordering %d, RLC NOT CONFIGURED\n",
|
LOG_E(RLC,"[FRAME %05d][%s][RLC_UM][MOD %u/%u][RB %u][CONFIGURE] INVALID T_Reordering %d, RLC NOT CONFIGURED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_p->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_p->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_p->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_p->rb_id,
|
rlc_p->rb_id,
|
||||||
dl_rlc_pP->t_Reordering);
|
dl_rlc_pP->t_Reordering);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (eNB_flagP > 0) {
|
if (ctxt_pP->enb_flag > 0) {
|
||||||
rlc_um_configure(rlc_p,
|
rlc_um_configure(ctxt_pP,rlc_p,
|
||||||
frameP,
|
|
||||||
t_Reordering,
|
t_Reordering,
|
||||||
ul_sn_FieldLength,
|
ul_sn_FieldLength,
|
||||||
dl_sn_FieldLength,
|
dl_sn_FieldLength,
|
||||||
mbms_flagP);
|
mbms_flagP);
|
||||||
} else {
|
} else {
|
||||||
rlc_um_configure(rlc_p,
|
rlc_um_configure(ctxt_pP,rlc_p,
|
||||||
frameP,
|
|
||||||
t_Reordering,
|
t_Reordering,
|
||||||
dl_sn_FieldLength,
|
dl_sn_FieldLength,
|
||||||
ul_sn_FieldLength,
|
ul_sn_FieldLength,
|
||||||
@@ -228,7 +221,10 @@ void config_req_rlc_um_asn1 (
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rlc_um_init (rlc_um_entity_t * const rlc_pP)
|
rlc_um_init (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_um_entity_t * const rlc_pP
|
||||||
|
)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -271,7 +267,10 @@ rlc_um_init (rlc_um_entity_t * const rlc_pP)
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rlc_um_reset_state_variables (rlc_um_entity_t * const rlc_pP)
|
rlc_um_reset_state_variables (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_um_entity_t * const rlc_pP
|
||||||
|
)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
rlc_pP->buffer_occupancy = 0;
|
rlc_pP->buffer_occupancy = 0;
|
||||||
@@ -286,7 +285,9 @@ rlc_um_reset_state_variables (rlc_um_entity_t * const rlc_pP)
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rlc_um_cleanup (rlc_um_entity_t * const rlc_pP)
|
rlc_um_cleanup (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_um_entity_t * const rlc_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
int index;
|
int index;
|
||||||
@@ -315,8 +316,8 @@ rlc_um_cleanup (rlc_um_entity_t * const rlc_pP)
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_um_configure(
|
void rlc_um_configure(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_um_entity_t * const rlc_pP,
|
rlc_um_entity_t * const rlc_pP,
|
||||||
const frame_t frameP,
|
|
||||||
const uint32_t timer_reorderingP,
|
const uint32_t timer_reorderingP,
|
||||||
const uint32_t rx_sn_field_lengthP,
|
const uint32_t rx_sn_field_lengthP,
|
||||||
const uint32_t tx_sn_field_lengthP,
|
const uint32_t tx_sn_field_lengthP,
|
||||||
@@ -335,10 +336,10 @@ void rlc_um_configure(
|
|||||||
rlc_pP->rx_header_min_length_in_bytes = 1;
|
rlc_pP->rx_header_min_length_in_bytes = 1;
|
||||||
} else if (rx_sn_field_lengthP != 0) {
|
} else if (rx_sn_field_lengthP != 0) {
|
||||||
LOG_E(RLC, "[FRAME %05d][%s][RLC_UM][MOD %u/%u][RB %u][CONFIGURE] INVALID RX SN LENGTH %d BITS NOT IMPLEMENTED YET, RLC NOT CONFIGURED\n",
|
LOG_E(RLC, "[FRAME %05d][%s][RLC_UM][MOD %u/%u][RB %u][CONFIGURE] INVALID RX SN LENGTH %d BITS NOT IMPLEMENTED YET, RLC NOT CONFIGURED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rx_sn_field_lengthP);
|
rx_sn_field_lengthP);
|
||||||
return;
|
return;
|
||||||
@@ -356,10 +357,10 @@ void rlc_um_configure(
|
|||||||
rlc_pP->tx_header_min_length_in_bytes = 1;
|
rlc_pP->tx_header_min_length_in_bytes = 1;
|
||||||
} else if (tx_sn_field_lengthP != 0) {
|
} else if (tx_sn_field_lengthP != 0) {
|
||||||
LOG_E(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02d/%02][RB %u][CONFIGURE] INVALID RX SN LENGTH %d BITS NOT IMPLEMENTED YET, RLC NOT CONFIGURED\n",
|
LOG_E(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02d/%02][RB %u][CONFIGURE] INVALID RX SN LENGTH %d BITS NOT IMPLEMENTED YET, RLC NOT CONFIGURED\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxt_pP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxt_pP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
tx_sn_field_lengthP);
|
tx_sn_field_lengthP);
|
||||||
return;
|
return;
|
||||||
@@ -375,38 +376,31 @@ void rlc_um_configure(
|
|||||||
rlc_pP->last_reassemblied_missing_sn = rlc_pP->rx_sn_modulo - 1;
|
rlc_pP->last_reassemblied_missing_sn = rlc_pP->rx_sn_modulo - 1;
|
||||||
rlc_pP->reassembly_missing_sn_detected = 0;
|
rlc_pP->reassembly_missing_sn_detected = 0;
|
||||||
// timers
|
// timers
|
||||||
rlc_um_init_timer_reordering(rlc_pP, timer_reorderingP);
|
rlc_um_init_timer_reordering(ctxt_pP,rlc_pP, timer_reorderingP);
|
||||||
|
|
||||||
rlc_pP->first_pdu = 1;
|
rlc_pP->first_pdu = 1;
|
||||||
|
|
||||||
rlc_um_reset_state_variables (rlc_pP);
|
rlc_um_reset_state_variables (ctxt_pP,rlc_pP);
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_um_set_debug_infos(
|
void rlc_um_set_debug_infos(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_um_entity_t * const rlc_pP,
|
rlc_um_entity_t * const rlc_pP,
|
||||||
const module_id_t enb_module_idP,
|
|
||||||
const module_id_t ue_module_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const rb_id_t rb_idP)
|
const rb_id_t rb_idP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][SET DEBUG INFOS] enb_module_id %u ue_module_id %u rb_id %d srb_flag %d\n",
|
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][SET DEBUG INFOS] enb_module_id %u ue_module_id %u rb_id %d srb_flag %d\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(eNB_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_module_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rb_idP,
|
rb_idP,
|
||||||
srb_flagP);
|
srb_flagP);
|
||||||
|
|
||||||
rlc_pP->enb_module_id = enb_module_idP;
|
|
||||||
rlc_pP->ue_module_id = ue_module_idP;
|
|
||||||
rlc_pP->rb_id = rb_idP;
|
rlc_pP->rb_id = rb_idP;
|
||||||
if (srb_flagP) {
|
if (srb_flagP) {
|
||||||
rlc_pP->is_data_plane = 0;
|
rlc_pP->is_data_plane = 0;
|
||||||
} else {
|
} else {
|
||||||
rlc_pP->is_data_plane = 1;
|
rlc_pP->is_data_plane = 1;
|
||||||
}
|
}
|
||||||
rlc_pP->is_enb = eNB_flagP;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,133 +75,115 @@ typedef volatile struct {
|
|||||||
|
|
||||||
|
|
||||||
/*! \fn void config_req_rlc_um (
|
/*! \fn void config_req_rlc_um (
|
||||||
* const module_id_t enb_module_idP,
|
* const protocol_ctxt_t* const ctxt_pP,
|
||||||
* const module_id_t ue_module_idP,
|
|
||||||
* const frame_t frameP,
|
|
||||||
* const eNB_flag_t eNB_flagP,
|
|
||||||
* const srb_flag_t srb_flagP,
|
* const srb_flag_t srb_flagP,
|
||||||
* const rlc_um_info_t * const config_umP,
|
* const rlc_um_info_t * const config_umP,
|
||||||
* const rb_id_t rb_idP)
|
* const rb_id_t rb_idP)
|
||||||
* \brief Allocate memory for RLC UM instance, reset protocol variables, and set protocol parameters. After this configuration the RLC UM protocol instance will be in RLC_DATA_TRANSFER_READY_STATE state.
|
* \brief Allocate memory for RLC UM instance, reset protocol variables, and set protocol parameters. After this configuration the RLC UM protocol instance will be in RLC_DATA_TRANSFER_READY_STATE state.
|
||||||
* \param[in] frameP Frame index.
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] eNB_flag Flag to indicate eNB (1) or UE (0)
|
|
||||||
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
|
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
|
||||||
* \param[in] enb_module_idP eNB Virtualized module identifier.
|
|
||||||
* \param[in] ue_module_idP UE Virtualized module identifier.
|
|
||||||
* \param[in] config_umP Configuration parameters for RLC UM instance.
|
* \param[in] config_umP Configuration parameters for RLC UM instance.
|
||||||
* \param[in] rb_idP Radio bearer identifier.
|
* \param[in] rb_idP Radio bearer identifier.
|
||||||
*/
|
*/
|
||||||
public_rlc_um_control_primitives( void config_req_rlc_um (
|
public_rlc_um_control_primitives( void config_req_rlc_um (
|
||||||
const module_id_t enb_module_idP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const module_id_t ue_module_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const rlc_um_info_t * const config_umP,
|
const rlc_um_info_t * const config_umP,
|
||||||
const rb_id_t rb_idP);)
|
const rb_id_t rb_idP);)
|
||||||
|
|
||||||
/*! \fn void config_req_rlc_um_asn1 (
|
/*! \fn void config_req_rlc_um_asn1 (
|
||||||
* const module_id_t enb_module_idP,
|
* const protocol_ctxt_t* const ctxt_pP,
|
||||||
* const module_id_t ue_module_idP,
|
|
||||||
* const frame_t frameP,
|
|
||||||
* const eNB_flag_t eNB_flagP,
|
|
||||||
* const srb_flag_t srb_flagP,
|
* const srb_flag_t srb_flagP,
|
||||||
* const MBMS_flag_t mbms_flagP,
|
* const MBMS_flag_t mbms_flagP,
|
||||||
* const mbms_session_id_t mbms_session_idP,
|
* const mbms_session_id_t mbms_session_idP,
|
||||||
* const mbms_service_id_t mbms_service_idP,
|
* const mbms_service_id_t mbms_service_idP,
|
||||||
* const UL_UM_RLC_t* const ul_rlcP,
|
* const UL_UM_RLC_t* const ul_rlc_pP,
|
||||||
* const DL_UM_RLC_t* const dl_rlcP,
|
* const DL_UM_RLC_t* const dl_rlc_pP,
|
||||||
* const rb_id_t rb_idP)
|
* const rb_id_t rb_idP)
|
||||||
* \brief Allocate memory for RLC UM instance, reset protocol variables, and set protocol parameters. After this configuration the RLC UM protocol instance will be in RLC_DATA_TRANSFER_READY_STATE state.
|
* \brief Allocate memory for RLC UM instance, reset protocol variables, and set protocol parameters. After this configuration the RLC UM protocol instance will be in RLC_DATA_TRANSFER_READY_STATE state.
|
||||||
* \param[in] frameP Frame index.
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] eNB_flagP Flag to indicate eNB (1) or UE (0)
|
|
||||||
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
|
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
|
||||||
* \param[in] mbms_flagP Flag to indicate if this RLC is configured for MBMS.
|
* \param[in] mbms_flagP Flag to indicate if this RLC is configured for MBMS.
|
||||||
* \param[in] enb_module_idP eNB Virtualized module identifier.
|
|
||||||
* \param[in] ue_module_idP UE Virtualized module identifier.
|
|
||||||
* \param[in] mbms_session_idP MBMS session id.
|
* \param[in] mbms_session_idP MBMS session id.
|
||||||
* \param[in] mbms_service_idP MBMS service id.
|
* \param[in] mbms_service_idP MBMS service id.
|
||||||
* \param[in] ul_rlcP Configuration parameters for RLC UM UL instance.
|
* \param[in] ul_rlc_pP Configuration parameters for RLC UM UL instance.
|
||||||
* \param[in] dl_rlcP Configuration parameters for RLC UM DL instance.
|
* \param[in] dl_rlc_pP Configuration parameters for RLC UM DL instance.
|
||||||
* \param[in] rb_idP Radio bearer identifier.
|
* \param[in] rb_idP Radio bearer identifier.
|
||||||
*/
|
*/
|
||||||
public_rlc_um_control_primitives( void config_req_rlc_um_asn1 (
|
public_rlc_um_control_primitives( void config_req_rlc_um_asn1 (
|
||||||
const module_id_t enb_module_idP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const module_id_t ue_module_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const MBMS_flag_t mbms_flagP,
|
const MBMS_flag_t mbms_flagP,
|
||||||
const mbms_session_id_t mbms_session_idP,
|
const mbms_session_id_t mbms_session_idP,
|
||||||
const mbms_service_id_t mbms_service_idP,
|
const mbms_service_id_t mbms_service_idP,
|
||||||
const UL_UM_RLC_t * const ul_rlcP,
|
const UL_UM_RLC_t * const ul_rlc_pP,
|
||||||
const DL_UM_RLC_t * const dl_rlcP,
|
const DL_UM_RLC_t * const dl_rlc_pP,
|
||||||
const rb_id_t rb_idP);)
|
const rb_id_t rb_idP);)
|
||||||
|
|
||||||
/*! \fn void rlc_um_init (rlc_um_entity_t *rlcP)
|
/*! \fn void rlc_um_init (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP)
|
||||||
* \brief Initialize a RLC UM protocol instance, initialize all variables, lists, allocate buffers for making this instance ready to be configured with protocol configuration parameters. After this initialization the RLC UM protocol instance will be in RLC_NULL_STATE state.
|
* \brief Initialize a RLC UM protocol instance, initialize all variables, lists, allocate buffers for making this instance ready to be configured with protocol configuration parameters. After this initialization the RLC UM protocol instance will be in RLC_NULL_STATE state.
|
||||||
* \param[in] rlcP RLC UM protocol instance pointer.
|
* \param[in] ctxtP Running context.
|
||||||
|
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||||
*/
|
*/
|
||||||
protected_rlc_um_control_primitives(void rlc_um_init (rlc_um_entity_t * const rlcP);)
|
protected_rlc_um_control_primitives(void rlc_um_init (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_um_entity_t * const rlc_pP);)
|
||||||
|
|
||||||
/*! \fn void rlc_um_reset_state_variables (rlc_um_entity_t *rlcP)
|
/*! \fn void rlc_um_reset_state_variables (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP)
|
||||||
* \brief Reset protocol variables and state variables to initial values.
|
* \brief Reset protocol variables and state variables to initial values.
|
||||||
* \param[in] rlcP RLC UM protocol instance pointer.
|
* \param[in] ctxtP Running context.
|
||||||
|
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||||
*/
|
*/
|
||||||
protected_rlc_um_control_primitives(void rlc_um_reset_state_variables (rlc_um_entity_t * const rlcP);)
|
protected_rlc_um_control_primitives(void rlc_um_reset_state_variables (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_um_entity_t * const rlc_pP);)
|
||||||
|
|
||||||
/*! \fn void rlc_um_cleanup(rlc_um_entity_t *rlcP)
|
/*! \fn void rlc_um_cleanup(const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP)
|
||||||
* \brief Free all allocated memory (lists and buffers) previously allocated by this RLC UM instance.
|
* \brief Free all allocated memory (lists and buffers) previously allocated by this RLC UM instance.
|
||||||
* \param[in] rlcP RLC UM protocol instance pointer.
|
* \param[in] ctxtP Running context.
|
||||||
|
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||||
*/
|
*/
|
||||||
public_rlc_um_control_primitives( void rlc_um_cleanup(rlc_um_entity_t * const rlcP);)
|
public_rlc_um_control_primitives( void rlc_um_cleanup(
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
rlc_um_entity_t * const rlc_pP);)
|
||||||
|
|
||||||
/*! \fn void rlc_um_configure(
|
/*! \fn void rlc_um_configure(
|
||||||
* rlc_um_entity_t * const rlcP,
|
* const protocol_ctxt_t* const ctxt_pP,
|
||||||
* const frame_t frameP,
|
* rlc_um_entity_t * const rlc_pP,
|
||||||
* const uint32_t timer_reorderingP,
|
* const uint32_t timer_reorderingP,
|
||||||
* const uint32_t rx_sn_field_lengthP,
|
* const uint32_t rx_sn_field_lengthP,
|
||||||
* const uint32_t tx_sn_field_lengthP,
|
* const uint32_t tx_sn_field_lengthP,
|
||||||
* const uint32_t is_mXchP)
|
* const uint32_t is_mXchP)
|
||||||
* \brief Configure RLC UM protocol parameters.
|
* \brief Configure RLC UM protocol parameters.
|
||||||
* \param[in] rlcP RLC UM protocol instance pointer.
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] frameP Frame index.
|
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||||
* \param[in] timer_reorderingP t-Reordering timer initialization value, units in frameP.
|
* \param[in] timer_reorderingP t-Reordering timer initialization value, units in frameP.
|
||||||
* \param[in] rx_sn_field_lengthP Length of the sequence number, 5 or 10 bits in reception.
|
* \param[in] rx_sn_field_lengthP Length of the sequence number, 5 or 10 bits in reception.
|
||||||
* \param[in] tx_sn_field_lengthP Length of the sequence number, 5 or 10 bits in transmission.
|
* \param[in] tx_sn_field_lengthP Length of the sequence number, 5 or 10 bits in transmission.
|
||||||
* \param[in] is_mXchP Is the radio bearer for MCCH, MTCH.
|
* \param[in] is_mXchP Is the radio bearer for MCCH, MTCH.
|
||||||
*/
|
*/
|
||||||
protected_rlc_um_control_primitives(void rlc_um_configure(
|
protected_rlc_um_control_primitives(void rlc_um_configure(
|
||||||
rlc_um_entity_t *const rlcP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const frame_t frameP,
|
rlc_um_entity_t *const rlc_pP,
|
||||||
const uint32_t timer_reorderingP,
|
const uint32_t timer_reorderingP,
|
||||||
const uint32_t rx_sn_field_lengthP,
|
const uint32_t rx_sn_field_lengthP,
|
||||||
const uint32_t tx_sn_field_lengthP,
|
const uint32_t tx_sn_field_lengthP,
|
||||||
const uint32_t is_mXchP);)
|
const uint32_t is_mXchP);)
|
||||||
|
|
||||||
/*! \fn void rlc_um_set_debug_infos(
|
/*! \fn void rlc_um_set_debug_infos(
|
||||||
* rlc_um_entity_t * const rlcP,
|
* const protocol_ctxt_t* const ctxt_pP,
|
||||||
* const module_id_t enb_module_idP,
|
* rlc_um_entity_t * const rlc_pP,
|
||||||
* const module_id_t ue_module_idP,
|
* const srb_flag_t srb_flagP,
|
||||||
* const frame_t frameP,
|
* const rb_id_t rb_idP)
|
||||||
* const eNB_flag_t eNB_flagP,
|
|
||||||
* const srb_flag_t srb_flagP,
|
|
||||||
* const rb_id_t rb_idP)
|
|
||||||
* \brief Set debug informations for a RLC UM protocol instance, these informations are only for trace purpose.
|
* \brief Set debug informations for a RLC UM protocol instance, these informations are only for trace purpose.
|
||||||
* \param[in] rlcP RLC UM protocol instance pointer.
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] frameP Frame index.
|
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||||
* \param[in] eNB_flag Flag to indicate eNB (1) or UE (0)
|
|
||||||
* \param[in] enb_module_idP eNB Virtualized module identifier.
|
|
||||||
* \param[in] ue_module_idP UE Virtualized module identifier.
|
|
||||||
* \param[in] rb_idP Radio bearer identifier.
|
* \param[in] rb_idP Radio bearer identifier.
|
||||||
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
|
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
|
||||||
*/
|
*/
|
||||||
protected_rlc_um_control_primitives(void rlc_um_set_debug_infos(
|
protected_rlc_um_control_primitives(void rlc_um_set_debug_infos(
|
||||||
rlc_um_entity_t * const rlcP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const module_id_t enb_module_idP,
|
rlc_um_entity_t * const rlc_pP,
|
||||||
const module_id_t ue_module_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const rb_id_t rb_idP);)
|
const rb_id_t rb_idP);)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -62,9 +62,9 @@
|
|||||||
# define public_rlc_um_dar(x) extern x
|
# define public_rlc_um_dar(x) extern x
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
/*! \fn signed int rlc_um_get_pdu_infos(frame_t frameP,rlc_um_pdu_sn_10_t* header_pP, int16_t total_sizeP, rlc_um_pdu_info_t* pdu_info_pP, uint8_t sn_lengthP)
|
/*! \fn signed int rlc_um_get_pdu_infos(const protocol_ctxt_t* const ctxt_pP,rlc_um_pdu_sn_10_t* header_pP, int16_t total_sizeP, rlc_um_pdu_info_t* pdu_info_pP, uint8_t sn_lengthP)
|
||||||
* \brief Extract PDU informations (header fields, data size, etc) from the serialized PDU.
|
* \brief Extract PDU informations (header fields, data size, etc) from the serialized PDU.
|
||||||
* \param[in] frameP Frame index.
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] header_pP RLC UM header PDU pointer.
|
* \param[in] header_pP RLC UM header PDU pointer.
|
||||||
* \param[in] total_sizeP Size of RLC UM PDU.
|
* \param[in] total_sizeP Size of RLC UM PDU.
|
||||||
* \param[in] pdu_info_pP Structure containing extracted informations from PDU.
|
* \param[in] pdu_info_pP Structure containing extracted informations from PDU.
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
* \return 0 if no error was encountered during the parsing of the PDU, else -1;
|
* \return 0 if no error was encountered during the parsing of the PDU, else -1;
|
||||||
*/
|
*/
|
||||||
protected_rlc_um_dar( signed int rlc_um_get_pdu_infos(
|
protected_rlc_um_dar( signed int rlc_um_get_pdu_infos(
|
||||||
const frame_t frameP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
rlc_um_pdu_sn_10_t * const header_pP,
|
rlc_um_pdu_sn_10_t * const header_pP,
|
||||||
const sdu_size_t total_sizeP,
|
const sdu_size_t total_sizeP,
|
||||||
rlc_um_pdu_info_t * const pdu_info_pP,
|
rlc_um_pdu_info_t * const pdu_info_pP,
|
||||||
@@ -89,97 +89,101 @@ protected_rlc_um_dar( signed int rlc_um_get_pdu_infos(
|
|||||||
*/
|
*/
|
||||||
private_rlc_um_dar( int rlc_um_read_length_indicators(unsigned char**data_ppP, rlc_um_e_li_t* e_li_pP, unsigned int* li_array_pP, unsigned int *num_li_pP, sdu_size_t *data_size_pP));
|
private_rlc_um_dar( int rlc_um_read_length_indicators(unsigned char**data_ppP, rlc_um_e_li_t* e_li_pP, unsigned int* li_array_pP, unsigned int *num_li_pP, sdu_size_t *data_size_pP));
|
||||||
|
|
||||||
/*! \fn void rlc_um_try_reassembly (rlc_um_entity_t *rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP, rlc_sn_t start_snP, rlc_sn_t end_snP)
|
/*! \fn void rlc_um_try_reassembly (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, rlc_sn_t start_snP, rlc_sn_t end_snP)
|
||||||
* \brief Try reassembly PDUs from DAR buffer, starting at sequence number snP.
|
* \brief Try reassembly PDUs from DAR buffer, starting at sequence number snP.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index.
|
* \param[in] frameP Frame index.
|
||||||
* \param[in] eNB_flagP Flag to indicate eNB (1) or UE (0).
|
|
||||||
* \param[in] start_snP First PDU to be reassemblied if possible.
|
* \param[in] start_snP First PDU to be reassemblied if possible.
|
||||||
* \param[in] end_snP Last excluded highest sequence number of PDU to be reassemblied.
|
* \param[in] end_snP Last excluded highest sequence number of PDU to be reassemblied.
|
||||||
*/
|
*/
|
||||||
private_rlc_um_dar( void rlc_um_try_reassembly (rlc_um_entity_t *rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP, rlc_sn_t start_snP, rlc_sn_t end_snP));
|
private_rlc_um_dar( void rlc_um_try_reassembly (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, const rlc_sn_t start_snP, const rlc_sn_t end_snP));
|
||||||
|
|
||||||
/*! \fn void rlc_um_check_timer_reordering(rlc_um_entity_t *rlc_pP,frame_t frameP)
|
/*! \fn void rlc_um_check_timer_reordering(rlc_um_entity_t * const rlc_pP,frame_t frameP)
|
||||||
* \brief Check if timer reordering has timed-out, if so it is stopped and has the status "timed-out".
|
* \brief Check if timer reordering has timed-out, if so it is stopped and has the status "timed-out".
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index
|
* \param[in] frameP Frame index
|
||||||
*/
|
*/
|
||||||
protected_rlc_um_dar(void rlc_um_check_timer_reordering(rlc_um_entity_t *rlc_pP,frame_t frameP));
|
protected_rlc_um_dar(void rlc_um_check_timer_reordering(const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *const rlc_pP));
|
||||||
|
|
||||||
/*! \fn void rlc_um_stop_and_reset_timer_reordering(rlc_um_entity_t *rlc_pP,frame_t frameP)
|
/*! \fn void rlc_um_stop_and_reset_timer_reordering(const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP)
|
||||||
* \brief Stop and reset the timer reordering.
|
* \brief Stop and reset the timer reordering.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index.
|
* \param[in] frameP Frame index.
|
||||||
*/
|
*/
|
||||||
protected_rlc_um_dar(void rlc_um_stop_and_reset_timer_reordering(rlc_um_entity_t *rlc_pP,frame_t frameP);)
|
protected_rlc_um_dar(void rlc_um_stop_and_reset_timer_reordering(const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *const rlc_pP);)
|
||||||
|
|
||||||
/*! \fn void rlc_um_start_timer_reordering(rlc_um_entity_t *rlc_pP,frame_t frameP)
|
/*! \fn void rlc_um_start_timer_reordering(const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP)
|
||||||
* \brief Re-arm (based on RLC UM config parameter) and start timer reordering.
|
* \brief Re-arm (based on RLC UM config parameter) and start timer reordering.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index.
|
* \param[in] frameP Frame index.
|
||||||
*/
|
*/
|
||||||
protected_rlc_um_dar(void rlc_um_start_timer_reordering(rlc_um_entity_t *rlc_pP,frame_t frameP);)
|
protected_rlc_um_dar(void rlc_um_start_timer_reordering(const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP);)
|
||||||
|
|
||||||
/*! \fn void rlc_um_init_timer_reordering(rlc_um_entity_t *rlc_pP, uint32_t time_outP)
|
/*! \fn void rlc_um_init_timer_reordering(rlc_um_entity_t * const rlc_pP, uint32_t time_outP)
|
||||||
* \brief Initialize the timer reordering with RLC UM time-out config parameter.
|
* \brief Initialize the timer reordering with RLC UM time-out config parameter.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||||
* \param[in] time_outP Time-out in frameP units.
|
* \param[in] time_outP Time-out in frameP units.
|
||||||
*/
|
*/
|
||||||
protected_rlc_um_dar(void rlc_um_init_timer_reordering(rlc_um_entity_t *rlc_pP, uint32_t time_outP);)
|
protected_rlc_um_dar(void rlc_um_init_timer_reordering(const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, const uint32_t time_outP);)
|
||||||
|
|
||||||
/*! \fn void rlc_um_check_timer_dar_time_out(rlc_um_entity_t *rlc_pP,frame_t frameP,eNB_flag_t eNB_flagP)
|
/*! \fn void rlc_um_check_timer_dar_time_out(const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP,)
|
||||||
* \brief Check if t-Reordering expires and take the appropriate actions as described in 3GPP specifications.
|
* \brief Check if t-Reordering expires and take the appropriate actions as described in 3GPP specifications.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
* \param[in] eNB_flagP Flag to indicate eNB(1) or UE (1)
|
|
||||||
*/
|
*/
|
||||||
protected_rlc_um_dar( void rlc_um_check_timer_dar_time_out(rlc_um_entity_t *rlc_pP,frame_t frameP,eNB_flag_t eNB_flagP));
|
protected_rlc_um_dar( void rlc_um_check_timer_dar_time_out(const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP));
|
||||||
|
|
||||||
/*! \fn mem_block_t *rlc_um_remove_pdu_from_dar_buffer(rlc_um_entity_t *rlc_pP, uint16_t snP)
|
/*! \fn mem_block_t *rlc_um_remove_pdu_from_dar_buffer(rlc_um_entity_t * const rlc_pP, uint16_t snP)
|
||||||
* \brief Remove the PDU with sequence number snP from the DAR buffer and return it.
|
* \brief Remove the PDU with sequence number snP from the DAR buffer and return it.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||||
* \param[in] snP Sequence number.
|
* \param[in] snP Sequence number.
|
||||||
* \return The PDU stored in the DAR buffer having sequence number snP, else return NULL.
|
* \return The PDU stored in the DAR buffer having sequence number snP, else return NULL.
|
||||||
*/
|
*/
|
||||||
private_rlc_um_dar( mem_block_t *rlc_um_remove_pdu_from_dar_buffer(rlc_um_entity_t *rlc_pP, uint16_t snP));
|
private_rlc_um_dar( mem_block_t *rlc_um_remove_pdu_from_dar_buffer(const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, const uint16_t snP));
|
||||||
|
|
||||||
/*! \fn mem_block_t *rlc_um_remove_pdu_from_dar_buffer(rlc_um_entity_t *rlc_pP, uint16_t snP)
|
/*! \fn mem_block_t *rlc_um_remove_pdu_from_dar_buffer(const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, const uint16_t snP)
|
||||||
* \brief Get the PDU with sequence number snP from the DAR buffer.
|
* \brief Get the PDU with sequence number snP from the DAR buffer.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||||
* \param[in] snP Sequence number.
|
* \param[in] snP Sequence number.
|
||||||
* \return The PDU stored in the DAR buffer having sequence number snP, else return NULL.
|
* \return The PDU stored in the DAR buffer having sequence number snP, else return NULL.
|
||||||
*/
|
*/
|
||||||
protected_rlc_um_dar( inline mem_block_t* rlc_um_get_pdu_from_dar_buffer(rlc_um_entity_t *rlc_pP, uint16_t snP));
|
protected_rlc_um_dar( inline mem_block_t* rlc_um_get_pdu_from_dar_buffer(const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, const uint16_t snP));
|
||||||
|
|
||||||
/*! \fn signed int rlc_um_in_window(rlc_um_entity_t *rlc_pP, frame_t frameP, rlc_sn_t lower_boundP, rlc_sn_t snP, rlc_sn_t higher_boundP)
|
/*! \fn signed int rlc_um_in_window(const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP,rlc_sn_t lower_boundP, rlc_sn_t snP, rlc_sn_t higher_boundP)
|
||||||
* \brief Compute if the sequence number of a PDU is in a window .
|
* \brief Compute if the sequence number of a PDU is in a window .
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
* \param[in] lower_boundP Lower bound of a window.
|
* \param[in] lower_boundP Lower bound of a window.
|
||||||
* \param[in] snP Sequence number of a theorical PDU.
|
* \param[in] snP Sequence number of a theorical PDU.
|
||||||
* \param[in] higher_boundP Higher bound of a window.
|
* \param[in] higher_boundP Higher bound of a window.
|
||||||
* \return -2 if lower_boundP > sn, -1 if higher_boundP < sn, 0 if lower_boundP < sn < higher_boundP, 1 if lower_boundP == sn, 2 if higher_boundP == sn, 3 if higher_boundP == sn == lower_boundP.
|
* \return -2 if lower_boundP > sn, -1 if higher_boundP < sn, 0 if lower_boundP < sn < higher_boundP, 1 if lower_boundP == sn, 2 if higher_boundP == sn, 3 if higher_boundP == sn == lower_boundP.
|
||||||
*/
|
*/
|
||||||
protected_rlc_um_dar(inline signed int rlc_um_in_window(rlc_um_entity_t *rlc_pP, frame_t frameP, rlc_sn_t lower_boundP, rlc_sn_t snP, rlc_sn_t higher_boundP));
|
protected_rlc_um_dar(inline signed int rlc_um_in_window(const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, const rlc_sn_t lower_boundP, const rlc_sn_t snP, const rlc_sn_t higher_boundP));
|
||||||
|
|
||||||
/*! \fn signed int rlc_um_in_reordering_window(rlc_um_entity_t *rlc_pP, frame_t frameP, rlc_sn_t snP)
|
/*! \fn signed int rlc_um_in_reordering_window(const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, const rlc_sn_t snP)
|
||||||
* \brief Compute if the sequence number of a PDU is in a window .
|
* \brief Compute if the sequence number of a PDU is in a window .
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
* \param[in] snP Sequence number of a theorical PDU.
|
* \param[in] snP Sequence number of a theorical PDU.
|
||||||
* \return 0 if snP is in reordering window, else -1.
|
* \return 0 if snP is in reordering window, else -1.
|
||||||
*/
|
*/
|
||||||
protected_rlc_um_dar(inline signed int rlc_um_in_reordering_window(rlc_um_entity_t *rlc_pP, frame_t frameP, rlc_sn_t snP));
|
protected_rlc_um_dar(inline signed int rlc_um_in_reordering_window(const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, const rlc_sn_t snP));
|
||||||
|
|
||||||
/*! \fn void rlc_um_receive_process_dar (rlc_um_entity_t *rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP, mem_block_t *pdu_mem_pP,rlc_um_pdu_sn_10_t *pdu_pP, sdu_size_t tb_sizeP)
|
/*! \fn void rlc_um_receive_process_dar (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, mem_block_t *pdu_mem_pP,rlc_um_pdu_sn_10_t * const pdu_pP, const sdu_size_t tb_sizeP)
|
||||||
* \brief Apply the DAR process for a PDU: put it in DAR buffer and try to reassembly or discard it.
|
* \brief Apply the DAR process for a PDU: put it in DAR buffer and try to reassembly or discard it.
|
||||||
|
* \param[in] ctxt_pP Running context.
|
||||||
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
* \param[in] eNB_flagP Flag to indicated eNB (1) or UE (0).
|
|
||||||
* \param[in] pdu_mem_pP mem_block_t wrapper for a UM PDU .
|
* \param[in] pdu_mem_pP mem_block_t wrapper for a UM PDU .
|
||||||
* \param[in] pdu_pP Pointer on the header of the UM PDU.
|
* \param[in] pdu_pP Pointer on the header of the UM PDU.
|
||||||
* \param[in] tb_sizeP Size of the UM PDU.
|
* \param[in] tb_sizeP Size of the UM PDU.
|
||||||
*/
|
*/
|
||||||
protected_rlc_um_dar(void rlc_um_receive_process_dar (rlc_um_entity_t *rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP, mem_block_t *pdu_mem_pP,rlc_um_pdu_sn_10_t *pdu_pP, sdu_size_t tb_sizeP));
|
protected_rlc_um_dar(void rlc_um_receive_process_dar (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, mem_block_t * pdu_mem_pP,rlc_um_pdu_sn_10_t * const pdu_pP, const sdu_size_t tb_sizeP));
|
||||||
/** @} */
|
/** @} */
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
@@ -60,13 +60,13 @@ typedef struct rlc_um_timer_s {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct rlc_um_entity_s {
|
typedef struct rlc_um_entity_s {
|
||||||
module_id_t enb_module_id; /*!< \brief eNB Virtualization index for this protocol instance. */
|
//module_id_t enb_module_id; /*!< \brief eNB Virtualization index for this protocol instance. */
|
||||||
module_id_t ue_module_id; /*!< \brief UE Virtualization index for this protocol instance. */
|
//module_id_t ue_module_id; /*!< \brief UE Virtualization index for this protocol instance. */
|
||||||
boolean_t initialized; /*!< \brief Boolean for rlc_am_entity_t struct initialization. */
|
boolean_t initialized; /*!< \brief Boolean for rlc_am_entity_t struct initialization. */
|
||||||
boolean_t is_uplink_downlink; /*!< \brief Is this instance is a transmitter, a receiver or both? */
|
boolean_t is_uplink_downlink; /*!< \brief Is this instance is a transmitter, a receiver or both? */
|
||||||
rlc_protocol_state_t protocol_state; /*!< \brief Protocol state, can be RLC_NULL_STATE, RLC_DATA_TRANSFER_READY_STATE, RLC_LOCAL_SUSPEND_STATE. */
|
rlc_protocol_state_t protocol_state; /*!< \brief Protocol state, can be RLC_NULL_STATE, RLC_DATA_TRANSFER_READY_STATE, RLC_LOCAL_SUSPEND_STATE. */
|
||||||
boolean_t is_data_plane; /*!< \brief To know if the RLC belongs to a data radio bearer or a signalling radio bearer, for statistics and trace purpose. */
|
boolean_t is_data_plane; /*!< \brief To know if the RLC belongs to a data radio bearer or a signalling radio bearer, for statistics and trace purpose. */
|
||||||
boolean_t is_enb; /*!< \brief To know if the RLC belongs to a eNB or UE. */
|
//boolean_t is_enb; /*!< \brief To know if the RLC belongs to a eNB or UE. */
|
||||||
boolean_t is_mxch; /*!< \brief To know if the RLC belongs to a MBMS bearer. */
|
boolean_t is_mxch; /*!< \brief To know if the RLC belongs to a MBMS bearer. */
|
||||||
//-----------------------------
|
//-----------------------------
|
||||||
// PROTOCOL VARIABLES
|
// PROTOCOL VARIABLES
|
||||||
|
|||||||
@@ -38,7 +38,9 @@
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
int
|
int
|
||||||
rlc_um_fsm_notify_event (rlc_um_entity_t *rlc_pP, uint8_t eventP)
|
rlc_um_fsm_notify_event (
|
||||||
|
const protocol_ctxt_t* const ctxtP,
|
||||||
|
rlc_um_entity_t *rlc_pP, uint8_t eventP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -50,9 +52,9 @@ rlc_um_fsm_notify_event (rlc_um_entity_t *rlc_pP, uint8_t eventP)
|
|||||||
switch (eventP) {
|
switch (eventP) {
|
||||||
case RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_DATA_TRANSFER_READY_STATE_EVENT:
|
case RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_DATA_TRANSFER_READY_STATE_EVENT:
|
||||||
LOG_D(RLC, "[RLC_UM][%s][MOD %u/%u][RB %u] FSM RLC_NULL_STATE -> RLC_DATA_TRANSFER_READY_STATE\n",
|
LOG_D(RLC, "[RLC_UM][%s][MOD %u/%u][RB %u] FSM RLC_NULL_STATE -> RLC_DATA_TRANSFER_READY_STATE\n",
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
rlc_pP->protocol_state = RLC_DATA_TRANSFER_READY_STATE;
|
rlc_pP->protocol_state = RLC_DATA_TRANSFER_READY_STATE;
|
||||||
return 1;
|
return 1;
|
||||||
@@ -60,9 +62,9 @@ rlc_um_fsm_notify_event (rlc_um_entity_t *rlc_pP, uint8_t eventP)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_E(RLC, "[RLC_UM][%s][MOD %u/%u][RB %u] FSM WARNING PROTOCOL ERROR - EVENT %02X hex NOT EXPECTED FROM NULL_STATE\n",
|
LOG_E(RLC, "[RLC_UM][%s][MOD %u/%u][RB %u] FSM WARNING PROTOCOL ERROR - EVENT %02X hex NOT EXPECTED FROM NULL_STATE\n",
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
eventP);
|
eventP);
|
||||||
mac_xface->macphy_exit("RLC-UM FSM WARNING PROTOCOL ERROR - EVENT NOT EXPECTED FROM NULL_STATE");
|
mac_xface->macphy_exit("RLC-UM FSM WARNING PROTOCOL ERROR - EVENT NOT EXPECTED FROM NULL_STATE");
|
||||||
@@ -76,9 +78,9 @@ rlc_um_fsm_notify_event (rlc_um_entity_t *rlc_pP, uint8_t eventP)
|
|||||||
switch (eventP) {
|
switch (eventP) {
|
||||||
case RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_NULL_STATE_EVENT:
|
case RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_NULL_STATE_EVENT:
|
||||||
LOG_D(RLC, "[RLC_UM][%s][MOD %u/%u][RB %u] FSM RLC_DATA_TRANSFER_READY_STATE -> RLC_NULL_STATE\n",
|
LOG_D(RLC, "[RLC_UM][%s][MOD %u/%u][RB %u] FSM RLC_DATA_TRANSFER_READY_STATE -> RLC_NULL_STATE\n",
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
rlc_pP->protocol_state = RLC_NULL_STATE;
|
rlc_pP->protocol_state = RLC_NULL_STATE;
|
||||||
return 1;
|
return 1;
|
||||||
@@ -87,9 +89,9 @@ rlc_um_fsm_notify_event (rlc_um_entity_t *rlc_pP, uint8_t eventP)
|
|||||||
case RLC_UM_RECEIVE_CRLC_SUSPEND_REQ_EVENT:
|
case RLC_UM_RECEIVE_CRLC_SUSPEND_REQ_EVENT:
|
||||||
case RLC_UM_TRANSMIT_CRLC_SUSPEND_CNF_EVENT:
|
case RLC_UM_TRANSMIT_CRLC_SUSPEND_CNF_EVENT:
|
||||||
LOG_N(RLC, "[RLC_UM][%s][MOD %u/%u][RB %u] FSM RLC_DATA_TRANSFER_READY_STATE -> RLC_LOCAL_SUSPEND_STATE\n",
|
LOG_N(RLC, "[RLC_UM][%s][MOD %u/%u][RB %u] FSM RLC_DATA_TRANSFER_READY_STATE -> RLC_LOCAL_SUSPEND_STATE\n",
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
rlc_pP->protocol_state = RLC_LOCAL_SUSPEND_STATE;
|
rlc_pP->protocol_state = RLC_LOCAL_SUSPEND_STATE;
|
||||||
return 1;
|
return 1;
|
||||||
@@ -97,9 +99,9 @@ rlc_um_fsm_notify_event (rlc_um_entity_t *rlc_pP, uint8_t eventP)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_E(RLC, "[RLC_UM][%s][MOD %u/%u][RB %u] FSM WARNING PROTOCOL ERROR - EVENT %02X hex NOT EXPECTED FROM DATA_TRANSFER_READY_STATE\n",
|
LOG_E(RLC, "[RLC_UM][%s][MOD %u/%u][RB %u] FSM WARNING PROTOCOL ERROR - EVENT %02X hex NOT EXPECTED FROM DATA_TRANSFER_READY_STATE\n",
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
eventP);
|
eventP);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -112,9 +114,9 @@ rlc_um_fsm_notify_event (rlc_um_entity_t *rlc_pP, uint8_t eventP)
|
|||||||
switch (eventP) {
|
switch (eventP) {
|
||||||
case RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_NULL_STATE_EVENT:
|
case RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_NULL_STATE_EVENT:
|
||||||
LOG_N(RLC, "[RLC_UM][%s][MOD %u/%u][RB %u] FSM RLC_LOCAL_SUSPEND_STATE -> RLC_NULL_STATE\n",
|
LOG_N(RLC, "[RLC_UM][%s][MOD %u/%u][RB %u] FSM RLC_LOCAL_SUSPEND_STATE -> RLC_NULL_STATE\n",
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
rlc_pP->protocol_state = RLC_NULL_STATE;
|
rlc_pP->protocol_state = RLC_NULL_STATE;
|
||||||
return 1;
|
return 1;
|
||||||
@@ -122,9 +124,9 @@ rlc_um_fsm_notify_event (rlc_um_entity_t *rlc_pP, uint8_t eventP)
|
|||||||
|
|
||||||
case RLC_UM_RECEIVE_CRLC_RESUME_REQ_EVENT:
|
case RLC_UM_RECEIVE_CRLC_RESUME_REQ_EVENT:
|
||||||
LOG_N(RLC, "[RLC_UM][%s][MOD %u/%u][RB %u] FSM RLC_LOCAL_SUSPEND_STATE -> RLC_DATA_TRANSFER_READY_STATE\n",
|
LOG_N(RLC, "[RLC_UM][%s][MOD %u/%u][RB %u] FSM RLC_LOCAL_SUSPEND_STATE -> RLC_DATA_TRANSFER_READY_STATE\n",
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
rlc_pP->protocol_state = RLC_DATA_TRANSFER_READY_STATE;
|
rlc_pP->protocol_state = RLC_DATA_TRANSFER_READY_STATE;
|
||||||
return 1;
|
return 1;
|
||||||
@@ -132,9 +134,9 @@ rlc_um_fsm_notify_event (rlc_um_entity_t *rlc_pP, uint8_t eventP)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_E(RLC, "[RLC_UM][%s][MOD %u/%u][RB %u] FSM WARNING PROTOCOL ERROR - EVENT %02X hex NOT EXPECTED FROM RLC_LOCAL_SUSPEND_STATE\n",
|
LOG_E(RLC, "[RLC_UM][%s][MOD %u/%u][RB %u] FSM WARNING PROTOCOL ERROR - EVENT %02X hex NOT EXPECTED FROM RLC_LOCAL_SUSPEND_STATE\n",
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
eventP);
|
eventP);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -143,9 +145,9 @@ rlc_um_fsm_notify_event (rlc_um_entity_t *rlc_pP, uint8_t eventP)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_E(RLC, "[RLC_UM][%s][MOD %u/%u][RB %u] FSM ERROR UNKNOWN STATE %d\n",
|
LOG_E(RLC, "[RLC_UM][%s][MOD %u/%u][RB %u] FSM ERROR UNKNOWN STATE %d\n",
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->protocol_state);
|
rlc_pP->protocol_state);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -60,8 +60,9 @@
|
|||||||
# include "platform_types.h"
|
# include "platform_types.h"
|
||||||
# include "rlc_um_entity.h"
|
# include "rlc_um_entity.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
/*! \fn int rlc_um_fsm_notify_event (rlc_um_entity_t *rlcP, uint8_t eventP)
|
/*! \fn int rlc_um_fsm_notify_event (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP, uint8_t eventP)
|
||||||
* \brief Send an event to the RLC UM finite state machine.
|
* \brief Send an event to the RLC UM finite state machine.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlcP RLC UM protocol instance pointer.
|
* \param[in] rlcP RLC UM protocol instance pointer.
|
||||||
* \param[in] eventP Event (#RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_NULL_STATE_EVENT,
|
* \param[in] eventP Event (#RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_NULL_STATE_EVENT,
|
||||||
* #RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_DATA_TRANSFER_READY_STATE_EVENT,
|
* #RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_DATA_TRANSFER_READY_STATE_EVENT,
|
||||||
@@ -71,6 +72,6 @@
|
|||||||
* \return 1 if no error was encountered, 0 if the event was not processed.
|
* \return 1 if no error was encountered, 0 if the event was not processed.
|
||||||
* \Note This FSM is not LTE 9.3.0 compliant, it has to be modified or removed.
|
* \Note This FSM is not LTE 9.3.0 compliant, it has to be modified or removed.
|
||||||
*/
|
*/
|
||||||
protected_rlc_um_fsm(int rlc_um_fsm_notify_event (rlc_um_entity_t *rlcP, uint8_t eventP));
|
protected_rlc_um_fsm(int rlc_um_fsm_notify_event (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP, uint8_t eventP));
|
||||||
/** @} */
|
/** @} */
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
inline void
|
inline void
|
||||||
rlc_um_clear_rx_sdu (rlc_um_entity_t *rlc_pP)
|
rlc_um_clear_rx_sdu (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlc_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
rlc_pP->output_sdu_size_to_write = 0;
|
rlc_pP->output_sdu_size_to_write = 0;
|
||||||
@@ -56,16 +56,16 @@ rlc_um_clear_rx_sdu (rlc_um_entity_t *rlc_pP)
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rlc_um_reassembly (uint8_t * src_pP, int32_t lengthP, rlc_um_entity_t *rlc_pP, frame_t frameP)
|
rlc_um_reassembly (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlc_pP, uint8_t * src_pP, int32_t lengthP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
sdu_size_t sdu_max_size;
|
sdu_size_t sdu_max_size;
|
||||||
|
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u][REASSEMBLY] reassembly() %d bytes %d bytes already reassemblied\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u][REASSEMBLY] reassembly() %d bytes %d bytes already reassemblied\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
|
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
lengthP,
|
lengthP,
|
||||||
@@ -95,10 +95,10 @@ rlc_um_reassembly (uint8_t * src_pP, int32_t lengthP, rlc_um_entity_t *rlc_pP, f
|
|||||||
#ifdef TRACE_RLC_UM_DISPLAY_ASCII_DATA
|
#ifdef TRACE_RLC_UM_DISPLAY_ASCII_DATA
|
||||||
rlc_pP->output_sdu_in_construction->data[rlc_pP->output_sdu_size_to_write] = 0;
|
rlc_pP->output_sdu_in_construction->data[rlc_pP->output_sdu_size_to_write] = 0;
|
||||||
LOG_T(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u][REASSEMBLY] DATA :",
|
LOG_T(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u][REASSEMBLY] DATA :",
|
||||||
frameP
|
ctxtP->frame
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
|
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
rlc_util_print_hex_octets(RLC, (unsigned char*)rlc_pP->output_sdu_in_construction->data, rlc_pP->output_sdu_size_to_write);
|
rlc_util_print_hex_octets(RLC, (unsigned char*)rlc_pP->output_sdu_in_construction->data, rlc_pP->output_sdu_size_to_write);
|
||||||
@@ -106,18 +106,18 @@ rlc_um_reassembly (uint8_t * src_pP, int32_t lengthP, rlc_um_entity_t *rlc_pP, f
|
|||||||
} else {
|
} else {
|
||||||
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
|
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
|
||||||
AssertFatal(0, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u] RLC_UM_DATA_IND, SDU TOO BIG, DROPPED\n",
|
AssertFatal(0, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u] RLC_UM_DATA_IND, SDU TOO BIG, DROPPED\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
|
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
#endif
|
#endif
|
||||||
LOG_E(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u][REASSEMBLY] [max_sdu size %d] ERROR SDU SIZE OVERFLOW SDU GARBAGED\n",
|
LOG_E(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u][REASSEMBLY] [max_sdu size %d] ERROR SDU SIZE OVERFLOW SDU GARBAGED\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
|
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
sdu_max_size);
|
sdu_max_size);
|
||||||
@@ -126,18 +126,18 @@ rlc_um_reassembly (uint8_t * src_pP, int32_t lengthP, rlc_um_entity_t *rlc_pP, f
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_E(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u][REASSEMBLY]ERROR OUTPUT SDU IS NULL\n",
|
LOG_E(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u][REASSEMBLY]ERROR OUTPUT SDU IS NULL\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
|
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
|
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
|
||||||
AssertFatal(0, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u] RLC_UM_DATA_IND, SDU DROPPED, OUT OF MEMORY\n",
|
AssertFatal(0, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u] RLC_UM_DATA_IND, SDU DROPPED, OUT OF MEMORY\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
|
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
#endif
|
#endif
|
||||||
@@ -146,16 +146,16 @@ rlc_um_reassembly (uint8_t * src_pP, int32_t lengthP, rlc_um_entity_t *rlc_pP, f
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rlc_um_send_sdu (rlc_um_entity_t *rlc_pP,frame_t frameP, eNB_flag_t eNB_flagP)
|
rlc_um_send_sdu (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlc_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
if ((rlc_pP->output_sdu_in_construction)) {
|
if ((rlc_pP->output_sdu_in_construction)) {
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u] SEND_SDU to upper layers %d bytes sdu %p\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u] SEND_SDU to upper layers %d bytes sdu %p\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
|
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
rlc_pP->output_sdu_size_to_write,
|
rlc_pP->output_sdu_size_to_write,
|
||||||
@@ -168,22 +168,19 @@ rlc_um_send_sdu (rlc_um_entity_t *rlc_pP,frame_t frameP, eNB_flag_t eNB_flagP)
|
|||||||
#ifdef TRACE_RLC_UM_DISPLAY_ASCII_DATA
|
#ifdef TRACE_RLC_UM_DISPLAY_ASCII_DATA
|
||||||
rlc_pP->output_sdu_in_construction->data[rlc_pP->output_sdu_size_to_write] = 0;
|
rlc_pP->output_sdu_in_construction->data[rlc_pP->output_sdu_size_to_write] = 0;
|
||||||
LOG_T(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u][SEND_SDU] DATA :",
|
LOG_T(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u][SEND_SDU] DATA :",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
|
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
rlc_util_print_hex_octets(RLC, rlc_pP->output_sdu_in_construction->data, rlc_pP->output_sdu_size_to_write);
|
rlc_util_print_hex_octets(RLC, rlc_pP->output_sdu_in_construction->data, rlc_pP->output_sdu_size_to_write);
|
||||||
#endif
|
#endif
|
||||||
rlc_um_v9_3_0_test_data_ind (rlc_pP->module_id, rlc_pP->rb_id, rlc_pP->output_sdu_size_to_write, rlc_pP->output_sdu_in_construction);
|
rlc_um_v9_3_0_test_data_ind (rlc_pP->module_id, rlc_pP->rb_id, rlc_pP->output_sdu_size_to_write, rlc_pP->output_sdu_in_construction);
|
||||||
#else
|
#else
|
||||||
// msg("[RLC] DATA IND ON MOD_ID %d RB ID %d, size %d\n",rlc_pP->module_id, rlc_pP->rb_id, frameP,rlc_pP->output_sdu_size_to_write);
|
// msg("[RLC] DATA IND ON MOD_ID %d RB ID %d, size %d\n",rlc_pP->module_id, rlc_pP->rb_id, ctxtP->frame,rlc_pP->output_sdu_size_to_write);
|
||||||
rlc_data_ind (
|
rlc_data_ind (
|
||||||
rlc_pP->enb_module_id,
|
ctxtP,
|
||||||
rlc_pP->ue_module_id,
|
|
||||||
frameP,
|
|
||||||
eNB_flagP,
|
|
||||||
BOOL_NOT(rlc_pP->is_data_plane),
|
BOOL_NOT(rlc_pP->is_data_plane),
|
||||||
rlc_pP->is_mxch,
|
rlc_pP->is_mxch,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
@@ -193,10 +190,10 @@ rlc_um_send_sdu (rlc_um_entity_t *rlc_pP,frame_t frameP, eNB_flag_t eNB_flagP)
|
|||||||
rlc_pP->output_sdu_in_construction = NULL;
|
rlc_pP->output_sdu_in_construction = NULL;
|
||||||
} else {
|
} else {
|
||||||
LOG_E(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u][SEND_SDU] ERROR SIZE <= 0 ... DO NOTHING, SET SDU SIZE TO 0\n",
|
LOG_E(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u][SEND_SDU] ERROR SIZE <= 0 ... DO NOTHING, SET SDU SIZE TO 0\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
|
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,27 +59,27 @@
|
|||||||
# endif
|
# endif
|
||||||
# include "rlc_um_entity.h"
|
# include "rlc_um_entity.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
/*! \fn void rlc_um_clear_rx_sdu (rlc_um_entity_t *rlcP)
|
/*! \fn void rlc_um_clear_rx_sdu (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP)
|
||||||
* \brief Erase the SDU in construction.
|
* \brief Erase the SDU in construction.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlcP RLC UM protocol instance pointer.
|
* \param[in] rlcP RLC UM protocol instance pointer.
|
||||||
*/
|
*/
|
||||||
protected_rlc_um_reassembly(void rlc_um_clear_rx_sdu (rlc_um_entity_t *rlcP));
|
protected_rlc_um_reassembly(void rlc_um_clear_rx_sdu (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP));
|
||||||
|
|
||||||
/*! \fn void rlc_um_reassembly (uint8_t * srcP, int32_t lengthP, rlc_um_entity_t *rlcP, frame_t frame)
|
/*! \fn void rlc_um_reassembly (uint8_t * srcP, int32_t lengthP, rlc_um_entity_t *rlcP, frame_t frame)
|
||||||
* \brief Reassembly lengthP bytes to the end of the SDU in construction.
|
* \brief Reassembly lengthP bytes to the end of the SDU in construction.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
|
* \param[in] rlcP RLC UM protocol instance pointer.
|
||||||
* \param[in] srcP Pointer on data to be reassemblied.
|
* \param[in] srcP Pointer on data to be reassemblied.
|
||||||
* \param[in] lengthP Length to reassembly.
|
* \param[in] lengthP Length to reassembly.
|
||||||
* \param[in] rlcP RLC UM protocol instance pointer.
|
|
||||||
* \param[in] frame Frame index.
|
|
||||||
*/
|
*/
|
||||||
protected_rlc_um_reassembly(void rlc_um_reassembly (uint8_t * srcP, int32_t lengthP, rlc_um_entity_t *rlcP, frame_t frame));
|
protected_rlc_um_reassembly(void rlc_um_reassembly (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP, uint8_t * srcP, int32_t lengthP));
|
||||||
|
|
||||||
/*! \fn void rlc_um_send_sdu (rlc_um_entity_t *rlcP,frame_t frame,eNB_flag_t eNB_flagP)
|
/*! \fn void rlc_um_send_sdu (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP)
|
||||||
* \brief Send SDU if any reassemblied to upper layer.
|
* \brief Send SDU if any reassemblied to upper layer.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlcP RLC UM protocol instance pointer.
|
* \param[in] rlcP RLC UM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
* \param[in] eNB_flagP Boolean to know if rlcP is in eNB (1 or true), or in UE (0 or false).
|
|
||||||
*/
|
*/
|
||||||
protected_rlc_um_reassembly(void rlc_um_send_sdu (rlc_um_entity_t *rlcP,frame_t frameP,eNB_flag_t eNB_flagP));
|
protected_rlc_um_reassembly(void rlc_um_send_sdu (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP));
|
||||||
/** @} */
|
/** @} */
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
@@ -42,7 +42,11 @@
|
|||||||
//#define DEBUG_RLC_UM_RX 1
|
//#define DEBUG_RLC_UM_RX 1
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_um_display_rx_window(rlc_um_entity_t *rlc_pP)
|
void
|
||||||
|
rlc_um_display_rx_window(
|
||||||
|
const protocol_ctxt_t* const ctxtP,
|
||||||
|
rlc_um_entity_t * const rlc_pP
|
||||||
|
)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
unsigned long sn = 0;
|
unsigned long sn = 0;
|
||||||
@@ -103,7 +107,7 @@ void rlc_um_display_rx_window(rlc_um_entity_t *rlc_pP)
|
|||||||
strcpy(color, RLC_FG_COLOR_RED);
|
strcpy(color, RLC_FG_COLOR_RED);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rlc_um_get_pdu_from_dar_buffer(rlc_pP, sn)) {
|
if (rlc_um_get_pdu_from_dar_buffer(ctxtP, rlc_pP, sn)) {
|
||||||
// test RLC_REVERSE_VIDEO
|
// test RLC_REVERSE_VIDEO
|
||||||
if (str_index <= 2) str[str_index] = '.';
|
if (str_index <= 2) str[str_index] = '.';
|
||||||
LOG_T(RLC, "%s%s%s", color, RLC_REVERSE_VIDEO, str);
|
LOG_T(RLC, "%s%s%s", color, RLC_REVERSE_VIDEO, str);
|
||||||
@@ -119,7 +123,10 @@ void rlc_um_display_rx_window(rlc_um_entity_t *rlc_pP)
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rlc_um_receive (rlc_um_entity_t *rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP, struct mac_data_ind data_indP)
|
rlc_um_receive (
|
||||||
|
const protocol_ctxt_t* const ctxtP,
|
||||||
|
rlc_um_entity_t * const rlc_pP,
|
||||||
|
struct mac_data_ind data_indP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -136,7 +143,7 @@ rlc_um_receive (rlc_um_entity_t *rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP, s
|
|||||||
rlc_pP->stat_rx_data_pdu += 1;
|
rlc_pP->stat_rx_data_pdu += 1;
|
||||||
|
|
||||||
if (tb_size_in_bytes > 0) {
|
if (tb_size_in_bytes > 0) {
|
||||||
rlc_um_receive_process_dar (rlc_pP, frameP, eNB_flagP, tb_p, (rlc_um_pdu_sn_10_t *)first_byte_p, tb_size_in_bytes);
|
rlc_um_receive_process_dar (ctxtP, rlc_pP, tb_p, (rlc_um_pdu_sn_10_t *)first_byte_p, tb_size_in_bytes);
|
||||||
#if defined(DEBUG_RLC_UM_RX)
|
#if defined(DEBUG_RLC_UM_RX)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u] VR(UR)=%03d VR(UX)=%03d VR(UH)=%03d\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u] VR(UR)=%03d VR(UX)=%03d VR(UH)=%03d\n",
|
||||||
frameP,
|
frameP,
|
||||||
@@ -148,7 +155,7 @@ rlc_um_receive (rlc_um_entity_t *rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP, s
|
|||||||
rlc_pP->vr_ur,
|
rlc_pP->vr_ur,
|
||||||
rlc_pP->vr_ux,
|
rlc_pP->vr_ux,
|
||||||
rlc_pP->vr_uh);
|
rlc_pP->vr_uh);
|
||||||
//rlc_um_display_rx_window(rlc_pP); comented because bad display
|
//rlc_um_display_rx_window(rlc_pP); commented because bad display
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,19 +59,19 @@
|
|||||||
# include "rlc_um_entity.h"
|
# include "rlc_um_entity.h"
|
||||||
# include "mac_primitives.h"
|
# include "mac_primitives.h"
|
||||||
|
|
||||||
/*! \fn void rlc_um_display_rx_window(rlc_um_entity_t *rlc_pP)
|
/*! \fn void rlc_um_display_rx_window(const protocol_ctxt_t* const ctxtP,rlc_um_entity_t * const rlc_pP)
|
||||||
* \brief Display the content of the RX buffer, the output stream is targeted to TTY terminals because of escape sequences.
|
* \brief Display the content of the RX buffer, the output stream is targeted to TTY terminals because of escape sequences.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||||
*/
|
*/
|
||||||
protected_rlc_um_receiver( void rlc_um_display_rx_window(rlc_um_entity_t *rlc_pP);)
|
protected_rlc_um_receiver( void rlc_um_display_rx_window(const protocol_ctxt_t* const ctxtP, rlc_um_entity_t * const rlc_pP);)
|
||||||
|
|
||||||
/*! \fn void rlc_um_receive (rlc_um_entity_t *rlc_pP, frame_t frameP, struct mac_data_ind data_indP)
|
/*! \fn void rlc_um_receive (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t * const rlc_pP, struct mac_data_ind data_indP)
|
||||||
* \brief Handle the MAC data indication, retreive the transport blocks and send them one by one to the DAR process.
|
* \brief Handle the MAC data indication, retreive the transport blocks and send them one by one to the DAR process.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
* \param[in] rlc_pP RLC UM protocol instance pointer.
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
* \param[in] eNB_flagP Flag to indicated eNB (1) or UE (0).
|
|
||||||
* \param[in] data_indP Data indication structure containing transport block received from MAC layer.
|
* \param[in] data_indP Data indication structure containing transport block received from MAC layer.
|
||||||
*/
|
*/
|
||||||
protected_rlc_um_receiver( void rlc_um_receive (rlc_um_entity_t *rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP, struct mac_data_ind data_indP));
|
protected_rlc_um_receiver( void rlc_um_receive (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t * const rlc_pP, struct mac_data_ind data_indP));
|
||||||
/** @} */
|
/** @} */
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
//#define TRACE_RLC_UM_SEGMENT 1
|
//#define TRACE_RLC_UM_SEGMENT 1
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rlc_um_segment_10 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
rlc_um_segment_10 (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlc_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
list_t pdus;
|
list_t pdus;
|
||||||
@@ -79,10 +79,10 @@ rlc_um_segment_10 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
if (nb_bytes_to_transmit < 3) {
|
if (nb_bytes_to_transmit < 3) {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] NO SEGMENTATION nb_bytes to transmit = %d\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] NO SEGMENTATION nb_bytes to transmit = %d\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
nb_bytes_to_transmit);
|
nb_bytes_to_transmit);
|
||||||
#endif
|
#endif
|
||||||
@@ -90,10 +90,10 @@ rlc_um_segment_10 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
}
|
}
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
#endif
|
#endif
|
||||||
list_init (&pdus, NULL); // param string identifying the list is NULL
|
list_init (&pdus, NULL); // param string identifying the list is NULL
|
||||||
@@ -105,10 +105,10 @@ rlc_um_segment_10 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
|
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 nb_bytes_to_transmit %d BO %d\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 nb_bytes_to_transmit %d BO %d\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
nb_bytes_to_transmit,
|
nb_bytes_to_transmit,
|
||||||
rlc_pP->buffer_occupancy);
|
rlc_pP->buffer_occupancy);
|
||||||
@@ -124,10 +124,10 @@ rlc_um_segment_10 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
data_pdu_size = rlc_pP->buffer_occupancy + rlc_pP->tx_header_min_length_in_bytes + max_li_overhead;
|
data_pdu_size = rlc_pP->buffer_occupancy + rlc_pP->tx_header_min_length_in_bytes + max_li_overhead;
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 alloc PDU size %d bytes to contain not all bytes requested by MAC but all BO of RLC@1\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 alloc PDU size %d bytes to contain not all bytes requested by MAC but all BO of RLC@1\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
data_pdu_size);
|
data_pdu_size);
|
||||||
#endif
|
#endif
|
||||||
@@ -135,10 +135,10 @@ rlc_um_segment_10 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
data_pdu_size = nb_bytes_to_transmit;
|
data_pdu_size = nb_bytes_to_transmit;
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 alloc PDU size %d bytes to contain all bytes requested by MAC@1\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 alloc PDU size %d bytes to contain all bytes requested by MAC@1\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
data_pdu_size);
|
data_pdu_size);
|
||||||
#endif
|
#endif
|
||||||
@@ -146,10 +146,10 @@ rlc_um_segment_10 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
if (!(pdu_mem_p = get_free_mem_block (data_pdu_size + sizeof(struct mac_tb_req)))) {
|
if (!(pdu_mem_p = get_free_mem_block (data_pdu_size + sizeof(struct mac_tb_req)))) {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_E(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 ERROR COULD NOT GET NEW PDU, EXIT\n",
|
LOG_E(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 ERROR COULD NOT GET NEW PDU, EXIT\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
#endif
|
#endif
|
||||||
pthread_mutex_unlock(&rlc_pP->lock_input_sdus);
|
pthread_mutex_unlock(&rlc_pP->lock_input_sdus);
|
||||||
@@ -157,10 +157,10 @@ rlc_um_segment_10 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
}
|
}
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 get new PDU %d bytes\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 get new PDU %d bytes\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
data_pdu_size);
|
data_pdu_size);
|
||||||
#endif
|
#endif
|
||||||
@@ -219,10 +219,10 @@ rlc_um_segment_10 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
} else {
|
} else {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 sdu_mngt_p->sdu_remaining_size=%d test_pdu_remaining_size=%d test_li_length_in_bytes=%d\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 sdu_mngt_p->sdu_remaining_size=%d test_pdu_remaining_size=%d test_li_length_in_bytes=%d\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
sdu_mngt_p->sdu_remaining_size,
|
sdu_mngt_p->sdu_remaining_size,
|
||||||
test_pdu_remaining_size,
|
test_pdu_remaining_size,
|
||||||
@@ -248,10 +248,10 @@ rlc_um_segment_10 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
//----------------------------------------
|
//----------------------------------------
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] data shift %d Bytes num_li %d\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] data shift %d Bytes num_li %d\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
((test_num_li*3) +1) >> 1,
|
((test_num_li*3) +1) >> 1,
|
||||||
test_num_li);
|
test_num_li);
|
||||||
@@ -276,10 +276,10 @@ rlc_um_segment_10 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
if (sdu_mngt_p->sdu_segmented_size == 0) {
|
if (sdu_mngt_p->sdu_segmented_size == 0) {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 GET NEW SDU %p AVAILABLE SIZE %d Bytes\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 GET NEW SDU %p AVAILABLE SIZE %d Bytes\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
sdu_mngt_p,
|
sdu_mngt_p,
|
||||||
sdu_mngt_p->sdu_remaining_size);
|
sdu_mngt_p->sdu_remaining_size);
|
||||||
@@ -287,10 +287,10 @@ rlc_um_segment_10 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
} else {
|
} else {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 GET AGAIN SDU %p REMAINING AVAILABLE SIZE %d Bytes / %d Bytes \n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 GET AGAIN SDU %p REMAINING AVAILABLE SIZE %d Bytes / %d Bytes \n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
sdu_mngt_p,
|
sdu_mngt_p,
|
||||||
sdu_mngt_p->sdu_remaining_size,
|
sdu_mngt_p->sdu_remaining_size,
|
||||||
@@ -302,17 +302,17 @@ rlc_um_segment_10 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
if (sdu_mngt_p->sdu_remaining_size > pdu_remaining_size) {
|
if (sdu_mngt_p->sdu_remaining_size > pdu_remaining_size) {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 Filling all remaining PDU with %d bytes\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 Filling all remaining PDU with %d bytes\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
pdu_remaining_size);
|
pdu_remaining_size);
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 pdu_mem_p %p pdu_mem_p->data %p pdu_p %p pdu_p->data %p data %p data_sdu_p %p pdu_remaining_size %d\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 pdu_mem_p %p pdu_mem_p->data %p pdu_p %p pdu_p->data %p data %p data_sdu_p %p pdu_remaining_size %d\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
pdu_mem_p,
|
pdu_mem_p,
|
||||||
pdu_mem_p->data,
|
pdu_mem_p->data,
|
||||||
@@ -334,10 +334,10 @@ rlc_um_segment_10 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
} else if (sdu_mngt_p->sdu_remaining_size == pdu_remaining_size) {
|
} else if (sdu_mngt_p->sdu_remaining_size == pdu_remaining_size) {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 Exactly Filling remaining PDU with %d remaining bytes of SDU\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 Exactly Filling remaining PDU with %d remaining bytes of SDU\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
pdu_remaining_size);
|
pdu_remaining_size);
|
||||||
#endif
|
#endif
|
||||||
@@ -358,10 +358,10 @@ rlc_um_segment_10 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
} else if ((sdu_mngt_p->sdu_remaining_size + (li_length_in_bytes ^ 3)) < pdu_remaining_size ) {
|
} else if ((sdu_mngt_p->sdu_remaining_size + (li_length_in_bytes ^ 3)) < pdu_remaining_size ) {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 Filling PDU with %d all remaining bytes of SDU\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 Filling PDU with %d all remaining bytes of SDU\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
sdu_mngt_p->sdu_remaining_size);
|
sdu_mngt_p->sdu_remaining_size);
|
||||||
#endif
|
#endif
|
||||||
@@ -382,10 +382,10 @@ rlc_um_segment_10 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
e_li_p->b2 = sdu_mngt_p->sdu_remaining_size << 4;
|
e_li_p->b2 = sdu_mngt_p->sdu_remaining_size << 4;
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 set e_li_p->b1=%02X set e_li_p->b2=%02X fill_num_li=%d test_num_li=%d\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 set e_li_p->b1=%02X set e_li_p->b2=%02X fill_num_li=%d test_num_li=%d\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
e_li_p->b1,
|
e_li_p->b1,
|
||||||
e_li_p->b2,
|
e_li_p->b2,
|
||||||
@@ -402,10 +402,10 @@ rlc_um_segment_10 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
e_li_p->b3 = sdu_mngt_p->sdu_remaining_size & 0xFF;
|
e_li_p->b3 = sdu_mngt_p->sdu_remaining_size & 0xFF;
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 set e_li_p->b2=%02X set e_li_p->b3=%02X fill_num_li=%d test_num_li=%d\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 set e_li_p->b2=%02X set e_li_p->b3=%02X fill_num_li=%d test_num_li=%d\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
e_li_p->b2,
|
e_li_p->b2,
|
||||||
e_li_p->b3,
|
e_li_p->b3,
|
||||||
@@ -427,10 +427,10 @@ rlc_um_segment_10 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
} else {
|
} else {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 Filling PDU with %d all remaining bytes of SDU and reduce TB size by %d bytes\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT10 Filling PDU with %d all remaining bytes of SDU and reduce TB size by %d bytes\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
sdu_mngt_p->sdu_remaining_size,
|
sdu_mngt_p->sdu_remaining_size,
|
||||||
pdu_remaining_size - sdu_mngt_p->sdu_remaining_size);
|
pdu_remaining_size - sdu_mngt_p->sdu_remaining_size);
|
||||||
@@ -492,7 +492,7 @@ rlc_um_segment_10 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rlc_um_segment_5 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
rlc_um_segment_5 (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlc_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
list_t pdus;
|
list_t pdus;
|
||||||
@@ -526,10 +526,10 @@ rlc_um_segment_5 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
if (nb_bytes_to_transmit < 2) {
|
if (nb_bytes_to_transmit < 2) {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] NO SEGMENTATION5 nb_bytes to transmit = %d\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] NO SEGMENTATION5 nb_bytes to transmit = %d\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
nb_bytes_to_transmit);
|
nb_bytes_to_transmit);
|
||||||
#endif
|
#endif
|
||||||
@@ -537,10 +537,10 @@ rlc_um_segment_5 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
}
|
}
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
#endif
|
#endif
|
||||||
list_init (&pdus, NULL); // param string identifying the list is NULL
|
list_init (&pdus, NULL); // param string identifying the list is NULL
|
||||||
@@ -550,10 +550,10 @@ rlc_um_segment_5 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
while ((list_get_head(&rlc_pP->input_sdus)) && (nb_bytes_to_transmit > 0)) {
|
while ((list_get_head(&rlc_pP->input_sdus)) && (nb_bytes_to_transmit > 0)) {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 nb_bytes_to_transmit %d BO %d\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 nb_bytes_to_transmit %d BO %d\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
nb_bytes_to_transmit,
|
nb_bytes_to_transmit,
|
||||||
rlc_pP->buffer_occupancy);
|
rlc_pP->buffer_occupancy);
|
||||||
@@ -569,10 +569,10 @@ rlc_um_segment_5 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
data_pdu_size = rlc_pP->buffer_occupancy + rlc_pP->tx_header_min_length_in_bytes + max_li_overhead;
|
data_pdu_size = rlc_pP->buffer_occupancy + rlc_pP->tx_header_min_length_in_bytes + max_li_overhead;
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 alloc PDU size %d bytes to contain not all bytes requested by MAC but all BO of RLC@1\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 alloc PDU size %d bytes to contain not all bytes requested by MAC but all BO of RLC@1\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
data_pdu_size);
|
data_pdu_size);
|
||||||
#endif
|
#endif
|
||||||
@@ -580,10 +580,10 @@ rlc_um_segment_5 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
data_pdu_size = nb_bytes_to_transmit;
|
data_pdu_size = nb_bytes_to_transmit;
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 alloc PDU size %d bytes to contain all bytes requested by MAC@1\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 alloc PDU size %d bytes to contain all bytes requested by MAC@1\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
data_pdu_size);
|
data_pdu_size);
|
||||||
#endif
|
#endif
|
||||||
@@ -591,10 +591,10 @@ rlc_um_segment_5 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
if (!(pdu_mem_p = get_free_mem_block (data_pdu_size + sizeof(struct mac_tb_req)))) {
|
if (!(pdu_mem_p = get_free_mem_block (data_pdu_size + sizeof(struct mac_tb_req)))) {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_E(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 ERROR COULD NOT GET NEW PDU, EXIT\n",
|
LOG_E(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 ERROR COULD NOT GET NEW PDU, EXIT\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id);
|
rlc_pP->rb_id);
|
||||||
#endif
|
#endif
|
||||||
pthread_mutex_unlock(&rlc_pP->lock_input_sdus);
|
pthread_mutex_unlock(&rlc_pP->lock_input_sdus);
|
||||||
@@ -602,10 +602,10 @@ rlc_um_segment_5 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
}
|
}
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 get new PDU %d bytes\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 get new PDU %d bytes\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
data_pdu_size);
|
data_pdu_size);
|
||||||
#endif
|
#endif
|
||||||
@@ -665,10 +665,10 @@ rlc_um_segment_5 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
} else {
|
} else {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 sdu_mngt_p->sdu_remaining_size=%d test_pdu_remaining_size=%d test_li_length_in_bytes=%d\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 sdu_mngt_p->sdu_remaining_size=%d test_pdu_remaining_size=%d test_li_length_in_bytes=%d\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
sdu_mngt_p->sdu_remaining_size,
|
sdu_mngt_p->sdu_remaining_size,
|
||||||
test_pdu_remaining_size,
|
test_pdu_remaining_size,
|
||||||
@@ -695,10 +695,10 @@ rlc_um_segment_5 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
//----------------------------------------
|
//----------------------------------------
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] data shift %d Bytes num_li %d\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] data shift %d Bytes num_li %d\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
((test_num_li*3) +1) >> 1,
|
((test_num_li*3) +1) >> 1,
|
||||||
test_num_li);
|
test_num_li);
|
||||||
@@ -723,10 +723,10 @@ rlc_um_segment_5 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
if (sdu_mngt_p->sdu_segmented_size == 0) {
|
if (sdu_mngt_p->sdu_segmented_size == 0) {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 GET NEW SDU %p AVAILABLE SIZE %d Bytes\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 GET NEW SDU %p AVAILABLE SIZE %d Bytes\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
sdu_mngt_p,
|
sdu_mngt_p,
|
||||||
sdu_mngt_p->sdu_remaining_size);
|
sdu_mngt_p->sdu_remaining_size);
|
||||||
@@ -734,10 +734,10 @@ rlc_um_segment_5 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
} else {
|
} else {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 GET AGAIN SDU %p REMAINING AVAILABLE SIZE %d Bytes / %d Bytes \n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 GET AGAIN SDU %p REMAINING AVAILABLE SIZE %d Bytes / %d Bytes \n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
sdu_mngt_p,
|
sdu_mngt_p,
|
||||||
sdu_mngt_p->sdu_remaining_size,
|
sdu_mngt_p->sdu_remaining_size,
|
||||||
@@ -749,17 +749,17 @@ rlc_um_segment_5 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
if (sdu_mngt_p->sdu_remaining_size > pdu_remaining_size) {
|
if (sdu_mngt_p->sdu_remaining_size > pdu_remaining_size) {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 Filling all remaining PDU with %d bytes\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 Filling all remaining PDU with %d bytes\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
pdu_remaining_size);
|
pdu_remaining_size);
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 pdu_mem_p %p pdu_p %p pdu_p->data %p data %p data_sdu_p %p pdu_remaining_size %d\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 pdu_mem_p %p pdu_p %p pdu_p->data %p data %p data_sdu_p %p pdu_remaining_size %d\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
pdu_mem_p,
|
pdu_mem_p,
|
||||||
pdu_p,
|
pdu_p,
|
||||||
@@ -780,10 +780,10 @@ rlc_um_segment_5 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
} else if (sdu_mngt_p->sdu_remaining_size == pdu_remaining_size) {
|
} else if (sdu_mngt_p->sdu_remaining_size == pdu_remaining_size) {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 Exactly Filling remaining PDU with %d remaining bytes of SDU\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 Exactly Filling remaining PDU with %d remaining bytes of SDU\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
pdu_remaining_size);
|
pdu_remaining_size);
|
||||||
#endif
|
#endif
|
||||||
@@ -802,10 +802,10 @@ rlc_um_segment_5 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
} else if ((sdu_mngt_p->sdu_remaining_size + (li_length_in_bytes ^ 3)) < pdu_remaining_size ) {
|
} else if ((sdu_mngt_p->sdu_remaining_size + (li_length_in_bytes ^ 3)) < pdu_remaining_size ) {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 Filling PDU with %d all remaining bytes of SDU\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 Filling PDU with %d all remaining bytes of SDU\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
sdu_mngt_p->sdu_remaining_size);
|
sdu_mngt_p->sdu_remaining_size);
|
||||||
#endif
|
#endif
|
||||||
@@ -826,10 +826,10 @@ rlc_um_segment_5 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
e_li_p->b2 = sdu_mngt_p->sdu_remaining_size << 4;
|
e_li_p->b2 = sdu_mngt_p->sdu_remaining_size << 4;
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 set e_li_p->b1=%02X set e_li_p->b2=%02X fill_num_li=%d test_num_li=%d\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 set e_li_p->b1=%02X set e_li_p->b2=%02X fill_num_li=%d test_num_li=%d\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
e_li_p->b1,
|
e_li_p->b1,
|
||||||
e_li_p->b2,
|
e_li_p->b2,
|
||||||
@@ -846,10 +846,10 @@ rlc_um_segment_5 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
e_li_p->b3 = sdu_mngt_p->sdu_remaining_size & 0xFF;
|
e_li_p->b3 = sdu_mngt_p->sdu_remaining_size & 0xFF;
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 set e_li_p->b2=%02X set e_li_p->b3=%02X fill_num_li=%d test_num_li=%d\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 set e_li_p->b2=%02X set e_li_p->b3=%02X fill_num_li=%d test_num_li=%d\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
e_li_p->b2,
|
e_li_p->b2,
|
||||||
e_li_p->b3,
|
e_li_p->b3,
|
||||||
@@ -871,10 +871,10 @@ rlc_um_segment_5 (rlc_um_entity_t *rlc_pP,frame_t frameP)
|
|||||||
} else {
|
} else {
|
||||||
#if defined(TRACE_RLC_UM_SEGMENT)
|
#if defined(TRACE_RLC_UM_SEGMENT)
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 Filling PDU with %d all remaining bytes of SDU and reduce TB size by %d bytes\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][RB %u] SEGMENT5 Filling PDU with %d all remaining bytes of SDU and reduce TB size by %d bytes\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(rlc_pP->is_enb) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
rlc_pP->enb_module_id,
|
ctxtP->enb_module_id,
|
||||||
rlc_pP->ue_module_id,
|
ctxtP->ue_module_id,
|
||||||
rlc_pP->rb_id,
|
rlc_pP->rb_id,
|
||||||
sdu_mngt_p->sdu_remaining_size,
|
sdu_mngt_p->sdu_remaining_size,
|
||||||
pdu_remaining_size - sdu_mngt_p->sdu_remaining_size);
|
pdu_remaining_size - sdu_mngt_p->sdu_remaining_size);
|
||||||
|
|||||||
@@ -62,19 +62,19 @@
|
|||||||
# define public_rlc_um_segment(x) extern x
|
# define public_rlc_um_segment(x) extern x
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
/*! \fn void rlc_um_segment_10 (rlc_um_entity_t *rlcP,frame_t frame)
|
/*! \fn void rlc_um_segment_10 (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP)
|
||||||
* \brief Segmentation procedure with 10 bits sequence number, segment the first SDU in buffer and create a PDU of the size (nb_bytes_to_transmit) requested by MAC if possible and put it in the list "pdus_to_mac_layer".
|
* \brief Segmentation procedure with 10 bits sequence number, segment the first SDU in buffer and create a PDU of the size (nb_bytes_to_transmit) requested by MAC if possible and put it in the list "pdus_to_mac_layer".
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlcP RLC UM protocol instance pointer.
|
* \param[in] rlcP RLC UM protocol instance pointer.
|
||||||
* \param[in] frame Frame Index.
|
|
||||||
*/
|
*/
|
||||||
protected_rlc_um_segment(void rlc_um_segment_10 (rlc_um_entity_t *rlcP,frame_t frame));
|
protected_rlc_um_segment(void rlc_um_segment_10 (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP));
|
||||||
|
|
||||||
|
|
||||||
/*! \fn void rlc_um_segment_5 (rlc_um_entity_t *rlcP,frame_t frame)
|
/*! \fn void rlc_um_segment_5 (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP)
|
||||||
* \brief Segmentation procedure with 5 bits sequence number, segment the first SDU in buffer and create a PDU of the size (nb_bytes_to_transmit) requested by MAC if possible and put it in the list "pdus_to_mac_layer".
|
* \brief Segmentation procedure with 5 bits sequence number, segment the first SDU in buffer and create a PDU of the size (nb_bytes_to_transmit) requested by MAC if possible and put it in the list "pdus_to_mac_layer".
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlcP RLC UM protocol instance pointer.
|
* \param[in] rlcP RLC UM protocol instance pointer.
|
||||||
* \param[in] frame Frame Index.
|
|
||||||
*/
|
*/
|
||||||
protected_rlc_um_segment(void rlc_um_segment_5 (rlc_um_entity_t *rlcP,frame_t frame));
|
protected_rlc_um_segment(void rlc_um_segment_5 (const protocol_ctxt_t* const ctxtP, rlc_um_entity_t *rlcP));
|
||||||
/** @} */
|
/** @} */
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
+95
-111
@@ -44,10 +44,7 @@
|
|||||||
#include "assertions.h"
|
#include "assertions.h"
|
||||||
|
|
||||||
extern boolean_t pdcp_data_ind(
|
extern boolean_t pdcp_data_ind(
|
||||||
const module_id_t enb_mod_idP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const module_id_t ue_mod_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t enb_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const MBMS_flag_t MBMS_flagP,
|
const MBMS_flag_t MBMS_flagP,
|
||||||
const rb_id_t rb_idP,
|
const rb_id_t rb_idP,
|
||||||
@@ -102,10 +99,7 @@ void rlc_util_print_hex_octets(comp_name_t componentP, unsigned char* dataP, con
|
|||||||
#endif
|
#endif
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
rlc_op_status_t rlc_stat_req (
|
rlc_op_status_t rlc_stat_req (
|
||||||
const module_id_t enb_module_idP,
|
const protocol_ctxt_t* const ctxtP,
|
||||||
const module_id_t ue_module_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t enb_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const rb_id_t rb_idP,
|
const rb_id_t rb_idP,
|
||||||
unsigned int* stat_tx_pdcp_sdu,
|
unsigned int* stat_tx_pdcp_sdu,
|
||||||
@@ -142,32 +136,32 @@ rlc_op_status_t rlc_stat_req (
|
|||||||
hashtable_rc_t h_rc;
|
hashtable_rc_t h_rc;
|
||||||
|
|
||||||
#ifdef OAI_EMU
|
#ifdef OAI_EMU
|
||||||
if (enb_flagP) {
|
if (ctxtP->enb_flag) {
|
||||||
AssertFatal ((enb_module_idP >= oai_emulation.info.first_enb_local) && (oai_emulation.info.nb_enb_local > 0),
|
AssertFatal ((ctxtP->enb_module_id >= oai_emulation.info.first_enb_local) && (oai_emulation.info.nb_enb_local > 0),
|
||||||
"eNB module id is too low (%u/%d)!\n",
|
"eNB module id is too low (%u/%d)!\n",
|
||||||
enb_module_idP,
|
ctxtP->enb_module_id,
|
||||||
oai_emulation.info.first_enb_local);
|
oai_emulation.info.first_enb_local);
|
||||||
AssertFatal ((enb_module_idP < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local)) && (oai_emulation.info.nb_enb_local > 0),
|
AssertFatal ((ctxtP->enb_module_id < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local)) && (oai_emulation.info.nb_enb_local > 0),
|
||||||
"eNB module id is too high (%u/%d)!\n",
|
"eNB module id is too high (%u/%d)!\n",
|
||||||
enb_module_idP,
|
ctxtP->enb_module_id,
|
||||||
oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local);
|
oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local);
|
||||||
AssertFatal (ue_module_idP < NB_UE_INST,
|
AssertFatal (ctxtP->ue_module_id < NB_UE_INST,
|
||||||
"UE module id is too high (%u/%d)!\n",
|
"UE module id is too high (%u/%d)!\n",
|
||||||
ue_module_idP,
|
ctxtP->ue_module_id,
|
||||||
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
||||||
} else {
|
} else {
|
||||||
AssertFatal (ue_module_idP < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local),
|
AssertFatal (ctxtP->ue_module_id < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local),
|
||||||
"UE module id is too high (%u/%d)!\n",
|
"UE module id is too high (%u/%d)!\n",
|
||||||
ue_module_idP,
|
ctxtP->ue_module_id,
|
||||||
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
||||||
AssertFatal (ue_module_idP >= oai_emulation.info.first_ue_local,
|
AssertFatal (ctxtP->ue_module_id >= oai_emulation.info.first_ue_local,
|
||||||
"UE module id is too low (%u/%d)!\n",
|
"UE module id is too low (%u/%d)!\n",
|
||||||
ue_module_idP,
|
ctxtP->ue_module_id,
|
||||||
oai_emulation.info.first_ue_local);
|
oai_emulation.info.first_ue_local);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
AssertFatal (rb_idP < NB_RB_MAX, "RB id is too high (%u/%d)!\n", rb_idP, NB_RB_MAX);
|
AssertFatal (rb_idP < NB_RB_MAX, "RB id is too high (%u/%d)!\n", rb_idP, NB_RB_MAX);
|
||||||
key = RLC_COLL_KEY_VALUE(enb_module_idP, ue_module_idP, enb_flagP, rb_idP, srb_flagP);
|
key = RLC_COLL_KEY_VALUE(ctxtP->enb_module_id, ctxtP->ue_module_id, ctxtP->enb_flag, rb_idP, srb_flagP);
|
||||||
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
||||||
if (h_rc == HASH_TABLE_OK) {
|
if (h_rc == HASH_TABLE_OK) {
|
||||||
rlc_mode = rlc_union_p->mode;
|
rlc_mode = rlc_union_p->mode;
|
||||||
@@ -205,7 +199,8 @@ rlc_op_status_t rlc_stat_req (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case RLC_MODE_AM:
|
case RLC_MODE_AM:
|
||||||
rlc_am_stat_req(&rlc_union_p->rlc.am,
|
rlc_am_stat_req(ctxtP,
|
||||||
|
&rlc_union_p->rlc.am,
|
||||||
stat_tx_pdcp_sdu,
|
stat_tx_pdcp_sdu,
|
||||||
stat_tx_pdcp_bytes,
|
stat_tx_pdcp_bytes,
|
||||||
stat_tx_pdcp_sdu_discarded,
|
stat_tx_pdcp_sdu_discarded,
|
||||||
@@ -249,7 +244,8 @@ rlc_op_status_t rlc_stat_req (
|
|||||||
*stat_rx_data_bytes_out_of_window = 0;
|
*stat_rx_data_bytes_out_of_window = 0;
|
||||||
*stat_timer_poll_retransmit_timed_out = 0;
|
*stat_timer_poll_retransmit_timed_out = 0;
|
||||||
*stat_timer_status_prohibit_timed_out = 0;
|
*stat_timer_status_prohibit_timed_out = 0;
|
||||||
rlc_um_stat_req (&rlc_union_p->rlc.um,
|
rlc_um_stat_req (ctxtP,
|
||||||
|
&rlc_union_p->rlc.um,
|
||||||
stat_tx_pdcp_sdu,
|
stat_tx_pdcp_sdu,
|
||||||
stat_tx_pdcp_bytes,
|
stat_tx_pdcp_bytes,
|
||||||
stat_tx_pdcp_sdu_discarded,
|
stat_tx_pdcp_sdu_discarded,
|
||||||
@@ -334,10 +330,7 @@ rlc_op_status_t rlc_stat_req (
|
|||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
rlc_op_status_t rlc_data_req (const module_id_t enb_module_idP,
|
rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxtP,
|
||||||
const module_id_t ue_module_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t enb_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const MBMS_flag_t MBMS_flagP,
|
const MBMS_flag_t MBMS_flagP,
|
||||||
const rb_id_t rb_idP,
|
const rb_id_t rb_idP,
|
||||||
@@ -358,9 +351,9 @@ rlc_op_status_t rlc_data_req (const module_id_t enb_module_idP,
|
|||||||
#endif
|
#endif
|
||||||
#ifdef DEBUG_RLC_DATA_REQ
|
#ifdef DEBUG_RLC_DATA_REQ
|
||||||
LOG_D(RLC,"rlc_data_req: %s enb id %u ue id %u, rb_id %u (MAX %d), muip %d, confirmP %d, sud_sizeP %d, sdu_pP %p\n",
|
LOG_D(RLC,"rlc_data_req: %s enb id %u ue id %u, rb_id %u (MAX %d), muip %d, confirmP %d, sud_sizeP %d, sdu_pP %p\n",
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_module_idP,
|
ctxtP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxtP->ue_module_id,
|
||||||
rb_idP,
|
rb_idP,
|
||||||
NB_RAB_MAX,
|
NB_RAB_MAX,
|
||||||
muiP,
|
muiP,
|
||||||
@@ -373,27 +366,27 @@ rlc_op_status_t rlc_data_req (const module_id_t enb_module_idP,
|
|||||||
AssertFatal(MBMS_flagP == 0, "MBMS_flagP %u", MBMS_flagP);
|
AssertFatal(MBMS_flagP == 0, "MBMS_flagP %u", MBMS_flagP);
|
||||||
#endif
|
#endif
|
||||||
#ifdef OAI_EMU
|
#ifdef OAI_EMU
|
||||||
if (enb_flagP) {
|
if (ctxtP->enb_flag) {
|
||||||
AssertFatal ((enb_module_idP >= oai_emulation.info.first_enb_local) && (oai_emulation.info.nb_enb_local > 0),
|
AssertFatal ((ctxtP->enb_module_id >= oai_emulation.info.first_enb_local) && (oai_emulation.info.nb_enb_local > 0),
|
||||||
"eNB module id is too low (%u/%d)!\n",
|
"eNB module id is too low (%u/%d)!\n",
|
||||||
enb_module_idP,
|
ctxtP->enb_module_id,
|
||||||
oai_emulation.info.first_enb_local);
|
oai_emulation.info.first_enb_local);
|
||||||
AssertFatal ((enb_module_idP < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local)) && (oai_emulation.info.nb_enb_local > 0),
|
AssertFatal ((ctxtP->enb_module_id < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local)) && (oai_emulation.info.nb_enb_local > 0),
|
||||||
"eNB module id is too high (%u/%d)!\n",
|
"eNB module id is too high (%u/%d)!\n",
|
||||||
enb_module_idP,
|
ctxtP->enb_module_id,
|
||||||
oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local);
|
oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local);
|
||||||
AssertFatal (ue_module_idP < NB_UE_INST,
|
AssertFatal (ctxtP->ue_module_id < NB_UE_INST,
|
||||||
"UE module id is too high (%u/%d)!\n",
|
"UE module id is too high (%u/%d)!\n",
|
||||||
ue_module_idP,
|
ctxtP->ue_module_id,
|
||||||
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
||||||
} else {
|
} else {
|
||||||
AssertFatal (ue_module_idP < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local),
|
AssertFatal (ctxtP->ue_module_id < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local),
|
||||||
"UE module id is too high (%u/%d)!\n",
|
"UE module id is too high (%u/%d)!\n",
|
||||||
ue_module_idP,
|
ctxtP->ue_module_id,
|
||||||
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
||||||
AssertFatal (ue_module_idP >= oai_emulation.info.first_ue_local,
|
AssertFatal (ctxtP->ue_module_id >= oai_emulation.info.first_ue_local,
|
||||||
"UE module id is too low (%u/%d)!\n",
|
"UE module id is too low (%u/%d)!\n",
|
||||||
ue_module_idP,
|
ctxtP->ue_module_id,
|
||||||
oai_emulation.info.first_ue_local);
|
oai_emulation.info.first_ue_local);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -413,18 +406,18 @@ rlc_op_status_t rlc_data_req (const module_id_t enb_module_idP,
|
|||||||
|
|
||||||
#ifdef Rel10
|
#ifdef Rel10
|
||||||
if (MBMS_flagP == TRUE) {
|
if (MBMS_flagP == TRUE) {
|
||||||
if (enb_flagP) {
|
if (ctxtP->enb_flag) {
|
||||||
log_ch_id = rlc_mbms_enb_get_lcid_by_rb_id(enb_module_idP,rb_idP);
|
log_ch_id = rlc_mbms_enb_get_lcid_by_rb_id(ctxtP->enb_module_id,rb_idP);
|
||||||
mbms_id_p = &rlc_mbms_lcid2service_session_id_eNB[enb_module_idP][log_ch_id];
|
mbms_id_p = &rlc_mbms_lcid2service_session_id_eNB[ctxtP->enb_module_id][log_ch_id];
|
||||||
} else {
|
} else {
|
||||||
log_ch_id = rlc_mbms_ue_get_lcid_by_rb_id(ue_module_idP,rb_idP);
|
log_ch_id = rlc_mbms_ue_get_lcid_by_rb_id(ctxtP->ue_module_id,rb_idP);
|
||||||
mbms_id_p = &rlc_mbms_lcid2service_session_id_ue[ue_module_idP][log_ch_id];
|
mbms_id_p = &rlc_mbms_lcid2service_session_id_ue[ctxtP->ue_module_id][log_ch_id];
|
||||||
}
|
}
|
||||||
key = RLC_COLL_KEY_MBMS_VALUE(enb_module_idP, ue_module_idP, enb_flagP, mbms_id_p->service_id, mbms_id_p->session_id);
|
key = RLC_COLL_KEY_MBMS_VALUE(ctxtP->enb_module_id, ctxtP->ue_module_id, ctxtP->enb_flag, mbms_id_p->service_id, mbms_id_p->session_id);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
key = RLC_COLL_KEY_VALUE(enb_module_idP, ue_module_idP, enb_flagP, rb_idP, srb_flagP);
|
key = RLC_COLL_KEY_VALUE(ctxtP->enb_module_id, ctxtP->ue_module_id, ctxtP->enb_flag, rb_idP, srb_flagP);
|
||||||
}
|
}
|
||||||
|
|
||||||
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
||||||
@@ -437,10 +430,10 @@ rlc_op_status_t rlc_data_req (const module_id_t enb_module_idP,
|
|||||||
|
|
||||||
if (MBMS_flagP == 0) {
|
if (MBMS_flagP == 0) {
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC][INST %u/%u][RB %u] Display of rlc_data_req:\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC][INST %u/%u][RB %u] Display of rlc_data_req:\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_module_idP,
|
ctxtP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxtP->ue_module_id,
|
||||||
rb_idP);
|
rb_idP);
|
||||||
#if defined(DEBUG_RLC_PAYLOAD)
|
#if defined(DEBUG_RLC_PAYLOAD)
|
||||||
rlc_util_print_hex_octets(RLC, (unsigned char*)sdu_pP->data, sdu_sizeP);
|
rlc_util_print_hex_octets(RLC, (unsigned char*)sdu_pP->data, sdu_sizeP);
|
||||||
@@ -453,9 +446,9 @@ rlc_op_status_t rlc_data_req (const module_id_t enb_module_idP,
|
|||||||
case RLC_MODE_NONE:
|
case RLC_MODE_NONE:
|
||||||
free_mem_block(sdu_pP);
|
free_mem_block(sdu_pP);
|
||||||
LOG_E(RLC, "Received RLC_MODE_NONE as rlc_type for %s eNB id %u, ue id %u, rb_id %u\n",
|
LOG_E(RLC, "Received RLC_MODE_NONE as rlc_type for %s eNB id %u, ue id %u, rb_id %u\n",
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_module_idP,
|
ctxtP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxtP->ue_module_id,
|
||||||
rb_idP);
|
rb_idP);
|
||||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
||||||
return RLC_OP_STATUS_BAD_PARAMETER;
|
return RLC_OP_STATUS_BAD_PARAMETER;
|
||||||
@@ -479,20 +472,20 @@ rlc_op_status_t rlc_data_req (const module_id_t enb_module_idP,
|
|||||||
LOG_D(RLC, "%s\n",RLC_FG_BRIGHT_COLOR_RED);
|
LOG_D(RLC, "%s\n",RLC_FG_BRIGHT_COLOR_RED);
|
||||||
|
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][%s][INST %u/%u][%s %u][--- RLC_AM_DATA_REQ/%d Bytes --->][RLC_AM][INST %u/%u][%s %u]\n",
|
LOG_D(RLC, "[FRAME %5u][%s][%s][INST %u/%u][%s %u][--- RLC_AM_DATA_REQ/%d Bytes --->][RLC_AM][INST %u/%u][%s %u]\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
(srb_flagP) ? "RRC" : "PDCP",
|
(srb_flagP) ? "RRC" : "PDCP",
|
||||||
enb_module_idP,
|
ctxtP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxtP->ue_module_id,
|
||||||
(srb_flagP) ? "SRB" : "DRB",
|
(srb_flagP) ? "SRB" : "DRB",
|
||||||
rb_idP,
|
rb_idP,
|
||||||
sdu_sizeP,
|
sdu_sizeP,
|
||||||
enb_module_idP,
|
ctxtP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxtP->ue_module_id,
|
||||||
(srb_flagP) ? "SRB" : "DRB",
|
(srb_flagP) ? "SRB" : "DRB",
|
||||||
rb_idP);
|
rb_idP);
|
||||||
LOG_D(RLC, "%s\n",RLC_FG_COLOR_DEFAULT);
|
LOG_D(RLC, "%s\n",RLC_FG_COLOR_DEFAULT);
|
||||||
rlc_am_data_req(&rlc_union_p->rlc.am, frameP, new_sdu_p);
|
rlc_am_data_req(ctxtP, &rlc_union_p->rlc.am, new_sdu_p);
|
||||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
||||||
return RLC_OP_STATUS_OK;
|
return RLC_OP_STATUS_OK;
|
||||||
} else {
|
} else {
|
||||||
@@ -515,20 +508,20 @@ rlc_op_status_t rlc_data_req (const module_id_t enb_module_idP,
|
|||||||
|
|
||||||
//LOG_D(RLC, "%s\n",RLC_FG_BRIGHT_COLOR_RED);
|
//LOG_D(RLC, "%s\n",RLC_FG_BRIGHT_COLOR_RED);
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][%s][INST %u/%u][%s %u][--- RLC_UM_DATA_REQ/%d Bytes --->][RLC_UM][INST %u/%u][%s %u]\n",
|
LOG_D(RLC, "[FRAME %5u][%s][%s][INST %u/%u][%s %u][--- RLC_UM_DATA_REQ/%d Bytes --->][RLC_UM][INST %u/%u][%s %u]\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
(srb_flagP) ? "RRC" : "PDCP",
|
(srb_flagP) ? "RRC" : "PDCP",
|
||||||
enb_module_idP,
|
ctxtP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxtP->ue_module_id,
|
||||||
(srb_flagP) ? "SRB" : "DRB",
|
(srb_flagP) ? "SRB" : "DRB",
|
||||||
rb_idP,
|
rb_idP,
|
||||||
sdu_sizeP,
|
sdu_sizeP,
|
||||||
enb_module_idP,
|
ctxtP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxtP->ue_module_id,
|
||||||
(srb_flagP) ? "SRB" : "DRB",
|
(srb_flagP) ? "SRB" : "DRB",
|
||||||
rb_idP);
|
rb_idP);
|
||||||
//LOG_D(RLC, "%s\n",RLC_FG_COLOR_DEFAULT);
|
//LOG_D(RLC, "%s\n",RLC_FG_COLOR_DEFAULT);
|
||||||
rlc_um_data_req(&rlc_union_p->rlc.um, frameP, new_sdu_p);
|
rlc_um_data_req(ctxtP, &rlc_union_p->rlc.um, new_sdu_p);
|
||||||
|
|
||||||
//free_mem_block(new_sdu);
|
//free_mem_block(new_sdu);
|
||||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
||||||
@@ -552,20 +545,20 @@ rlc_op_status_t rlc_data_req (const module_id_t enb_module_idP,
|
|||||||
free_mem_block(sdu_pP);
|
free_mem_block(sdu_pP);
|
||||||
LOG_D(RLC, "%s\n",RLC_FG_BRIGHT_COLOR_RED);
|
LOG_D(RLC, "%s\n",RLC_FG_BRIGHT_COLOR_RED);
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][%s][INST %u/%u][%s %u][--- RLC_TM_DATA_REQ/%d Bytes --->][RLC_TM][INST %u/%u][%s %u]\n",
|
LOG_D(RLC, "[FRAME %5u][%s][%s][INST %u/%u][%s %u][--- RLC_TM_DATA_REQ/%d Bytes --->][RLC_TM][INST %u/%u][%s %u]\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
(srb_flagP) ? "RRC" : "PDCP",
|
(srb_flagP) ? "RRC" : "PDCP",
|
||||||
enb_module_idP,
|
ctxtP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxtP->ue_module_id,
|
||||||
(srb_flagP) ? "SRB" : "DRB",
|
(srb_flagP) ? "SRB" : "DRB",
|
||||||
rb_idP,
|
rb_idP,
|
||||||
sdu_sizeP,
|
sdu_sizeP,
|
||||||
enb_module_idP,
|
ctxtP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxtP->ue_module_id,
|
||||||
(srb_flagP) ? "SRB" : "DRB",
|
(srb_flagP) ? "SRB" : "DRB",
|
||||||
rb_idP);
|
rb_idP);
|
||||||
LOG_D(RLC, "%s\n",RLC_FG_COLOR_DEFAULT);
|
LOG_D(RLC, "%s\n",RLC_FG_COLOR_DEFAULT);
|
||||||
rlc_tm_data_req(&rlc_union_p->rlc.tm, new_sdu_p);
|
rlc_tm_data_req(ctxtP, &rlc_union_p->rlc.tm, new_sdu_p);
|
||||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
||||||
return RLC_OP_STATUS_OK;
|
return RLC_OP_STATUS_OK;
|
||||||
} else {
|
} else {
|
||||||
@@ -598,18 +591,18 @@ rlc_op_status_t rlc_data_req (const module_id_t enb_module_idP,
|
|||||||
free_mem_block(sdu_pP);
|
free_mem_block(sdu_pP);
|
||||||
LOG_D(RLC, "%s\n",RLC_FG_BRIGHT_COLOR_RED);
|
LOG_D(RLC, "%s\n",RLC_FG_BRIGHT_COLOR_RED);
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][%s][INST %u/%u][RB %u][--- RLC_UM_DATA_REQ/%d Bytes (MBMS) --->][RLC_UM][INST %u/%u][RB %u]\n",
|
LOG_D(RLC, "[FRAME %5u][%s][%s][INST %u/%u][RB %u][--- RLC_UM_DATA_REQ/%d Bytes (MBMS) --->][RLC_UM][INST %u/%u][RB %u]\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
(srb_flagP) ? "RRC" : "PDCP",
|
(srb_flagP) ? "RRC" : "PDCP",
|
||||||
enb_module_idP,
|
ctxtP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxtP->ue_module_id,
|
||||||
rb_idP,
|
rb_idP,
|
||||||
sdu_sizeP,
|
sdu_sizeP,
|
||||||
enb_module_idP,
|
ctxtP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxtP->ue_module_id,
|
||||||
rb_idP);
|
rb_idP);
|
||||||
LOG_D(RLC, "%s\n",RLC_FG_COLOR_DEFAULT);
|
LOG_D(RLC, "%s\n",RLC_FG_COLOR_DEFAULT);
|
||||||
rlc_um_data_req(&rlc_union_p->rlc.um, frameP, new_sdu_p);
|
rlc_um_data_req(ctxtP, &rlc_union_p->rlc.um, new_sdu_p);
|
||||||
|
|
||||||
//free_mem_block(new_sdu);
|
//free_mem_block(new_sdu);
|
||||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
||||||
@@ -640,10 +633,7 @@ rlc_op_status_t rlc_data_req (const module_id_t enb_module_idP,
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_data_ind (
|
void rlc_data_ind (
|
||||||
const module_id_t enb_module_idP,
|
const protocol_ctxt_t* const ctxtP,
|
||||||
const module_id_t ue_module_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t enb_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const MBMS_flag_t MBMS_flagP,
|
const MBMS_flag_t MBMS_flagP,
|
||||||
const rb_id_t rb_idP,
|
const rb_id_t rb_idP,
|
||||||
@@ -654,10 +644,10 @@ void rlc_data_ind (
|
|||||||
|
|
||||||
#if defined(DEBUG_RLC_PAYLOAD)
|
#if defined(DEBUG_RLC_PAYLOAD)
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC][INST %u/%u][%s %u] Display of rlc_data_ind: size %u\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC][INST %u/%u][%s %u] Display of rlc_data_ind: size %u\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_module_idP,
|
ctxtP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxtP->ue_module_id,
|
||||||
(srb_flagP) ? "SRB" : "DRB",
|
(srb_flagP) ? "SRB" : "DRB",
|
||||||
rb_idP,
|
rb_idP,
|
||||||
sdu_sizeP);
|
sdu_sizeP);
|
||||||
@@ -665,23 +655,20 @@ void rlc_data_ind (
|
|||||||
rlc_util_print_hex_octets(RLC, (unsigned char*)sdu_pP->data, sdu_sizeP);
|
rlc_util_print_hex_octets(RLC, (unsigned char*)sdu_pP->data, sdu_sizeP);
|
||||||
#endif
|
#endif
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC][INST %u/%u][%s %u][--- RLC_DATA_IND/%d Bytes --->][PDCP][INST %u/%u][%s %u]\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC][INST %u/%u][%s %u][--- RLC_DATA_IND/%d Bytes --->][PDCP][INST %u/%u][%s %u]\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_module_idP,
|
ctxtP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxtP->ue_module_id,
|
||||||
(srb_flagP) ? "SRB" : "DRB",
|
(srb_flagP) ? "SRB" : "DRB",
|
||||||
rb_idP,
|
rb_idP,
|
||||||
sdu_sizeP,
|
sdu_sizeP,
|
||||||
enb_module_idP,
|
ctxtP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxtP->ue_module_id,
|
||||||
(srb_flagP) ? "SRB" : "DRB",
|
(srb_flagP) ? "SRB" : "DRB",
|
||||||
rb_idP);
|
rb_idP);
|
||||||
|
|
||||||
pdcp_data_ind (
|
pdcp_data_ind (
|
||||||
enb_module_idP,
|
ctxtP,
|
||||||
ue_module_idP,
|
|
||||||
frameP,
|
|
||||||
enb_flagP,
|
|
||||||
srb_flagP,
|
srb_flagP,
|
||||||
MBMS_flagP,
|
MBMS_flagP,
|
||||||
rb_idP,
|
rb_idP,
|
||||||
@@ -689,10 +676,7 @@ void rlc_data_ind (
|
|||||||
sdu_pP);
|
sdu_pP);
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_data_conf (const module_id_t enb_module_idP,
|
void rlc_data_conf (const protocol_ctxt_t* const ctxtP,
|
||||||
const module_id_t ue_module_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t enb_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const rb_id_t rb_idP,
|
const rb_id_t rb_idP,
|
||||||
const mui_t muiP,
|
const mui_t muiP,
|
||||||
@@ -703,20 +687,20 @@ void rlc_data_conf (const module_id_t enb_module_idP,
|
|||||||
if (rlc_rrc_data_conf != NULL) {
|
if (rlc_rrc_data_conf != NULL) {
|
||||||
LOG_D(RLC, "%s\n",RLC_FG_BRIGHT_COLOR_RED);
|
LOG_D(RLC, "%s\n",RLC_FG_BRIGHT_COLOR_RED);
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][INST %u/%u][%s %u][--- RLC_DATA_CONF /MUI %d --->][%s][INST %u/%u][][RLC_DATA_CONF/ MUI %d]\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][INST %u/%u][%s %u][--- RLC_DATA_CONF /MUI %d --->][%s][INST %u/%u][][RLC_DATA_CONF/ MUI %d]\n",
|
||||||
frameP,
|
ctxtP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxtP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_module_idP,
|
ctxtP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxtP->ue_module_id,
|
||||||
(srb_flagP) ? "SRB" : "DRB",
|
(srb_flagP) ? "SRB" : "DRB",
|
||||||
rb_idP,
|
rb_idP,
|
||||||
muiP,
|
muiP,
|
||||||
(srb_flagP) ? "RRC" : "PDCP",
|
(srb_flagP) ? "RRC" : "PDCP",
|
||||||
enb_module_idP,
|
ctxtP->enb_module_id,
|
||||||
ue_module_idP,
|
ctxtP->ue_module_id,
|
||||||
muiP);
|
muiP);
|
||||||
|
|
||||||
LOG_D(RLC, "%s\n",RLC_FG_COLOR_DEFAULT);
|
LOG_D(RLC, "%s\n",RLC_FG_COLOR_DEFAULT);
|
||||||
rlc_rrc_data_conf (enb_module_idP , ue_module_idP, enb_flagP, rb_idP , muiP, statusP);
|
rlc_rrc_data_conf (ctxtP, rb_idP , muiP, statusP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+43
-111
@@ -151,7 +151,7 @@ typedef struct {
|
|||||||
rlc_buffer_occupancy_t pdus_in_buffer; /*!< \brief Number of PDUs buffered in RLC protocol instance (OBSOLETE). */
|
rlc_buffer_occupancy_t pdus_in_buffer; /*!< \brief Number of PDUs buffered in RLC protocol instance (OBSOLETE). */
|
||||||
frame_t head_sdu_creation_time; /*!< \brief Head SDU creation time. */
|
frame_t head_sdu_creation_time; /*!< \brief Head SDU creation time. */
|
||||||
sdu_size_t head_sdu_remaining_size_to_send; /*!< \brief remaining size of sdu: could be the total size or the remaining size of already segmented sdu */
|
sdu_size_t head_sdu_remaining_size_to_send; /*!< \brief remaining size of sdu: could be the total size or the remaining size of already segmented sdu */
|
||||||
boolean_t head_sdu_is_segmented; /*!< \brief 0 if head SDU has not been segmented, 1 if already segmeneted */
|
boolean_t head_sdu_is_segmented; /*!< \brief 0 if head SDU has not been segmented, 1 if already segmented */
|
||||||
} mac_rlc_status_resp_t;
|
} mac_rlc_status_resp_t;
|
||||||
|
|
||||||
|
|
||||||
@@ -168,6 +168,8 @@ typedef struct {
|
|||||||
} dummy;
|
} dummy;
|
||||||
} mac_rlc_max_rx_header_size_t;
|
} mac_rlc_max_rx_header_size_t;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// PRIVATE INTERNALS OF RLC
|
// PRIVATE INTERNALS OF RLC
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -176,35 +178,25 @@ typedef struct {
|
|||||||
#define RLC_MAX_LC ((max_val_DRB_Identity+1)* NUMBER_OF_UE_MAX)
|
#define RLC_MAX_LC ((max_val_DRB_Identity+1)* NUMBER_OF_UE_MAX)
|
||||||
|
|
||||||
protected_rlc(void (*rlc_rrc_data_ind)(
|
protected_rlc(void (*rlc_rrc_data_ind)(
|
||||||
const module_id_t eNB_inst,
|
const protocol_ctxt_t* const ctxtP,
|
||||||
const module_id_t UE_inst,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const rb_id_t rb_idP,
|
const rb_id_t rb_idP,
|
||||||
const sdu_size_t sdu_sizeP,
|
const sdu_size_t sdu_sizeP,
|
||||||
uint8_t * const sduP);)
|
uint8_t * const sduP);)
|
||||||
|
|
||||||
protected_rlc(void (*rlc_rrc_data_conf)(
|
protected_rlc(void (*rlc_rrc_data_conf)(
|
||||||
const module_id_t eNB_inst,
|
const protocol_ctxt_t* const ctxtP,
|
||||||
const module_id_t UE_inst,
|
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const rb_id_t rb_idP,
|
const rb_id_t rb_idP,
|
||||||
const mui_t muiP,
|
const mui_t muiP,
|
||||||
const rlc_tx_status_t statusP);)
|
const rlc_tx_status_t statusP);)
|
||||||
|
|
||||||
typedef void (rrc_data_ind_cb_t)(
|
typedef void (rrc_data_ind_cb_t)(
|
||||||
const module_id_t eNB_inst,
|
const protocol_ctxt_t* const ctxtP,
|
||||||
const module_id_t UE_inst,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const rb_id_t rb_idP,
|
const rb_id_t rb_idP,
|
||||||
const sdu_size_t sdu_sizeP,
|
const sdu_size_t sdu_sizeP,
|
||||||
uint8_t * const sduP);
|
uint8_t * const sduP);
|
||||||
|
|
||||||
typedef void (rrc_data_conf_cb_t)(
|
typedef void (rrc_data_conf_cb_t)(
|
||||||
const module_id_t eNB_inst,
|
const protocol_ctxt_t* const ctxtP,
|
||||||
const module_id_t UE_inst,
|
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const rb_id_t rb_idP,
|
const rb_id_t rb_idP,
|
||||||
const mui_t muiP,
|
const mui_t muiP,
|
||||||
const rlc_tx_status_t statusP);
|
const rlc_tx_status_t statusP);
|
||||||
@@ -308,12 +300,9 @@ private_rlc_mac(struct mac_data_ind mac_rlc_deserialize_tb (char*, tb_size_t,
|
|||||||
// PUBLIC INTERFACE WITH RRC
|
// PUBLIC INTERFACE WITH RRC
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#ifdef Rel10
|
#ifdef Rel10
|
||||||
/*! \fn rlc_op_status_t rrc_rlc_config_asn1_req (const module_id_t enb_mod_idP, const module_id_t ue_mod_idP, const frame_t frameP, const eNB_flag_t eNB_flagP, const srb_flag_t srb_flagP, const SRB_ToAddMod_t* const srb2addmod, const DRB_ToAddModList_t* const drb2add_listP, const DRB_ToReleaseList_t* const drb2release_listP, const PMCH_InfoList_r9_t * const pmch_info_listP)
|
/*! \fn rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const SRB_ToAddMod_t* const srb2addmod, const DRB_ToAddModList_t* const drb2add_listP, const DRB_ToReleaseList_t* const drb2release_listP, const PMCH_InfoList_r9_t * const pmch_info_listP)
|
||||||
* \brief Function for RRC to configure a Radio Bearer.
|
* \brief Function for RRC to configure a Radio Bearer.
|
||||||
* \param[in] enb_mod_idP Virtualized enb module identifier, Not used if eNB_flagP = 0.
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] ue_mod_idP Virtualized ue module identifier.
|
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
* \param[in] eNB_flagP Flag to indicate eNB (1) or UE (0)
|
|
||||||
* \param[in] srb2add_listP SRB configuration list to be created.
|
* \param[in] srb2add_listP SRB configuration list to be created.
|
||||||
* \param[in] drb2add_listP DRB configuration list to be created.
|
* \param[in] drb2add_listP DRB configuration list to be created.
|
||||||
* \param[in] drb2release_listP DRB configuration list to be released.
|
* \param[in] drb2release_listP DRB configuration list to be released.
|
||||||
@@ -321,31 +310,22 @@ private_rlc_mac(struct mac_data_ind mac_rlc_deserialize_tb (char*, tb_size_t,
|
|||||||
* \return A status about the processing, OK or error code.
|
* \return A status about the processing, OK or error code.
|
||||||
*/
|
*/
|
||||||
public_rlc_rrc( rlc_op_status_t rrc_rlc_config_asn1_req (
|
public_rlc_rrc( rlc_op_status_t rrc_rlc_config_asn1_req (
|
||||||
const module_id_t,
|
const protocol_ctxt_t* const,
|
||||||
const module_id_t,
|
|
||||||
const frame_t,
|
|
||||||
const eNB_flag_t,
|
|
||||||
const SRB_ToAddModList_t* const ,
|
const SRB_ToAddModList_t* const ,
|
||||||
const DRB_ToAddModList_t* const ,
|
const DRB_ToAddModList_t* const ,
|
||||||
const DRB_ToReleaseList_t* const ,
|
const DRB_ToReleaseList_t* const ,
|
||||||
const PMCH_InfoList_r9_t * const pmch_info_listP);)
|
const PMCH_InfoList_r9_t * const pmch_info_listP);)
|
||||||
#else
|
#else
|
||||||
/*! \fn rlc_op_status_t rrc_rlc_config_asn1_req (const module_id_t enb_mod_idP, const module_id_t ue_mod_idP, const frame_t frameP, const eNB_flag_t eNB_flagP, const srb_flag_t srb_flagP, const SRB_ToAddModList_t* const srb2add_listP, const DRB_ToAddModList_t* const drb2add_listP, const DRB_ToReleaseList_t* const drb2release_listP)
|
/*! \fn rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t* const ctxtP, const SRB_ToAddModList_t* const srb2add_listP, const DRB_ToAddModList_t* const drb2add_listP, const DRB_ToReleaseList_t* const drb2release_listP)
|
||||||
* \brief Function for RRC to configure a Radio Bearer.
|
* \brief Function for RRC to configure a Radio Bearer.
|
||||||
* \param[in] enb_mod_idP Virtualized enb module identifier, Not used if eNB_flagP = 0.
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] ue_mod_idP Virtualized ue module identifier.
|
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
* \param[in] eNB_flagP Flag to indicate eNB (1) or UE (0)
|
|
||||||
* \param[in] srb2add_listP SRB configuration list to be created.
|
* \param[in] srb2add_listP SRB configuration list to be created.
|
||||||
* \param[in] drb2add_listP DRB configuration list to be created.
|
* \param[in] drb2add_listP DRB configuration list to be created.
|
||||||
* \param[in] drb2release_listP DRB configuration list to be released.
|
* \param[in] drb2release_listP DRB configuration list to be released.
|
||||||
* \return A status about the processing, OK or error code.
|
* \return A status about the processing, OK or error code.
|
||||||
*/
|
*/
|
||||||
public_rlc_rrc( rlc_op_status_t rrc_rlc_config_asn1_req (
|
public_rlc_rrc( rlc_op_status_t rrc_rlc_config_asn1_req (
|
||||||
const module_id_t,
|
const protocol_ctxt_t* const,
|
||||||
const module_id_t,
|
|
||||||
const frame_t,
|
|
||||||
const eNB_flag_t,
|
|
||||||
const SRB_ToAddModList_t* const ,
|
const SRB_ToAddModList_t* const ,
|
||||||
const DRB_ToAddModList_t* const ,
|
const DRB_ToAddModList_t* const ,
|
||||||
const DRB_ToReleaseList_t* const );)
|
const DRB_ToReleaseList_t* const );)
|
||||||
@@ -355,42 +335,34 @@ public_rlc_rrc( rlc_op_status_t rrc_rlc_config_asn1_req (
|
|||||||
/*! \fn void rb_free_rlc_union (void *rlcu_pP)
|
/*! \fn void rb_free_rlc_union (void *rlcu_pP)
|
||||||
* \brief Free the rlc memory contained in the RLC embedded in the rlc_union_t
|
* \brief Free the rlc memory contained in the RLC embedded in the rlc_union_t
|
||||||
* struct pointed by of the rlcu_pP parameter. Free the rlc_union_t struct also.
|
* struct pointed by of the rlcu_pP parameter. Free the rlc_union_t struct also.
|
||||||
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] rlcu_pP Pointer on the rlc_union_t struct.
|
* \param[in] rlcu_pP Pointer on the rlc_union_t struct.
|
||||||
*/
|
*/
|
||||||
public_rlc_rrc(void
|
public_rlc_rrc(void
|
||||||
rb_free_rlc_union (void *rlcu_pP);)
|
rb_free_rlc_union (const protocol_ctxt_t* const ctxt_pP, void *rlcu_pP);)
|
||||||
|
|
||||||
|
|
||||||
/*! \fn rlc_op_status_t rrc_rlc_remove_ue (const module_id_t enb_mod_idP, const module_id_t ue_mod_idP, const frame_t frameP, const eNB_flag_t eNB_flagP)
|
/*! \fn rlc_op_status_t rrc_rlc_remove_ue (const protocol_ctxt_t* const ctxtP)
|
||||||
* \brief Remove all RLC protocol instances from all radio bearers allocated to a UE.
|
* \brief Remove all RLC protocol instances from all radio bearers allocated to a UE.
|
||||||
* \param[in] enb_mod_idP Virtualized enb module identifier, Not used if eNB_flagP = 0.
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] ue_mod_idP Virtualized ue module identifier.
|
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
* \param[in] eNB_flagP Flag to indicate eNB (1) or UE (0)
|
|
||||||
* \return A status about the processing, OK or error code.
|
* \return A status about the processing, OK or error code.
|
||||||
*/
|
*/
|
||||||
public_rlc_rrc(rlc_op_status_t rrc_rlc_remove_ue (const module_id_t enb_mod_idP,const module_id_t ue_mod_idP,const frame_t frameP,const eNB_flag_t eNB_flag);)
|
public_rlc_rrc(rlc_op_status_t rrc_rlc_remove_ue (const protocol_ctxt_t* const);)
|
||||||
|
|
||||||
|
|
||||||
/*! \fn rlc_op_status_t rrc_rlc_remove_rlc (const module_id_t enb_mod_idP, const module_id_t ue_mod_idP, const frame_t frameP, const eNB_flag_t eNB_flagP, const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP)
|
/*! \fn rlc_op_status_t rrc_rlc_remove_rlc (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP)
|
||||||
* \brief Remove a RLC protocol instance from a radio bearer.
|
* \brief Remove a RLC protocol instance from a radio bearer.
|
||||||
* \param[in] enb_mod_idP Virtualized enb module identifier, Not used if eNB_flagP = 0.
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] ue_mod_idP Virtualized ue module identifier.
|
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
* \param[in] eNB_flagP Flag to indicate eNB (1) or UE (0)
|
|
||||||
* \param[in] srb_flagP Flag to indicate SRB (1) or DRB (0)
|
* \param[in] srb_flagP Flag to indicate SRB (1) or DRB (0)
|
||||||
* \param[in] MBMS_flag Flag to indicate whether this is an MBMS service (1) or not (0)
|
* \param[in] MBMS_flag Flag to indicate whether this is an MBMS service (1) or not (0)
|
||||||
* \param[in] rb_idP Radio bearer identifier.
|
* \param[in] rb_idP Radio bearer identifier.
|
||||||
* \return A status about the processing, OK or error code.
|
* \return A status about the processing, OK or error code.
|
||||||
*/
|
*/
|
||||||
public_rlc_rrc(rlc_op_status_t rrc_rlc_remove_rlc (const module_id_t , const module_id_t , const frame_t , const eNB_flag_t , const srb_flag_t, const MBMS_flag_t, const rb_id_t );)
|
public_rlc_rrc(rlc_op_status_t rrc_rlc_remove_rlc (const protocol_ctxt_t* const, const srb_flag_t, const MBMS_flag_t, const rb_id_t );)
|
||||||
|
|
||||||
/*! \fn rlc_union_t* rrc_rlc_add_rlc (const module_id_t enb_mod_idP, const module_id_t ue_mod_idP, const frame_t frameP, const eNB_flag_t eNB_flagP, const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP, logical_chan_id_t chan_idP, rlc_mode_t rlc_modeP)
|
/*! \fn rlc_union_t* rrc_rlc_add_rlc (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP, logical_chan_id_t chan_idP, rlc_mode_t rlc_modeP)
|
||||||
* \brief Add a RLC protocol instance to a radio bearer.
|
* \brief Add a RLC protocol instance to a radio bearer.
|
||||||
* \param[in] enb_mod_idP Virtualized enb module identifier, Not used if eNB_flagP = 0.
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] ue_mod_idP Virtualized ue module identifier.
|
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
* \param[in] eNB_flagP Flag to indicate eNB (1) or UE (0)
|
|
||||||
* \param[in] srb_flagP Flag to indicate SRB (1) or DRB (0)
|
* \param[in] srb_flagP Flag to indicate SRB (1) or DRB (0)
|
||||||
* \param[in] MBMS_flag Flag to indicate whether this is an MBMS service (1) or not (0)
|
* \param[in] MBMS_flag Flag to indicate whether this is an MBMS service (1) or not (0)
|
||||||
* \param[in] rb_idP Radio bearer identifier.
|
* \param[in] rb_idP Radio bearer identifier.
|
||||||
@@ -398,23 +370,17 @@ public_rlc_rrc(rlc_op_status_t rrc_rlc_remove_rlc (const module_id_t , const m
|
|||||||
* \param[in] rlc_modeP Mode of RLC (AM, UM, TM).
|
* \param[in] rlc_modeP Mode of RLC (AM, UM, TM).
|
||||||
* \return A status about the processing, OK or error code.
|
* \return A status about the processing, OK or error code.
|
||||||
*/
|
*/
|
||||||
private_rlc_rrc(rlc_union_t* rrc_rlc_add_rlc (const module_id_t, const module_id_t, const frame_t, const eNB_flag_t, const srb_flag_t, const MBMS_flag_t MBMS_flagP, const rb_id_t, logical_chan_id_t, rlc_mode_t);)
|
private_rlc_rrc(rlc_union_t* rrc_rlc_add_rlc (const protocol_ctxt_t* const, const srb_flag_t, const MBMS_flag_t MBMS_flagP, const rb_id_t, logical_chan_id_t, rlc_mode_t);)
|
||||||
|
|
||||||
/*! \fn rlc_op_status_t rrc_rlc_config_req (
|
/*! \fn rlc_op_status_t rrc_rlc_config_req (
|
||||||
const module_id_t enb_mod_idP,
|
const protocol_ctxt_t* const ctxtP,
|
||||||
const module_id_t ue_mod_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const MBMS_flag_t MBMS_flagP,
|
const MBMS_flag_t MBMS_flagP,
|
||||||
config_action_t actionP,
|
config_action_t actionP,
|
||||||
const rb_id_t rb_idP,
|
const rb_id_t rb_idP,
|
||||||
rlc_info_t rlc_infoP)
|
rlc_info_t rlc_infoP)
|
||||||
* \brief Function for RRC to configure a Radio Bearer.
|
* \brief Function for RRC to configure a Radio Bearer.
|
||||||
* \param[in] enb_mod_idP Virtualized enb module identifier, Not used if eNB_flagP = 0.
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] ue_mod_idP Virtualized ue module identifier.
|
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
* \param[in] eNB_flagP Flag to indicate eNB (1) or UE (0)
|
|
||||||
* \param[in] srb_flagP Flag to indicate SRB (1) or DRB (0)
|
* \param[in] srb_flagP Flag to indicate SRB (1) or DRB (0)
|
||||||
* \param[in] MBMS_flag Flag to indicate whether this is an MBMS service (1) or not (0)
|
* \param[in] MBMS_flag Flag to indicate whether this is an MBMS service (1) or not (0)
|
||||||
* \param[in] actionP Action for this radio bearer (add, modify, remove).
|
* \param[in] actionP Action for this radio bearer (add, modify, remove).
|
||||||
@@ -423,22 +389,16 @@ private_rlc_rrc(rlc_union_t* rrc_rlc_add_rlc (const module_id_t, const mod
|
|||||||
* \return A status about the processing, OK or error code.
|
* \return A status about the processing, OK or error code.
|
||||||
*/
|
*/
|
||||||
public_rlc_rrc( rlc_op_status_t rrc_rlc_config_req (
|
public_rlc_rrc( rlc_op_status_t rrc_rlc_config_req (
|
||||||
const module_id_t,
|
const protocol_ctxt_t* const,
|
||||||
const module_id_t,
|
|
||||||
const frame_t,
|
|
||||||
const eNB_flag_t ,
|
|
||||||
const srb_flag_t,
|
const srb_flag_t,
|
||||||
const MBMS_flag_t,
|
const MBMS_flag_t,
|
||||||
config_action_t,
|
config_action_t,
|
||||||
const rb_id_t,
|
const rb_id_t,
|
||||||
rlc_info_t );)
|
rlc_info_t );)
|
||||||
|
|
||||||
/*! \fn rlc_op_status_t rrc_rlc_data_req (const module_id_t enb_mod_idP, const module_id_t ue_mod_idP, const frame_t frameP, const eNB_flag_t eNB_flagP, const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP, mui_t muiP, confirm_t confirmP, sdu_size_t sdu_sizeP, char* sduP)
|
/*! \fn rlc_op_status_t rrc_rlc_data_req (const protocol_ctxt_t* const ctxtP, const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP, mui_t muiP, confirm_t confirmP, sdu_size_t sdu_sizeP, char* sduP)
|
||||||
* \brief Function for RRC to send a SDU through a Signalling Radio Bearer.
|
* \brief Function for RRC to send a SDU through a Signalling Radio Bearer.
|
||||||
* \param[in] enb_mod_idP Virtualized enb module identifier, Not used if eNB_flagP = 0.
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] ue_mod_idP Virtualized ue module identifier.
|
|
||||||
* \param[in] frameP Frame index
|
|
||||||
* \param[in] eNB_flagP Flag to indicate eNB (1) or UE (0)
|
|
||||||
* \param[in] MBMS_flag Flag to indicate whether this is an MBMS service (1) or not (0)
|
* \param[in] MBMS_flag Flag to indicate whether this is an MBMS service (1) or not (0)
|
||||||
* \param[in] rb_idP Radio bearer identifier.
|
* \param[in] rb_idP Radio bearer identifier.
|
||||||
* \param[in] muiP Message Unit identifier.
|
* \param[in] muiP Message Unit identifier.
|
||||||
@@ -447,9 +407,9 @@ public_rlc_rrc( rlc_op_status_t rrc_rlc_config_req (
|
|||||||
* \param[in] sduP SDU.
|
* \param[in] sduP SDU.
|
||||||
* \return A status about the processing, OK or error code.
|
* \return A status about the processing, OK or error code.
|
||||||
*/
|
*/
|
||||||
public_rlc_rrc( rlc_op_status_t rrc_rlc_data_req (const module_id_t, const module_id_t, const frame_t, const eNB_flag_t, const MBMS_flag_t, const rb_id_t, mui_t, confirm_t, sdu_size_t, char *);)
|
public_rlc_rrc( rlc_op_status_t rrc_rlc_data_req (const protocol_ctxt_t* const , const MBMS_flag_t, const rb_id_t, mui_t, confirm_t, sdu_size_t, char *);)
|
||||||
|
|
||||||
/*! \fn void rrc_rlc_register_rrc ( void (*rrc_data_indP) (const module_id_t enb_mod_idP, const module_id_t ue_mod_idP, const frame_t frameP, const eNB_flag_t eNB_flagP, const rb_id_t rb_idP, sdu_size_t sdu_sizeP, char* sduP), void (*rrc_data_confP) (const module_id_t enb_mod_idP, const module_id_t ue_mod_idP, const rb_id_t rb_idP, mui_t muiP, rlc_tx_status_t statusP)
|
/*! \fn void rrc_rlc_register_rrc ( void (*rrc_data_indP) (const protocol_ctxt_t* const ctxtP, const rb_id_t rb_idP, sdu_size_t sdu_sizeP, char* sduP), void (*rrc_data_confP) (const protocol_ctxt_t* const ctxtP, const rb_id_t rb_idP, mui_t muiP, rlc_tx_status_t statusP)
|
||||||
* \brief This function is called by RRC to register its DATA-INDICATE and DATA-CONFIRM handlers to RLC layer.
|
* \brief This function is called by RRC to register its DATA-INDICATE and DATA-CONFIRM handlers to RLC layer.
|
||||||
* \param[in] rrc_data_indP Pointer on RRC data indicate function.
|
* \param[in] rrc_data_indP Pointer on RRC data indicate function.
|
||||||
* \param[in] rrc_data_confP Pointer on RRC data confirm callback function.
|
* \param[in] rrc_data_confP Pointer on RRC data confirm callback function.
|
||||||
@@ -480,7 +440,6 @@ public_rlc_mac(tbs_size_t mac_rlc_data_req (const module_id_t, co
|
|||||||
* \param[in] eNB_flagP Flag to indicate eNB (1) or UE (0)
|
* \param[in] eNB_flagP Flag to indicate eNB (1) or UE (0)
|
||||||
* \param[in] MBMS_flagP Flag to indicate whether this is the MBMS service (1) or not (0)
|
* \param[in] MBMS_flagP Flag to indicate whether this is the MBMS service (1) or not (0)
|
||||||
* \param[in] rb_idP Radio bearer identifier.
|
* \param[in] rb_idP Radio bearer identifier.
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
* \param[in] bufferP Memory area containing the transport blocks sent by MAC.
|
* \param[in] bufferP Memory area containing the transport blocks sent by MAC.
|
||||||
* \param[in] tb_sizeP Size of a transport block in bits.
|
* \param[in] tb_sizeP Size of a transport block in bits.
|
||||||
* \param[in] num_tbP Number of transport blocks.
|
* \param[in] num_tbP Number of transport blocks.
|
||||||
@@ -517,12 +476,9 @@ public_rlc(void rlc_util_print_hex_octets(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*! \fn rlc_op_status_t rlc_data_req (const module_id_t enb_mod_idP, const module_id_t ue_mod_idP, const frame_t frameP, const eNB_flag_t eNB_flagP, const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP, mui_t muiP, confirm_t confirmP, sdu_size_t sdu_sizeP, mem_block_t *sduP)
|
/*! \fn rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP, mui_t muiP, confirm_t confirmP, sdu_size_t sdu_sizeP, mem_block_t *sduP)
|
||||||
* \brief Interface with higher layers, map request to the RLC corresponding to the radio bearer.
|
* \brief Interface with higher layers, map request to the RLC corresponding to the radio bearer.
|
||||||
* \param[in] enb_mod_idP Virtualized enb module identifier, Not used if eNB_flagP = 0.
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] ue_mod_idP Virtualized ue module identifier.
|
|
||||||
* \param[in] frameP Frame index.
|
|
||||||
* \param[in] eNB_flagP Flag to indicate eNB (1) or UE (0)
|
|
||||||
* \param[in] srb_flagP Flag to indicate SRB (1) or DRB (0)
|
* \param[in] srb_flagP Flag to indicate SRB (1) or DRB (0)
|
||||||
* \param[in] MBMS_flagP Flag to indicate whether this is the MBMS service (1) or not (0)
|
* \param[in] MBMS_flagP Flag to indicate whether this is the MBMS service (1) or not (0)
|
||||||
* \param[in] rb_idP Radio bearer identifier.
|
* \param[in] rb_idP Radio bearer identifier.
|
||||||
@@ -533,10 +489,7 @@ public_rlc(void rlc_util_print_hex_octets(
|
|||||||
* \return A status about the processing, OK or error code.
|
* \return A status about the processing, OK or error code.
|
||||||
*/
|
*/
|
||||||
public_rlc(rlc_op_status_t rlc_data_req (
|
public_rlc(rlc_op_status_t rlc_data_req (
|
||||||
const module_id_t ,
|
const protocol_ctxt_t* const,
|
||||||
const module_id_t ,
|
|
||||||
const frame_t ,
|
|
||||||
const eNB_flag_t ,
|
|
||||||
const srb_flag_t,
|
const srb_flag_t,
|
||||||
const MBMS_flag_t ,
|
const MBMS_flag_t ,
|
||||||
const rb_id_t ,
|
const rb_id_t ,
|
||||||
@@ -545,12 +498,9 @@ public_rlc(rlc_op_status_t rlc_data_req (
|
|||||||
const sdu_size_t ,
|
const sdu_size_t ,
|
||||||
mem_block_t * const);)
|
mem_block_t * const);)
|
||||||
|
|
||||||
/*! \fn void rlc_data_ind (const module_id_t enb_mod_idP, const module_id_t ue_mod_idP, const frame_t frameP, const eNB_flag_t eNB_flagP, const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP, const sdu_size_t sdu_sizeP, mem_block_t* sduP) {
|
/*! \fn void rlc_data_ind (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP, const sdu_size_t sdu_sizeP, mem_block_t* sduP) {
|
||||||
* \brief Interface with higher layers, route SDUs coming from RLC protocol instances to upper layer instance.
|
* \brief Interface with higher layers, route SDUs coming from RLC protocol instances to upper layer instance.
|
||||||
* \param[in] enb_mod_idP Virtualized enb module identifier, Not used if eNB_flagP = 0.
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] ue_mod_idP Virtualized ue module identifier.
|
|
||||||
* \param[in] frameP Frame index
|
|
||||||
* \param[in] eNB_flagP Flag to indicate eNB (1) or UE (0)
|
|
||||||
* \param[in] srb_flagP Flag to indicate SRB (1) or DRB (0)
|
* \param[in] srb_flagP Flag to indicate SRB (1) or DRB (0)
|
||||||
* \param[in] MBMS_flagP Flag to indicate whether this is the MBMS service (1) or not (0)
|
* \param[in] MBMS_flagP Flag to indicate whether this is the MBMS service (1) or not (0)
|
||||||
* \param[in] rb_idP Radio bearer identifier.
|
* \param[in] rb_idP Radio bearer identifier.
|
||||||
@@ -558,10 +508,7 @@ public_rlc(rlc_op_status_t rlc_data_req (
|
|||||||
* \param[in] sduP SDU.
|
* \param[in] sduP SDU.
|
||||||
*/
|
*/
|
||||||
public_rlc(void rlc_data_ind(
|
public_rlc(void rlc_data_ind(
|
||||||
const module_id_t ,
|
const protocol_ctxt_t* const,
|
||||||
const module_id_t ,
|
|
||||||
const frame_t ,
|
|
||||||
const eNB_flag_t ,
|
|
||||||
const srb_flag_t,
|
const srb_flag_t,
|
||||||
const MBMS_flag_t ,
|
const MBMS_flag_t ,
|
||||||
const rb_id_t,
|
const rb_id_t,
|
||||||
@@ -569,22 +516,16 @@ public_rlc(void rlc_data_ind(
|
|||||||
mem_block_t* const);)
|
mem_block_t* const);)
|
||||||
|
|
||||||
|
|
||||||
/*! \fn void rlc_data_conf (const module_id_t enb_mod_idP, const module_id_t ue_mod_idP, const frame_t frameP, const eNB_flag_t eNB_flagP, const srb_flag_t srb_flagP, const rb_id_t rb_idP, const mui_t muiP, const rlc_tx_status_t statusP)
|
/*! \fn void rlc_data_conf (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const rb_id_t rb_idP, const mui_t muiP, const rlc_tx_status_t statusP)
|
||||||
* \brief Interface with higher layers, confirm to upper layer the transmission status for a SDU stamped with a MUI, scheduled for transmission.
|
* \brief Interface with higher layers, confirm to upper layer the transmission status for a SDU stamped with a MUI, scheduled for transmission.
|
||||||
* \param[in] enb_mod_idP Virtualized enb module identifier, Not used if eNB_flagP = 0.
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] ue_mod_idP Virtualized ue module identifier.
|
|
||||||
* \param[in] frameP Frame index
|
|
||||||
* \param[in] eNB_flagP Flag to indicate eNB (1) or UE (0)
|
|
||||||
* \param[in] srb_flagP Flag to indicate SRB (1) or DRB (0)
|
* \param[in] srb_flagP Flag to indicate SRB (1) or DRB (0)
|
||||||
* \param[in] rb_idP Radio bearer identifier.
|
* \param[in] rb_idP Radio bearer identifier.
|
||||||
* \param[in] muiP Message Unit identifier.
|
* \param[in] muiP Message Unit identifier.
|
||||||
* \param[in] statusP Status of the transmission (RLC_SDU_CONFIRM_YES, RLC_SDU_CONFIRM_NO).
|
* \param[in] statusP Status of the transmission (RLC_SDU_CONFIRM_YES, RLC_SDU_CONFIRM_NO).
|
||||||
*/
|
*/
|
||||||
public_rlc(void rlc_data_conf(
|
public_rlc(void rlc_data_conf(
|
||||||
const module_id_t,
|
const protocol_ctxt_t* const,
|
||||||
const module_id_t,
|
|
||||||
const frame_t,
|
|
||||||
const eNB_flag_t ,
|
|
||||||
const srb_flag_t,
|
const srb_flag_t,
|
||||||
const rb_id_t,
|
const rb_id_t,
|
||||||
const mui_t,
|
const mui_t,
|
||||||
@@ -592,10 +533,7 @@ public_rlc(void rlc_data_conf(
|
|||||||
|
|
||||||
|
|
||||||
/*! \fn rlc_op_status_t rlc_stat_req (
|
/*! \fn rlc_op_status_t rlc_stat_req (
|
||||||
const module_id_t enb_mod_idP,
|
const protocol_ctxt_t* const ctxtP,
|
||||||
const module_id_t ue_mod_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const rb_id_t rb_idP,
|
const rb_id_t rb_idP,
|
||||||
unsigned int* stat_tx_pdcp_sdu,
|
unsigned int* stat_tx_pdcp_sdu,
|
||||||
@@ -627,10 +565,7 @@ public_rlc(void rlc_data_conf(
|
|||||||
unsigned int* stat_timer_status_prohibit_timed_out)
|
unsigned int* stat_timer_status_prohibit_timed_out)
|
||||||
|
|
||||||
* \brief Request RLC statistics of a particular radio bearer.
|
* \brief Request RLC statistics of a particular radio bearer.
|
||||||
* \param[in] enb_mod_idP Virtualized enb module identifier, Not used if eNB_flagP = 0.
|
* \param[in] ctxtP Running context.
|
||||||
* \param[in] ue_mod_idP Virtualized ue module identifier.
|
|
||||||
* \param[in] frameP
|
|
||||||
* \param[in] eNB_flag Flag to indicate eNB (1) or UE (0)
|
|
||||||
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
|
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
|
||||||
* \param[in] rb_idP .
|
* \param[in] rb_idP .
|
||||||
* \param[out] stat_tx_pdcp_sdu Number of SDUs coming from upper layers.
|
* \param[out] stat_tx_pdcp_sdu Number of SDUs coming from upper layers.
|
||||||
@@ -663,10 +598,7 @@ public_rlc(void rlc_data_conf(
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public_rlc(rlc_op_status_t rlc_stat_req (
|
public_rlc(rlc_op_status_t rlc_stat_req (
|
||||||
const module_id_t enb_mod_idP,
|
const protocol_ctxt_t* const ctxtP,
|
||||||
const module_id_t ue_mod_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t eNB_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const rb_id_t rb_idP,
|
const rb_id_t rb_idP,
|
||||||
unsigned int* const stat_tx_pdcp_sdu,
|
unsigned int* const stat_tx_pdcp_sdu,
|
||||||
|
|||||||
@@ -136,6 +136,12 @@ tbs_size_t mac_rlc_data_req(
|
|||||||
hashtable_rc_t h_rc;
|
hashtable_rc_t h_rc;
|
||||||
srb_flag_t srb_flag = (channel_idP <= 2) ? SRB_FLAG_YES : SRB_FLAG_NO;
|
srb_flag_t srb_flag = (channel_idP <= 2) ? SRB_FLAG_YES : SRB_FLAG_NO;
|
||||||
tbs_size_t ret_tb_size = 0;
|
tbs_size_t ret_tb_size = 0;
|
||||||
|
protocol_ctxt_t ctxt;
|
||||||
|
|
||||||
|
ctxt.enb_module_id = enb_module_idP;
|
||||||
|
ctxt.ue_module_id = ue_module_idP;
|
||||||
|
ctxt.frame = frameP;
|
||||||
|
ctxt.enb_flag = enb_flagP;
|
||||||
|
|
||||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_REQ,VCD_FUNCTION_IN);
|
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_REQ,VCD_FUNCTION_IN);
|
||||||
#ifdef DEBUG_MAC_INTERFACE
|
#ifdef DEBUG_MAC_INTERFACE
|
||||||
@@ -205,17 +211,17 @@ tbs_size_t mac_rlc_data_req(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case RLC_MODE_AM:
|
case RLC_MODE_AM:
|
||||||
data_request = rlc_am_mac_data_request(&rlc_union_p->rlc.am, frameP);
|
data_request = rlc_am_mac_data_request(&ctxt, &rlc_union_p->rlc.am);
|
||||||
ret_tb_size =mac_rlc_serialize_tb(buffer_pP, data_request.data);
|
ret_tb_size =mac_rlc_serialize_tb(buffer_pP, data_request.data);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RLC_MODE_UM:
|
case RLC_MODE_UM:
|
||||||
data_request = rlc_um_mac_data_request(&rlc_union_p->rlc.um, frameP);
|
data_request = rlc_um_mac_data_request(&ctxt, &rlc_union_p->rlc.um);
|
||||||
ret_tb_size = mac_rlc_serialize_tb(buffer_pP, data_request.data);
|
ret_tb_size = mac_rlc_serialize_tb(buffer_pP, data_request.data);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RLC_MODE_TM:
|
case RLC_MODE_TM:
|
||||||
data_request = rlc_tm_mac_data_request(&rlc_union_p->rlc.tm, frameP);
|
data_request = rlc_tm_mac_data_request(&ctxt, &rlc_union_p->rlc.tm);
|
||||||
ret_tb_size = mac_rlc_serialize_tb(buffer_pP, data_request.data);
|
ret_tb_size = mac_rlc_serialize_tb(buffer_pP, data_request.data);
|
||||||
break;
|
break;
|
||||||
default:;
|
default:;
|
||||||
@@ -243,6 +249,12 @@ void mac_rlc_data_ind (
|
|||||||
hash_key_t key = HASHTABLE_QUESTIONABLE_KEY_VALUE;
|
hash_key_t key = HASHTABLE_QUESTIONABLE_KEY_VALUE;
|
||||||
hashtable_rc_t h_rc;
|
hashtable_rc_t h_rc;
|
||||||
srb_flag_t srb_flag = (channel_idP <= 2) ? SRB_FLAG_YES : SRB_FLAG_NO;
|
srb_flag_t srb_flag = (channel_idP <= 2) ? SRB_FLAG_YES : SRB_FLAG_NO;
|
||||||
|
protocol_ctxt_t ctxt;
|
||||||
|
|
||||||
|
ctxt.enb_module_id = enb_module_idP;
|
||||||
|
ctxt.ue_module_id = ue_module_idP;
|
||||||
|
ctxt.frame = frameP;
|
||||||
|
ctxt.enb_flag = enb_flagP;
|
||||||
|
|
||||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_IND,VCD_FUNCTION_IN);
|
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_IND,VCD_FUNCTION_IN);
|
||||||
#ifdef DEBUG_MAC_INTERFACE
|
#ifdef DEBUG_MAC_INTERFACE
|
||||||
@@ -326,21 +338,21 @@ void mac_rlc_data_ind (
|
|||||||
#ifdef DEBUG_MAC_INTERFACE
|
#ifdef DEBUG_MAC_INTERFACE
|
||||||
LOG_D(RLC, "MAC DATA IND TO RLC_AM MOD_ID %s enb id %u ue id %u \n", (enb_flagP) ? "eNB" : "UE", enb_module_idP, ue_module_idP);
|
LOG_D(RLC, "MAC DATA IND TO RLC_AM MOD_ID %s enb id %u ue id %u \n", (enb_flagP) ? "eNB" : "UE", enb_module_idP, ue_module_idP);
|
||||||
#endif
|
#endif
|
||||||
rlc_am_mac_data_indication(&rlc_union_p->rlc.am, frameP, enb_flagP, data_ind);
|
rlc_am_mac_data_indication(&ctxt, &rlc_union_p->rlc.am, data_ind);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RLC_MODE_UM:
|
case RLC_MODE_UM:
|
||||||
#ifdef DEBUG_MAC_INTERFACE
|
#ifdef DEBUG_MAC_INTERFACE
|
||||||
LOG_D(RLC, "MAC DATA IND TO RLC_UM MOD_ID %s enb id %u ue id %u \n", (enb_flagP) ? "eNB" : "UE", enb_module_idP, ue_module_idP);
|
LOG_D(RLC, "MAC DATA IND TO RLC_UM MOD_ID %s enb id %u ue id %u \n", (enb_flagP) ? "eNB" : "UE", enb_module_idP, ue_module_idP);
|
||||||
#endif
|
#endif
|
||||||
rlc_um_mac_data_indication(&rlc_union_p->rlc.um, frameP, enb_flagP, data_ind);
|
rlc_um_mac_data_indication(&ctxt, &rlc_union_p->rlc.um, data_ind);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RLC_MODE_TM:
|
case RLC_MODE_TM:
|
||||||
#ifdef DEBUG_MAC_INTERFACE
|
#ifdef DEBUG_MAC_INTERFACE
|
||||||
LOG_D(RLC, "MAC DATA IND TO RLC_TM MOD_ID %s enb id %u ue id %u \n", (enb_flagP) ? "eNB" : "UE", enb_module_idP, ue_module_idP);
|
LOG_D(RLC, "MAC DATA IND TO RLC_TM MOD_ID %s enb id %u ue id %u \n", (enb_flagP) ? "eNB" : "UE", enb_module_idP, ue_module_idP);
|
||||||
#endif
|
#endif
|
||||||
rlc_tm_mac_data_indication(&rlc_union_p->rlc.tm, frameP, enb_flagP, data_ind);
|
rlc_tm_mac_data_indication(&ctxt, &rlc_union_p->rlc.tm, data_ind);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -367,6 +379,12 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
|
|||||||
hash_key_t key = HASHTABLE_QUESTIONABLE_KEY_VALUE;
|
hash_key_t key = HASHTABLE_QUESTIONABLE_KEY_VALUE;
|
||||||
hashtable_rc_t h_rc;
|
hashtable_rc_t h_rc;
|
||||||
srb_flag_t srb_flag = (channel_idP <= 2) ? SRB_FLAG_YES : SRB_FLAG_NO;
|
srb_flag_t srb_flag = (channel_idP <= 2) ? SRB_FLAG_YES : SRB_FLAG_NO;
|
||||||
|
protocol_ctxt_t ctxt;
|
||||||
|
|
||||||
|
ctxt.enb_module_id = enb_module_idP;
|
||||||
|
ctxt.ue_module_id = ue_module_idP;
|
||||||
|
ctxt.frame = frameP;
|
||||||
|
ctxt.enb_flag = enb_flagP;
|
||||||
|
|
||||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_STATUS_IND,VCD_FUNCTION_IN);
|
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_STATUS_IND,VCD_FUNCTION_IN);
|
||||||
memset (&mac_rlc_status_resp, 0, sizeof(mac_rlc_status_resp_t));
|
memset (&mac_rlc_status_resp, 0, sizeof(mac_rlc_status_resp_t));
|
||||||
@@ -448,7 +466,7 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case RLC_MODE_AM:
|
case RLC_MODE_AM:
|
||||||
status_resp = rlc_am_mac_status_indication(&rlc_union_p->rlc.am, frameP, tb_sizeP, tx_status);
|
status_resp = rlc_am_mac_status_indication(&ctxt, &rlc_union_p->rlc.am, tb_sizeP, tx_status);
|
||||||
mac_rlc_status_resp.bytes_in_buffer = status_resp.buffer_occupancy_in_bytes;
|
mac_rlc_status_resp.bytes_in_buffer = status_resp.buffer_occupancy_in_bytes;
|
||||||
mac_rlc_status_resp.head_sdu_creation_time = status_resp.head_sdu_creation_time;
|
mac_rlc_status_resp.head_sdu_creation_time = status_resp.head_sdu_creation_time;
|
||||||
mac_rlc_status_resp.head_sdu_remaining_size_to_send = status_resp.head_sdu_remaining_size_to_send;
|
mac_rlc_status_resp.head_sdu_remaining_size_to_send = status_resp.head_sdu_remaining_size_to_send;
|
||||||
@@ -457,7 +475,7 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case RLC_MODE_UM:
|
case RLC_MODE_UM:
|
||||||
status_resp = rlc_um_mac_status_indication(&rlc_union_p->rlc.um, frameP, enb_flagP, tb_sizeP, tx_status);
|
status_resp = rlc_um_mac_status_indication(&ctxt, &rlc_union_p->rlc.um, tb_sizeP, tx_status);
|
||||||
mac_rlc_status_resp.bytes_in_buffer = status_resp.buffer_occupancy_in_bytes;
|
mac_rlc_status_resp.bytes_in_buffer = status_resp.buffer_occupancy_in_bytes;
|
||||||
mac_rlc_status_resp.pdus_in_buffer = status_resp.buffer_occupancy_in_pdus;
|
mac_rlc_status_resp.pdus_in_buffer = status_resp.buffer_occupancy_in_pdus;
|
||||||
mac_rlc_status_resp.head_sdu_creation_time = status_resp.head_sdu_creation_time;
|
mac_rlc_status_resp.head_sdu_creation_time = status_resp.head_sdu_creation_time;
|
||||||
@@ -467,7 +485,7 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case RLC_MODE_TM:
|
case RLC_MODE_TM:
|
||||||
status_resp = rlc_tm_mac_status_indication(&rlc_union_p->rlc.tm, frameP, tb_sizeP, tx_status);
|
status_resp = rlc_tm_mac_status_indication(&ctxt, &rlc_union_p->rlc.tm, tb_sizeP, tx_status);
|
||||||
mac_rlc_status_resp.bytes_in_buffer = status_resp.buffer_occupancy_in_bytes;
|
mac_rlc_status_resp.bytes_in_buffer = status_resp.buffer_occupancy_in_bytes;
|
||||||
mac_rlc_status_resp.pdus_in_buffer = status_resp.buffer_occupancy_in_pdus;
|
mac_rlc_status_resp.pdus_in_buffer = status_resp.buffer_occupancy_in_pdus;
|
||||||
// return mac_rlc_status_resp;
|
// return mac_rlc_status_resp;
|
||||||
|
|||||||
@@ -40,14 +40,12 @@
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
rlc_op_status_t mpls_rlc_data_req (
|
rlc_op_status_t mpls_rlc_data_req (
|
||||||
const module_id_t enb_module_idP,
|
const protocol_ctxt_t* const ctxtP,
|
||||||
const module_id_t ue_module_idP,
|
|
||||||
const frame_t frame,
|
|
||||||
const rb_id_t rb_idP,
|
const rb_id_t rb_idP,
|
||||||
const sdu_size_t sdu_sizeP,
|
const sdu_size_t sdu_sizeP,
|
||||||
mem_block_t* const sduP) {
|
mem_block_t* const sduP) {
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// third arg should be set to 1 or 0
|
// third arg should be set to 1 or 0
|
||||||
return rlc_data_req(enb_module_idP, ue_module_idP, frame, ENB_FLAG_NO, SRB_FLAG_NO, MBMS_FLAG_NO, rb_idP, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO, sdu_sizeP, sduP);
|
return rlc_data_req(ctxtP, SRB_FLAG_NO, MBMS_FLAG_NO, rb_idP, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO, sdu_sizeP, sduP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+214
-274
@@ -56,10 +56,7 @@
|
|||||||
#include "LAYER2/MAC/extern.h"
|
#include "LAYER2/MAC/extern.h"
|
||||||
#include "assertions.h"
|
#include "assertions.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
rlc_op_status_t rrc_rlc_config_asn1_req (const module_id_t enb_mod_idP,
|
rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP,
|
||||||
const module_id_t ue_mod_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t enb_flagP,
|
|
||||||
const SRB_ToAddModList_t * const srb2add_listP,
|
const SRB_ToAddModList_t * const srb2add_listP,
|
||||||
const DRB_ToAddModList_t * const drb2add_listP,
|
const DRB_ToAddModList_t * const drb2add_listP,
|
||||||
const DRB_ToReleaseList_t * const drb2release_listP
|
const DRB_ToReleaseList_t * const drb2release_listP
|
||||||
@@ -90,33 +87,33 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const module_id_t enb_mod_idP
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_RRC][MOD %u/%u] CONFIG REQ ASN1 \n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_RRC][MOD %u/%u] CONFIG REQ ASN1 \n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP);
|
ctxt_pP->ue_module_id);
|
||||||
|
|
||||||
#ifdef OAI_EMU
|
#ifdef OAI_EMU
|
||||||
if (enb_flagP) {
|
if (ctxt_pP->enb_flag) {
|
||||||
AssertFatal ((enb_mod_idP >= oai_emulation.info.first_enb_local) && (oai_emulation.info.nb_enb_local > 0),
|
AssertFatal ((ctxt_pP->enb_module_id >= oai_emulation.info.first_enb_local) && (oai_emulation.info.nb_enb_local > 0),
|
||||||
"eNB module id is too low (%u/%d)!\n",
|
"eNB module id is too low (%u/%d)!\n",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
oai_emulation.info.first_enb_local);
|
oai_emulation.info.first_enb_local);
|
||||||
AssertFatal ((enb_mod_idP < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local)) && (oai_emulation.info.nb_enb_local > 0),
|
AssertFatal ((ctxt_pP->enb_module_id < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local)) && (oai_emulation.info.nb_enb_local > 0),
|
||||||
"eNB module id is too high (%u/%d)!\n",
|
"eNB module id is too high (%u/%d)!\n",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local);
|
oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local);
|
||||||
AssertFatal (ue_mod_idP < NB_UE_INST,
|
AssertFatal (ctxt_pP->ue_module_id < NB_UE_INST,
|
||||||
"UE module id is too high (%u/%d)!\n",
|
"UE module id is too high (%u/%d)!\n",
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
||||||
} else {
|
} else {
|
||||||
AssertFatal (ue_mod_idP < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local),
|
AssertFatal (ctxt_pP->ue_module_id < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local),
|
||||||
"UE module id is too high (%u/%d)!\n",
|
"UE module id is too high (%u/%d)!\n",
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
||||||
AssertFatal (ue_mod_idP >= oai_emulation.info.first_ue_local,
|
AssertFatal (ctxt_pP->ue_module_id >= oai_emulation.info.first_ue_local,
|
||||||
"UE module id is too low (%u/%d)!\n",
|
"UE module id is too low (%u/%d)!\n",
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
oai_emulation.info.first_ue_local);
|
oai_emulation.info.first_ue_local);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -137,31 +134,25 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const module_id_t enb_mod_idP
|
|||||||
case RLC_Config_PR_NOTHING:
|
case RLC_Config_PR_NOTHING:
|
||||||
break;
|
break;
|
||||||
case RLC_Config_PR_am:
|
case RLC_Config_PR_am:
|
||||||
if (rrc_rlc_add_rlc (enb_mod_idP, ue_mod_idP, frameP, enb_flagP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_AM) != NULL) {
|
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_AM) != NULL) {
|
||||||
config_req_rlc_am_asn1 (
|
config_req_rlc_am_asn1 (
|
||||||
enb_mod_idP,
|
ctxt_pP,
|
||||||
ue_mod_idP,
|
|
||||||
frameP,
|
|
||||||
enb_flagP,
|
|
||||||
SRB_FLAG_YES,
|
SRB_FLAG_YES,
|
||||||
&srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.am,
|
&srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.am,
|
||||||
rb_id);
|
rb_id);
|
||||||
} else {
|
} else {
|
||||||
LOG_E(RLC, "[FRAME %5u][%s][RLC_RRC][MOD %u/%u] ERROR IN ALLOCATING SRB %d \n",
|
LOG_E(RLC, "[FRAME %5u][%s][RLC_RRC][MOD %u/%u] ERROR IN ALLOCATING SRB %d \n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rb_id);
|
rb_id);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RLC_Config_PR_um_Bi_Directional:
|
case RLC_Config_PR_um_Bi_Directional:
|
||||||
if (rrc_rlc_add_rlc (enb_mod_idP, ue_mod_idP, frameP, enb_flagP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM) != NULL) {
|
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM) != NULL) {
|
||||||
config_req_rlc_um_asn1(
|
config_req_rlc_um_asn1(
|
||||||
enb_mod_idP,
|
ctxt_pP,
|
||||||
ue_mod_idP,
|
|
||||||
frameP,
|
|
||||||
enb_flagP,
|
|
||||||
SRB_FLAG_YES,
|
SRB_FLAG_YES,
|
||||||
MBMS_FLAG_NO,
|
MBMS_FLAG_NO,
|
||||||
UNUSED_PARAM_MBMS_SESSION_ID,
|
UNUSED_PARAM_MBMS_SESSION_ID,
|
||||||
@@ -171,20 +162,17 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const module_id_t enb_mod_idP
|
|||||||
rb_id);
|
rb_id);
|
||||||
} else {
|
} else {
|
||||||
LOG_E(RLC, "[FRAME %5u][%s][RLC_RRC][MOD %u/%u] ERROR IN ALLOCATING SRB %d \n",
|
LOG_E(RLC, "[FRAME %5u][%s][RLC_RRC][MOD %u/%u] ERROR IN ALLOCATING SRB %d \n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rb_id);
|
rb_id);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RLC_Config_PR_um_Uni_Directional_UL:
|
case RLC_Config_PR_um_Uni_Directional_UL:
|
||||||
if (rrc_rlc_add_rlc (enb_mod_idP, ue_mod_idP, frameP, enb_flagP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM) != NULL) {
|
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM) != NULL) {
|
||||||
config_req_rlc_um_asn1(
|
config_req_rlc_um_asn1(
|
||||||
enb_mod_idP,
|
ctxt_pP,
|
||||||
ue_mod_idP,
|
|
||||||
frameP,
|
|
||||||
enb_flagP,
|
|
||||||
SRB_FLAG_YES,
|
SRB_FLAG_YES,
|
||||||
MBMS_FLAG_NO,
|
MBMS_FLAG_NO,
|
||||||
UNUSED_PARAM_MBMS_SESSION_ID,
|
UNUSED_PARAM_MBMS_SESSION_ID,
|
||||||
@@ -194,20 +182,17 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const module_id_t enb_mod_idP
|
|||||||
rb_id);
|
rb_id);
|
||||||
} else {
|
} else {
|
||||||
LOG_E(RLC, "[FRAME %5u][%s][RLC_RRC][MOD %u/%u] ERROR IN ALLOCATING SRB %d \n",
|
LOG_E(RLC, "[FRAME %5u][%s][RLC_RRC][MOD %u/%u] ERROR IN ALLOCATING SRB %d \n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rb_id);
|
rb_id);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RLC_Config_PR_um_Uni_Directional_DL:
|
case RLC_Config_PR_um_Uni_Directional_DL:
|
||||||
if (rrc_rlc_add_rlc (enb_mod_idP, ue_mod_idP, frameP, enb_flagP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM) != NULL) {
|
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM) != NULL) {
|
||||||
config_req_rlc_um_asn1(
|
config_req_rlc_um_asn1(
|
||||||
enb_mod_idP,
|
ctxt_pP,
|
||||||
ue_mod_idP,
|
|
||||||
frameP,
|
|
||||||
enb_flagP,
|
|
||||||
SRB_FLAG_YES,
|
SRB_FLAG_YES,
|
||||||
MBMS_FLAG_NO,
|
MBMS_FLAG_NO,
|
||||||
UNUSED_PARAM_MBMS_SESSION_ID,
|
UNUSED_PARAM_MBMS_SESSION_ID,
|
||||||
@@ -217,32 +202,29 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const module_id_t enb_mod_idP
|
|||||||
rb_id);
|
rb_id);
|
||||||
} else {
|
} else {
|
||||||
LOG_E(RLC, "[FRAME %5u][%s][RLC_RRC][MOD %u/%u] ERROR IN ALLOCATING SRB %d \n",
|
LOG_E(RLC, "[FRAME %5u][%s][RLC_RRC][MOD %u/%u] ERROR IN ALLOCATING SRB %d \n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rb_id);
|
rb_id);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_E(RLC, "[FRAME %5u][%s][RLC_RRC][MOD %u/%u] UNKNOWN RLC CONFIG %d \n",
|
LOG_E(RLC, "[FRAME %5u][%s][RLC_RRC][MOD %u/%u] UNKNOWN RLC CONFIG %d \n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
srb_toaddmod_p->rlc_Config->choice.explicitValue.present);
|
srb_toaddmod_p->rlc_Config->choice.explicitValue.present);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SRB_ToAddMod__rlc_Config_PR_defaultValue:
|
case SRB_ToAddMod__rlc_Config_PR_defaultValue:
|
||||||
#warning TO DO SRB_ToAddMod__rlc_Config_PR_defaultValue
|
#warning TO DO SRB_ToAddMod__rlc_Config_PR_defaultValue
|
||||||
if (rrc_rlc_add_rlc (enb_mod_idP, ue_mod_idP, frameP, enb_flagP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM) != NULL) {
|
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM) != NULL) {
|
||||||
config_req_rlc_um_asn1(
|
config_req_rlc_um_asn1(
|
||||||
enb_mod_idP,
|
ctxt_pP,
|
||||||
ue_mod_idP,
|
|
||||||
frameP,
|
|
||||||
enb_flagP,
|
|
||||||
SRB_FLAG_YES,
|
SRB_FLAG_YES,
|
||||||
MBMS_FLAG_NO,
|
MBMS_FLAG_NO,
|
||||||
UNUSED_PARAM_MBMS_SESSION_ID,
|
UNUSED_PARAM_MBMS_SESSION_ID,
|
||||||
@@ -252,10 +234,10 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const module_id_t enb_mod_idP
|
|||||||
rb_id);
|
rb_id);
|
||||||
} else {
|
} else {
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_RRC][MOD %u/%u] ERROR IN ALLOCATING SRB %d \n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_RRC][MOD %u/%u] ERROR IN ALLOCATING SRB %d \n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rb_id);
|
rb_id);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -280,24 +262,18 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const module_id_t enb_mod_idP
|
|||||||
case RLC_Config_PR_NOTHING:
|
case RLC_Config_PR_NOTHING:
|
||||||
break;
|
break;
|
||||||
case RLC_Config_PR_am:
|
case RLC_Config_PR_am:
|
||||||
if (rrc_rlc_add_rlc (enb_mod_idP, ue_mod_idP, frameP, enb_flagP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_AM) != NULL) {
|
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_AM) != NULL) {
|
||||||
config_req_rlc_am_asn1 (
|
config_req_rlc_am_asn1 (
|
||||||
enb_mod_idP,
|
ctxt_pP,
|
||||||
ue_mod_idP,
|
|
||||||
frameP,
|
|
||||||
enb_flagP,
|
|
||||||
SRB_FLAG_NO,
|
SRB_FLAG_NO,
|
||||||
&drb_toaddmod_p->rlc_Config->choice.am,
|
&drb_toaddmod_p->rlc_Config->choice.am,
|
||||||
drb_id);
|
drb_id);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RLC_Config_PR_um_Bi_Directional:
|
case RLC_Config_PR_um_Bi_Directional:
|
||||||
if (rrc_rlc_add_rlc (enb_mod_idP, ue_mod_idP, frameP, enb_flagP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM) != NULL) {
|
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM) != NULL) {
|
||||||
config_req_rlc_um_asn1(
|
config_req_rlc_um_asn1(
|
||||||
enb_mod_idP,
|
ctxt_pP,
|
||||||
ue_mod_idP,
|
|
||||||
frameP,
|
|
||||||
enb_flagP,
|
|
||||||
SRB_FLAG_NO,
|
SRB_FLAG_NO,
|
||||||
MBMS_FLAG_NO,
|
MBMS_FLAG_NO,
|
||||||
UNUSED_PARAM_MBMS_SESSION_ID,
|
UNUSED_PARAM_MBMS_SESSION_ID,
|
||||||
@@ -308,12 +284,9 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const module_id_t enb_mod_idP
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RLC_Config_PR_um_Uni_Directional_UL:
|
case RLC_Config_PR_um_Uni_Directional_UL:
|
||||||
if (rrc_rlc_add_rlc (enb_mod_idP, ue_mod_idP, frameP, enb_flagP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM) != NULL) {
|
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM) != NULL) {
|
||||||
config_req_rlc_um_asn1(
|
config_req_rlc_um_asn1(
|
||||||
enb_mod_idP,
|
ctxt_pP,
|
||||||
ue_mod_idP,
|
|
||||||
frameP,
|
|
||||||
enb_flagP,
|
|
||||||
SRB_FLAG_NO,
|
SRB_FLAG_NO,
|
||||||
MBMS_FLAG_NO,
|
MBMS_FLAG_NO,
|
||||||
UNUSED_PARAM_MBMS_SESSION_ID,
|
UNUSED_PARAM_MBMS_SESSION_ID,
|
||||||
@@ -324,12 +297,9 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const module_id_t enb_mod_idP
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RLC_Config_PR_um_Uni_Directional_DL:
|
case RLC_Config_PR_um_Uni_Directional_DL:
|
||||||
if (rrc_rlc_add_rlc (enb_mod_idP, ue_mod_idP, frameP, enb_flagP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM) != NULL) {
|
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM) != NULL) {
|
||||||
config_req_rlc_um_asn1(
|
config_req_rlc_um_asn1(
|
||||||
enb_mod_idP,
|
ctxt_pP,
|
||||||
ue_mod_idP,
|
|
||||||
frameP,
|
|
||||||
enb_flagP,
|
|
||||||
SRB_FLAG_NO,
|
SRB_FLAG_NO,
|
||||||
MBMS_FLAG_NO,
|
MBMS_FLAG_NO,
|
||||||
UNUSED_PARAM_MBMS_SESSION_ID,
|
UNUSED_PARAM_MBMS_SESSION_ID,
|
||||||
@@ -341,10 +311,10 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const module_id_t enb_mod_idP
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOG_W(RLC, "[FRAME %5u][%s][RLC_RRC][MOD %u/%u][RB %u] unknown drb_toaddmod_p->rlc_Config->present \n",
|
LOG_W(RLC, "[FRAME %5u][%s][RLC_RRC][MOD %u/%u][RB %u] unknown drb_toaddmod_p->rlc_Config->present \n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
drb_id);
|
drb_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -353,7 +323,11 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const module_id_t enb_mod_idP
|
|||||||
if (drb2release_listP != NULL) {
|
if (drb2release_listP != NULL) {
|
||||||
for (cnt=0;cnt<drb2release_listP->list.count;cnt++) {
|
for (cnt=0;cnt<drb2release_listP->list.count;cnt++) {
|
||||||
pdrb_id = drb2release_listP->list.array[cnt];
|
pdrb_id = drb2release_listP->list.array[cnt];
|
||||||
rrc_rlc_remove_rlc(enb_mod_idP, ue_mod_idP, frameP, enb_flagP, SRB_FLAG_NO, MBMS_FLAG_NO, *pdrb_id);
|
rrc_rlc_remove_rlc(
|
||||||
|
ctxt_pP,
|
||||||
|
SRB_FLAG_NO,
|
||||||
|
MBMS_FLAG_NO,
|
||||||
|
*pdrb_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -369,27 +343,24 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const module_id_t enb_mod_idP
|
|||||||
mbms_service_id = MBMS_SessionInfo_p->tmgi_r9.serviceId_r9.buf[2]; //serviceId is 3-octet string
|
mbms_service_id = MBMS_SessionInfo_p->tmgi_r9.serviceId_r9.buf[2]; //serviceId is 3-octet string
|
||||||
|
|
||||||
// can set the mch_id = i
|
// can set the mch_id = i
|
||||||
if (enb_flagP) {
|
if (ctxt_pP->enb_flag) {
|
||||||
rb_id = (mbms_service_id * maxSessionPerPMCH ) + mbms_session_id;//+ (maxDRB + 3) * MAX_MOBILES_PER_ENB; // 1
|
rb_id = (mbms_service_id * maxSessionPerPMCH ) + mbms_session_id;//+ (maxDRB + 3) * MAX_MOBILES_PER_ENB; // 1
|
||||||
rlc_mbms_lcid2service_session_id_eNB[enb_mod_idP][lc_id].service_id = mbms_service_id;
|
rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->enb_module_id][lc_id].service_id = mbms_service_id;
|
||||||
rlc_mbms_lcid2service_session_id_eNB[enb_mod_idP][lc_id].session_id = mbms_session_id;
|
rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->enb_module_id][lc_id].session_id = mbms_session_id;
|
||||||
|
|
||||||
rlc_mbms_enb_set_lcid_by_rb_id(enb_mod_idP,rb_id,lc_id);
|
rlc_mbms_enb_set_lcid_by_rb_id(ctxt_pP->enb_module_id,rb_id,lc_id);
|
||||||
} else {
|
} else {
|
||||||
rb_id = (mbms_service_id * maxSessionPerPMCH ) + mbms_session_id; // + (maxDRB + 3); // 15
|
rb_id = (mbms_service_id * maxSessionPerPMCH ) + mbms_session_id; // + (maxDRB + 3); // 15
|
||||||
rlc_mbms_lcid2service_session_id_ue[ue_mod_idP][lc_id].service_id = mbms_service_id;
|
rlc_mbms_lcid2service_session_id_ue[ctxt_pP->ue_module_id][lc_id].service_id = mbms_service_id;
|
||||||
rlc_mbms_lcid2service_session_id_ue[ue_mod_idP][lc_id].session_id = mbms_session_id;
|
rlc_mbms_lcid2service_session_id_ue[ctxt_pP->ue_module_id][lc_id].session_id = mbms_session_id;
|
||||||
rlc_mbms_ue_set_lcid_by_rb_id(ue_mod_idP,rb_id,lc_id);
|
rlc_mbms_ue_set_lcid_by_rb_id(ctxt_pP->ue_module_id,rb_id,lc_id);
|
||||||
}
|
}
|
||||||
key = RLC_COLL_KEY_MBMS_VALUE(enb_mod_idP, ue_mod_idP, enb_flagP, mbms_service_id, mbms_session_id);
|
key = RLC_COLL_KEY_MBMS_VALUE(ctxt_pP->enb_module_id, ctxt_pP->ue_module_id, ctxt_pP->enb_flag, mbms_service_id, mbms_session_id);
|
||||||
|
|
||||||
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
||||||
if (h_rc == HASH_TABLE_KEY_NOT_EXISTS) {
|
if (h_rc == HASH_TABLE_KEY_NOT_EXISTS) {
|
||||||
rlc_union_p = rrc_rlc_add_rlc (
|
rlc_union_p = rrc_rlc_add_rlc (
|
||||||
enb_mod_idP,
|
ctxt_pP,
|
||||||
ue_mod_idP,
|
|
||||||
frameP,
|
|
||||||
enb_flagP,
|
|
||||||
SRB_FLAG_NO,
|
SRB_FLAG_NO,
|
||||||
MBMS_FLAG_YES,
|
MBMS_FLAG_YES,
|
||||||
rb_id,
|
rb_id,
|
||||||
@@ -399,10 +370,10 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const module_id_t enb_mod_idP
|
|||||||
}
|
}
|
||||||
|
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_RRC][MOD %u/%u] CONFIG REQ MBMS ASN1 LC ID %u RB ID %u SESSION ID %u SERVICE ID %u\n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_RRC][MOD %u/%u] CONFIG REQ MBMS ASN1 LC ID %u RB ID %u SESSION ID %u SERVICE ID %u\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
lc_id,
|
lc_id,
|
||||||
rb_id,
|
rb_id,
|
||||||
mbms_session_id,
|
mbms_session_id,
|
||||||
@@ -412,10 +383,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const module_id_t enb_mod_idP
|
|||||||
dl_um_rlc.t_Reordering = T_Reordering_ms0;
|
dl_um_rlc.t_Reordering = T_Reordering_ms0;
|
||||||
|
|
||||||
config_req_rlc_um_asn1 (
|
config_req_rlc_um_asn1 (
|
||||||
enb_mod_idP,
|
ctxt_pP,
|
||||||
ue_mod_idP,
|
|
||||||
frameP,
|
|
||||||
enb_flagP,
|
|
||||||
SRB_FLAG_NO,
|
SRB_FLAG_NO,
|
||||||
MBMS_FLAG_YES,
|
MBMS_FLAG_YES,
|
||||||
mbms_session_id,
|
mbms_session_id,
|
||||||
@@ -429,16 +397,18 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const module_id_t enb_mod_idP
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
LOG_D(RLC, "[FRAME %5u][%s][RLC_RRC][MOD %u/%u] CONFIG REQ ASN1 END \n",
|
LOG_D(RLC, "[FRAME %5u][%s][RLC_RRC][MOD %u/%u] CONFIG REQ ASN1 END \n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_flagP,
|
ctxt_pP->enb_flag,
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP);
|
ctxt_pP->ue_module_id);
|
||||||
return RLC_OP_STATUS_OK;
|
return RLC_OP_STATUS_OK;
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rb_free_rlc_union (void *rlcu_pP)
|
rb_free_rlc_union (
|
||||||
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
|
void *rlcu_pP)
|
||||||
{
|
{
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
rlc_union_t * rlcu_p;
|
rlc_union_t * rlcu_p;
|
||||||
@@ -446,13 +416,13 @@ rb_free_rlc_union (void *rlcu_pP)
|
|||||||
rlcu_p = (rlc_union_t *)(rlcu_pP);
|
rlcu_p = (rlc_union_t *)(rlcu_pP);
|
||||||
switch (rlcu_p->mode) {
|
switch (rlcu_p->mode) {
|
||||||
case RLC_MODE_AM:
|
case RLC_MODE_AM:
|
||||||
rlc_am_cleanup(&rlcu_p->rlc.am);
|
rlc_am_cleanup(ctxt_pP, &rlcu_p->rlc.am);
|
||||||
break;
|
break;
|
||||||
case RLC_MODE_UM:
|
case RLC_MODE_UM:
|
||||||
rlc_um_cleanup(&rlcu_p->rlc.um);
|
rlc_um_cleanup(ctxt_pP, &rlcu_p->rlc.um);
|
||||||
break;
|
break;
|
||||||
case RLC_MODE_TM:
|
case RLC_MODE_TM:
|
||||||
rlc_tm_cleanup(&rlcu_p->rlc.tm);
|
rlc_tm_cleanup(ctxt_pP, &rlcu_p->rlc.tm);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOG_W(RLC,
|
LOG_W(RLC,
|
||||||
@@ -471,27 +441,18 @@ rb_free_rlc_union (void *rlcu_pP)
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
rlc_op_status_t rrc_rlc_remove_ue (
|
rlc_op_status_t rrc_rlc_remove_ue (
|
||||||
const module_id_t enb_mod_idP,
|
const protocol_ctxt_t* const ctxt_pP) {
|
||||||
const module_id_t ue_mod_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t enb_flagP) {
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
rb_id_t rb_id;
|
rb_id_t rb_id;
|
||||||
|
|
||||||
for (rb_id = 1; rb_id <= 2; rb_id++) {
|
for (rb_id = 1; rb_id <= 2; rb_id++) {
|
||||||
rrc_rlc_remove_rlc(enb_mod_idP,
|
rrc_rlc_remove_rlc(ctxt_pP,
|
||||||
ue_mod_idP,
|
|
||||||
frameP,
|
|
||||||
enb_flagP,
|
|
||||||
SRB_FLAG_YES,
|
SRB_FLAG_YES,
|
||||||
MBMS_FLAG_NO,
|
MBMS_FLAG_NO,
|
||||||
rb_id);
|
rb_id);
|
||||||
}
|
}
|
||||||
for (rb_id = 1; rb_id <= maxDRB; rb_id++) {
|
for (rb_id = 1; rb_id <= maxDRB; rb_id++) {
|
||||||
rrc_rlc_remove_rlc(enb_mod_idP,
|
rrc_rlc_remove_rlc(ctxt_pP,
|
||||||
ue_mod_idP,
|
|
||||||
frameP,
|
|
||||||
enb_flagP,
|
|
||||||
SRB_FLAG_NO,
|
SRB_FLAG_NO,
|
||||||
MBMS_FLAG_NO,
|
MBMS_FLAG_NO,
|
||||||
rb_id);
|
rb_id);
|
||||||
@@ -501,10 +462,7 @@ rlc_op_status_t rrc_rlc_remove_ue (
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
rlc_op_status_t rrc_rlc_remove_rlc (
|
rlc_op_status_t rrc_rlc_remove_rlc (
|
||||||
const module_id_t enb_mod_idP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const module_id_t ue_mod_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t enb_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const MBMS_flag_t MBMS_flagP,
|
const MBMS_flag_t MBMS_flagP,
|
||||||
const rb_id_t rb_idP) {
|
const rb_id_t rb_idP) {
|
||||||
@@ -517,53 +475,53 @@ rlc_op_status_t rrc_rlc_remove_rlc (
|
|||||||
rlc_mbms_id_t *mbms_id_p = NULL;
|
rlc_mbms_id_t *mbms_id_p = NULL;
|
||||||
#endif
|
#endif
|
||||||
#ifdef OAI_EMU
|
#ifdef OAI_EMU
|
||||||
AssertFatal ((enb_mod_idP >= oai_emulation.info.first_enb_local) && (oai_emulation.info.nb_enb_local > 0),
|
AssertFatal ((ctxt_pP->enb_module_id >= oai_emulation.info.first_enb_local) && (oai_emulation.info.nb_enb_local > 0),
|
||||||
"eNB module id is too low (%u/%d)!\n",
|
"eNB module id is too low (%u/%d)!\n",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
oai_emulation.info.first_enb_local);
|
oai_emulation.info.first_enb_local);
|
||||||
AssertFatal (enb_mod_idP < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local),
|
AssertFatal (ctxt_pP->enb_module_id < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local),
|
||||||
"eNB module id is too high (%u/%d)!\n",
|
"eNB module id is too high (%u/%d)!\n",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local);
|
oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local);
|
||||||
if (enb_flagP) {
|
if (ctxt_pP->enb_flag) {
|
||||||
AssertFatal (ue_mod_idP < NB_UE_INST,
|
AssertFatal (ctxt_pP->ue_module_id < NB_UE_INST,
|
||||||
"UE module id is too high (%u/%d)!\n",
|
"UE module id is too high (%u/%d)!\n",
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
||||||
} else {
|
} else {
|
||||||
AssertFatal (ue_mod_idP < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local),
|
AssertFatal (ctxt_pP->ue_module_id < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local),
|
||||||
"UE module id is too high (%u/%d)!\n",
|
"UE module id is too high (%u/%d)!\n",
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
||||||
AssertFatal (ue_mod_idP >= oai_emulation.info.first_ue_local,
|
AssertFatal (ctxt_pP->ue_module_id >= oai_emulation.info.first_ue_local,
|
||||||
"UE module id is too low (%u/%d)!\n",
|
"UE module id is too low (%u/%d)!\n",
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
oai_emulation.info.first_ue_local);
|
oai_emulation.info.first_ue_local);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Rel10
|
#ifdef Rel10
|
||||||
if (MBMS_flagP == TRUE) {
|
if (MBMS_flagP == TRUE) {
|
||||||
if (enb_flagP) {
|
if (ctxt_pP->enb_flag) {
|
||||||
lcid = rlc_mbms_enb_get_lcid_by_rb_id(enb_mod_idP,rb_idP);
|
lcid = rlc_mbms_enb_get_lcid_by_rb_id(ctxt_pP->enb_module_id,rb_idP);
|
||||||
mbms_id_p = &rlc_mbms_lcid2service_session_id_eNB[enb_mod_idP][lcid];
|
mbms_id_p = &rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->enb_module_id][lcid];
|
||||||
|
|
||||||
rlc_mbms_lcid2service_session_id_eNB[enb_mod_idP][lcid].service_id = 0;
|
rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->enb_module_id][lcid].service_id = 0;
|
||||||
rlc_mbms_lcid2service_session_id_eNB[enb_mod_idP][lcid].session_id = 0;
|
rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->enb_module_id][lcid].session_id = 0;
|
||||||
rlc_mbms_rbid2lcid_ue[enb_mod_idP][rb_idP] = RLC_LC_UNALLOCATED;
|
rlc_mbms_rbid2lcid_ue[ctxt_pP->enb_module_id][rb_idP] = RLC_LC_UNALLOCATED;
|
||||||
} else {
|
} else {
|
||||||
lcid = rlc_mbms_ue_get_lcid_by_rb_id(ue_mod_idP,rb_idP);
|
lcid = rlc_mbms_ue_get_lcid_by_rb_id(ctxt_pP->ue_module_id,rb_idP);
|
||||||
mbms_id_p = &rlc_mbms_lcid2service_session_id_ue[ue_mod_idP][lcid];
|
mbms_id_p = &rlc_mbms_lcid2service_session_id_ue[ctxt_pP->ue_module_id][lcid];
|
||||||
|
|
||||||
rlc_mbms_lcid2service_session_id_eNB[ue_mod_idP][lcid].service_id = 0;
|
rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->ue_module_id][lcid].service_id = 0;
|
||||||
rlc_mbms_lcid2service_session_id_eNB[ue_mod_idP][lcid].session_id = 0;
|
rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->ue_module_id][lcid].session_id = 0;
|
||||||
rlc_mbms_rbid2lcid_ue[ue_mod_idP][rb_idP] = RLC_LC_UNALLOCATED;
|
rlc_mbms_rbid2lcid_ue[ctxt_pP->ue_module_id][rb_idP] = RLC_LC_UNALLOCATED;
|
||||||
}
|
}
|
||||||
key = RLC_COLL_KEY_MBMS_VALUE(enb_mod_idP, ue_mod_idP, enb_flagP, mbms_id_p->service_id, mbms_id_p->session_id);
|
key = RLC_COLL_KEY_MBMS_VALUE(ctxt_pP->enb_module_id, ctxt_pP->ue_module_id, ctxt_pP->enb_flag, mbms_id_p->service_id, mbms_id_p->session_id);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
key = RLC_COLL_KEY_VALUE(enb_mod_idP, ue_mod_idP, enb_flagP, rb_idP, srb_flagP);
|
key = RLC_COLL_KEY_VALUE(ctxt_pP->enb_module_id, ctxt_pP->ue_module_id, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -573,41 +531,41 @@ rlc_op_status_t rrc_rlc_remove_rlc (
|
|||||||
if (h_rc == HASH_TABLE_OK) {
|
if (h_rc == HASH_TABLE_OK) {
|
||||||
switch (rlc_union_p->mode) {
|
switch (rlc_union_p->mode) {
|
||||||
case RLC_MODE_AM:
|
case RLC_MODE_AM:
|
||||||
rlc_am_cleanup(&rlc_union_p->rlc.am);
|
rlc_am_cleanup(ctxt_pP, &rlc_union_p->rlc.am);
|
||||||
break;
|
break;
|
||||||
case RLC_MODE_UM:
|
case RLC_MODE_UM:
|
||||||
rlc_um_cleanup(&rlc_union_p->rlc.um);
|
rlc_um_cleanup(ctxt_pP, &rlc_union_p->rlc.um);
|
||||||
break;
|
break;
|
||||||
case RLC_MODE_TM:
|
case RLC_MODE_TM:
|
||||||
rlc_tm_cleanup(&rlc_union_p->rlc.tm);
|
rlc_tm_cleanup(ctxt_pP, &rlc_union_p->rlc.tm);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
h_rc = hashtable_remove(rlc_coll_p, key);
|
h_rc = hashtable_remove(rlc_coll_p, key);
|
||||||
LOG_D(RLC, "[Frame %05u][%s][RLC_RRC][INST %u/%u][%s %u] RELEASED %s\n",
|
LOG_D(RLC, "[Frame %05u][%s][RLC_RRC][INST %u/%u][%s %u] RELEASED %s\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
(srb_flagP) ? "SRB" : "DRB",
|
(srb_flagP) ? "SRB" : "DRB",
|
||||||
rb_idP,
|
rb_idP,
|
||||||
(srb_flagP) ? "SRB" : "DRB");
|
(srb_flagP) ? "SRB" : "DRB");
|
||||||
} else if (h_rc == HASH_TABLE_KEY_NOT_EXISTS) {
|
} else if (h_rc == HASH_TABLE_KEY_NOT_EXISTS) {
|
||||||
LOG_W(RLC, "[Frame %05u][%s][RLC_RRC][INST %u/%u][%s %u] RELEASE : RLC NOT FOUND %s\n",
|
LOG_W(RLC, "[Frame %05u][%s][RLC_RRC][INST %u/%u][%s %u] RELEASE : RLC NOT FOUND %s\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
(srb_flagP) ? "SRB" : "DRB",
|
(srb_flagP) ? "SRB" : "DRB",
|
||||||
rb_idP,
|
rb_idP,
|
||||||
(srb_flagP) ? "SRB" : "DRB");
|
(srb_flagP) ? "SRB" : "DRB");
|
||||||
} else {
|
} else {
|
||||||
LOG_E(RLC, "[Frame %05u][%s][RLC_RRC][INST %u/%u][%s %u] RELEASE : INTERNAL ERROR %s\n",
|
LOG_E(RLC, "[Frame %05u][%s][RLC_RRC][INST %u/%u][%s %u] RELEASE : INTERNAL ERROR %s\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
(srb_flagP) ? "SRB" : "DRB",
|
(srb_flagP) ? "SRB" : "DRB",
|
||||||
rb_idP,
|
rb_idP,
|
||||||
(srb_flagP) ? "SRB" : "DRB"); }
|
(srb_flagP) ? "SRB" : "DRB"); }
|
||||||
@@ -616,10 +574,7 @@ rlc_op_status_t rrc_rlc_remove_rlc (
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
rlc_union_t* rrc_rlc_add_rlc (
|
rlc_union_t* rrc_rlc_add_rlc (
|
||||||
const module_id_t enb_mod_idP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const module_id_t ue_mod_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t enb_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const MBMS_flag_t MBMS_flagP,
|
const MBMS_flag_t MBMS_flagP,
|
||||||
const rb_id_t rb_idP,
|
const rb_id_t rb_idP,
|
||||||
@@ -635,27 +590,27 @@ rlc_union_t* rrc_rlc_add_rlc (
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef OAI_EMU
|
#ifdef OAI_EMU
|
||||||
if (enb_flagP) {
|
if (ctxt_pP->enb_flag) {
|
||||||
AssertFatal ((enb_mod_idP >= oai_emulation.info.first_enb_local) && (oai_emulation.info.nb_enb_local > 0),
|
AssertFatal ((ctxt_pP->enb_module_id >= oai_emulation.info.first_enb_local) && (oai_emulation.info.nb_enb_local > 0),
|
||||||
"eNB module id is too low (%u/%d)!\n",
|
"eNB module id is too low (%u/%d)!\n",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
oai_emulation.info.first_enb_local);
|
oai_emulation.info.first_enb_local);
|
||||||
AssertFatal ((enb_mod_idP < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local)) && (oai_emulation.info.nb_enb_local > 0),
|
AssertFatal ((ctxt_pP->enb_module_id < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local)) && (oai_emulation.info.nb_enb_local > 0),
|
||||||
"eNB module id is too high (%u/%d)!\n",
|
"eNB module id is too high (%u/%d)!\n",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local);
|
oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local);
|
||||||
AssertFatal (ue_mod_idP < NB_UE_INST,
|
AssertFatal (ctxt_pP->ue_module_id < NB_UE_INST,
|
||||||
"UE module id is too high (%u/%d)!\n",
|
"UE module id is too high (%u/%d)!\n",
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
||||||
} else {
|
} else {
|
||||||
AssertFatal (ue_mod_idP < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local),
|
AssertFatal (ctxt_pP->ue_module_id < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local),
|
||||||
"UE module id is too high (%u/%d)!\n",
|
"UE module id is too high (%u/%d)!\n",
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
||||||
AssertFatal (ue_mod_idP >= oai_emulation.info.first_ue_local,
|
AssertFatal (ctxt_pP->ue_module_id >= oai_emulation.info.first_ue_local,
|
||||||
"UE module id is too low (%u/%d)!\n",
|
"UE module id is too low (%u/%d)!\n",
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
oai_emulation.info.first_ue_local);
|
oai_emulation.info.first_ue_local);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -666,39 +621,39 @@ rlc_union_t* rrc_rlc_add_rlc (
|
|||||||
|
|
||||||
#ifdef Rel10
|
#ifdef Rel10
|
||||||
if (MBMS_flagP == TRUE) {
|
if (MBMS_flagP == TRUE) {
|
||||||
if (enb_flagP) {
|
if (ctxt_pP->enb_flag) {
|
||||||
lcid = rlc_mbms_enb_get_lcid_by_rb_id(enb_mod_idP,rb_idP);
|
lcid = rlc_mbms_enb_get_lcid_by_rb_id(ctxt_pP->enb_module_id,rb_idP);
|
||||||
LOG_I(RLC,
|
LOG_I(RLC,
|
||||||
"[Frame %05u] lcid %d = rlc_mbms_enb_get_lcid_by_rb_id(enb_mod_idP %u, rb_idP %u)\n",
|
"[Frame %05u] lcid %d = rlc_mbms_enb_get_lcid_by_rb_id(ctxt_pP->enb_module_id %u, rb_idP %u)\n",
|
||||||
frameP,lcid, enb_mod_idP, rb_idP);
|
ctxt_pP->frame,lcid, ctxt_pP->enb_module_id, rb_idP);
|
||||||
|
|
||||||
mbms_id_p = &rlc_mbms_lcid2service_session_id_eNB[enb_mod_idP][lcid];
|
mbms_id_p = &rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->enb_module_id][lcid];
|
||||||
|
|
||||||
//LG 2014-04-15rlc_mbms_lcid2service_session_id_eNB[enb_mod_idP][lcid].service_id = 0;
|
//LG 2014-04-15rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->enb_module_id][lcid].service_id = 0;
|
||||||
//LG 2014-04-15rlc_mbms_lcid2service_session_id_eNB[enb_mod_idP][lcid].session_id = 0;
|
//LG 2014-04-15rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->enb_module_id][lcid].session_id = 0;
|
||||||
//LG 2014-04-15rlc_mbms_rbid2lcid_eNB[enb_mod_idP][rb_idP] = RLC_LC_UNALLOCATED;
|
//LG 2014-04-15rlc_mbms_rbid2lcid_eNB[ctxt_pP->enb_module_id][rb_idP] = RLC_LC_UNALLOCATED;
|
||||||
} else {
|
} else {
|
||||||
lcid = rlc_mbms_ue_get_lcid_by_rb_id(ue_mod_idP,rb_idP);
|
lcid = rlc_mbms_ue_get_lcid_by_rb_id(ctxt_pP->ue_module_id,rb_idP);
|
||||||
mbms_id_p = &rlc_mbms_lcid2service_session_id_ue[ue_mod_idP][lcid];
|
mbms_id_p = &rlc_mbms_lcid2service_session_id_ue[ctxt_pP->ue_module_id][lcid];
|
||||||
|
|
||||||
//LG 2014-04-15rlc_mbms_lcid2service_session_id_eNB[ue_mod_idP][lcid].service_id = 0;
|
//LG 2014-04-15rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->ue_module_id][lcid].service_id = 0;
|
||||||
//LG 2014-04-15rlc_mbms_lcid2service_session_id_eNB[ue_mod_idP][lcid].session_id = 0;
|
//LG 2014-04-15rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->ue_module_id][lcid].session_id = 0;
|
||||||
//LG 2014-04-15rlc_mbms_rbid2lcid_ue[ue_mod_idP][rb_idP] = RLC_LC_UNALLOCATED;
|
//LG 2014-04-15rlc_mbms_rbid2lcid_ue[ctxt_pP->ue_module_id][rb_idP] = RLC_LC_UNALLOCATED;
|
||||||
}
|
}
|
||||||
key = RLC_COLL_KEY_MBMS_VALUE(enb_mod_idP, ue_mod_idP, enb_flagP, mbms_id_p->service_id, mbms_id_p->session_id);
|
key = RLC_COLL_KEY_MBMS_VALUE(ctxt_pP->enb_module_id, ctxt_pP->ue_module_id, ctxt_pP->enb_flag, mbms_id_p->service_id, mbms_id_p->session_id);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
key = RLC_COLL_KEY_VALUE(enb_mod_idP, ue_mod_idP, enb_flagP, rb_idP, srb_flagP);
|
key = RLC_COLL_KEY_VALUE(ctxt_pP->enb_module_id, ctxt_pP->ue_module_id, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||||
}
|
}
|
||||||
|
|
||||||
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
|
||||||
if (h_rc == HASH_TABLE_OK) {
|
if (h_rc == HASH_TABLE_OK) {
|
||||||
LOG_W(RLC, "[Frame %05u][%s][RLC_RRC][INST %u/%u][%s %u] rrc_rlc_add_rlc , already exist %s\n",
|
LOG_W(RLC, "[Frame %05u][%s][RLC_RRC][INST %u/%u][%s %u] rrc_rlc_add_rlc , already exist %s\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
(srb_flagP) ? "SRB" : "DRB",
|
(srb_flagP) ? "SRB" : "DRB",
|
||||||
rb_idP,
|
rb_idP,
|
||||||
(srb_flagP) ? "SRB" : "DRB");
|
(srb_flagP) ? "SRB" : "DRB");
|
||||||
@@ -711,20 +666,20 @@ rlc_union_t* rrc_rlc_add_rlc (
|
|||||||
#ifdef Rel10
|
#ifdef Rel10
|
||||||
if (MBMS_flagP == TRUE) {
|
if (MBMS_flagP == TRUE) {
|
||||||
LOG_I(RLC, "[Frame %05u][%s][RLC_RRC][INST %u/%u] RLC service id %u session id %u rrc_rlc_add_rlc\n",
|
LOG_I(RLC, "[Frame %05u][%s][RLC_RRC][INST %u/%u] RLC service id %u session id %u rrc_rlc_add_rlc\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
mbms_id_p->service_id,
|
mbms_id_p->service_id,
|
||||||
mbms_id_p->session_id);
|
mbms_id_p->session_id);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
LOG_I(RLC, "[Frame %05u][%s][RLC_RRC][INST %u/%u][%s %u] rrc_rlc_add_rlc %s\n",
|
LOG_I(RLC, "[Frame %05u][%s][RLC_RRC][INST %u/%u][%s %u] rrc_rlc_add_rlc %s\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
(srb_flagP) ? "SRB" : "DRB",
|
(srb_flagP) ? "SRB" : "DRB",
|
||||||
rb_idP,
|
rb_idP,
|
||||||
(srb_flagP) ? "SRB" : "DRB");
|
(srb_flagP) ? "SRB" : "DRB");
|
||||||
@@ -733,10 +688,10 @@ rlc_union_t* rrc_rlc_add_rlc (
|
|||||||
return rlc_union_p;
|
return rlc_union_p;
|
||||||
} else {
|
} else {
|
||||||
LOG_E(RLC, "[Frame %05u][%s][RLC_RRC][INST %u/%u][%s %u] rrc_rlc_add_rlc FAILED %s\n",
|
LOG_E(RLC, "[Frame %05u][%s][RLC_RRC][INST %u/%u][%s %u] rrc_rlc_add_rlc FAILED %s\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
(srb_flagP) ? "SRB" : "DRB",
|
(srb_flagP) ? "SRB" : "DRB",
|
||||||
rb_idP,
|
rb_idP,
|
||||||
(srb_flagP) ? "SRB" : "DRB");
|
(srb_flagP) ? "SRB" : "DRB");
|
||||||
@@ -746,10 +701,10 @@ rlc_union_t* rrc_rlc_add_rlc (
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_E(RLC, "[Frame %05u][%s][RLC_RRC][INST %u/%u][%s %u] rrc_rlc_add_rlc , INTERNAL ERROR %s\n",
|
LOG_E(RLC, "[Frame %05u][%s][RLC_RRC][INST %u/%u][%s %u] rrc_rlc_add_rlc , INTERNAL ERROR %s\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
(srb_flagP) ? "SRB" : "DRB",
|
(srb_flagP) ? "SRB" : "DRB",
|
||||||
rb_idP,
|
rb_idP,
|
||||||
(srb_flagP) ? "SRB" : "DRB");
|
(srb_flagP) ? "SRB" : "DRB");
|
||||||
@@ -758,10 +713,7 @@ rlc_union_t* rrc_rlc_add_rlc (
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
rlc_op_status_t rrc_rlc_config_req (
|
rlc_op_status_t rrc_rlc_config_req (
|
||||||
const module_id_t enb_mod_idP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const module_id_t ue_mod_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t enb_flagP,
|
|
||||||
const srb_flag_t srb_flagP,
|
const srb_flag_t srb_flagP,
|
||||||
const MBMS_flag_t mbms_flagP,
|
const MBMS_flag_t mbms_flagP,
|
||||||
const config_action_t actionP,
|
const config_action_t actionP,
|
||||||
@@ -771,34 +723,34 @@ rlc_op_status_t rrc_rlc_config_req (
|
|||||||
rlc_op_status_t status;
|
rlc_op_status_t status;
|
||||||
|
|
||||||
LOG_D(RLC, "[FRAME %05u][%s][RLC][MOD %u/%u] CONFIG_REQ for Rab %u\n",
|
LOG_D(RLC, "[FRAME %05u][%s][RLC][MOD %u/%u] CONFIG_REQ for Rab %u\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
(enb_flagP) ? "eNB" : "UE",
|
(ctxt_pP->enb_flag) ? "eNB" : "UE",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rb_idP);
|
rb_idP);
|
||||||
|
|
||||||
#ifdef OAI_EMU
|
#ifdef OAI_EMU
|
||||||
if (enb_flagP) {
|
if (ctxt_pP->enb_flag) {
|
||||||
AssertFatal ((enb_mod_idP >= oai_emulation.info.first_enb_local) && (oai_emulation.info.nb_enb_local > 0),
|
AssertFatal ((ctxt_pP->enb_module_id >= oai_emulation.info.first_enb_local) && (oai_emulation.info.nb_enb_local > 0),
|
||||||
"eNB module id is too low (%u/%d)!\n",
|
"eNB module id is too low (%u/%d)!\n",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
oai_emulation.info.first_enb_local);
|
oai_emulation.info.first_enb_local);
|
||||||
AssertFatal ((enb_mod_idP < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local)) && (oai_emulation.info.nb_enb_local > 0),
|
AssertFatal ((ctxt_pP->enb_module_id < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local)) && (oai_emulation.info.nb_enb_local > 0),
|
||||||
"eNB module id is too high (%u/%d)!\n",
|
"eNB module id is too high (%u/%d)!\n",
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local);
|
oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local);
|
||||||
AssertFatal (ue_mod_idP < NB_UE_INST,
|
AssertFatal (ctxt_pP->ue_module_id < NB_UE_INST,
|
||||||
"UE module id is too high (%u/%d)!\n",
|
"UE module id is too high (%u/%d)!\n",
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
||||||
} else {
|
} else {
|
||||||
AssertFatal (ue_mod_idP < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local),
|
AssertFatal (ctxt_pP->ue_module_id < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local),
|
||||||
"UE module id is too high (%u/%d)!\n",
|
"UE module id is too high (%u/%d)!\n",
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
|
||||||
AssertFatal (ue_mod_idP >= oai_emulation.info.first_ue_local,
|
AssertFatal (ctxt_pP->ue_module_id >= oai_emulation.info.first_ue_local,
|
||||||
"UE module id is too low (%u/%d)!\n",
|
"UE module id is too low (%u/%d)!\n",
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
oai_emulation.info.first_ue_local);
|
oai_emulation.info.first_ue_local);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -806,7 +758,7 @@ rlc_op_status_t rrc_rlc_config_req (
|
|||||||
switch (actionP) {
|
switch (actionP) {
|
||||||
|
|
||||||
case CONFIG_ACTION_ADD:
|
case CONFIG_ACTION_ADD:
|
||||||
if (rrc_rlc_add_rlc(enb_mod_idP, ue_mod_idP, frameP, enb_flagP, srb_flagP, MBMS_FLAG_NO, rb_idP, rb_idP, rlc_infoP.rlc_mode) != NULL) {
|
if (rrc_rlc_add_rlc(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, rb_idP, rlc_infoP.rlc_mode) != NULL) {
|
||||||
return RLC_OP_STATUS_INTERNAL_ERROR;
|
return RLC_OP_STATUS_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
// no break, fall to next case
|
// no break, fall to next case
|
||||||
@@ -814,46 +766,37 @@ rlc_op_status_t rrc_rlc_config_req (
|
|||||||
switch (rlc_infoP.rlc_mode) {
|
switch (rlc_infoP.rlc_mode) {
|
||||||
case RLC_MODE_AM:
|
case RLC_MODE_AM:
|
||||||
LOG_I(RLC, "[Frame %05u][UE][RLC_RRC][INST %u/%u][RB %u] MODIFY RB AM\n",
|
LOG_I(RLC, "[Frame %05u][UE][RLC_RRC][INST %u/%u][RB %u] MODIFY RB AM\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rb_idP);
|
rb_idP);
|
||||||
|
|
||||||
config_req_rlc_am(
|
config_req_rlc_am(
|
||||||
enb_mod_idP,
|
ctxt_pP,
|
||||||
ue_mod_idP,
|
|
||||||
frameP,
|
|
||||||
enb_flagP,
|
|
||||||
srb_flagP,
|
srb_flagP,
|
||||||
&rlc_infoP.rlc.rlc_am_info,
|
&rlc_infoP.rlc.rlc_am_info,
|
||||||
rb_idP);
|
rb_idP);
|
||||||
break;
|
break;
|
||||||
case RLC_MODE_UM:
|
case RLC_MODE_UM:
|
||||||
LOG_I(RLC, "[Frame %05u][UE][RLC_RRC][INST %u/%u][RB %u] MODIFY RB UM\n",
|
LOG_I(RLC, "[Frame %05u][UE][RLC_RRC][INST %u/%u][RB %u] MODIFY RB UM\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rb_idP);
|
rb_idP);
|
||||||
config_req_rlc_um(
|
config_req_rlc_um(
|
||||||
enb_mod_idP,
|
ctxt_pP,
|
||||||
ue_mod_idP,
|
|
||||||
frameP,
|
|
||||||
enb_flagP,
|
|
||||||
srb_flagP,
|
srb_flagP,
|
||||||
&rlc_infoP.rlc.rlc_um_info,
|
&rlc_infoP.rlc.rlc_um_info,
|
||||||
rb_idP);
|
rb_idP);
|
||||||
break;
|
break;
|
||||||
case RLC_MODE_TM:
|
case RLC_MODE_TM:
|
||||||
LOG_I(RLC, "[Frame %05u][UE][RLC_RRC][INST %u/%u][RB %u] MODIFY RB TM\n",
|
LOG_I(RLC, "[Frame %05u][UE][RLC_RRC][INST %u/%u][RB %u] MODIFY RB TM\n",
|
||||||
frameP,
|
ctxt_pP->frame,
|
||||||
enb_mod_idP,
|
ctxt_pP->enb_module_id,
|
||||||
ue_mod_idP,
|
ctxt_pP->ue_module_id,
|
||||||
rb_idP);
|
rb_idP);
|
||||||
config_req_rlc_tm(
|
config_req_rlc_tm(
|
||||||
enb_mod_idP,
|
ctxt_pP,
|
||||||
ue_mod_idP,
|
|
||||||
frameP,
|
|
||||||
enb_flagP,
|
|
||||||
srb_flagP,
|
srb_flagP,
|
||||||
&rlc_infoP.rlc.rlc_tm_info,
|
&rlc_infoP.rlc.rlc_tm_info,
|
||||||
rb_idP);
|
rb_idP);
|
||||||
@@ -864,7 +807,7 @@ rlc_op_status_t rrc_rlc_config_req (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case CONFIG_ACTION_REMOVE:
|
case CONFIG_ACTION_REMOVE:
|
||||||
return rrc_rlc_remove_rlc(enb_mod_idP, ue_mod_idP, frameP, enb_flagP, srb_flagP, mbms_flagP, rb_idP);
|
return rrc_rlc_remove_rlc(ctxt_pP, srb_flagP, mbms_flagP, rb_idP);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return RLC_OP_STATUS_BAD_PARAMETER;
|
return RLC_OP_STATUS_BAD_PARAMETER;
|
||||||
@@ -874,10 +817,7 @@ rlc_op_status_t rrc_rlc_config_req (
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
rlc_op_status_t rrc_rlc_data_req (
|
rlc_op_status_t rrc_rlc_data_req (
|
||||||
const module_id_t enb_mod_idP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
const module_id_t ue_mod_idP,
|
|
||||||
const frame_t frameP,
|
|
||||||
const eNB_flag_t enb_flagP,
|
|
||||||
const MBMS_flag_t MBMS_flagP,
|
const MBMS_flag_t MBMS_flagP,
|
||||||
const rb_id_t rb_idP,
|
const rb_id_t rb_idP,
|
||||||
const mui_t muiP,
|
const mui_t muiP,
|
||||||
@@ -890,7 +830,7 @@ rlc_op_status_t rrc_rlc_data_req (
|
|||||||
sdu = get_free_mem_block(sdu_sizeP);
|
sdu = get_free_mem_block(sdu_sizeP);
|
||||||
if (sdu != NULL) {
|
if (sdu != NULL) {
|
||||||
memcpy (sdu->data, sduP, sdu_sizeP);
|
memcpy (sdu->data, sduP, sdu_sizeP);
|
||||||
return rlc_data_req(enb_mod_idP, ue_mod_idP, frameP, enb_flagP, SRB_FLAG_YES, MBMS_flagP, rb_idP, muiP, confirmP, sdu_sizeP, sdu);
|
return rlc_data_req(ctxt_pP, SRB_FLAG_YES, MBMS_flagP, rb_idP, muiP, confirmP, sdu_sizeP, sdu);
|
||||||
} else {
|
} else {
|
||||||
return RLC_OP_STATUS_INTERNAL_ERROR;
|
return RLC_OP_STATUS_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,9 +99,15 @@ int8_t mac_rrc_data_ind(module_id_t module_idP, frame_t frameP, rb_id_t srb_idP,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/********************************************************************************************************************/
|
/********************************************************************************************************************/
|
||||||
void rlcrrc_data_ind(module_id_t enb_instP, module_id_t ue_instP, frame_t frameP, eNB_flag_t eNB_flagP, rb_id_t srb_idP, sdu_size_t sdu_lenP,uint8_t *buffer_pP){
|
void rlcrrc_data_ind(const protocol_ctxt_t* const ctxt_pP, rb_id_t srb_idP, sdu_size_t sdu_lenP,uint8_t *buffer_pP){
|
||||||
/********************************************************************************************************************/
|
/********************************************************************************************************************/
|
||||||
rrc_lite_data_ind(enb_instP, ue_instP,frameP,eNB_flagP,srb_idP,sdu_lenP,buffer_pP);
|
rrc_lite_data_ind(ctxt_pP->enb_module_id,
|
||||||
|
ctxt_pP->ue_module_id,
|
||||||
|
ctxt_pP->frame,
|
||||||
|
ctxt_pP->enb_flag,
|
||||||
|
srb_idP,
|
||||||
|
sdu_lenP,
|
||||||
|
buffer_pP);
|
||||||
}
|
}
|
||||||
|
|
||||||
/********************************************************************************************************************/
|
/********************************************************************************************************************/
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ void mac_lite_sync_ind(module_id_t module_idP, uint8_t statusP);
|
|||||||
|
|
||||||
void mac_rrc_meas_ind(module_id_t, MAC_MEAS_REQ_ENTRY*);
|
void mac_rrc_meas_ind(module_id_t, MAC_MEAS_REQ_ENTRY*);
|
||||||
|
|
||||||
void rlcrrc_data_ind(module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame_t frameP, eNB_flag_t eNB_flagP, rb_id_t rb_idP, sdu_size_t sdu_sizeP, uint8_t *buffer_pP);
|
void rlcrrc_data_ind(const protocol_ctxt_t* const ctxt_pP, rb_id_t rb_idP, sdu_size_t sdu_sizeP, uint8_t *buffer_pP);
|
||||||
|
|
||||||
uint8_t pdcp_rrc_data_req(module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame_t frameP, eNB_flag_t eNB_flagP, rb_id_t rb_idP, mui_t muiP, boolean_t confirmP,
|
uint8_t pdcp_rrc_data_req(module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame_t frameP, eNB_flag_t eNB_flagP, rb_id_t rb_idP, mui_t muiP, boolean_t confirmP,
|
||||||
sdu_size_t sdu_buffer_size, uint8_t* sdu_buffer, uint8_t mode);
|
sdu_size_t sdu_buffer_size, uint8_t* sdu_buffer, uint8_t mode);
|
||||||
|
|||||||
@@ -520,7 +520,13 @@ uint8_t rrc_lite_data_req(module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame
|
|||||||
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
return pdcp_data_req (enb_mod_idP, ue_mod_idP, frameP, enb_flagP, SRB_FLAG_YES, rb_idP, muiP, confirmP, sdu_size, buffer_pP, mode);
|
protocol_ctxt_t ctxt;
|
||||||
|
ctxt.enb_module_id = enb_mod_idP;
|
||||||
|
ctxt.ue_module_id = ue_mod_idP;
|
||||||
|
ctxt.frame = frameP;
|
||||||
|
ctxt.enb_flag = enb_flagP;
|
||||||
|
|
||||||
|
return pdcp_data_req (&ctxt, SRB_FLAG_YES, rb_idP, muiP, confirmP, sdu_size, buffer_pP, mode);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+71
-18
@@ -815,6 +815,7 @@ rrc_ue_process_radioResourceConfigDedicated(module_id_t ue_mod_idP, frame_t fram
|
|||||||
long SRB_id,DRB_id;
|
long SRB_id,DRB_id;
|
||||||
int i,cnt;
|
int i,cnt;
|
||||||
LogicalChannelConfig_t *SRB1_logicalChannelConfig,*SRB2_logicalChannelConfig;
|
LogicalChannelConfig_t *SRB1_logicalChannelConfig,*SRB2_logicalChannelConfig;
|
||||||
|
protocol_ctxt_t ctxt;
|
||||||
#ifdef CBA
|
#ifdef CBA
|
||||||
uint8_t cba_found = 0;
|
uint8_t cba_found = 0;
|
||||||
uint16_t cba_RNTI;
|
uint16_t cba_RNTI;
|
||||||
@@ -885,8 +886,12 @@ rrc_ue_process_radioResourceConfigDedicated(module_id_t ue_mod_idP, frame_t fram
|
|||||||
UE_rrc_inst[ue_mod_idP].kenb, &kRRCint);
|
UE_rrc_inst[ue_mod_idP].kenb, &kRRCint);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Refresh SRBs
|
ctxt.enb_module_id = eNB_index;
|
||||||
rrc_pdcp_config_asn1_req(eNB_index,ue_mod_idP,frameP,0,
|
ctxt.ue_module_id = ue_mod_idP;
|
||||||
|
ctxt.frame = frameP;
|
||||||
|
ctxt.enb_flag = ENB_FLAG_NO;
|
||||||
|
// Refresh SRBs
|
||||||
|
rrc_pdcp_config_asn1_req(&ctxt,
|
||||||
radioResourceConfigDedicated->srb_ToAddModList,
|
radioResourceConfigDedicated->srb_ToAddModList,
|
||||||
(DRB_ToAddModList_t*)NULL,
|
(DRB_ToAddModList_t*)NULL,
|
||||||
(DRB_ToReleaseList_t*)NULL,
|
(DRB_ToReleaseList_t*)NULL,
|
||||||
@@ -901,7 +906,7 @@ rrc_ue_process_radioResourceConfigDedicated(module_id_t ue_mod_idP, frame_t fram
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Refresh SRBs
|
// Refresh SRBs
|
||||||
rrc_rlc_config_asn1_req(eNB_index,ue_mod_idP,frameP,0,
|
rrc_rlc_config_asn1_req(&ctxt,
|
||||||
radioResourceConfigDedicated->srb_ToAddModList,
|
radioResourceConfigDedicated->srb_ToAddModList,
|
||||||
(DRB_ToAddModList_t*)NULL,
|
(DRB_ToAddModList_t*)NULL,
|
||||||
(DRB_ToReleaseList_t*)NULL
|
(DRB_ToReleaseList_t*)NULL
|
||||||
@@ -1048,8 +1053,12 @@ rrc_ue_process_radioResourceConfigDedicated(module_id_t ue_mod_idP, frame_t fram
|
|||||||
UE_rrc_inst[ue_mod_idP].kenb, &kUPenc);
|
UE_rrc_inst[ue_mod_idP].kenb, &kUPenc);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
ctxt.enb_module_id = eNB_index;
|
||||||
|
ctxt.ue_module_id = ue_mod_idP;
|
||||||
|
ctxt.frame = frameP;
|
||||||
|
ctxt.enb_flag = ENB_FLAG_NO;
|
||||||
// Refresh DRBs
|
// Refresh DRBs
|
||||||
rrc_pdcp_config_asn1_req(eNB_index, ue_mod_idP,frameP,0,
|
rrc_pdcp_config_asn1_req(&ctxt,
|
||||||
(SRB_ToAddModList_t*)NULL,
|
(SRB_ToAddModList_t*)NULL,
|
||||||
radioResourceConfigDedicated->drb_ToAddModList,
|
radioResourceConfigDedicated->drb_ToAddModList,
|
||||||
(DRB_ToReleaseList_t*)NULL,
|
(DRB_ToReleaseList_t*)NULL,
|
||||||
@@ -1064,7 +1073,7 @@ rrc_ue_process_radioResourceConfigDedicated(module_id_t ue_mod_idP, frame_t fram
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Refresh DRBs
|
// Refresh DRBs
|
||||||
rrc_rlc_config_asn1_req(eNB_index,ue_mod_idP,frameP,0,
|
rrc_rlc_config_asn1_req(&ctxt,
|
||||||
(SRB_ToAddModList_t*)NULL,
|
(SRB_ToAddModList_t*)NULL,
|
||||||
radioResourceConfigDedicated->drb_ToAddModList,
|
radioResourceConfigDedicated->drb_ToAddModList,
|
||||||
(DRB_ToReleaseList_t*)NULL
|
(DRB_ToReleaseList_t*)NULL
|
||||||
@@ -1417,6 +1426,7 @@ void rrc_ue_process_rrcConnectionReconfiguration(module_id_t ue_mod_idP, frame_t
|
|||||||
void rrc_ue_process_mobilityControlInfo(uint8_t eNB_index, uint8_t UE_id, frame_t frameP, struct MobilityControlInfo *mobilityControlInfo)
|
void rrc_ue_process_mobilityControlInfo(uint8_t eNB_index, uint8_t UE_id, frame_t frameP, struct MobilityControlInfo *mobilityControlInfo)
|
||||||
{
|
{
|
||||||
module_id_t ue_mod_idP = UE_id;
|
module_id_t ue_mod_idP = UE_id;
|
||||||
|
protocol_ctxt_t ctxt;
|
||||||
/*
|
/*
|
||||||
DRB_ToReleaseList_t* drb2release_list;
|
DRB_ToReleaseList_t* drb2release_list;
|
||||||
DRB_Identity_t *lcid;
|
DRB_Identity_t *lcid;
|
||||||
@@ -1436,16 +1446,20 @@ void rrc_ue_process_mobilityControlInfo(uint8_t eNB_index, uint8_t UE_id, frame_
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
ctxt.enb_module_id = eNB_index;
|
||||||
|
ctxt.ue_module_id = ue_mod_idP;
|
||||||
|
ctxt.frame = frameP;
|
||||||
|
ctxt.enb_flag = ENB_FLAG_NO;
|
||||||
//Removing SRB1 and SRB2 and DRB0
|
//Removing SRB1 and SRB2 and DRB0
|
||||||
LOG_N(RRC,"[UE %d] : Update needed for rrc_pdcp_config_req (deprecated) and rrc_rlc_config_req commands(deprecated)\n", UE_id);
|
LOG_N(RRC,"[UE %d] : Update needed for rrc_pdcp_config_req (deprecated) and rrc_rlc_config_req commands(deprecated)\n", UE_id);
|
||||||
rrc_pdcp_config_req (eNB_index, UE_id, frameP, ENB_FLAG_NO, SRB_FLAG_YES, CONFIG_ACTION_REMOVE, DCCH,UNDEF_SECURITY_MODE);
|
rrc_pdcp_config_req (&ctxt, SRB_FLAG_YES, CONFIG_ACTION_REMOVE, DCCH,UNDEF_SECURITY_MODE);
|
||||||
rrc_rlc_config_req(eNB_index, ue_mod_idP,frameP,ENB_FLAG_NO, SRB_FLAG_YES, MBMS_FLAG_NO, CONFIG_ACTION_REMOVE,ue_mod_idP+DCCH,Rlc_info_am_config);
|
rrc_rlc_config_req(&ctxt, SRB_FLAG_YES, MBMS_FLAG_NO, CONFIG_ACTION_REMOVE,ue_mod_idP+DCCH,Rlc_info_am_config);
|
||||||
|
|
||||||
rrc_pdcp_config_req (eNB_index, UE_id, frameP, ENB_FLAG_NO, SRB_FLAG_YES, CONFIG_ACTION_REMOVE, DCCH1,UNDEF_SECURITY_MODE);
|
rrc_pdcp_config_req (&ctxt, SRB_FLAG_YES, CONFIG_ACTION_REMOVE, DCCH1,UNDEF_SECURITY_MODE);
|
||||||
rrc_rlc_config_req(eNB_index, ue_mod_idP,frameP,ENB_FLAG_NO, SRB_FLAG_YES,CONFIG_ACTION_REMOVE, MBMS_FLAG_NO,ue_mod_idP+DCCH1,Rlc_info_am_config);
|
rrc_rlc_config_req(&ctxt, SRB_FLAG_YES,CONFIG_ACTION_REMOVE, MBMS_FLAG_NO,ue_mod_idP+DCCH1,Rlc_info_am_config);
|
||||||
|
|
||||||
rrc_pdcp_config_req (eNB_index, UE_id, frameP, ENB_FLAG_NO, SRB_FLAG_NO, CONFIG_ACTION_REMOVE, DTCH,UNDEF_SECURITY_MODE);
|
rrc_pdcp_config_req (&ctxt, SRB_FLAG_NO, CONFIG_ACTION_REMOVE, DTCH,UNDEF_SECURITY_MODE);
|
||||||
rrc_rlc_config_req(eNB_index, ue_mod_idP,frameP,ENB_FLAG_NO, SRB_FLAG_NO,CONFIG_ACTION_REMOVE, MBMS_FLAG_NO,ue_mod_idP+DTCH,Rlc_info_um);
|
rrc_rlc_config_req(&ctxt, SRB_FLAG_NO,CONFIG_ACTION_REMOVE, MBMS_FLAG_NO,ue_mod_idP+DTCH,Rlc_info_um);
|
||||||
/*
|
/*
|
||||||
rrc_pdcp_config_asn1_req(NB_eNB_INST+ue_mod_idP,frameP, 0,eNB_index,
|
rrc_pdcp_config_asn1_req(NB_eNB_INST+ue_mod_idP,frameP, 0,eNB_index,
|
||||||
NULL, // SRB_ToAddModList
|
NULL, // SRB_ToAddModList
|
||||||
@@ -2188,12 +2202,20 @@ void dump_sib2(SystemInformationBlockType2_t *sib2) {
|
|||||||
LOG_D(RRC,"timeAlignmentTimerCommon : %ld\n", sib2->timeAlignmentTimerCommon);
|
LOG_D(RRC,"timeAlignmentTimerCommon : %ld\n", sib2->timeAlignmentTimerCommon);
|
||||||
}
|
}
|
||||||
|
|
||||||
void dump_sib3(SystemInformationBlockType3_t *sib3) {
|
void
|
||||||
|
dump_sib3(
|
||||||
|
SystemInformationBlockType3_t *sib3
|
||||||
|
)
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Rel10
|
#ifdef Rel10
|
||||||
void dump_sib13(SystemInformationBlockType13_r9_t *sib13) {
|
void
|
||||||
|
dump_sib13(
|
||||||
|
SystemInformationBlockType13_r9_t *sib13
|
||||||
|
)
|
||||||
|
{
|
||||||
|
|
||||||
LOG_D(RRC,"[RRC][UE] Dumping SIB13\n");
|
LOG_D(RRC,"[RRC][UE] Dumping SIB13\n");
|
||||||
LOG_D(RRC,"[RRC][UE] dumping sib13 second time\n");
|
LOG_D(RRC,"[RRC][UE] dumping sib13 second time\n");
|
||||||
@@ -2206,7 +2228,14 @@ void dump_sib13(SystemInformationBlockType13_r9_t *sib13) {
|
|||||||
|
|
||||||
//const char SIBPeriod[7][7]= {"80ms\0","160ms\0","320ms\0","640ms\0","1280ms\0","2560ms\0","5120ms\0"};
|
//const char SIBPeriod[7][7]= {"80ms\0","160ms\0","320ms\0","640ms\0","1280ms\0","2560ms\0","5120ms\0"};
|
||||||
|
|
||||||
int decode_SI(module_id_t ue_mod_idP, frame_t frameP,uint8_t eNB_index,uint8_t si_window) {
|
int
|
||||||
|
decode_SI(
|
||||||
|
module_id_t ue_mod_idP,
|
||||||
|
frame_t frameP,
|
||||||
|
uint8_t eNB_index,
|
||||||
|
uint8_t si_window
|
||||||
|
)
|
||||||
|
{
|
||||||
|
|
||||||
SystemInformation_t **si=&UE_rrc_inst[ue_mod_idP].si[eNB_index][si_window];
|
SystemInformation_t **si=&UE_rrc_inst[ue_mod_idP].si[eNB_index][si_window];
|
||||||
int i;
|
int i;
|
||||||
@@ -2400,7 +2429,13 @@ int decode_SI(module_id_t ue_mod_idP, frame_t frameP,uint8_t eNB_index,uint8_t s
|
|||||||
}
|
}
|
||||||
|
|
||||||
// layer 3 filtering of RSRP (EUTRA) measurements: 36.331, Sec. 5.5.3.2
|
// layer 3 filtering of RSRP (EUTRA) measurements: 36.331, Sec. 5.5.3.2
|
||||||
void ue_meas_filtering(module_id_t ue_mod_idP, frame_t frameP,uint8_t eNB_index){
|
void
|
||||||
|
ue_meas_filtering(
|
||||||
|
module_id_t ue_mod_idP,
|
||||||
|
frame_t frameP,
|
||||||
|
uint8_t eNB_index
|
||||||
|
)
|
||||||
|
{
|
||||||
float a = UE_rrc_inst[ue_mod_idP].filter_coeff_rsrp; // 'a' in 36.331 Sec. 5.5.3.2
|
float a = UE_rrc_inst[ue_mod_idP].filter_coeff_rsrp; // 'a' in 36.331 Sec. 5.5.3.2
|
||||||
float a1 = UE_rrc_inst[ue_mod_idP].filter_coeff_rsrq;
|
float a1 = UE_rrc_inst[ue_mod_idP].filter_coeff_rsrq;
|
||||||
//float rsrp_db, rsrq_db;
|
//float rsrp_db, rsrq_db;
|
||||||
@@ -2467,7 +2502,13 @@ void ue_meas_filtering(module_id_t ue_mod_idP, frame_t frameP,uint8_t eNB_index)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Below routine implements Measurement Reporting procedure from 36.331 Section 5.5.5
|
//Below routine implements Measurement Reporting procedure from 36.331 Section 5.5.5
|
||||||
void rrc_ue_generate_MeasurementReport(module_id_t eNB_id, module_id_t UE_id, frame_t frameP) {
|
void
|
||||||
|
rrc_ue_generate_MeasurementReport(
|
||||||
|
module_id_t eNB_id,
|
||||||
|
module_id_t UE_id,
|
||||||
|
frame_t frameP
|
||||||
|
)
|
||||||
|
{
|
||||||
|
|
||||||
uint8_t buffer[32], size;
|
uint8_t buffer[32], size;
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
@@ -2480,6 +2521,12 @@ void rrc_ue_generate_MeasurementReport(module_id_t eNB_id, module_id_t UE_id, fr
|
|||||||
float rsrp_filtered, rsrq_filtered;
|
float rsrp_filtered, rsrq_filtered;
|
||||||
static frame_t pframe=0;
|
static frame_t pframe=0;
|
||||||
int result;
|
int result;
|
||||||
|
protocol_ctxt_t ctxt;
|
||||||
|
|
||||||
|
ctxt.enb_module_id = eNB_id;
|
||||||
|
ctxt.ue_module_id = UE_id;
|
||||||
|
ctxt.frame = frameP;
|
||||||
|
ctxt.enb_flag = ENB_FLAG_NO;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -2520,7 +2567,7 @@ void rrc_ue_generate_MeasurementReport(module_id_t eNB_id, module_id_t UE_id, fr
|
|||||||
LOG_I(RRC, "[UE %d] Frame %d : Generating Measurement Report for eNB %d\n", UE_id, frameP, eNB_id);
|
LOG_I(RRC, "[UE %d] Frame %d : Generating Measurement Report for eNB %d\n", UE_id, frameP, eNB_id);
|
||||||
LOG_D(RLC, "[MSC_MSG][FRAME %05d][RRC_UE][UE %02d][][--- PDCP_DATA_REQ/%d Bytes (MeasurementReport to eNB %d MUI %d) --->][PDCP][MOD %02d][RB %02d]\n",
|
LOG_D(RLC, "[MSC_MSG][FRAME %05d][RRC_UE][UE %02d][][--- PDCP_DATA_REQ/%d Bytes (MeasurementReport to eNB %d MUI %d) --->][PDCP][MOD %02d][RB %02d]\n",
|
||||||
frameP, UE_id, size, eNB_id, rrc_mui, eNB_id, DCCH);
|
frameP, UE_id, size, eNB_id, rrc_mui, eNB_id, DCCH);
|
||||||
result = pdcp_data_req(eNB_id, UE_id, frameP, ENB_FLAG_NO, SRB_FLAG_YES, DCCH, rrc_mui++, 0, size, buffer, PDCP_TRANSMISSION_MODE_DATA);
|
result = pdcp_data_req(&ctxt, SRB_FLAG_YES, DCCH, rrc_mui++, 0, size, buffer, PDCP_TRANSMISSION_MODE_DATA);
|
||||||
AssertFatal (result == TRUE, "PDCP data request failed!\n");
|
AssertFatal (result == TRUE, "PDCP data request failed!\n");
|
||||||
//LOG_D(RRC, "[UE %d] Frame %d Sending MeasReport (%d bytes) through DCCH%d to PDCP \n",ue_mod_idP,frameP, size, DCCH);
|
//LOG_D(RRC, "[UE %d] Frame %d Sending MeasReport (%d bytes) through DCCH%d to PDCP \n",ue_mod_idP,frameP, size, DCCH);
|
||||||
}
|
}
|
||||||
@@ -2531,7 +2578,13 @@ void rrc_ue_generate_MeasurementReport(module_id_t eNB_id, module_id_t UE_id, fr
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Measurement report triggering, described in 36.331 Section 5.5.4.1: called periodically
|
// Measurement report triggering, described in 36.331 Section 5.5.4.1: called periodically
|
||||||
void ue_measurement_report_triggering(module_id_t ue_mod_idP, frame_t frameP,uint8_t eNB_index) {
|
void
|
||||||
|
ue_measurement_report_triggering(
|
||||||
|
module_id_t ue_mod_idP,
|
||||||
|
frame_t frameP,
|
||||||
|
uint8_t eNB_index
|
||||||
|
)
|
||||||
|
{
|
||||||
uint8_t i,j;
|
uint8_t i,j;
|
||||||
Hysteresis_t hys;
|
Hysteresis_t hys;
|
||||||
TimeToTrigger_t ttt_ms;
|
TimeToTrigger_t ttt_ms;
|
||||||
|
|||||||
@@ -301,6 +301,13 @@ void rrc_top_cleanup(void) {
|
|||||||
|
|
||||||
void rrc_t310_expiration(const frame_t frameP, uint8_t Mod_id, uint8_t eNB_index) {
|
void rrc_t310_expiration(const frame_t frameP, uint8_t Mod_id, uint8_t eNB_index) {
|
||||||
|
|
||||||
|
protocol_ctxt_t ctxt;
|
||||||
|
|
||||||
|
ctxt.enb_module_id = eNB_index;
|
||||||
|
ctxt.ue_module_id = Mod_id;
|
||||||
|
ctxt.frame = frameP;
|
||||||
|
ctxt.enb_flag = ENB_FLAG_NO;
|
||||||
|
|
||||||
if (UE_rrc_inst[Mod_id].Info[eNB_index].State != RRC_CONNECTED) {
|
if (UE_rrc_inst[Mod_id].Info[eNB_index].State != RRC_CONNECTED) {
|
||||||
LOG_D(RRC, "Timer 310 expired, going to RRC_IDLE\n");
|
LOG_D(RRC, "Timer 310 expired, going to RRC_IDLE\n");
|
||||||
UE_rrc_inst[Mod_id].Info[eNB_index].State = RRC_IDLE;
|
UE_rrc_inst[Mod_id].Info[eNB_index].State = RRC_IDLE;
|
||||||
@@ -315,10 +322,17 @@ void rrc_t310_expiration(const frame_t frameP, uint8_t Mod_id, uint8_t eNB_index
|
|||||||
if (UE_rrc_inst[Mod_id].Srb2[eNB_index].Active == 1) {
|
if (UE_rrc_inst[Mod_id].Srb2[eNB_index].Active == 1) {
|
||||||
msg ("[RRC Inst %d] eNB_index %d, Remove RB %d\n ", Mod_id, eNB_index,
|
msg ("[RRC Inst %d] eNB_index %d, Remove RB %d\n ", Mod_id, eNB_index,
|
||||||
UE_rrc_inst[Mod_id].Srb2[eNB_index].Srb_info.Srb_id);
|
UE_rrc_inst[Mod_id].Srb2[eNB_index].Srb_info.Srb_id);
|
||||||
rrc_pdcp_config_req (eNB_index, Mod_id, frameP, ENB_FLAG_NO, SRB_FLAG_YES, CONFIG_ACTION_REMOVE,
|
rrc_pdcp_config_req (&ctxt,
|
||||||
UE_rrc_inst[Mod_id].Srb2[eNB_index].Srb_info.Srb_id, 0);
|
SRB_FLAG_YES,
|
||||||
rrc_rlc_config_req (eNB_index, Mod_id, frameP, ENB_FLAG_NO, SRB_FLAG_YES, MBMS_FLAG_NO, CONFIG_ACTION_REMOVE,
|
CONFIG_ACTION_REMOVE,
|
||||||
UE_rrc_inst[Mod_id].Srb2[eNB_index].Srb_info.Srb_id, Rlc_info_um);
|
UE_rrc_inst[Mod_id].Srb2[eNB_index].Srb_info.Srb_id,
|
||||||
|
0);
|
||||||
|
rrc_rlc_config_req (&ctxt,
|
||||||
|
SRB_FLAG_YES,
|
||||||
|
MBMS_FLAG_NO,
|
||||||
|
CONFIG_ACTION_REMOVE,
|
||||||
|
UE_rrc_inst[Mod_id].Srb2[eNB_index].Srb_info.Srb_id,
|
||||||
|
Rlc_info_um);
|
||||||
UE_rrc_inst[Mod_id].Srb2[eNB_index].Active = 0;
|
UE_rrc_inst[Mod_id].Srb2[eNB_index].Active = 0;
|
||||||
UE_rrc_inst[Mod_id].Srb2[eNB_index].Status = IDLE;
|
UE_rrc_inst[Mod_id].Srb2[eNB_index].Status = IDLE;
|
||||||
UE_rrc_inst[Mod_id].Srb2[eNB_index].Next_check_frame = 0;
|
UE_rrc_inst[Mod_id].Srb2[eNB_index].Next_check_frame = 0;
|
||||||
|
|||||||
+60
-20
@@ -526,11 +526,13 @@ static module_id_t rrc_eNB_get_next_free_UE_index(
|
|||||||
return (UE_MODULE_INVALID);
|
return (UE_MODULE_INVALID);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rrc_eNB_free_UE_index(
|
void
|
||||||
|
rrc_eNB_free_UE_index(
|
||||||
module_id_t enb_mod_idP,
|
module_id_t enb_mod_idP,
|
||||||
module_id_t ue_mod_idP,
|
module_id_t ue_mod_idP,
|
||||||
int frameP) {
|
int frameP) {
|
||||||
|
|
||||||
|
protocol_ctxt_t ctxt;
|
||||||
DRB_ToAddModList_t *DRB_configList = eNB_rrc_inst[enb_mod_idP].DRB_configList[ue_mod_idP];
|
DRB_ToAddModList_t *DRB_configList = eNB_rrc_inst[enb_mod_idP].DRB_configList[ue_mod_idP];
|
||||||
SRB_ToAddModList_t *SRB_configList = eNB_rrc_inst[enb_mod_idP].SRB_configList[ue_mod_idP];
|
SRB_ToAddModList_t *SRB_configList = eNB_rrc_inst[enb_mod_idP].SRB_configList[ue_mod_idP];
|
||||||
|
|
||||||
@@ -552,8 +554,14 @@ void rrc_eNB_free_UE_index(
|
|||||||
#endif
|
#endif
|
||||||
eNB_rrc_inst[enb_mod_idP].Info.UE[ue_mod_idP].Status = RRC_IDLE;
|
eNB_rrc_inst[enb_mod_idP].Info.UE[ue_mod_idP].Status = RRC_IDLE;
|
||||||
eNB_rrc_inst[enb_mod_idP].Info.UE_list[ue_mod_idP] = 0;
|
eNB_rrc_inst[enb_mod_idP].Info.UE_list[ue_mod_idP] = 0;
|
||||||
rrc_rlc_remove_ue(enb_mod_idP, ue_mod_idP, frameP,ENB_FLAG_YES);
|
|
||||||
pdcp_remove_UE(enb_mod_idP, ue_mod_idP, frameP);
|
ctxt.enb_module_id = enb_mod_idP;
|
||||||
|
ctxt.ue_module_id = ue_mod_idP;
|
||||||
|
ctxt.frame = frameP;
|
||||||
|
ctxt.enb_flag = ENB_FLAG_YES;
|
||||||
|
|
||||||
|
rrc_rlc_remove_ue(&ctxt);
|
||||||
|
pdcp_remove_UE(&ctxt);
|
||||||
|
|
||||||
free(eNB_rrc_inst[enb_mod_idP].SRB_configList[ue_mod_idP]);
|
free(eNB_rrc_inst[enb_mod_idP].SRB_configList[ue_mod_idP]);
|
||||||
}
|
}
|
||||||
@@ -1437,11 +1445,19 @@ void rrc_eNB_process_handoverPreparationInformation(
|
|||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
void check_handovers(
|
void check_handovers(
|
||||||
module_id_t enb_mod_idP,
|
module_id_t enb_mod_idP,
|
||||||
frame_t frameP) {
|
frame_t frameP
|
||||||
|
)
|
||||||
|
{
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
int result;
|
int result;
|
||||||
|
protocol_ctxt_t ctxt;
|
||||||
|
|
||||||
|
ctxt.enb_module_id = enb_mod_idP;
|
||||||
|
ctxt.frame = frameP;
|
||||||
|
ctxt.enb_flag = ENB_FLAG_YES;
|
||||||
for (i = 0; i < NUMBER_OF_UE_MAX; i++) {
|
for (i = 0; i < NUMBER_OF_UE_MAX; i++) {
|
||||||
|
ctxt.ue_module_id = i;
|
||||||
|
|
||||||
if (eNB_rrc_inst[enb_mod_idP].handover_info[i] != NULL) {
|
if (eNB_rrc_inst[enb_mod_idP].handover_info[i] != NULL) {
|
||||||
if (eNB_rrc_inst[enb_mod_idP].handover_info[i]->ho_prepare == 0xFF) {
|
if (eNB_rrc_inst[enb_mod_idP].handover_info[i]->ho_prepare == 0xFF) {
|
||||||
LOG_D(RRC,
|
LOG_D(RRC,
|
||||||
@@ -1457,9 +1473,11 @@ void check_handovers(
|
|||||||
"[eNB %d] Frame %d: handover Command received for new UE_idx %d current eNB %d target eNB: %d \n",
|
"[eNB %d] Frame %d: handover Command received for new UE_idx %d current eNB %d target eNB: %d \n",
|
||||||
enb_mod_idP, frameP, i, enb_mod_idP, eNB_rrc_inst[enb_mod_idP].handover_info[i]->modid_t);
|
enb_mod_idP, frameP, i, enb_mod_idP, eNB_rrc_inst[enb_mod_idP].handover_info[i]->modid_t);
|
||||||
//rrc_eNB_process_handoverPreparationInformation(enb_mod_idP,frameP,i);
|
//rrc_eNB_process_handoverPreparationInformation(enb_mod_idP,frameP,i);
|
||||||
result = pdcp_data_req(enb_mod_idP, i, frameP, ENB_FLAG_YES, SRB_FLAG_YES,
|
result = pdcp_data_req(&ctxt,
|
||||||
|
SRB_FLAG_YES,
|
||||||
DCCH,
|
DCCH,
|
||||||
rrc_eNB_mui++, FALSE,
|
rrc_eNB_mui++,
|
||||||
|
FALSE,
|
||||||
eNB_rrc_inst[enb_mod_idP].handover_info[i]->size,
|
eNB_rrc_inst[enb_mod_idP].handover_info[i]->size,
|
||||||
eNB_rrc_inst[enb_mod_idP].handover_info[i]->buf, 1);
|
eNB_rrc_inst[enb_mod_idP].handover_info[i]->buf, 1);
|
||||||
AssertFatal(result == TRUE, "PDCP data request failed!\n");
|
AssertFatal(result == TRUE, "PDCP data request failed!\n");
|
||||||
@@ -1537,6 +1555,12 @@ void rrc_eNB_generate_RRCConnectionReconfiguration_handover(
|
|||||||
// phy config dedicated
|
// phy config dedicated
|
||||||
PhysicalConfigDedicated_t *physicalConfigDedicated2;
|
PhysicalConfigDedicated_t *physicalConfigDedicated2;
|
||||||
struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *dedicatedInfoNASList;
|
struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *dedicatedInfoNASList;
|
||||||
|
protocol_ctxt_t ctxt;
|
||||||
|
|
||||||
|
ctxt.enb_module_id = enb_mod_idP;
|
||||||
|
ctxt.ue_module_id = ue_mod_idP;
|
||||||
|
ctxt.frame = frameP;
|
||||||
|
ctxt.enb_flag = ENB_FLAG_YES;
|
||||||
|
|
||||||
LOG_D(RRC, "[eNB %d] Frame %d: handover preparation: get the newSourceUEIdentity (C-RNTI): ", enb_mod_idP, frameP);
|
LOG_D(RRC, "[eNB %d] Frame %d: handover preparation: get the newSourceUEIdentity (C-RNTI): ", enb_mod_idP, frameP);
|
||||||
for (i = 0; i < 2; i++) {
|
for (i = 0; i < 2; i++) {
|
||||||
@@ -2227,7 +2251,7 @@ void rrc_eNB_generate_RRCConnectionReconfiguration_handover(
|
|||||||
// rrc_pdcp_config_req (enb_mod_idP, frameP, 1, CONFIG_ACTION_ADD, idx, UNDEF_SECURITY_MODE);
|
// rrc_pdcp_config_req (enb_mod_idP, frameP, 1, CONFIG_ACTION_ADD, idx, UNDEF_SECURITY_MODE);
|
||||||
// rrc_rlc_config_req(enb_mod_idP,frameP,1,CONFIG_ACTION_ADD,Idx,SIGNALLING_RADIO_BEARER,Rlc_info_am_config);
|
// rrc_rlc_config_req(enb_mod_idP,frameP,1,CONFIG_ACTION_ADD,Idx,SIGNALLING_RADIO_BEARER,Rlc_info_am_config);
|
||||||
|
|
||||||
rrc_pdcp_config_asn1_req(enb_mod_idP, ue_mod_idP, frameP, 1,
|
rrc_pdcp_config_asn1_req(&ctxt,
|
||||||
eNB_rrc_inst[enb_mod_idP].SRB_configList[ue_mod_idP],
|
eNB_rrc_inst[enb_mod_idP].SRB_configList[ue_mod_idP],
|
||||||
(DRB_ToAddModList_t *) NULL, (DRB_ToReleaseList_t *) NULL, 0xff, NULL, NULL, NULL
|
(DRB_ToAddModList_t *) NULL, (DRB_ToReleaseList_t *) NULL, 0xff, NULL, NULL, NULL
|
||||||
#ifdef Rel10
|
#ifdef Rel10
|
||||||
@@ -2235,7 +2259,7 @@ void rrc_eNB_generate_RRCConnectionReconfiguration_handover(
|
|||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
|
||||||
rrc_rlc_config_asn1_req(enb_mod_idP, ue_mod_idP, frameP, 1,
|
rrc_rlc_config_asn1_req(&ctxt,
|
||||||
eNB_rrc_inst[enb_mod_idP].SRB_configList[ue_mod_idP],
|
eNB_rrc_inst[enb_mod_idP].SRB_configList[ue_mod_idP],
|
||||||
(DRB_ToAddModList_t *) NULL, (DRB_ToReleaseList_t *) NULL
|
(DRB_ToAddModList_t *) NULL, (DRB_ToReleaseList_t *) NULL
|
||||||
#ifdef Rel10
|
#ifdef Rel10
|
||||||
@@ -2366,6 +2390,12 @@ void rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
|||||||
|
|
||||||
DRB_ToAddModList_t *DRB_configList = eNB_rrc_inst[enb_mod_idP].DRB_configList[ue_mod_idP];
|
DRB_ToAddModList_t *DRB_configList = eNB_rrc_inst[enb_mod_idP].DRB_configList[ue_mod_idP];
|
||||||
SRB_ToAddModList_t *SRB_configList = eNB_rrc_inst[enb_mod_idP].SRB_configList[ue_mod_idP];
|
SRB_ToAddModList_t *SRB_configList = eNB_rrc_inst[enb_mod_idP].SRB_configList[ue_mod_idP];
|
||||||
|
protocol_ctxt_t ctxt;
|
||||||
|
|
||||||
|
ctxt.enb_module_id = enb_mod_idP;
|
||||||
|
ctxt.ue_module_id = ue_mod_idP;
|
||||||
|
ctxt.frame = frameP;
|
||||||
|
ctxt.enb_flag = ENB_FLAG_YES;
|
||||||
|
|
||||||
#if defined(ENABLE_SECURITY)
|
#if defined(ENABLE_SECURITY)
|
||||||
/* Derive the keys from kenb */
|
/* Derive the keys from kenb */
|
||||||
@@ -2410,7 +2440,8 @@ void rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
// Refresh SRBs/DRBs
|
// Refresh SRBs/DRBs
|
||||||
rrc_pdcp_config_asn1_req(enb_mod_idP, ue_mod_idP, frameP, ENB_FLAG_YES,
|
rrc_pdcp_config_asn1_req(
|
||||||
|
&ctxt,
|
||||||
NULL, //LG-RK 14/05/2014 SRB_configList,
|
NULL, //LG-RK 14/05/2014 SRB_configList,
|
||||||
DRB_configList, (DRB_ToReleaseList_t *) NULL,
|
DRB_configList, (DRB_ToReleaseList_t *) NULL,
|
||||||
/*eNB_rrc_inst[enb_mod_idP].ciphering_algorithm[ue_mod_idP] |
|
/*eNB_rrc_inst[enb_mod_idP].ciphering_algorithm[ue_mod_idP] |
|
||||||
@@ -2425,10 +2456,8 @@ void rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
|||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
// Refresh SRBs/DRBs
|
// Refresh SRBs/DRBs
|
||||||
rrc_rlc_config_asn1_req(enb_mod_idP,
|
rrc_rlc_config_asn1_req(
|
||||||
ue_mod_idP,
|
&ctxt,
|
||||||
frameP,
|
|
||||||
1,
|
|
||||||
NULL, //LG-RK 14/05/2014 SRB_configList,
|
NULL, //LG-RK 14/05/2014 SRB_configList,
|
||||||
DRB_configList,
|
DRB_configList,
|
||||||
(DRB_ToReleaseList_t *) NULL
|
(DRB_ToReleaseList_t *) NULL
|
||||||
@@ -2538,8 +2567,13 @@ void rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
|||||||
/* rrc_pdcp_config_req (enb_mod_idP, frameP, 1, CONFIG_ACTION_REMOVE,
|
/* rrc_pdcp_config_req (enb_mod_idP, frameP, 1, CONFIG_ACTION_REMOVE,
|
||||||
(ue_mod_idP * NB_RB_MAX) + DRB2LCHAN[i],UNDEF_SECURITY_MODE);
|
(ue_mod_idP * NB_RB_MAX) + DRB2LCHAN[i],UNDEF_SECURITY_MODE);
|
||||||
*/
|
*/
|
||||||
rrc_rlc_config_req(enb_mod_idP, ue_mod_idP, frameP, ENB_FLAG_YES, SRB_FLAG_NO, MBMS_FLAG_NO, CONFIG_ACTION_REMOVE,
|
rrc_rlc_config_req(
|
||||||
DRB2LCHAN[i], Rlc_info_um);
|
&ctxt,
|
||||||
|
SRB_FLAG_NO,
|
||||||
|
MBMS_FLAG_NO,
|
||||||
|
CONFIG_ACTION_REMOVE,
|
||||||
|
DRB2LCHAN[i],
|
||||||
|
Rlc_info_um);
|
||||||
}
|
}
|
||||||
eNB_rrc_inst[enb_mod_idP].DRB_active[ue_mod_idP][i] = 0;
|
eNB_rrc_inst[enb_mod_idP].DRB_active[ue_mod_idP][i] = 0;
|
||||||
LOG_D(RRC,
|
LOG_D(RRC,
|
||||||
@@ -2790,6 +2824,11 @@ int rrc_eNB_decode_ccch(
|
|||||||
RRCConnectionRequest_r8_IEs_t *rrcConnectionRequest;
|
RRCConnectionRequest_r8_IEs_t *rrcConnectionRequest;
|
||||||
RRCConnectionReestablishmentRequest_r8_IEs_t *rrcConnectionReestablishmentRequest;
|
RRCConnectionReestablishmentRequest_r8_IEs_t *rrcConnectionReestablishmentRequest;
|
||||||
int i, rval;
|
int i, rval;
|
||||||
|
protocol_ctxt_t ctxt;
|
||||||
|
|
||||||
|
ctxt.enb_module_id = enb_mod_idP;
|
||||||
|
ctxt.frame = frameP;
|
||||||
|
ctxt.enb_flag = ENB_FLAG_YES;
|
||||||
|
|
||||||
//memset(ul_ccch_msg,0,sizeof(UL_CCCH_Message_t));
|
//memset(ul_ccch_msg,0,sizeof(UL_CCCH_Message_t));
|
||||||
|
|
||||||
@@ -2865,8 +2904,7 @@ int rrc_eNB_decode_ccch(
|
|||||||
((rrcConnectionReestablishmentRequest->reestablishmentCause == ReestablishmentCause_otherFailure) ? "Other Failure" :
|
((rrcConnectionReestablishmentRequest->reestablishmentCause == ReestablishmentCause_otherFailure) ? "Other Failure" :
|
||||||
(rrcConnectionReestablishmentRequest->reestablishmentCause == ReestablishmentCause_handoverFailure) ? "Handover Failure" :
|
(rrcConnectionReestablishmentRequest->reestablishmentCause == ReestablishmentCause_handoverFailure) ? "Handover Failure" :
|
||||||
"reconfigurationFailure"));
|
"reconfigurationFailure"));
|
||||||
/*
|
/*{
|
||||||
{
|
|
||||||
uint64_t c_rnti = 0;
|
uint64_t c_rnti = 0;
|
||||||
|
|
||||||
memcpy(((uint8_t *) & c_rnti) + 3, rrcConnectionReestablishmentRequest.UE_identity.c_RNTI.buf,
|
memcpy(((uint8_t *) & c_rnti) + 3, rrcConnectionReestablishmentRequest.UE_identity.c_RNTI.buf,
|
||||||
@@ -2896,13 +2934,15 @@ int rrc_eNB_decode_ccch(
|
|||||||
rrcConnectionRequest = &ul_ccch_msg->message.choice.c1.choice.rrcConnectionRequest.criticalExtensions.choice.rrcConnectionRequest_r8;
|
rrcConnectionRequest = &ul_ccch_msg->message.choice.c1.choice.rrcConnectionRequest.criticalExtensions.choice.rrcConnectionRequest_r8;
|
||||||
{
|
{
|
||||||
uint64_t random_value = 0;
|
uint64_t random_value = 0;
|
||||||
|
|
||||||
memcpy(((uint8_t *) & random_value) + 3, rrcConnectionRequest->ue_Identity.choice.randomValue.buf,
|
memcpy(((uint8_t *) & random_value) + 3, rrcConnectionRequest->ue_Identity.choice.randomValue.buf,
|
||||||
rrcConnectionRequest->ue_Identity.choice.randomValue.size);
|
rrcConnectionRequest->ue_Identity.choice.randomValue.size);
|
||||||
ue_mod_id = rrc_eNB_get_next_free_UE_index(enb_mod_idP, random_value);
|
ue_mod_id = rrc_eNB_get_next_free_UE_index(enb_mod_idP, random_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ue_mod_id != UE_MODULE_INVALID) {
|
if (ue_mod_id != UE_MODULE_INVALID) {
|
||||||
|
ctxt.ue_module_id = ue_mod_id;
|
||||||
|
|
||||||
|
|
||||||
#if defined(ENABLE_ITTI)
|
#if defined(ENABLE_ITTI)
|
||||||
/* Check s-TMSI presence in message */
|
/* Check s-TMSI presence in message */
|
||||||
eNB_rrc_inst[enb_mod_idP].Info.UE[ue_mod_id].Initialue_identity_s_TMSI.presence =
|
eNB_rrc_inst[enb_mod_idP].Info.UE[ue_mod_id].Initialue_identity_s_TMSI.presence =
|
||||||
@@ -2966,7 +3006,7 @@ int rrc_eNB_decode_ccch(
|
|||||||
|
|
||||||
// rrc_rlc_config_req(enb_mod_idP,frameP,1,CONFIG_ACTION_ADD,Idx,SIGNALLING_RADIO_BEARER,Rlc_info_am_config);
|
// rrc_rlc_config_req(enb_mod_idP,frameP,1,CONFIG_ACTION_ADD,Idx,SIGNALLING_RADIO_BEARER,Rlc_info_am_config);
|
||||||
|
|
||||||
rrc_pdcp_config_asn1_req(enb_mod_idP, ue_mod_id, frameP, 1,
|
rrc_pdcp_config_asn1_req(&ctxt,
|
||||||
eNB_rrc_inst[enb_mod_idP].SRB_configList[ue_mod_id],
|
eNB_rrc_inst[enb_mod_idP].SRB_configList[ue_mod_id],
|
||||||
(DRB_ToAddModList_t *) NULL,
|
(DRB_ToAddModList_t *) NULL,
|
||||||
(DRB_ToReleaseList_t *) NULL, 0xff, NULL, NULL, NULL
|
(DRB_ToReleaseList_t *) NULL, 0xff, NULL, NULL, NULL
|
||||||
@@ -2975,7 +3015,7 @@ int rrc_eNB_decode_ccch(
|
|||||||
# endif
|
# endif
|
||||||
);
|
);
|
||||||
|
|
||||||
rrc_rlc_config_asn1_req(enb_mod_idP, ue_mod_id, frameP, 1,
|
rrc_rlc_config_asn1_req(&ctxt,
|
||||||
eNB_rrc_inst[enb_mod_idP].SRB_configList[ue_mod_id],
|
eNB_rrc_inst[enb_mod_idP].SRB_configList[ue_mod_id],
|
||||||
(DRB_ToAddModList_t *) NULL, (DRB_ToReleaseList_t *) NULL
|
(DRB_ToAddModList_t *) NULL, (DRB_ToReleaseList_t *) NULL
|
||||||
# ifdef Rel10
|
# ifdef Rel10
|
||||||
|
|||||||
@@ -292,6 +292,7 @@ static void rrc_pdcp_config_security(uint8_t enb_mod_idP, uint8_t ue_mod_idP, ui
|
|||||||
uint8_t *kUPenc = NULL;
|
uint8_t *kUPenc = NULL;
|
||||||
pdcp_t *pdcp_p = NULL;
|
pdcp_t *pdcp_p = NULL;
|
||||||
static int print_keys= 1;
|
static int print_keys= 1;
|
||||||
|
protocol_ctxt_t ctxt;
|
||||||
/* Derive the keys from kenb */
|
/* Derive the keys from kenb */
|
||||||
if (SRB_configList != NULL) {
|
if (SRB_configList != NULL) {
|
||||||
derive_key_up_enc(eNB_rrc_inst[enb_mod_idP].ciphering_algorithm[ue_mod_idP],
|
derive_key_up_enc(eNB_rrc_inst[enb_mod_idP].ciphering_algorithm[ue_mod_idP],
|
||||||
@@ -331,11 +332,13 @@ static void rrc_pdcp_config_security(uint8_t enb_mod_idP, uint8_t ue_mod_idP, ui
|
|||||||
|
|
||||||
pdcp_p = &pdcp_array_srb_eNB[enb_mod_idP][ue_mod_idP][DCCH-1];
|
pdcp_p = &pdcp_array_srb_eNB[enb_mod_idP][ue_mod_idP][DCCH-1];
|
||||||
|
|
||||||
pdcp_config_set_security(pdcp_p,
|
ctxt.enb_module_id = enb_mod_idP;
|
||||||
enb_mod_idP,
|
ctxt.ue_module_id = ue_mod_idP;
|
||||||
ue_mod_idP,
|
ctxt.frame = 0;
|
||||||
0,
|
ctxt.enb_flag = ENB_FLAG_YES;
|
||||||
ENB_FLAG_YES,
|
pdcp_config_set_security(
|
||||||
|
&ctxt,
|
||||||
|
pdcp_p,
|
||||||
DCCH,
|
DCCH,
|
||||||
DCCH+2,
|
DCCH+2,
|
||||||
(send_security_mode_command == TRUE) ?
|
(send_security_mode_command == TRUE) ?
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ void setBaseNetAddress(char* baseAddr);
|
|||||||
* \note
|
* \note
|
||||||
* @ingroup ?????
|
* @ingroup ?????
|
||||||
*/
|
*/
|
||||||
char* getBaseNetAddress();
|
char* getBaseNetAddress(void);
|
||||||
|
|
||||||
/*! \fn void setNetMask(char*)
|
/*! \fn void setNetMask(char*)
|
||||||
* \brief This function sets the new default network mask used
|
* \brief This function sets the new default network mask used
|
||||||
@@ -129,7 +129,7 @@ void setNetMask(char* baseAddr);
|
|||||||
* \note
|
* \note
|
||||||
* @ingroup ?????
|
* @ingroup ?????
|
||||||
*/
|
*/
|
||||||
char* getNetMask();
|
char* getNetMask(void);
|
||||||
|
|
||||||
/*! \fn coid setBroadcastAddress(char*)
|
/*! \fn coid setBroadcastAddress(char*)
|
||||||
* \brief This function sets the new broadcast address used
|
* \brief This function sets the new broadcast address used
|
||||||
@@ -145,7 +145,7 @@ void setBroadcastAddress(char* baseAddr);
|
|||||||
* \note
|
* \note
|
||||||
* @ingroup ?????
|
* @ingroup ?????
|
||||||
*/
|
*/
|
||||||
char* getBroadcastAddress();
|
char* getBroadcastAddress(void);
|
||||||
|
|
||||||
int bringInterfaceUp(char *interfaceName, int up);
|
int bringInterfaceUp(char *interfaceName, int up);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user