Commit 8b2b78e4 authored by Melissa Elkadi's avatar Melissa Elkadi

Fixed remote_addr.sin_port

For some reason the htons invocation got deleted which broke
the VNF P7 interface.

Also fixed some build issues, not sure how these got onto the
develop branch to begin with.
parent 98c8ddb6
/.ue.nvram0
/.ue_emm.nvram0
/.usim.nvram0
/nvram
/usim
.usim.*
.ue_emm.nvram*
.ue.nvram*
......@@ -1029,7 +1029,7 @@ void init_pdcp(void) {
pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_W_MBMS_BIT;
if ( split73!=SPLIT73_DU)
pdcp_module_init(pdcp_initmask);
pdcp_module_init(pdcp_initmask, 0);
if (NODE_IS_CU(RC.rrc[0]->node_type)) {
//pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t)proto_agent_send_rlc_data_req);
......
......@@ -720,7 +720,7 @@ void init_pdcp(void) {
pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT ;
}
pdcp_module_init(pdcp_initmask);
pdcp_module_init(pdcp_initmask, 0);
/*if (NODE_IS_CU(RC.rrc[0]->node_type)) {
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t)proto_agent_send_rlc_data_req);
......
......@@ -150,6 +150,8 @@ int usrp_tx_thread = 0;
int oaisim_flag = 0;
int emulate_rf = 0;
uint16_t ue_idx_standalone = 0xFFFF;
char uecap_xer[1024],uecap_xer_in=0;
/* see file openair2/LAYER2/MAC/main.c for why abstraction_flag is needed
......@@ -447,7 +449,7 @@ void init_pdcp(void) {
}
pdcp_layer_init();
nr_DRB_preconfiguration();*/
pdcp_module_init(pdcp_initmask);
pdcp_module_init(pdcp_initmask, 0);
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t) rlc_data_req);
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) pdcp_data_ind);
LOG_I(PDCP, "Before getting out from init_pdcp() \n");
......
......@@ -331,7 +331,7 @@ static void init_pdcp(void) {
pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT ;
}
pdcp_module_init(pdcp_initmask);
pdcp_module_init(pdcp_initmask, 0);
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t) rlc_data_req);
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) pdcp_data_ind);
}
......
......@@ -48,29 +48,17 @@ void nfapi_set_trace_level(nfapi_trace_level_t new_level)
void nfapi_trace_dbg(nfapi_trace_level_t level, const char *format, ...)
{
char trace_buff[MAX_MSG_LENGTH + TRACE_HEADER_LENGTH];
uint32_t num_chars;
va_list p_args;
struct timeval tv;
pthread_t tid = pthread_self();
(void)gettimeofday(&tv, NULL);
num_chars = (uint32_t)snprintf(trace_buff, TRACE_HEADER_LENGTH, "%04u.%06u: 0x%02x: %10u: ", ((uint32_t)tv.tv_sec) & 0x1FFF, (uint32_t)tv.tv_usec, (uint32_t)level, (uint32_t)tid);
if (num_chars > TRACE_HEADER_LENGTH)
{
printf("trace_dbg: Error, num_chars is too large: %d", num_chars);
return;
}
snprintf(trace_buff, sizeof(trace_buff), "%04u.%06u: 0x%02x: %10u: ", ((uint32_t)tv.tv_sec) & 0x1FFF, (uint32_t)tv.tv_usec, (uint32_t)level, (uint32_t)tid);
int n = strlen(trace_buff);
va_start(p_args, format);
if ((num_chars = (uint32_t)vsnprintf(&trace_buff[num_chars], MAX_MSG_LENGTH, format, p_args)))
{
if (level <= NFAPI_TRACE_WARN)
{
printf("%s", trace_buff);
}
printf("%s", trace_buff);
}
vsnprintf(trace_buff + n, sizeof(trace_buff) - n, format, p_args);
va_end(p_args);
fputs(trace_buff, stdout);
fflush(stdout);
}
......@@ -25,6 +25,7 @@
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <assert.h>
#include <stdio.h>
......@@ -477,14 +478,7 @@ int nfapi_nr_vnf_start(nfapi_vnf_config_t* config)
int nfapi_vnf_start(nfapi_vnf_config_t* config)
{
// Verify that config is not null
if(config == 0)
return -1;
// Make sure to set the defined trace function before using NFAPI_TRACE
if(config->trace)
nfapi_trace_g = (nfapi_trace_fn_t)config->trace;
assert(config != 0);
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s()\n", __FUNCTION__);
int p5ListenSock, p5Sock;
......
......@@ -807,7 +807,7 @@ int nfapi_vnf_p7_add_pnf(nfapi_vnf_p7_config_t* config, const char* pnf_p7_addr,
// save the remote endpoint information
node->remote_addr.sin_family = AF_INET;
node->remote_addr.sin_port = pnf_p7_port;//htons(pnf_p7_port);
node->remote_addr.sin_port = htons(pnf_p7_port);
node->remote_addr.sin_addr.s_addr = inet_addr(pnf_p7_addr);
vnf_p7_connection_info_list_add(vnf_p7, node);
......
......@@ -164,6 +164,7 @@ int main(int argc, char **argv)
int frame=0;
int frame_length_complex_samples;
__attribute__((unused))
int frame_length_complex_samples_no_prefix;
NR_DL_FRAME_PARMS *frame_parms;
......
......@@ -1152,8 +1152,10 @@ int main(int argc, char **argv)
if (n_trials == 1 && round==0) {
#ifdef __AVX2__
__attribute__((unused))
int off = ((nb_rb&1) == 1)? 4:0;
#else
__attribute__((unused))
int off = 0;
#endif
......
......@@ -1018,8 +1018,8 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id,
UE_id,
CC_id,
N_RBG[CC_id],
(uint16_t(*)[NUMBER_OF_UE_MAX])nb_rbs_required,
(uint16_t(*)[NUMBER_OF_UE_MAX])nb_rbs_required_remaining,
nb_rbs_required,
nb_rbs_required_remaining,
rballoc_sub);
temp_total_rbs_count -= ue_sched_ctl->pre_nb_available_rbs[CC_id];
temp_total_ue_count--;
......
......@@ -345,7 +345,7 @@ void pdcp_layer_init(void)
#include "targets/RT/USER/lte-softmodem.h"
#include "openair2/RRC/NAS/nas_config.h"
uint64_t pdcp_module_init(uint64_t _pdcp_optmask)
uint64_t pdcp_module_init(uint64_t _pdcp_optmask, int id)
{
/* hack: be sure to initialize only once */
static pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;
......@@ -378,14 +378,14 @@ uint64_t pdcp_module_init(uint64_t _pdcp_optmask)
if(UE_NAS_USE_TUN) {
int num_if = (NFAPI_MODE == NFAPI_UE_STUB_PNF || IS_SOFTMODEM_SIML1 )? MAX_MOBILES_PER_ENB : 1;
netlink_init_tun("ue",num_if);
netlink_init_tun("ue", num_if, id);
//Add --nr-ip-over-lte option check for next line
if (IS_SOFTMODEM_NOS1)
nas_config(1, 1, 2, "ue");
LOG_I(PDCP, "UE pdcp will use tun interface\n");
start_pdcp_tun_ue();
} else if(ENB_NAS_USE_TUN) {
netlink_init_tun("enb",1);
netlink_init_tun("enb", 1, id);
nas_config(1, 1, 1, "enb");
LOG_I(PDCP, "ENB pdcp will use tun interface\n");
start_pdcp_tun_enb();
......
......@@ -387,7 +387,7 @@ void init_pdcp(void) {
pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT ;
}
pdcp_module_init(pdcp_initmask);
pdcp_module_init(pdcp_initmask, 0);
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t) rlc_data_req);
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) pdcp_data_ind);
......
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