From e133076de8e6487fa9d593e23b9418705f6ed47d Mon Sep 17 00:00:00 2001
From: Navid Nikaein <navid.nikaein@eurecom.fr>
Date: Thu, 27 Mar 2014 15:56:39 +0000
Subject: [PATCH] *fix few issues related to the OTG (rb_id and start time)
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5220 818b1a75-f10b-46b9-bf7c-635c3b92a50f
---
openair2/LAYER2/PDCP_v10.1.0/pdcp.c | 13 ++++++++++++-
openair2/UTIL/OCG/OCG.h | 2 +-
targets/SIMU/USER/oaisim_functions.c | 4 ++--
3 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c
index 0061be72ae..2642e12d37 100755
--- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c
+++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c
@@ -704,7 +704,18 @@ void pdcp_run (frame_t frameP, eNB_flag_t enb_flagP, module_id_t ue_mod_idP, mo
# endif
#endif
- pdcp_fifo_read_input_sdus_from_otg(frameP, enb_flagP, ue_mod_idP, enb_mod_idP);
+#if defined(USER_MODE) && defined(OAI_EMU)
+ pdcp_t *pdcp_p = NULL;
+ // add other rb_ids
+ if (enb_flagP == ENB_FLAG_NO) {
+ pdcp_p = &pdcp_array_ue[ue_mod_idP][DTCH];
+ } else {
+ pdcp_p = &pdcp_array_eNB[enb_mod_idP][ue_mod_idP][DTCH];
+ }
+
+ if (pdcp_p->instanciated_instance == TRUE )
+ pdcp_fifo_read_input_sdus_from_otg(frameP, enb_flagP, ue_mod_idP, enb_mod_idP);
+#endif
// IP/NAS -> PDCP traffic : TX, read the pkt from the upper layer buffer
#if defined(LINK_PDCP_TO_GTPV1U)
diff --git a/openair2/UTIL/OCG/OCG.h b/openair2/UTIL/OCG/OCG.h
index e32fd1a1de..db3be756bb 100644
--- a/openair2/UTIL/OCG/OCG.h
+++ b/openair2/UTIL/OCG/OCG.h
@@ -757,7 +757,7 @@ The following diagram is based on graphviz (http://www.graphviz.org/), you need
int OCG_main (char is_local_server[FILENAME_LENGTH_MAX]);
- void init_oai_emulation (void);
+ // void init_oai_emulation (void);
//#include "UTIL/LOG/log.h"
#ifdef __cplusplus
diff --git a/targets/SIMU/USER/oaisim_functions.c b/targets/SIMU/USER/oaisim_functions.c
index 6ba8f949c3..8c93145d81 100644
--- a/targets/SIMU/USER/oaisim_functions.c
+++ b/targets/SIMU/USER/oaisim_functions.c
@@ -1055,7 +1055,7 @@ void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime) {
if ((otg_pkt->otg_pkt).sdu_buffer != NULL) {
otg_times += 1;
- (otg_pkt->otg_pkt).rb_id = dst_id * NB_RB_MAX + DTCH; // app could be binded to a given DRB
+ (otg_pkt->otg_pkt).rb_id = DTCH; // app could be binded to a given DRB
(otg_pkt->otg_pkt).module_id = enb_module_idP;
(otg_pkt->otg_pkt).dst_id = dst_id;
(otg_pkt->otg_pkt).is_ue = 0;
@@ -1184,7 +1184,7 @@ void update_otg_UE(module_id_t ue_mod_idP, unsigned int ctime) {
(otg_pkt->otg_pkt).sdu_buffer = (uint8_t*) packet_gen(src_id, dst_id, 0, ctime, &((otg_pkt->otg_pkt).sdu_buffer_size));
if ((otg_pkt->otg_pkt).sdu_buffer != NULL) {
- (otg_pkt->otg_pkt).rb_id = dst_id * NB_RB_MAX + DTCH;
+ (otg_pkt->otg_pkt).rb_id = DTCH;
(otg_pkt->otg_pkt).module_id = module_id;
(otg_pkt->otg_pkt).dst_id = dst_id;
(otg_pkt->otg_pkt).is_ue = 1;
--
GitLab