Commit 916cf4e0 authored by Navid Nikaein's avatar Navid Nikaein

Update pdcp status when the UE and RB is configured

parent da6ae0f8
...@@ -164,11 +164,15 @@ boolean_t pdcp_data_req( ...@@ -164,11 +164,15 @@ boolean_t pdcp_data_req(
PROTOCOL_CTXT_ARGS(ctxt_pP), PROTOCOL_CTXT_ARGS(ctxt_pP),
rb_idP); rb_idP);
ctxt_pP->configured=FALSE; ctxt_pP->configured=FALSE;
// optimize stats collections to thos RB that are configured
pdcp_enb[ctxt_pP->module_id].rb_id[rb_idP]=0;
return FALSE; return FALSE;
} }
} else { } else {
// instance for a given RB is configured // instance for a given RB is configured
ctxt_pP->configured=TRUE; ctxt_pP->configured=TRUE;
// optimize stats collections to thos RB that are configured
pdcp_enb[ctxt_pP->module_id].rb_id[rb_idP]=1;
} }
if (ctxt_pP->enb_flag == ENB_FLAG_YES) { if (ctxt_pP->enb_flag == ENB_FLAG_YES) {
...@@ -1064,11 +1068,15 @@ void pdcp_update_stats(const protocol_ctxt_t *const ctxt_pP) { ...@@ -1064,11 +1068,15 @@ void pdcp_update_stats(const protocol_ctxt_t *const ctxt_pP) {
uint16_t pdcp_uid = 0; uint16_t pdcp_uid = 0;
uint8_t rb_id = 0; uint8_t rb_id = 0;
// these stats are measured for both eNB and UE on per seond basis // these stats are measured for both eNB and UE on per seond basis
for (rb_id =0; rb_id < NB_RB_MAX; rb_id ++) { for (rb_id =0; rb_id < NB_RB_MAX; rb_id ++) {
for (pdcp_uid=0; pdcp_uid< MAX_MOBILES_PER_ENB; pdcp_uid++) { for (pdcp_uid=0; pdcp_uid< MAX_MOBILES_PER_ENB; pdcp_uid++) {
//printf("frame %d and subframe %d \n", pdcp_enb[ctxt_pP->module_id].frame, pdcp_enb[ctxt_pP->module_id].subframe); //printf("frame %d and subframe %d \n", pdcp_enb[ctxt_pP->module_id].frame, pdcp_enb[ctxt_pP->module_id].subframe);
// tx stats // tx stats
if ( (pdcp_enb[ctxt_pP->module_id].rnti[pdcp_uid] > 0) &&
(pdcp_enb[ctxt_pP->module_id].rb_id[rb_id] > 0) ) {
if (Pdcp_stats_tx_window_ms[ctxt_pP->module_id][pdcp_uid] > 0 && if (Pdcp_stats_tx_window_ms[ctxt_pP->module_id][pdcp_uid] > 0 &&
pdcp_enb[ctxt_pP->module_id].sfn % Pdcp_stats_tx_window_ms[ctxt_pP->module_id][pdcp_uid] == 0) { pdcp_enb[ctxt_pP->module_id].sfn % Pdcp_stats_tx_window_ms[ctxt_pP->module_id][pdcp_uid] == 0) {
// unit: bit/s // unit: bit/s
...@@ -1108,6 +1116,7 @@ void pdcp_update_stats(const protocol_ctxt_t *const ctxt_pP) { ...@@ -1108,6 +1116,7 @@ void pdcp_update_stats(const protocol_ctxt_t *const ctxt_pP) {
} }
} }
} }
}
} }
...@@ -1460,6 +1469,7 @@ pdcp_remove_UE( ...@@ -1460,6 +1469,7 @@ pdcp_remove_UE(
pdcp_enb[ctxt_pP->module_id].rnti[i]); pdcp_enb[ctxt_pP->module_id].rnti[i]);
pdcp_enb[ctxt_pP->module_id].uid[i]=0; pdcp_enb[ctxt_pP->module_id].uid[i]=0;
pdcp_enb[ctxt_pP->module_id].rnti[i]=0; pdcp_enb[ctxt_pP->module_id].rnti[i]=0;
pdcp_enb[ctxt_pP->module_id].rnti[i]=0;
pdcp_enb[ctxt_pP->module_id].num_ues--; pdcp_enb[ctxt_pP->module_id].num_ues--;
break; break;
} }
...@@ -1778,6 +1788,9 @@ rrc_pdcp_config_asn1_req ( ...@@ -1778,6 +1788,9 @@ rrc_pdcp_config_asn1_req (
kRRCenc_pP, kRRCenc_pP,
kRRCint_pP, kRRCint_pP,
kUPenc_pP); kUPenc_pP);
pdcp_enb[ctxt_pP->module_id].rb_id[lc_id]=0;
h_rc = hashtable_remove(pdcp_coll_p, key); h_rc = hashtable_remove(pdcp_coll_p, key);
if ((defaultDRB != NULL) && (*defaultDRB == drb_id)) { if ((defaultDRB != NULL) && (*defaultDRB == drb_id)) {
......
...@@ -130,6 +130,8 @@ typedef struct pdcp_enb_s { ...@@ -130,6 +130,8 @@ typedef struct pdcp_enb_s {
// used for eNB stats generation // used for eNB stats generation
uint16_t uid[MAX_MOBILES_PER_ENB]; uint16_t uid[MAX_MOBILES_PER_ENB];
rnti_t rnti[MAX_MOBILES_PER_ENB]; rnti_t rnti[MAX_MOBILES_PER_ENB];
rb_id_t rb_id[NB_RB_MAX];
uint16_t num_ues; uint16_t num_ues;
uint64_t sfn; uint64_t sfn;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment