Commit dee35c3e authored by Vijay C's avatar Vijay C

Merge branch 'Issue_161_Changes' into '3GPP_TTCN_System_Simulator'

5G SRB acpinit changes and 5G SRB task name modify

See merge request firecell/rdsubscription/sequansrd!173
parents 851dcbd2 bd533a22
...@@ -334,6 +334,7 @@ void *rrc_enb_process_msg(void *); ...@@ -334,6 +334,7 @@ void *rrc_enb_process_msg(void *);
TASK_DEF(TASK_SS_SYSIND_ACP, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_SS_SYSIND_ACP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SS_SRB, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_SS_SRB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SS_SRB_ACP, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_SS_SRB_ACP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SS_SRB_GNB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_VNG, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_VNG, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_VTP, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_VTP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SS_DRB, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_SS_DRB, TASK_PRIORITY_MED, 200, NULL, NULL) \
......
...@@ -378,8 +378,8 @@ int create_gNB_tasks(uint32_t gnb_nb) { ...@@ -378,8 +378,8 @@ int create_gNB_tasks(uint32_t gnb_nb) {
return -1; return -1;
} }
if(itti_create_task(TASK_SS_SRB, ss_gNB_srb_task, NULL) < 0) { if(itti_create_task(TASK_SS_SRB_GNB, ss_gNB_srb_task, NULL) < 0) {
LOG_E(SCTP, "Create task for SS SRB failed\n"); LOG_E(SCTP, "Create task for SS SRB GNB failed\n");
return -1; return -1;
} }
......
...@@ -780,8 +780,8 @@ static void deliver_sdu_srb(void *_ue, nr_pdcp_entity_t *entity, ...@@ -780,8 +780,8 @@ static void deliver_sdu_srb(void *_ue, nr_pdcp_entity_t *entity,
srb_found: srb_found:
{ {
LOG_I(PDCP,"PDCP Sending DCCH_PDU_IND/SS_NRRRC_PDU_IND (msg_Id:%d) to TASK_SS_SRB \n", SS_NRRRC_PDU_IND); LOG_I(PDCP,"PDCP Sending DCCH_PDU_IND/SS_NRRRC_PDU_IND (msg_Id:%d) to TASK_SS_SRB_GNB \n", SS_NRRRC_PDU_IND);
MessageDef *message_p = itti_alloc_new_message (TASK_SS_SRB, 0, SS_NRRRC_PDU_IND); MessageDef *message_p = itti_alloc_new_message (TASK_SS_SRB_GNB, 0, SS_NRRRC_PDU_IND);
if (message_p) { if (message_p) {
/* Populate the message and send to SS */ /* Populate the message and send to SS */
SS_NRRRC_PDU_IND (message_p).sdu_size = size; SS_NRRRC_PDU_IND (message_p).sdu_size = size;
...@@ -792,9 +792,9 @@ static void deliver_sdu_srb(void *_ue, nr_pdcp_entity_t *entity, ...@@ -792,9 +792,9 @@ static void deliver_sdu_srb(void *_ue, nr_pdcp_entity_t *entity,
memset (SS_NRRRC_PDU_IND (message_p).sdu, 0, SDU_SIZE); memset (SS_NRRRC_PDU_IND (message_p).sdu, 0, SDU_SIZE);
memcpy (SS_NRRRC_PDU_IND (message_p).sdu, buf, size); memcpy (SS_NRRRC_PDU_IND (message_p).sdu, buf, size);
int send_res = itti_send_msg_to_task (TASK_SS_SRB, 0, message_p); int send_res = itti_send_msg_to_task (TASK_SS_SRB_GNB, 0, message_p);
if(send_res < 0) { if(send_res < 0) {
LOG_E(PDCP,"Error in sending DCCH_PDU_IND/SS_NRRRC_PDU_IND(msg_Id:%d) to TASK_SS_SRB\n", SS_NRRRC_PDU_IND); LOG_E(PDCP,"Error in sending DCCH_PDU_IND/SS_NRRRC_PDU_IND(msg_Id:%d) to TASK_SS_SRB_GNB\n", SS_NRRRC_PDU_IND);
} }
} }
} }
......
...@@ -353,9 +353,9 @@ int8_t nr_mac_rrc_data_ind(const module_id_t module_idP, ...@@ -353,9 +353,9 @@ int8_t nr_mac_rrc_data_ind(const module_id_t module_idP,
LOG_D(NR_RRC, "[gNB %d] Received SDU for CCCH on SRB %ld\n", module_idP, srb_idP); LOG_D(NR_RRC, "[gNB %d] Received SDU for CCCH on SRB %ld\n", module_idP, srb_idP);
ctxt.brOption = brOption; ctxt.brOption = brOption;
if (sdu_lenP > 0) { if (sdu_lenP > 0) {
LOG_I(NR_RRC,"NRRRC Sending CCCH_PDU_IND/SS_NRRRC_PDU_IND to TASK_SS_SRB (msg_Id:%d) [SFN: %d, SF: %d] \n", LOG_I(NR_RRC,"NRRRC Sending CCCH_PDU_IND/SS_NRRRC_PDU_IND to TASK_SS_SRB_GNB (msg_Id:%d) [SFN: %d, SF: %d] \n",
SS_NRRRC_PDU_IND, ctxt.frame, ctxt.subframe); SS_NRRRC_PDU_IND, ctxt.frame, ctxt.subframe);
MessageDef *message_p = itti_alloc_new_message (TASK_SS_SRB, INSTANCE_DEFAULT, SS_NRRRC_PDU_IND); MessageDef *message_p = itti_alloc_new_message (TASK_SS_SRB_GNB, INSTANCE_DEFAULT, SS_NRRRC_PDU_IND);
if (message_p) { if (message_p) {
/* Populate the message to SS */ /* Populate the message to SS */
SS_NRRRC_PDU_IND (message_p).sdu_size = sdu_lenP; SS_NRRRC_PDU_IND (message_p).sdu_size = sdu_lenP;
...@@ -366,9 +366,9 @@ int8_t nr_mac_rrc_data_ind(const module_id_t module_idP, ...@@ -366,9 +366,9 @@ int8_t nr_mac_rrc_data_ind(const module_id_t module_idP,
memset (SS_NRRRC_PDU_IND (message_p).sdu, 0, SDU_SIZE); memset (SS_NRRRC_PDU_IND (message_p).sdu, 0, SDU_SIZE);
memcpy (SS_NRRRC_PDU_IND (message_p).sdu, sduP, sdu_lenP); memcpy (SS_NRRRC_PDU_IND (message_p).sdu, sduP, sdu_lenP);
int send_res = itti_send_msg_to_task (TASK_SS_SRB, INSTANCE_DEFAULT, message_p); int send_res = itti_send_msg_to_task (TASK_SS_SRB_GNB, INSTANCE_DEFAULT, message_p);
if(send_res < 0) { if(send_res < 0) {
LOG_E(RRC,"Error in sending CCCH_PDU_IND/SS_NRRRC_PDU_IND to TASK_SS_SRB (msg_Id:%d) to TASK_SS_SRB\n", SS_NRRRC_PDU_IND); LOG_E(RRC,"Error in sending CCCH_PDU_IND/SS_NRRRC_PDU_IND to TASK_SS_SRB_GNB (msg_Id:%d) to TASK_SS_SRB_GNB\n", SS_NRRRC_PDU_IND);
} }
} }
nr_rrc_gNB_decode_ccch(&ctxt, sduP, sdu_lenP, NULL, CC_id); nr_rrc_gNB_decode_ccch(&ctxt, sduP, sdu_lenP, NULL, CC_id);
......
...@@ -279,7 +279,7 @@ static inline void ss_gNB_read_from_socket(acpCtx_t ctx) ...@@ -279,7 +279,7 @@ static inline void ss_gNB_read_from_socket(acpCtx_t ctx)
// No message (timeout on socket) // No message (timeout on socket)
if (RC.ss.mode >= SS_SOFTMODEM && RC.ss.State >= SS_STATE_CELL_ACTIVE) if (RC.ss.mode >= SS_SOFTMODEM && RC.ss.State >= SS_STATE_CELL_ACTIVE)
{ {
LOG_A(ENB_SS,"[SS-PORTMAN] Sending Wake up signal/SS_RRC_PDU_IND (msg_Id:%d) to TASK_SS_SRB task \n", SS_NRRRC_PDU_IND); LOG_A(ENB_SS,"[SS-PORTMAN] Sending Wake up signal/SS_RRC_PDU_IND (msg_Id:%d) to TASK_SS_SRB_GNB task \n", SS_NRRRC_PDU_IND);
MessageDef *message_p = itti_alloc_new_message(TASK_SS_PORTMAN, 0, SS_RRC_PDU_IND); MessageDef *message_p = itti_alloc_new_message(TASK_SS_PORTMAN, 0, SS_RRC_PDU_IND);
if (message_p) if (message_p)
{ {
...@@ -290,10 +290,10 @@ static inline void ss_gNB_read_from_socket(acpCtx_t ctx) ...@@ -290,10 +290,10 @@ static inline void ss_gNB_read_from_socket(acpCtx_t ctx)
SS_NRRRC_PDU_IND(message_p).frame = -1; SS_NRRRC_PDU_IND(message_p).frame = -1;
SS_NRRRC_PDU_IND(message_p).subframe = -1; SS_NRRRC_PDU_IND(message_p).subframe = -1;
int send_res = itti_send_msg_to_task(TASK_SS_SRB, 0, message_p); int send_res = itti_send_msg_to_task(TASK_SS_SRB_GNB, 0, message_p);
if (send_res < 0) if (send_res < 0)
{ {
LOG_A(ENB_SS, "Error in sending Wake up signal /SS_NRRRC_PDU_IND (msg_Id:%d) to TASK_SS_SRB\n", SS_NRRRC_PDU_IND); LOG_A(ENB_SS, "Error in sending Wake up signal /SS_NRRRC_PDU_IND (msg_Id:%d) to TASK_SS_SRB_GNB\n", SS_NRRRC_PDU_IND);
} }
} }
} }
......
...@@ -336,7 +336,10 @@ void ss_gNB_srb_init(void) ...@@ -336,7 +336,10 @@ void ss_gNB_srb_init(void)
// Port number // Port number
int port = RC.ss.Srbport; int port = RC.ss.Srbport;
if (RC.ss.mode == SS_SOFTMODEM_SRB)
{
acpInit(malloc, free, 1000); acpInit(malloc, free, 1000);
}
// Register user services/notifications in message table // Register user services/notifications in message table
const struct acpMsgTable msgTable[] = { const struct acpMsgTable msgTable[] = {
...@@ -368,8 +371,8 @@ void ss_gNB_srb_init(void) ...@@ -368,8 +371,8 @@ void ss_gNB_srb_init(void)
{ {
SS_context.State = SS_STATE_CELL_ACTIVE; SS_context.State = SS_STATE_CELL_ACTIVE;
} }
itti_subscribe_event_fd(TASK_SS_SRB, fd1); itti_subscribe_event_fd(TASK_SS_SRB_GNB, fd1);
itti_mark_task_ready(TASK_SS_SRB); itti_mark_task_ready(TASK_SS_SRB_GNB);
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
...@@ -378,7 +381,7 @@ void *ss_gNB_srb_process_itti_msg(void *notUsed) ...@@ -378,7 +381,7 @@ void *ss_gNB_srb_process_itti_msg(void *notUsed)
MessageDef *received_msg = NULL; MessageDef *received_msg = NULL;
int result = 0; int result = 0;
itti_receive_msg(TASK_SS_SRB, &received_msg); itti_receive_msg(TASK_SS_SRB_GNB, &received_msg);
/* Check if there is a packet to handle */ /* Check if there is a packet to handle */
if (received_msg != NULL) if (received_msg != NULL)
......
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