Commit e90b729e authored by Lionel Gauthier's avatar Lionel Gauthier

Commit for e-MBMS DUY, to be debugged/harmonized with MAC (lcid, rbid)

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5119 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent b6c164d5
...@@ -860,6 +860,10 @@ rlc_module_init (void) ...@@ -860,6 +860,10 @@ rlc_module_init (void)
memset(&rlc_mbms_array_ue[module_id1][service_id][session_id], 0, sizeof(rlc_mbms_t)); memset(&rlc_mbms_array_ue[module_id1][service_id][session_id], 0, sizeof(rlc_mbms_t));
} }
} }
for (k=0; k < RLC_MAX_MBMS_LC; k++) {
rlc_mbms_lcid2service_session_id_ue[module_id1][k].service_id = 0;
rlc_mbms_lcid2service_session_id_ue[module_id1][k].session_id = 0;
}
#endif #endif
for (rb_id=0; rb_id < NB_RB_MAX; rb_id++) { for (rb_id=0; rb_id < NB_RB_MAX; rb_id++) {
memset(&rlc_array_ue[module_id1][rb_id], 0, sizeof(rlc_t)); memset(&rlc_array_ue[module_id1][rb_id], 0, sizeof(rlc_t));
...@@ -873,6 +877,10 @@ rlc_module_init (void) ...@@ -873,6 +877,10 @@ rlc_module_init (void)
memset(&rlc_mbms_array_eNB[module_id1][service_id][session_id], 0, sizeof(rlc_mbms_t)); memset(&rlc_mbms_array_eNB[module_id1][service_id][session_id], 0, sizeof(rlc_mbms_t));
} }
} }
for (k=0; k < RLC_MAX_MBMS_LC; k++) {
rlc_mbms_lcid2service_session_id_eNB[module_id1][k].service_id = 0;
rlc_mbms_lcid2service_session_id_eNB[module_id1][k].session_id = 0;
}
#endif #endif
for (module_id2=0; module_id2 < NUMBER_OF_UE_MAX; module_id2++) { for (module_id2=0; module_id2 < NUMBER_OF_UE_MAX; module_id2++) {
for (rb_id=0; rb_id < NB_RB_MAX; rb_id++) { for (rb_id=0; rb_id < NB_RB_MAX; rb_id++) {
......
...@@ -169,11 +169,8 @@ typedef struct { ...@@ -169,11 +169,8 @@ typedef struct {
// PRIVATE INTERNALS OF RLC // PRIVATE INTERNALS OF RLC
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#ifdef Rel10 #define RLC_MAX_MBMS_LC (maxSessionPerPMCH * maxServiceCount)
#define RLC_MAX_LC ((max_val_DRB_Identity+1) * NUMBER_OF_UE_MAX + maxSessionPerPMCH * maxServiceCount)
#else
#define RLC_MAX_LC ((max_val_DRB_Identity+1)* NUMBER_OF_UE_MAX) #define RLC_MAX_LC ((max_val_DRB_Identity+1)* NUMBER_OF_UE_MAX)
#endif
protected_rlc(void (*rlc_rrc_data_ind) (module_id_t, module_id_t, frame_t, eNB_flag_t, rb_id_t , sdu_size_t , uint8_t* );) protected_rlc(void (*rlc_rrc_data_ind) (module_id_t, module_id_t, frame_t, eNB_flag_t, rb_id_t , sdu_size_t , uint8_t* );)
protected_rlc(void (*rlc_rrc_data_conf) (module_id_t , module_id_t , eNB_flag_t, rb_id_t , mui_t, rlc_tx_status_t );) protected_rlc(void (*rlc_rrc_data_conf) (module_id_t , module_id_t , eNB_flag_t, rb_id_t , mui_t, rlc_tx_status_t );)
...@@ -199,6 +196,11 @@ typedef struct rlc_mbms_s { ...@@ -199,6 +196,11 @@ typedef struct rlc_mbms_s {
rlc_um_entity_t um; rlc_um_entity_t um;
} rlc_mbms_t; } rlc_mbms_t;
typedef struct rlc_mbms_id_s {
mbms_service_id_t service_id;
mbms_session_id_t session_id;
} rlc_mbms_id_t;
#if !defined(Rel10) #if !defined(Rel10)
# if !defined(maxServiceCount) # if !defined(maxServiceCount)
//unused arrays rlc_mbms_array_ue rlc_mbms_array_eNB //unused arrays rlc_mbms_array_ue rlc_mbms_array_eNB
...@@ -211,6 +213,8 @@ typedef struct rlc_mbms_s { ...@@ -211,6 +213,8 @@ typedef struct rlc_mbms_s {
#endif #endif
public_rlc(rlc_mbms_t rlc_mbms_array_ue[NUMBER_OF_UE_MAX][maxServiceCount][maxSessionPerPMCH];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h public_rlc(rlc_mbms_t rlc_mbms_array_ue[NUMBER_OF_UE_MAX][maxServiceCount][maxSessionPerPMCH];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
public_rlc(rlc_mbms_t rlc_mbms_array_eNB[NUMBER_OF_eNB_MAX][maxServiceCount][maxSessionPerPMCH];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h public_rlc(rlc_mbms_t rlc_mbms_array_eNB[NUMBER_OF_eNB_MAX][maxServiceCount][maxSessionPerPMCH];) // 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(rb_id_t lcid2rbid_ue[NUMBER_OF_UE_MAX][RLC_MAX_LC];) /*!< \brief Pairing logical channel identifier with radio bearer identifer. */ public_rlc(rb_id_t lcid2rbid_ue[NUMBER_OF_UE_MAX][RLC_MAX_LC];) /*!< \brief Pairing logical channel identifier with radio bearer identifer. */
public_rlc(rb_id_t lcid2rbid_eNB[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX][RLC_MAX_LC];) /*!< \brief Pairing logical channel identifier with radio bearer identifer. */ public_rlc(rb_id_t lcid2rbid_eNB[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX][RLC_MAX_LC];) /*!< \brief Pairing logical channel identifier with radio bearer identifer. */
......
...@@ -17,9 +17,12 @@ ...@@ -17,9 +17,12 @@
#define DEBUG_MAC_INTERFACE 1 #define DEBUG_MAC_INTERFACE 1
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct mac_data_ind mac_rlc_deserialize_tb (char* buffer_pP, tb_size_t tb_sizeP, num_tb_t num_tbP, crc_t *crcs_pP) { struct mac_data_ind mac_rlc_deserialize_tb (
char *buffer_pP,
tb_size_t tb_sizeP,
num_tb_t num_tbP,
crc_t *crcs_pP) {
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct mac_data_ind data_ind; struct mac_data_ind data_ind;
mem_block_t* tb_p; mem_block_t* tb_p;
num_tb_t nb_tb_read; num_tb_t nb_tb_read;
...@@ -60,7 +63,7 @@ struct mac_data_ind mac_rlc_deserialize_tb (char* buffer_pP, tb_size_t tb_sizeP, ...@@ -60,7 +63,7 @@ struct mac_data_ind mac_rlc_deserialize_tb (char* buffer_pP, tb_size_t tb_sizeP,
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
tbs_size_t mac_rlc_serialize_tb (char* buffer_pP, list_t transport_blocksP) { tbs_size_t mac_rlc_serialize_tb (char* buffer_pP, list_t transport_blocksP) {
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
mem_block_t* tb_p; mem_block_t *tb_p;
tbs_size_t tbs_size; tbs_size_t tbs_size;
tbs_size_t tb_size; tbs_size_t tb_size;
...@@ -81,7 +84,8 @@ tbs_size_t mac_rlc_serialize_tb (char* buffer_pP, list_t transport_blocksP) { ...@@ -81,7 +84,8 @@ tbs_size_t mac_rlc_serialize_tb (char* buffer_pP, list_t transport_blocksP) {
return tbs_size; return tbs_size;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
tbs_size_t mac_rlc_data_req (module_id_t enb_mod_idP, tbs_size_t mac_rlc_data_req(
module_id_t enb_mod_idP,
module_id_t ue_mod_idP, module_id_t ue_mod_idP,
frame_t frameP, frame_t frameP,
eNB_flag_t enb_flagP, eNB_flag_t enb_flagP,
...@@ -93,6 +97,7 @@ tbs_size_t mac_rlc_data_req (module_id_t enb_mod_idP, ...@@ -93,6 +97,7 @@ tbs_size_t mac_rlc_data_req (module_id_t enb_mod_idP,
rb_id_t rb_id = 0; rb_id_t rb_id = 0;
rlc_mode_t rlc_mode = RLC_MODE_NONE; rlc_mode_t rlc_mode = RLC_MODE_NONE;
void *rlc_p = NULL; void *rlc_p = NULL;
rlc_mbms_id_t *mbms_id_p = NULL;
#ifdef DEBUG_MAC_INTERFACE #ifdef DEBUG_MAC_INTERFACE
LOG_D(RLC, "\n[RLC] Inst %s enb id %d ue id %d: MAC_RLC_DATA_REQ channel %d (%d) MAX RB %d, Num_tb %d\n", LOG_D(RLC, "\n[RLC] Inst %s enb id %d ue id %d: MAC_RLC_DATA_REQ channel %d (%d) MAX RB %d, Num_tb %d\n",
...@@ -100,7 +105,7 @@ tbs_size_t mac_rlc_data_req (module_id_t enb_mod_idP, ...@@ -100,7 +105,7 @@ tbs_size_t mac_rlc_data_req (module_id_t enb_mod_idP,
#endif // DEBUG_MAC_INTERFACE #endif // DEBUG_MAC_INTERFACE
if (MBMS_flagP) if (MBMS_flagP)
AssertFatal (channel_idP < RLC_MAX_LC, "channel id is too high (%u/%d)!\n", channel_idP, RLC_MAX_LC); AssertFatal (channel_idP < RLC_MAX_MBMS_LC, "channel id is too high (%u/%d)!\n", channel_idP, RLC_MAX_MBMS_LC);
else else
AssertFatal (channel_idP < NB_RB_MAX, "channel id is too high (%u/%d)!\n", channel_idP, NB_RB_MAX); AssertFatal (channel_idP < NB_RB_MAX, "channel id is too high (%u/%d)!\n", channel_idP, NB_RB_MAX);
...@@ -118,6 +123,8 @@ tbs_size_t mac_rlc_data_req (module_id_t enb_mod_idP, ...@@ -118,6 +123,8 @@ tbs_size_t mac_rlc_data_req (module_id_t enb_mod_idP,
ue_mod_idP, ue_mod_idP,
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local); oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
} else { } else {
AssertFatal (MBMS_flagP == MBMS_FLAG_NO ," MBMS FLAG SHOULD NOT BE SET IN mac_rlc_data_req in UE\n");
AssertFatal (ue_mod_idP < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local), AssertFatal (ue_mod_idP < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local),
"UE module id is too high (%u/%d)!\n", "UE module id is too high (%u/%d)!\n",
ue_mod_idP, ue_mod_idP,
...@@ -130,6 +137,13 @@ tbs_size_t mac_rlc_data_req (module_id_t enb_mod_idP, ...@@ -130,6 +137,13 @@ tbs_size_t mac_rlc_data_req (module_id_t enb_mod_idP,
if (enb_flagP) { if (enb_flagP) {
if (MBMS_flagP) {
mbms_id_p = &rlc_mbms_lcid2service_session_id_eNB[enb_mod_idP][channel_idP];
rb_id = rlc_mbms_array_eNB[enb_mod_idP][mbms_id_p->service_id][mbms_id_p->session_id].rb_id;
rlc_p = (void*)&rlc_mbms_array_eNB[enb_mod_idP][mbms_id_p->service_id][mbms_id_p->session_id].um;
AssertFatal (rlc_mbms_array_eNB[enb_mod_idP][mbms_id_p->service_id][mbms_id_p->session_id].um.allocation == TRUE ,
"enB MBMS RLC UM not configured rb id %u lcid %u module %u!\n", rb_id, channel_idP, enb_mod_idP);
} else {
rb_id = lcid2rbid_eNB[enb_mod_idP][ue_mod_idP][channel_idP]; rb_id = lcid2rbid_eNB[enb_mod_idP][ue_mod_idP][channel_idP];
rlc_mode = rlc_array_eNB[enb_mod_idP][ue_mod_idP][rb_id].mode; rlc_mode = rlc_array_eNB[enb_mod_idP][ue_mod_idP][rb_id].mode;
switch (rlc_mode) { switch (rlc_mode) {
...@@ -149,6 +163,7 @@ tbs_size_t mac_rlc_data_req (module_id_t enb_mod_idP, ...@@ -149,6 +163,7 @@ tbs_size_t mac_rlc_data_req (module_id_t enb_mod_idP,
default: default:
AssertFatal (0 , "enB RLC internal memory error rb id %u lcid %u module %u!\n", rb_id, channel_idP, enb_mod_idP); AssertFatal (0 , "enB RLC internal memory error rb id %u lcid %u module %u!\n", rb_id, channel_idP, enb_mod_idP);
} }
}
} else { } else {
rb_id = lcid2rbid_ue[ue_mod_idP][channel_idP]; rb_id = lcid2rbid_ue[ue_mod_idP][channel_idP];
rlc_mode = rlc_array_ue[ue_mod_idP][rb_id].mode; rlc_mode = rlc_array_ue[ue_mod_idP][rb_id].mode;
...@@ -195,7 +210,8 @@ tbs_size_t mac_rlc_data_req (module_id_t enb_mod_idP, ...@@ -195,7 +210,8 @@ tbs_size_t mac_rlc_data_req (module_id_t enb_mod_idP,
return (tbs_size_t)0; return (tbs_size_t)0;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void mac_rlc_data_ind (module_id_t enb_mod_idP, void mac_rlc_data_ind (
module_id_t enb_mod_idP,
module_id_t ue_mod_idP, module_id_t ue_mod_idP,
frame_t frameP, frame_t frameP,
eNB_flag_t enb_flagP, eNB_flag_t enb_flagP,
...@@ -209,6 +225,7 @@ void mac_rlc_data_ind (module_id_t enb_mod_idP, ...@@ -209,6 +225,7 @@ void mac_rlc_data_ind (module_id_t enb_mod_idP,
rb_id_t rb_id = 0; rb_id_t rb_id = 0;
rlc_mode_t rlc_mode = RLC_MODE_NONE; rlc_mode_t rlc_mode = RLC_MODE_NONE;
void *rlc_p = NULL; void *rlc_p = NULL;
rlc_mbms_id_t *mbms_id_p = NULL;
#ifdef DEBUG_MAC_INTERFACE #ifdef DEBUG_MAC_INTERFACE
if (num_tbP) { if (num_tbP) {
LOG_D(RLC, "[Frame %5u][%s][RLC][MOD %u/%u] MAC_RLC_DATA_IND on channel %d (%d), rb max %d, Num_tb %d\n", LOG_D(RLC, "[Frame %5u][%s][RLC][MOD %u/%u] MAC_RLC_DATA_IND on channel %d (%d), rb max %d, Num_tb %d\n",
...@@ -224,9 +241,11 @@ void mac_rlc_data_ind (module_id_t enb_mod_idP, ...@@ -224,9 +241,11 @@ void mac_rlc_data_ind (module_id_t enb_mod_idP,
#endif // DEBUG_MAC_INTERFACE #endif // DEBUG_MAC_INTERFACE
#ifdef OAI_EMU #ifdef OAI_EMU
if (MBMS_flagP) if (MBMS_flagP)
AssertFatal (channel_idP < RLC_MAX_LC, "channel id is too high (%u/%d)!\n", channel_idP, RLC_MAX_LC); AssertFatal (channel_idP < RLC_MAX_MBMS_LC, "channel id is too high (%u/%d)!\n",
channel_idP, RLC_MAX_MBMS_LC);
else else
AssertFatal (channel_idP < NB_RB_MAX, "channel id is too high (%u/%d)!\n", channel_idP, NB_RB_MAX); AssertFatal (channel_idP < NB_RB_MAX, "channel id is too high (%u/%d)!\n",
channel_idP, NB_RB_MAX);
if (enb_flagP) { if (enb_flagP) {
AssertFatal ((enb_mod_idP >= oai_emulation.info.first_enb_local) && (oai_emulation.info.nb_enb_local > 0), AssertFatal ((enb_mod_idP >= oai_emulation.info.first_enb_local) && (oai_emulation.info.nb_enb_local > 0),
...@@ -241,6 +260,7 @@ void mac_rlc_data_ind (module_id_t enb_mod_idP, ...@@ -241,6 +260,7 @@ void mac_rlc_data_ind (module_id_t enb_mod_idP,
"UE module id is too high (%u/%d)!\n", "UE module id is too high (%u/%d)!\n",
ue_mod_idP, ue_mod_idP,
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local); oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
AssertFatal (MBMS_flagP == MBMS_FLAG_NO ," MBMS FLAG SHOULD NOT BE SET IN mac_rlc_data_ind in eNB\n");
} else { } else {
AssertFatal (ue_mod_idP < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local), AssertFatal (ue_mod_idP < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local),
"UE module id is too high (%u/%d)!\n", "UE module id is too high (%u/%d)!\n",
...@@ -272,6 +292,13 @@ void mac_rlc_data_ind (module_id_t enb_mod_idP, ...@@ -272,6 +292,13 @@ void mac_rlc_data_ind (module_id_t enb_mod_idP,
default: default:
AssertFatal (0 , "enB RLC internal memory error rb id %u lcid %u module %u!\n", rb_id, channel_idP, enb_mod_idP); AssertFatal (0 , "enB RLC internal memory error rb id %u lcid %u module %u!\n", rb_id, channel_idP, enb_mod_idP);
} }
} else {
if (MBMS_flagP) {
mbms_id_p = &rlc_mbms_lcid2service_session_id_ue[ue_mod_idP][channel_idP];
rb_id = rlc_mbms_array_ue[ue_mod_idP][mbms_id_p->service_id][mbms_id_p->session_id].rb_id;
rlc_p = (void*)&rlc_mbms_array_ue[ue_mod_idP][mbms_id_p->service_id][mbms_id_p->session_id].um;
AssertFatal (rlc_mbms_array_ue[ue_mod_idP][mbms_id_p->service_id][mbms_id_p->session_id].um.allocation == TRUE ,
"UE MBMS RLC UM not configured rb id %u lcid %u module %u!\n", rb_id, channel_idP, ue_mod_idP);
} else { } else {
rb_id = lcid2rbid_ue[ue_mod_idP][channel_idP]; rb_id = lcid2rbid_ue[ue_mod_idP][channel_idP];
AssertFatal (rb_id < NB_RB_MAX, "UE RB id is too high (%u/%d) lcid %u enb module %u ue module id %u!\n", rb_id, NB_RB_MAX, channel_idP, enb_mod_idP, ue_mod_idP); AssertFatal (rb_id < NB_RB_MAX, "UE RB id is too high (%u/%d) lcid %u enb module %u ue module id %u!\n", rb_id, NB_RB_MAX, channel_idP, enb_mod_idP, ue_mod_idP);
...@@ -293,6 +320,7 @@ void mac_rlc_data_ind (module_id_t enb_mod_idP, ...@@ -293,6 +320,7 @@ void mac_rlc_data_ind (module_id_t enb_mod_idP,
AssertFatal (0 , "UE RLC internal memory error rb id %u lcid %u module %u!\n", rb_id, channel_idP, ue_mod_idP); AssertFatal (0 , "UE RLC internal memory error rb id %u lcid %u module %u!\n", rb_id, channel_idP, ue_mod_idP);
} }
} }
}
struct mac_data_ind data_ind = mac_rlc_deserialize_tb(buffer_pP, tb_sizeP, num_tbP, crcs_pP); struct mac_data_ind data_ind = mac_rlc_deserialize_tb(buffer_pP, tb_sizeP, num_tbP, crcs_pP);
switch (rlc_mode) { switch (rlc_mode) {
case RLC_MODE_NONE: case RLC_MODE_NONE:
...@@ -322,7 +350,14 @@ void mac_rlc_data_ind (module_id_t enb_mod_idP, ...@@ -322,7 +350,14 @@ void mac_rlc_data_ind (module_id_t enb_mod_idP,
} }
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
mac_rlc_status_resp_t mac_rlc_status_ind (module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame_t frameP, eNB_flag_t enb_flagP, MBMS_flag_t MBMS_flagP, logical_chan_id_t channel_idP, tb_size_t tb_sizeP) { mac_rlc_status_resp_t mac_rlc_status_ind(
module_id_t enb_mod_idP,
module_id_t ue_mod_idP,
frame_t frameP,
eNB_flag_t enb_flagP,
MBMS_flag_t MBMS_flagP,
logical_chan_id_t channel_idP,
tb_size_t tb_sizeP) {
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
mac_rlc_status_resp_t mac_rlc_status_resp; mac_rlc_status_resp_t mac_rlc_status_resp;
struct mac_status_ind tx_status; struct mac_status_ind tx_status;
...@@ -330,15 +365,28 @@ mac_rlc_status_resp_t mac_rlc_status_ind (module_id_t enb_mod_idP, module_id ...@@ -330,15 +365,28 @@ mac_rlc_status_resp_t mac_rlc_status_ind (module_id_t enb_mod_idP, module_id
rb_id_t rb_id = 0; rb_id_t rb_id = 0;
rlc_mode_t rlc_mode = RLC_MODE_NONE; rlc_mode_t rlc_mode = RLC_MODE_NONE;
void *rlc_p = NULL; void *rlc_p = NULL;
rlc_mbms_id_t *mbms_id_p = NULL;
memset (&mac_rlc_status_resp, 0, sizeof(mac_rlc_status_resp_t)); memset (&mac_rlc_status_resp, 0, sizeof(mac_rlc_status_resp_t));
memset (&tx_status , 0, sizeof(struct mac_status_ind)); memset (&tx_status , 0, sizeof(struct mac_status_ind));
#ifdef OAI_EMU #ifdef OAI_EMU
if (MBMS_flagP) if (MBMS_flagP)
AssertFatal (channel_idP < RLC_MAX_LC, "%s channel id is too high (%u/%d) enb module id %u ue module id %u!\n",(enb_flagP) ? "eNB" : "UE", channel_idP, RLC_MAX_LC, enb_mod_idP, ue_mod_idP); AssertFatal (channel_idP < RLC_MAX_MBMS_LC,
"%s channel id is too high (%u/%d) enb module id %u ue module id %u!\n",
(enb_flagP) ? "eNB" : "UE",
channel_idP,
RLC_MAX_MBMS_LC,
enb_mod_idP,
ue_mod_idP);
else else
AssertFatal (channel_idP < NB_RB_MAX, "%s channel id is too high (%u/%d) enb module id %u ue module id %u!\n",(enb_flagP) ? "eNB" : "UE", channel_idP, NB_RB_MAX, enb_mod_idP, ue_mod_idP); AssertFatal (channel_idP < NB_RB_MAX,
"%s channel id is too high (%u/%d) enb module id %u ue module id %u!\n",
(enb_flagP) ? "eNB" : "UE",
channel_idP,
NB_RB_MAX,
enb_mod_idP,
ue_mod_idP);
if (enb_flagP) { if (enb_flagP) {
AssertFatal ((enb_mod_idP >= oai_emulation.info.first_enb_local) && (oai_emulation.info.nb_enb_local > 0), AssertFatal ((enb_mod_idP >= oai_emulation.info.first_enb_local) && (oai_emulation.info.nb_enb_local > 0),
...@@ -367,6 +415,13 @@ mac_rlc_status_resp_t mac_rlc_status_ind (module_id_t enb_mod_idP, module_id ...@@ -367,6 +415,13 @@ mac_rlc_status_resp_t mac_rlc_status_ind (module_id_t enb_mod_idP, module_id
if (enb_flagP) { if (enb_flagP) {
if (MBMS_flagP) {
mbms_id_p = &rlc_mbms_lcid2service_session_id_eNB[enb_mod_idP][channel_idP];
rb_id = rlc_mbms_array_eNB[enb_mod_idP][mbms_id_p->service_id][mbms_id_p->session_id].rb_id;
rlc_p = (void*)&rlc_mbms_array_eNB[enb_mod_idP][mbms_id_p->service_id][mbms_id_p->session_id].um;
AssertFatal (rlc_mbms_array_eNB[enb_mod_idP][mbms_id_p->service_id][mbms_id_p->session_id].um.allocation == TRUE ,
"enB MBMS RLC UM not configured rb id %u lcid %u module %u!\n", rb_id, channel_idP, enb_mod_idP);
} else {
rb_id = lcid2rbid_eNB[enb_mod_idP][ue_mod_idP][channel_idP]; rb_id = lcid2rbid_eNB[enb_mod_idP][ue_mod_idP][channel_idP];
if (rb_id >= NB_RB_MAX) { if (rb_id >= NB_RB_MAX) {
/*LOG_D(RLC, "[FRAME %05d][%s][RLC][MOD %u/%u] MAC STATUS IND TO NOT CONFIGURED BEARER lc id %u \n", /*LOG_D(RLC, "[FRAME %05d][%s][RLC][MOD %u/%u] MAC STATUS IND TO NOT CONFIGURED BEARER lc id %u \n",
...@@ -395,6 +450,14 @@ mac_rlc_status_resp_t mac_rlc_status_ind (module_id_t enb_mod_idP, module_id ...@@ -395,6 +450,14 @@ mac_rlc_status_resp_t mac_rlc_status_ind (module_id_t enb_mod_idP, module_id
default: default:
AssertFatal (0 , "enB RLC internal memory error rb id %u lcid %u enb id %u ue id %u!\n", rb_id, channel_idP, enb_mod_idP, ue_mod_idP); AssertFatal (0 , "enB RLC internal memory error rb id %u lcid %u enb id %u ue id %u!\n", rb_id, channel_idP, enb_mod_idP, ue_mod_idP);
} }
}
} else {
if (MBMS_flagP) {
mbms_id_p = &rlc_mbms_lcid2service_session_id_ue[ue_mod_idP][channel_idP];
rb_id = rlc_mbms_array_ue[ue_mod_idP][mbms_id_p->service_id][mbms_id_p->session_id].rb_id;
rlc_p = (void*)&rlc_mbms_array_ue[ue_mod_idP][mbms_id_p->service_id][mbms_id_p->session_id].um;
AssertFatal (rlc_mbms_array_ue[ue_mod_idP][mbms_id_p->service_id][mbms_id_p->session_id].um.allocation == TRUE ,
"UE MBMS RLC UM not configured rb id %u lcid %u module %u!\n", rb_id, channel_idP, ue_mod_idP);
} else { } else {
rb_id = lcid2rbid_ue[ue_mod_idP][channel_idP]; rb_id = lcid2rbid_ue[ue_mod_idP][channel_idP];
if (rb_id >= NB_RB_MAX) { if (rb_id >= NB_RB_MAX) {
...@@ -425,6 +488,7 @@ mac_rlc_status_resp_t mac_rlc_status_ind (module_id_t enb_mod_idP, module_id ...@@ -425,6 +488,7 @@ mac_rlc_status_resp_t mac_rlc_status_ind (module_id_t enb_mod_idP, module_id
AssertFatal (0 , "UE RLC internal memory error rb id %u lcid %u enb id %u ue id %u!\n", rb_id, channel_idP, enb_mod_idP, ue_mod_idP); AssertFatal (0 , "UE RLC internal memory error rb id %u lcid %u enb id %u ue id %u!\n", rb_id, channel_idP, enb_mod_idP, ue_mod_idP);
} }
} }
}
switch (rlc_mode) { switch (rlc_mode) {
case RLC_MODE_NONE: case RLC_MODE_NONE:
......
...@@ -403,6 +403,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (module_id_t enb_mod_idP, ...@@ -403,6 +403,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (module_id_t enb_mod_idP,
if (pmch_InfoList_r9_pP != NULL) { if (pmch_InfoList_r9_pP != NULL) {
for (i=0;i<pmch_InfoList_r9_pP->list.count;i++) { for (i=0;i<pmch_InfoList_r9_pP->list.count;i++) {
#warning TO DO REMOVE MBMS RLC
mbms_SessionInfoList_r9_p = &(pmch_InfoList_r9_pP->list.array[i]->mbms_SessionInfoList_r9); mbms_SessionInfoList_r9_p = &(pmch_InfoList_r9_pP->list.array[i]->mbms_SessionInfoList_r9);
for (j=0;j<mbms_SessionInfoList_r9_p->list.count;j++) { for (j=0;j<mbms_SessionInfoList_r9_p->list.count;j++) {
MBMS_SessionInfo_p = mbms_SessionInfoList_r9_p->list.array[j]; MBMS_SessionInfo_p = mbms_SessionInfoList_r9_p->list.array[j];
...@@ -414,17 +415,12 @@ rlc_op_status_t rrc_rlc_config_asn1_req (module_id_t enb_mod_idP, ...@@ -414,17 +415,12 @@ rlc_op_status_t rrc_rlc_config_asn1_req (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; // 1 rb_id = (mbms_service_id * maxSessionPerPMCH ) + mbms_session_id; // 1
// NO CHECK rlc_mbms_lcid2service_session_id_eNB[enb_mod_idP][lc_id].service_id = mbms_service_id;
/*if (rlc_mbms_array_eNB[enb_mod_idP][mbms_service_id][mbms_session_id].instanciated_instance == enb_mod_idP + 1) rlc_mbms_lcid2service_session_id_eNB[enb_mod_idP][lc_id].session_id = mbms_session_id;
action = CONFIG_ACTION_MBMS_MODIFY;
else
action = CONFIG_ACTION_MBMS_ADD;*/
} 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
/*if (rlc_mbms_array_ue[ue_mod_idP][mbms_service_id][mbms_session_id].instanciated_instance == ue_mod_idP + 1) rlc_mbms_lcid2service_session_id_eNB[ue_mod_idP][lc_id].service_id = mbms_service_id;
action = CONFIG_ACTION_MBMS_MODIFY; rlc_mbms_lcid2service_session_id_eNB[ue_mod_idP][lc_id].session_id = mbms_session_id;
else
action = CONFIG_ACTION_MBMS_ADD;*/
} }
dl_um_rlc.sn_FieldLength = SN_FieldLength_size5; dl_um_rlc.sn_FieldLength = SN_FieldLength_size5;
dl_um_rlc.t_Reordering = T_Reordering_ms0; dl_um_rlc.t_Reordering = T_Reordering_ms0;
...@@ -869,14 +865,13 @@ rlc_op_status_t rrc_rlc_config_req (module_id_t enb_mod_idP, module_id_t ue_mo ...@@ -869,14 +865,13 @@ rlc_op_status_t rrc_rlc_config_req (module_id_t enb_mod_idP, module_id_t ue_mo
} }
#endif #endif
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);
#warning TO DO rrc_rlc_config_req
switch (actionP) { switch (actionP) {
case CONFIG_ACTION_ADD: case CONFIG_ACTION_ADD:
if ((status = rrc_rlc_add_rlc(enb_mod_idP, ue_mod_idP, frameP, enb_flagP, rb_idP, rb_idP, rlc_infoP.rlc_mode)) != RLC_OP_STATUS_OK) { if ((status = rrc_rlc_add_rlc(enb_mod_idP, ue_mod_idP, frameP, enb_flagP, rb_idP, rb_idP, rlc_infoP.rlc_mode)) != RLC_OP_STATUS_OK) {
return status; return status;
} }
// no break, fall to next case
case CONFIG_ACTION_MODIFY: case CONFIG_ACTION_MODIFY:
switch (rlc_infoP.rlc_mode) { switch (rlc_infoP.rlc_mode) {
case RLC_MODE_AM: case RLC_MODE_AM:
......
...@@ -68,8 +68,8 @@ ...@@ -68,8 +68,8 @@
ntohs((addr)->s6_addr16[7]) ntohs((addr)->s6_addr16[7])
#define OAI_DRV_DEBUG_SEND //#define OAI_DRV_DEBUG_SEND
#define OAI_DRV_DEBUG_RECEIVE //#define OAI_DRV_DEBUG_RECEIVE
void oai_nw_drv_common_class_wireless2ip(uint16_t dlen, void oai_nw_drv_common_class_wireless2ip(uint16_t dlen,
void *pdcp_sdu, void *pdcp_sdu,
int inst, int inst,
......
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