Commit b6fdbecb authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

remove Bupt-upf test option

parent ccb080e2
......@@ -18,6 +18,7 @@
# For more information about the OpenAirInterface (OAI) Software Alliance:
# contact@openairinterface.org
################################################################################
SMF =
{
INSTANCE = @INSTANCE@; # 0 is the default
......@@ -40,14 +41,7 @@ SMF =
IPV4_ADDRESS = "read";
PORT = @SMF_INTERFACE_PORT_FOR_SBI@; #Normally we don't need this (default port 80)
HTTP2_PORT = @SMF_INTERFACE_HTTP2_PORT_FOR_SBI@;
};
TEST_UPF : #for BUPT test only!
{
# P-GW binded interface for SX communication
IS_TEST = "0"; # 0: no test,1:test
GNB_IPV4_ADDRESS = "192.168.20.136"; # STRING,gnb_ip
};
};
};
......
......@@ -231,22 +231,6 @@ int smf_config::load_interface(const Setting &if_cfg, interface_cfg_t &cfg) {
return RETURNok ;
}
//------------------------------------------------------------------------------
int smf_config::load_upf_config(const Setting &if_cfg, test_upf_cfg_t &cfg) {
std::string is_test = { };
if_cfg.lookupValue(SMF_CONFIG_STRING_TEST_UPF_IS_TEST, is_test);
util::trim(is_test);
if (not boost::iequals(is_test, "none")) {
cfg.is_test = atoi(is_test.c_str());
std::string address = { };
if_cfg.lookupValue(SMF_CONFIG_STRING_TEST_UPF_GNB_IPV4_ADDRESS, address);
util::trim(address);
inet_aton(address.c_str(), &cfg.gnb_addr4);
}
return RETURNok ;
}
//------------------------------------------------------------------------------
int smf_config::load(const string &config_file) {
Config cfg;
......@@ -775,13 +759,6 @@ void smf_config::display() {
inet_ntoa(*((struct in_addr*) &udm_addr.ipv4_addr)));
Logger::smf_app().info(" UDM Port ..........: %lu ", udm_addr.port);
Logger::smf_app().info("- UPF support (test upf)");
Logger::smf_app().info(" UPF is test ..........: %lu ",
test_upf_cfg.is_test);
Logger::smf_app().info(
" Gnb Address ..........: %s",
inet_ntoa(*((struct in_addr*) &test_upf_cfg.gnb_addr4)));
if (local_configuration) {
Logger::smf_app().info(
"- " SMF_CONFIG_STRING_SESSION_MANAGEMENT_SUBSCRIPTION_LIST ":");
......
......@@ -108,11 +108,6 @@
#define SMF_CONFIG_STRING_UDM_IPV4_ADDRESS "IPV4_ADDRESS"
#define SMF_CONFIG_STRING_UDM_PORT "PORT"
//test_upf
#define SMF_CONFIG_STRING_TEST_UPF "TEST_UPF"
#define SMF_CONFIG_STRING_TEST_UPF_IS_TEST "IS_TEST"
#define SMF_CONFIG_STRING_TEST_UPF_GNB_IPV4_ADDRESS "GNB_IPV4_ADDRESS"
#define SMF_CONFIG_STRING_UPF_LIST "UPF_LIST"
#define SMF_CONFIG_STRING_UPF_IPV4_ADDRESS "IPV4_ADDRESS"
......@@ -146,11 +141,6 @@ typedef struct interface_cfg_s {
util::thread_sched_params thread_rd_sched_params;
} interface_cfg_t;
typedef struct test_upf_cfg_s {
uint8_t is_test;
struct in_addr gnb_addr4;
} test_upf_cfg_t;
typedef struct itti_cfg_s {
util::thread_sched_params itti_timer_sched_params;
util::thread_sched_params n4_sched_params;
......@@ -161,7 +151,6 @@ typedef struct itti_cfg_s {
class smf_config {
private:
int load_itti(const libconfig::Setting &itti_cfg, itti_cfg_t &cfg);
int load_upf_config(const libconfig::Setting &if_cfg, test_upf_cfg_t &cfg);
int load_interface(const libconfig::Setting &if_cfg, interface_cfg_t &cfg);
int load_thread_sched_params(
const libconfig::Setting &thread_sched_params_cfg,
......@@ -177,7 +166,6 @@ class smf_config {
interface_cfg_t sbi;
unsigned int sbi_http2_port;
itti_cfg_t itti;
test_upf_cfg_t test_upf_cfg;
struct in_addr default_dnsv4;
struct in_addr default_dns_secv4;
......@@ -286,7 +274,6 @@ class smf_config {
local_configuration = false;
num_session_management_subscription = 0;
test_upf_cfg = {};
for (int i = 0; i < SMF_NUM_SESSION_MANAGEMENT_SUBSCRIPTION_MAX; i++) {
session_management_subscription[i] = {};
......
......@@ -154,27 +154,9 @@ int session_create_sm_context_procedure::run(
sps->generate_far_id(far_id);
apply_action.forw = 1; //forward the packets
//wys-test-add
pfcp::outer_header_creation_t outer_header_creation = { };
if (smf_cfg.test_upf_cfg.is_test) {
//wys-test-add
destination_interface.interface_value = pfcp::INTERFACE_VALUE_ACCESS; // ACCESS is for downlink, CORE for uplink
outer_header_creation.teid = 1;
//inet_aton("192.168.20.136", &outer_header_creation.ipv4_address);
outer_header_creation.ipv4_address = smf_cfg.test_upf_cfg.gnb_addr4;
outer_header_creation.outer_header_creation_description =
pfcp::OUTER_HEADER_CREATION_GTPU_UDP_IPV4;
forwarding_parameters.set(outer_header_creation);
forwarding_parameters.set(destination_interface);
} else {
destination_interface.interface_value = pfcp::INTERFACE_VALUE_CORE; // ACCESS is for downlink, CORE for uplink
forwarding_parameters.set(destination_interface);
}
destination_interface.interface_value = pfcp::INTERFACE_VALUE_CORE; // ACCESS is for downlink, CORE for uplink
forwarding_parameters.set(destination_interface);
//destination_interface.interface_value = pfcp::INTERFACE_VALUE_CORE; // ACCESS is for downlink, CORE for uplink
//forwarding_parameters.set(destination_interface);
//TODO
//Network instance
......@@ -236,10 +218,6 @@ int session_create_sm_context_procedure::run(
create_pdr.set(pdr_id);
create_pdr.set(precedence);
create_pdr.set(pdi);
//wys-add-test
//if (smf_cfg.test_upf_cfg.is_test)
// create_pdr.set(outer_header_removal);
create_pdr.set(outer_header_removal);
create_pdr.set(far_id);
......
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