From 97c2aff91179e9ef2497e3c588a2500d21f0d243 Mon Sep 17 00:00:00 2001 From: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> Date: Tue, 6 Feb 2018 16:44:58 +0100 Subject: [PATCH] PC5-U - passing (source,destination) down to PDCP/RLC/MAC (first alternative - mapping of L2Ids form IP Addresses --- openair2/COMMON/mac_rrc_primitives.h | 14 +- openair2/ENB_APP/flexran_agent_common.c | 12 +- openair2/LAYER2/MAC/config.c | 37 ++- openair2/LAYER2/MAC/defs.h | 4 + openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 39 ++- openair2/LAYER2/MAC/eNB_scheduler_mch.c | 13 +- .../MAC/flexran_agent_scheduler_dataplane.c | 19 +- .../MAC/flexran_agent_scheduler_dlsch_ue.c | 12 +- openair2/LAYER2/MAC/pre_processor.c | 6 +- openair2/LAYER2/MAC/proto.h | 7 +- openair2/LAYER2/MAC/ra_procedures.c | 13 +- openair2/LAYER2/MAC/ue_procedures.c | 238 +++++++++--------- openair2/LAYER2/PDCP_v10.1.0/pdcp.c | 23 +- openair2/LAYER2/PDCP_v10.1.0/pdcp.h | 7 +- openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c | 91 +++++-- .../LAYER2/PDCP_v10.1.0/pdcp_proto_extern.h | 7 +- .../RLC/UM_v9.3.0/rlc_um_control_primitives.c | 14 +- .../RLC/UM_v9.3.0/rlc_um_control_primitives.h | 7 +- openair2/LAYER2/RLC/rlc.c | 11 +- openair2/LAYER2/RLC/rlc.h | 49 +++- openair2/LAYER2/RLC/rlc_mac.c | 27 +- openair2/LAYER2/RLC/rlc_mpls.c | 6 +- openair2/LAYER2/RLC/rlc_rrc.c | 138 ++++++++-- openair2/RRC/LITE/L2_interface.c | 6 +- openair2/RRC/LITE/defs.h | 19 +- openair2/RRC/LITE/rrc_UE.c | 235 ++++++++++++----- openair2/RRC/LITE/rrc_eNB.c | 16 +- openair3/GTPV1-U/gtpv1u_eNB.c | 13 +- 28 files changed, 795 insertions(+), 288 deletions(-) diff --git a/openair2/COMMON/mac_rrc_primitives.h b/openair2/COMMON/mac_rrc_primitives.h index 8df0970ba01..df5e0848b16 100644 --- a/openair2/COMMON/mac_rrc_primitives.h +++ b/openair2/COMMON/mac_rrc_primitives.h @@ -372,10 +372,20 @@ typedef struct { struct PMCH_InfoList_r9 *pmch_InfoList #endif ); - unsigned int (*mac_rlc_data_req)(module_id_t, unsigned int, const unsigned int,char*); + unsigned int (*mac_rlc_data_req)(module_id_t, unsigned int, const unsigned int,char* +#ifdef Rel14 + ,uint32_t + ,uint32_t +#endif + ); void (*mac_rlc_data_ind)(module_id_t, logical_chan_id_t, char*, tb_size_t, num_tb_t, crc_t* ); mac_rlc_status_resp_t (*mac_rlc_status_ind) (module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame_t frameP, sub_frame_t subframeP, eNB_flag_t eNB_flagP, MBMS_flag_t MBMS_flagP, - logical_chan_id_t channel_idP, tb_size_t tb_sizeP); + logical_chan_id_t channel_idP, tb_size_t tb_sizeP +#ifdef Rel14 + ,uint32_t sourceL2Id + ,uint32_t destinationL2Id +#endif + ); signed int (*rrc_rlc_data_req)(module_id_t, rb_id_t, mui_t, confirm_t, sdu_size_t, char *); void (*rrc_rlc_register_rrc) (void (*rrc_data_indP)(module_id_t , rb_id_t , sdu_size_t , char* ), void (*rrc_data_confP) (module_id_t , rb_id_t , mui_t ) ) ; diff --git a/openair2/ENB_APP/flexran_agent_common.c b/openair2/ENB_APP/flexran_agent_common.c index 69c786edb33..cc5d704284e 100644 --- a/openair2/ENB_APP/flexran_agent_common.c +++ b/openair2/ENB_APP/flexran_agent_common.c @@ -563,7 +563,11 @@ int flexran_get_tx_queue_size(mid_t mod_id, mid_t ue_id, logical_chan_id_t chann rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id); uint16_t frame = (uint16_t) flexran_get_current_frame(mod_id); uint16_t subframe = (uint16_t) flexran_get_current_subframe(mod_id); - mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id,frame,subframe,ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0); + mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id,frame,subframe,ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0 +#ifdef Rel14 + ,0, 0 +#endif + ); return rlc_status.bytes_in_buffer; } @@ -571,7 +575,11 @@ int flexran_get_hol_delay(mid_t mod_id, mid_t ue_id, logical_chan_id_t channel_i rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id); uint16_t frame = (uint16_t) flexran_get_current_frame(mod_id); uint16_t subframe = (uint16_t) flexran_get_current_subframe(mod_id); - mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id, rnti, mod_id, frame, subframe, ENB_FLAG_YES, MBMS_FLAG_NO, channel_id, 0); + mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id, rnti, mod_id, frame, subframe, ENB_FLAG_YES, MBMS_FLAG_NO, channel_id, 0 +#ifdef Rel14 + ,0, 0 +#endif + ); return rlc_status.head_sdu_creation_time; } diff --git a/openair2/LAYER2/MAC/config.c b/openair2/LAYER2/MAC/config.c index 17681ec9de6..6577e442fad 100644 --- a/openair2/LAYER2/MAC/config.c +++ b/openair2/LAYER2/MAC/config.c @@ -1048,9 +1048,9 @@ rrc_mac_config_req_ue( uint16_t cba_rnti #endif #if defined(Rel14) - ,uint32_t *sourceL2Id, - uint32_t *groupL2Id, - uint32_t *destinationL2Id + ,config_action_t config_action + ,const uint32_t * const sourceL2Id + ,const uint32_t * const destinationL2Id #endif ) @@ -1374,14 +1374,29 @@ rrc_mac_config_req_ue( //for D2D #if defined(Rel10) || defined(Rel14) - if (sourceL2Id){ - UE_mac_inst[Mod_idP].sourceL2Id = *sourceL2Id; - } - if (groupL2Id) { - UE_mac_inst[Mod_idP].groupL2Id = *groupL2Id; - } - if (destinationL2Id) { - UE_mac_inst[Mod_idP].destinationL2Id = *destinationL2Id; + switch (config_action) { + case CONFIG_ACTION_ADD: + if (sourceL2Id){ + UE_mac_inst[Mod_idP].sourceL2Id = *sourceL2Id; + LOG_I(MAC,"[UE %d] Configure source L2Id 0x%08x \n", Mod_idP, *sourceL2Id ); + } + if (destinationL2Id) { + LOG_I(MAC,"[UE %d] Configure destination L2Id 0x%08x\n", Mod_idP, *destinationL2Id ); + int j = 0; + int i = 0; + for (i=0; i< MAX_NUM_DEST; i++) { + if ((UE_mac_inst[Mod_idP].destinationList[i] == 0) && (j == 0)) j = i+1; + if (UE_mac_inst[Mod_idP].destinationList[i] == *destinationL2Id) break; //destination already exists! + } + if ((i == MAX_NUM_DEST) && (j > 0)) UE_mac_inst[Mod_idP].destinationList[j-1] = *destinationL2Id; + UE_mac_inst[Mod_idP].numCommFlows++; + } + break; + case CONFIG_ACTION_REMOVE: + //TODO + break; + default: + break; } #endif diff --git a/openair2/LAYER2/MAC/defs.h b/openair2/LAYER2/MAC/defs.h index 9d575340b4d..cf23477513c 100644 --- a/openair2/LAYER2/MAC/defs.h +++ b/openair2/LAYER2/MAC/defs.h @@ -445,6 +445,7 @@ typedef struct { #define CC_ACT_DEACT 27 //TTN (for D2D) #define SL_DISCOVERY 8 //LCID (fake) +#define MAX_NUM_DEST 10 #endif // ULSCH LCHAN IDs @@ -1341,6 +1342,9 @@ typedef struct { uint32_t groupL2Id; //SL destinationL2Id uint32_t destinationL2Id; + //List of destinations + uint32_t destinationList[MAX_NUM_DEST]; + uint8_t numCommFlows; #endif /// pointer to TDD Configuration (NULL for FDD) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index 82e102868f1..6caaae67a52 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -849,7 +849,11 @@ schedule_ue_spec( ENB_FLAG_YES, MBMS_FLAG_NO, DCCH, - (TBS-ta_len-header_len_dcch)); // transport block set size + (TBS-ta_len-header_len_dcch) // transport block set size +#ifdef Rel14 + ,0, 0 +#endif + ); sdu_lengths[0]=0; @@ -865,7 +869,12 @@ schedule_ue_spec( MBMS_FLAG_NO, DCCH, TBS, //not used - (char *)&dlsch_buffer[0]); + (char *)&dlsch_buffer[0] +#ifdef Rel14 + ,0, + 0 +#endif + ); T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP), T_INT(CC_id), T_INT(rnti), T_INT(frameP), T_INT(subframeP), T_INT(harq_pid), T_INT(DCCH), T_INT(sdu_lengths[0])); @@ -902,7 +911,11 @@ schedule_ue_spec( ENB_FLAG_YES, MBMS_FLAG_NO, DCCH+1, - (TBS-ta_len-header_len_dcch-sdu_length_total)); // transport block set size less allocations for timing advance and + (TBS-ta_len-header_len_dcch-sdu_length_total) // transport block set size less allocations for timing advance and +#ifdef Rel14 + ,0, 0 +#endif + ); // DCCH SDU sdu_lengths[num_sdus] = 0; @@ -918,7 +931,12 @@ schedule_ue_spec( MBMS_FLAG_NO, DCCH+1, TBS, //not used - (char *)&dlsch_buffer[sdu_length_total]); + (char *)&dlsch_buffer[sdu_length_total] +#ifdef Rel14 + ,0, + 0 +#endif + ); T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP), T_INT(CC_id), T_INT(rnti), T_INT(frameP), T_INT(subframeP), T_INT(harq_pid), T_INT(DCCH+1), T_INT(sdu_lengths[num_sdus])); @@ -964,7 +982,11 @@ schedule_ue_spec( ENB_FLAG_YES, MBMS_FLAG_NO, lcid, - TBS-ta_len-header_len_dcch-sdu_length_total-header_len_dtch); + TBS-ta_len-header_len_dcch-sdu_length_total-header_len_dtch +#ifdef Rel14 + ,0, 0 +#endif + ); if (rlc_status.bytes_in_buffer > 0) { @@ -979,7 +1001,12 @@ schedule_ue_spec( MBMS_FLAG_NO, lcid, TBS, //not used - (char*)&dlsch_buffer[sdu_length_total]); + (char*)&dlsch_buffer[sdu_length_total] +#ifdef Rel14 + ,0, + 0 +#endif + ); T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP), T_INT(CC_id), T_INT(rnti), T_INT(frameP), T_INT(subframeP), T_INT(harq_pid), T_INT(lcid), T_INT(sdu_lengths[num_sdus])); diff --git a/openair2/LAYER2/MAC/eNB_scheduler_mch.c b/openair2/LAYER2/MAC/eNB_scheduler_mch.c index 3b05850a1d5..f6b4d02f0ab 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_mch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_mch.c @@ -508,7 +508,11 @@ int schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP, sub_fra TBS-header_len_mcch-header_len_msi-sdu_length_total-header_len_mtch); rlc_status = mac_rlc_status_ind(module_idP,0,frameP,subframeP,module_idP,ENB_FLAG_YES,MBMS_FLAG_YES,MTCH, - TBS-header_len_mcch-header_len_msi-sdu_length_total-header_len_mtch); + TBS-header_len_mcch-header_len_msi-sdu_length_total-header_len_mtch +#ifdef Rel14 + ,0, 0 +#endif + ); LOG_D(MAC,"e-MBMS log channel %u frameP %d, subframeP %d, rlc_status.bytes_in_buffer is %d\n", MTCH,frameP,subframeP, rlc_status.bytes_in_buffer); @@ -525,7 +529,12 @@ int schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP, sub_fra MBMS_FLAG_YES, MTCH, 0, //not used - (char*)&mch_buffer[sdu_length_total]); + (char*)&mch_buffer[sdu_length_total] +#ifdef Rel14 + ,0, + 0 +#endif + ); //sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP,frameP, MBMS_FLAG_NO, MTCH+(MAX_NUM_RB*(NUMBER_OF_UE_MAX+1)), (char*)&mch_buffer[sdu_length_total]); LOG_I(MAC,"[eNB %d][MBMS USER-PLANE] CC_id %d Got %d bytes for MTCH %d\n",module_idP,CC_id,sdu_lengths[num_sdus],MTCH); cc->mtch_active=1; diff --git a/openair2/LAYER2/MAC/flexran_agent_scheduler_dataplane.c b/openair2/LAYER2/MAC/flexran_agent_scheduler_dataplane.c index 018d490f443..1fb7d9ad47b 100644 --- a/openair2/LAYER2/MAC/flexran_agent_scheduler_dataplane.c +++ b/openair2/LAYER2/MAC/flexran_agent_scheduler_dataplane.c @@ -178,7 +178,11 @@ void flexran_apply_ue_spec_scheduling_decisions(mid_t mod_id, ENB_FLAG_YES, MBMS_FLAG_NO, lcid, - 0); + 0 +#ifdef Rel14 + ,0, 0 +#endif + ); if (rlc_status.bytes_in_buffer > 0) { @@ -198,7 +202,11 @@ void flexran_apply_ue_spec_scheduling_decisions(mid_t mod_id, ENB_FLAG_YES, MBMS_FLAG_NO, lcid, - rlc_size); // transport block set size + rlc_size // transport block set size +#ifdef Rel14 + ,0, 0 +#endif + ); LOG_D(MAC, "[TEST] RLC can give %d bytes for LCID %d during second call\n", rlc_status.bytes_in_buffer, lcid); @@ -212,7 +220,12 @@ void flexran_apply_ue_spec_scheduling_decisions(mid_t mod_id, MBMS_FLAG_NO, lcid, rlc_size, //not used - (char *)&dlsch_buffer[sdu_length_total]); + (char *)&dlsch_buffer[sdu_length_total] +#ifdef Rel14 + ,0, + 0 +#endif + ); LOG_D(MAC,"[eNB %d][LCID %d] CC_id %d Got %d bytes from RLC\n",mod_id, lcid, CC_id, sdu_lengths[j]); sdu_length_total += sdu_lengths[j]; diff --git a/openair2/LAYER2/MAC/flexran_agent_scheduler_dlsch_ue.c b/openair2/LAYER2/MAC/flexran_agent_scheduler_dlsch_ue.c index 0c03e549f6e..d6f7e5a900c 100644 --- a/openair2/LAYER2/MAC/flexran_agent_scheduler_dlsch_ue.c +++ b/openair2/LAYER2/MAC/flexran_agent_scheduler_dlsch_ue.c @@ -160,7 +160,11 @@ void _store_dlsch_buffer (module_id_t Mod_id, for(i=0; i< MAX_NUM_LCID; i++) { // loop over all the logical channels - rlc_status = mac_rlc_status_ind(Mod_id,rnti, Mod_id,frameP,subframeP,ENB_FLAG_YES,MBMS_FLAG_NO,i,0 ); + rlc_status = mac_rlc_status_ind(Mod_id,rnti, Mod_id,frameP,subframeP,ENB_FLAG_YES,MBMS_FLAG_NO,i,0 +#ifdef Rel14 + ,0, 0 +#endif + ); UE_template->dl_buffer_info[i] = rlc_status.bytes_in_buffer; //storing the dlsch buffer for each logical channel UE_template->dl_pdus_in_buffer[i] = rlc_status.pdus_in_buffer; UE_template->dl_buffer_head_sdu_creation_time[i] = rlc_status.head_sdu_creation_time ; @@ -1245,7 +1249,11 @@ flexran_schedule_ue_spec_common(mid_t mod_id, ENB_FLAG_YES, MBMS_FLAG_NO, j, - (dci_tbs - ta_len - header_len - sdu_length_total)); // transport block set size + (dci_tbs - ta_len - header_len - sdu_length_total) // transport block set size +#ifdef Rel14 + ,0, 0 +#endif + ); //If data are available in channel j if (rlc_status.bytes_in_buffer > 0) { diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index 257b693d910..8a7f7a7064d 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -126,7 +126,11 @@ void store_dlsch_buffer (module_id_t Mod_id, for(i=0; i< MAX_NUM_LCID; i++) { // loop over all the logical channels - rlc_status = mac_rlc_status_ind(Mod_id,rnti, Mod_id,frameP,subframeP,ENB_FLAG_YES,MBMS_FLAG_NO,i,0 ); + rlc_status = mac_rlc_status_ind(Mod_id,rnti, Mod_id,frameP,subframeP,ENB_FLAG_YES,MBMS_FLAG_NO,i,0 +#ifdef Rel14 + ,0, 0 +#endif + ); UE_template->dl_buffer_info[i] = rlc_status.bytes_in_buffer; //storing the dlsch buffer for each logical channel UE_template->dl_pdus_in_buffer[i] = rlc_status.pdus_in_buffer; UE_template->dl_buffer_head_sdu_creation_time[i] = rlc_status.head_sdu_creation_time ; diff --git a/openair2/LAYER2/MAC/proto.h b/openair2/LAYER2/MAC/proto.h index cf5d772afe5..25377e4043d 100644 --- a/openair2/LAYER2/MAC/proto.h +++ b/openair2/LAYER2/MAC/proto.h @@ -931,10 +931,9 @@ int rrc_mac_config_req_ue(module_id_t module_idP, uint16_t cba_rnti #endif #if defined(Rel14) - , - uint32_t *sourceL2Id, - uint32_t *groupL2Id, - uint32_t *destinationL2Id + ,config_action_t config_action + ,const uint32_t * const sourceL2Id + ,const uint32_t * const destinationL2Id #endif ); diff --git a/openair2/LAYER2/MAC/ra_procedures.c b/openair2/LAYER2/MAC/ra_procedures.c index cec5f8420a3..7e7c48ad66d 100644 --- a/openair2/LAYER2/MAC/ra_procedures.c +++ b/openair2/LAYER2/MAC/ra_procedures.c @@ -389,7 +389,11 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP,int CC_id,frame_t frameP, dcch_header_len = 2 + 2; /// SHORT Subheader + C-RNTI control element rlc_status = mac_rlc_status_ind(module_idP,UE_mac_inst[module_idP].crnti, eNB_indexP,frameP,subframeP,ENB_FLAG_NO,MBMS_FLAG_NO, DCCH, - 6); + 6 +#ifdef Rel14 + ,0, 0 +#endif + ); if (UE_mac_inst[module_idP].crnti_before_ho) LOG_D(MAC, @@ -403,7 +407,12 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP,int CC_id,frame_t frameP, eNB_indexP, frameP,ENB_FLAG_NO, MBMS_FLAG_NO, DCCH, 6, //not used - (char *)&ulsch_buff[0]); + (char *)&ulsch_buff[0] +#ifdef Rel14 + ,0, + 0 +#endif + ); LOG_D(MAC,"[UE %d] TX Got %d bytes for DCCH\n",module_idP,sdu_lengths[0]); update_bsr(module_idP, frameP, subframeP,eNB_indexP); diff --git a/openair2/LAYER2/MAC/ue_procedures.c b/openair2/LAYER2/MAC/ue_procedures.c index 23fa4c23b96..7f66b90f318 100644 --- a/openair2/LAYER2/MAC/ue_procedures.c +++ b/openair2/LAYER2/MAC/ue_procedures.c @@ -1572,7 +1572,12 @@ for (lcid=DCCH; (lcid < MAX_NUM_LCID) && (is_all_lcid_processed == FALSE) ; lcid MBMS_FLAG_NO, lcid, buflen_remain, - (char *)&ulsch_buff[sdu_length_total]); + (char *)&ulsch_buff[sdu_length_total] +#ifdef Rel14 + ,0, + 0 +#endif + ); AssertFatal (buflen_remain >= sdu_lengths[num_sdus], "LCID=%d RLC has segmented %d bytes but MAC has max=%d\n", @@ -2416,7 +2421,11 @@ boolean_t update_bsr(module_id_t module_idP, frame_t frameP, sub_frame_t subfra rlc_status = mac_rlc_status_ind(module_idP, UE_mac_inst[module_idP].crnti,eNB_index,frameP,subframeP,ENB_FLAG_NO,MBMS_FLAG_NO, lcid, - 0xFFFF); //TBS is not used in RLC at this step, set a special value for debug + 0xFFFF //TBS is not used in RLC at this step, set a special value for debug +#ifdef Rel14 + ,0, 0 +#endif + ); lcid_bytes_in_buffer[lcid] = rlc_status.bytes_in_buffer; @@ -2773,124 +2782,117 @@ SLDCH_t *ue_get_sldch(module_id_t Mod_id,int CC_id,frame_t frame_tx,sub_frame_t SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t subframeP) { - mac_rlc_status_resp_t rlc_status, rlc_status_data; - uint32_t absSF = (frameP*10)+subframeP; - UE_MAC_INST *ue = &UE_mac_inst[module_idP]; - int rvtab[4] = {0,2,3,1}; - int sdu_length; - uint32_t destL2Id; //groupL2Id/destinationL2Id - - // Note: this is hard-coded for now for the default SL configuration (4 SF PSCCH, 36 SF PSSCH) - SLSCH_t *slsch = &UE_mac_inst[module_idP].slsch; - - LOG_D(MAC,"Checking SLSCH for absSF %d\n",absSF); - - if ((absSF%40) == 0) { // fill PSCCH data later in first subframe of SL period - ue->sltx_active = 0; - - rlc_status = mac_rlc_status_ind(module_idP, 0x1234,0,frameP,subframeP,ENB_FLAG_NO,MBMS_FLAG_NO, - 10, - 0xFFFF);//for signaling - hardcoded - rlc_status_data = mac_rlc_status_ind(module_idP, 0x1234,0,frameP,subframeP,ENB_FLAG_NO,MBMS_FLAG_NO, - 3, - 0xFFFF); //for data - hardcoded - - if (rlc_status.bytes_in_buffer > 2){ - LOG_I(MAC,"SFN.SF %d.%d: Scheduling for %d bytes in Sidelink buffer\n",frameP,subframeP,rlc_status.bytes_in_buffer); - // Fill in group id for off-network communications - ue->sltx_active = 1; - ue->slsch_lcid = 10; - } - else if (rlc_status_data.bytes_in_buffer >2){ - LOG_I(MAC,"SFN.SF %d.%d: Scheduling for %d bytes in Sidelink buffer\n",frameP,subframeP,rlc_status_data.bytes_in_buffer); - // Fill in group id for off-network communications - ue->sltx_active = 1; - ue->slsch_lcid = 3; - } - } // we're not in the SCCH period - else if (((absSF & 3) == 0 ) && - (ue->sltx_active == 1)) { // every 4th subframe, check for new data from RLC - // 10 PRBs, mcs 19 - int TBS = 4584/8; - int req; - - if (ue->slsch_lcid == 10) { - if (TBS<=rlc_status.bytes_in_buffer) req=TBS; - else req = rlc_status.bytes_in_buffer; - destL2Id = ue->destinationL2Id; - } else if (ue->slsch_lcid == 3){ - if (TBS<=rlc_status_data.bytes_in_buffer) req=TBS; - else req = rlc_status_data.bytes_in_buffer; - destL2Id = ue->groupL2Id; - } - - if (req>0) { - sdu_length = mac_rlc_data_req(module_idP, - 0x1234, - 0, - frameP, - ENB_FLAG_NO, - MBMS_FLAG_NO, - ue->slsch_lcid, - req, - (char*)(ue->slsch_pdu.payload + sizeof(SLSCH_SUBHEADER_24_Bit_DST_LONG))); - - // Notes: 1. hard-coded to 24-bit destination format for now - // 2. LCID hard-coded to 3 - // 3. SRC/DST IDs with debug values - if (sdu_length > 0) { - - LOG_I(MAC,"SFN.SF %d.%d : got %d bytes from Sidelink buffer (%d requested)\n",frameP,subframeP,sdu_length,req); - LOG_I(MAC,"sourceL2Id: 0x%08x \n",ue->sourceL2Id); - LOG_I(MAC,"groupL2Id/destinationL2Id: 0x%08x \n",destL2Id); - - slsch->payload = (unsigned char*)ue->slsch_pdu.payload; - if (sdu_length < 128) { - slsch->payload++; - SLSCH_SUBHEADER_24_Bit_DST_SHORT *shorth= (SLSCH_SUBHEADER_24_Bit_DST_SHORT *)slsch->payload; - shorth->F=0; - shorth->L=sdu_length; - shorth->E=0; - shorth->LCID=ue->slsch_lcid; - shorth->SRC07 = (ue->sourceL2Id>>16) & 0x000000ff; - shorth->SRC815 = (ue->sourceL2Id>>8) & 0x000000ff; - shorth->SRC1623 = ue->sourceL2Id & 0x000000ff; - shorth->DST07 = (destL2Id >>16) & 0x000000ff; - shorth->DST815 = (destL2Id>>8) & 0x000000ff; - shorth->DST1623 = destL2Id & 0x000000ff; - - shorth->V=0x1; - } - else { - SLSCH_SUBHEADER_24_Bit_DST_LONG *longh= (SLSCH_SUBHEADER_24_Bit_DST_LONG *)slsch->payload; - longh->F=1; - longh->L_LSB=sdu_length&0xff; - longh->L_MSB=(sdu_length>>8)&0x7f; - longh->E=0; - longh->LCID=ue->slsch_lcid; - longh->SRC07 = (ue->sourceL2Id >>16) & 0x000000ff; - longh->SRC815 = (ue->sourceL2Id>>8) & 0x000000ff; - longh->SRC1623 = ue->sourceL2Id & 0x000000ff; - longh->DST07 = (destL2Id >>16) & 0x000000ff; - longh->DST815 = (destL2Id>>8) & 0x000000ff; - longh->DST1623 = destL2Id & 0x000000ff; - - longh->V=0x1; - } - slsch->rvidx = 0; - slsch->payload_length = TBS; - // fill in SLSCH configuration - return(&ue->slsch); + mac_rlc_status_resp_t rlc_status, rlc_status_data; + uint32_t absSF = (frameP*10)+subframeP; + UE_MAC_INST *ue = &UE_mac_inst[module_idP]; + int rvtab[4] = {0,2,3,1}; + int sdu_length; + uint8_t sl_lcids[2] = {3, 10}; //list of lcids for SL - hardcoded + int i = 0; + + // Note: this is hard-coded for now for the default SL configuration (4 SF PSCCH, 36 SF PSSCH) + SLSCH_t *slsch = &UE_mac_inst[module_idP].slsch; + + LOG_D(MAC,"Checking SLSCH for absSF %d\n",absSF); + if ((absSF%40) == 0) { // fill PSCCH data later in first subframe of SL period + ue->sltx_active = 0; + + for (i = 0; i < 2; i++){ + for (int j = 0; j < ue->numCommFlows; j++){ + if ((ue->sourceL2Id > 0) && (ue->destinationList[j] >0) ){ + rlc_status = mac_rlc_status_ind(module_idP, 0x1234,0,frameP,subframeP,ENB_FLAG_NO,MBMS_FLAG_NO, + sl_lcids[i], 0xFFFF, ue->sourceL2Id, ue->destinationList[j]); + if (rlc_status.bytes_in_buffer > 2){ + LOG_I(MAC,"SFN.SF %d.%d: Scheduling for %d bytes in Sidelink buffer\n",frameP,subframeP,rlc_status.bytes_in_buffer); + // Fill in group id for off-network communications + ue->sltx_active = 1; + //store LCID, destinationL2Id + ue->slsch_lcid = sl_lcids[i]; + ue->destinationL2Id = ue->destinationList[j]; + break; + } + } + } + if ( ue->sltx_active == 1) break; + } + } // we're not in the SCCH period + else if (((absSF & 3) == 0 ) && + (ue->sltx_active == 1)) { // every 4th subframe, check for new data from RLC + // 10 PRBs, mcs 19 + int TBS = 4584/8; + int req; + + + if (TBS <= rlc_status.bytes_in_buffer) req = TBS; + else req = rlc_status.bytes_in_buffer; + + if (req>0) { + sdu_length = mac_rlc_data_req(module_idP, + 0x1234, + 0, + frameP, + ENB_FLAG_NO, + MBMS_FLAG_NO, + ue->slsch_lcid, + req, + (char*)(ue->slsch_pdu.payload + sizeof(SLSCH_SUBHEADER_24_Bit_DST_LONG)) +#ifdef Rel14 + ,ue->sourceL2Id, + ue->destinationL2Id +#endif + ); + + // Notes: 1. hard-coded to 24-bit destination format for now + if (sdu_length > 0) { + + LOG_I(MAC,"SFN.SF %d.%d : got %d bytes from Sidelink buffer (%d requested)\n",frameP,subframeP,sdu_length,req); + LOG_I(MAC,"sourceL2Id: 0x%08x \n",ue->sourceL2Id); + LOG_I(MAC,"groupL2Id/destinationL2Id: 0x%08x \n",ue->destinationL2Id); + + slsch->payload = (unsigned char*)ue->slsch_pdu.payload; + if (sdu_length < 128) { + slsch->payload++; + SLSCH_SUBHEADER_24_Bit_DST_SHORT *shorth= (SLSCH_SUBHEADER_24_Bit_DST_SHORT *)slsch->payload; + shorth->F = 0; + shorth->L = sdu_length; + shorth->E = 0; + shorth->LCID = ue->slsch_lcid; + shorth->SRC07 = (ue->sourceL2Id>>16) & 0x000000ff; + shorth->SRC815 = (ue->sourceL2Id>>8) & 0x000000ff; + shorth->SRC1623 = ue->sourceL2Id & 0x000000ff; + shorth->DST07 = (ue->destinationL2Id >>16) & 0x000000ff; + shorth->DST815 = (ue->destinationL2Id >>8) & 0x000000ff; + shorth->DST1623 = ue->destinationL2Id & 0x000000ff; + shorth->V = 0x1; + } + else { + SLSCH_SUBHEADER_24_Bit_DST_LONG *longh= (SLSCH_SUBHEADER_24_Bit_DST_LONG *)slsch->payload; + longh->F = 1; + longh->L_LSB = sdu_length&0xff; + longh->L_MSB = (sdu_length>>8)&0x7f; + longh->E = 0; + longh->LCID = ue->slsch_lcid; + longh->SRC07 = (ue->sourceL2Id >>16) & 0x000000ff; + longh->SRC815 = (ue->sourceL2Id>>8) & 0x000000ff; + longh->SRC1623 = ue->sourceL2Id & 0x000000ff; + longh->DST07 = (ue->destinationL2Id >>16) & 0x000000ff; + longh->DST815 = (ue->destinationL2Id>>8) & 0x000000ff; + longh->DST1623 = ue->destinationL2Id & 0x000000ff; + longh->V = 0x1; + } + slsch->rvidx = 0; + slsch->payload_length = TBS; + // fill in SLSCH configuration + return(&ue->slsch); + } + else ue->sltx_active = 0; } - else ue->sltx_active = 0; - } - - } else if ((absSF%40)>3 && ue->sltx_active == 1) { // handle retransmission of SDU - LOG_I(MAC,"SFN.SF %d.%d : retransmission\n",frameP,subframeP); - slsch->rvidx = rvtab[absSF&3]; - return(&ue->slsch); - } + } else if ((absSF%40)>3 && ue->sltx_active == 1) { // handle retransmission of SDU + LOG_I(MAC,"SFN.SF %d.%d : retransmission\n",frameP,subframeP); + slsch->rvidx = rvtab[absSF&3]; + return(&ue->slsch); + } return(NULL); } diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index 2b95c6a94d0..dbcb2585657 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -86,6 +86,10 @@ boolean_t pdcp_data_req( const sdu_size_t sdu_buffer_sizeP, unsigned char *const sdu_buffer_pP, const pdcp_transmission_mode_t modeP +#ifdef Rel14 + ,const uint32_t * const sourceL2Id + ,const uint32_t * const destinationL2Id +#endif ) //----------------------------------------------------------------------------- { @@ -166,7 +170,11 @@ boolean_t pdcp_data_req( (unsigned char*)&pdcp_pdu_p->data[0], sdu_buffer_sizeP); #endif - rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_YES, rb_idP, muiP, confirmP, sdu_buffer_sizeP, pdcp_pdu_p); + rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_YES, rb_idP, muiP, confirmP, sdu_buffer_sizeP, pdcp_pdu_p +#ifdef Rel14 + ,NULL, NULL +#endif + ); } else { rlc_status = RLC_OP_STATUS_OUT_OF_RESSOURCES; LOG_W(PDCP,PROTOCOL_CTXT_FMT" PDCP_DATA_REQ SDU DROPPED, OUT OF MEMORY \n", @@ -351,7 +359,12 @@ boolean_t pdcp_data_req( LOG_F(PDCP,"\n"); #endif - rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, muiP, confirmP, pdcp_pdu_size, pdcp_pdu_p); + rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, muiP, confirmP, pdcp_pdu_size, pdcp_pdu_p +#ifdef Rel14 + ,sourceL2Id + ,destinationL2Id +#endif + ); } @@ -927,7 +940,11 @@ pdcp_run ( RRC_DCCH_DATA_REQ (msg_p).confirmp, RRC_DCCH_DATA_REQ (msg_p).sdu_size, RRC_DCCH_DATA_REQ (msg_p).sdu_p, - RRC_DCCH_DATA_REQ (msg_p).mode); + RRC_DCCH_DATA_REQ (msg_p).mode +#ifdef Rel14 + , NULL, NULL +#endif + ); if (result != TRUE) LOG_E(PDCP, "PDCP data request failed!\n"); diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.h b/openair2/LAYER2/PDCP_v10.1.0/pdcp.h index 9bbb425e6a8..61f5c5ec87f 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.h +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.h @@ -220,7 +220,12 @@ public_pdcp(boolean_t pdcp_data_req( const confirm_t confirmP, \ const sdu_size_t sdu_buffer_size, unsigned char* const sdu_buffer, - const pdcp_transmission_mode_t mode)); + const pdcp_transmission_mode_t mode +#ifdef Rel14 + ,const uint32_t * const sourceL2Id + ,const uint32_t * const destinationL2Id +#endif + )); /*! \fn boolean_t pdcp_data_ind(const protocol_ctxt_t* const, srb_flag_t, MBMS_flag_t, rb_id_t, sdu_size_t, mem_block_t*, boolean_t) * \brief This functions handles data transfer indications coming from RLC diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c index af989b06d67..39639a103a5 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c @@ -207,13 +207,10 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP) #ifdef Rel14 sidelink_pc5s_element *sl_pc5s_msg_recv = NULL; char send_buf[BUFSIZE]; + int rb_id = ((pdcp_data_ind_header_t *)(sdu_p->data))->rb_id; - LOG_D(PDCP, "[THINH] PDCP->IP Frame %d INST %d, rab %d, source L2ID 0x%08x, Dest L2ID 0x%08x\n", - ctxt_pP->frame, ((pdcp_data_ind_header_t *)(sdu_p->data))->inst, - ((pdcp_data_ind_header_t *)(sdu_p->data))->rb_id, ((pdcp_data_ind_header_t *)(sdu_p->data))->sourceL2Id, ((pdcp_data_ind_header_t *)(sdu_p->data))->destinationL2Id); - - // if ((((pdcp_data_ind_header_t *)(sdu_p->data))->rb_id) == 10) { //hardcoded for PC5-Signaling - if ((((pdcp_data_ind_header_t *)(sdu_p->data))->dummy_traffic_type) == TRAFFIC_PC5S_SIGNALLING) { + if (rb_id == 10) { //hardcoded for PC5-Signaling + //if ((rb_id == 28) | (rb_id == 29) | (rb_id == 30)) #ifdef PDCP_DEBUG sl_pc5s_msg_recv = calloc(1, sizeof(sidelink_pc5s_element)); @@ -507,7 +504,11 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) RLC_SDU_CONFIRM_NO, data_p->pdcp_read_header.data_size, data_p->data, - pdcp_mode); + pdcp_mode +#ifdef Rel14 + ,NULL, NULL +#endif + ); } else if (ctxt_cpy.enb_flag) { /* rb_id = 0, thus interpreated as broadcast and transported as * multiple unicast is a broadcast packet, we have to send this @@ -531,7 +532,11 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) RLC_SDU_CONFIRM_NO, data_p->pdcp_read_header.data_size, data_p->data, - PDCP_TRANSMISSION_MODE_DATA); + PDCP_TRANSMISSION_MODE_DATA +#ifdef Rel14 + ,NULL, NULL +#endif + ); } } } else { @@ -544,7 +549,11 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) RLC_SDU_CONFIRM_NO, data_p->pdcp_read_header.data_size, data_p->data, - PDCP_TRANSMISSION_MODE_DATA); + PDCP_TRANSMISSION_MODE_DATA +#ifdef Rel14 + ,NULL, NULL +#endif + ); } free(data_p->data); @@ -702,7 +711,12 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) RLC_SDU_CONFIRM_NO, pdcp_data_header->data_size, (unsigned char *)receive_buf, - PDCP_TRANSMISSION_MODE_DATA); + PDCP_TRANSMISSION_MODE_DATA +#ifdef Rel14 + ,&pdcp_data_header->sourceL2Id + ,&pdcp_data_header->destinationL2Id +#endif + ); } else { MSC_LOG_RX_DISCARDED_MESSAGE( (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE, @@ -755,7 +769,12 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) RLC_SDU_CONFIRM_NO, pdcp_data_header->data_size, (unsigned char *)receive_buf, - PDCP_TRANSMISSION_MODE_DATA); + PDCP_TRANSMISSION_MODE_DATA +#ifdef Rel14 + ,&pdcp_data_header->sourceL2Id + ,&pdcp_data_header->destinationL2Id +#endif + ); } } free (sl_pc5s_msg_recv); @@ -794,8 +813,8 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) if (nas_nlh_rx->nlmsg_len == sizeof (pdcp_data_req_header_t) + sizeof(struct nlmsghdr)) { pdcp_read_state_g = 1; //get memcpy((void *)&pdcp_read_header_g, (void *)NLMSG_DATA(nas_nlh_rx), sizeof(pdcp_data_req_header_t)); - LOG_D(PDCP, "[PDCP][NETLINK] RX pdcp_data_req_header_t inst %u, rb_id %u data_size %d\n", - pdcp_read_header_g.inst, pdcp_read_header_g.rb_id, pdcp_read_header_g.data_size); + LOG_D(PDCP, "[PDCP][NETLINK] RX pdcp_data_req_header_t inst %u, rb_id %u data_size %d, source L2Id 0x%08x, destination L2Id 0x%08x\n", + pdcp_read_header_g.inst, pdcp_read_header_g.rb_id, pdcp_read_header_g.data_size,pdcp_read_header_g.sourceL2Id, pdcp_read_header_g.destinationL2Id ); } else { LOG_E(PDCP, "[PDCP][NETLINK] WRONG size %d should be sizeof (pdcp_data_req_header_t) + sizeof(struct nlmsghdr)\n", nas_nlh_rx->nlmsg_len); @@ -839,7 +858,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) ctxt.enb_flag = ctxt_cpy.enb_flag; #ifdef PDCP_DEBUG - LOG_I(PDCP, "[PDCP][NETLINK] pdcp_read_header_g.rb_id = %d\n", pdcp_read_header_g.rb_id); + LOG_I(PDCP, "[PDCP][NETLINK] pdcp_read_header_g.rb_id = %d, source L2Id = 0x%08x, destination L2Id = 0x%08x \n", pdcp_read_header_g.rb_id, pdcp_read_header_g.sourceL2Id, pdcp_read_header_g.destinationL2Id); #endif if (ctxt_cpy.enb_flag) { @@ -898,7 +917,11 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) RLC_SDU_CONFIRM_NO, pdcp_read_header_g.data_size, (unsigned char *)NLMSG_DATA(nas_nlh_rx), - PDCP_TRANSMISSION_MODE_DATA); + PDCP_TRANSMISSION_MODE_DATA +#ifdef Rel14 + ,NULL, NULL +#endif + ); } else { LOG_D(PDCP, "[FRAME %5u][eNB][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %u][RB %u] NON INSTANCIATED INSTANCE, DROPPED\n", ctxt.frame, @@ -931,7 +954,11 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) RLC_SDU_CONFIRM_NO, pdcp_read_header_g.data_size, (unsigned char *)NLMSG_DATA(nas_nlh_rx), - PDCP_TRANSMISSION_MODE_DATA); + PDCP_TRANSMISSION_MODE_DATA +#ifdef Rel14 + ,NULL, NULL +#endif + ); } } } @@ -993,7 +1020,12 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) RLC_SDU_CONFIRM_NO, pdcp_read_header_g.data_size, (unsigned char *)NLMSG_DATA(nas_nlh_rx), - PDCP_TRANSMISSION_MODE_DATA); + PDCP_TRANSMISSION_MODE_DATA +#ifdef Rel14 + ,&pdcp_read_header_g.sourceL2Id + ,&pdcp_read_header_g.destinationL2Id +#endif + ); } else { MSC_LOG_RX_DISCARDED_MESSAGE( (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE, @@ -1046,7 +1078,12 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) RLC_SDU_CONFIRM_NO, pdcp_read_header_g.data_size, (unsigned char *)NLMSG_DATA(nas_nlh_rx), - PDCP_TRANSMISSION_MODE_DATA); + PDCP_TRANSMISSION_MODE_DATA +#ifdef Rel14 + ,&pdcp_read_header_g.sourceL2Id + ,&pdcp_read_header_g.destinationL2Id +#endif + ); } } @@ -1135,7 +1172,11 @@ void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t* const ctxt_pP) RLC_SDU_CONFIRM_NO, pkt_size, otg_pkt, - pdcp_mode); + pdcp_mode +#ifdef Rel14 + , NULL, NULL +#endif + ); if (result != TRUE) { LOG_W(OTG,"PDCP data request failed!\n"); } @@ -1169,7 +1210,11 @@ void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t* const ctxt_pP) RLC_SDU_CONFIRM_NO, pkt_size, otg_pkt, - PDCP_TRANSMISSION_MODE_DATA); + PDCP_TRANSMISSION_MODE_DATA +#ifdef Rel14 + , NULL, NULL +#endif + ); if (result != TRUE) { LOG_W(OTG,"PDCP data request failed!\n"); } @@ -1224,7 +1269,11 @@ void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t* const ctxt_pP) RLC_SDU_CONFIRM_NO, pkt_size, otg_pkt, - PDCP_TRANSMISSION_MODE_DATA); + PDCP_TRANSMISSION_MODE_DATA +#ifdef Rel14 + , NULL, NULL +#endif + ); LOG_I(OTG, "send packet from module %d on rab id %d (src %d, dst %d) pkt size %d\n", ctxt_pP->module_id, rb_id, ctxt_pP->module_id, dst_id, pkt_size); diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_proto_extern.h b/openair2/LAYER2/PDCP_v10.1.0/pdcp_proto_extern.h index fb4eff596dd..722c22660d6 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_proto_extern.h +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_proto_extern.h @@ -52,7 +52,12 @@ extern int reception_from_rohc_bs(void); #else extern BOOL pdcp_data_ind (module_id_t module_idP, rb_id_t rab_idP, sdu_size_t data_sizeP, mem_block_t * sduP, uint8_t is_data_plane); extern BOOL pdcp_data_req (module_id_t module_id, uint32_t frame, uint8_t eNB_flag, rb_id_t rab_id, uint32_t muiP, uint32_t confirmP, sdu_size_t sdu_buffer_size, unsigned char* sdu_buffer, - uint8_t is_data_pdu); + uint8_t is_data_pdu +#ifdef Rel14 + ,const uint32_t * const sourceL2Id + ,const uint32_t * const destinationL2Id +#endif + ); //extern BOOL pdcp_data_req (struct pdcp_entity *pdcpP, mem_block * sduP); extern void send_pdcp_control_primitive (struct pdcp_entity *pdcpP, mem_block * cprimitiveP); extern void control_pdcp (struct pdcp_entity *pdcpP); diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c index 423aca55e92..0f2ed70a9df 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c @@ -93,7 +93,12 @@ void config_req_rlc_um_asn1 ( const UL_UM_RLC_t * const ul_rlc_pP, const DL_UM_RLC_t * const dl_rlc_pP, const rb_id_t rb_idP, - const logical_chan_id_t chan_idP) + const logical_chan_id_t chan_idP +#ifdef Rel14 + ,const uint32_t sourceL2Id + ,const uint32_t destinationL2Id +#endif + ) { uint32_t ul_sn_FieldLength = 0; uint32_t dl_sn_FieldLength = 0; @@ -117,10 +122,14 @@ void config_req_rlc_um_asn1 ( mbms_service_idP, mbms_session_idP); rlc_p = &rlc_union_p->rlc.um; + } + if ((sourceL2Id >0 ) && (destinationL2Id >0)){ + key = RLC_COLL_KEY_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, sourceL2Id, destinationL2Id, srb_flagP); } else #endif { - key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP); + key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP); + } 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 rb id %u, srb flag %u", ctxt_pP->module_id, @@ -129,7 +138,6 @@ void config_req_rlc_um_asn1 ( rb_idP, srb_flagP); rlc_p = &rlc_union_p->rlc.um; - } //----------------------------------------------------------------------------- LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" CONFIG_REQ timer_reordering=%dms sn_field_length= RB %u \n", diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.h index 5847a8bb13b..fc64e95d995 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.h +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.h @@ -115,7 +115,12 @@ public_rlc_um_control_primitives( void config_req_rlc_um_asn1 ( const UL_UM_RLC_t * const ul_rlc_pP, const DL_UM_RLC_t * const dl_rlc_pP, const rb_id_t rb_idP, - const logical_chan_id_t chan_idP);) + const logical_chan_id_t chan_idP +#ifdef Rel14 + ,const uint32_t sourceL2Id + ,const uint32_t destinationL2Id +#endif + );) /*! \fn void rlc_um_init (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP) * \brief Initialize a RLC UM protocol instance, initialize all variables, lists, allocate buffers for making this instance ready to be configured with protocol configuration parameters. After this initialization the RLC UM protocol instance will be in RLC_NULL_STATE state. diff --git a/openair2/LAYER2/RLC/rlc.c b/openair2/LAYER2/RLC/rlc.c index d70d85f2d52..ae7d49a3d37 100644 --- a/openair2/LAYER2/RLC/rlc.c +++ b/openair2/LAYER2/RLC/rlc.c @@ -319,7 +319,12 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP, const mui_t muiP, confirm_t confirmP, sdu_size_t sdu_sizeP, - mem_block_t *sdu_pP) + mem_block_t *sdu_pP +#ifdef Rel14 + ,const uint32_t * const sourceL2Id + ,const uint32_t * const destinationL2Id +#endif + ) { //----------------------------------------------------------------------------- mem_block_t *new_sdu_p = NULL; @@ -384,6 +389,10 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP, } key = RLC_COLL_KEY_MBMS_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, mbms_id_p->service_id, mbms_id_p->session_id); + } + if (sourceL2Id && destinationL2Id){ + key = RLC_COLL_KEY_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, *sourceL2Id, *destinationL2Id, srb_flagP); + //key_lcid = RLC_COLL_KEY_LCID_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, chan_idP, *sourceL2Id, *destinationL2Id, srb_flagP); } else #endif { diff --git a/openair2/LAYER2/RLC/rlc.h b/openair2/LAYER2/RLC/rlc.h index fca786b4d3e..72278976835 100644 --- a/openair2/LAYER2/RLC/rlc.h +++ b/openair2/LAYER2/RLC/rlc.h @@ -275,6 +275,23 @@ public_rlc(logical_chan_id_t rlc_mbms_rbid2lcid_eNB[NUMBER_OF_eNB_MAX][NB_RB_ (((hash_key_t)(iS_sRB)) << 33) | \ (((hash_key_t)(0x0a)) << 34)) +#define RLC_COLL_KEY_SOURCE_DEST_VALUE(eNB_iD, rNTI, iS_eNB, lC_iD, sOURCE_iD, dEST_iD, iS_sRB) \ + ((hash_key_t)eNB_iD | \ + (((hash_key_t)(rNTI)) << 8) | \ + (((hash_key_t)(iS_eNB)) << 24) | \ + (((hash_key_t)(lC_iD)) << 25) | \ + (((hash_key_t)(dEST_iD)) << 33) | \ + (((hash_key_t)(0x05)) << 57)) + +#define RLC_COLL_KEY_LCID_SOURCE_DEST_VALUE(eNB_iD, rNTI, iS_eNB, lC_iD, sOURCE_iD, dEST_iD, iS_sRB) \ + ((hash_key_t)eNB_iD | \ + (((hash_key_t)(rNTI)) << 8) | \ + (((hash_key_t)(iS_eNB)) << 24) | \ + (((hash_key_t)(lC_iD)) << 25) | \ + (((hash_key_t)(dEST_iD)) << 33) | \ + (((hash_key_t)(0x0a)) << 57)) + + // service id max val is maxServiceCount = 16 (asn1_constants.h) #define RLC_COLL_KEY_MBMS_VALUE(eNB_iD, rNTI, iS_eNB, sERVICE_ID, sESSION_ID) \ @@ -324,7 +341,9 @@ public_rlc_rrc( rlc_op_status_t rrc_rlc_config_asn1_req ( const SRB_ToAddModList_t* const , const DRB_ToAddModList_t* const , const DRB_ToReleaseList_t* const , - const PMCH_InfoList_r9_t * const pmch_info_listP);) + const PMCH_InfoList_r9_t * const pmch_info_listP , + const uint32_t , + const uint32_t );) #else /*! \fn rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t* const ctxtP, const SRB_ToAddModList_t* const srb2add_listP, const DRB_ToAddModList_t* const drb2add_listP, const DRB_ToReleaseList_t* const drb2release_listP) * \brief Function for RRC to configure a Radio Bearer. @@ -379,7 +398,12 @@ public_rlc_rrc(rlc_op_status_t rrc_rlc_remove_rlc (const protocol_ctxt_t* cons * \param[in] rlc_modeP Mode of RLC (AM, UM, TM). * \return A status about the processing, OK or error code. */ -private_rlc_rrc(rlc_union_t* rrc_rlc_add_rlc (const protocol_ctxt_t* const, const srb_flag_t, const MBMS_flag_t MBMS_flagP, const rb_id_t, logical_chan_id_t, rlc_mode_t);) +private_rlc_rrc(rlc_union_t* rrc_rlc_add_rlc (const protocol_ctxt_t* const, const srb_flag_t, const MBMS_flag_t MBMS_flagP, const rb_id_t, logical_chan_id_t, rlc_mode_t +#ifdef Rel14 + ,const uint32_t sourceL2Id, + const uint32_t destinationL2Id +#endif +);) /*! \fn rlc_op_status_t rrc_rlc_config_req ( const protocol_ctxt_t* const ctxtP, @@ -440,7 +464,12 @@ public_rlc_rrc(void rrc_rlc_register_rrc (rrc_data_ind_cb_t rrc_data_indP, rrc_d * \param [in,out] bufferP Memory area to fill with the bytes requested by MAC. * \return A status about the processing, OK or error code. */ -public_rlc_mac(tbs_size_t mac_rlc_data_req (const module_id_t, const rnti_t, const eNB_index_t, const frame_t, const eNB_flag_t, const MBMS_flag_t, logical_chan_id_t, const tb_size_t,char*);) +public_rlc_mac(tbs_size_t mac_rlc_data_req (const module_id_t, const rnti_t, const eNB_index_t, const frame_t, const eNB_flag_t, const MBMS_flag_t, logical_chan_id_t, const tb_size_t,char* +#ifdef Rel14 + ,const uint32_t sourceL2Id + ,const uint32_t destinationL2Id +#endif +);) /*! \fn void mac_rlc_data_ind (const module_id_t mod_idP, const rnti_t rntiP, const frame_t frameP, const eNB_flag_t eNB_flagP, const MBMS_flag_t MBMS_flagP, logical_chan_id_t rb_idP, uint32_t frameP, char* bufferP, tb_size_t tb_sizeP, num_tb_t num_tbP, crc_t *crcs) * \brief Interface with MAC layer, deserialize the transport blocks sent by MAC, then map data indication to the RLC instance corresponding to the radio bearer identifier. @@ -470,7 +499,12 @@ public_rlc_mac(void mac_rlc_data_ind (const module_id_t, co * \param[in] tb_sizeP Size of a transport block set in bytes. * \return The maximum number of bytes that the RLC instance can send in the next transmission sequence. */ -public_rlc_mac(mac_rlc_status_resp_t mac_rlc_status_ind (const module_id_t, const rnti_t, const eNB_index_t, const frame_t, const sub_frame_t, const eNB_flag_t, const MBMS_flag_t, logical_chan_id_t, tb_size_t );) +public_rlc_mac(mac_rlc_status_resp_t mac_rlc_status_ind (const module_id_t, const rnti_t, const eNB_index_t, const frame_t, const sub_frame_t, const eNB_flag_t, const MBMS_flag_t, logical_chan_id_t, tb_size_t +#ifdef Rel14 + ,const uint32_t sourceL2Id + ,const uint32_t destinationL2Id +#endif + );) /*! \fn rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(const module_id_t module_idP, const rnti_t rntiP, const eNB_index_t eNB_index, const frame_t frameP, const sub_frame_t subframeP,const eNB_flag_t enb_flagP, const logical_chan_id_t channel_idP) * \brief Interface with MAC layer, UE only: request and get the number of bytes scheduled for transmission by the RLC instance corresponding to the radio bearer identifier. @@ -520,7 +554,12 @@ public_rlc(rlc_op_status_t rlc_data_req ( const mui_t , const confirm_t , const sdu_size_t , - mem_block_t * const);) + mem_block_t * const +#ifdef Rel14 + ,const uint32_t * const + ,const uint32_t * const +#endif + );) /*! \fn void rlc_data_ind (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP, const sdu_size_t sdu_sizeP, mem_block_t* sduP) { * \brief Interface with higher layers, route SDUs coming from RLC protocol instances to upper layer instance. diff --git a/openair2/LAYER2/RLC/rlc_mac.c b/openair2/LAYER2/RLC/rlc_mac.c index 642661c3f40..708fbbfb949 100644 --- a/openair2/LAYER2/RLC/rlc_mac.c +++ b/openair2/LAYER2/RLC/rlc_mac.c @@ -126,7 +126,12 @@ tbs_size_t mac_rlc_data_req( const MBMS_flag_t MBMS_flagP, const logical_chan_id_t channel_idP, const tb_size_t tb_sizeP, - char *buffer_pP) + char *buffer_pP +#ifdef Rel14 + ,const uint32_t sourceL2Id + ,const uint32_t destinationL2Id +#endif + ) { //----------------------------------------------------------------------------- struct mac_data_req data_request; @@ -173,6 +178,10 @@ tbs_size_t mac_rlc_data_req( } } else { key = RLC_COLL_KEY_LCID_VALUE(module_idP, rntiP, enb_flagP, channel_idP, srb_flag); +#ifdef Rel14 + if ((sourceL2Id > 0) && (destinationL2Id > 0)) + key = RLC_COLL_KEY_LCID_SOURCE_DEST_VALUE(module_idP, rntiP, enb_flagP, channel_idP, sourceL2Id, destinationL2Id, srb_flag); +#endif } h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p); @@ -327,7 +336,12 @@ mac_rlc_status_resp_t mac_rlc_status_ind( const eNB_flag_t enb_flagP, const MBMS_flag_t MBMS_flagP, const logical_chan_id_t channel_idP, - const tb_size_t tb_sizeP) + const tb_size_t tb_sizeP +#ifdef Rel14 + ,const uint32_t sourceL2Id + ,const uint32_t destinationL2Id +#endif + ) { //----------------------------------------------------------------------------- mac_rlc_status_resp_t mac_rlc_status_resp; @@ -381,8 +395,15 @@ mac_rlc_status_resp_t mac_rlc_status_ind( key = RLC_COLL_KEY_MBMS_VALUE(module_idP, rntiP, enb_flagP, mbms_id_p->service_id, mbms_id_p->session_id); } else { +#ifdef Rel14 + if ((sourceL2Id > 0) && (destinationL2Id > 0)) { + key = RLC_COLL_KEY_SOURCE_DEST_VALUE(module_idP, rntiP, enb_flagP, channel_idP, sourceL2Id, destinationL2Id, srb_flag); + } else +#endif + { key = RLC_COLL_KEY_LCID_VALUE(module_idP, rntiP, enb_flagP, channel_idP, srb_flag); - } + } +} h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p); diff --git a/openair2/LAYER2/RLC/rlc_mpls.c b/openair2/LAYER2/RLC/rlc_mpls.c index 34e4f028aec..900741fe267 100644 --- a/openair2/LAYER2/RLC/rlc_mpls.c +++ b/openair2/LAYER2/RLC/rlc_mpls.c @@ -40,6 +40,10 @@ rlc_op_status_t mpls_rlc_data_req ( { //----------------------------------------------------------------------------- // third arg should be set to 1 or 0 - return rlc_data_req(ctxtP, SRB_FLAG_NO, MBMS_FLAG_NO, rb_idP, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO, sdu_sizeP, sduP); + return rlc_data_req(ctxtP, SRB_FLAG_NO, MBMS_FLAG_NO, rb_idP, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO, sdu_sizeP, sduP +#ifdef Rel14 + ,NULL, NULL +#endif + ); } diff --git a/openair2/LAYER2/RLC/rlc_rrc.c b/openair2/LAYER2/RLC/rlc_rrc.c index 68f5971bf1e..7fb84f95b11 100644 --- a/openair2/LAYER2/RLC/rlc_rrc.c +++ b/openair2/LAYER2/RLC/rlc_rrc.c @@ -55,6 +55,8 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP const DRB_ToReleaseList_t * const drb2release_listP #if defined(Rel10) || defined(Rel14) ,const PMCH_InfoList_r9_t * const pmch_InfoList_r9_pP + ,const uint32_t sourceL2Id + ,const uint32_t destinationL2Id #endif ) { @@ -113,7 +115,12 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP break; case RLC_Config_PR_am: - if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_AM) != NULL) { + if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_AM +#ifdef Rel14 + ,0, + 0 +#endif + ) != NULL) { config_req_rlc_am_asn1 ( ctxt_pP, SRB_FLAG_YES, @@ -128,7 +135,12 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP break; case RLC_Config_PR_um_Bi_Directional: - if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM) != NULL) { + if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM +#ifdef Rel14 + ,0, + 0 +#endif + ) != NULL) { config_req_rlc_um_asn1( ctxt_pP, SRB_FLAG_YES, @@ -137,7 +149,11 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP UNUSED_PARAM_MBMS_SERVICE_ID, &srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.um_Bi_Directional.ul_UM_RLC, &srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.um_Bi_Directional.dl_UM_RLC, - rb_id, lc_id); + rb_id, lc_id +#ifdef Rel14 + ,0, 0 +#endif + ); } else { LOG_E(RLC, PROTOCOL_CTXT_FMT" ERROR IN ALLOCATING SRB %d \n", PROTOCOL_CTXT_ARGS(ctxt_pP), @@ -147,7 +163,12 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP break; case RLC_Config_PR_um_Uni_Directional_UL: - if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM) != NULL) { + if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM +#ifdef Rel14 + ,0, + 0 +#endif + ) != NULL) { config_req_rlc_um_asn1( ctxt_pP, SRB_FLAG_YES, @@ -156,7 +177,11 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP UNUSED_PARAM_MBMS_SERVICE_ID, &srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.um_Uni_Directional_UL.ul_UM_RLC, NULL, - rb_id, lc_id); + rb_id, lc_id +#ifdef Rel14 + ,0, 0 +#endif + ); } else { LOG_E(RLC, PROTOCOL_CTXT_FMT" ERROR IN ALLOCATING SRB %d \n", PROTOCOL_CTXT_ARGS(ctxt_pP), @@ -166,7 +191,12 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP break; case RLC_Config_PR_um_Uni_Directional_DL: - if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM) != NULL) { + if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM +#ifdef Rel14 + ,0, + 0 +#endif + ) != NULL) { config_req_rlc_um_asn1( ctxt_pP, SRB_FLAG_YES, @@ -175,7 +205,11 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP UNUSED_PARAM_MBMS_SERVICE_ID, NULL, &srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.um_Uni_Directional_DL.dl_UM_RLC, - rb_id, lc_id); + rb_id, lc_id +#ifdef Rel14 + ,0, 0 +#endif + ); } else { LOG_E(RLC, PROTOCOL_CTXT_FMT" ERROR IN ALLOCATING SRB %d \n", PROTOCOL_CTXT_ARGS(ctxt_pP), @@ -204,7 +238,12 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP config_am_pP->ul_AM_RLC.pollByte = PollByte_kBinfinity; config_am_pP->ul_AM_RLC.maxRetxThreshold = UL_AM_RLC__maxRetxThreshold_t4; - if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_AM) != NULL) { + if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_AM +#ifdef Rel14 + ,0, + 0 +#endif + ) != NULL) { config_req_rlc_am_asn1 ( ctxt_pP, SRB_FLAG_YES, @@ -261,7 +300,6 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP LOG_D(RLC, "Adding DRB %ld, lc_id %d\n",drb_id,lc_id); - if (drb_toaddmod_p->rlc_Config) { switch (drb_toaddmod_p->rlc_Config->present) { @@ -269,7 +307,12 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP break; case RLC_Config_PR_am: - if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_AM) != NULL) { + if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_AM +#ifdef Rel14 + ,0, + 0 +#endif + ) != NULL) { config_req_rlc_am_asn1 ( ctxt_pP, SRB_FLAG_NO, @@ -280,7 +323,12 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP break; case RLC_Config_PR_um_Bi_Directional: - if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM) != NULL) { + if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM +#ifdef Rel14 + ,sourceL2Id, + destinationL2Id +#endif + ) != NULL) { config_req_rlc_um_asn1( ctxt_pP, SRB_FLAG_NO, @@ -289,13 +337,23 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP UNUSED_PARAM_MBMS_SERVICE_ID, &drb_toaddmod_p->rlc_Config->choice.um_Bi_Directional.ul_UM_RLC, &drb_toaddmod_p->rlc_Config->choice.um_Bi_Directional.dl_UM_RLC, - drb_id, lc_id); + drb_id, lc_id +#ifdef Rel14 + ,sourceL2Id, + destinationL2Id +#endif + ); } break; case RLC_Config_PR_um_Uni_Directional_UL: - if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM) != NULL) { + if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM +#ifdef Rel14 + ,0, + 0 +#endif + ) != NULL) { config_req_rlc_um_asn1( ctxt_pP, SRB_FLAG_NO, @@ -304,13 +362,22 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP UNUSED_PARAM_MBMS_SERVICE_ID, &drb_toaddmod_p->rlc_Config->choice.um_Uni_Directional_UL.ul_UM_RLC, NULL, - drb_id, lc_id); + drb_id, lc_id +#ifdef Rel14 + ,0, 0 +#endif + ); } break; case RLC_Config_PR_um_Uni_Directional_DL: - if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM) != NULL) { + if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM +#ifdef Rel14 + ,0, + 0 +#endif + ) != NULL) { config_req_rlc_um_asn1( ctxt_pP, SRB_FLAG_NO, @@ -319,7 +386,11 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP UNUSED_PARAM_MBMS_SERVICE_ID, NULL, &drb_toaddmod_p->rlc_Config->choice.um_Uni_Directional_DL.dl_UM_RLC, - drb_id, lc_id); + drb_id, lc_id +#ifdef Rel14 + ,0, 0 +#endif + ); } break; @@ -381,7 +452,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP MBMS_FLAG_YES, rb_id, lc_id, - RLC_MODE_UM); + RLC_MODE_UM, 0, 0); AssertFatal(rlc_union_p != NULL, "ADD MBMS RLC UM FAILED"); } @@ -403,7 +474,11 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP mbms_service_id, NULL, &dl_um_rlc, - rb_id, lc_id); + rb_id, lc_id +#ifdef Rel14 + ,0, 0 +#endif + ); } } } @@ -584,8 +659,14 @@ rlc_union_t* rrc_rlc_add_rlc ( const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP, const logical_chan_id_t chan_idP, - const rlc_mode_t rlc_modeP) + const rlc_mode_t rlc_modeP +#ifdef Rel14 + ,const uint32_t sourceL2Id, + const uint32_t destinationL2Id +#endif +) { + //----------------------------------------------------------------------------- hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE; hashtable_rc_t h_rc; @@ -603,6 +684,7 @@ rlc_union_t* rrc_rlc_add_rlc ( #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 (chan_idP < RLC_MAX_LC, "LC id is too high (%u/%d)!\n", chan_idP, RLC_MAX_LC); @@ -627,6 +709,10 @@ rlc_union_t* rrc_rlc_add_rlc ( } key = RLC_COLL_KEY_MBMS_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, mbms_id_p->service_id, mbms_id_p->session_id); + } + if ((sourceL2Id > 0) && (destinationL2Id > 0) ){ + key = RLC_COLL_KEY_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, sourceL2Id, destinationL2Id, srb_flagP); + key_lcid = RLC_COLL_KEY_LCID_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, chan_idP, sourceL2Id, destinationL2Id, srb_flagP); } else #endif { @@ -687,7 +773,6 @@ rlc_union_t* rrc_rlc_add_rlc ( rb_idP, (srb_flagP) ? "SRB" : "DRB"); } - return NULL; } //----------------------------------------------------------------------------- @@ -716,7 +801,12 @@ rlc_op_status_t rrc_rlc_config_req ( switch (actionP) { case CONFIG_ACTION_ADD: - if (rrc_rlc_add_rlc(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, rb_idP, rlc_infoP.rlc_mode) != NULL) { + if (rrc_rlc_add_rlc(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, rb_idP, rlc_infoP.rlc_mode +#ifdef Rel14 + ,0, + 0 +#endif + ) != NULL) { return RLC_OP_STATUS_INTERNAL_ERROR; } @@ -790,7 +880,11 @@ rlc_op_status_t rrc_rlc_data_req ( if (sdu != NULL) { memcpy (sdu->data, sduP, sdu_sizeP); - return rlc_data_req(ctxt_pP, SRB_FLAG_YES, MBMS_flagP, rb_idP, muiP, confirmP, sdu_sizeP, sdu); + return rlc_data_req(ctxt_pP, SRB_FLAG_YES, MBMS_flagP, rb_idP, muiP, confirmP, sdu_sizeP, sdu +#ifdef Rel14 + ,NULL, NULL +#endif + ); } else { return RLC_OP_STATUS_INTERNAL_ERROR; } diff --git a/openair2/RRC/LITE/L2_interface.c b/openair2/RRC/LITE/L2_interface.c index 9493cbfeaa0..687badfa7b1 100644 --- a/openair2/RRC/LITE/L2_interface.c +++ b/openair2/RRC/LITE/L2_interface.c @@ -638,7 +638,11 @@ rrc_data_req( confirmP, sdu_sizeP, buffer_pP, - modeP); + modeP +#ifdef Rel14 + ,NULL, NULL +#endif + ); #endif } diff --git a/openair2/RRC/LITE/defs.h b/openair2/RRC/LITE/defs.h index e5a171501cb..42968bfa95e 100644 --- a/openair2/RRC/LITE/defs.h +++ b/openair2/RRC/LITE/defs.h @@ -48,18 +48,17 @@ #include "LAYER2/MAC/defs.h" //for D2D -#define CONTROL_SOCKET_PORT_NO 8888 #define DEBUG_CTRL_SOCKET -#define BUFSIZE 1024 +#define BUFSIZE 1024 #define CONTROL_SOCKET_PORT_NO 8888 - +#define MAX_NUM_DEST 10 //netlink //#define DEBUG_PDCP -#define UE_IP_PDCP_NETLINK_ID 31 -#define PDCP_PID 1 -#define NETLINK_HEADER_SIZE 16 -#define SL_DEFAULT_RAB_ID 3 -#define SLRB_ID 3 +#define UE_IP_PDCP_NETLINK_ID 31 +#define PDCP_PID 1 +#define NETLINK_HEADER_SIZE 16 +#define SL_DEFAULT_RAB_ID 3 +#define SLRB_ID 3 #define MAX_PAYLOAD 1024 /* maximum payload size*/ @@ -740,8 +739,10 @@ typedef struct UE_RRC_INST_s { uint32_t sourceL2Id; //group L2 Id uint32_t groupL2Id; - //destination L2 Id + //current destination uint32_t destinationL2Id; + //List of destinations + uint32_t destinationList[MAX_NUM_DEST]; //sl_discovery.. SRB_INFO SL_Discovery[NB_CNX_UE]; #endif diff --git a/openair2/RRC/LITE/rrc_UE.c b/openair2/RRC/LITE/rrc_UE.c index bbd1fef3ab6..2ec9bcd94db 100644 --- a/openair2/RRC/LITE/rrc_UE.c +++ b/openair2/RRC/LITE/rrc_UE.c @@ -355,7 +355,7 @@ void init_SL_preconfig(UE_RRC_INST *UE, const uint8_t eNB_index ) // Rel13 extensions UE->SL_Preconfiguration[eNB_index]->ext1 = NULL; - +/* // Establish a SLRB (using DRB 3 for now) protocol_ctxt_t ctxt; PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, 0, ENB_FLAG_NO, 0x1234, 0, 0,0); @@ -402,7 +402,7 @@ void init_SL_preconfig(UE_RRC_INST *UE, const uint8_t eNB_index ) DRB_pdcp_config->rlc_AM = NULL; DRB_pdcp_config->rlc_UM = NULL; - /* avoid gcc warnings */ + // avoid gcc warnings (void)PDCP_rlc_UM; DRB_pdcp_config->rlc_UM = PDCP_rlc_UM; @@ -447,6 +447,7 @@ void init_SL_preconfig(UE_RRC_INST *UE, const uint8_t eNB_index ) ,(PMCH_InfoList_r9_t *)NULL #endif ); +*/ } #endif @@ -1045,7 +1046,7 @@ rrc_ue_process_measConfig( #endif #if defined(Rel14) , - NULL, + 0, NULL, NULL #endif @@ -1495,6 +1496,7 @@ rrc_ue_process_radioResourceConfigDedicated( (DRB_ToReleaseList_t*)NULL #if defined(Rel10) || defined(Rel14) ,(PMCH_InfoList_r9_t *)NULL + , 0, 0 #endif ); @@ -1563,7 +1565,7 @@ rrc_ue_process_radioResourceConfigDedicated( #endif #if defined(Rel14) , - NULL, + 0, NULL, NULL #endif @@ -1628,7 +1630,7 @@ rrc_ue_process_radioResourceConfigDedicated( #endif #if defined(Rel14) , - NULL, + 0, NULL, NULL #endif @@ -1689,6 +1691,7 @@ rrc_ue_process_radioResourceConfigDedicated( (DRB_ToReleaseList_t*)NULL #if defined(Rel10) || defined(Rel14) ,(PMCH_InfoList_r9_t *)NULL + , 0, 0 #endif ); @@ -1741,7 +1744,7 @@ rrc_ue_process_radioResourceConfigDedicated( #endif #if defined(Rel14) , - NULL, + 0, NULL, NULL #endif @@ -2331,7 +2334,7 @@ rrc_ue_process_mobilityControlInfo( #endif #if defined(Rel14) , - NULL, + 0, NULL, NULL #endif @@ -3199,7 +3202,7 @@ int decode_SIB1( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index, #endif #if defined(Rel14) , - NULL, + 0, NULL, NULL #endif @@ -3884,7 +3887,7 @@ uint64_t arfcn_to_freq(long arfcn) { #endif #if defined(Rel14) , - NULL, + 0, NULL, NULL #endif @@ -4070,7 +4073,7 @@ uint64_t arfcn_to_freq(long arfcn) { #endif #if defined(Rel14) , - NULL, + 0, NULL, NULL #endif @@ -4277,7 +4280,11 @@ void ue_meas_filtering( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_ size = do_MeasurementReport(ctxt_pP->module_id, buffer,measId,targetCellId,rsrp_s,rsrq_s,rsrp_t,rsrq_t); LOG_I(RRC, "[UE %d] Frame %d : Generating Measurement Report for eNB %d\n", ctxt_pP->module_id, ctxt_pP->frame, eNB_index); - result = pdcp_data_req(ctxt_pP, SRB_FLAG_YES, DCCH, rrc_mui++, 0, size, buffer, PDCP_TRANSMISSION_MODE_DATA); + result = pdcp_data_req(ctxt_pP, SRB_FLAG_YES, DCCH, rrc_mui++, 0, size, buffer, PDCP_TRANSMISSION_MODE_DATA +#ifdef Rel14 + ,NULL, NULL +#endif + ); AssertFatal (result == TRUE, "PDCP data request failed!\n"); //LOG_D(RRC, "[UE %d] Frame %d Sending MeasReport (%d bytes) through DCCH%d to PDCP \n",ue_mod_idP,frameP, size, DCCH); } @@ -4572,7 +4579,7 @@ int decode_MCCH_Message( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB #endif #if defined(Rel14) , - NULL, + 0, NULL, NULL #endif @@ -4602,6 +4609,7 @@ int decode_MCCH_Message( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB NULL,// DRB_ToReleaseList #if defined(Rel10) || defined(Rel14) &(UE_rrc_inst[ue_mod_idP].mcch_message[eNB_index]->pmch_InfoList_r9) + , 0, 0 #endif ); // */ @@ -5525,51 +5533,163 @@ void *rrc_control_socket_thread_fct(void *arg) LOG_I(RRC,"[GroupCommunicationEstablishReq] group IP Address: " IPV4_ADDR "\n",IPV4_ADDR_FORMAT(sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.groupIpAddress)); #endif - //store sourceL2Id + //store sourceL2Id/groupL2Id UE_rrc_inst[module_id].sourceL2Id = sourceL2Id; UE_rrc_inst[module_id].groupL2Id = groupL2Id; + int j = 0; + int i = 0; + for (i=0; i< MAX_NUM_DEST; i++) { + if ((UE_rrc_inst[module_id].destinationList[i] == 0) && (j == 0)) j = i+1; + if (UE_rrc_inst[module_id].destinationList[i] == groupL2Id) break; //group already exists! + } + if ((i == MAX_NUM_DEST) && (j > 0)) UE_mac_inst[module_id].destinationList[j-1] = groupL2Id; + // configure lower layers PDCP/MAC/PHY for this communication - //init_SL_preconfig() - //configure MAC with sourceL2Id/groupL2ID (to be used in MAC/ue_procedures.c) + //Establish a new RBID/LCID for this communication + UE_RRC_INST *UE = &UE_rrc_inst[module_id]; + // Establish a SLRB (using DRB 3 for now) + protocol_ctxt_t ctxt; + PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, 0, ENB_FLAG_NO, 0x1234, 0, 0,0); + + UE->DRB_config[0][0] = CALLOC(1,sizeof(struct DRB_ToAddMod)); + UE->DRB_config[0][0]->eps_BearerIdentity = CALLOC(1, sizeof(long)); + UE->DRB_config[0][0]->drb_Identity = 3; + UE->DRB_config[0][0]->eps_BearerIdentity = CALLOC(1, sizeof(long)); + // allowed value 5..15, value : x+4 + *(UE->DRB_config[0][0]->eps_BearerIdentity) = 3; + UE->DRB_config[0][0]->logicalChannelIdentity = CALLOC(1, sizeof(long)); + *(UE->DRB_config[0][0]->logicalChannelIdentity) = UE->DRB_config[0][0]->drb_Identity; //(long) (ue_context_pP->ue_context.e_rab[i].param.e_rab_id + 2); // value : x+2 + + // TTN - Establish a new SLRB for PC5-S (using DRB 10 for now) + UE->DRB_config[0][1] = CALLOC(1,sizeof(struct DRB_ToAddMod)); + UE->DRB_config[0][1]->eps_BearerIdentity = CALLOC(1, sizeof(long)); + UE->DRB_config[0][1]->drb_Identity = 10; + UE->DRB_config[0][1]->eps_BearerIdentity = CALLOC(1, sizeof(long)); + // allowed value 5..15, value : x+4 + *(UE->DRB_config[0][1]->eps_BearerIdentity) = 10; + UE->DRB_config[0][1]->logicalChannelIdentity = CALLOC(1, sizeof(long)); + *(UE->DRB_config[0][1]->logicalChannelIdentity) = UE->DRB_config[0][1]->drb_Identity; //(long) (ue_context_pP->ue_context.e_rab[i].param.e_rab_id + 2); // value : x+2 + + struct RLC_Config *DRB_rlc_config = CALLOC(1,sizeof(struct RLC_Config)); + struct PDCP_Config *DRB_pdcp_config = CALLOC(1,sizeof(struct PDCP_Config)); + struct PDCP_Config__rlc_UM *PDCP_rlc_UM = CALLOC(1,sizeof(struct PDCP_Config__rlc_UM)); + struct LogicalChannelConfig *DRB_lchan_config = CALLOC(1,sizeof(struct LogicalChannelConfig)); + struct LogicalChannelConfig__ul_SpecificParameters + *DRB_ul_SpecificParameters = CALLOC(1, sizeof(struct LogicalChannelConfig__ul_SpecificParameters)); + long *logicalchannelgroup_drb = CALLOC(1, sizeof(long)); + + DRB_rlc_config->present = RLC_Config_PR_um_Bi_Directional; + DRB_rlc_config->choice.um_Bi_Directional.ul_UM_RLC.sn_FieldLength = SN_FieldLength_size10; + DRB_rlc_config->choice.um_Bi_Directional.dl_UM_RLC.sn_FieldLength = SN_FieldLength_size10; + DRB_rlc_config->choice.um_Bi_Directional.dl_UM_RLC.t_Reordering = T_Reordering_ms35; + UE->DRB_config[0][0]->rlc_Config = DRB_rlc_config; + UE->DRB_config[0][1]->rlc_Config = DRB_rlc_config; + + DRB_pdcp_config = CALLOC(1, sizeof(*DRB_pdcp_config)); + UE->DRB_config[0][0]->pdcp_Config = DRB_pdcp_config; + UE->DRB_config[0][1]->pdcp_Config = DRB_pdcp_config; + DRB_pdcp_config->discardTimer = CALLOC(1, sizeof(long)); + *DRB_pdcp_config->discardTimer = PDCP_Config__discardTimer_infinity; + DRB_pdcp_config->rlc_AM = NULL; + DRB_pdcp_config->rlc_UM = NULL; + + /* avoid gcc warnings */ + (void)PDCP_rlc_UM; + + DRB_pdcp_config->rlc_UM = PDCP_rlc_UM; + PDCP_rlc_UM->pdcp_SN_Size = PDCP_Config__rlc_UM__pdcp_SN_Size_len12bits; + DRB_pdcp_config->headerCompression.present = PDCP_Config__headerCompression_PR_notUsed; + + UE->DRB_config[0][0]->logicalChannelConfig = DRB_lchan_config; + UE->DRB_config[0][1]->logicalChannelConfig = DRB_lchan_config; + DRB_ul_SpecificParameters = CALLOC(1, sizeof(*DRB_ul_SpecificParameters)); + DRB_lchan_config->ul_SpecificParameters = DRB_ul_SpecificParameters; + + DRB_ul_SpecificParameters->priority = 12; // lower priority than srb1, srb2 and other dedicated bearer + DRB_ul_SpecificParameters->prioritisedBitRate =LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_kBps8 ; + //LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity; + DRB_ul_SpecificParameters->bucketSizeDuration = + LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50; + + // LCG for DTCH can take the value from 1 to 3 as defined in 36331: normally controlled by upper layers (like RRM) + + *logicalchannelgroup_drb = 1; + DRB_ul_SpecificParameters->logicalChannelGroup = logicalchannelgroup_drb; + + UE->DRB_configList = CALLOC(1,sizeof(DRB_ToAddModList_t)); + ASN_SEQUENCE_ADD(&UE->DRB_configList->list,UE->DRB_config[0][0]); + ASN_SEQUENCE_ADD(&UE->DRB_configList->list,UE->DRB_config[0][1]); + + rrc_pdcp_config_asn1_req(&ctxt, + (SRB_ToAddModList_t *) NULL, + UE->DRB_configList, + (DRB_ToReleaseList_t*) NULL, + 0xff, NULL, NULL, NULL +#if defined(Rel10) || defined(Rel14) + , (PMCH_InfoList_r9_t *) NULL +#endif + ,NULL); + + rrc_rlc_config_asn1_req(&ctxt, + (SRB_ToAddModList_t*)NULL, + UE->DRB_configList, + (DRB_ToReleaseList_t*)NULL +#if defined(Rel10) || defined(Rel14) + ,(PMCH_InfoList_r9_t *)NULL + , 0, 0 +#endif + ); + + rrc_rlc_config_asn1_req(&ctxt, + (SRB_ToAddModList_t*)NULL, + UE->DRB_configList, + (DRB_ToReleaseList_t*)NULL +#ifdef Rel14 + ,(PMCH_InfoList_r9_t *)NULL + , sourceL2Id, groupL2Id +#endif + ); + + + //configure MAC with sourceL2Id/groupL2ID rrc_mac_config_req_ue(module_id,0,0, //eNB_index =0 - (RadioResourceConfigCommonSIB_t *)NULL, - (struct PhysicalConfigDedicated *)NULL, - #if defined(Rel10) || defined(Rel14) - (SCellToAddMod_r10_t *)NULL, - //struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10, - #endif - (MeasObjectToAddMod_t **)NULL, - (MAC_MainConfig_t *)NULL, - 0, - (struct LogicalChannelConfig *)NULL, - (MeasGapConfig_t *)NULL, - (TDD_Config_t *)NULL, - (MobilityControlInfo_t *)NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL - #if defined(Rel10) || defined(Rel14) - ,0, - (MBSFN_AreaInfoList_r9_t *)NULL, - (PMCH_InfoList_r9_t *)NULL - - #endif - #ifdef CBA - , - 0, - 0 - #endif - #if defined(Rel10) || defined(Rel14) - , - &sourceL2Id, - &groupL2Id, - NULL - #endif - ); + (RadioResourceConfigCommonSIB_t *)NULL, + (struct PhysicalConfigDedicated *)NULL, +#if defined(Rel10) || defined(Rel14) + (SCellToAddMod_r10_t *)NULL, + //struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10, +#endif + (MeasObjectToAddMod_t **)NULL, + (MAC_MainConfig_t *)NULL, + 0, + (struct LogicalChannelConfig *)NULL, + (MeasGapConfig_t *)NULL, + (TDD_Config_t *)NULL, + (MobilityControlInfo_t *)NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL +#if defined(Rel10) || defined(Rel14) + ,0, + (MBSFN_AreaInfoList_r9_t *)NULL, + (PMCH_InfoList_r9_t *)NULL + +#endif +#ifdef CBA + , + 0, + 0 +#endif +#if defined(Rel10) || defined(Rel14) + ,CONFIG_ACTION_ADD, + &sourceL2Id, + &groupL2Id +#endif + ); LOG_I(RRC,"Send GroupCommunicationEstablishResp to ProSe App\n"); memset(send_buf, 0, BUFSIZE); @@ -5646,10 +5766,9 @@ void *rrc_control_socket_thread_fct(void *arg) 0 #endif #if defined(Rel10) || defined(Rel14) - , + ,CONFIG_ACTION_REMOVE, &sourceL2Id, - NULL, - NULL + &destinationL2Id #endif ); @@ -5733,9 +5852,8 @@ void *rrc_control_socket_thread_fct(void *arg) 0 #endif #if defined(Rel10) || defined(Rel14) - , + ,CONFIG_ACTION_ADD, &sourceL2Id, - NULL, &destinationL2Id #endif ); @@ -5775,9 +5893,8 @@ void *rrc_control_socket_thread_fct(void *arg) 0 #endif #if defined(Rel10) || defined(Rel14) - , + ,CONFIG_ACTION_ADD, &sourceL2Id, - NULL, NULL #endif ); diff --git a/openair2/RRC/LITE/rrc_eNB.c b/openair2/RRC/LITE/rrc_eNB.c index b224b9046e3..9abe19d8d12 100644 --- a/openair2/RRC/LITE/rrc_eNB.c +++ b/openair2/RRC/LITE/rrc_eNB.c @@ -535,7 +535,12 @@ static void init_MBMS( NULL, // SRB_ToAddModList NULL, // DRB_ToAddModList NULL, // DRB_ToReleaseList - &(RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message->pmch_InfoList_r9)); + &(RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message->pmch_InfoList_r9) + +#ifdef Rel14 + ,0, 0 +#endif + ); //rrc_mac_config_req(); } @@ -2529,7 +2534,11 @@ check_handovers( SDU_CONFIRM_NO, ue_context_p->ue_context.handover_info->size, ue_context_p->ue_context.handover_info->buf, - PDCP_TRANSMISSION_MODE_CONTROL); + PDCP_TRANSMISSION_MODE_CONTROL +#ifdef Rel14 + ,NULL, NULL +#endif + ); AssertFatal(result == TRUE, "PDCP data request failed!\n"); ue_context_p->ue_context.handover_info->ho_complete = 0xF2; } @@ -3352,6 +3361,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover( (DRB_ToAddModList_t *) NULL, (DRB_ToReleaseList_t *) NULL #if defined(Rel10) || defined(Rel14) , (PMCH_InfoList_r9_t *) NULL + , 0, 0 #endif ); @@ -3573,6 +3583,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( (DRB_ToReleaseList_t *) NULL #if defined(Rel10) || defined(Rel14) , (PMCH_InfoList_r9_t *) NULL + , 0, 0 #endif ); @@ -4410,6 +4421,7 @@ rrc_eNB_decode_ccch( (DRB_ToReleaseList_t*) NULL # if defined(Rel10) || defined(Rel14) , (PMCH_InfoList_r9_t *) NULL + , 0, 0 # endif ); #endif //NO_RRM diff --git a/openair3/GTPV1-U/gtpv1u_eNB.c b/openair3/GTPV1-U/gtpv1u_eNB.c index aacfa561fd6..0e13a59c4d8 100644 --- a/openair3/GTPV1-U/gtpv1u_eNB.c +++ b/openair3/GTPV1-U/gtpv1u_eNB.c @@ -61,7 +61,12 @@ extern boolean_t pdcp_data_req( const confirm_t confirmP, const sdu_size_t sdu_buffer_sizeP, unsigned char *const sdu_buffer_pP, - const pdcp_transmission_mode_t modeP); + const pdcp_transmission_mode_t modeP +#ifdef Rel14 + ,const uint32_t * const sourceL2Id + ,const uint32_t * const destinationL2Id +#endif + ); extern unsigned char NB_eNB_INST; extern RAN_CONTEXT_t RC; @@ -347,7 +352,11 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req( SDU_CONFIRM_NO, // confirm buffer_len, buffer, - PDCP_TRANSMISSION_MODE_DATA); + PDCP_TRANSMISSION_MODE_DATA +#ifdef Rel14 + ,NULL, NULL +#endif + ); if ( result == FALSE ) { -- GitLab