mirror of https://github.com/PentHertz/srsLTE.git
set default gtpu tunnel close timeout to infinity
This commit is contained in:
parent
15484e9472
commit
c5396155ad
|
@ -24,7 +24,7 @@ struct gtpu_args_t {
|
|||
std::string embms_m1u_multiaddr;
|
||||
std::string embms_m1u_if_addr;
|
||||
bool embms_enable = false;
|
||||
uint32_t indirect_tunnel_timeout_msec = 2000;
|
||||
uint32_t indirect_tunnel_timeout_msec = 0;
|
||||
};
|
||||
|
||||
// GTPU interface for PDCP
|
||||
|
|
|
@ -307,7 +307,7 @@ enable = false
|
|||
# nof_prealloc_ues: Number of UE memory resources to preallocate during eNB initialization for faster UE creation (Default 8)
|
||||
# eea_pref_list: Ordered preference list for the selection of encryption algorithm (EEA) (default: EEA0, EEA2, EEA1).
|
||||
# eia_pref_list: Ordered preference list for the selection of integrity algorithm (EIA) (default: EIA2, EIA1, EIA0).
|
||||
# gtpu_tunnel_timeout: Maximum time that GTPU takes to release indirect forwarding tunnel since the last received GTPU PDU.
|
||||
# gtpu_tunnel_timeout: Time that GTPU takes to release indirect forwarding tunnel since the last received GTPU PDU (0 for no timer).
|
||||
#
|
||||
#####################################################################
|
||||
[expert]
|
||||
|
@ -332,4 +332,4 @@ enable = false
|
|||
#nof_prealloc_ues = 8
|
||||
#eea_pref_list = EEA0, EEA2, EEA1
|
||||
#eia_pref_list = EIA2, EIA1, EIA0
|
||||
#gtpu_tunnel_timeout = 2000
|
||||
#gtpu_tunnel_timeout = 0
|
||||
|
|
|
@ -217,7 +217,7 @@ void parse_args(all_args_t* args, int argc, char* argv[])
|
|||
("expert.nof_prealloc_ues", bpo::value<uint32_t>(&args->stack.mac.nof_prealloc_ues)->default_value(8), "Number of UE resources to preallocate during eNB initialization")
|
||||
("expert.max_mac_dl_kos", bpo::value<uint32_t>(&args->general.max_mac_dl_kos)->default_value(100), "Maximum number of consecutive KOs in DL before triggering the UE's release")
|
||||
("expert.max_mac_ul_kos", bpo::value<uint32_t>(&args->general.max_mac_ul_kos)->default_value(100), "Maximum number of consecutive KOs in UL before triggering the UE's release")
|
||||
("expert.gtpu_tunnel_timeout", bpo::value<uint32_t>(&args->stack.gtpu_indirect_tunnel_timeout_msec)->default_value(2000), "Maximum time that GTPU takes to release indirect forwarding tunnel since the last received GTPU PDU.")
|
||||
("expert.gtpu_tunnel_timeout", bpo::value<uint32_t>(&args->stack.gtpu_indirect_tunnel_timeout_msec)->default_value(0), "Maximum time that GTPU takes to release indirect forwarding tunnel since the last received GTPU PDU. (0 for infinity)")
|
||||
|
||||
|
||||
// eMBMS section
|
||||
|
|
|
@ -244,15 +244,17 @@ void gtpu_tunnel_manager::set_tunnel_priority(uint32_t before_teid, uint32_t aft
|
|||
// TS 36.300 - On detection of the "end marker", the target eNB may also initiate the release of the data forwarding
|
||||
// resource. However, the release of the data forwarding resource is implementation dependent and could
|
||||
// also be based on other mechanisms (e.g. timer-based mechanism).
|
||||
before_tun.rx_timer = task_sched.get_unique_timer();
|
||||
before_tun.rx_timer.set(gtpu_args->indirect_tunnel_timeout_msec, [this, before_teid](uint32_t tid) {
|
||||
// Note: This will self-destruct the callback object
|
||||
logger.info("Forwarding tunnel " TEID_IN_FMT "being closed after timeout=%d msec",
|
||||
before_teid,
|
||||
gtpu_args->indirect_tunnel_timeout_msec);
|
||||
remove_tunnel(before_teid);
|
||||
});
|
||||
before_tun.rx_timer.run();
|
||||
if (gtpu_args->indirect_tunnel_timeout_msec > 0) {
|
||||
before_tun.rx_timer = task_sched.get_unique_timer();
|
||||
before_tun.rx_timer.set(gtpu_args->indirect_tunnel_timeout_msec, [this, before_teid](uint32_t tid) {
|
||||
// Note: This will self-destruct the callback object
|
||||
logger.info("Forwarding tunnel " TEID_IN_FMT "being closed after timeout=%d msec",
|
||||
before_teid,
|
||||
gtpu_args->indirect_tunnel_timeout_msec);
|
||||
remove_tunnel(before_teid);
|
||||
});
|
||||
before_tun.rx_timer.run();
|
||||
}
|
||||
}
|
||||
|
||||
void gtpu_tunnel_manager::handle_rx_pdcp_sdu(uint32_t teid)
|
||||
|
|
|
@ -209,6 +209,8 @@ enum class tunnel_test_event { success, wait_end_marker_timeout };
|
|||
|
||||
int test_gtpu_direct_tunneling(tunnel_test_event event)
|
||||
{
|
||||
std::random_device rd;
|
||||
std::mt19937 g(rd());
|
||||
srslog::basic_logger& logger = srslog::fetch_basic_logger("TEST");
|
||||
logger.info("\n\n**** Test GTPU Direct Tunneling ****\n");
|
||||
uint16_t rnti = 0x46, rnti2 = 0x50;
|
||||
|
@ -235,8 +237,9 @@ int test_gtpu_direct_tunneling(tunnel_test_event event)
|
|||
srsenb::gtpu senb_gtpu(&task_sched, logger1, &senb_rx_sockets), tenb_gtpu(&task_sched, logger2, &tenb_rx_sockets);
|
||||
pdcp_tester senb_pdcp, tenb_pdcp;
|
||||
gtpu_args_t gtpu_args;
|
||||
gtpu_args.gtp_bind_addr = senb_addr_str;
|
||||
gtpu_args.mme_addr = sgw_addr_str;
|
||||
gtpu_args.gtp_bind_addr = senb_addr_str;
|
||||
gtpu_args.mme_addr = sgw_addr_str;
|
||||
gtpu_args.indirect_tunnel_timeout_msec = std::uniform_int_distribution<uint32_t>{500, 2000}(g);
|
||||
senb_gtpu.init(gtpu_args, &senb_pdcp);
|
||||
gtpu_args.gtp_bind_addr = tenb_addr_str;
|
||||
tenb_gtpu.init(gtpu_args, &tenb_pdcp);
|
||||
|
@ -262,8 +265,6 @@ int test_gtpu_direct_tunneling(tunnel_test_event event)
|
|||
props.forward_from_teidin = senb_teid_in;
|
||||
senb_gtpu.add_bearer(rnti, drb1, tenb_addr, dl_tenb_teid_in, &props);
|
||||
|
||||
std::random_device rd;
|
||||
std::mt19937 g(rd());
|
||||
std::vector<uint8_t> data_vec(10);
|
||||
std::iota(data_vec.begin(), data_vec.end(), 0);
|
||||
std::vector<uint8_t> encoded_data;
|
||||
|
|
Loading…
Reference in New Issue