* additional timing measurements for PDCP

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5243 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
Navid Nikaein
2014-04-12 19:49:25 +00:00
parent 74e5357937
commit c1fd89b2a2
5 changed files with 78 additions and 24 deletions
+38 -8
View File
@@ -275,9 +275,19 @@ boolean_t pdcp_data_req(
if ((pdcp_p->security_activated != 0) &&
((pdcp_p->cipheringAlgorithm) != 0) &&
((pdcp_p->integrityProtAlgorithm) != 0)) {
pdcp_apply_security(pdcp_p, rb_idP % maxDRB,
pdcp_header_len, current_sn, pdcp_pdu_p->data,
sdu_buffer_sizeP);
if (enb_flagP == ENB_FLAG_NO)
start_meas(&eNB_pdcp_stats[enb_mod_idP].apply_security);
else
start_meas(&UE_pdcp_stats[ue_mod_idP].apply_security);
pdcp_apply_security(pdcp_p, rb_idP % maxDRB,
pdcp_header_len, current_sn, pdcp_pdu_p->data,
sdu_buffer_sizeP);
if (enb_flagP == ENB_FLAG_NO)
stop_meas(&eNB_pdcp_stats[enb_mod_idP].apply_security);
else
stop_meas(&UE_pdcp_stats[ue_mod_idP].apply_security);
}
#endif
@@ -519,11 +529,21 @@ boolean_t pdcp_data_ind(
// SRB1/2: control-plane data
if (srb_flagP){
#if defined(ENABLE_SECURITY)
if (pdcp_p->security_activated == 1) {
pdcp_validate_security(pdcp_p, rb_idP, pdcp_header_len,
sequence_number, sdu_buffer_pP->data,
sdu_buffer_sizeP - pdcp_tailer_len);
}
if (pdcp_p->security_activated == 1) {
if (enb_flagP == ENB_FLAG_NO)
start_meas(&eNB_pdcp_stats[enb_mod_idP].validate_security);
else
start_meas(&UE_pdcp_stats[ue_mod_idP].validate_security);
pdcp_validate_security(pdcp_p, rb_idP, pdcp_header_len,
sequence_number, sdu_buffer_pP->data,
sdu_buffer_sizeP - pdcp_tailer_len);
if (enb_flagP == ENB_FLAG_NO)
stop_meas(&eNB_pdcp_stats[enb_mod_idP].validate_security);
else
stop_meas(&UE_pdcp_stats[ue_mod_idP].validate_security);
}
#endif
//rrc_lite_data_ind(module_id, //Modified MW - L2 Interface
pdcp_rrc_data_ind(enb_mod_idP,
@@ -774,8 +794,18 @@ void pdcp_run (
pdcp_fifo_read_input_sdus(frameP, enb_flagP, ue_mod_idP, enb_mod_idP);
}
// PDCP -> NAS/IP traffic: RX
if (enb_flagP)
start_meas(&eNB_pdcp_stats[enb_mod_idP].pdcp_ip);
else
start_meas(&UE_pdcp_stats[ue_mod_idP].pdcp_ip);
pdcp_fifo_flush_sdus(frameP, enb_flagP, enb_mod_idP, ue_mod_idP);
if (enb_flagP)
stop_meas(&eNB_pdcp_stats[enb_mod_idP].pdcp_ip);
else
stop_meas(&UE_pdcp_stats[ue_mod_idP].pdcp_ip);
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_RUN, VCD_FUNCTION_OUT);
if (enb_flagP)
stop_meas(&eNB_pdcp_stats[enb_mod_idP].pdcp_run);
+3 -4
View File
@@ -106,11 +106,10 @@ typedef struct pdcp_stats_t {
time_stats_t pdcp_run;
time_stats_t data_req;
time_stats_t data_ind;
time_stats_t encrption;
time_stats_t decrption;
time_stats_t apply_security; //
time_stats_t validate_security;
time_stats_t pdcp_ip;
time_stats_t ip_pdcp;
time_stats_t ip_pdcp; // separte thread
}pdcp_stats_t; // common to eNB and UE
+10 -3
View File
@@ -86,6 +86,8 @@ static struct lfds611_queue_state **pdcp_netlink_queue_ue = NULL;
static uint32_t *pdcp_netlink_nb_element_enb = NULL;
static uint32_t *pdcp_netlink_nb_element_ue = NULL;
time_stats_t ip_pdcp_stats_tmp;
static void *pdcp_netlink_thread_fct(void *arg);
int pdcp_netlink_init(void) {
@@ -95,7 +97,8 @@ int pdcp_netlink_init(void) {
int nb_inst_ue;
pthread_attr_t attr;
struct sched_param sched_param;
reset_meas(&ip_pdcp_stats_tmp);
#if defined(USER_MODE) && defined(OAI_EMU)
nb_inst_enb = oai_emulation.info.nb_enb_local;
nb_inst_ue = oai_emulation.info.nb_ue_local;
@@ -103,7 +106,7 @@ int pdcp_netlink_init(void) {
nb_inst_enb = 1;
nb_inst_ue = 1;
#endif
pdcp_netlink_queue_enb = calloc(nb_inst_enb, sizeof(struct lfds611_queue_state*));
pdcp_netlink_nb_element_enb = malloc(nb_inst_enb * sizeof(uint32_t));
@@ -206,7 +209,7 @@ void *pdcp_netlink_thread_fct(void *arg) {
for (nas_nlh_rx = (struct nlmsghdr *) nl_rx_buf;
NLMSG_OK(nas_nlh_rx, (unsigned int)len);
nas_nlh_rx = NLMSG_NEXT (nas_nlh_rx, len)) {
start_meas(&ip_pdcp_stats_tmp);
/* There is no need to check for nlmsg_type because
* the header is not set in our drivers.
*/
@@ -259,6 +262,8 @@ void *pdcp_netlink_thread_fct(void *arg) {
/* Enqueue the element in the right queue */
lfds611_queue_guaranteed_enqueue(pdcp_netlink_queue_enb[new_data_p->pdcp_read_header.inst], new_data_p);
stop_meas(&ip_pdcp_stats_tmp);
copy_meas(&eNB_pdcp_stats[new_data_p->pdcp_read_header.inst].pdcp_ip,&ip_pdcp_stats_tmp);
} else {
if (pdcp_netlink_nb_element_ue[new_data_p->pdcp_read_header.inst]
> PDCP_QUEUE_NB_ELEMENTS) {
@@ -270,6 +275,8 @@ void *pdcp_netlink_thread_fct(void *arg) {
/* Enqueue the element in the right queue */
lfds611_queue_guaranteed_enqueue(pdcp_netlink_queue_ue[new_data_p->pdcp_read_header.inst], new_data_p);
stop_meas(&ip_pdcp_stats_tmp);
copy_meas(&UE_pdcp_stats[new_data_p->pdcp_read_header.inst].pdcp_ip,&ip_pdcp_stats_tmp);
}
}
}