fix the dedicated DRB setup with multiple E_RAB_SETUP_REQ
This commit is contained in:
@@ -191,7 +191,7 @@ rrc_mac_config_req(
|
||||
}
|
||||
else {
|
||||
eNB_mac_inst[Mod_id].lcid_active[logicalChannelIdentity]=1;
|
||||
LOG_I(MAC,"[CONFIG][eNB %d] lcid %d is active for UE rnti %x on cc_id % \n",Mod_id,rntiP,CC_id);
|
||||
LOG_I(MAC,"[CONFIG][eNB %d] lcid %d is active for UE rnti %x on cc_id %d \n",Mod_id,logicalChannelIdentity, rntiP,CC_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -918,8 +918,8 @@ schedule_ue_spec(
|
||||
|
||||
if (rlc_status.bytes_in_buffer > 0) {
|
||||
|
||||
LOG_D(MAC,"[eNB %d][USER-PLANE DEFAULT DRB] Frame %d : DTCH%d->DLSCH, Requesting %d bytes from RLC (total hdr len dtch %d)\n",
|
||||
module_idP,frameP,lcid,TBS-header_len_dcch-sdu_length_total-header_len_dtch,header_len_dtch);
|
||||
LOG_I(MAC,"[eNB %d][USER-PLANE DEFAULT DRB] Frame %d : DTCH->DLSCH, Requesting %d bytes from RLC (lcid %d total hdr len %d)\n",
|
||||
module_idP,frameP,TBS-header_len_dcch-sdu_length_total-header_len_dtch,lcid, header_len_dtch);
|
||||
sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP,
|
||||
rnti,
|
||||
module_idP,
|
||||
|
||||
@@ -113,7 +113,7 @@ extern void* bigphys_malloc(int);
|
||||
extern uint16_t two_tier_hexagonal_cellIds[7];
|
||||
|
||||
/* TS 36.331: RRC-TransactionIdentifier ::= INTEGER (0..3) */
|
||||
static const uint8_t RRC_TRANSACTION_IDENTIFIER_NUMBER = 4;
|
||||
static const uint8_t RRC_TRANSACTION_IDENTIFIER_NUMBER = 3;
|
||||
|
||||
mui_t rrc_eNB_mui = 0;
|
||||
|
||||
@@ -504,6 +504,7 @@ rrc_eNB_get_next_transaction_identifier(
|
||||
{
|
||||
static uint8_t rrc_transaction_identifier[NUMBER_OF_eNB_MAX];
|
||||
rrc_transaction_identifier[enb_mod_idP] = (rrc_transaction_identifier[enb_mod_idP] + 1) % RRC_TRANSACTION_IDENTIFIER_NUMBER;
|
||||
LOG_T(RRC,"generated xid is %d\n",rrc_transaction_identifier[enb_mod_idP]);
|
||||
return rrc_transaction_identifier[enb_mod_idP];
|
||||
}
|
||||
/*------------------------------------------------------------------------------*/
|
||||
@@ -1140,7 +1141,9 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* co
|
||||
struct LogicalChannelConfig *DRB_lchan_config = NULL;
|
||||
struct LogicalChannelConfig__ul_SpecificParameters
|
||||
*DRB_ul_SpecificParameters = NULL;
|
||||
DRB_ToAddModList_t** DRB_configList=&ue_context_pP->ue_context.DRB_configList;
|
||||
// DRB_ToAddModList_t** DRB_configList=&ue_context_pP->ue_context.DRB_configList;
|
||||
DRB_ToAddModList_t* DRB_configList=ue_context_pP->ue_context.DRB_configList;
|
||||
DRB_ToAddModList_t* DRB_configList2=NULL;
|
||||
//DRB_ToAddModList_t** RRC_DRB_configList=&ue_context_pP->ue_context.DRB_configList;
|
||||
|
||||
struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *dedicatedInfoNASList = NULL;
|
||||
@@ -1148,17 +1151,19 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* co
|
||||
|
||||
long *logicalchannelgroup, *logicalchannelgroup_drb;
|
||||
int drb_identity_index=0, nas_sequence_flag = 0;
|
||||
|
||||
|
||||
uint8_t xid = rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id); //Transaction_id,
|
||||
|
||||
// Configure DRB
|
||||
//*DRB_configList = CALLOC(1, sizeof(*DRB_configList));
|
||||
*DRB_configList = CALLOC(1, sizeof(**DRB_configList));
|
||||
DRB_configList2 = CALLOC(1, sizeof(*DRB_configList2));
|
||||
dedicatedInfoNASList = CALLOC(1, sizeof(struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList));
|
||||
|
||||
for ( i = 0 ;
|
||||
i < ue_context_pP->ue_context.setup_e_rabs ;
|
||||
i++){
|
||||
|
||||
// bypass the already configured erabs
|
||||
// bypass the new and already configured erabs
|
||||
if (ue_context_pP->ue_context.e_rab[i].status >= E_RAB_STATUS_DONE) {
|
||||
drb_identity_index++;
|
||||
continue;
|
||||
@@ -1242,7 +1247,8 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* co
|
||||
*logicalchannelgroup_drb = 1;//(i+1) % 3;
|
||||
DRB_ul_SpecificParameters->logicalChannelGroup = logicalchannelgroup_drb;
|
||||
|
||||
ASN_SEQUENCE_ADD(&(*DRB_configList)->list, DRB_config);
|
||||
ASN_SEQUENCE_ADD(&DRB_configList->list, DRB_config);
|
||||
ASN_SEQUENCE_ADD(&DRB_configList2->list, DRB_config);
|
||||
//ue_context_pP->ue_context.DRB_configList2[drb_identity_index] = &(*DRB_configList);
|
||||
|
||||
LOG_I(RRC,"EPS ID %d, DRB ID %d (index %d), QCI %d, priority %d, LCID %d LCGID %d \n",
|
||||
@@ -1280,7 +1286,7 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* co
|
||||
}
|
||||
|
||||
ue_context_pP->ue_context.e_rab[i].status = E_RAB_STATUS_DONE;
|
||||
ue_context_pP->ue_context.e_rab[i].xid =rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id); //Transaction_id,
|
||||
ue_context_pP->ue_context.e_rab[i].xid = xid;
|
||||
|
||||
}
|
||||
|
||||
@@ -1288,9 +1294,9 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* co
|
||||
|
||||
size = do_RRCConnectionReconfiguration(ctxt_pP,
|
||||
buffer,
|
||||
ue_context_pP->ue_context.e_rab[i].xid,
|
||||
xid,
|
||||
(SRB_ToAddModList_t*)NULL,
|
||||
(DRB_ToAddModList_t*)*DRB_configList,
|
||||
(DRB_ToAddModList_t*)DRB_configList2,
|
||||
(DRB_ToReleaseList_t*)NULL, // DRB2_list,
|
||||
(struct SPS_Config*)NULL, // *sps_Config,
|
||||
NULL, NULL, NULL, NULL,NULL,
|
||||
@@ -1482,6 +1488,9 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t* cons
|
||||
|
||||
// Configure DRB
|
||||
//*DRB_configList = CALLOC(1, sizeof(*DRB_configList));
|
||||
if (*DRB_configList) {
|
||||
free(*DRB_configList);
|
||||
}
|
||||
*DRB_configList = CALLOC(1, sizeof(**DRB_configList));
|
||||
/// DRB
|
||||
DRB_config = CALLOC(1, sizeof(*DRB_config));
|
||||
|
||||
@@ -921,7 +921,7 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char
|
||||
rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(
|
||||
&ctxt,
|
||||
&create_tunnel_resp);
|
||||
ue_context_p->ue_context.setup_e_rabs =ue_context_p->ue_context.nb_of_e_rabs;
|
||||
ue_context_p->ue_context.setup_e_rabs=ue_context_p->ue_context.nb_of_e_rabs;
|
||||
}
|
||||
|
||||
/* TODO parameters yet to process ... */
|
||||
@@ -1341,6 +1341,7 @@ int rrc_eNB_send_S1AP_E_RAB_SETUP_RESP(const protocol_ctxt_t* const ctxt_pP,
|
||||
for (e_rab = 0; e_rab < ue_context_pP->ue_context.setup_e_rabs ; e_rab++) {
|
||||
|
||||
/* only respond to the corresponding transaction */
|
||||
//if (((xid+1)%4) == ue_context_pP->ue_context.e_rab[e_rab].xid) {
|
||||
if (xid == ue_context_pP->ue_context.e_rab[e_rab].xid) {
|
||||
|
||||
if (ue_context_pP->ue_context.e_rab[e_rab].status == E_RAB_STATUS_DONE) {
|
||||
@@ -1352,7 +1353,7 @@ int rrc_eNB_send_S1AP_E_RAB_SETUP_RESP(const protocol_ctxt_t* const ctxt_pP,
|
||||
//S1AP_E_RAB_SETUP_RESP (msg_p).e_rabs[e_rab].eNB_addr.length += 4;
|
||||
ue_context_pP->ue_context.e_rab[e_rab].status = E_RAB_STATUS_ESTABLISHED;
|
||||
|
||||
LOG_I (RRC,"enb_gtp_addr (msg index %d, context index %d, status %d, xid %d): nb_of_e_rabs %d, e_rab_id %d, teid: %u, addr: %d.%d.%d.%d \n ",
|
||||
LOG_I (RRC,"enb_gtp_addr (msg index %d, e_rab index %d, status %d, xid %d): nb_of_e_rabs %d, e_rab_id %d, teid: %u, addr: %d.%d.%d.%d \n ",
|
||||
e_rabs_done, e_rab, ue_context_pP->ue_context.e_rab[e_rab].status, xid,
|
||||
ue_context_pP->ue_context.nb_of_e_rabs,
|
||||
S1AP_E_RAB_SETUP_RESP (msg_p).e_rabs[e_rabs_done].e_rab_id,
|
||||
@@ -1379,7 +1380,7 @@ int rrc_eNB_send_S1AP_E_RAB_SETUP_RESP(const protocol_ctxt_t* const ctxt_pP,
|
||||
// NN: add conditions for e_rabs_failed
|
||||
if ((e_rabs_done > 0) ){
|
||||
|
||||
LOG_I(RRC,"S1AP_E_RAB_SETUP_RESP: sending the message: nb_of_erabs %d, total e_rabs %d, index %d \n",
|
||||
LOG_I(RRC,"S1AP_E_RAB_SETUP_RESP: sending the message: nb_of_erabs %d, total e_rabs %d, index %d\n",
|
||||
ue_context_pP->ue_context.nb_of_e_rabs, ue_context_pP->ue_context.setup_e_rabs, e_rab);
|
||||
MSC_LOG_TX_MESSAGE(
|
||||
MSC_RRC_ENB,
|
||||
@@ -1398,8 +1399,8 @@ int rrc_eNB_send_S1AP_E_RAB_SETUP_RESP(const protocol_ctxt_t* const ctxt_pP,
|
||||
|
||||
} else {
|
||||
/*debug info for the xid */
|
||||
LOG_D (RRC,"xid does not corresponds (context e_rab index %d, status %d, xid %d) \n ",
|
||||
e_rab, ue_context_pP->ue_context.e_rab[e_rab].status, xid);
|
||||
LOG_D(RRC,"xid does not corresponds (context e_rab index %d, status %d, xid %d/%d) \n ",
|
||||
e_rab, ue_context_pP->ue_context.e_rab[e_rab].status, xid, ue_context_pP->ue_context.e_rab[e_rab].xid);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ static int s1ap_eNB_decode_initiating_message(s1ap_message *message,
|
||||
ret = s1ap_decode_s1ap_e_rabreleasecommandies(&message->msg.s1ap_E_RABReleaseCommandIEs,
|
||||
&initiating_p->value);
|
||||
//s1ap_xer_print_s1ap_e_rabsetuprequest(s1ap_xer__print2sp, message_string, message);
|
||||
S1AP_ERROR("TODO E_RABReleas initiating message\n");
|
||||
S1AP_INFO("TODO E_RABRelease nitiating message\n");
|
||||
free(message_string);
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user