fix ue nr gw initialization

master
Francisco Paisana 5 years ago
parent 421d5f3852
commit a0606669e2

@ -60,7 +60,7 @@ void parse_args(pnf_args_t* args, int argc, char* argv[])
("vnf.ue_port", bpo::value<uint16_t>(&args->ue_vnf_port)->default_value(3334), "UE VNF port")
("sf_interval", bpo::value<uint32_t>(&args->sf_interval)->default_value(1000), "Interval between subframes in us")
("num_sf", bpo::value<int32_t>(&args->num_sf)->default_value(-1), "Number of subframes to signal (-1 infinity)")
("tb_len", bpo::value<uint32_t>(&args->tb_len)->default_value(0), "TB lenth (0 for random size)");
("tb_len", bpo::value<uint32_t>(&args->tb_len)->default_value(1600), "TB lenth (0 for random size)");
// clang-format on
// these options are allowed on the command line

@ -145,7 +145,7 @@ void mac_nr::tb_decoded(const uint32_t cc_idx, mac_nr_grant_dl_t& grant)
}
}
stack->defer_task([this]() { process_pdus(); });
stack_task_dispatch_queue.push([this]() { process_pdus(); });
}
}

@ -30,7 +30,7 @@ ue_stack_nr::ue_stack_nr(srslte::logger* logger_) :
logger(logger_),
timers(64),
thread("STACK"),
pending_tasks(1024),
pending_tasks(64),
background_tasks(2),
rlc_log("RLC"),
pdcp_log("PDCP"),
@ -100,16 +100,6 @@ int ue_stack_nr::init(const stack_args_t& args_)
rrc_args.coreless.ip_addr = "192.168.1.3";
rrc->init(phy, mac.get(), rlc.get(), pdcp.get(), gw, &timers, this, rrc_args);
// statically setup TUN (will be done through RRC later)
char* err_str = nullptr;
if (gw->setup_if_addr(rrc_args.coreless.drb_lcid,
LIBLTE_MME_PDN_TYPE_IPV4,
htonl(inet_addr(rrc_args.coreless.ip_addr.c_str())),
nullptr,
err_str)) {
printf("Error configuring TUN interface\n");
}
running = true;
start(STACK_MAIN_THREAD_PRIO);
@ -141,6 +131,11 @@ void ue_stack_nr::stop_impl()
bool ue_stack_nr::switch_on()
{
// statically setup TUN (will be done through RRC later)
char* err_str = nullptr;
if (gw->setup_if_addr(4, LIBLTE_MME_PDN_TYPE_IPV4, htonl(inet_addr("192.168.1.3")), nullptr, err_str)) {
printf("Error configuring TUN interface\n");
}
return true;
}

Loading…
Cancel
Save