Commit 97c2aff9 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

PC5-U - passing (source,destination) down to PDCP/RLC/MAC (first alternative -...

PC5-U - passing (source,destination) down to PDCP/RLC/MAC (first alternative - mapping of L2Ids form IP Addresses
parent 24d5700c
...@@ -372,10 +372,20 @@ typedef struct { ...@@ -372,10 +372,20 @@ typedef struct {
struct PMCH_InfoList_r9 *pmch_InfoList struct PMCH_InfoList_r9 *pmch_InfoList
#endif #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* ); 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, 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 *); 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_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 ) ) ; void (*rrc_data_confP) (module_id_t , rb_id_t , mui_t ) ) ;
......
...@@ -563,7 +563,11 @@ int flexran_get_tx_queue_size(mid_t mod_id, mid_t ue_id, logical_chan_id_t chann ...@@ -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); rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
uint16_t frame = (uint16_t) flexran_get_current_frame(mod_id); uint16_t frame = (uint16_t) flexran_get_current_frame(mod_id);
uint16_t subframe = (uint16_t) flexran_get_current_subframe(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; 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 ...@@ -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); rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
uint16_t frame = (uint16_t) flexran_get_current_frame(mod_id); uint16_t frame = (uint16_t) flexran_get_current_frame(mod_id);
uint16_t subframe = (uint16_t) flexran_get_current_subframe(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; return rlc_status.head_sdu_creation_time;
} }
......
...@@ -1048,9 +1048,9 @@ rrc_mac_config_req_ue( ...@@ -1048,9 +1048,9 @@ rrc_mac_config_req_ue(
uint16_t cba_rnti uint16_t cba_rnti
#endif #endif
#if defined(Rel14) #if defined(Rel14)
,uint32_t *sourceL2Id, ,config_action_t config_action
uint32_t *groupL2Id, ,const uint32_t * const sourceL2Id
uint32_t *destinationL2Id ,const uint32_t * const destinationL2Id
#endif #endif
) )
...@@ -1374,14 +1374,29 @@ rrc_mac_config_req_ue( ...@@ -1374,14 +1374,29 @@ rrc_mac_config_req_ue(
//for D2D //for D2D
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
if (sourceL2Id){ switch (config_action) {
UE_mac_inst[Mod_idP].sourceL2Id = *sourceL2Id; case CONFIG_ACTION_ADD:
} if (sourceL2Id){
if (groupL2Id) { UE_mac_inst[Mod_idP].sourceL2Id = *sourceL2Id;
UE_mac_inst[Mod_idP].groupL2Id = *groupL2Id; LOG_I(MAC,"[UE %d] Configure source L2Id 0x%08x \n", Mod_idP, *sourceL2Id );
} }
if (destinationL2Id) { if (destinationL2Id) {
UE_mac_inst[Mod_idP].destinationL2Id = *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 #endif
......
...@@ -445,6 +445,7 @@ typedef struct { ...@@ -445,6 +445,7 @@ typedef struct {
#define CC_ACT_DEACT 27 #define CC_ACT_DEACT 27
//TTN (for D2D) //TTN (for D2D)
#define SL_DISCOVERY 8 //LCID (fake) #define SL_DISCOVERY 8 //LCID (fake)
#define MAX_NUM_DEST 10
#endif #endif
// ULSCH LCHAN IDs // ULSCH LCHAN IDs
...@@ -1341,6 +1342,9 @@ typedef struct { ...@@ -1341,6 +1342,9 @@ typedef struct {
uint32_t groupL2Id; uint32_t groupL2Id;
//SL destinationL2Id //SL destinationL2Id
uint32_t destinationL2Id; uint32_t destinationL2Id;
//List of destinations
uint32_t destinationList[MAX_NUM_DEST];
uint8_t numCommFlows;
#endif #endif
/// pointer to TDD Configuration (NULL for FDD) /// pointer to TDD Configuration (NULL for FDD)
......
...@@ -849,7 +849,11 @@ schedule_ue_spec( ...@@ -849,7 +849,11 @@ schedule_ue_spec(
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, MBMS_FLAG_NO,
DCCH, 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; sdu_lengths[0]=0;
...@@ -865,7 +869,12 @@ schedule_ue_spec( ...@@ -865,7 +869,12 @@ schedule_ue_spec(
MBMS_FLAG_NO, MBMS_FLAG_NO,
DCCH, DCCH,
TBS, //not used 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(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])); T_INT(harq_pid), T_INT(DCCH), T_INT(sdu_lengths[0]));
...@@ -902,7 +911,11 @@ schedule_ue_spec( ...@@ -902,7 +911,11 @@ schedule_ue_spec(
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, MBMS_FLAG_NO,
DCCH+1, 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 // DCCH SDU
sdu_lengths[num_sdus] = 0; sdu_lengths[num_sdus] = 0;
...@@ -918,7 +931,12 @@ schedule_ue_spec( ...@@ -918,7 +931,12 @@ schedule_ue_spec(
MBMS_FLAG_NO, MBMS_FLAG_NO,
DCCH+1, DCCH+1,
TBS, //not used 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(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])); T_INT(harq_pid), T_INT(DCCH+1), T_INT(sdu_lengths[num_sdus]));
...@@ -964,7 +982,11 @@ schedule_ue_spec( ...@@ -964,7 +982,11 @@ schedule_ue_spec(
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, MBMS_FLAG_NO,
lcid, 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) { if (rlc_status.bytes_in_buffer > 0) {
...@@ -979,7 +1001,12 @@ schedule_ue_spec( ...@@ -979,7 +1001,12 @@ schedule_ue_spec(
MBMS_FLAG_NO, MBMS_FLAG_NO,
lcid, lcid,
TBS, //not used 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(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])); T_INT(harq_pid), T_INT(lcid), T_INT(sdu_lengths[num_sdus]));
......
...@@ -508,7 +508,11 @@ int schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP, sub_fra ...@@ -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); 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, 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", 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); 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 ...@@ -525,7 +529,12 @@ int schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP, sub_fra
MBMS_FLAG_YES, MBMS_FLAG_YES,
MTCH, MTCH,
0, //not used 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]); //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); 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; cc->mtch_active=1;
......
...@@ -178,7 +178,11 @@ void flexran_apply_ue_spec_scheduling_decisions(mid_t mod_id, ...@@ -178,7 +178,11 @@ void flexran_apply_ue_spec_scheduling_decisions(mid_t mod_id,
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, MBMS_FLAG_NO,
lcid, lcid,
0); 0
#ifdef Rel14
,0, 0
#endif
);
if (rlc_status.bytes_in_buffer > 0) { if (rlc_status.bytes_in_buffer > 0) {
...@@ -198,7 +202,11 @@ void flexran_apply_ue_spec_scheduling_decisions(mid_t mod_id, ...@@ -198,7 +202,11 @@ void flexran_apply_ue_spec_scheduling_decisions(mid_t mod_id,
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, MBMS_FLAG_NO,
lcid, 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); 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, ...@@ -212,7 +220,12 @@ void flexran_apply_ue_spec_scheduling_decisions(mid_t mod_id,
MBMS_FLAG_NO, MBMS_FLAG_NO,
lcid, lcid,
rlc_size, //not used 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]); 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]; sdu_length_total += sdu_lengths[j];
......
...@@ -160,7 +160,11 @@ void _store_dlsch_buffer (module_id_t Mod_id, ...@@ -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 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_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_pdus_in_buffer[i] = rlc_status.pdus_in_buffer;
UE_template->dl_buffer_head_sdu_creation_time[i] = rlc_status.head_sdu_creation_time ; 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, ...@@ -1245,7 +1249,11 @@ flexran_schedule_ue_spec_common(mid_t mod_id,
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, MBMS_FLAG_NO,
j, 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 data are available in channel j
if (rlc_status.bytes_in_buffer > 0) { if (rlc_status.bytes_in_buffer > 0) {
......
...@@ -126,7 +126,11 @@ void store_dlsch_buffer (module_id_t Mod_id, ...@@ -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 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_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_pdus_in_buffer[i] = rlc_status.pdus_in_buffer;
UE_template->dl_buffer_head_sdu_creation_time[i] = rlc_status.head_sdu_creation_time ; UE_template->dl_buffer_head_sdu_creation_time[i] = rlc_status.head_sdu_creation_time ;
......
...@@ -931,10 +931,9 @@ int rrc_mac_config_req_ue(module_id_t module_idP, ...@@ -931,10 +931,9 @@ int rrc_mac_config_req_ue(module_id_t module_idP,
uint16_t cba_rnti uint16_t cba_rnti
#endif #endif
#if defined(Rel14) #if defined(Rel14)
, ,config_action_t config_action
uint32_t *sourceL2Id, ,const uint32_t * const sourceL2Id
uint32_t *groupL2Id, ,const uint32_t * const destinationL2Id
uint32_t *destinationL2Id
#endif #endif
); );
......
...@@ -389,7 +389,11 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP,int CC_id,frame_t frameP, ...@@ -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 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, 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, DCCH,
6); 6
#ifdef Rel14
,0, 0
#endif
);
if (UE_mac_inst[module_idP].crnti_before_ho) if (UE_mac_inst[module_idP].crnti_before_ho)
LOG_D(MAC, LOG_D(MAC,
...@@ -403,7 +407,12 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP,int CC_id,frame_t frameP, ...@@ -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, eNB_indexP, frameP,ENB_FLAG_NO, MBMS_FLAG_NO,
DCCH, DCCH,
6, //not used 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]); 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); update_bsr(module_idP, frameP, subframeP,eNB_indexP);
......
This diff is collapsed.
...@@ -86,6 +86,10 @@ boolean_t pdcp_data_req( ...@@ -86,6 +86,10 @@ boolean_t pdcp_data_req(
const sdu_size_t sdu_buffer_sizeP, const sdu_size_t sdu_buffer_sizeP,
unsigned char *const sdu_buffer_pP, 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
) )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
{ {
...@@ -166,7 +170,11 @@ boolean_t pdcp_data_req( ...@@ -166,7 +170,11 @@ boolean_t pdcp_data_req(
(unsigned char*)&pdcp_pdu_p->data[0], (unsigned char*)&pdcp_pdu_p->data[0],
sdu_buffer_sizeP); sdu_buffer_sizeP);
#endif #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 { } else {
rlc_status = RLC_OP_STATUS_OUT_OF_RESSOURCES; rlc_status = RLC_OP_STATUS_OUT_OF_RESSOURCES;
LOG_W(PDCP,PROTOCOL_CTXT_FMT" PDCP_DATA_REQ SDU DROPPED, OUT OF MEMORY \n", LOG_W(PDCP,PROTOCOL_CTXT_FMT" PDCP_DATA_REQ SDU DROPPED, OUT OF MEMORY \n",
...@@ -351,7 +359,12 @@ boolean_t pdcp_data_req( ...@@ -351,7 +359,12 @@ boolean_t pdcp_data_req(
LOG_F(PDCP,"\n"); LOG_F(PDCP,"\n");
#endif #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 ( ...@@ -927,7 +940,11 @@ pdcp_run (
RRC_DCCH_DATA_REQ (msg_p).confirmp, RRC_DCCH_DATA_REQ (msg_p).confirmp,
RRC_DCCH_DATA_REQ (msg_p).sdu_size, RRC_DCCH_DATA_REQ (msg_p).sdu_size,
RRC_DCCH_DATA_REQ (msg_p).sdu_p, 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) if (result != TRUE)
LOG_E(PDCP, "PDCP data request failed!\n"); LOG_E(PDCP, "PDCP data request failed!\n");
......
...@@ -220,7 +220,12 @@ public_pdcp(boolean_t pdcp_data_req( ...@@ -220,7 +220,12 @@ public_pdcp(boolean_t pdcp_data_req(
const confirm_t confirmP, \ const confirm_t confirmP, \
const sdu_size_t sdu_buffer_size, const sdu_size_t sdu_buffer_size,
unsigned char* const sdu_buffer, 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) /*! \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 * \brief This functions handles data transfer indications coming from RLC
......
...@@ -207,13 +207,10 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP) ...@@ -207,13 +207,10 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP)
#ifdef Rel14 #ifdef Rel14
sidelink_pc5s_element *sl_pc5s_msg_recv = NULL; sidelink_pc5s_element *sl_pc5s_msg_recv = NULL;
char send_buf[BUFSIZE]; 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", if (rb_id == 10) { //hardcoded for PC5-Signaling
ctxt_pP->frame, ((pdcp_data_ind_header_t *)(sdu_p->data))->inst, //if ((rb_id == 28) | (rb_id == 29) | (rb_id == 30))
((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) {
#ifdef PDCP_DEBUG #ifdef PDCP_DEBUG
sl_pc5s_msg_recv = calloc(1, sizeof(sidelink_pc5s_element)); 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) ...@@ -507,7 +504,11 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
RLC_SDU_CONFIRM_NO, RLC_SDU_CONFIRM_NO,
data_p->pdcp_read_header.data_size, data_p->pdcp_read_header.data_size,
data_p->data, data_p->data,
pdcp_mode); pdcp_mode
#ifdef Rel14
,NULL, NULL
#endif
);
} else if (ctxt_cpy.enb_flag) { } else if (ctxt_cpy.enb_flag) {
/* rb_id = 0, thus interpreated as broadcast and transported as /* rb_id = 0, thus interpreated as broadcast and transported as
* multiple unicast is a broadcast packet, we have to send this * 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) ...@@ -531,7 +532,11 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
RLC_SDU_CONFIRM_NO, RLC_SDU_CONFIRM_NO,
data_p->pdcp_read_header.data_size, data_p->pdcp_read_header.data_size,
data_p->data, data_p->data,
PDCP_TRANSMISSION_MODE_DATA); PDCP_TRANSMISSION_MODE_DATA
#ifdef Rel14
,NULL, NULL
#endif
);
} }
} }
} else { } else {
...@@ -544,7 +549,11 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) ...@@ -544,7 +549,11 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
RLC_SDU_CONFIRM_NO, RLC_SDU_CONFIRM_NO,
data_p->pdcp_read_header.data_size, data_p->pdcp_read_header.data_size,
data_p->data, data_p->data,
PDCP_TRANSMISSION_MODE_DATA); PDCP_TRANSMISSION_MODE_DATA
#ifdef Rel14
,NULL, NULL
#endif
);
} }
free(data_p->data); free(data_p->data);
...@@ -702,7 +711,12 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) ...@@ -702,7 +711,12 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
RLC_SDU_CONFIRM_NO, RLC_SDU_CONFIRM_NO,
pdcp_data_header->data_size, pdcp_data_header->data_size,
(unsigned char *)receive_buf, (unsigned char *)receive_buf,
PDCP_TRANSMISSION_MODE_DATA); PDCP_TRANSMISSION_MODE_DATA
#ifdef Rel14
,&pdcp_data_header->sourceL2Id
,&pdcp_data_header->destinationL2Id
#endif
);
} else { } else {
MSC_LOG_RX_DISCARDED_MESSAGE( MSC_LOG_RX_DISCARDED_MESSAGE(
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE, (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) ...@@ -755,7 +769,12 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
RLC_SDU_CONFIRM_NO, RLC_SDU_CONFIRM_NO,
pdcp_data_header->data_size, pdcp_data_header->data_size,
(unsigned char *)receive_buf, (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); free (sl_pc5s_msg_recv);
...@@ -794,8 +813,8 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) ...@@ -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)) { if (nas_nlh_rx->nlmsg_len == sizeof (pdcp_data_req_header_t) + sizeof(struct nlmsghdr)) {
pdcp_read_state_g = 1; //get pdcp_read_state_g = 1; //get
memcpy((void *)&pdcp_read_header_g, (void *)NLMSG_DATA(nas_nlh_rx), sizeof(pdcp_data_req_header_t)); 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", 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.inst, pdcp_read_header_g.rb_id, pdcp_read_header_g.data_size,pdcp_read_header_g.sourceL2Id, pdcp_read_header_g.destinationL2Id );
} else { } else {
LOG_E(PDCP, "[PDCP][NETLINK] WRONG size %d should be sizeof (pdcp_data_req_header_t) + sizeof(struct nlmsghdr)\n", 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); nas_nlh_rx->nlmsg_len);
...@@ -839,7 +858,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) ...@@ -839,7 +858,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
ctxt.enb_flag = ctxt_cpy.enb_flag; ctxt.enb_flag = ctxt_cpy.enb_flag;
#ifdef PDCP_DEBUG #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 #endif
if (ctxt_cpy.enb_flag) { if (ctxt_cpy.enb_flag) {
...@@ -898,7 +917,11 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) ...@@ -898,7 +917,11 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
RLC_SDU_CONFIRM_NO, RLC_