Commit 03b52216 authored by Robert Schmidt's avatar Robert Schmidt

FlexRAN: Access PDCP stats through RNTI

parent 767eaf5b
...@@ -34,30 +34,30 @@ AGENT_PDCP_xface *agent_pdcp_xface[NUM_MAX_ENB]; ...@@ -34,30 +34,30 @@ AGENT_PDCP_xface *agent_pdcp_xface[NUM_MAX_ENB];
// MAX_MOBILES_PER_ENB // MAX_MOBILES_PER_ENB
void flexran_agent_pdcp_aggregate_stats(const mid_t mod_id, void flexran_agent_pdcp_aggregate_stats(const mid_t mod_id,
const mid_t ue_id, uint16_t uid,
Protocol__FlexPdcpStats *pdcp_aggr_stats){ Protocol__FlexPdcpStats *pdcp_aggr_stats){
int lcid=0; int lcid=0;
/* only calculate the DRBs */ /* only calculate the DRBs */
//LOG_I(FLEXRAN_AGENT, "enb %d ue %d \n", mod_id, ue_id); //LOG_I(FLEXRAN_AGENT, "enb %d ue %d \n", mod_id, uid);
for (lcid=NUM_MAX_SRB ; lcid < NUM_MAX_SRB + NUM_MAX_DRB; lcid++){ for (lcid=NUM_MAX_SRB ; lcid < NUM_MAX_SRB + NUM_MAX_DRB; lcid++){
pdcp_aggr_stats->pkt_tx += flexran_get_pdcp_tx(mod_id,ue_id,lcid); pdcp_aggr_stats->pkt_tx += flexran_get_pdcp_tx(mod_id, uid, lcid);
pdcp_aggr_stats->pkt_tx_bytes += flexran_get_pdcp_tx_bytes(mod_id,ue_id,lcid); pdcp_aggr_stats->pkt_tx_bytes += flexran_get_pdcp_tx_bytes(mod_id, uid, lcid);
pdcp_aggr_stats->pkt_tx_w += flexran_get_pdcp_tx_w(mod_id,ue_id,lcid); pdcp_aggr_stats->pkt_tx_w += flexran_get_pdcp_tx_w(mod_id, uid, lcid);
pdcp_aggr_stats->pkt_tx_bytes_w += flexran_get_pdcp_tx_bytes_w(mod_id,ue_id,lcid); pdcp_aggr_stats->pkt_tx_bytes_w += flexran_get_pdcp_tx_bytes_w(mod_id, uid, lcid);
pdcp_aggr_stats->pkt_tx_aiat += flexran_get_pdcp_tx_aiat(mod_id,ue_id,lcid); pdcp_aggr_stats->pkt_tx_aiat += flexran_get_pdcp_tx_aiat(mod_id, uid, lcid);
pdcp_aggr_stats->pkt_tx_aiat_w += flexran_get_pdcp_tx_aiat_w(mod_id,ue_id,lcid); pdcp_aggr_stats->pkt_tx_aiat_w += flexran_get_pdcp_tx_aiat_w(mod_id, uid, lcid);
pdcp_aggr_stats->pkt_rx += flexran_get_pdcp_rx(mod_id,ue_id,lcid); pdcp_aggr_stats->pkt_rx += flexran_get_pdcp_rx(mod_id, uid, lcid);
pdcp_aggr_stats->pkt_rx_bytes += flexran_get_pdcp_rx_bytes(mod_id,ue_id,lcid); pdcp_aggr_stats->pkt_rx_bytes += flexran_get_pdcp_rx_bytes(mod_id, uid, lcid);
pdcp_aggr_stats->pkt_rx_w += flexran_get_pdcp_rx_w(mod_id,ue_id,lcid); pdcp_aggr_stats->pkt_rx_w += flexran_get_pdcp_rx_w(mod_id, uid, lcid);
pdcp_aggr_stats->pkt_rx_bytes_w += flexran_get_pdcp_rx_bytes_w(mod_id,ue_id,lcid); pdcp_aggr_stats->pkt_rx_bytes_w += flexran_get_pdcp_rx_bytes_w(mod_id, uid, lcid);
pdcp_aggr_stats->pkt_rx_aiat += flexran_get_pdcp_rx_aiat(mod_id,ue_id,lcid); pdcp_aggr_stats->pkt_rx_aiat += flexran_get_pdcp_rx_aiat(mod_id, uid, lcid);
pdcp_aggr_stats->pkt_rx_aiat_w += flexran_get_pdcp_rx_aiat_w(mod_id,ue_id,lcid); pdcp_aggr_stats->pkt_rx_aiat_w += flexran_get_pdcp_rx_aiat_w(mod_id, uid, lcid);
pdcp_aggr_stats->pkt_rx_oo += flexran_get_pdcp_rx_oo(mod_id,ue_id,lcid); pdcp_aggr_stats->pkt_rx_oo += flexran_get_pdcp_rx_oo(mod_id, uid, lcid);
} }
...@@ -72,7 +72,6 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id, ...@@ -72,7 +72,6 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id,
// Protocol__FlexHeader *header; // Protocol__FlexHeader *header;
int i; int i;
int UE_id;
// int cc_id = 0; // int cc_id = 0;
...@@ -80,7 +79,8 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id, ...@@ -80,7 +79,8 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id,
if (report_config->nr_ue > 0) { if (report_config->nr_ue > 0) {
for (i = 0; i < report_config->nr_ue; i++) { for (i = 0; i < report_config->nr_ue; i++) {
UE_id = flexran_get_mac_ue_id(mod_id, i); const rnti_t rnti = report_config->ue_report_type[i].ue_rnti;
const uint16_t uid = flexran_get_pdcp_uid_from_rnti(mod_id, rnti);
/* Check flag for creation of buffer status report */ /* Check flag for creation of buffer status report */
if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_PDCP_STATS) { if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_PDCP_STATS) {
...@@ -91,7 +91,7 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id, ...@@ -91,7 +91,7 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id,
goto error; goto error;
protocol__flex_pdcp_stats__init(pdcp_aggr_stats); protocol__flex_pdcp_stats__init(pdcp_aggr_stats);
flexran_agent_pdcp_aggregate_stats(mod_id, UE_id, pdcp_aggr_stats); flexran_agent_pdcp_aggregate_stats(mod_id, uid, pdcp_aggr_stats);
pdcp_aggr_stats->has_pkt_tx=1; pdcp_aggr_stats->has_pkt_tx=1;
pdcp_aggr_stats->has_pkt_tx_bytes =1; pdcp_aggr_stats->has_pkt_tx_bytes =1;
...@@ -100,7 +100,7 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id, ...@@ -100,7 +100,7 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id,
pdcp_aggr_stats->has_pkt_tx_aiat =1; pdcp_aggr_stats->has_pkt_tx_aiat =1;
pdcp_aggr_stats->has_pkt_tx_aiat_w =1; pdcp_aggr_stats->has_pkt_tx_aiat_w =1;
pdcp_aggr_stats->pkt_tx_sn = flexran_get_pdcp_tx_sn(mod_id, UE_id, DEFAULT_DRB); pdcp_aggr_stats->pkt_tx_sn = flexran_get_pdcp_tx_sn(mod_id, uid, DEFAULT_DRB);
pdcp_aggr_stats->has_pkt_tx_sn =1; pdcp_aggr_stats->has_pkt_tx_sn =1;
pdcp_aggr_stats->has_pkt_rx =1; pdcp_aggr_stats->has_pkt_rx =1;
...@@ -111,7 +111,7 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id, ...@@ -111,7 +111,7 @@ int flexran_agent_pdcp_stats_reply(mid_t mod_id,
pdcp_aggr_stats->has_pkt_rx_aiat_w =1; pdcp_aggr_stats->has_pkt_rx_aiat_w =1;
pdcp_aggr_stats->has_pkt_rx_oo =1; pdcp_aggr_stats->has_pkt_rx_oo =1;
pdcp_aggr_stats->pkt_rx_sn = flexran_get_pdcp_rx_sn(mod_id, UE_id, DEFAULT_DRB); pdcp_aggr_stats->pkt_rx_sn = flexran_get_pdcp_rx_sn(mod_id, uid, DEFAULT_DRB);
pdcp_aggr_stats->has_pkt_rx_sn =1; pdcp_aggr_stats->has_pkt_rx_sn =1;
pdcp_aggr_stats->sfn = flexran_get_pdcp_sfn(mod_id); pdcp_aggr_stats->sfn = flexran_get_pdcp_sfn(mod_id);
......
...@@ -55,7 +55,7 @@ int flexran_agent_pdcp_destroy_stats_reply(Protocol__FlexStatsReply *reply); ...@@ -55,7 +55,7 @@ int flexran_agent_pdcp_destroy_stats_reply(Protocol__FlexStatsReply *reply);
/* Get the stats from RAN API and aggregate them per USER*/ /* Get the stats from RAN API and aggregate them per USER*/
void flexran_agent_pdcp_aggregate_stats(const mid_t mod_id, void flexran_agent_pdcp_aggregate_stats(const mid_t mod_id,
const mid_t ue_id, uint16_t uid,
Protocol__FlexPdcpStats *pdcp_aggr_stats); Protocol__FlexPdcpStats *pdcp_aggr_stats);
/*Register technology specific interface callbacks*/ /*Register technology specific interface callbacks*/
......
...@@ -1250,16 +1250,12 @@ void flexran_agent_set_operating_frame_type(mid_t mod_id, uint8_t cc_id, lte_fra ...@@ -1250,16 +1250,12 @@ void flexran_agent_set_operating_frame_type(mid_t mod_id, uint8_t cc_id, lte_fra
} }
/*********** PDCP *************/ /*********** PDCP *************/
/*PDCP super frame counter flexRAN*/
/* TODO the following is a hack. all the functions below should instead already uint16_t flexran_get_pdcp_uid_from_rnti(mid_t mod_id, rnti_t rnti)
* receive the PDCP's uid and operate on it and the caller has the obligation
* to get the ID for this layer.
*/
static inline uint16_t flexran_get_pdcp_uid(mid_t mod_id, mid_t ue_id)
{ {
rnti_t rnti = flexran_get_mac_ue_crnti(mod_id, ue_id);
if (rnti == NOT_A_RNTI) return 0; if (rnti == NOT_A_RNTI) return 0;
if (mod_id < 0 || mod_id >= RC.nb_inst)
return 0;
for (uint16_t pdcp_uid = 0; pdcp_uid < MAX_MOBILES_PER_ENB; ++pdcp_uid) { for (uint16_t pdcp_uid = 0; pdcp_uid < MAX_MOBILES_PER_ENB; ++pdcp_uid) {
if (pdcp_enb[mod_id].rnti[pdcp_uid] == rnti) if (pdcp_enb[mod_id].rnti[pdcp_uid] == rnti)
...@@ -1268,140 +1264,164 @@ static inline uint16_t flexran_get_pdcp_uid(mid_t mod_id, mid_t ue_id) ...@@ -1268,140 +1264,164 @@ static inline uint16_t flexran_get_pdcp_uid(mid_t mod_id, mid_t ue_id)
return 0; return 0;
} }
/*PDCP super frame counter flexRAN*/
uint32_t flexran_get_pdcp_sfn(mid_t mod_id) uint32_t flexran_get_pdcp_sfn(mid_t mod_id)
{ {
if (mod_id < 0 || mod_id >= RC.nb_inst)
return 0;
return pdcp_enb[mod_id].sfn; return pdcp_enb[mod_id].sfn;
} }
/*PDCP super frame counter flexRAN*/ /*PDCP super frame counter flexRAN*/
void flexran_set_pdcp_tx_stat_window(mid_t mod_id, mid_t ue_id, uint16_t obs_window) void flexran_set_pdcp_tx_stat_window(mid_t mod_id, uint16_t uid, uint16_t obs_window)
{ {
uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
if (obs_window > 0 ){ || uid >= MAX_MOBILES_PER_ENB)
Pdcp_stats_tx_window_ms[mod_id][uid]=obs_window; return;
} Pdcp_stats_tx_window_ms[mod_id][uid] = obs_window > 0 ? obs_window : 1000;
else{
Pdcp_stats_tx_window_ms[mod_id][uid]=1000;
}
} }
/*PDCP super frame counter flexRAN*/ /*PDCP super frame counter flexRAN*/
void flexran_set_pdcp_rx_stat_window(mid_t mod_id, mid_t ue_id, uint16_t obs_window) void flexran_set_pdcp_rx_stat_window(mid_t mod_id, uint16_t uid, uint16_t obs_window)
{ {
uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
if (obs_window > 0 ){ || uid >= MAX_MOBILES_PER_ENB)
Pdcp_stats_rx_window_ms[mod_id][uid]=obs_window; return;
} Pdcp_stats_rx_window_ms[mod_id][uid] = obs_window > 0 ? obs_window : 1000;
else{
Pdcp_stats_rx_window_ms[mod_id][uid]=1000;
}
} }
/*PDCP num tx pdu status flexRAN*/ /*PDCP num tx pdu status flexRAN*/
uint32_t flexran_get_pdcp_tx(mid_t mod_id, mid_t ue_id, lcid_t lcid) uint32_t flexran_get_pdcp_tx(mid_t mod_id, uint16_t uid, lcid_t lcid)
{ {
if (mod_id < 0 || mod_id > MAX_NUM_CCs || ue_id < 0 || ue_id > MAX_MOBILES_PER_ENB if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
|| lcid < 0 || lcid > NB_RB_MAX) || uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
return -1; return 0;
uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id);
return Pdcp_stats_tx[mod_id][uid][lcid]; return Pdcp_stats_tx[mod_id][uid][lcid];
} }
/*PDCP num tx bytes status flexRAN*/ /*PDCP num tx bytes status flexRAN*/
uint32_t flexran_get_pdcp_tx_bytes(mid_t mod_id, mid_t ue_id, lcid_t lcid) uint32_t flexran_get_pdcp_tx_bytes(mid_t mod_id, uint16_t uid, lcid_t lcid)
{ {
uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
|| uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
return 0;
return Pdcp_stats_tx_bytes[mod_id][uid][lcid]; return Pdcp_stats_tx_bytes[mod_id][uid][lcid];
} }
/*PDCP number of transmit packet / second status flexRAN*/ /*PDCP number of transmit packet / second status flexRAN*/
uint32_t flexran_get_pdcp_tx_w(mid_t mod_id, mid_t ue_id, lcid_t lcid) uint32_t flexran_get_pdcp_tx_w(mid_t mod_id, uint16_t uid, lcid_t lcid)
{ {
uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
|| uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
return 0;
return Pdcp_stats_tx_w[mod_id][uid][lcid]; return Pdcp_stats_tx_w[mod_id][uid][lcid];
} }
/*PDCP throughput (bit/s) status flexRAN*/ /*PDCP throughput (bit/s) status flexRAN*/
uint32_t flexran_get_pdcp_tx_bytes_w(mid_t mod_id, mid_t ue_id, lcid_t lcid) uint32_t flexran_get_pdcp_tx_bytes_w(mid_t mod_id, uint16_t uid, lcid_t lcid)
{ {
uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
|| uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
return 0;
return Pdcp_stats_tx_bytes_w[mod_id][uid][lcid]; return Pdcp_stats_tx_bytes_w[mod_id][uid][lcid];
} }
/*PDCP tx sequence number flexRAN*/ /*PDCP tx sequence number flexRAN*/
uint32_t flexran_get_pdcp_tx_sn(mid_t mod_id, mid_t ue_id, lcid_t lcid) uint32_t flexran_get_pdcp_tx_sn(mid_t mod_id, uint16_t uid, lcid_t lcid)
{ {
uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
|| uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
return 0;
return Pdcp_stats_tx_sn[mod_id][uid][lcid]; return Pdcp_stats_tx_sn[mod_id][uid][lcid];
} }
/*PDCP tx aggregated packet arrival flexRAN*/ /*PDCP tx aggregated packet arrival flexRAN*/
uint32_t flexran_get_pdcp_tx_aiat(mid_t mod_id, mid_t ue_id, lcid_t lcid) uint32_t flexran_get_pdcp_tx_aiat(mid_t mod_id, uint16_t uid, lcid_t lcid)
{ {
uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
|| uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
return 0;
return Pdcp_stats_tx_aiat[mod_id][uid][lcid]; return Pdcp_stats_tx_aiat[mod_id][uid][lcid];
} }
/*PDCP tx aggregated packet arrival flexRAN*/ /*PDCP tx aggregated packet arrival flexRAN*/
uint32_t flexran_get_pdcp_tx_aiat_w(mid_t mod_id, mid_t ue_id, lcid_t lcid) uint32_t flexran_get_pdcp_tx_aiat_w(mid_t mod_id, uint16_t uid, lcid_t lcid)
{ {
uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
|| uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
return 0;
return Pdcp_stats_tx_aiat_w[mod_id][uid][lcid]; return Pdcp_stats_tx_aiat_w[mod_id][uid][lcid];
} }
/*PDCP num rx pdu status flexRAN*/ /*PDCP num rx pdu status flexRAN*/
uint32_t flexran_get_pdcp_rx(mid_t mod_id, mid_t ue_id, lcid_t lcid) uint32_t flexran_get_pdcp_rx(mid_t mod_id, uint16_t uid, lcid_t lcid)
{ {
uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
|| uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
return 0;
return Pdcp_stats_rx[mod_id][uid][lcid]; return Pdcp_stats_rx[mod_id][uid][lcid];
} }
/*PDCP num rx bytes status flexRAN*/ /*PDCP num rx bytes status flexRAN*/
uint32_t flexran_get_pdcp_rx_bytes(mid_t mod_id, mid_t ue_id, lcid_t lcid) uint32_t flexran_get_pdcp_rx_bytes(mid_t mod_id, uint16_t uid, lcid_t lcid)
{ {
uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
|| uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
return 0;
return Pdcp_stats_rx_bytes[mod_id][uid][lcid]; return Pdcp_stats_rx_bytes[mod_id][uid][lcid];
} }
/*PDCP number of received packet / second flexRAN*/ /*PDCP number of received packet / second flexRAN*/
uint32_t flexran_get_pdcp_rx_w(mid_t mod_id, mid_t ue_id, lcid_t lcid) uint32_t flexran_get_pdcp_rx_w(mid_t mod_id, uint16_t uid, lcid_t lcid)
{ {
uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
|| uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
return 0;
return Pdcp_stats_rx_w[mod_id][uid][lcid]; return Pdcp_stats_rx_w[mod_id][uid][lcid];
} }
/*PDCP gootput (bit/s) status flexRAN*/ /*PDCP gootput (bit/s) status flexRAN*/
uint32_t flexran_get_pdcp_rx_bytes_w(mid_t mod_id, mid_t ue_id, lcid_t lcid) uint32_t flexran_get_pdcp_rx_bytes_w(mid_t mod_id, uint16_t uid, lcid_t lcid)
{ {
uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
|| uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
return 0;
return Pdcp_stats_rx_bytes_w[mod_id][uid][lcid]; return Pdcp_stats_rx_bytes_w[mod_id][uid][lcid];
} }
/*PDCP rx sequence number flexRAN*/ /*PDCP rx sequence number flexRAN*/
uint32_t flexran_get_pdcp_rx_sn(mid_t mod_id, mid_t ue_id, lcid_t lcid) uint32_t flexran_get_pdcp_rx_sn(mid_t mod_id, uint16_t uid, lcid_t lcid)
{ {
uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
|| uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
return 0;
return Pdcp_stats_rx_sn[mod_id][uid][lcid]; return Pdcp_stats_rx_sn[mod_id][uid][lcid];
} }
/*PDCP rx aggregated packet arrival flexRAN*/ /*PDCP rx aggregated packet arrival flexRAN*/
uint32_t flexran_get_pdcp_rx_aiat(mid_t mod_id, mid_t ue_id, lcid_t lcid) uint32_t flexran_get_pdcp_rx_aiat(mid_t mod_id, uint16_t uid, lcid_t lcid)
{ {
uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
|| uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
return 0;
return Pdcp_stats_rx_aiat[mod_id][uid][lcid]; return Pdcp_stats_rx_aiat[mod_id][uid][lcid];
} }
/*PDCP rx aggregated packet arrival flexRAN*/ /*PDCP rx aggregated packet arrival flexRAN*/
uint32_t flexran_get_pdcp_rx_aiat_w(mid_t mod_id, mid_t ue_id, lcid_t lcid) uint32_t flexran_get_pdcp_rx_aiat_w(mid_t mod_id, uint16_t uid, lcid_t lcid)
{ {
uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
|| uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
return 0;
return Pdcp_stats_rx_aiat_w[mod_id][uid][lcid]; return Pdcp_stats_rx_aiat_w[mod_id][uid][lcid];
} }
/*PDCP num of received outoforder pdu status flexRAN*/ /*PDCP num of received outoforder pdu status flexRAN*/
uint32_t flexran_get_pdcp_rx_oo(mid_t mod_id, mid_t ue_id, lcid_t lcid) uint32_t flexran_get_pdcp_rx_oo(mid_t mod_id, uint16_t uid, lcid_t lcid)
{ {
uint16_t uid = flexran_get_pdcp_uid(mod_id, ue_id); if (mod_id < 0 || mod_id >= RC.nb_inst || uid < 0
|| uid >= MAX_MOBILES_PER_ENB || lcid < 0 || lcid >= NB_RB_MAX)
return 0;
return Pdcp_stats_rx_outoforder[mod_id][uid][lcid]; return Pdcp_stats_rx_outoforder[mod_id][uid][lcid];
} }
......
...@@ -439,61 +439,63 @@ uint8_t flexran_get_rrc_status(mid_t mod_id, rnti_t rnti); ...@@ -439,61 +439,63 @@ uint8_t flexran_get_rrc_status(mid_t mod_id, rnti_t rnti);
/***************************** PDCP ***********************/ /***************************** PDCP ***********************/
/* PDCP uid obtained through the RNTI */
uint16_t flexran_get_pdcp_uid_from_rnti(mid_t mod_id, rnti_t rnti);
/*PDCP superframe numberflexRAN*/ /*PDCP superframe numberflexRAN*/
uint32_t flexran_get_pdcp_sfn(mid_t mod_id); uint32_t flexran_get_pdcp_sfn(mid_t mod_id);
/*PDCP pdcp tx stats window*/ /*PDCP pdcp tx stats window*/
void flexran_set_pdcp_tx_stat_window(mid_t mod_id, mid_t ue_id, uint16_t obs_window); void flexran_set_pdcp_tx_stat_window(mid_t mod_id, uint16_t uid, uint16_t obs_window);
/*PDCP pdcp rx stats window*/ /*PDCP pdcp rx stats window*/
void flexran_set_pdcp_rx_stat_window(mid_t mod_id, mid_t ue_id, uint16_t obs_window); void flexran_set_pdcp_rx_stat_window(mid_t mod_id, uint16_t uid, uint16_t obs_window);
/*PDCP num tx pdu status flexRAN*/ /*PDCP num tx pdu status flexRAN*/
uint32_t flexran_get_pdcp_tx(mid_t mod_id, mid_t ue_id, lcid_t lcid); uint32_t flexran_get_pdcp_tx(mid_t mod_id, uint16_t uid, lcid_t lcid);
/*PDCP num tx bytes status flexRAN*/ /*PDCP num tx bytes status flexRAN*/
uint32_t flexran_get_pdcp_tx_bytes(mid_t mod_id, mid_t ue_id, lcid_t lcid); uint32_t flexran_get_pdcp_tx_bytes(mid_t mod_id, uint16_t uid, lcid_t lcid);
/*PDCP number of transmit packet / second status flexRAN*/ /*PDCP number of transmit packet / second status flexRAN*/
uint32_t flexran_get_pdcp_tx_w(mid_t mod_id, mid_t ue_id, lcid_t lcid); uint32_t flexran_get_pdcp_tx_w(mid_t mod_id, uint16_t uid, lcid_t lcid);
/*PDCP pdcp tx bytes in a given window flexRAN*/ /*PDCP pdcp tx bytes in a given window flexRAN*/
uint32_t flexran_get_pdcp_tx_bytes_w(mid_t mod_id, mid_t ue_id, lcid_t lcid); uint32_t flexran_get_pdcp_tx_bytes_w(mid_t mod_id, uint16_t uid, lcid_t lcid);
/*PDCP tx sequence number flexRAN*/ /*PDCP tx sequence number flexRAN*/
uint32_t flexran_get_pdcp_tx_sn(mid_t mod_id, mid_t ue_id, lcid_t lcid); uint32_t flexran_get_pdcp_tx_sn(mid_t mod_id, uint16_t uid, lcid_t lcid);
/*PDCP tx aggregated packet arrival flexRAN*/ /*PDCP tx aggregated packet arrival flexRAN*/
uint32_t flexran_get_pdcp_tx_aiat(mid_t mod_id, mid_t ue_id, lcid_t lcid); uint32_t flexran_get_pdcp_tx_aiat(mid_t mod_id, uint16_t uid, lcid_t lcid);
/*PDCP tx aggregated packet arrival per second flexRAN*/ /*PDCP tx aggregated packet arrival per second flexRAN*/
uint32_t flexran_get_pdcp_tx_aiat_w(mid_t mod_id, mid_t ue_id, lcid_t lcid); uint32_t flexran_get_pdcp_tx_aiat_w(mid_t mod_id, uint16_t uid, lcid_t lcid);
/*PDCP num rx pdu status flexRAN*/ /*PDCP num rx pdu status flexRAN*/
uint32_t flexran_get_pdcp_rx(mid_t mod_id, mid_t ue_id, lcid_t lcid); uint32_t flexran_get_pdcp_rx(mid_t mod_id, uint16_t uid, lcid_t lcid);
/*PDCP num rx bytes status flexRAN*/ /*PDCP num rx bytes status flexRAN*/
uint32_t flexran_get_pdcp_rx_bytes(mid_t mod_id, mid_t ue_id, lcid_t lcid); uint32_t flexran_get_pdcp_rx_bytes(mid_t mod_id, uint16_t uid, lcid_t lcid);
/*PDCP number of received packet / second flexRAN*/ /*PDCP number of received packet / second flexRAN*/
uint32_t flexran_get_pdcp_rx_w(mid_t mod_id, mid_t ue_id, lcid_t lcid); uint32_t flexran_get_pdcp_rx_w(mid_t mod_id, uint16_t uid, lcid_t lcid);
/*PDCP gootput (bit/s) status flexRAN*/ /*PDCP gootput (bit/s) status flexRAN*/
uint32_t flexran_get_pdcp_rx_bytes_w(mid_t mod_id, mid_t ue_id, lcid_t lcid); uint32_t flexran_get_pdcp_rx_bytes_w(mid_t mod_id, uint16_t uid, lcid_t lcid);
/*PDCP rx sequence number flexRAN*/ /*PDCP rx sequence number flexRAN*/
uint32_t flexran_get_pdcp_rx_sn(mid_t mod_id, mid_t ue_id, lcid_t lcid); uint32_t flexran_get_pdcp_rx_sn(mid_t mod_id, uint16_t uid, lcid_t lcid);
/*PDCP rx aggregated packet arrival flexRAN*/ /*PDCP rx aggregated packet arrival flexRAN*/
uint32_t flexran_get_pdcp_rx_aiat(mid_t mod_id, mid_t ue_id, lcid_t lcid); uint32_t flexran_get_pdcp_rx_aiat(mid_t mod_id, uint16_t uid, lcid_t lcid);
/*PDCP rx aggregated packet arrival per second flexRAN*/ /*PDCP rx aggregated packet arrival per second flexRAN*/
uint32_t flexran_get_pdcp_rx_aiat_w(mid_t mod_id, mid_t ue_id, lcid_t lcid); uint32_t flexran_get_pdcp_rx_aiat_w(mid_t mod_id, uint16_t uid, lcid_t lcid);
/*PDCP num of received outoforder pdu status flexRAN*/ /*PDCP num of received outoforder pdu status flexRAN*/
uint32_t flexran_get_pdcp_rx_oo(mid_t mod_id, mid_t ue_id, lcid_t lcid); uint32_t flexran_get_pdcp_rx_oo(mid_t mod_id, uint16_t uid, lcid_t lcid);
/*********************RRC**********************/ /*********************RRC**********************/
/*Get primary cell measuremeant id flexRAN*/ /*Get primary cell measuremeant id flexRAN*/
......
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