Skip to content

Commit 38a520b

Browse files
committed
Merge branch 'next' into agpl_next
2 parents b5c994d + e4207b1 commit 38a520b

File tree

20 files changed

+655
-47
lines changed

20 files changed

+655
-47
lines changed

.github/workflows/ccpp.yml

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,44 @@
11
name: C/C++ CI
22
on: push
33
jobs:
4-
x86_ubuntu18_build:
5-
name: Build and test on x86 Ubuntu 18.04
4+
x86_ubuntu_build:
5+
name: Build on x86
6+
runs-on: ${{ matrix.os }}
67
strategy:
7-
matrix:
8-
compiler: [gcc, clang]
9-
runs-on: ubuntu-18.04
8+
fail-fast: false
9+
matrix:
10+
os: [ubuntu-20.04, ubuntu-18.04]
11+
compiler: [gcc, clang]
1012
steps:
11-
- uses: actions/checkout@v1
12-
- name: Build srsRAN on x86 Ubuntu 18.04
13-
run: |
14-
sudo apt update
15-
sudo apt install -y build-essential cmake libfftw3-dev libmbedtls-dev libpcsclite-dev libboost-program-options-dev libconfig++-dev libsctp-dev colordiff ninja-build valgrind
16-
mkdir build && cd build && cmake -DRF_FOUND=True -GNinja .. && ninja && ctest
17-
18-
aarch64_ubuntu18_build:
19-
runs-on: ubuntu-18.04
13+
- uses: actions/checkout@v3
14+
- name: Build srsRAN on x86 ${{ matrix.os }}
15+
run: |
16+
sudo apt update
17+
sudo apt install -y build-essential cmake libfftw3-dev libmbedtls-dev libpcsclite-dev libboost-program-options-dev libconfig++-dev libsctp-dev colordiff ninja-build valgrind
18+
mkdir build && cd build && cmake -DRF_FOUND=True -GNinja .. && ninja && ctest
19+
20+
aarch64_ubuntu_build:
2021
name: Build on aarch64
22+
runs-on: ${{ matrix.os }}
2123
strategy:
24+
fail-fast: false
2225
matrix:
26+
os: [ubuntu-20.04, ubuntu-18.04]
2327
compiler: [gcc, clang]
28+
include:
29+
- os: ubuntu-20.04
30+
distro: ubuntu20.04
31+
- os: ubuntu-18.04
32+
distro: ubuntu18.04
2433
steps:
25-
- uses: actions/checkout@v1
26-
- name: Build srsRAN on aarch64
34+
- uses: actions/checkout@v3
35+
- name: Build srsRAN on aarch64 ${{ matrix.os }}
2736
uses: uraimo/run-on-arch-action@master
2837
with:
29-
architecture: aarch64
30-
distribution: ubuntu18.04
38+
arch: aarch64
39+
distro: ${{ matrix.distro }}
3140
run: |
3241
export CTEST_PARALLEL_LEVEL=$(nproc --all)
3342
apt update
3443
apt install -y build-essential cmake libfftw3-dev libmbedtls-dev libpcsclite-dev libboost-program-options-dev libconfig++-dev libsctp-dev ninja-build
35-
ls -l && pwd && mkdir build && cd build && cmake -DRF_FOUND=True -GNinja .. && ninja
44+
ls -l && pwd && mkdir build && cd build && cmake -DRF_FOUND=True -GNinja .. && ninja

lib/include/srsran/rlc/rlc_am_lte.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ class rlc_am_lte_tx : public rlc_am::rlc_am_base_tx, timer_callback
9595
void retransmit_pdu(uint32_t sn);
9696

9797
// Helpers
98+
bool window_full();
9899
bool poll_required();
99100
bool do_status();
100101
void check_sn_reached_max_retx(uint32_t sn);

lib/src/asn1/liblte_mme.cc

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ LIBLTE_ERROR_ENUM liblte_mme_unpack_mobile_id_ie(uint8** ie_ptr, LIBLTE_MME_MOBI
319319
{
320320
LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS;
321321
uint8* id;
322+
uint32* id32;
322323
uint32 length;
323324
uint32 i;
324325
bool odd = false;
@@ -338,22 +339,35 @@ LIBLTE_ERROR_ENUM liblte_mme_unpack_mobile_id_ie(uint8** ie_ptr, LIBLTE_MME_MOBI
338339
} else if (LIBLTE_MME_MOBILE_ID_TYPE_IMEISV == mobile_id->type_of_id) {
339340
id = mobile_id->imeisv;
340341
odd = false;
342+
} else if (LIBLTE_MME_MOBILE_ID_TYPE_TMSI == mobile_id->type_of_id) {
343+
id32 = &mobile_id->tmsi;
344+
odd = false;
341345
} else {
342346
// TODO: Not handling these IDs
343347
return (err);
344348
}
345349

346-
id[0] = **ie_ptr >> 4;
347-
*ie_ptr += 1;
348-
for (i = 0; i < 7; i++) {
349-
id[i * 2 + 1] = (*ie_ptr)[i] & 0x0F;
350-
id[i * 2 + 2] = (*ie_ptr)[i] >> 4;
351-
}
352-
if (odd) {
353-
*ie_ptr += 7;
350+
if (mobile_id->type_of_id != LIBLTE_MME_MOBILE_ID_TYPE_TMSI) {
351+
id[0] = **ie_ptr >> 4;
352+
*ie_ptr += 1;
353+
for (i = 0; i < 7; i++) {
354+
id[i * 2 + 1] = (*ie_ptr)[i] & 0x0F;
355+
id[i * 2 + 2] = (*ie_ptr)[i] >> 4;
356+
}
357+
if (odd) {
358+
*ie_ptr += 7;
359+
} else {
360+
id[i * 2 + 1] = (*ie_ptr)[i] & 0xF;
361+
*ie_ptr += 8;
362+
}
354363
} else {
355-
id[i * 2 + 1] = (*ie_ptr)[i] & 0xF;
356-
*ie_ptr += 8;
364+
*ie_ptr += 1;
365+
uint32 tmsi = 0;
366+
for (i = 0; i < 4; i++) {
367+
tmsi += ((*ie_ptr)[i] & 0xFF) << ((3 - i) * 8);
368+
}
369+
*id32 = tmsi;
370+
*ie_ptr += 4;
357371
}
358372

359373
err = LIBLTE_SUCCESS;
@@ -1380,12 +1394,13 @@ liblte_mme_unpack_eps_network_feature_support_ie(uint8** ie_ptr, LIBLTE_MME_EPS_
13801394
LIBLTE_ERROR_ENUM err = LIBLTE_ERROR_INVALID_INPUTS;
13811395

13821396
if (ie_ptr != NULL && eps_nfs != NULL) {
1397+
int ie_len = *ie_ptr[0];
13831398
eps_nfs->esrps = ((*ie_ptr)[1] >> 5) & 0x01;
13841399
eps_nfs->cs_lcs = (LIBLTE_MME_CS_LCS_ENUM)(((*ie_ptr)[1] >> 3) & 0x03);
13851400
eps_nfs->epc_lcs = ((*ie_ptr)[1] >> 2) & 0x01;
13861401
eps_nfs->emc_bs = ((*ie_ptr)[1] >> 1) & 0x01;
13871402
eps_nfs->ims_vops = (*ie_ptr)[1] & 0x01;
1388-
*ie_ptr += 2;
1403+
*ie_ptr += (ie_len + 1);
13891404

13901405
err = LIBLTE_SUCCESS;
13911406
}

lib/src/phy/fec/convolutional/test/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ add_test(viterbi_40_2 viterbi_test -n 1000 -s 1 -l 40 -t -e 2.0)
3030
add_test(viterbi_40_3 viterbi_test -n 1000 -s 1 -l 40 -t -e 3.0)
3131
add_test(viterbi_40_4 viterbi_test -n 1000 -s 1 -l 40 -t -e 4.5)
3232

33-
add_test(viterbi_1000_0 viterbi_test -n 100 -s 1 -l 1000 -t -e 0.0)
33+
if (HAVE_AVX2)
34+
# The accuracy of the 8-bit implementation of the Viterbi decoder used on
35+
# non-AVX2 machines falls below the theoretical accuracy at 0dB.
36+
add_test(viterbi_1000_0 viterbi_test -n 100 -s 1 -l 1000 -t -e 0.0)
37+
endif()
3438
add_test(viterbi_1000_2 viterbi_test -n 100 -s 1 -l 1000 -t -e 2.0)
3539
add_test(viterbi_1000_3 viterbi_test -n 100 -s 1 -l 1000 -t -e 3.0)
3640
add_test(viterbi_1000_4 viterbi_test -n 100 -s 1 -l 1000 -t -e 4.5)

lib/src/phy/phch/test/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,9 @@ add_executable(pdcch_test pdcch_test.c)
211211
target_link_libraries(pdcch_test srsran_phy)
212212

213213
foreach (nof_prb 6 15 25 50 75 100)
214-
# Currently, the ARM platforms srsRAN has been tested are not capable of running 100PRB. So, skip 100 PRB in ARM
215-
if (HAVE_NEON AND (${nof_prb} EQUAL 100))
214+
# Currently, the ARM and SSE platforms srsRAN has been tested are not capable of running 100PRB. So, skip 100 PRB in
215+
# ARM and SSE.
216+
if ((HAVE_NEON OR NOT HAVE_AVX2) AND (${nof_prb} EQUAL 100))
216217
continue()
217218
endif ()
218219
foreach (nof_ports 1 2)

lib/src/rlc/rlc_am_lte.cc

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ void rlc_am_lte_tx::get_buffer_state_nolock(uint32_t& n_bytes_newtx, uint32_t& n
251251
}
252252

253253
// Bytes needed for tx SDUs
254-
if (tx_window.size() < 1024) {
254+
if (not window_full()) {
255255
n_sdus = tx_sdu_queue.get_n_sdus();
256256
n_bytes_newtx += tx_sdu_queue.size_bytes();
257257
if (tx_sdu != NULL) {
@@ -299,7 +299,7 @@ uint32_t rlc_am_lte_tx::read_pdu(uint8_t* payload, uint32_t nof_bytes)
299299
}
300300

301301
// Section 5.2.2.3 in TS 36.311, if tx_window is full and retx_queue empty, retransmit PDU
302-
if (tx_window.size() >= RLC_AM_WINDOW_SIZE && retx_queue.empty()) {
302+
if (window_full() && retx_queue.empty()) {
303303
retransmit_pdu(vt_a);
304304
}
305305

@@ -323,7 +323,7 @@ void rlc_am_lte_tx::timer_expired(uint32_t timeout_id)
323323
// Section 5.2.2.3 in TS 36.322, schedule PDU for retransmission if
324324
// (a) both tx and retx buffer are empty (excluding tx'ed PDU waiting for ack), or
325325
// (b) no new data PDU can be transmitted (tx window is full)
326-
if ((retx_queue.empty() && tx_sdu_queue.size() == 0) || tx_window.size() >= RLC_AM_WINDOW_SIZE) {
326+
if ((retx_queue.empty() && tx_sdu_queue.size() == 0) || window_full()) {
327327
retransmit_pdu(vt_a); // TODO: TS says to send vt_s - 1 here
328328
}
329329
} else if (status_prohibit_timer.is_valid() && status_prohibit_timer.id() == timeout_id) {
@@ -368,6 +368,11 @@ void rlc_am_lte_tx::retransmit_pdu(uint32_t sn)
368368
* Helper functions
369369
***************************************************************************/
370370

371+
bool rlc_am_lte_tx::window_full()
372+
{
373+
return TX_MOD_BASE(vt_s) >= RLC_AM_WINDOW_SIZE;
374+
};
375+
371376
/**
372377
* Called when building a RLC PDU for checking whether the poll bit needs
373378
* to be set.
@@ -394,7 +399,7 @@ bool rlc_am_lte_tx::poll_required()
394399
return true;
395400
}
396401

397-
if (tx_window.size() >= RLC_AM_WINDOW_SIZE) {
402+
if (window_full()) {
398403
RlcDebug("Poll required. Cause: TX window full.");
399404
return true;
400405
}
@@ -699,7 +704,7 @@ int rlc_am_lte_tx::build_data_pdu(uint8_t* payload, uint32_t nof_bytes)
699704
}
700705

701706
// do not build any more PDU if window is already full
702-
if (tx_window.size() >= RLC_AM_WINDOW_SIZE) {
707+
if (window_full()) {
703708
RlcInfo("Cannot build data PDU - Tx window full.");
704709
return 0;
705710
}
@@ -1165,7 +1170,8 @@ rlc_am_lte_rx::rlc_am_lte_rx(rlc_am* parent_) :
11651170
pool(byte_buffer_pool::get_instance()),
11661171
reordering_timer(parent_->timers->get_unique_timer()),
11671172
rlc_am_base_rx(parent_, parent_->logger)
1168-
{}
1173+
{
1174+
}
11691175

11701176
bool rlc_am_lte_rx::configure(const rlc_config_t& cfg_)
11711177
{

0 commit comments

Comments
 (0)