Commit d91dd9ad authored by Danil Ruban's avatar Danil Ruban Committed by jperaldi

bugz #123365 VT for NR

parent 7b617970
...@@ -83,6 +83,8 @@ unsigned short config_frames[4] = {2,9,11,13}; ...@@ -83,6 +83,8 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "ss_gNB_sys_task.h" #include "ss_gNB_sys_task.h"
#include "ss_gNB_port_man_task.h" #include "ss_gNB_port_man_task.h"
#include "ss_gNB_srb_task.h" #include "ss_gNB_srb_task.h"
#include "ss_gNB_vtp_task.h"
pthread_cond_t nfapi_sync_cond; pthread_cond_t nfapi_sync_cond;
pthread_mutex_t nfapi_sync_mutex; pthread_mutex_t nfapi_sync_mutex;
...@@ -370,10 +372,16 @@ int create_gNB_tasks(uint32_t gnb_nb) { ...@@ -370,10 +372,16 @@ int create_gNB_tasks(uint32_t gnb_nb) {
} }
} }
if(itti_create_task(TASK_SS_SRB, ss_gNB_srb_task, NULL) < 0) { if(itti_create_task(TASK_SS_SRB, ss_gNB_srb_task, NULL) < 0) {
LOG_E(SCTP, "Create task for SS SRB failed\n"); LOG_E(SCTP, "Create task for SS SRB failed\n");
return -1; return -1;
} }
if(itti_create_task(TASK_SS_SRB, ss_gNB_vtp_task, NULL) < 0) {
LOG_E(SCTP, "Create task for SS SRB failed\n");
return -1;
}
LOG_I(NR_RRC,"Creating NR RRC gNB Task\n"); LOG_I(NR_RRC,"Creating NR RRC gNB Task\n");
if (itti_create_task (TASK_RRC_GNB, rrc_gnb_task, NULL) < 0) { if (itti_create_task (TASK_RRC_GNB, rrc_gnb_task, NULL) < 0) {
......
...@@ -95,6 +95,8 @@ typedef struct ss_set_timinfo_s { ...@@ -95,6 +95,8 @@ typedef struct ss_set_timinfo_s {
uint8_t sf; uint8_t sf;
int cell_index; int cell_index;
int physCellId; int physCellId;
int8_t mu; /**< -1 == 'UNBOUND' */
uint8_t slot;
} ss_set_timinfo_t; } ss_set_timinfo_t;
typedef ss_set_timinfo_t ss_upd_timinfo_t; typedef ss_set_timinfo_t ss_upd_timinfo_t;
......
...@@ -61,10 +61,14 @@ ...@@ -61,10 +61,14 @@
extern RAN_CONTEXT_t RC; extern RAN_CONTEXT_t RC;
extern uint32_t from_earfcn(int eutra_bandP, uint32_t dl_earfcn); extern uint32_t from_earfcn(int eutra_bandP, uint32_t dl_earfcn);
#ifndef NR_RRC_VERSION
extern pthread_cond_t cell_config_done_cond; extern pthread_cond_t cell_config_done_cond;
extern pthread_mutex_t cell_config_done_mutex; extern pthread_mutex_t cell_config_done_mutex;
extern int cell_config_done; extern int cell_config_done;
//extern uint16_t ss_rnti_g; //extern uint16_t ss_rnti_g;
#endif
static void sys_send_proxy(void *msg, int msgLen); static void sys_send_proxy(void *msg, int msgLen);
int cell_config_done_indication(void); int cell_config_done_indication(void);
static uint16_t paging_ue_index_g = 0; static uint16_t paging_ue_index_g = 0;
...@@ -167,7 +171,7 @@ static void bitStrint_to_byteArray(unsigned char arr[], int bit_length, unsigned ...@@ -167,7 +171,7 @@ static void bitStrint_to_byteArray(unsigned char arr[], int bit_length, unsigned
*/ */
int cell_config_done_indication() int cell_config_done_indication()
{ {
#ifndef NR_RRC_VERSION
if (cell_config_done < 0) if (cell_config_done < 0)
{ {
printf("[SYS] Signal to OAI main code about cell config\n"); printf("[SYS] Signal to OAI main code about cell config\n");
...@@ -178,6 +182,7 @@ int cell_config_done_indication() ...@@ -178,6 +182,7 @@ int cell_config_done_indication()
} }
return 0; return 0;
#endif
} }
/* /*
......
...@@ -427,14 +427,14 @@ int ss_eNB_vtp_init(void) ...@@ -427,14 +427,14 @@ int ss_eNB_vtp_init(void)
IpAddress_t ipaddr; IpAddress_t ipaddr;
const char *hostIp; const char *hostIp;
hostIp = RC.ss.hostIp; hostIp = RC.ss.hostIp ? RC.ss.hostIp : "127.0.0.1";
acpConvertIp(hostIp, &ipaddr); acpConvertIp(hostIp, &ipaddr);
// Port number // Port number
int port = RC.ss.Vtpport; int port = RC.ss.Vtpport;
if (port != 7780) if (port == 0)
{ {
return -1; port = 7780;
} }
LOG_A(ENB_APP, "[SS-VTP] Initializing VTP Port %s:%d\n", hostIp, port); LOG_A(ENB_APP, "[SS-VTP] Initializing VTP Port %s:%d\n", hostIp, port);
// acpInit(malloc, free, 1000); // acpInit(malloc, free, 1000);
......
...@@ -37,6 +37,8 @@ typedef struct SSConfigContext_s { ...@@ -37,6 +37,8 @@ typedef struct SSConfigContext_s {
uint16_t eutra_cellId; uint16_t eutra_cellId;
uint16_t nr_cellId; uint16_t nr_cellId;
uint16_t ss_rnti_g; uint16_t ss_rnti_g;
uint8_t vtp_enabled;
ss_set_timinfo_t vtinfo;
/** TODO: To add more */ /** TODO: To add more */
} SSConfigContext_t; } SSConfigContext_t;
......
This diff is collapsed.
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#ifndef SS_GNB_VTP_TASK_H_ #ifndef SS_GNB_VTP_TASK_H_
#define SS_GNB_VTP_TASK_H_ #define SS_GNB_VTP_TASK_H_
void *ss_gNB_vtp_process_itti_msg(void *); uint8_t ss_gNB_vtp_process_itti_msg(void);
void *ss_gNB_vtp_task(void *arg); void *ss_gNB_vtp_task(void *arg);
typedef enum VtpProxyCmd typedef enum VtpProxyCmd
......
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