Update and validate the eMBMS operation and its interface to OTG, pre-ci test passed
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4148 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -753,7 +753,7 @@ int
|
||||
UE_id= oai_emulation.info.first_ue_local+oai_emulation.info.nb_ue_local + RN_id; // NB_UE_INST + RN_id
|
||||
eNB_id= oai_emulation.info.first_enb_local+oai_emulation.info.nb_enb_local + RN_id; // NB_eNB_INST + RN_id
|
||||
// currently only works in FDD
|
||||
if (oai_emulation.info.eMBMS_active_state == 3){
|
||||
if (oai_emulation.info.eMBMS_active_state == 4){
|
||||
r_mode = multicast_relay;
|
||||
LOG_I(EMU,"Activating the multicast relaying\n");
|
||||
}else {
|
||||
|
||||
@@ -111,7 +111,6 @@ void get_simulation_options(int argc, char *argv[]) {
|
||||
};
|
||||
|
||||
while ((c = getopt_long (argc, argv, "aA:b:B:c:C:D:d:eE:f:FGg:hi:j:IJ:k:l:m:M:n:N:oO:p:P:rR:s:S:Q:t:T:u:U:vVx:y:w:W:X:z:Z:", long_options, &option_index)) != -1) {
|
||||
|
||||
switch (c) {
|
||||
case 0:
|
||||
if (! strcmp(long_options[option_index].name, "pdcp_period")) {
|
||||
@@ -788,32 +787,65 @@ void update_otg_eNB(int module_id, unsigned int ctime) {
|
||||
|
||||
#ifdef Rel10
|
||||
int service_id, session_id, rb_id;
|
||||
// MBSM multicast traffic
|
||||
for (service_id = 0; service_id < 2 ; service_id++) { //maxServiceCount
|
||||
for (session_id = 0; session_id < 2; session_id++) { // maxSessionPerPMCH
|
||||
if (pdcp_mbms_array[module_id][service_id*maxSessionPerPMCH + session_id].instanciated_instance== module_id + 1){ // this service/session is configured
|
||||
otg_pkt = malloc (sizeof(Packet_otg_elt));
|
||||
// LOG_T(OTG,"multicast packet gen for (service/mch %d, session/lcid %d)\n", service_id, session_id);
|
||||
rb_id = pdcp_mbms_array[module_id][service_id*maxSessionPerPMCH + session_id].rb_id;
|
||||
(otg_pkt->otg_pkt).sdu_buffer = (u8*) packet_gen_multicast(module_id, session_id, ctime, &((otg_pkt->otg_pkt).sdu_buffer_size));
|
||||
if ((otg_pkt->otg_pkt).sdu_buffer != NULL) {
|
||||
(otg_pkt->otg_pkt).rb_id = rb_id;
|
||||
(otg_pkt->otg_pkt).module_id = module_id;
|
||||
//(otg_pkt->otg_pkt).dst_id = session_id;
|
||||
//Adding the packet to the OTG-PDCP buffer
|
||||
(otg_pkt->otg_pkt).mode = PDCP_TM;
|
||||
pkt_list_add_tail_eurecom(otg_pkt, &(otg_pdcp_buffer[module_id]));
|
||||
LOG_I(EMU, "[eNB %d] ADD pkt to OTG buffer for dst %d on rb_id %d\n", (otg_pkt->otg_pkt).module_id, (otg_pkt->otg_pkt).dst_id,(otg_pkt->otg_pkt).rb_id);
|
||||
} else {
|
||||
//LOG_I(EMU, "OTG returns null \n");
|
||||
free(otg_pkt);
|
||||
otg_pkt=NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// MBSM multicast traffic
|
||||
// if (frame >= 46) {// only generate when UE can receive MTCH (need to control this value)
|
||||
for (service_id = 0; service_id < 2 ; service_id++) { //maxServiceCount
|
||||
for (session_id = 0; session_id < 2; session_id++) { // maxSessionPerPMCH
|
||||
// LOG_I(OTG,"DUY:frame %d, pdcp_mbms_array[module_id][rb_id].instanciated_instance is %d\n",frame,pdcp_mbms_array[module_id][service_id*maxSessionPerPMCH + session_id].instanciated_instance);
|
||||
if (pdcp_mbms_array[module_id][service_id*maxSessionPerPMCH + session_id].instanciated_instance == module_id + 1){ // this service/session is configured
|
||||
|
||||
otg_pkt = malloc (sizeof(Packet_otg_elt));
|
||||
// LOG_T(OTG,"multicast packet gen for (service/mch %d, session/lcid %d, rb_id %d)\n", service_id, session_id, service_id*maxSessionPerPMCH + session_id);
|
||||
rb_id = pdcp_mbms_array[module_id][service_id*maxSessionPerPMCH + session_id].rb_id;
|
||||
(otg_pkt->otg_pkt).sdu_buffer = (u8*) packet_gen_multicast(module_id, session_id, ctime, &((otg_pkt->otg_pkt).sdu_buffer_size));
|
||||
if ((otg_pkt->otg_pkt).sdu_buffer != NULL) {
|
||||
(otg_pkt->otg_pkt).rb_id = rb_id;
|
||||
(otg_pkt->otg_pkt).module_id = module_id;
|
||||
(otg_pkt->otg_pkt).dst_id = session_id;
|
||||
//Adding the packet to the OTG-PDCP buffer
|
||||
(otg_pkt->otg_pkt).mode = PDCP_TM;
|
||||
pkt_list_add_tail_eurecom(otg_pkt, &(otg_pdcp_buffer[module_id]));
|
||||
LOG_I(EMU, "[eNB %d] ADD packet multicast to OTG buffer for dst %d on rb_id %d\n", (otg_pkt->otg_pkt).module_id, (otg_pkt->otg_pkt).dst_id,(otg_pkt->otg_pkt).rb_id);
|
||||
} else {
|
||||
//LOG_I(EMU, "OTG returns null \n");
|
||||
free(otg_pkt);
|
||||
otg_pkt=NULL;
|
||||
}
|
||||
|
||||
|
||||
// old version
|
||||
/* // MBSM multicast traffic
|
||||
#ifdef Rel10
|
||||
if (frame >= 46) {// only generate when UE can receive MTCH (need to control this value)
|
||||
for (service_id = 0; service_id < 2 ; service_id++) { //maxServiceCount
|
||||
for (session_id = 0; session_id < 2; session_id++) { // maxSessionPerPMCH
|
||||
// LOG_I(OTG,"DUY:frame %d, pdcp_mbms_array[module_id][rb_id].instanciated_instance is %d\n",frame,pdcp_mbms_array[module_id][service_id*maxSessionPerPMCH + session_id].instanciated_instance);
|
||||
if ((pdcp_mbms_array[module_id][service_id*maxSessionPerPMCH + session_id].instanciated_instance== module_id + 1) && (eNB_flag == 1)){ // this service/session is configured
|
||||
// LOG_T(OTG,"multicast packet gen for (service/mch %d, session/lcid %d)\n", service_id, session_id);
|
||||
// Duy add
|
||||
LOG_I(OTG, "frame %d, multicast packet gen for (service/mch %d, session/lcid %d, rb_id %d)\n",frame, service_id, session_id,service_id*maxSessionPerPMCH + session_id);
|
||||
// end Duy add
|
||||
rb_id = pdcp_mbms_array[module_id][service_id*maxSessionPerPMCH + session_id].rb_id;
|
||||
otg_pkt=(u8*) packet_gen_multicast(module_id, session_id, ctime, &pkt_size);
|
||||
if (otg_pkt != NULL) {
|
||||
LOG_D(OTG,"[eNB %d] sending a multicast packet from module %d on rab id %d (src %d, dst %d) pkt size %d\n", eNB_index, module_id, rb_id, module_id, session_id, pkt_size);
|
||||
pdcp_data_req(module_id, frame, eNB_flag, rb_id, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO, pkt_size, otg_pkt,PDCP_TM);
|
||||
free(otg_pkt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // end multicast traffic
|
||||
#endif
|
||||
*/
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
// } // end multicast traffic
|
||||
#endif
|
||||
|
||||
//LOG_I(EMU, "[eNB %d] update OTG nb_elts = %d \n", module_id, otg_pdcp_buffer[module_id].nb_elements);
|
||||
|
||||
//free(otg_pkt);
|
||||
|
||||
Reference in New Issue
Block a user