Compare commits

...

9 Commits

Author SHA1 Message Date
Andre Puschmann ff84d77799 rf_imp: fix stopping of AGC thread
hard killing of AGC thread causes issue on some RF devices,
such as the N310. The thread still seemed to access the device while
the radio was already killed (or the streamer object deleted).

It's unclear why this isn't causing similar issues on B210 or X310,
at least not visible, but it is obviously not the correct way to stop a thread.

The patch now correctly sets the stop flag for the AGC thread, wakes it
it up and waits until it has terminated.
2021-02-24 22:38:07 +01:00
Francisco 95f75b8523 add lcid check and increase limit to 10 2021-02-24 22:30:24 +01:00
Andre Puschmann f6f05fcbc0 enb,mac: fix stack-buffer-overflow when reading metrics
if more than ENB_METRICS_MAX_USERS are in the UE database,
the metrics getter would overwrite the stack memory
2021-02-24 22:07:08 +01:00
Andre Puschmann 535e30ee9e enb,phy: fix stack overflow when requesting metrics from PHY
this is a backport from a fix already included in pre21.04
2021-02-18 15:40:22 +01:00
Pedro Alvarez 45486b6e2c Remove -Winline from compiler flags. 2020-11-20 20:27:05 +01:00
Pedro Alvarez 5b612c860e Fix issue copying the libsrslte_rf.so for packaging. 2020-11-20 20:26:57 +01:00
Andre Puschmann 3395f3099d add changelog and bump version 20.10.1 2020-11-18 12:24:19 +01:00
Ismael Gomez c048d217a9 Do not reset softbuffer on each iteration 2020-11-18 10:44:26 +01:00
Ismael Gomez 2b99059bff Add missing current_tx_nb which was causing all in uplink to fail 2020-11-18 10:44:02 +01:00
11 changed files with 22 additions and 14 deletions

View File

@ -1,6 +1,9 @@
Change Log for Releases
=======================
## 20.10.1
* Fix bug in srsENB that effectively disabled UL HARQ
## 20.10
* Add Mobility (Intra eNB and S1) and RRC Reestablishment to srsENB
* Add new logging framework

View File

@ -364,7 +364,7 @@ endif(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clan
ADD_C_COMPILER_FLAG_IF_AVAILABLE("-Werror=incompatible-pointer-types" HAVE_ERROR_INCOMPATIBLE)
if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-comment -Wno-write-strings -Winline -Wno-unused-result -Wformat -Wmissing-field-initializers -Wtype-limits -std=c99 -fno-strict-aliasing -D_GNU_SOURCE")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-comment -Wno-write-strings -Wno-unused-result -Wformat -Wmissing-field-initializers -Wtype-limits -std=c99 -fno-strict-aliasing -D_GNU_SOURCE")
if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ggdb -O0 -DDEBUG_MODE -DBUILD_TYPE_DEBUG")

View File

@ -20,6 +20,6 @@
SET(SRSLTE_VERSION_MAJOR 20)
SET(SRSLTE_VERSION_MINOR 10)
SET(SRSLTE_VERSION_PATCH 0)
SET(SRSLTE_VERSION_PATCH 1)
SET(SRSLTE_VERSION_STRING "${SRSLTE_VERSION_MAJOR}.${SRSLTE_VERSION_MINOR}.${SRSLTE_VERSION_PATCH}")
SET(SRSLTE_SOVERSION 0)

View File

@ -1,3 +1,3 @@
usr/lib/*/libsrslte_rf.so
usr/lib/*/libsrslte_rf.so*
usr/share/srslte
usr/bin/srslte_install_configs.sh

View File

@ -39,7 +39,7 @@ public:
const static int MAX_SIB_PAYLOAD_LEN = 2048;
const static int MAX_SIBS = 16;
const static int MAX_LC = 6;
const static int MAX_LC = 11;
const static int MAX_LC_GROUP = 4;
const static int MAX_DATA_LIST = 32;
const static int MAX_RAR_LIST = 8;

View File

@ -58,7 +58,7 @@ static void* thread_gain_fcn(void* h)
while (rf->thread_gain_run) {
pthread_mutex_lock(&rf->mutex);
while (rf->cur_rx_gain == rf->new_rx_gain) {
while (rf->cur_rx_gain == rf->new_rx_gain && rf->thread_gain_run) {
pthread_cond_wait(&rf->cond, &rf->mutex);
}
if (rf->new_rx_gain != rf->cur_rx_gain) {
@ -184,7 +184,8 @@ int srslte_rf_close(srslte_rf_t* rf)
{
// Stop gain thread
if (rf->thread_gain_run) {
pthread_cancel(rf->thread_gain);
rf->thread_gain_run = false;
pthread_cond_signal(&rf->cond);
pthread_join(rf->thread_gain, NULL);
}

View File

@ -301,10 +301,6 @@ void cc_worker::decode_pusch_rnti(stack_interface_phy_lte::ul_sched_grant_t& ul_
bool uci_required =
phy->ue_db.fill_uci_cfg(tti_rx, cc_idx, rnti, ul_grant.dci.cqi_request, true, ul_cfg.pusch.uci_cfg);
if (ul_cfg.pusch.softbuffers.rx) {
srslte_softbuffer_rx_reset(ul_cfg.pusch.softbuffers.rx);
}
// Compute UL grant
srslte_pusch_grant_t& grant = ul_cfg.pusch.grant;
if (srslte_ra_ul_dci_to_grant(&enb_ul.cell, &ul_sf, &ul_cfg.hopping, &ul_grant.dci, &grant)) {

View File

@ -192,16 +192,15 @@ void phy::set_activation_deactivation_scell(uint16_t rnti, const std::array<bool
void phy::get_metrics(phy_metrics_t metrics[ENB_METRICS_MAX_USERS])
{
phy_metrics_t metrics_tmp[ENB_METRICS_MAX_USERS] = {};
uint32_t nof_users = workers[0].get_nof_rnti();
bzero(metrics, sizeof(phy_metrics_t) * ENB_METRICS_MAX_USERS);
uint32_t nof_users = SRSLTE_MIN(workers[0].get_nof_rnti(), ENB_METRICS_MAX_USERS);
phy_metrics_t metrics_tmp[ENB_METRICS_MAX_USERS] = {};
for (uint32_t i = 0; i < nof_workers; i++) {
workers[i].get_metrics(metrics_tmp);
for (uint32_t j = 0; j < nof_users; j++) {
metrics[j].dl.n_samples += metrics_tmp[j].dl.n_samples;
metrics[j].dl.mcs += metrics_tmp[j].dl.n_samples * metrics_tmp[j].dl.mcs;
metrics[j].ul.n_samples += metrics_tmp[j].ul.n_samples;
metrics[j].ul.mcs += metrics_tmp[j].ul.n_samples * metrics_tmp[j].ul.mcs;
metrics[j].ul.n += metrics_tmp[j].ul.n_samples * metrics_tmp[j].ul.n;

View File

@ -281,6 +281,9 @@ void mac::get_metrics(mac_metrics_t metrics[ENB_METRICS_MAX_USERS])
srslte::rwlock_read_guard lock(rwlock);
int cnt = 0;
for (auto& u : ue_db) {
if (cnt == ENB_METRICS_MAX_USERS) {
return;
}
u.second->metrics_read(&metrics[cnt]);
cnt++;
}

View File

@ -1205,6 +1205,8 @@ void sf_sched::set_ul_sched_result(const pdcch_grid_t::alloc_result_t& dci_resul
pending_data_before,
user->get_pending_ul_old_data(cell_index));
pusch->current_tx_nb = h->nof_retx(0);
ul_result->nof_dci_elems++;
}
}

View File

@ -247,6 +247,10 @@ int bearer_cfg_handler::add_erab(uint8_t
log_h->error("QCI=%d not configured\n", qos.qci);
return SRSLTE_ERROR;
}
if (lcid < 3 or lcid > 10) {
log_h->error("DRB logical channel ids must be within 3 and 10\n");
return SRSLTE_ERROR;
}
erabs[erab_id].id = erab_id;
erabs[erab_id].qos_params = qos;