Commit 8c74bd92 authored by jperaldi's avatar jperaldi

1) Following Anton's request with new SIDL interface: ACP_PEER_DISCONNECTED &...

1) Following Anton's request with new SIDL interface: ACP_PEER_DISCONNECTED & ACP_PEER_CONNECTED shall not be considered as ERROR. Port manager source ode updated
2) I shall embedd Yangxiong work on lttng. These devs cause NR to not compile, because lttng ust lib is not embedded: SOLVED
3) for the first time 8.1.1.2 (DRB) is fully PASSED: need to go deeper
parent ad6fd431
...@@ -203,6 +203,12 @@ ss_eNB_read_from_drb_socket(acpCtx_t ctx){ ...@@ -203,6 +203,12 @@ ss_eNB_read_from_drb_socket(acpCtx_t ctx){
SidlStatus sidlStatus = -1; SidlStatus sidlStatus = -1;
acpGetMsgSidlStatus(msgSize, buffer, &sidlStatus); acpGetMsgSidlStatus(msgSize, buffer, &sidlStatus);
} }
else if (userId == -ACP_PEER_DISCONNECTED){
LOG_A(GNB_APP, "[SS_SRB] Peer ordered shutdown\n");
}
else if (userId == -ACP_PEER_CONNECTED){
LOG_A(GNB_APP, "[SS_SRB] Peer connection established\n");
}
else else
{ {
LOG_A(ENB_APP, "[SS_DRB] Invalid userId: %d \n", userId); LOG_A(ENB_APP, "[SS_DRB] Invalid userId: %d \n", userId);
......
...@@ -348,6 +348,12 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx) ...@@ -348,6 +348,12 @@ static inline void ss_eNB_read_from_socket(acpCtx_t ctx)
SidlStatus sidlStatus = -1; SidlStatus sidlStatus = -1;
acpGetMsgSidlStatus(msgSize, buffer, &sidlStatus); acpGetMsgSidlStatus(msgSize, buffer, &sidlStatus);
} }
else if (userId == -ACP_PEER_DISCONNECTED){
LOG_A(GNB_APP, "[SS_SRB] Peer ordered shutdown\n");
}
else if (userId == -ACP_PEER_CONNECTED){
LOG_A(GNB_APP, "[SS_SRB] Peer connection established\n");
}
else else
{ {
return; return;
......
...@@ -296,6 +296,7 @@ static void ss_task_handle_rrc_pdu_req(struct EUTRA_RRC_PDU_REQ *req) ...@@ -296,6 +296,7 @@ static void ss_task_handle_rrc_pdu_req(struct EUTRA_RRC_PDU_REQ *req)
* newState: No impack on the State * newState: No impack on the State
* *
*/ */
static bool isConnected = false;
static inline void static inline void
ss_eNB_read_from_srb_socket(acpCtx_t ctx) ss_eNB_read_from_srb_socket(acpCtx_t ctx)
{ {
...@@ -320,6 +321,14 @@ ss_eNB_read_from_srb_socket(acpCtx_t ctx) ...@@ -320,6 +321,14 @@ ss_eNB_read_from_srb_socket(acpCtx_t ctx)
// this error should not appear on server side for the messages received from clients // this error should not appear on server side for the messages received from clients
SidlStatus sidlStatus = -1; SidlStatus sidlStatus = -1;
acpGetMsgSidlStatus(msgSize, buffer, &sidlStatus); acpGetMsgSidlStatus(msgSize, buffer, &sidlStatus);
}
else if (userId == -ACP_PEER_DISCONNECTED){
LOG_A(GNB_APP, "[SS_SRB] Peer ordered shutdown\n");
isConnected = false;
}
else if (userId == -ACP_PEER_CONNECTED){
LOG_A(GNB_APP, "[SS_SRB] Peer connection established\n");
isConnected = true;
} }
else else
{ {
...@@ -331,8 +340,10 @@ ss_eNB_read_from_srb_socket(acpCtx_t ctx) ...@@ -331,8 +340,10 @@ ss_eNB_read_from_srb_socket(acpCtx_t ctx)
if (userId == 0) if (userId == 0)
{ {
// No message (timeout on socket) // No message (timeout on socket)
if (isConnected == true){
break; break;
} }
}
else if (MSG_SysSrbProcessFromSS_userId == userId) else if (MSG_SysSrbProcessFromSS_userId == userId)
{ {
struct EUTRA_RRC_PDU_REQ *req = NULL; struct EUTRA_RRC_PDU_REQ *req = NULL;
......
...@@ -172,6 +172,12 @@ ss_eNB_read_from_vng_socket(acpCtx_t ctx) ...@@ -172,6 +172,12 @@ ss_eNB_read_from_vng_socket(acpCtx_t ctx)
SidlStatus sidlStatus = -1; SidlStatus sidlStatus = -1;
acpGetMsgSidlStatus(msgSize, buffer, &sidlStatus); acpGetMsgSidlStatus(msgSize, buffer, &sidlStatus);
} }
else if (userId == -ACP_PEER_DISCONNECTED){
LOG_A(GNB_APP, "[SS_SRB] Peer ordered shutdown\n");
}
else if (userId == -ACP_PEER_CONNECTED){
LOG_A(GNB_APP, "[SS_SRB] Peer connection established\n");
}
else else
{ {
LOG_A(ENB_SS, "[SS-VNG] Invalid userId: %d \n", userId); LOG_A(ENB_SS, "[SS-VNG] Invalid userId: %d \n", userId);
......
...@@ -291,6 +291,12 @@ static inline void ss_eNB_read_from_vtp_socket(acpCtx_t ctx) ...@@ -291,6 +291,12 @@ static inline void ss_eNB_read_from_vtp_socket(acpCtx_t ctx)
// this error should not appear on server side for the messages received from clients // this error should not appear on server side for the messages received from clients
SidlStatus sidlStatus = -1; SidlStatus sidlStatus = -1;
acpGetMsgSidlStatus(msgSize, buffer, &sidlStatus); acpGetMsgSidlStatus(msgSize, buffer, &sidlStatus);
}
else if (userId == -ACP_PEER_DISCONNECTED){
LOG_A(GNB_APP, "[SS_SRB] Peer ordered shutdown\n");
}
else if (userId == -ACP_PEER_CONNECTED){
LOG_A(GNB_APP, "[SS_SRB] Peer connection established\n");
} }
// else // else
// { // {
......
...@@ -63,9 +63,7 @@ uint16_t ss_rnti_g = 0; ...@@ -63,9 +63,7 @@ uint16_t ss_rnti_g = 0;
typedef enum { typedef enum {
// user defined IDs should be an int number >= 1 // user defined IDs should be an int number >= 1
MSG_TestHelloFromSS_userId = 1, MSG_NrSysSrbProcessFromSS_userId = 1,
/* MSG_SysProcess_userId, */
MSG_NrSysSrbProcessFromSS_userId,
MSG_NrSysSrbProcessToSS_userId, MSG_NrSysSrbProcessToSS_userId,
} MSG_userId; } MSG_userId;
...@@ -232,6 +230,8 @@ static void ss_task_handle_rrc_pdu_req(struct NR_RRC_PDU_REQ *req) ...@@ -232,6 +230,8 @@ static void ss_task_handle_rrc_pdu_req(struct NR_RRC_PDU_REQ *req)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
static bool isConnected = false;
static inline void static inline void
ss_gNB_read_from_srb_socket(acpCtx_t ctx) ss_gNB_read_from_srb_socket(acpCtx_t ctx)
{ {
...@@ -256,6 +256,13 @@ ss_gNB_read_from_srb_socket(acpCtx_t ctx) ...@@ -256,6 +256,13 @@ ss_gNB_read_from_srb_socket(acpCtx_t ctx)
// this error should not appear on server side for the messages received from clients // this error should not appear on server side for the messages received from clients
SidlStatus sidlStatus = -1; SidlStatus sidlStatus = -1;
acpGetMsgSidlStatus(msgSize, buffer, &sidlStatus); acpGetMsgSidlStatus(msgSize, buffer, &sidlStatus);
} else if (userId == -ACP_PEER_DISCONNECTED){
LOG_A(GNB_APP, "[SS_SRB] Peer ordered shutdown\n");
isConnected = false;
}
else if (userId == -ACP_PEER_CONNECTED){
LOG_A(GNB_APP, "[SS_SRB] Peer connection established\n");
isConnected = true;
} }
else else
{ {
...@@ -263,12 +270,14 @@ ss_gNB_read_from_srb_socket(acpCtx_t ctx) ...@@ -263,12 +270,14 @@ ss_gNB_read_from_srb_socket(acpCtx_t ctx)
break; break;
} }
} }
if (userId == 0) if (userId == 0)
{ {
LOG_A(GNB_APP, "[SS_SRB] No message (timeout on socket\n)");
// No message (timeout on socket) // No message (timeout on socket)
if (isConnected == true){
break; break;
} }
}
else if (MSG_NrSysSrbProcessFromSS_userId == userId) else if (MSG_NrSysSrbProcessFromSS_userId == userId)
{ {
struct NR_RRC_PDU_REQ *req = NULL; struct NR_RRC_PDU_REQ *req = NULL;
...@@ -296,11 +305,6 @@ ss_gNB_read_from_srb_socket(acpCtx_t ctx) ...@@ -296,11 +305,6 @@ ss_gNB_read_from_srb_socket(acpCtx_t ctx)
LOG_A(GNB_APP, "[SS_SRB][NR_RRC_PDU_IND] NR_RRC_PDU_IND Received; ignoring \n"); LOG_A(GNB_APP, "[SS_SRB][NR_RRC_PDU_IND] NR_RRC_PDU_IND Received; ignoring \n");
break; break;
} }
else if (userId == MSG_TestHelloFromSS_userId)
{
LOG_A(GNB_APP, "[SS_SRB] Hello From Client Received \n");
break;
}
} }
} }
...@@ -323,7 +327,6 @@ void ss_gNB_srb_init(void) ...@@ -323,7 +327,6 @@ void ss_gNB_srb_init(void)
const struct acpMsgTable msgTable[] = { const struct acpMsgTable msgTable[] = {
{ "NrSysSrbProcessFromSS", MSG_NrSysSrbProcessFromSS_userId }, { "NrSysSrbProcessFromSS", MSG_NrSysSrbProcessFromSS_userId },
{ "NrSysSrbProcessToSS", MSG_NrSysSrbProcessToSS_userId }, { "NrSysSrbProcessToSS", MSG_NrSysSrbProcessToSS_userId },
{ "TestHelloFromSS", MSG_TestHelloFromSS_userId },
/* { "SysProcess", MSG_SysProcess_userId }, */ /* { "SysProcess", MSG_SysProcess_userId }, */
// The last element should be NULL // The last element should be NULL
{ NULL, 0 } { NULL, 0 }
...@@ -410,25 +413,9 @@ void *ss_gNB_srb_process_itti_msg(void *notUsed) ...@@ -410,25 +413,9 @@ void *ss_gNB_srb_process_itti_msg(void *notUsed)
return NULL; return NULL;
} }
static void ss_gNB_wait_hello(void)
{
while (1)
{
size_t msg_sz = size;
int ret = acpRecvMsg(ctx_srb_g, &msg_sz, buffer);
if (ret == MSG_TestHelloFromSS_userId)
{
LOG_A(GNB_APP, "[SS_SRB] Hello From Client Received (on-start) \n");
break;
}
}
}
void *ss_gNB_srb_task(void *arg) void *ss_gNB_srb_task(void *arg)
{ {
ss_gNB_srb_init(); ss_gNB_srb_init();
ss_gNB_wait_hello();
while (1) while (1)
{ {
......
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