Commit cb172803 authored by Lionel Gauthier's avatar Lionel Gauthier

tweaks for eMBMS

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5249 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent fee4a83f
...@@ -1058,14 +1058,14 @@ boolean_t rrc_pdcp_config_asn1_req ( ...@@ -1058,14 +1058,14 @@ boolean_t rrc_pdcp_config_asn1_req (
// can set the mch_id = i // can set the mch_id = i
if (enb_flagP) { if (enb_flagP) {
drb_id = (mch_id * maxSessionPerPMCH ) + lc_id + (maxDRB + 3)*MAX_MOBILES_PER_ENB; // 1 drb_id = (mch_id * maxSessionPerPMCH ) + lc_id ;//+ (maxDRB + 3)*MAX_MOBILES_PER_ENB; // 1
if (pdcp_mbms_array_eNB[enb_mod_idP][mch_id][lc_id].instanciated_instance == TRUE) { if (pdcp_mbms_array_eNB[enb_mod_idP][mch_id][lc_id].instanciated_instance == TRUE) {
action = CONFIG_ACTION_MBMS_MODIFY; action = CONFIG_ACTION_MBMS_MODIFY;
}else { }else {
action = CONFIG_ACTION_MBMS_ADD; action = CONFIG_ACTION_MBMS_ADD;
} }
} else { } else {
drb_id = (mch_id * maxSessionPerPMCH ) + lc_id + (maxDRB + 3); // 15 drb_id = (mch_id * maxSessionPerPMCH ) + lc_id; // + (maxDRB + 3); // 15
if (pdcp_mbms_array_ue[ue_mod_idP][mch_id][lc_id].instanciated_instance == TRUE) { if (pdcp_mbms_array_ue[ue_mod_idP][mch_id][lc_id].instanciated_instance == TRUE) {
action = CONFIG_ACTION_MBMS_MODIFY; action = CONFIG_ACTION_MBMS_MODIFY;
} else { } else {
......
...@@ -121,7 +121,17 @@ void config_req_rlc_um_asn1 ( ...@@ -121,7 +121,17 @@ void config_req_rlc_um_asn1 (
#if defined(Rel10) #if defined(Rel10)
if (mbms_flagP) { if (mbms_flagP) {
AssertFatal(dl_rlc_pP, "No RLC UM DL config");
AssertFatal(ul_rlc_pP == NULL, "RLC UM UL config present");
key = RLC_COLL_KEY_MBMS_VALUE(enb_module_idP, ue_module_idP, eNB_flagP, mbms_service_idP, mbms_session_idP); key = RLC_COLL_KEY_MBMS_VALUE(enb_module_idP, ue_module_idP, eNB_flagP, mbms_service_idP, mbms_session_idP);
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
AssertFatal (h_rc == HASH_TABLE_OK, "RLC NOT FOUND enb id %u ue id %i enb flag %u service id %u, session id %u",
enb_module_idP,
ue_module_idP,
eNB_flagP,
mbms_service_idP,
mbms_session_idP);
rlc_p = &rlc_union_p->rlc.um;
} }
else else
#endif #endif
...@@ -228,6 +238,7 @@ rlc_um_init (rlc_um_entity_t * const rlc_pP) ...@@ -228,6 +238,7 @@ rlc_um_init (rlc_um_entity_t * const rlc_pP)
{ {
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
AssertFatal(rlc_pP, "Bad RLC UM pointer (NULL)");
int saved_allocation = rlc_pP->allocation; int saved_allocation = rlc_pP->allocation;
memset (rlc_pP, 0, sizeof (rlc_um_entity_t)); memset (rlc_pP, 0, sizeof (rlc_um_entity_t));
rlc_pP->allocation = saved_allocation; rlc_pP->allocation = saved_allocation;
......
...@@ -251,18 +251,28 @@ typedef struct rlc_mbms_id_s { ...@@ -251,18 +251,28 @@ typedef struct rlc_mbms_id_s {
public_rlc(rlc_mbms_id_t rlc_mbms_lcid2service_session_id_ue[NUMBER_OF_UE_MAX][RLC_MAX_MBMS_LC];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h public_rlc(rlc_mbms_id_t rlc_mbms_lcid2service_session_id_ue[NUMBER_OF_UE_MAX][RLC_MAX_MBMS_LC];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
public_rlc(rlc_mbms_id_t rlc_mbms_lcid2service_session_id_eNB[NUMBER_OF_eNB_MAX][RLC_MAX_MBMS_LC];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h public_rlc(rlc_mbms_id_t rlc_mbms_lcid2service_session_id_eNB[NUMBER_OF_eNB_MAX][RLC_MAX_MBMS_LC];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
#define rlc_mbms_enb_get_lcid_by_rb_id(Enb_mOD,rB_iD) rlc_mbms_rbid2lcid_eNB[Enb_mOD][rB_iD - (NB_RB_MAX*MAX_MOBILES_PER_ENB)] //#define rlc_mbms_enb_get_lcid_by_rb_id(Enb_mOD,rB_iD) rlc_mbms_rbid2lcid_eNB[Enb_mOD][rB_iD - (NB_RB_MAX*MAX_MOBILES_PER_ENB)]
#define rlc_mbms_enb_get_lcid_by_rb_id(Enb_mOD,rB_iD) rlc_mbms_rbid2lcid_eNB[Enb_mOD][rB_iD]
//#define rlc_mbms_enb_set_lcid_by_rb_id(Enb_mOD,rB_iD,lOG_cH_iD) do { \
// AssertFatal(rB_iD>=(NB_RB_MAX*MAX_MOBILES_PER_ENB), "INVALID RB ID %u", rB_iD);
// rlc_mbms_rbid2lcid_eNB[Enb_mOD][rB_iD-(NB_RB_MAX*MAX_MOBILES_PER_ENB)] = lOG_cH_iD; \
// } while (0);
#define rlc_mbms_enb_set_lcid_by_rb_id(Enb_mOD,rB_iD,lOG_cH_iD) do { \ #define rlc_mbms_enb_set_lcid_by_rb_id(Enb_mOD,rB_iD,lOG_cH_iD) do { \
AssertFatal(rB_iD>=(NB_RB_MAX*MAX_MOBILES_PER_ENB), "INVALID RB ID %u", rB_iD); \ rlc_mbms_rbid2lcid_eNB[Enb_mOD][rB_iD] = lOG_cH_iD; \
rlc_mbms_rbid2lcid_eNB[Enb_mOD][rB_iD - (NB_RB_MAX*MAX_MOBILES_PER_ENB)] = lOG_cH_iD; \
} while (0); } while (0);
#define rlc_mbms_ue_get_lcid_by_rb_id(uE_mOD,rB_iD) rlc_mbms_rbid2lcid_ue[uE_mOD][rB_iD - NB_RB_MAX] //#define rlc_mbms_ue_get_lcid_by_rb_id(uE_mOD,rB_iD) rlc_mbms_rbid2lcid_ue[uE_mOD][rB_iD - NB_RB_MAX]
#define rlc_mbms_ue_get_lcid_by_rb_id(uE_mOD,rB_iD) rlc_mbms_rbid2lcid_ue[uE_mOD][rB_iD]
//#define rlc_mbms_ue_set_lcid_by_rb_id(uE_mOD,rB_iD,lOG_cH_iD) do { \
// AssertFatal(rB_iD>=NB_RB_MAX, "INVALID RB ID %u", rB_iD); \
// rlc_mbms_rbid2lcid_ue[uE_mOD][rB_iD - NB_RB_MAX] = lOG_cH_iD; \
// } while (0);
#define rlc_mbms_ue_set_lcid_by_rb_id(uE_mOD,rB_iD,lOG_cH_iD) do { \ #define rlc_mbms_ue_set_lcid_by_rb_id(uE_mOD,rB_iD,lOG_cH_iD) do { \
AssertFatal(rB_iD>=NB_RB_MAX, "INVALID RB ID %u", rB_iD); \ AssertFatal(rB_iD<NB_RB_MAX, "INVALID RB ID %u", rB_iD); \
rlc_mbms_rbid2lcid_ue[uE_mOD][rB_iD - NB_RB_MAX] = lOG_cH_iD; \ rlc_mbms_rbid2lcid_ue[uE_mOD][rB_iD] = lOG_cH_iD; \
} while (0); } while (0);
public_rlc(logical_chan_id_t rlc_mbms_rbid2lcid_ue [NUMBER_OF_UE_MAX][NB_RB_MBMS_MAX];) /*!< \brief Pairing logical channel identifier with radio bearer identifer. */ public_rlc(logical_chan_id_t rlc_mbms_rbid2lcid_ue [NUMBER_OF_UE_MAX][NB_RB_MBMS_MAX];) /*!< \brief Pairing logical channel identifier with radio bearer identifer. */
......
...@@ -373,13 +373,13 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const module_id_t enb_mod_idP ...@@ -373,13 +373,13 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const module_id_t enb_mod_idP
// can set the mch_id = i // can set the mch_id = i
if (enb_flagP) { if (enb_flagP) {
rb_id = (mbms_service_id * maxSessionPerPMCH ) + mbms_session_id + (maxDRB + 3) * MAX_MOBILES_PER_ENB; // 1 rb_id = (mbms_service_id * maxSessionPerPMCH ) + mbms_session_id;//+ (maxDRB + 3) * MAX_MOBILES_PER_ENB; // 1
rlc_mbms_lcid2service_session_id_eNB[enb_mod_idP][lc_id].service_id = mbms_service_id; rlc_mbms_lcid2service_session_id_eNB[enb_mod_idP][lc_id].service_id = mbms_service_id;
rlc_mbms_lcid2service_session_id_eNB[enb_mod_idP][lc_id].session_id = mbms_session_id; rlc_mbms_lcid2service_session_id_eNB[enb_mod_idP][lc_id].session_id = mbms_session_id;
rlc_mbms_enb_set_lcid_by_rb_id(enb_mod_idP,rb_id,lc_id); rlc_mbms_enb_set_lcid_by_rb_id(enb_mod_idP,rb_id,lc_id);
} else { } else {
rb_id = (mbms_service_id * maxSessionPerPMCH ) + mbms_session_id + (maxDRB + 3); // 15 rb_id = (mbms_service_id * maxSessionPerPMCH ) + mbms_session_id; // + (maxDRB + 3); // 15
rlc_mbms_lcid2service_session_id_ue[ue_mod_idP][lc_id].service_id = mbms_service_id; rlc_mbms_lcid2service_session_id_ue[ue_mod_idP][lc_id].service_id = mbms_service_id;
rlc_mbms_lcid2service_session_id_ue[ue_mod_idP][lc_id].session_id = mbms_session_id; rlc_mbms_lcid2service_session_id_ue[ue_mod_idP][lc_id].session_id = mbms_session_id;
rlc_mbms_ue_set_lcid_by_rb_id(ue_mod_idP,rb_id,lc_id); rlc_mbms_ue_set_lcid_by_rb_id(ue_mod_idP,rb_id,lc_id);
...@@ -609,25 +609,31 @@ rlc_union_t* rrc_rlc_add_rlc ( ...@@ -609,25 +609,31 @@ rlc_union_t* rrc_rlc_add_rlc (
oai_emulation.info.first_ue_local); oai_emulation.info.first_ue_local);
} }
#endif #endif
if (MBMS_flagP == FALSE) {
AssertFatal (rb_idP < NB_RB_MAX, "RB id is too high (%u/%d)!\n", rb_idP, NB_RB_MAX); AssertFatal (rb_idP < NB_RB_MAX, "RB id is too high (%u/%d)!\n", rb_idP, NB_RB_MAX);
AssertFatal (chan_idP < RLC_MAX_LC, "LC id is too high (%u/%d)!\n", chan_idP, RLC_MAX_LC); AssertFatal (chan_idP < RLC_MAX_LC, "LC id is too high (%u/%d)!\n", chan_idP, RLC_MAX_LC);
}
#ifdef Rel10 #ifdef Rel10
if (MBMS_flagP == TRUE) { if (MBMS_flagP == TRUE) {
if (enb_flagP) { if (enb_flagP) {
lcid = rlc_mbms_enb_get_lcid_by_rb_id(enb_mod_idP,rb_idP); lcid = rlc_mbms_enb_get_lcid_by_rb_id(enb_mod_idP,rb_idP);
LOG_I(RLC,
"[Frame %05u] lcid %d = rlc_mbms_enb_get_lcid_by_rb_id(enb_mod_idP %u, rb_idP %u)\n",
frameP,lcid, enb_mod_idP, rb_idP);
mbms_id_p = &rlc_mbms_lcid2service_session_id_eNB[enb_mod_idP][lcid]; mbms_id_p = &rlc_mbms_lcid2service_session_id_eNB[enb_mod_idP][lcid];
rlc_mbms_lcid2service_session_id_eNB[enb_mod_idP][lcid].service_id = 0; //LG 2014-04-15rlc_mbms_lcid2service_session_id_eNB[enb_mod_idP][lcid].service_id = 0;
rlc_mbms_lcid2service_session_id_eNB[enb_mod_idP][lcid].session_id = 0; //LG 2014-04-15rlc_mbms_lcid2service_session_id_eNB[enb_mod_idP][lcid].session_id = 0;
rlc_mbms_rbid2lcid_ue[enb_mod_idP][rb_idP] = RLC_LC_UNALLOCATED; //LG 2014-04-15rlc_mbms_rbid2lcid_eNB[enb_mod_idP][rb_idP] = RLC_LC_UNALLOCATED;
} else { } else {
lcid = rlc_mbms_ue_get_lcid_by_rb_id(ue_mod_idP,rb_idP); lcid = rlc_mbms_ue_get_lcid_by_rb_id(ue_mod_idP,rb_idP);
mbms_id_p = &rlc_mbms_lcid2service_session_id_ue[ue_mod_idP][lcid]; mbms_id_p = &rlc_mbms_lcid2service_session_id_ue[ue_mod_idP][lcid];
rlc_mbms_lcid2service_session_id_eNB[ue_mod_idP][lcid].service_id = 0; //LG 2014-04-15rlc_mbms_lcid2service_session_id_eNB[ue_mod_idP][lcid].service_id = 0;
rlc_mbms_lcid2service_session_id_eNB[ue_mod_idP][lcid].session_id = 0; //LG 2014-04-15rlc_mbms_lcid2service_session_id_eNB[ue_mod_idP][lcid].session_id = 0;
rlc_mbms_rbid2lcid_ue[ue_mod_idP][rb_idP] = RLC_LC_UNALLOCATED; //LG 2014-04-15rlc_mbms_rbid2lcid_ue[ue_mod_idP][rb_idP] = RLC_LC_UNALLOCATED;
} }
key = RLC_COLL_KEY_MBMS_VALUE(enb_mod_idP, ue_mod_idP, enb_flagP, mbms_id_p->service_id, mbms_id_p->session_id); key = RLC_COLL_KEY_MBMS_VALUE(enb_mod_idP, ue_mod_idP, enb_flagP, mbms_id_p->service_id, mbms_id_p->session_id);
} else } else
...@@ -652,6 +658,18 @@ rlc_union_t* rrc_rlc_add_rlc ( ...@@ -652,6 +658,18 @@ rlc_union_t* rrc_rlc_add_rlc (
rlc_union_p = calloc(1, sizeof(rlc_union_t)); rlc_union_p = calloc(1, sizeof(rlc_union_t));
h_rc = hashtable_insert(rlc_coll_p, key, rlc_union_p); h_rc = hashtable_insert(rlc_coll_p, key, rlc_union_p);
if (h_rc == HASH_TABLE_OK) { if (h_rc == HASH_TABLE_OK) {
#ifdef Rel10
if (MBMS_flagP == TRUE) {
LOG_I(RLC, "[Frame %05u][%s][RLC_RRC][INST %u/%u] RLC service id %u session id %u rrc_rlc_add_rlc\n",
frameP,
(enb_flagP) ? "eNB" : "UE",
enb_mod_idP,
ue_mod_idP,
mbms_id_p->service_id,
mbms_id_p->session_id);
} else
#endif
{
LOG_I(RLC, "[Frame %05u][%s][RLC_RRC][INST %u/%u][%s %u] rrc_rlc_add_rlc %s\n", LOG_I(RLC, "[Frame %05u][%s][RLC_RRC][INST %u/%u][%s %u] rrc_rlc_add_rlc %s\n",
frameP, frameP,
(enb_flagP) ? "eNB" : "UE", (enb_flagP) ? "eNB" : "UE",
...@@ -660,6 +678,7 @@ rlc_union_t* rrc_rlc_add_rlc ( ...@@ -660,6 +678,7 @@ rlc_union_t* rrc_rlc_add_rlc (
(srb_flagP) ? "SRB" : "DRB", (srb_flagP) ? "SRB" : "DRB",
rb_idP, rb_idP,
(srb_flagP) ? "SRB" : "DRB"); (srb_flagP) ? "SRB" : "DRB");
}
rlc_union_p->mode = rlc_modeP; rlc_union_p->mode = rlc_modeP;
return rlc_union_p; return rlc_union_p;
} else { } else {
......
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