Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • pasolini/openairinterface5g
  • odukan/openairinterface5g
  • ewa/openairinterface5g
  • deksprime/openairinterface5g
  • jackokie/openairinterface5g
  • Srushti16/openairinterface5g
  • BRodolphe/openairinterface5g
  • kramantas/openairinterface5g
  • suraj_4g5g/openairinterface5g
  • turletti/openairinterface5g
  • anandriisc/openairinterface5g
  • lvguorong/openairinterface5g
  • dast/openairinterface5g
  • yashwanthr/openairinterface5g
  • ajiti2tb/openairinterface5g
  • qzhou/openairinterface5g
  • nickmxxx/openairinterface5g
  • bin_he4/openairinterface5g
  • delarco/openairinterface5g
  • limx1980/openairinterface5g
  • Aniq/openairinterface5g
  • yassir63/openairinterface5g
  • orc318/openairinterface5g
  • vader/openairinterface5g
  • limx59/openairinterface5g
  • nadavaati_12345/openairinterface5g
  • jenshz/openairinterface5g
  • kuldeep/openairinterface5g
  • lurker/openairinterface5g
  • shariat/openairinterface5g
  • Alireza.najafzadeh/openairinterface5g
  • Ling/openairinterface5g
  • EvanKrall/openairinterface5g
  • youyih/openairinterface5g
  • anindya/openairinterface5g
  • ahan/openairinterface5g
  • beraoud/openairinterface5g
  • obejarano/openairinterface5g
  • Monti/openairinterface5g
  • akhamsi/openairinterface5g
  • Worker.N/openairinterface5g
  • zhangtu/openairinterface5g
  • desouza/openairinterface5g
  • zhijun/openairinterface5g
  • sureshkumar/openairinterface5g
  • milan/openairinterface5g
  • bigbangbingo/openairinterface5g
  • platini/openairinterface5g
  • muralir-nv/openairinterface5g
  • Joshua_Zhang/openairinterface5g
  • siddharthmurali1/openairinterface5g
  • sorinros/openairinterface5g
  • elainecao/openairinterface5g
  • sneltved/openairinterface5g
  • aikaterini.trilyraki/openairinterface5g
  • wujunning11/openairinterface5g
  • magounak/openairinterface5g
  • ycl1729020039/openairinterface5g
  • mayukhweb/openairinterface5g
  • wataru/openairinterface5g
  • afonsoli/openairinterface5g
  • ppokar/openairinterface5g
  • emest/openairinterface5g
  • Najib/openairinterface5g
  • liqing/openairinterface5g
  • gprshome/openairinterface5g
  • Dvevgedveccc/openairinterface5g
  • Elena_Lukashova/openairinterface5g
  • imaneouss/openairinterface5g
  • yangyuan/openairinterface5g
  • ycliang/openairinterface5g
  • rohanfds/openairinterface5g
  • cong2008abc/openairinterface5g
  • Giovanni/openairinterface5g
  • willvegapunk/openairinterface5g
  • Chen/openairinterface5g
  • Ella/openairinterface5g
  • kollabalu/openairinterface5g
  • tsaichanglan/openairinterface5g
  • Artifice/openairinterface5g
  • HJR0129/openairinterface5g
  • alextp/openairinterface5g
  • Changron/openairinterface5g
  • pedosb/openairinterface5g
  • Flozzen/openairinterface5g
  • hobei/openairinterface5g
  • WP_Jing/openairinterface5g
  • reset4/openairinterface5g
  • alexjoseph/openairinterface5g
  • latuan1710/openairinterface5g
  • wynter-wang/openairinterface5g
  • stt12706/openairinterface5g
  • sy/openairinterface5g
  • dzxu/openairinterface5g
  • ptizoom/openairinterface5g
  • Thierry/openairinterface5g
  • tjamc80/openairinterface5g
  • yenmuse/openairinterface5g
  • archerling/openairinterface5g
  • grahul/openairinterface5g
  • ashish.shri/openairinterface5g
  • TianyuChen/openairinterface5g
  • cuixf1/openairinterface5g
  • Jan/openairinterface5g
  • jboatenng/openairinterface5g_gpio
  • geokal/openairinterface5g
  • johannhg/openairinterface5g
  • TofunmiA/openairinterface5g
  • razvanursu/openairinterface5g-mac-scheduling
  • Julio/openairinterface5g
  • fredrichx/openairinterface5g
  • nems/openairinterface5g
  • wb_li/openairinterface5g
  • ferrieux/openairinterface5g
  • prajna_g/openairinterface-5-g-xnap-ho
  • mtinasc/openairinterface5g
  • Hofschroeer/openairinterface5g
  • buptxiaofeng/openairinterface5g
  • fjgh_759/openairinterface5g
  • calcel/openairinterface5g
  • Reem/openairinterface5g
  • havar_mind/openairinterface5g
  • shrinish/openairinterface5g
  • YANGHELINDE/openairinterface5g
  • lool/openairinterface5g
  • raghav1900/openairinterface5g
  • allan1201/openairinterface5g
  • ferris/openairinterface5g
  • seanzw/openairinterface5g
  • emad72/openairinterface5g
  • guojilong123/openairinterface5g
  • Rony99/openairinterface5g
  • lity/openairinterface5g
  • sshrivastava/openairinterface5g
  • zhihengzhang/openairinterface5g
  • Rakesh_B_B/openairinterface5g
  • baleeiro/openairinterface5g
  • 19125064/openairinterface5g
  • linlin/openairinterface5g
  • NA1VE/openairinterface5g
  • oai1B/openairinterface5g
  • daveprice/openairinterface5g
  • mo/openairinterface5g
  • dhanmeet/openairinterface5g
  • mv2290/openairinterface-5-g-test
  • pagmatt/openairinterface5g
  • mmTestNYU/openairinterface5g
  • mmezzavilla/openairinterface5g
  • sudhakarb/openairinterface5g
  • mekki/openairinterface5g
  • virtanen/openairinterface5g
  • dyyu/openairinterface5g
  • mohammed_safwan/openairinterface5g
  • venkat/openairinterface5g
  • rupadhya/openairinterface5g
  • adjou/openairinterface5g
  • samiemostafavi/openairinterface5g-edaf
  • Sreeram/openairinterface5g
  • oliverxsch/openairinterface5g
  • oai/openairinterface5g
160 results
Show changes
Showing
with 309 additions and 338 deletions
This diff is collapsed.
......@@ -51,7 +51,7 @@ typedef rlc_op_status_t (*send_rlc_data_req_func_t)(const protocol_ctxt_t *cons
const rb_id_t, const mui_t,
confirm_t, sdu_size_t, mem_block_t *,const uint32_t *const, const uint32_t *const);
typedef boolean_t (pdcp_data_ind_t)( const protocol_ctxt_t *, const srb_flag_t,
typedef bool (pdcp_data_ind_t)( const protocol_ctxt_t *, const srb_flag_t,
const MBMS_flag_t, const rb_id_t, const sdu_size_t,
mem_block_t *,const uint32_t *const, const uint32_t *const);
typedef pdcp_data_ind_t* pdcp_data_ind_func_t;
......@@ -153,14 +153,13 @@ typedef struct pdcp_stats_s {
typedef struct pdcp_s {
//boolean_t instanciated_instance;
uint16_t header_compression_profile;
/* SR: added this flag to distinguish UE/eNB instance as pdcp_run for virtual
* mode can receive data on NETLINK for eNB while eNB_flag = 0 and for UE when eNB_flag = 1
*/
boolean_t is_ue;
boolean_t is_srb;
bool is_ue;
bool is_srb;
/* Configured security algorithms */
uint8_t cipheringAlgorithm;
......@@ -217,7 +216,7 @@ typedef struct pdcp_s {
} pdcp_t;
typedef struct pdcp_mbms_s {
boolean_t instanciated_instance;
bool instanciated_instance;
rb_id_t rb_id;
} pdcp_mbms_t;
......@@ -230,7 +229,7 @@ typedef struct pdcp_mbms_s {
* under targets/TEST/PDCP/
*/
/*! \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 )
/*! \fn bool 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
* \param[in] ctxt_pP Running context.
* \param[in] rab_id Radio Bearer ID
......@@ -239,38 +238,34 @@ typedef struct pdcp_mbms_s {
* \param[in] sdu_buffer_size Size of incoming SDU in bytes
* \param[in] sdu_buffer Buffer carrying SDU
* \param[in] mode flag to indicate whether the userplane data belong to the control plane or data plane or transparent
* \return TRUE on success, FALSE otherwise
* \return true on success, false otherwise
* \note None
* @ingroup _pdcp
*/
boolean_t pdcp_data_req(
protocol_ctxt_t *ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_id,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t mode,
const uint32_t * sourceL2Id,
const uint32_t * destinationL2Id
);
boolean_t cu_f1u_data_req(
protocol_ctxt_t *ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_id,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t mode,
const uint32_t *const sourceL2Id,
const uint32_t *const destinationL2Id
);
/*! \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)
bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_id,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t mode,
const uint32_t * sourceL2Id,
const uint32_t * destinationL2Id);
bool cu_f1u_data_req(protocol_ctxt_t *ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_id,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t mode,
const uint32_t *const sourceL2Id,
const uint32_t *const destinationL2Id);
/*! \fn bool pdcp_data_ind(const protocol_ctxt_t* const, srb_flag_t, MBMS_flag_t, rb_id_t, sdu_size_t, mem_block_t*, bool)
* \brief This functions handles data transfer indications coming from RLC
* \param[in] ctxt_pP Running context.
* \param[in] Shows if rb is SRB
......@@ -279,7 +274,7 @@ boolean_t cu_f1u_data_req(
* \param[in] sdu_buffer_size Size of incoming SDU in bytes
* \param[in] sdu_buffer Buffer carrying SDU
* \param[in] is_data_plane flag to indicate whether the userplane data belong to the control plane or data plane
* \return TRUE on success, FALSE otherwise
* \return TRUE on success, false otherwise
* \note None
* @ingroup _pdcp
*/
......@@ -316,20 +311,18 @@ void rrc_pdcp_config_req (
* \param[in] defaultDRB Default DRB ID
* \return A status about the processing, OK or error code.
*/
boolean_t rrc_pdcp_config_asn1_req (
const protocol_ctxt_t *const ctxt_pP,
LTE_SRB_ToAddModList_t *const srb2add_list,
LTE_DRB_ToAddModList_t *const drb2add_list,
LTE_DRB_ToReleaseList_t *const drb2release_list,
const uint8_t security_modeP,
uint8_t *const kRRCenc,
uint8_t *const kRRCint,
uint8_t *const kUPenc,
LTE_PMCH_InfoList_r9_t *pmch_InfoList_r9,
rb_id_t *const defaultDRB
);
/*! \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)
bool rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
LTE_SRB_ToAddModList_t *const srb2add_list,
LTE_DRB_ToAddModList_t *const drb2add_list,
LTE_DRB_ToReleaseList_t *const drb2release_list,
const uint8_t security_modeP,
uint8_t *const kRRCenc,
uint8_t *const kRRCint,
uint8_t *const kUPenc,
LTE_PMCH_InfoList_r9_t *pmch_InfoList_r9,
rb_id_t *const defaultDRB);
/*! \fn bool 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.
* \param[in] ctxt_pP Running context.
* \param[in] pdcp_pP Pointer on PDCP structure.
......@@ -349,22 +342,21 @@ boolean_t rrc_pdcp_config_asn1_req (
* \param[in] kUPenc User-Plane encryption key
* \return A status about the processing, OK or error code.
*/
boolean_t pdcp_config_req_asn1 (
const protocol_ctxt_t *const ctxt_pP,
pdcp_t *const pdcp_pP,
const srb_flag_t srb_flagP,
const rlc_mode_t rlc_mode,
const uint32_t action,
const uint16_t lc_id,
const uint16_t mch_id,
const rb_id_t rb_id,
const uint8_t rb_sn,
const uint8_t rb_report,
const uint16_t header_compression_profile,
const uint8_t security_mode,
uint8_t *const kRRCenc,
uint8_t *const kRRCint,
uint8_t *const kUPenc);
bool pdcp_config_req_asn1(const protocol_ctxt_t *const ctxt_pP,
pdcp_t *const pdcp_pP,
const srb_flag_t srb_flagP,
const rlc_mode_t rlc_mode,
const uint32_t action,
const uint16_t lc_id,
const uint16_t mch_id,
const rb_id_t rb_id,
const uint8_t rb_sn,
const uint8_t rb_report,
const uint16_t header_compression_profile,
const uint8_t security_mode,
uint8_t *const kRRCenc,
uint8_t *const kRRCint,
uint8_t *const kUPenc);
/*! \fn void pdcp_add_UE(const protocol_ctxt_t* const ctxt_pP)
* \brief Function (for RRC) to add a new UE in PDCP module
......@@ -373,13 +365,12 @@ boolean_t pdcp_config_req_asn1 (
*/
void pdcp_add_UE(const protocol_ctxt_t *const ctxt_pP);
/*! \fn boolean_t pdcp_remove_UE(const protocol_ctxt_t* const ctxt_pP)
/*! \fn bool pdcp_remove_UE(const protocol_ctxt_t* const ctxt_pP)
* \brief Function for RRC to remove UE from PDCP module hashtable
* \param[in] ctxt_pP Running context.
* \return A status about the processing, OK or error code.
*/
boolean_t pdcp_remove_UE(
const protocol_ctxt_t *const ctxt_pP);
bool pdcp_remove_UE(const protocol_ctxt_t *const ctxt_pP);
/*! \fn void rrc_pdcp_config_release( const protocol_ctxt_t* const, rb_id_t)
* \brief This functions is unused
......
......@@ -32,7 +32,7 @@
#include "pdcp.h"
#include "pdcp_primitives.h"
extern boolean_t util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index);
extern bool util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index);
/*
* Parses data/control field out of buffer of User Plane PDCP Data PDU with
......@@ -123,13 +123,13 @@ uint8_t pdcp_get_sequence_number_of_pdu_with_SRB_sn(unsigned char* pdu_buffer)
* Fills the incoming buffer with the fields of the header for srb sn
*
* @param pdu_buffer PDCP PDU buffer
* @return TRUE on success, FALSE otherwise
* @return true on success, false otherwise
*/
boolean_t pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer(unsigned char* pdu_buffer, \
pdcp_control_plane_data_pdu_header* pdu)
bool pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer(unsigned char* pdu_buffer,
pdcp_control_plane_data_pdu_header* pdu)
{
if (pdu_buffer == NULL || pdu == NULL) {
return FALSE;
return false;
}
/*
......@@ -138,20 +138,20 @@ boolean_t pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer(unsigned char
uint8_t sequence_number = pdu->sn;
pdu_buffer[0] = sequence_number & 0x1F; // 5bit sn
return TRUE;
return true;
}
/*
* Fills the incoming buffer with the fields of the header for long sn
*
* @param pdu_buffer PDCP PDU buffer
* @return TRUE on success, FALSE otherwise
* @return true on success, false otherwise
*/
boolean_t pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char* pdu_buffer, \
pdcp_user_plane_data_pdu_header_with_long_sn* pdu)
bool pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char* pdu_buffer,
pdcp_user_plane_data_pdu_header_with_long_sn* pdu)
{
if (pdu_buffer == NULL || pdu == NULL) {
return FALSE;
return false;
}
/*
......@@ -170,7 +170,7 @@ boolean_t pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char*
pdu_buffer[0] |= 0x80; // set the first bit as 1
}
return TRUE;
return true;
}
/*
......@@ -178,13 +178,14 @@ boolean_t pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char*
*
* @param pdu_buffer The buffer that PDU will be serialized into
* @param pdu A status report header
* @return TRUE on success, FALSE otherwise
* @return true on success, false otherwise
*/
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)
bool pdcp_serialize_control_pdu_for_pdcp_status_report(unsigned char* pdu_buffer,
uint8_t bitmap[512],
pdcp_control_pdu_for_pdcp_status_report* pdu)
{
if (pdu_buffer == NULL || pdu == NULL) {
return FALSE;
return false;
}
/*
......@@ -205,6 +206,6 @@ boolean_t pdcp_serialize_control_pdu_for_pdcp_status_report(unsigned char* pdu_b
*/
memcpy(pdu_buffer + 2, bitmap, 512);
return TRUE;
return true;
}
......@@ -142,18 +142,18 @@ uint8_t pdcp_get_sequence_number_of_pdu_with_SRB_sn(unsigned char* pdu_buffer);
* Fills the incoming buffer with the fields of the header for SRB1
*
* @param pdu_buffer PDCP PDU buffer
* @return TRUE on success, FALSE otherwise
* @return true on success, false otherwise
*/
boolean_t pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer(unsigned char* pdu_buffer, \
pdcp_control_plane_data_pdu_header* pdu);
bool pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer(unsigned char* pdu_buffer,
pdcp_control_plane_data_pdu_header* pdu);
/*
* Fills the incoming buffer with the fields of the header for long SN (RLC UM and AM)
*
* @param pdu_buffer PDCP PDU buffer
* @return TRUE on success, FALSE otherwise
* @return true on success, false otherwise
*/
boolean_t pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char* pdu_buffer, \
pdcp_user_plane_data_pdu_header_with_long_sn* pdu);
bool pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char* pdu_buffer,
pdcp_user_plane_data_pdu_header_with_long_sn* pdu);
/*
* Fills the incoming status report header with given value of bitmap
......@@ -162,10 +162,11 @@ boolean_t pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char*
* @param FMS First Missing PDCP SN
* @param bitmap Received/Missing sequence number bitmap
* @param pdu A status report header
* @return TRUE on success, FALSE otherwise
* @return true on success, false otherwise
*/
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);
bool pdcp_serialize_control_pdu_for_pdcp_status_report(unsigned char* pdu_buffer,
uint8_t bitmap[512],
pdcp_control_pdu_for_pdcp_status_report* pdu);
int pdcp_netlink_dequeue_element(const protocol_ctxt_t* const ctxt_pP,
struct pdcp_netlink_element_s **data_ppP);
......
......@@ -33,12 +33,12 @@
/*
* Initializes sequence numbering state
* @param pdcp_entity The PDCP entity to be initialized
* @return boolean_t TRUE on success, FALSE otherwise
* @return bool true on success, false otherwise
*/
boolean_t pdcp_init_seq_numbers(pdcp_t* pdcp_entity)
bool pdcp_init_seq_numbers(pdcp_t* pdcp_entity)
{
if (pdcp_entity == NULL) {
return FALSE;
return false;
}
/* Sequence number state variables */
......@@ -55,34 +55,34 @@ boolean_t pdcp_init_seq_numbers(pdcp_t* pdcp_entity)
// Shall UE and eNB behave differently on initialization? (see 7.1.e)
pdcp_entity->last_submitted_pdcp_rx_sn = 4095;
return TRUE;
return true;
}
boolean_t pdcp_is_seq_num_size_valid(pdcp_t* pdcp_entity)
bool pdcp_is_seq_num_size_valid(pdcp_t* pdcp_entity)
{
if (pdcp_entity == NULL) {
return FALSE;
return false;
}
// Check if the size of SN is valid (see 3GPP TS 36.323 v10.1.0 item 6.3.2)
if (pdcp_entity->seq_num_size != 5 && pdcp_entity->seq_num_size != 7 && pdcp_entity->seq_num_size != 12) {
LOG_W(PDCP, "Incoming SN size is invalid! (Expected: {5 | 7 | 12}, Received: %d\n", pdcp_entity->seq_num_size);
return FALSE;
return false;
}
return TRUE;
return true;
}
/**
* Check if SN number is in the range according to SN size
*/
boolean_t pdcp_is_seq_num_valid(uint16_t seq_num, uint8_t seq_num_size)
bool pdcp_is_seq_num_valid(uint16_t seq_num, uint8_t seq_num_size)
{
if (seq_num >= 0 && seq_num <= pdcp_calculate_max_seq_num_for_given_size(seq_num_size)) {
return TRUE;
return true;
}
return FALSE;
return false;
}
uint16_t pdcp_calculate_max_seq_num_for_given_size(uint8_t seq_num_size)
......@@ -96,7 +96,7 @@ uint16_t pdcp_calculate_max_seq_num_for_given_size(uint8_t seq_num_size)
uint16_t pdcp_get_next_tx_seq_number(pdcp_t* pdcp_entity)
{
if (pdcp_is_seq_num_size_valid(pdcp_entity) == FALSE) {
if (pdcp_is_seq_num_size_valid(pdcp_entity) == false) {
return -1;
}
......@@ -118,10 +118,10 @@ uint16_t pdcp_get_next_tx_seq_number(pdcp_t* pdcp_entity)
return pdcp_seq_num;
}
boolean_t pdcp_advance_rx_window(pdcp_t* pdcp_entity)
bool pdcp_advance_rx_window(pdcp_t* pdcp_entity)
{
if (pdcp_is_seq_num_size_valid(pdcp_entity) == FALSE) {
return FALSE;
if (pdcp_is_seq_num_size_valid(pdcp_entity) == false) {
return false;
}
/*
......@@ -137,10 +137,10 @@ boolean_t pdcp_advance_rx_window(pdcp_t* pdcp_entity)
pdcp_entity->next_pdcp_rx_sn++;
}
return TRUE;
return true;
}
boolean_t pdcp_mark_current_pdu_as_received(uint16_t seq_num, pdcp_t* pdcp_entity)
bool pdcp_mark_current_pdu_as_received(uint16_t seq_num, pdcp_t* pdcp_entity)
{
/*
* Incoming sequence number and PDCP entity were already
......@@ -158,5 +158,5 @@ boolean_t pdcp_mark_current_pdu_as_received(uint16_t seq_num, pdcp_t* pdcp_entit
LOG_D(PDCP, "Marking %d. bit of %d. octet of status bitmap\n", (seq_num % 8) + 1, octet_index);
util_mark_nth_bit_of_octet(&pdcp_entity->missing_pdu_bitmap[octet_index], seq_num % 8);
util_print_binary_representation((uint8_t*)"Current state of relevant octet: ", pdcp_entity->missing_pdu_bitmap[octet_index]);
return TRUE;
return true;
}
......@@ -35,17 +35,17 @@
* @param pdcp_entity The PDCP entity to be initialized
* @return none
*/
boolean_t pdcp_init_seq_numbers(pdcp_t* pdcp_entity);
bool pdcp_init_seq_numbers(pdcp_t* pdcp_entity);
/**
* Checks if incoming PDCP entitiy pointer and relevant sequence number size is valid
* @return TRUE (0x01) if it is valid, FALSE (0x00) otherwise
* @return true (0x01) if it is valid, false (0x00) otherwise
*/
boolean_t pdcp_is_seq_num_size_valid(pdcp_t* pdcp_entity);
bool pdcp_is_seq_num_size_valid(pdcp_t* pdcp_entity);
/**
* Check if SN number is in the range according to SN size
* @return TRUE if it is valid, FALSE otherwise
* @return true if it is valid, false otherwise
*/
boolean_t pdcp_is_seq_num_valid(uint16_t seq_num, uint8_t seq_num_size);
bool pdcp_is_seq_num_valid(uint16_t seq_num, uint8_t seq_num_size);
/**
* Returns the maximum allowed sequence number value for given size of SN field
* @return Max sequence number value
......@@ -58,11 +58,11 @@ uint16_t pdcp_get_next_tx_seq_number(pdcp_t* pdcp_entity);
/**
* Advances the RX window state of given PDCP entity upon successfull receipt of a SDU
*/
boolean_t pdcp_advance_rx_window(pdcp_t* pdcp_entity);
bool pdcp_advance_rx_window(pdcp_t* pdcp_entity);
/**
* Updates missing PDU bitmap with incoming sequence number
* @return TRUE if successful, FALSE otherwise
* @return true if successful, false otherwise
*/
boolean_t pdcp_mark_current_pdu_as_received(uint16_t seq_num, pdcp_t* pdcp_entity);
bool pdcp_mark_current_pdu_as_received(uint16_t seq_num, pdcp_t* pdcp_entity);
#endif
......@@ -130,9 +130,9 @@ void util_print_binary_representation(unsigned char* message, uint8_t octet)
*
* @param octet 8-bit data
* @param index Index of bit to be set
* @return TRUE on success, FALSE otherwise
* @return true on success, false otherwise
*/
boolean_t util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index)
bool util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index)
{
uint8_t mask = 0x80;
......@@ -148,6 +148,6 @@ boolean_t util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index)
*/
*octet |= mask;
return TRUE;
return true;
}
......@@ -66,8 +66,8 @@ void util_print_binary_representation(unsigned char* message, uint8_t octet);
*
* @param octet Octet
* @param index Index
* @return TRUE on success, FALSE otherwise
* @return true on success, false otherwise
*/
boolean_t util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index);
bool util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index);
#endif // PDCP_UTIL_H
......@@ -52,7 +52,7 @@ rlc_am_get_status_pdu_buffer_occupancy(
rlc_sn_t sn_cursor = rlc_pP->vr_r;
rlc_sn_t sn_prev = rlc_pP->vr_r;
rlc_sn_t sn_end = rlc_pP->vr_ms;
boolean_t segment_loop_end = false;
bool segment_loop_end = false;
if (sn_prev != sn_end) {
while ((RLC_AM_DIFF_SN(sn_prev,rlc_pP->vr_r) < RLC_AM_DIFF_SN(sn_end,rlc_pP->vr_r)) && (cursor_p != NULL)) {
......
......@@ -54,7 +54,7 @@ typedef struct rlc_am_entity_s {
rb_id_t rb_id; /*!< \brief Radio bearer identifier, for statistics and trace purpose. */
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. */
bool 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. */
rlc_buffer_occupancy_t sdu_buffer_occupancy; /*!< \brief Number of bytes of unsegmented SDUs. */
rlc_buffer_occupancy_t status_buffer_occupancy; /*!< \brief Number of bytes of control PDUs waiting for transmission. */
......@@ -76,7 +76,7 @@ typedef struct rlc_am_entity_s {
rlc_am_tx_data_pdu_management_t *tx_data_pdu_buffer; /*!< \brief Transmission PDU data buffer. Used also for retransmissions */
signed int retrans_num_pdus; /*!< \brief Number of PDUs in the retransmission buffer. */
signed int retrans_num_bytes_to_retransmit; /*!< \brief Number of bytes in the retransmission buffer to be retransmitted. Only payload is taken into account */
boolean_t force_poll; /*!< \brief force poll due to t_poll_retransmit time-out. */
bool force_poll; /*!< \brief force poll due to t_poll_retransmit time-out. */
//---------------------------------------------------------------------
// RX BUFFERS
......@@ -186,8 +186,8 @@ typedef struct rlc_am_entity_s {
// note occupancy of other buffers is deducted from nb elements in lists
rlc_buffer_occupancy_t buffer_occupancy_retransmission_buffer; /*!< \brief Number of PDUs. */
boolean_t initialized; /*!< \brief Boolean for rlc_am_entity_t struct initialization. */
boolean_t configured; /*!< \brief Boolean for rlc_am_entity_t struct configuration. */
bool initialized; /*!< \brief Boolean for rlc_am_entity_t struct initialization. */
bool configured; /*!< \brief Boolean for rlc_am_entity_t struct configuration. */
} rlc_am_entity_t;
/** @} */
# endif
......@@ -32,7 +32,7 @@ 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, PROTOCOL_RLC_AM_CTXT_FMT"[AM INIT] INITIALIZATION ALREADY DONE, DOING NOTHING\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
} else {
......@@ -79,7 +79,7 @@ rlc_am_init(
rlc_pP->last_absolute_subframe_status_indication = 0xFFFFFFFF; // any value > 1
rlc_pP->initialized = TRUE;
rlc_pP->initialized = true;
}
}
//-----------------------------------------------------------------------------
......@@ -134,7 +134,7 @@ rlc_am_reestablish(
rlc_pP->last_absolute_subframe_status_indication = 0xFFFFFFFF; // any value > 1
rlc_pP->initialized = TRUE;
rlc_pP->initialized = true;
}
......@@ -197,7 +197,7 @@ rlc_am_configure(
const uint32_t t_reorderingP,
const uint32_t t_status_prohibitP)
{
if (rlc_pP->configured == TRUE) {
if (rlc_pP->configured == true) {
LOG_I(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RECONFIGURE] max_retx_threshold %d poll_pdu %d poll_byte %d t_poll_retransmit %d t_reordering %d t_status_prohibit %d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
max_retx_thresholdP,
......@@ -235,7 +235,7 @@ rlc_am_configure(
rlc_am_init_timer_reordering (ctxt_pP, rlc_pP, t_reorderingP);
rlc_am_init_timer_status_prohibit(ctxt_pP, rlc_pP, t_status_prohibitP);
rlc_pP->configured = TRUE;
rlc_pP->configured = true;
}
}
......
......@@ -183,12 +183,10 @@ rlc_am_send_sdu (
}
}
//-----------------------------------------------------------------------------
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,
boolean_t free_rlc_pdu) {
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,
bool free_rlc_pdu) {
int i,j;
rlc_am_pdu_info_t *pdu_info = &((rlc_am_rx_pdu_management_t *)(tb_pP->data))->pdu_info;
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[REASSEMBLY PDU] TRY REASSEMBLY PDU SN=%03d\n",
......
......@@ -57,14 +57,14 @@ void rlc_am_reassembly (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t *
*/
void rlc_am_send_sdu (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_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,boolean_t free_rlc_pdu)
/*! \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, bool free_rlc_pdu)
* \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] tb_pP RLC AM PDU embedded in a mem_block_t.
* \param[in] free_rlc_pdu Flag for freeing RLC AM PDU after 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,boolean_t free_rlc_pdu);
void rlc_am_reassemble_pdu(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, mem_block_t* const tb_pP, bool free_rlc_pdu);
/** @} */
#endif
......@@ -328,7 +328,7 @@ rlc_am_receive_process_data_pdu (
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_rx_pdu_status_t pdu_status = RLC_AM_DATA_PDU_STATUS_OK;
boolean_t reassemble = false;
bool reassemble = false;
if (rlc_am_get_data_pdu_infos(ctxt_pP,rlc_pP, rlc_am_pdu_sn_10_p, tb_size_in_bytesP, pdu_info_p) >= 0) {
......
......@@ -29,13 +29,12 @@
#include "LAYER2/MAC/mac_extern.h"
#include "common/utils/LOG/log.h"
//-----------------------------------------------------------------------------
boolean_t rlc_am_nack_pdu (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlc_pP,
const rlc_sn_t snP,
const rlc_sn_t prev_nack_snP,
sdu_size_t so_startP,
sdu_size_t so_endP)
bool rlc_am_nack_pdu(const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlc_pP,
const rlc_sn_t snP,
const rlc_sn_t prev_nack_snP,
sdu_size_t so_startP,
sdu_size_t so_endP)
{
// 5.2.1 Retransmission
// ...
......@@ -54,8 +53,8 @@ boolean_t rlc_am_nack_pdu (
rlc_am_tx_data_pdu_management_t *tx_data_pdu_buffer_p = &rlc_pP->tx_data_pdu_buffer[snP % RLC_AM_WINDOW_SIZE];
//int pdu_sdu_index;
//int sdu_index;
boolean_t status = TRUE;
boolean_t retx_count_increment = FALSE;
bool status = true;
bool retx_count_increment = false;
sdu_size_t pdu_data_to_retx = 0;
if (mb_p != NULL) {
......@@ -63,7 +62,7 @@ boolean_t rlc_am_nack_pdu (
if(so_startP > so_endP) {
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[NACK-PDU] ERROR NACK MISSING PDU, so_startP %d, so_endP %d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),so_startP, so_endP);
status = FALSE;
status = false;
}
// Handle full PDU NACK first
else if ((so_startP == 0) && (so_endP == 0x7FFF)) {
......@@ -71,9 +70,7 @@ boolean_t rlc_am_nack_pdu (
pdu_data_to_retx = tx_data_pdu_buffer_p->payload_size;
/* Increment VtReTxNext if this is the first NACK or if some segments have already been transmitted */
if ((tx_data_pdu_buffer_p->flags.retransmit == 0) || (tx_data_pdu_buffer_p->nack_so_start))
{
retx_count_increment = TRUE;
}
retx_count_increment = true;
tx_data_pdu_buffer_p->nack_so_start = 0;
tx_data_pdu_buffer_p->num_holes = 0;
......@@ -89,11 +86,11 @@ boolean_t rlc_am_nack_pdu (
if(tx_data_pdu_buffer_p->nack_so_start >= tx_data_pdu_buffer_p->payload_size){
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[NACK-PDU] ERROR NACK MISSING PDU, nack_so_start %d, payload_size %d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),tx_data_pdu_buffer_p->nack_so_start, tx_data_pdu_buffer_p->payload_size);
status = FALSE;
status = false;
}
}
else {
status = FALSE;
status = false;
}
}
else if (tx_data_pdu_buffer_p->flags.max_retransmit == 0) {
......@@ -107,9 +104,8 @@ boolean_t rlc_am_nack_pdu (
if (prev_nack_snP != snP) {
/* New NACK_SN with SO */
/* check whether a new segment is to be placed in Retransmission Buffer, then increment vrReTx */
if ((tx_data_pdu_buffer_p->flags.retransmit == 0) || (so_startP < tx_data_pdu_buffer_p->nack_so_start)) {
retx_count_increment = TRUE;
}
if ((tx_data_pdu_buffer_p->flags.retransmit == 0) || (so_startP < tx_data_pdu_buffer_p->nack_so_start))
retx_count_increment = true;
tx_data_pdu_buffer_p->num_holes = 1;
tx_data_pdu_buffer_p->retx_hole_index = 0;
......@@ -129,21 +125,18 @@ boolean_t rlc_am_nack_pdu (
tx_data_pdu_buffer_p->nack_so_stop = so_endP;
tx_data_pdu_buffer_p->num_holes ++;
pdu_data_to_retx = so_endP - so_startP + 1;
} else {
status = false;
}
else {
status = FALSE;
}
}
else {
status = FALSE;
} else {
status = false;
}
}
else {
status = FALSE;
status = false;
}
}
else {
status = FALSE;
} else {
status = false;
}
if (status) {
......@@ -175,17 +168,16 @@ boolean_t rlc_am_nack_pdu (
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[NACK-PDU] ERROR NACK MISSING PDU SN %05d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
snP);
status = FALSE;
status = false;
}
return status;
}
//-----------------------------------------------------------------------------
void rlc_am_ack_pdu (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlc_pP,
const rlc_sn_t snP,
boolean_t free_pdu)
void rlc_am_ack_pdu(const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlc_pP,
const rlc_sn_t snP,
bool free_pdu)
{
mem_block_t* mb_p = rlc_pP->tx_data_pdu_buffer[snP % RLC_AM_WINDOW_SIZE].mem_block;
rlc_am_tx_data_pdu_management_t *tx_data_pdu_buffer = &rlc_pP->tx_data_pdu_buffer[snP % RLC_AM_WINDOW_SIZE];
......@@ -283,7 +275,7 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
sdu_size_t retx_so_start,retx_so_stop; //starting and ending SO for retransmission in this PDU
rlc_sn_t sn = pdu_mngt->sn;
uint16_t header_so_part;
boolean_t fi_start, fi_end;
bool fi_start, fi_end;
uint8_t sdu_index = 0;
uint8_t sdu_segment_index = 0;
uint8_t num_LIs_pdu_segment = pdu_mngt->nb_sdus - 1;
......@@ -377,11 +369,11 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
/* Set FI part to false if SO Start and SO End are different from PDU boundaries */
if (retx_so_start)
{
fi_start = FALSE;
fi_start = false;
}
if (retx_so_stop < pdu_mngt->payload_size - 1)
{
fi_end = FALSE;
fi_end = false;
}
/* Header content is filled at the end */
......@@ -423,7 +415,7 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
else
{
/* if retx_so_start is still not included then set data_size with full original PDU data size */
/* Set fi_start to FALSE in this case */
/* Set fi_start to false in this case */
data_size = pdu_mngt->payload_size;
}
sdu_index ++;
......@@ -432,7 +424,7 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
if (retx_so_start == data_size)
{
/* Set FI Start if retx_so_start = cumulated data size */
fi_start = TRUE;
fi_start = true;
/* there must be at least one SDU more */
//Assertion(eNB)_PRAN_DesignDocument_annex No.778
if(sdu_index >= pdu_mngt->nb_sdus)
......@@ -464,8 +456,8 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
}
else if (retx_so_start != 0)
{
/* in all other cases set fi_start to FALSE if it SO Start is not 0 */
fi_start = FALSE;
/* in all other cases set fi_start to false if it SO Start is not 0 */
fi_start = false;
}
/* Set first SDU portion of the segment */
......@@ -582,10 +574,10 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
"RLC AM Tx PDU Segment Data Error: retx_so_stop=%d OriginalPDUDataLength=%d SOStart=%d SegmentLength=%d numLISegment=%d numLIPDU=%d sn=%d LcId=%d !\n",
retx_so_stop,pdu_mngt->payload_size,retx_so_start,*payload_sizeP,num_LIs_pdu_segment,pdu_mngt->nb_sdus - 1,sn,rlc_pP->channel_id);
*/
/* init FI End to FALSE if retx_so_stop is not end of PDU */
/* init FI End to false if retx_so_stop is not end of PDU */
if (retx_so_stop != pdu_mngt->payload_size - 1)
{
fi_end = FALSE;
fi_end = false;
}
/* Check consistency between sdus_segment_size and payload_sizeP */
......@@ -596,7 +588,7 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
data_size += sdus_segment_size[i];
if ((retx_so_stop == data_size - 1) && (i < num_LIs_pdu_segment))
{
fi_end = TRUE;
fi_end = true;
}
}
//Assertion(eNB)_PRAN_DesignDocument_annex No.782
......@@ -665,7 +657,7 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
pdu_mngt->nack_so_start = pdu_mngt->hole_so_start[pdu_mngt->retx_hole_index];
}
/* Content is supposed to be init with 0 so with FIStart=FIEnd=TRUE */
/* Content is supposed to be init with 0 so with FIStart=FIEnd=true */
RLC_AM_PDU_SET_D_C(*pdu_segment_header_p);
RLC_AM_PDU_SET_RF(*pdu_segment_header_p);
/* Change FI */
......
......@@ -35,7 +35,7 @@
# ifndef __RLC_AM_RETRANSMIT_H__
# define __RLC_AM_RETRANSMIT_H__
//-----------------------------------------------------------------------------
/*! \fn boolean_t rlc_am_nack_pdu (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, int16_t snP, int16_t prev_nack_snP,sdu_size_t so_startP, sdu_size_t so_endP)
/*! \fn bool rlc_am_nack_pdu (const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t *rlcP, int16_t snP, int16_t prev_nack_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.
* \param[in] ctxtP Running context.
* \param[in] rlcP RLC AM protocol instance pointer.
......@@ -46,13 +46,12 @@
* \return OK/KO
* \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.
*/
boolean_t rlc_am_nack_pdu (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlcP,
const rlc_sn_t snP,
const rlc_sn_t prev_nack_snP,
sdu_size_t so_startP,
sdu_size_t so_endP);
bool rlc_am_nack_pdu(const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlcP,
const rlc_sn_t snP,
const rlc_sn_t prev_nack_snP,
sdu_size_t so_startP,
sdu_size_t so_endP);
/*! \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.
......@@ -62,11 +61,10 @@ boolean_t rlc_am_nack_pdu (
* \param[in] free_pdu Boolean indicating that the PDU can be freed because smaller than new vtA.
* \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.
*/
void rlc_am_ack_pdu (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlcP,
const rlc_sn_t snP,
boolean_t free_pdu);
void rlc_am_ack_pdu(const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlcP,
const rlc_sn_t snP,
bool free_pdu);
/*! \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.
......
......@@ -31,14 +31,13 @@
#include "common/utils/LOG/log.h"
boolean_t rlc_am_rx_check_vr_reassemble(
const protocol_ctxt_t* const ctxt_pP,
const rlc_am_entity_t* const rlc_pP)
bool rlc_am_rx_check_vr_reassemble(const protocol_ctxt_t* const ctxt_pP,
const rlc_am_entity_t* const rlc_pP)
{
mem_block_t* cursor_p = rlc_pP->receiver_buffer.head;
rlc_am_rx_pdu_management_t * pdu_cursor_mgnt_p = NULL;
sdu_size_t next_waited_so = 0;
boolean_t reassemble = FALSE;
bool reassemble = false;
if (cursor_p != NULL) {
......@@ -48,7 +47,7 @@ boolean_t rlc_am_rx_check_vr_reassemble(
if (sn_ref != rlc_pP->vr_r) {
/* Case vrR has advanced from head : most likely case */
reassemble = TRUE;
reassemble = true;
/* Handle first SN if it is made of PDU segments : set them all to be reassembled */
if (pdu_info_p->rf) {
pdu_cursor_mgnt_p = (rlc_am_rx_pdu_management_t *) (cursor_p->data);
......@@ -58,7 +57,7 @@ boolean_t rlc_am_rx_check_vr_reassemble(
{
LOG_E(RLC, "AM Rx Check Reassembly head SN=%d with PDU segments != vrR=%d should be fully received LCID=%d\n",
sn_ref,rlc_pP->vr_r,rlc_pP->channel_id);
return FALSE;
return false;
}
/*
AssertFatal(pdu_cursor_mgnt_p->all_segments_received > 0,"AM Rx Check Reassembly head SN=%d with PDU segments != vrR=%d should be fully received LCID=%d\n",
......@@ -94,7 +93,7 @@ boolean_t rlc_am_rx_check_vr_reassemble(
{
LOG_E(RLC, "AM Rx Check Reassembly vr=%d should be partly received SNHead=%d LCID=%d\n",
rlc_pP->vr_r,sn_ref,rlc_pP->channel_id);
return FALSE;
return false;
}
/*
AssertFatal(pdu_cursor_mgnt_p->all_segments_received == 0,"AM Rx Check Reassembly vr=%d should be partly received SNHead=%d LCID=%d\n",
......@@ -123,7 +122,7 @@ boolean_t rlc_am_rx_check_vr_reassemble(
{
LOG_E(RLC, "AM Rx Check Reassembly SNHead=vr=%d should be partly received LCID=%d\n",
rlc_pP->vr_r,rlc_pP->channel_id);
return FALSE;
return false;
}
/*
AssertFatal(pdu_cursor_mgnt_p->all_segments_received == 0,"AM Rx Check Reassembly SNHead=vr=%d should be partly received LCID=%d\n",
......@@ -132,7 +131,7 @@ boolean_t rlc_am_rx_check_vr_reassemble(
while ((cursor_p != NULL) && (pdu_info_p->sn == rlc_pP->vr_r) && (pdu_info_p->so == next_waited_so)) {
if (pdu_cursor_mgnt_p->segment_reassembled == RLC_AM_RX_PDU_SEGMENT_REASSEMBLE_NO) {
pdu_cursor_mgnt_p->segment_reassembled = RLC_AM_RX_PDU_SEGMENT_REASSEMBLE_PENDING;
reassemble = TRUE;
reassemble = true;
}
next_waited_so += pdu_info_p->payload_size;
cursor_p = cursor_p->next;
......@@ -157,7 +156,7 @@ mem_block_t * create_new_segment_from_pdu(
int16_t new_li_list[RLC_AM_MAX_SDU_IN_PDU];
int16_t header_size = 0;
uint8_t num_li = 0;
boolean_t fi_start, fi_end, lsf;
bool fi_start, fi_end, lsf;
/* Init some PDU Segment header fixed parameters */
fi_start = !((pdu_rx_info_p->fi & 0x2) >> 1);
......@@ -170,11 +169,11 @@ mem_block_t * create_new_segment_from_pdu(
header_size = RLC_AM_PDU_SEGMENT_HEADER_MIN_SIZE;
if (so_offset) {
fi_start = FALSE;
fi_start = false;
}
if (so_offset + data_length_to_copy != pdu_rx_info_p->payload_size) {
fi_end = FALSE;
lsf = FALSE;
fi_end = false;
lsf = false;
}
} // end no LI in original segment
else {
......@@ -185,7 +184,7 @@ mem_block_t * create_new_segment_from_pdu(
/* set LSF to false if we know that end of the original segment will not be copied */
if (so_offset + data_length_to_copy != pdu_rx_info_p->payload_size) {
lsf = FALSE;
lsf = false;
}
/* catch the first LI containing so_offset */
......@@ -223,7 +222,7 @@ mem_block_t * create_new_segment_from_pdu(
num_li = j;
/* set FI End if remaining size = 0 */
if (remaining_size == 0) {
fi_end = TRUE;
fi_end = true;
}
}
}
......@@ -263,7 +262,7 @@ mem_block_t * create_new_segment_from_pdu(
}
/* Fill Header part in the buffer */
/* Content is supposed to be init with 0 so with FIStart=FIEnd=TRUE */
/* Content is supposed to be init with 0 so with FIStart=FIEnd=true */
/* copy first two bytes from original: D/C + RF + FI + E+ SN*/
memset(pdu_segment_header_p, 0, header_size);
RLC_AM_PDU_SET_D_C(*pdu_segment_header_p);
......@@ -1106,7 +1105,7 @@ rlc_am_rx_list_reassemble_rlc_sdus(
do {
if (rlc_am_rx_pdu_management_p->all_segments_received > 0) {
cursor_p = list2_remove_head(&rlc_pP->receiver_buffer);
rlc_am_reassemble_pdu(ctxt_pP, rlc_pP, cursor_p,TRUE);
rlc_am_reassemble_pdu(ctxt_pP, rlc_pP, cursor_p, true);
rlc_am_rx_old_pdu_management = rlc_am_rx_pdu_management_p;
cursor_p = list2_get_head(&rlc_pP->receiver_buffer);
......@@ -1123,7 +1122,7 @@ rlc_am_rx_list_reassemble_rlc_sdus(
else if (rlc_am_rx_pdu_management_p->segment_reassembled == RLC_AM_RX_PDU_SEGMENT_REASSEMBLE_PENDING) {
rlc_am_rx_pdu_management_p->segment_reassembled = RLC_AM_RX_PDU_SEGMENT_REASSEMBLED;
rlc_am_reassemble_pdu(ctxt_pP, rlc_pP, cursor_p,FALSE);
rlc_am_reassemble_pdu(ctxt_pP, rlc_pP, cursor_p, false);
rlc_am_rx_old_pdu_management = rlc_am_rx_pdu_management_p;
cursor_p = cursor_p->next;
......
......@@ -61,13 +61,13 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_check_duplicate_insert_pdu(const protocol_
*/
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 boolean_t rlc_am_rx_check_vr_reassemble(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP)
/*! \fn bool rlc_am_rx_check_vr_reassemble(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP)
* \brief Check if reassembly taking into account potential new vrR value
* \param[in] ctxt_pP Running context.
* \param[in] rlcP RLC AM protocol instance pointer.
* \return TRUE if reassembly must be done, FALSE else
* \return true if reassembly must be done, false else
*/
boolean_t rlc_am_rx_check_vr_reassemble(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP);
bool rlc_am_rx_check_vr_reassemble(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP);
/*! \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.
......
......@@ -32,12 +32,11 @@
#include "common/utils/LOG/log.h"
//-----------------------------------------------------------------------------
void rlc_am_pdu_polling (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlc_pP,
rlc_am_pdu_sn_10_t *const pdu_pP,
const int16_t payload_sizeP,
boolean_t is_new_pdu)
void rlc_am_pdu_polling(const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlc_pP,
rlc_am_pdu_sn_10_t *const pdu_pP,
const int16_t payload_sizeP,
bool is_new_pdu)
{
// 5.2.2 Polling
// An AM RLC entity can poll its peer AM RLC entity in order to trigger STATUS reporting at the peer AM RLC entity.
......
......@@ -36,14 +36,14 @@
# define __RLC_AM_SEGMENT_H__
//-----------------------------------------------------------------------------
/*! \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,boolean_t is_new_pdu)
/*! \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, bool is_new_pdu)
* \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] 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.
*/
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,boolean_t is_new_pdu);
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, bool is_new_pdu);
/*! \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).
......