mirror of https://github.com/PentHertz/srsLTE.git
enb - decreased default enb.conf mac.max_nof_ues to 8 to avoid large memory pool preallocations
This commit is contained in:
parent
71f1f1b556
commit
8fe27a72d0
|
@ -32,6 +32,14 @@
|
|||
} \
|
||||
} while (0)
|
||||
|
||||
#define ASSERT_VALID_CFG(cond, msg_fmt, ...) \
|
||||
do { \
|
||||
if (not(cond)) { \
|
||||
fprintf(stderr, "Error: Invalid configuration - " msg_fmt, ##__VA_ARGS__); \
|
||||
return SRSRAN_ERROR; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
using namespace asn1::rrc;
|
||||
|
||||
namespace srsenb {
|
||||
|
@ -893,11 +901,12 @@ int parse_cfg_files(all_args_t* args_, rrc_cfg_t* rrc_cfg_, phy_cfg_t* phy_cfg_)
|
|||
|
||||
int set_derived_args(all_args_t* args_, rrc_cfg_t* rrc_cfg_, phy_cfg_t* phy_cfg_, const srsran_cell_t& cell_cfg_)
|
||||
{
|
||||
// Sanity check
|
||||
if (rrc_cfg_->cell_list.empty()) {
|
||||
ERROR("No cell specified in RR config.");
|
||||
return SRSRAN_ERROR;
|
||||
}
|
||||
// Sanity checks
|
||||
ASSERT_VALID_CFG(not rrc_cfg_->cell_list.empty(), "No cell specified in rr.conf.");
|
||||
ASSERT_VALID_CFG(args_->stack.mac.max_nof_ues <= SRSENB_MAX_UES and args_->stack.mac.max_nof_ues > 0,
|
||||
"mac.max_nof_ues=%d must be within [0, %d]",
|
||||
args_->stack.mac.max_nof_ues,
|
||||
SRSENB_MAX_UES);
|
||||
|
||||
// Check for a forced DL EARFCN or frequency (only valid for a single cell config (Xico's favorite feature))
|
||||
if (rrc_cfg_->cell_list.size() == 1) {
|
||||
|
|
|
@ -213,7 +213,7 @@ void parse_args(all_args_t* args, int argc, char* argv[])
|
|||
("expert.print_buffer_state", bpo::value<bool>(&args->general.print_buffer_state)->default_value(false), "Prints on the console the buffer state every 10 seconds")
|
||||
("expert.eea_pref_list", bpo::value<string>(&args->general.eea_pref_list)->default_value("EEA0, EEA2, EEA1"), "Ordered preference list for the selection of encryption algorithm (EEA) (default: EEA0, EEA2, EEA1).")
|
||||
("expert.eia_pref_list", bpo::value<string>(&args->general.eia_pref_list)->default_value("EIA2, EIA1, EIA0"), "Ordered preference list for the selection of integrity algorithm (EIA) (default: EIA2, EIA1, EIA0).")
|
||||
("expert.max_nof_ues", bpo::value<uint32_t>(&args->stack.mac.max_nof_ues)->default_value(64), "Maximum number of connected UEs")
|
||||
("expert.max_nof_ues", bpo::value<uint32_t>(&args->stack.mac.max_nof_ues)->default_value(8), "Maximum number of connected UEs")
|
||||
("expert.max_mac_dl_kos", bpo::value<uint32_t>(&args->general.max_mac_dl_kos)->default_value(100), "Maximum number of consecutive KOs before triggering the UE's release")
|
||||
|
||||
// eMBMS section
|
||||
|
|
|
@ -467,7 +467,6 @@ uint16_t mac::allocate_ue()
|
|||
return SRSRAN_INVALID_RNTI;
|
||||
}
|
||||
uint16_t rnti = ue_ptr->get_rnti();
|
||||
size_t max_ues = std::min((size_t)args.max_nof_ues, ue_db.capacity());
|
||||
|
||||
// Add UE to map
|
||||
{
|
||||
|
@ -477,7 +476,7 @@ uint16_t mac::allocate_ue()
|
|||
return SRSRAN_INVALID_RNTI;
|
||||
}
|
||||
if (ue_db.size() >= args.max_nof_ues) {
|
||||
logger.warning("Maximum number of connected UEs %zd connected to the eNB. Ignoring PRACH", max_ues);
|
||||
logger.warning("Maximum number of connected UEs %zd connected to the eNB. Ignoring PRACH", args.max_nof_ues);
|
||||
return SRSRAN_INVALID_RNTI;
|
||||
}
|
||||
auto ret = ue_db.insert(rnti, std::move(ue_ptr));
|
||||
|
|
Loading…
Reference in New Issue