Commit 93820803 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

test multiple flows

parent 56b0da13
......@@ -378,7 +378,11 @@ typedef struct {
,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*
#ifdef Rel14
, sl_reset_rlc_flag_t sl_reset_rlc_flag
#endif
);
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
#ifdef Rel14
......
......@@ -91,6 +91,10 @@ typedef boolean_t sl_discovery_flag_t;
#define SL_DISCOVERY_FLAG_NO FALSE
#define SL_DISCOVERY_FLAG_YES TRUE
typedef boolean_t sl_reset_rlc_flag_t;
#define SL_RESET_RLC_FLAG_NO FALSE
#define SL_RESET_RLC_FLAG_YES TRUE
typedef enum link_direction_e {
UNKNOWN_DIR = 0,
DIR_UPLINK = 1,
......
......@@ -510,7 +510,11 @@ void rx_sdu(const module_id_t enb_mod_idP,
(char *)payload_ptr,
rx_lengths[i],
1,
NULL);//(unsigned int*)crc_status);
NULL //(unsigned int*)crc_status);
#ifdef Rel14
,SL_RESET_RLC_FLAG_NO
#endif
);
UE_list->eNB_UE_stats[CC_idP][UE_id].num_pdu_rx[rx_lcids[i]]+=1;
UE_list->eNB_UE_stats[CC_idP][UE_id].num_bytes_rx[rx_lcids[i]]+=rx_lengths[i];
......@@ -559,7 +563,11 @@ void rx_sdu(const module_id_t enb_mod_idP,
(char *)payload_ptr,
rx_lengths[i],
1,
NULL);//(unsigned int*)crc_status);
NULL //(unsigned int*)crc_status);
#ifdef Rel14
,SL_RESET_RLC_FLAG_NO
#endif
);
UE_list->eNB_UE_stats[CC_idP][UE_id].num_pdu_rx[rx_lcids[i]]+=1;
UE_list->eNB_UE_stats[CC_idP][UE_id].num_bytes_rx[rx_lcids[i]]+=rx_lengths[i];
......
......@@ -505,7 +505,11 @@ ue_send_sdu(
(char *)payload_ptr,
rx_lengths[i],
1,
NULL);
NULL
#ifdef Rel14
,SL_RESET_RLC_FLAG_NO
#endif
);
} else if ((rx_lcids[i] < NB_RB_MAX) && (rx_lcids[i] > DCCH1 )) {
......@@ -527,7 +531,11 @@ ue_send_sdu(
(char *)payload_ptr,
rx_lengths[i],
1,
NULL);
NULL
#ifdef Rel14
,SL_RESET_RLC_FLAG_NO
#endif
);
} else {
LOG_E(MAC,"[UE %d] Frame %d : unknown LCID %d (eNB %d)\n", module_idP, frameP,rx_lcids[i], eNB_index);
}
......@@ -720,7 +728,11 @@ void ue_send_mch_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frameP, uint
(char *)payload_ptr,
rx_lengths[i],
1,
NULL);
NULL
#ifdef Rel14
,SL_RESET_RLC_FLAG_NO
#endif
);
}
} else {
......@@ -826,6 +838,21 @@ void ue_send_sl_sdu(module_id_t module_idP,
rlc_sdu_len = ((SLSCH_SUBHEADER_24_Bit_DST_SHORT *)sdu)->L;
rlc_sdu = sdu+sizeof(SLSCH_SUBHEADER_24_Bit_DST_SHORT);
}
//Test
i=0;
sl_reset_rlc_flag_t reset_flag = SL_RESET_RLC_FLAG_YES;
for (i = MAX_NUM_LCID_DATA; i < MAX_NUM_LCID; i++){
//PC5-S (default RX)
if (UE_mac_inst[module_idP].sl_info[i].destinationL2Id == sourceL2Id) {
reset_flag = SL_RESET_RLC_FLAG_NO;
break;
}
}
if (reset_flag == SL_RESET_RLC_FLAG_YES){
LOG_I(MAC, "SL_RESET_RLC_FLAG_YES");
}
mac_rlc_data_ind(
module_idP,
0x1234,
......@@ -837,7 +864,11 @@ void ue_send_sl_sdu(module_id_t module_idP,
rlc_sdu,
rlc_sdu_len,
1,
NULL);
NULL
#ifdef Rel14
,reset_flag
#endif
);
} else { //SL_DISCOVERY
uint16_t len = sdu_len;
LOG_D( MAC, "SL DISCOVERY \n");
......
......@@ -173,7 +173,11 @@ rlc_um_get_pdus (const protocol_ctxt_t* const ctxt_pP, void *argP)
//-----------------------------------------------------------------------------
void
rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind data_indP)
rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind data_indP
#ifdef Rel14
, sl_reset_rlc_flag_t sl_reset_rlc_flag
#endif
)
{
rlc_um_entity_t *l_rlc_p = (rlc_um_entity_t *) argP;
#if TRACE_RLC_UM_PDU || MESSAGE_CHART_GENERATOR
......@@ -374,6 +378,12 @@ rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind
}
#endif
if (sl_reset_rlc_flag == SL_DISCOVERY_FLAG_YES) {
l_rlc_p->vr_ur = 0;
l_rlc_p->vr_ux = 0;
l_rlc_p->vr_uh = 0;
}
rlc_um_receive (ctxt_pP, l_rlc_p, data_indP);
break;
......@@ -676,9 +686,17 @@ rlc_um_mac_data_request (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP,cons
//-----------------------------------------------------------------------------
void
rlc_um_mac_data_indication (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, struct mac_data_ind data_indP)
rlc_um_mac_data_indication (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, struct mac_data_ind data_indP
#ifdef Rel14
, sl_reset_rlc_flag_t sl_reset_rlc_flag
#endif
)
{
rlc_um_rx (ctxt_pP, rlc_pP, data_indP);
rlc_um_rx (ctxt_pP, rlc_pP, data_indP
#ifdef Rel14
,sl_reset_rlc_flag
#endif
);
rlc_um_check_timer_dar_time_out(ctxt_pP, rlc_pP);
}
......
......@@ -176,7 +176,11 @@ private_rlc_um( void rlc_um_get_pdus (const protocol_ctxt_t* const ctxt_pP
* \param[in] rlc_pP RLC UM protocol instance pointer.
* \param[in] data_indication PDUs from MAC.
*/
protected_rlc_um( void rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, struct mac_data_ind data_indication);)
protected_rlc_um( void rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, struct mac_data_ind data_indication
#ifdef Rel14
, sl_reset_rlc_flag_t sl_reset_rlc_flag
#endif
);)
/*! \fn struct mac_status_resp rlc_um_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP)
* \brief Request the maximum number of bytes that can be served by RLC instance to MAC and fix the amount of bytes requested by MAC for next RLC transmission.
......@@ -211,7 +215,11 @@ public_rlc_um( struct mac_data_req rlc_um_mac_data_request (const protocol_ct
* \param[in] rlc_pP RLC UM protocol instance pointer.
* \param[in] data_indP PDUs from MAC.
*/
public_rlc_um( void rlc_um_mac_data_indication (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, struct mac_data_ind data_indP);)
public_rlc_um( void rlc_um_mac_data_indication (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, struct mac_data_ind data_indP
#ifdef Rel14
, sl_reset_rlc_flag_t sl_reset_rlc_flag
#endif
);)
/*! \fn uint32_t rlc_um_get_buffer_occupancy (rlc_um_entity_t *rlc_pP)
* \brief Gets Tx Buffer Occupancy.
......
......@@ -479,8 +479,16 @@ void rlc_um_v9_3_0_test_exchange_pdus(rlc_um_entity_t *um_txP,
rlc_um_v9_3_0_test_mac_rlc_loop(&data_ind_rx, &data_request_tx, &g_drop_tx, &g_tx_packets, &g_dropped_tx_packets);
rlc_um_v9_3_0_test_mac_rlc_loop(&data_ind_tx, &data_request_rx, &g_drop_rx, &g_rx_packets, &g_dropped_rx_packets);
rlc_um_mac_data_indication(um_rxP, g_frame, um_rxP->is_enb, data_ind_rx);
rlc_um_mac_data_indication(um_txP, g_frame, um_txP->is_enb, data_ind_tx);
rlc_um_mac_data_indication(um_rxP, g_frame, um_rxP->is_enb, data_ind_rx
#ifdef Rel14
,SL_RESET_RLC_FLAG_NO
#endif
);
rlc_um_mac_data_indication(um_txP, g_frame, um_txP->is_enb, data_ind_tx
#ifdef Rel14
,SL_RESET_RLC_FLAG_NO
#endif
);
g_frame += 1;
//check_mem_area();
//display_mem_load();
......@@ -530,10 +538,18 @@ void rlc_um_v9_3_0_test_exchange_delayed_pdus(rlc_um_entity_t *um_txP,
rlc_um_v9_3_0_buffer_delayed_tx_mac_data_ind(&data_ind_tx, time_rx_delayedP);
rlc_um_mac_data_indication(um_rxP, g_frame, um_rxP->is_enb, g_rx_delayed_indications[frame_modulo]);
rlc_um_mac_data_indication(um_rxP, g_frame, um_rxP->is_enb, g_rx_delayed_indications[frame_modulo]
#ifdef Rel14
,SL_RESET_RLC_FLAG_NO
#endif
);
memset(&g_rx_delayed_indications[frame_modulo], 0, sizeof(struct mac_data_ind));
rlc_um_mac_data_indication(um_txP, g_frame, um_txP->is_enb, g_tx_delayed_indications[frame_modulo]);
rlc_um_mac_data_indication(um_txP, g_frame, um_txP->is_enb, g_tx_delayed_indications[frame_modulo]
#ifdef Rel14
,SL_RESET_RLC_FLAG_NO
#endif
);
memset(&g_tx_delayed_indications[frame_modulo], 0, sizeof(struct mac_data_ind));
if (is_frame_incrementedP) {
......
......@@ -485,7 +485,11 @@ public_rlc_mac(tbs_size_t mac_rlc_data_req (const module_id_t, co
* \param[in] crcs Array of CRC decoding.
*/
public_rlc_mac(void mac_rlc_data_ind (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, char*, tb_size_t, num_tb_t,
crc_t* );)
crc_t*
#ifdef Rel14
, sl_reset_rlc_flag_t
#endif
);)
/*! \fn mac_rlc_status_resp_t mac_rlc_status_ind (const module_id_t mod_idP, const rnti_t rntiP, const frame_t frameP, const sub_frame_t subframeP, const eNB_flag_t eNB_flagP, const MBMS_flag_t MBMS_flagP, logical_chan_id_t rb_idP, tb_size_t tb_sizeP)
* \brief Interface with MAC layer, request and set the number of bytes scheduled for transmission by the RLC instance corresponding to the radio bearer identifier.
......
......@@ -239,7 +239,11 @@ void mac_rlc_data_ind (
char *buffer_pP,
const tb_size_t tb_sizeP,
num_tb_t num_tbP,
crc_t *crcs_pP)
crc_t *crcs_pP
#ifdef Rel14
, sl_reset_rlc_flag_t sl_reset_rlc_flag
#endif
)
{
//-----------------------------------------------------------------------------
rlc_mode_t rlc_mode = RLC_MODE_NONE;
......@@ -315,7 +319,11 @@ void mac_rlc_data_ind (
break;
case RLC_MODE_UM:
rlc_um_mac_data_indication(&ctxt, &rlc_union_p->rlc.um, data_ind);
rlc_um_mac_data_indication(&ctxt, &rlc_union_p->rlc.um, data_ind
#ifdef Rel14
,sl_reset_rlc_flag
#endif
);
break;
case RLC_MODE_TM:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment