Commit 7b617970 authored by Danil Ruban's avatar Danil Ruban Committed by jperaldi

bugz 123365 adds vt int gNB

parent 058b5aee
......@@ -224,7 +224,8 @@ SSConfig = (
Sys_port = 7777; #Port Number for System Simulator Sys Port
Srb_port = 7778; #Port Number for System Simulator Srb Port
Vng_port = 7779; #Port Number for System Simulator VNG Port
SSMode = 2; #SSMode: 0 - eNB , 1- SYS_PORT test , 2- Only SRB_PORT test
Vtp_port = 7780; #Port Number for System Simulator VTP Port
SSMode = 1; #SSMode: 0 - eNB , 1- SYS_PORT test , 2- Only SRB_PORT test
}
);
......@@ -310,12 +311,12 @@ security = {
{
global_log_level ="info";
pkt_log_level ="info";
# hw_log_level ="info";
# phy_log_level ="info";
# mac_log_level ="info";
# rlc_log_level ="info";
# pdcp_log_level ="info";
# rrc_log_level ="info";
# ngap_log_level ="debug";
hw_log_level ="info";
phy_log_level ="info";
mac_log_level ="info";
rlc_log_level ="info";
pdcp_log_level ="info";
rrc_log_level ="info";
ngap_log_level ="debug";
};
......@@ -2093,6 +2093,7 @@ set(SS_SRC
${OPENAIR3_DIR}/SS/ss_eNB_multicell_helper.c
${OPENAIR3_DIR}/SS/ss_gNB_port_man_task.c
${OPENAIR3_DIR}/SS/ss_gNB_sys_task.c
${OPENAIR3_DIR}/SS/ss_gNB_vtp_task.c
)
file(GLOB ss_sidl ${SIDL_CMPLR}/src/*.c)
file(GLOB ss_acp ${SIDL_DIR}/acp/src/*.c)
......
......@@ -731,10 +731,11 @@ void RCconfig_nr_ssparam(void) {
RC.ss.Sysport = *(SSConfig_ParamList.paramarray[0][GNB_CONFIG_SS_SYSPORT_IDX].iptr);
RC.ss.Srbport = *(SSConfig_ParamList.paramarray[0][GNB_CONFIG_SS_SRBPORT_IDX].iptr);
RC.ss.Vngport = *(SSConfig_ParamList.paramarray[0][GNB_CONFIG_SS_VNGPORT_IDX].iptr);
RC.ss.Vtpport = *(SSConfig_ParamList.paramarray[0][GNB_CONFIG_SS_VTPPORT_IDX].iptr);
RC.ss.mode = *(SSConfig_ParamList.paramarray[0][GNB_CONFIG_SS_MODE_IDX].iptr);
RC.ss.SysportNR = *(SSConfig_ParamList.paramarray[0][GNB_CONFIG_SS_SYSPORT_IDX].iptr);
}
LOG_A(GNB_APP,"SS_Config:SSMode %d, hostIp=%s, Sysport=%d, Srbport=%d Vngport=%d\n",
LOG_W(GNB_APP,"SS_Config:SSMode %d, hostIp=%s, Sysport=%d, Srbport=%d Vngport=%d\n",
RC.ss.mode, RC.ss.hostIp,RC.ss.Sysport,RC.ss.Srbport,RC.ss.Vngport);
}
......
......@@ -237,19 +237,22 @@ typedef enum {
#define GNB_CONFIG_SS_SYSPORT "Sys_port"
#define GNB_CONFIG_SS_SRBPORT "Srb_port"
#define GNB_CONFIG_SS_VNGPORT "Vng_port"
#define GNB_CONFIG_SS_VTPPORT "Vtp_port"
#define GNB_CONFIG_SS_MODE "SSMode"
#define GNB_CONFIG_SS_HOSTIP_IDX 0
#define GNB_CONFIG_SS_SYSPORT_IDX 1
#define GNB_CONFIG_SS_SRBPORT_IDX 2
#define GNB_CONFIG_SS_VNGPORT_IDX 3
#define GNB_CONFIG_SS_MODE_IDX 4
#define GNB_CONFIG_SS_VTPPORT_IDX 4
#define GNB_CONFIG_SS_MODE_IDX 5
#define GNB_SSPARAMS_DESC { \
{GNB_CONFIG_SS_HOSTIP , NULL, 0, uptr:NULL, defstrval:"0.0.0.0", TYPE_STRING, 0}, \
{GNB_CONFIG_SS_SYSPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{GNB_CONFIG_SS_SRBPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{GNB_CONFIG_SS_VNGPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{GNB_CONFIG_SS_VTPPORT , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
{GNB_CONFIG_SS_MODE , NULL, 0, uptr:NULL, defintval:0000, TYPE_UINT, 0}, \
}
......
......@@ -363,7 +363,7 @@ static inline void ss_eNB_read_from_vtp_socket(acpCtx_t ctx)
acpFree(buffer);
}
void *ss_eNB_vtp_process_itti_msg(void *notUsed)
void *ss_gNB_vtp_process_itti_msg(void *notUsed)
{
MessageDef *received_msg = NULL;
int result;
......@@ -381,7 +381,7 @@ void *ss_eNB_vtp_process_itti_msg(void *notUsed)
tinfo.sfn = SS_UPD_TIM_INFO(received_msg).sfn;
LOG_A(ENB_APP, "[VTP] received VTP_UPD_TIM_INFO SFN: %d SF: %d\n", tinfo.sfn, tinfo.sf);
LOG_A(ENB_APP,"[VTP] received VTP_UPD_TIM_INFO SFN: %d SF: %d\n", tinfo.sfn, tinfo.sf);
if (SS_context.vtp_enabled == 1)
// if (SS_context.vtp_enabled == 1)
ss_vtp_send_tinfo(TASK_VTP, &tinfo);
}
break;
......@@ -425,11 +425,8 @@ int ss_eNB_vtp_init(void)
acpConvertIp(hostIp, &ipaddr);
// Port number
int port = RC.ss.Vtpport;
if (port != 7780)
{
return -1;
}
int port = RC.ss.Vtpport ? RC.ss.Vtpport : 7780;
LOG_A(ENB_APP, "[SS-VTP] Initializing VTP Port %s:%d\n", hostIp, port);
// acpInit(malloc, free, 1000);
const struct acpMsgTable msgTable[] = {
......@@ -468,7 +465,7 @@ static void ss_eNB_wait_first_msg(void)
while (1)
{
int ret = acpRecvMsg(ctx_vtp_g, &msg_sz, buffer);
if (ret == MSG_SysVTEnquireTimingAck_userId)
if (ret == MSG_SysVTEnquireTimingAck_userId || ret == -ACP_PEER_CONNECTED)
{
LOG_A(ENB_APP, "[SS_VTP] First VT-ACK From Client Received (on-start) \n");
break;
......@@ -477,7 +474,7 @@ static void ss_eNB_wait_first_msg(void)
}
}
//------------------------------------------------------------------------------
void* ss_eNB_vtp_task(void *arg) {
void* ss_gNB_vtp_task(void *arg) {
vtp_udpSockReq_t req;
req.address = vtp_local_address;
req.port = vtp_proxy_recv_port;
......@@ -489,12 +486,12 @@ void* ss_eNB_vtp_task(void *arg) {
ss_eNB_wait_first_msg();
SS_context.vtp_enabled = 1;
// SS_context.vtp_enabled = 1;
RC.ss.vtp_ready = 1;
ss_enable_vtp();
sleep(1);
while (1) {
(void) ss_eNB_vtp_process_itti_msg(NULL);
(void) ss_gNB_vtp_process_itti_msg(NULL);
}
} else {
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#ifndef SS_GNB_VTP_TASK_H_
#define SS_GNB_VTP_TASK_H_
void *ss_gNB_vtp_process_itti_msg(void *);
void *ss_gNB_vtp_task(void *arg);
typedef enum VtpProxyCmd
{
Vtp_Invalid_Resp = 0,
VTP_ENABLE_proxy = 1,
VTP_UPDATE_proxy,
VTP_ACK_proxy
} VtpProxyCmd_e;
typedef struct vtp_udpSockReq_s
{
uint32_t port;
char *address;
} vtp_udpSockReq_t;
#endif /* SS_GNB_VNG_TASK_H_ */
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