Commit 7f9a7d74 authored by Cedric Roux's avatar Cedric Roux

bugfix: fix PDCP inst

This commit is a continuation of 614d6bbe2af5c34f3bace7a8cb5003f07a8931b2
(ue_ip: use correct instance).

Now in openair2/NETWORK_DRIVER/UE_IP/common.c the 'inst' is not
forced to 1 anymore, we take the value 'pdcph_p->inst'.

It turns out that 'pdcph_p->inst' is 0 instead of 1 when we
run lte-softmodem as an UE.

So let's modify PDCP to set 'inst' to 1 where it was set to 0 for
the UE softmodem case, and skip the places where it is reset to 0,
still for the UE softmodem case.

This may break things, I am not sure.
parent 816d96ba
...@@ -816,6 +816,9 @@ pdcp_data_ind( ...@@ -816,6 +816,9 @@ pdcp_data_ind(
((pdcp_data_ind_header_t *) new_sdu_p->data)->rb_id = rb_id; ((pdcp_data_ind_header_t *) new_sdu_p->data)->rb_id = rb_id;
#if defined(OAI_EMU) #if defined(OAI_EMU)
((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = ctxt_pP->module_id + oai_emulation.info.nb_enb_local - oai_emulation.info.first_ue_local; ((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = ctxt_pP->module_id + oai_emulation.info.nb_enb_local - oai_emulation.info.first_ue_local;
#else
/* TODO: inst is 1 for the UE or do we keep 0? Seems to be 1 but not sure */
((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = 1;
#endif #endif
} else { } else {
((pdcp_data_ind_header_t*) new_sdu_p->data)->rb_id = rb_id + (ctxt_pP->module_id * maxDRB); ((pdcp_data_ind_header_t*) new_sdu_p->data)->rb_id = rb_id + (ctxt_pP->module_id * maxDRB);
......
...@@ -167,7 +167,8 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP) ...@@ -167,7 +167,8 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP)
((pdcp_data_ind_header_t *) sdu_p->data)->data_size); ((pdcp_data_ind_header_t *) sdu_p->data)->data_size);
#else #else
#if ! defined(OAI_EMU) #if ! defined(OAI_EMU)
((pdcp_data_ind_header_t *)(sdu_p->data))->inst = 0; /* TODO: do we have to reset to 0 or not? not for a scenario with 1 UE at least */
// ((pdcp_data_ind_header_t *)(sdu_p->data))->inst = 0;
#endif #endif
#endif #endif
...@@ -571,7 +572,8 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) ...@@ -571,7 +572,8 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
pdcp_read_header_g.inst - oai_emulation.info.nb_enb_local+ NB_eNB_INST + oai_emulation.info.first_ue_local : pdcp_read_header_g.inst - oai_emulation.info.nb_enb_local+ NB_eNB_INST + oai_emulation.info.first_ue_local :
pdcp_read_header_g.inst + oai_emulation.info.first_enb_local;*/ pdcp_read_header_g.inst + oai_emulation.info.first_enb_local;*/
#else // OAI_EMU #else // OAI_EMU
pdcp_read_header_g.inst = 0; /* TODO: do we have to reset to 0 or not? not for a scenario with 1 UE at least */
// 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"
ctxt.frame = ctxt_cpy.frame; ctxt.frame = ctxt_cpy.frame;
ctxt.enb_flag = ctxt_cpy.enb_flag; ctxt.enb_flag = ctxt_cpy.enb_flag;
......
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