From 273087ce006d79ea250b724412c21670fe59ecc2 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Fri, 5 Oct 2018 14:50:49 +0200 Subject: [PATCH] use blocking pool allocate for all NAS/RRC allocs and first GW alloc --- srsue/src/upper/gw.cc | 2 +- srsue/src/upper/nas.cc | 2 +- srsue/src/upper/rrc.cc | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/srsue/src/upper/gw.cc b/srsue/src/upper/gw.cc index 62d1e84a8..576271b5b 100644 --- a/srsue/src/upper/gw.cc +++ b/srsue/src/upper/gw.cc @@ -313,7 +313,7 @@ void gw::run_thread() struct iphdr *ip_pkt; uint32 idx = 0; int32 N_bytes; - srslte::byte_buffer_t *pdu = pool_allocate; + srslte::byte_buffer_t *pdu = pool_allocate_blocking; if (!pdu) { gw_log->error("Fatal Error: Couldn't allocate PDU in run_thread().\n"); return; diff --git a/srsue/src/upper/nas.cc b/srsue/src/upper/nas.cc index b7fb0caaf..4cf6b04e0 100644 --- a/srsue/src/upper/nas.cc +++ b/srsue/src/upper/nas.cc @@ -1490,7 +1490,7 @@ void nas::send_esm_information_response(const uint8 proc_transaction_id) { esm_info_resp.protocol_cnfg_opts_present = false; } - byte_buffer_t *pdu = pool_allocate; + byte_buffer_t *pdu = pool_allocate_blocking; if (!pdu) { nas_log->error("Fatal Error: Couldn't allocate PDU in send_attach_request().\n"); return; diff --git a/srsue/src/upper/rrc.cc b/srsue/src/upper/rrc.cc index 080de4b27..bae3049a3 100644 --- a/srsue/src/upper/rrc.cc +++ b/srsue/src/upper/rrc.cc @@ -1582,7 +1582,7 @@ bool rrc::con_reconfig(LIBLTE_RRC_CONNECTION_RECONFIGURATION_STRUCT *reconfig) { byte_buffer_t *nas_sdu; for (uint32_t i = 0; i < reconfig->N_ded_info_nas; i++) { - nas_sdu = pool_allocate; + nas_sdu = pool_allocate_blocking; if (nas_sdu) { memcpy(nas_sdu->msg, &reconfig->ded_info_nas_list[i].msg, reconfig->ded_info_nas_list[i].N_bytes); nas_sdu->N_bytes = reconfig->ded_info_nas_list[i].N_bytes; @@ -1887,7 +1887,7 @@ byte_buffer_t* rrc::byte_align_and_pack() } // Reset and reuse sdu buffer if provided - byte_buffer_t *pdcp_buf = pool_allocate; + byte_buffer_t *pdcp_buf = pool_allocate_blocking; if (pdcp_buf) { srslte_bit_pack_vector(bit_buf.msg, pdcp_buf->msg, bit_buf.N_bits); pdcp_buf->N_bytes = bit_buf.N_bits / 8; @@ -2051,7 +2051,7 @@ void rrc::parse_dl_dcch(uint32_t lcid, byte_buffer_t *pdu) { switch (dl_dcch_msg.msg_type) { case LIBLTE_RRC_DL_DCCH_MSG_TYPE_DL_INFO_TRANSFER: - pdu = pool_allocate; + pdu = pool_allocate_blocking; if (!pdu) { rrc_log->error("Fatal error: out of buffers in pool\n"); return;