From edcd0019d2d4dbaa37ee897432140ab12046740f Mon Sep 17 00:00:00 2001 From: Romain Beurdouche Date: Tue, 25 Jun 2024 10:29:29 +0200 Subject: [PATCH 01/25] fix(nr_pbchsim): replace option -O by option -c --- cmake_targets/autotests/test_case_list.xml | 2 +- openair1/SIMULATION/NR_PHY/pbchsim.c | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index 856b39c9fd..fc24b48f11 100755 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -116,7 +116,7 @@ nr_pbchsim -s-11 -S-8 -n10 -R106 -N2 -s-11 -S-8 -n10 -o8000 -I -R106 - -s-11 -S-8 -n10 -R106 -O6 + -s-11 -S-8 -n10 -R106 -c6 test1 test2 test3 PBCH test OK segmentation fault|assertion|exiting|fatal diff --git a/openair1/SIMULATION/NR_PHY/pbchsim.c b/openair1/SIMULATION/NR_PHY/pbchsim.c index d294bd6052..716cf5e2fc 100644 --- a/openair1/SIMULATION/NR_PHY/pbchsim.c +++ b/openair1/SIMULATION/NR_PHY/pbchsim.c @@ -244,15 +244,20 @@ int main(int argc, char **argv) exit_fun("[NR_PBCHSIM] Error, configuration module init failed\n"); } - while ((c = getopt (argc, argv, "--:F:g:hIL:m:M:n:N:o:O:P:r:R:s:S:x:y:z:")) != -1) { + while ((c = getopt (argc, argv, "--:c:F:g:hIL:m:M:n:N:o:P:r:R:s:S:x:y:z:")) != -1) { - /* ignore long options starting with '--' and their arguments that are handled by configmodule */ + /* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */ /* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */ if (c == 1 || c == '-') continue; printf("handling optarg %c\n",c); switch (c) { + + case 'c': + ssb_subcarrier_offset = atoi(optarg); + break; + /*case 'f': write_output_file=1; output_fd = fopen(optarg,"w"); @@ -349,10 +354,6 @@ int main(int argc, char **argv) Nid_cell = atoi(optarg); break; - case 'O': - ssb_subcarrier_offset = atoi(optarg); - break; - case 'o': cfo = atof(optarg); #ifdef DEBUG_NR_PBCHSIM @@ -440,6 +441,7 @@ int main(int argc, char **argv) printf("%s -F input_filename -g channel_mod -h(elp) -I(nitial sync) -L log_lvl -n n_frames -M SSBs -n frames -N cell_id -o FO -P phase -r seed -R RBs -s snr0 -S snr1 -x transmission_mode -y TXant -z RXant\n", argv[0]); //printf("-A Interpolation_filname Run with Abstraction to generate Scatter plot using interpolation polynomial in file\n"); + printf("-c SSB subcarrier offset\n"); //printf("-C Generate Calibration information for Abstraction (effective SNR adjustment to remove Pe bias w.r.t. AWGN)\n"); //printf("-d Use TDD\n"); //printf("-f Output filename (.txt format) for Pe/SNR results\n"); @@ -455,7 +457,6 @@ int main(int argc, char **argv) printf("-n Number of frames to simulate\n"); printf("-N Nid_cell\n"); printf("-o Carrier frequency offset in Hz\n"); - printf("-O SSB subcarrier offset\n"); //printf("-O oversampling factor (1,2,4,8,16)\n"); //printf("-p Use extended prefix mode\n"); printf("-P PBCH phase, allowed values 0-3\n"); From a476e18120cc06403b8214514301ac4131301087 Mon Sep 17 00:00:00 2001 From: Romain Beurdouche Date: Tue, 25 Jun 2024 10:35:10 +0200 Subject: [PATCH 02/25] fix(phy_simulators): replace option -Operf by option -Tperf in LTE ulsim and dlsim --- cmake_targets/autotests/test_case_list.xml | 40 +++++++++++----------- openair1/SIMULATION/LTE_PHY/dlsim.c | 2 +- openair1/SIMULATION/LTE_PHY/ulsim.c | 2 +- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index fc24b48f11..885158a84d 100755 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -12,15 +12,15 @@ (Test 10b: 5 MHz, R6-1.FDD (MCS 24,18 PRB), EVA5, 17.5dB (70%)), (Test 11: 10 MHz, R7.FDD (MCS 25), EVA5, 17.7dB (70%)) dlsim - -m=5 -g=F -s=-1 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60 - -m=4 -g=F -s=0 -w=1.0 -f=.2 -n=500 -B=6 -c=4 -z=2 -O=60 - -m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60 - -m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=25 -c=2 -z=2 -O=60 - -m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=25 - -m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=500 -B=25 -c=2 -z=2 -O=25 - -m=25 -g=F -s=17.4 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -z=2 -O=60 - -m=25 -g=F -s=17.5 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -z=2 -r=1022 -O=60 - -m=26 -g=F -s=17.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60 + -m=5 -g=F -s=-1 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -Tperf=60 + -m=4 -g=F -s=0 -w=1.0 -f=.2 -n=500 -B=6 -c=4 -z=2 -Tperf=60 + -m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -Tperf=60 + -m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=25 -c=2 -z=2 -Tperf=60 + -m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -Tperf=25 + -m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=500 -B=25 -c=2 -z=2 -Tperf=25 + -m=25 -g=F -s=17.4 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -z=2 -Tperf=60 + -m=25 -g=F -s=17.5 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -z=2 -r=1022 -Tperf=60 + -m=26 -g=F -s=17.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -Tperf=60 test1 test5 test6 test6b test7 test7b test10 test10b test11 "passed" segmentation fault|assertion|exiting|fatal @@ -34,11 +34,11 @@ (TM2 Test 1: 10 MHz, R.11 FDD (MCS 14), EVA5, 6.8 dB (70%)), (TM2 Test 1b: 5 MHz, R.11-2 FDD (MCS 13), EVA5, 5.9 dB (70%)) dlsim - -m=26 -g=F -s=17.6 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -O=60 - -m=26 -g=F -s=17.3 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -r=1600 -O=60 - -m=26 -g=F -s=16.6 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -r=1899 -O=60 - -m=14 -g=F -s=6.8 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -x=2 -y=2 -z=2 -O=60 - -m=13 -g=F -s=5.9 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -x=2 -y=2 -z=2 -O=60 + -m=26 -g=F -s=17.6 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -Tperf=60 + -m=26 -g=F -s=17.3 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -r=1600 -Tperf=60 + -m=26 -g=F -s=16.6 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -r=1899 -Tperf=60 + -m=14 -g=F -s=6.8 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -x=2 -y=2 -z=2 -Tperf=60 + -m=13 -g=F -s=5.9 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -x=2 -y=2 -z=2 -Tperf=60 test15 test15b test15c TM2_test1 TM2_test1b "passed" segmentation fault|assertion|exiting|fatal @@ -53,12 +53,12 @@ (Test 5: 20 MHz, FDD (MCS 5), AWGN, 6dB (70%)), (Test 6: 20 MHz, FDD (MCS 16), AWGN, 12 dB (70%)) ulsim - -BnbRBs=25 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70 - -BnbRBs=25 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70 - -BnbRBs=50 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70 - -BnbRBs=50 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70 - -BnbRBs=100 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70 - -BnbRBs=100 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70 + -BnbRBs=25 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Tperf=70 + -BnbRBs=25 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Tperf=70 + -BnbRBs=50 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Tperf=70 + -BnbRBs=50 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Tperf=70 + -BnbRBs=100 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Tperf=70 + -BnbRBs=100 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Tperf=70 test1 test2 test3 test4 test5 test6 "passed" segmentation fault|assertion|exiting|fatal diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c index 2f112ddc99..1d012dc352 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim.c @@ -630,7 +630,7 @@ int main(int argc, char **argv) { { "lMuMimo", "offset_mumimo_llr_drange_fix",0, .u8ptr=&offset_mumimo_llr_drange_fix, .defintval=0, TYPE_UINT8, 0 }, { "mcs1", "The MCS for TB 1", 0, .iptr=&mcs1, .defintval=0, TYPE_INT, 0 }, { "Mcs2", "The MCS for TB 2", 0, .iptr=&mcs2, .defintval=0, TYPE_INT, 0 }, - { "Operf", "Set the percenatge of effective rate to testbench the modem performance (typically 30 and 70, range 1-100)",0, .iptr=&test_perf, .defintval=0, TYPE_INT, 0 }, + { "Tperf", "Set the percenatge of effective rate to testbench the modem performance (typically 30 and 70, range 1-100)",0, .iptr=&test_perf, .defintval=0, TYPE_INT, 0 }, { "tmcs_i", "MCS of interfering UE",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, { "nb_frame", "number of frame in a test",0, .iptr=&n_frames, .defintval=1, TYPE_INT, 0 }, { "offsetRxSample", "Sample offset for receiver", 0, .iptr=&rx_sample_offset, .defintval=0, TYPE_INT, 0 }, diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c index 7898365e66..60d3514253 100644 --- a/openair1/SIMULATION/LTE_PHY/ulsim.c +++ b/openair1/SIMULATION/LTE_PHY/ulsim.c @@ -438,7 +438,7 @@ int main(int argc, char **argv) { { "bundling_disable", "bundling disable",PARAMFLAG_BOOL, .iptr=&disable_bundling, .defintval=0, TYPE_INT, 0 }, { "Y", "n_ch_rlz",0, .iptr=&n_ch_rlz, .defintval=1, TYPE_INT, 0 }, { "X", "abstx", PARAMFLAG_BOOL, .iptr=&abstx, .defintval=0, TYPE_INT, 0 }, - { "Operf", "Set the percentage of effective rate to testbench the modem performance (typically 30 and 70, range 1-100)",0, .iptr=&test_perf, .defintval=0, TYPE_INT, 0 }, + { "Tperf", "Set the percentage of effective rate to testbench the modem performance (typically 30 and 70, range 1-100)",0, .iptr=&test_perf, .defintval=0, TYPE_INT, 0 }, { "verbose", "display debug text", PARAMFLAG_BOOL, .iptr=&verbose, .defintval=0, TYPE_INT, 0 }, { "help", "display help and exit", PARAMFLAG_BOOL, .iptr=&help, .defintval=0, TYPE_INT, 0 }, { "", "",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, From 327b9a8b70c271d2e0a1e67e102a4c1b23b4fd80 Mon Sep 17 00:00:00 2001 From: Romain Beurdouche Date: Tue, 25 Jun 2024 10:38:09 +0200 Subject: [PATCH 03/25] fix(phy_simulators): enable the use of option -O to pass a configuration file to configmodule in phy simulators --- openair1/PHY/CODING/TESTBENCH/ldpctest.c | 6 +++--- openair1/PHY/CODING/TESTBENCH/polartest.c | 6 +++--- openair1/PHY/CODING/TESTBENCH/smallblocktest.c | 6 +++--- openair1/SIMULATION/NR_PHY/dlschsim.c | 4 ++-- openair1/SIMULATION/NR_PHY/dlsim.c | 6 +++--- openair1/SIMULATION/NR_PHY/pbchsim.c | 4 ++-- openair1/SIMULATION/NR_PHY/prachsim.c | 6 +++--- openair1/SIMULATION/NR_PHY/psbchsim.c | 6 +++--- openair1/SIMULATION/NR_PHY/pucchsim.c | 6 +++--- openair1/SIMULATION/NR_PHY/ulschsim.c | 6 +++--- openair1/SIMULATION/NR_PHY/ulsim.c | 6 +++--- 11 files changed, 31 insertions(+), 31 deletions(-) diff --git a/openair1/PHY/CODING/TESTBENCH/ldpctest.c b/openair1/PHY/CODING/TESTBENCH/ldpctest.c index 43a84e4b8f..d676a90264 100644 --- a/openair1/PHY/CODING/TESTBENCH/ldpctest.c +++ b/openair1/PHY/CODING/TESTBENCH/ldpctest.c @@ -430,11 +430,11 @@ int main(int argc, char *argv[]) } logInit(); - while ((c = getopt (argc, argv, "--:q:r:s:S:l:G:n:d:i:t:u:hv:")) != -1) { + while ((c = getopt (argc, argv, "--:O:q:r:s:S:l:G:n:d:i:t:u:hv:")) != -1) { - /* ignore long options starting with '--' and their arguments that are handled by configmodule */ + /* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */ /* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */ - if (c == 1 || c == '-') + if (c == 1 || c == '-' || c == 'O') continue; printf("handling optarg %c\n",c); diff --git a/openair1/PHY/CODING/TESTBENCH/polartest.c b/openair1/PHY/CODING/TESTBENCH/polartest.c index 78b44599fb..be7987f340 100644 --- a/openair1/PHY/CODING/TESTBENCH/polartest.c +++ b/openair1/PHY/CODING/TESTBENCH/polartest.c @@ -38,11 +38,11 @@ int main(int argc, char *argv[]) } logInit(); - while ((arguments = getopt (argc, argv, "--:s:d:f:m:i:l:a:p:hqgFL:k:")) != -1) { + while ((arguments = getopt (argc, argv, "--:O:s:d:f:m:i:l:a:p:hqgFL:k:")) != -1) { - /* ignore long options starting with '--' and their arguments that are handled by configmodule */ + /* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */ /* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */ - if (arguments == 1 || arguments == '-') + if (arguments == 1 || arguments == '-' || arguments == 'O') continue; printf("handling optarg %c\n",arguments); diff --git a/openair1/PHY/CODING/TESTBENCH/smallblocktest.c b/openair1/PHY/CODING/TESTBENCH/smallblocktest.c index d6306495a7..dfc8aadc8e 100644 --- a/openair1/PHY/CODING/TESTBENCH/smallblocktest.c +++ b/openair1/PHY/CODING/TESTBENCH/smallblocktest.c @@ -32,11 +32,11 @@ int main(int argc, char *argv[]) } logInit(); - while ((arguments = getopt(argc, argv, "--:s:d:f:l:i:mhg")) != -1) { + while ((arguments = getopt(argc, argv, "--:O:s:d:f:l:i:mhg")) != -1) { - /* ignore long options starting with '--' and their arguments that are handled by configmodule */ + /* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */ /* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */ - if (arguments == 1 || arguments == '-') + if (arguments == 1 || arguments == '-' || arguments == 'O') continue; printf("handling optarg %c\n",arguments); diff --git a/openair1/SIMULATION/NR_PHY/dlschsim.c b/openair1/SIMULATION/NR_PHY/dlschsim.c index 7466da841c..b49eed1bd6 100644 --- a/openair1/SIMULATION/NR_PHY/dlschsim.c +++ b/openair1/SIMULATION/NR_PHY/dlschsim.c @@ -146,11 +146,11 @@ int main(int argc, char **argv) // logInit(); randominit(0); - while ((c = getopt(argc, argv, "--:df:hpVg:i:j:n:l:m:r:s:S:y:z:M:N:F:R:P:L:X:")) != -1) { + while ((c = getopt(argc, argv, "--:O:df:hpVg:i:j:n:l:m:r:s:S:y:z:M:N:F:R:P:L:X:")) != -1) { /* ignore long options starting with '--' and their arguments that are handled by configmodule */ /* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */ - if (c == 1 || c == '-') + if (c == 1 || c == '-' || c == 'O') continue; printf("handling optarg %c\n",c); diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 6f48f80ce9..728163e049 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -336,11 +336,11 @@ int main(int argc, char **argv) FILE *scg_fd=NULL; - while ((c = getopt(argc, argv, "--:f:hA:p:f:g:i:n:s:S:t:v:x:y:z:o:M:N:F:GR:d:PI:L:a:b:e:m:w:T:U:q:X:Y:Z:c")) != -1) { + while ((c = getopt(argc, argv, "--:O:f:hA:p:f:g:i:n:s:S:t:v:x:y:z:o:M:N:F:GR:d:PI:L:a:b:e:m:w:T:U:q:X:Y:Z:c")) != -1) { - /* ignore long options starting with '--' and their arguments that are handled by configmodule */ + /* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */ /* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */ - if (c == 1 || c == '-') + if (c == 1 || c == '-' || c == 'O') continue; printf("handling optarg %c\n",c); diff --git a/openair1/SIMULATION/NR_PHY/pbchsim.c b/openair1/SIMULATION/NR_PHY/pbchsim.c index 716cf5e2fc..63546246f0 100644 --- a/openair1/SIMULATION/NR_PHY/pbchsim.c +++ b/openair1/SIMULATION/NR_PHY/pbchsim.c @@ -244,11 +244,11 @@ int main(int argc, char **argv) exit_fun("[NR_PBCHSIM] Error, configuration module init failed\n"); } - while ((c = getopt (argc, argv, "--:c:F:g:hIL:m:M:n:N:o:P:r:R:s:S:x:y:z:")) != -1) { + while ((c = getopt (argc, argv, "--:O:c:F:g:hIL:m:M:n:N:o:P:r:R:s:S:x:y:z:")) != -1) { /* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */ /* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */ - if (c == 1 || c == '-') + if (c == 1 || c == '-' || c == 'O') continue; printf("handling optarg %c\n",c); diff --git a/openair1/SIMULATION/NR_PHY/prachsim.c b/openair1/SIMULATION/NR_PHY/prachsim.c index ef05cd4940..785e8bb96f 100644 --- a/openair1/SIMULATION/NR_PHY/prachsim.c +++ b/openair1/SIMULATION/NR_PHY/prachsim.c @@ -164,11 +164,11 @@ int main(int argc, char **argv){ randominit(0); - while ((c = getopt (argc, argv, "--:hHaA:Cc:l:r:p:g:m:n:s:S:t:x:y:v:V:z:N:F:d:Z:L:R:E")) != -1) { + while ((c = getopt (argc, argv, "--:O:hHaA:Cc:l:r:p:g:m:n:s:S:t:x:y:v:V:z:N:F:d:Z:L:R:E")) != -1) { - /* ignore long options starting with '--' and their arguments that are handled by configmodule */ + /* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */ /* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */ - if (c == 1 || c == '-') + if (c == 1 || c == '-' || c == 'O') continue; printf("handling optarg %c\n",c); diff --git a/openair1/SIMULATION/NR_PHY/psbchsim.c b/openair1/SIMULATION/NR_PHY/psbchsim.c index fd96f233ca..63a4ae5ff2 100644 --- a/openair1/SIMULATION/NR_PHY/psbchsim.c +++ b/openair1/SIMULATION/NR_PHY/psbchsim.c @@ -313,11 +313,11 @@ int main(int argc, char **argv) randominit(0); - while ((c = getopt(argc, argv, "--:c:hn:o:s:FIL:N:R:S:T:")) != -1) { + while ((c = getopt(argc, argv, "--:O:c:hn:o:s:FIL:N:R:S:T:")) != -1) { - /* ignore long options starting with '--' and their arguments that are handled by configmodule */ + /* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */ /* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */ - if (c == 1 || c == '-') + if (c == 1 || c == '-' || c == 'O') continue; printf("SIDELINK PSBCH SIM: handling optarg %c\n", c); diff --git a/openair1/SIMULATION/NR_PHY/pucchsim.c b/openair1/SIMULATION/NR_PHY/pucchsim.c index 1609c36511..5291930c12 100644 --- a/openair1/SIMULATION/NR_PHY/pucchsim.c +++ b/openair1/SIMULATION/NR_PHY/pucchsim.c @@ -155,11 +155,11 @@ int main(int argc, char **argv) randominit(0); logInit(); - while ((c = getopt (argc, argv, "--:f:hA:f:g:i:I:P:B:b:t:T:m:n:r:o:s:S:x:y:z:N:F:GR:IL:q:cd:")) != -1) { + while ((c = getopt (argc, argv, "--:O:f:hA:f:g:i:I:P:B:b:t:T:m:n:r:o:s:S:x:y:z:N:F:GR:IL:q:cd:")) != -1) { - /* ignore long options starting with '--' and their arguments that are handled by configmodule */ + /* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */ /* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */ - if (c == 1 || c == '-') + if (c == 1 || c == '-' || c == 'O') continue; printf("handling optarg %c\n",c); diff --git a/openair1/SIMULATION/NR_PHY/ulschsim.c b/openair1/SIMULATION/NR_PHY/ulschsim.c index 1da4da5b24..ebe0ff8915 100644 --- a/openair1/SIMULATION/NR_PHY/ulschsim.c +++ b/openair1/SIMULATION/NR_PHY/ulschsim.c @@ -166,11 +166,11 @@ int main(int argc, char **argv) randominit(0); //while ((c = getopt(argc, argv, "--:df:hpg:i:j:n:l:m:r:s:S:y:z:M:N:F:R:P:")) != -1) { - while ((c = getopt(argc, argv, "--:hg:n:s:S:py:z:M:N:R:F:m:l:q:r:W:")) != -1) { + while ((c = getopt(argc, argv, "--:O:hg:n:s:S:py:z:M:N:R:F:m:l:q:r:W:")) != -1) { - /* ignore long options starting with '--' and their arguments that are handled by configmodule */ + /* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */ /* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */ - if (c == 1 || c == '-') + if (c == 1 || c == '-' || c == 'O') continue; printf("handling optarg %c\n",c); diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index 0efdc9be39..822153fd14 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -223,11 +223,11 @@ int main(int argc, char *argv[]) /* initialize the sin-cos table */ InitSinLUT(); - while ((c = getopt(argc, argv, "--:a:b:c:d:ef:g:h:i:k:m:n:op:q:r:s:t:u:v:w:y:z:C:F:G:H:I:M:N:PR:S:T:U:L:ZW:E:X:")) != -1) { + while ((c = getopt(argc, argv, "--:O:a:b:c:d:ef:g:h:i:k:m:n:op:q:r:s:t:u:v:w:y:z:C:F:G:H:I:M:N:PR:S:T:U:L:ZW:E:X:")) != -1) { - /* ignore long options starting with '--' and their arguments that are handled by configmodule */ + /* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */ /* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */ - if (c == 1 || c == '-') + if (c == 1 || c == '-' || c == 'O') continue; printf("handling optarg %c\n",c); From 4033606fff7dd1e47090650c43f7a886fbcaf6f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BAben=20Soares=20Silva?= Date: Mon, 3 Jun 2024 18:48:39 +0100 Subject: [PATCH 04/25] Increase TX_DATA.request TB buffer size to be allocated in the stack with 2MB, fix compute_PDU_Length to not truncate value and fix packing procedure to use buffer size as the upper limit instead of hardcoded value --- nfapi/oai_integration/aerial/fapi_vnf_p7.c | 57 ++++++++++--------- .../nfapi/public_inc/nfapi_nr_interface_scf.h | 9 +-- openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c | 4 +- openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h | 2 +- 4 files changed, 38 insertions(+), 34 deletions(-) diff --git a/nfapi/oai_integration/aerial/fapi_vnf_p7.c b/nfapi/oai_integration/aerial/fapi_vnf_p7.c index 35d63515ed..eefa404e58 100644 --- a/nfapi/oai_integration/aerial/fapi_vnf_p7.c +++ b/nfapi/oai_integration/aerial/fapi_vnf_p7.c @@ -1074,7 +1074,11 @@ static int32_t aerial_pack_tx_data_request(void *pMessageBuf, for (; k < total_number_of_tlvs; ++k) { if (value->TLVs[k].length > 0) { if (value->TLVs[k].length % 4 != 0) { - if (!pusharray32(value->TLVs[k].value.direct, 16384, ((value->TLVs[k].length + 3) / 4) - 1, ppWriteData, data_end)) { + if (!pusharray32(value->TLVs[k].value.direct, + (dataBufLen + 3) / 4, + ((value->TLVs[k].length + 3) / 4) - 1, + ppWriteData, + data_end)) { return 0; } int bytesToAdd = 4 - (4 - (value->TLVs[k].length % 4)) % 4; @@ -1088,7 +1092,11 @@ static int32_t aerial_pack_tx_data_request(void *pMessageBuf, } } else { // no padding needed - if (!pusharray32(value->TLVs[k].value.direct, 16384, ((value->TLVs[k].length + 3) / 4), ppWriteData, data_end)) { + if (!pusharray32(value->TLVs[k].value.direct, + (dataBufLen + 3) / 4, + ((value->TLVs[k].length + 3) / 4), + ppWriteData, + data_end)) { return 0; } } @@ -1109,7 +1117,7 @@ static int32_t aerial_pack_tx_data_request(void *pMessageBuf, uintptr_t msgEnd = (uintptr_t)pPacketBodyField; uint32_t packedMsgLen = msgEnd - msgHead; uint16_t packedMsgLen16; - if (packedMsgLen > 0xFFFF || packedMsgLen > packedBufLen) { + if (packedMsgLen > packedBufLen + dataBufLen) { NFAPI_TRACE(NFAPI_TRACE_ERROR, "Packed message length error %d, buffer supplied %d\n", packedMsgLen, packedBufLen); return 0; } else { @@ -1123,17 +1131,6 @@ static int32_t aerial_pack_tx_data_request(void *pMessageBuf, if (!push32(packedMsgLen, &pPackedLengthField, pPackMessageEnd)) return 0; - if (1) { - // quick test - if (pMessageHeader->message_length != packedMsgLen) { - NFAPI_TRACE(NFAPI_TRACE_ERROR, - "nfapi packedMsgLen(%d) != message_length(%d) id %d\n", - packedMsgLen, - pMessageHeader->message_length, - pMessageHeader->message_id); - } - } - return (packedMsgLen16); } @@ -1289,23 +1286,29 @@ int fapi_nr_pack_and_send_p7_message(vnf_p7_t *vnf_p7, nfapi_p7_message_header_t { uint8_t FAPI_buffer[1024 * 64]; // Check if TX_DATA request, if true, need to pack to data_buf - if (header->message_id - == NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST) { - uint8_t FAPI_data_buffer[1024 * 64]; + if (header->message_id == NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST) { + nfapi_nr_tx_data_request_t *pNfapiMsg = (nfapi_nr_tx_data_request_t *)header; + uint64_t size = 0; + for (int i = 0; i < pNfapiMsg->Number_of_PDUs; ++i) { + size += pNfapiMsg->pdu_list[i].PDU_length; + } + AssertFatal(size <= 1024 * 1024 * 2, "Message data larger than available buffer, tried to pack %"PRId64 ,size); + uint8_t FAPI_data_buffer[1024 * 1024 * 2]; // 2MB uint32_t data_len = 0; int32_t len_FAPI = aerial_pack_tx_data_request(header, - FAPI_buffer, - FAPI_data_buffer, - sizeof(FAPI_buffer), - sizeof(FAPI_data_buffer), - &vnf_p7->_public.codec_config, - &data_len); - if (len_FAPI <=0) { - LOG_E(NFAPI_VNF,"Problem packing TX_DATA_request\n"); + FAPI_buffer, + FAPI_data_buffer, + sizeof(FAPI_buffer), + sizeof(FAPI_data_buffer), + &vnf_p7->_public.codec_config, + &data_len); + if (len_FAPI <= 0) { + LOG_E(NFAPI_VNF, "Problem packing TX_DATA_request\n"); return len_FAPI; + } else { + int retval = aerial_send_P7_msg_with_data(FAPI_buffer, len_FAPI, FAPI_data_buffer, data_len, header); + return retval; } - else - return aerial_send_P7_msg_with_data(FAPI_buffer, len_FAPI, FAPI_data_buffer, data_len, header); } else { // Create and send FAPI P7 message int len_FAPI = fapi_nr_p7_message_pack(header, FAPI_buffer, sizeof(FAPI_buffer), &vnf_p7->_public.codec_config); diff --git a/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h b/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h index d3452a4212..a2995aa649 100644 --- a/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h +++ b/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h @@ -26,10 +26,11 @@ // Extension to the generic structures for single tlv values typedef struct { - /// Value: 0 -> 1, 0: Payload is carried directly in the value field, 1: Pointer to payload is in the value field - uint16_t tag; - /// Length of the actual payload in bytes, without the padding bytes Value: 0 → 65535 - uint16_t length; + /// Value: 0 -> 1, 0: Payload is carried directly in the value field, 1: Pointer to payload is in the value field + uint16_t tag; + /// Length of the actual payload in bytes, without the padding bytes Value: 0 → 0xFFFFFFFF + /// Note: This change to uint32_t is a deviation from version 10.02 of the SCF222 standard + uint32_t length; union { uint32_t *ptr; uint32_t direct[38016]; diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c index cdd55fc2d7..d612a6dcc6 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c @@ -5200,9 +5200,9 @@ bool supported_bw_comparison(int bw_mhz, NR_SupportedBandwidth_t *supported_BW, return false; } -uint16_t compute_PDU_length(uint32_t num_TLV, uint16_t total_length) +uint32_t compute_PDU_length(uint32_t num_TLV, uint16_t total_length) { - uint8_t pdu_length = 8; // 2 bytes PDU_Length + 2 bytes PDU_Index + 4 bytes num_TLV + uint32_t pdu_length = 8; // 2 bytes PDU_Length + 2 bytes PDU_Index + 4 bytes num_TLV // For each TLV, add 2 bytes tag + 2 bytes length + value size without padding pdu_length += (num_TLV * 4) + total_length; return pdu_length; diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h index 617aa64be2..32c8242f35 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h @@ -311,7 +311,7 @@ void compute_csi_bitlen(const NR_CSI_MeasConfig_t *csi_MeasConfig, nr_csi_report uint16_t nr_get_csi_bitlen(nr_csi_report_t *csi_report); -uint16_t compute_PDU_length(uint32_t num_TLV, uint16_t total_length); +uint32_t compute_PDU_length(uint32_t num_TLV, uint16_t total_length); rnti_t nr_get_ra_rnti(uint8_t s_id, uint8_t t_id, uint8_t f_id, uint8_t ul_carrier_id); From 8159abdcd3b7e8741a739a598d0555f33a737906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BAben=20Soares=20Silva?= Date: Wed, 12 Jun 2024 18:09:11 +0100 Subject: [PATCH 05/25] Change TX_DATA.request PDU_Length and TLV length parameters to 32 bit in related pack/unpack procedures. Fix small issue noted when packing tlv value with tag 1 in which it would pack length*4 bytes, now calculated how many "segments" of 32 bits it needs to pack, same logic for unpacking tag value 1 --- nfapi/open-nFAPI/nfapi/src/nfapi_p7.c | 34 ++++++++++++++++----------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/nfapi/open-nFAPI/nfapi/src/nfapi_p7.c b/nfapi/open-nFAPI/nfapi/src/nfapi_p7.c index 7cbf2c41fd..45d5f15ffe 100644 --- a/nfapi/open-nFAPI/nfapi/src/nfapi_p7.c +++ b/nfapi/open-nFAPI/nfapi/src/nfapi_p7.c @@ -2017,8 +2017,7 @@ static uint8_t pack_hi_dci0_request(void *msg, uint8_t **ppWritePackedMsg, uint8 static uint8_t pack_tx_data_pdu_list_value(void *tlv, uint8_t **ppWritePackedMsg, uint8_t *end) { nfapi_nr_pdu_t *value = (nfapi_nr_pdu_t *)tlv; - AssertFatal(value->PDU_length <= 0xFFFF,"TX_DATA.request PDU_Length should be within 16 bit, according to SCF222.10.02"); - if (!(push16(value->PDU_length, ppWritePackedMsg, end) && push16(value->PDU_index, ppWritePackedMsg, end) + if (!(push32(value->PDU_length, ppWritePackedMsg, end) && push16(value->PDU_index, ppWritePackedMsg, end) && push32(value->num_TLV, ppWritePackedMsg, end))) return 0; @@ -2026,12 +2025,16 @@ static uint8_t pack_tx_data_pdu_list_value(void *tlv, uint8_t **ppWritePackedMsg uint16_t total_number_of_tlvs = value->num_TLV; for (; i < total_number_of_tlvs; ++i) { - if (!(push16(value->TLVs[i].tag, ppWritePackedMsg, end) && push16(value->TLVs[i].length, ppWritePackedMsg, end))) + if (!(push16(value->TLVs[i].tag, ppWritePackedMsg, end) && push32(value->TLVs[i].length, ppWritePackedMsg, end))) return 0; switch (value->TLVs[i].tag) { case 0: { - if (!pusharray32(value->TLVs[i].value.direct, 16384, (value->TLVs[i].length + 3) / 4, ppWritePackedMsg, end)) { + if (!pusharray32(value->TLVs[i].value.direct, + (value->TLVs[i].length + 3) / 4, + (value->TLVs[i].length + 3) / 4, + ppWritePackedMsg, + end)) { NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s():%d. value->TLVs[i].length %d \n", __FUNCTION__, __LINE__, value->TLVs[i].length); return 0; } @@ -2039,7 +2042,11 @@ static uint8_t pack_tx_data_pdu_list_value(void *tlv, uint8_t **ppWritePackedMsg } case 1: { - if (!pusharray32(value->TLVs[i].value.ptr, value->TLVs[i].length, value->TLVs[i].length, ppWritePackedMsg, end)) { + if (!pusharray32(value->TLVs[i].value.ptr, + (value->TLVs[i].length + 3) / 4, + (value->TLVs[i].length + 3) / 4, + ppWritePackedMsg, + end)) { NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s():%d. value->TLVs[i].length %d \n", __FUNCTION__, __LINE__, value->TLVs[i].length); return 0; } @@ -5903,18 +5910,15 @@ static uint8_t unpack_hi_dci0_request(uint8_t **ppReadPackedMsg, uint8_t *end, v static uint8_t unpack_tx_data_pdu_list_value(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg) { nfapi_nr_pdu_t *pNfapiMsg = (nfapi_nr_pdu_t *)msg; - if(!(pull16(ppReadPackedMsg, (uint16_t *)&pNfapiMsg->PDU_length, end) && - pull16(ppReadPackedMsg, &pNfapiMsg->PDU_index, end) && - pull32(ppReadPackedMsg, &pNfapiMsg->num_TLV, end) - )) + if (!(pull32(ppReadPackedMsg, &pNfapiMsg->PDU_length, end) && pull16(ppReadPackedMsg, &pNfapiMsg->PDU_index, end) + && pull32(ppReadPackedMsg, &pNfapiMsg->num_TLV, end))) return 0; uint16_t i = 0; uint16_t total_number_of_tlvs = pNfapiMsg->num_TLV; for(; i < total_number_of_tlvs; ++i) { - if (!(pull16(ppReadPackedMsg, &pNfapiMsg->TLVs[i].tag, end) && - pull16(ppReadPackedMsg, &pNfapiMsg->TLVs[i].length, end))) + if (!(pull16(ppReadPackedMsg, &pNfapiMsg->TLVs[i].tag, end) && pull32(ppReadPackedMsg, &pNfapiMsg->TLVs[i].length, end))) return 0; switch(pNfapiMsg->TLVs[i].tag) { @@ -5928,9 +5932,11 @@ static uint8_t unpack_tx_data_pdu_list_value(uint8_t **ppReadPackedMsg, uint8_t } case 1: { - if (!pullarray32(ppReadPackedMsg,pNfapiMsg->TLVs[i].value.ptr, - pNfapiMsg->TLVs[i].length, - pNfapiMsg->TLVs[i].length, end)) + if (!pullarray32(ppReadPackedMsg, + pNfapiMsg->TLVs[i].value.ptr, + (pNfapiMsg->TLVs[i].length + 3) / 4, + (pNfapiMsg->TLVs[i].length + 3) / 4, + end)) return 0; break; From 3b0f4479c4f519ce713f54ddf0daa35a4e33bdce Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 22 May 2024 15:02:11 +0200 Subject: [PATCH 06/25] Add Ubuntu 24.04 to supported distributions Apart from the obvious change of adding ubuntu24.04 to supported distributions, we need to remove liblapacke-dev as it is incompatible with libatlas3-base. Installing both aborts with: The following packages have unmet dependencies: liblapacke : Breaks: libatlas3-base (< 3.10.3-14) but 3.10.3-13ubuntu1 is to be installed It seems that we don't need it though, as liblapacke-dev installs the right atlas library as a dependency. --- README.md | 1 + cmake_targets/tools/build_helper | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 542f18c4df..c47adb796d 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ Supported OS Ubuntu 18 Supported OS Ubuntu 20 Supported OS Ubuntu 22 + Supported OS Ubuntu 24 Supported OS RHEL8 Supported OS RELH9 Supported OS Fedora 37 diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 041621ffe4..e78efd9558 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -103,6 +103,7 @@ get_distribution_release() { check_supported_distribution() { local distribution=$(get_distribution_release) case "$distribution" in + "ubuntu24.04") return 0 ;; "ubuntu23.10") return 0 ;; "ubuntu22.04") return 0 ;; "ubuntu21.04") return 0 ;; @@ -602,7 +603,6 @@ check_install_oai_software() { ninja-build \ pkg-config \ git \ - libatlas-base-dev \ libblas-dev \ liblapack-dev \ liblapacke-dev \ From 473e7207db2b5689933f344fac72189b1628518a Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 22 May 2024 15:27:32 +0200 Subject: [PATCH 07/25] Remove Ubuntu 18.04 from supported distributions Ubuntu 18.04 is now in "Extended Security Maintenance", but otherwise gets no updates. Remove it from supported distributions (regarding installing packages); users can of course still use it. Users are encouraged to upgrade to Ubuntu 20+. --- CMakeLists.txt | 16 ---------------- README.md | 1 - cmake_targets/build_oai | 1 - cmake_targets/tools/build_helper | 22 ++-------------------- 4 files changed, 2 insertions(+), 38 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 683127851c..fc1e23d1dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -180,22 +180,6 @@ add_boolean_option(SANITIZE_ADDRESS False "enable the address sanitizer (ASan)" if (SANITIZE_ADDRESS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-omit-frame-pointer -fno-common") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer -fno-common") - # There seems to be some incompatibility with pthread_create and the RT scheduler, which - # results in pthread_create hanging. - # - # When we switch from Ubuntu 16.04 to 18.04, we found that running with the address sanitizer, - # the pthread_create function calls were not working. The inital thought was that we were - # trying to create a thread that was not-blocking and would eventually crash the machine during - # the run. After more debugging, we found that we would never even start the thread. We narrowed - # down the first two instances of pthread_create in the gNB and NR UE to be sctp_eNB_task and - # one_thread, respectively. We found that adding sleeps, and various other pauses to the threads - # had not effect. From there, we found that if we add an abort(); prior to the thread loop, we - # do not execute that. This indicated to us that the problem is not likely to be a non-blocking - # thread, but perhaps and issue with pthread_create itself. From there we begain to research the - # issue on the web. See: https://github.com/google/sanitizers/issues/1125 - # - # Google searching indicates this appears to be a problem since at least 2018. This could be something - # wrong in the pthread library, or something subtly wrong in this CMakeLists.txt. Use Ubuntu 20.04 instead. endif () add_boolean_option(SANITIZE_THREAD False "enable the address sanitizer (TSan)" ON) diff --git a/README.md b/README.md index c47adb796d..2da98022f7 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@

License - Supported OS Ubuntu 18 Supported OS Ubuntu 20 Supported OS Ubuntu 22 Supported OS Ubuntu 24 diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index 5c55cee1a5..609af470d0 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -418,7 +418,6 @@ function main() { CMAKE_CMD="$CMAKE_CMD -DSANITIZE_ADDRESS=True -DSANITIZE_UNDEFINED=True" shift;; --sanitize-address | -fsanitize=address) - grep -sq "Ubuntu 18.04" /etc/os-release && echo_error "Bug in OS with this option, see CMakeLists.txt" CMAKE_CMD="$CMAKE_CMD -DSANITIZE_ADDRESS=True" shift;; --sanitize-undefined | -fsanitize=undefined) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index e78efd9558..c4553765e4 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -108,7 +108,6 @@ check_supported_distribution() { "ubuntu22.04") return 0 ;; "ubuntu21.04") return 0 ;; "ubuntu20.04") return 0 ;; - "ubuntu18.04") return 0 ;; "debian11") return 0 ;; "fedora36") return 0 ;; "fedora37") return 0 ;; @@ -322,7 +321,7 @@ check_install_usrp_uhd_driver(){ $SUDO apt-get remove libuhd3.14.1 -y || true $SUDO apt-get remove libuhd3.15.0 -y || true local distribution=$(get_distribution_release) - if [[ "$distribution" == "ubuntu18.04" || "$distribution" == "ubuntu20.04" || "$distribution" == "ubuntu22.04" ]]; then + if [[ "$distribution" == "ubuntu20.04" || "$distribution" == "ubuntu22.04" ]]; then $SUDO apt-get remove libuhd4.?.? -y || true fi v=$(lsb_release -cs) @@ -352,7 +351,7 @@ check_install_usrp_uhd_driver(){ $SUDO apt-get update $SUDO apt-get -y install python-tk $boost_libs_ubuntu libusb-1.0-0-dev case "$(get_distribution_release)" in - "ubuntu18.04" | "ubuntu20.04" | "ubuntu22.04") + "ubuntu20.04" | "ubuntu22.04") $SUDO apt-get -y install libuhd-dev libuhd4.5.0 uhd-host ;; esac @@ -529,24 +528,11 @@ check_install_soapy () { install_soapy_iris_from_source } -# for ubuntu 18 we need a special repository (https://apt.kitware.com/) to install cmake >= 3.12 -add_cmake_repo () { - $SUDO $INSTALLER -y install wget - wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | $SUDO tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null - echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' | $SUDO tee /etc/apt/sources.list.d/kitware.list >/dev/null - $SUDO $INSTALLER -y update - $SUDO rm /usr/share/keyrings/kitware-archive-keyring.gpg - $SUDO $INSTALLER -y install kitware-archive-keyring -} - check_install_additional_tools (){ $SUDO $INSTALLER update -y local optional_packages="" if [[ "$OS_BASEDISTRO" == "debian" ]]; then case "$(get_distribution_release)" in - "ubuntu18.04") - optional_packages="python-dev python-pip python-pyroute2 python python-numpy python-scipy python-matplotlib ctags" - ;; "ubuntu20.04" | "ubuntu21.04" | "ubuntu22.04" | "debian11" ) optional_packages="python3 python3-pip python3-dev python3-scipy python3-matplotlib python3-pyroute2 universal-ctags" ;; @@ -587,10 +573,6 @@ check_install_oai_software() { if [[ "$OS_BASEDISTRO" == "debian" ]]; then $SUDO apt install -y software-properties-common case "$(get_distribution_release)" in - "ubuntu18.04") - add_cmake_repo - specific_packages="" - ;; "debian11") specific_packages="libz-dev" ;; From 53ff69ed0460caa40f76ba88d71170cc8d78c2be Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 22 May 2024 15:38:43 +0200 Subject: [PATCH 08/25] Bump required cmake version to v3.16 Debian 11: cmake 3.18 Fedora 40: cmake 3.29 RHEL 9: installs cmake3, which is typically very recent, likely 3.29 Ubuntu 20: cmake 3.16 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fc1e23d1dd..f9a5e88ee0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ # Author: laurent THOMAS, Lionel GAUTHIER -cmake_minimum_required (VERSION 3.12) +cmake_minimum_required (VERSION 3.16) project (OpenAirInterface LANGUAGES C CXX) ######################################################### From 4ac6e1c83d1c7cf1169a673f3216fa290806c14b Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 22 May 2024 17:44:12 +0200 Subject: [PATCH 09/25] Update build_oai help --- cmake_targets/build_oai | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index 609af470d0..5594b856af 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -52,7 +52,7 @@ TARGET_LIST="" function print_help() { echo_info " This script compiles OpenAirInterface Software, and can install dependencies -for a number of distributions (Ubuntu 18-22, Fedora, RHEL7/8). +for a number of distributions (Ubuntu 22-24, Fedora, RHEL9). Options: --arch-native Passes -march=native to the compiler. From 8ddc49e5e85141de235006f7c4ccf751ffb3fe89 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 22 May 2024 17:44:37 +0200 Subject: [PATCH 10/25] CBLAS_TRANSPOSE is a typedef'd enum It seems libatlas-base-dev provided an `enum CBLAS_TRANSPOSE`, but we don't install it anymore. Now, in Ubuntu, there is only a typedef'd version in cblas.h; for RHEL(-derivatives), the same typedef'd version is in cblas/cblas.h. --- .../linear_preprocessing_rec.c | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/openair1/PHY/LTE_UE_TRANSPORT/linear_preprocessing_rec.c b/openair1/PHY/LTE_UE_TRANSPORT/linear_preprocessing_rec.c index 59da43e564..9ac775c4be 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/linear_preprocessing_rec.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/linear_preprocessing_rec.c @@ -11,7 +11,12 @@ data storage. */ #include #include #include +#include +#if defined RHEL_RELEASE_CODE +#include +#else #include +#endif #include #include #include @@ -22,8 +27,8 @@ data storage. */ void transpose (int N, float complex *A, float complex *Result) { // COnputes C := alpha*op(A)*op(B) + beta*C, - enum CBLAS_TRANSPOSE transa = CblasTrans; - enum CBLAS_TRANSPOSE transb = CblasNoTrans; + CBLAS_TRANSPOSE transa = CblasTrans; + CBLAS_TRANSPOSE transb = CblasNoTrans; int rows_opA = N; // number of rows in op(A) and in C int col_opB = N; //number of columns of op(B) and in C int col_opA = N; //number of columns in op(A) and rows in op(B) @@ -62,8 +67,8 @@ void transpose (int N, float complex *A, float complex *Result) void conjugate_transpose (int N, float complex *A, float complex *Result) { // Computes C := alpha*op(A)*op(B) + beta*C, - enum CBLAS_TRANSPOSE transa = CblasConjTrans; - enum CBLAS_TRANSPOSE transb = CblasNoTrans; + CBLAS_TRANSPOSE transa = CblasConjTrans; + CBLAS_TRANSPOSE transb = CblasNoTrans; int rows_opA = N; // number of rows in op(A) and in C int col_opB = N; //number of columns of op(B) and in C int col_opA = N; //number of columns in op(A) and rows in op(B) @@ -100,8 +105,8 @@ void conjugate_transpose (int N, float complex *A, float complex *Result) void H_hermH_plus_sigma2I (int N, int M, float complex *A, float sigma2, float complex *Result) { //C := alpha*op(A)*op(B) + beta*C, - enum CBLAS_TRANSPOSE transa = CblasConjTrans; - enum CBLAS_TRANSPOSE transb = CblasNoTrans; + CBLAS_TRANSPOSE transa = CblasConjTrans; + CBLAS_TRANSPOSE transb = CblasNoTrans; int rows_opA = N; // number of rows in op(A) and in C int col_opB = N; //number of columns of op(B) and in C int col_opA = N; //number of columns in op(A) and rows in op(B) @@ -127,8 +132,8 @@ void H_hermH_plus_sigma2I (int N, int M, float complex *A, float sigma2, float c void HH_herm_plus_sigma2I (int M, int N, float complex *A, float sigma2, float complex *Result) { //C := alpha*op(A)*op(B) + beta*C, - enum CBLAS_TRANSPOSE transa = CblasNoTrans; - enum CBLAS_TRANSPOSE transb = CblasConjTrans; + CBLAS_TRANSPOSE transa = CblasNoTrans; + CBLAS_TRANSPOSE transb = CblasConjTrans; int k = N; //number of columns in op(A) and rows in op(B),k float complex alpha = 1.0+I*0; int lda = N; @@ -195,8 +200,8 @@ void eigen_vectors_values (int N, float complex *A, float complex *Vectors, floa } void mutl_matrix_matrix_row_based(float complex* M0, float complex* M1, int rows_M0, int col_M0, int rows_M1, int col_M1, float complex* Result ){ - enum CBLAS_TRANSPOSE transa = CblasNoTrans; - enum CBLAS_TRANSPOSE transb = CblasNoTrans; + CBLAS_TRANSPOSE transa = CblasNoTrans; + CBLAS_TRANSPOSE transb = CblasNoTrans; int rows_opA = rows_M0; // number of rows in op(A) and in C int col_opB = col_M1; //number of columns of op(B) and in C int col_opA = col_M0; //number of columns in op(A) and rows in op(B) @@ -226,8 +231,8 @@ void mutl_matrix_matrix_row_based(float complex* M0, float complex* M1, int rows } void mutl_matrix_matrix_col_based(float complex* M0, float complex* M1, int rows_M0, int col_M0, int rows_M1, int col_M1, float complex* Result ){ - enum CBLAS_TRANSPOSE transa = CblasNoTrans; - enum CBLAS_TRANSPOSE transb = CblasNoTrans; + CBLAS_TRANSPOSE transa = CblasNoTrans; + CBLAS_TRANSPOSE transb = CblasNoTrans; int rows_opA = rows_M0; // number of rows in op(A) and in C int col_opB = col_M1; //number of columns of op(B) and in C int col_opA = col_M0; //number of columns in op(A) and rows in op(B) From 0abe8b6493a431464b0166b1bfe8778c3e8171e2 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 22 May 2024 20:07:07 +0200 Subject: [PATCH 11/25] Fixup: we are now at fedora 40, update link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2da98022f7..c84dc7b073 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Supported OS Ubuntu 24 Supported OS RHEL8 Supported OS RELH9 - Supported OS Fedora 37 + Supported OS Fedora 40

From b6f156cf4a033c30747dcfbace9e5ba5bcbb4f7b Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 29 May 2024 08:11:13 +0200 Subject: [PATCH 12/25] Switch to branch that resolves flexric warnings A number of warnings appear when compiling flexric with gcc-12, which we use in the next commit. Those have been fixed upstream. Switch to the updated version to avoid warnings. --- openair2/E2AP/flexric | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/E2AP/flexric b/openair2/E2AP/flexric index f1c08ed2b9..beabdd072c 160000 --- a/openair2/E2AP/flexric +++ b/openair2/E2AP/flexric @@ -1 +1 @@ -Subproject commit f1c08ed2b9b1eceeda7941dd7bf435db0168dd56 +Subproject commit beabdd072ca9e381d4d27c9fbc6bb19382817489 From 94497435e7386629b82e2fb1e03b37365fdad89a Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 22 May 2024 20:11:51 +0200 Subject: [PATCH 13/25] Upgrade CI images to Ubuntu 22 This updates all images in the CI to Ubuntu 22. It also updates corresponding documentation. Remove python(2) from the image, as it is not needed. Update documentation. It seems that the gcc coming in Ubuntu 22 does not like stack-protector-strong, so remove it as well. Since we compile Flexric, which does not support Ubuntu 22's default gcc-11 (it hits a compile bug), switch to gcc-12 manually. Since we update the compiler, we also need to be careful to use the right address sanitizer version (which is bundled with the compiler version). To avoid a reinstallation of the wrong asan version in target images, we modify Ubuntu 22 targets to copy libasan from the base image. This is necessary since we use update-alternative in the base image, but we don't want to install compilers in the target images to use update-alternatives to install the right asan version... This should be undone when switching to Ubuntu 24 in the future, as it will have a newer default gcc version, such that we don't need to update the compile in the first place. Upgrade libpython in lteUE for U22 upgrade to make it compatible with UHD. --- ci-scripts/cls_containerize.py | 4 +-- ....ubuntu20 => Dockerfile.unittest.ubuntu22} | 2 +- .../4g_rfsimulator_fdd_05MHz/README.md | 2 +- ci-scripts/yaml_files/5g_l2sim_tdd/README.md | 4 +-- .../yaml_files/5g_rfsimulator/README.md | 2 +- doc/Aerial_FAPI_Split_Tutorial.md | 4 +-- doc/TESTBenches.md | 20 ++++++------- ...base.ubuntu20 => Dockerfile.base.ubuntu22} | 8 +++-- ...ild.ubuntu20 => Dockerfile.build.ubuntu22} | 4 +-- ...e.eNB.ubuntu20 => Dockerfile.eNB.ubuntu22} | 29 +++++++++++-------- ...buntu20 => Dockerfile.gNB.aerial.ubuntu22} | 2 +- ...file.gNB.aerial.ubuntu22.sanitize-address} | 2 +- ....ubuntu20 => Dockerfile.gNB.aw2s.ubuntu22} | 2 +- ...e.gNB.ubuntu20 => Dockerfile.gNB.ubuntu22} | 27 ++++++++++------- ...eRU.ubuntu20 => Dockerfile.lteRU.ubuntu22} | 19 ++++++------ ...eUE.ubuntu20 => Dockerfile.lteUE.ubuntu22} | 29 +++++++++++-------- ...p.ubuntu20 => Dockerfile.nr-cuup.ubuntu22} | 10 +++++-- ...nrUE.ubuntu20 => Dockerfile.nrUE.ubuntu22} | 29 +++++++++++-------- docker/README.md | 18 ++++++------ 19 files changed, 122 insertions(+), 95 deletions(-) rename ci-scripts/docker/{Dockerfile.unittest.ubuntu20 => Dockerfile.unittest.ubuntu22} (98%) rename docker/{Dockerfile.base.ubuntu20 => Dockerfile.base.ubuntu22} (91%) rename docker/{Dockerfile.build.ubuntu20 => Dockerfile.build.ubuntu22} (91%) rename docker/{Dockerfile.eNB.ubuntu20 => Dockerfile.eNB.ubuntu22} (84%) rename docker/{Dockerfile.gNB.aerial.ubuntu20 => Dockerfile.gNB.aerial.ubuntu22} (98%) rename docker/{Dockerfile.gNB.aerial.ubuntu20.sanitize-address => Dockerfile.gNB.aerial.ubuntu22.sanitize-address} (99%) rename docker/{Dockerfile.gNB.aw2s.ubuntu20 => Dockerfile.gNB.aw2s.ubuntu22} (99%) rename docker/{Dockerfile.gNB.ubuntu20 => Dockerfile.gNB.ubuntu22} (84%) rename docker/{Dockerfile.lteRU.ubuntu20 => Dockerfile.lteRU.ubuntu22} (86%) rename docker/{Dockerfile.lteUE.ubuntu20 => Dockerfile.lteUE.ubuntu22} (83%) rename docker/{Dockerfile.nr-cuup.ubuntu20 => Dockerfile.nr-cuup.ubuntu22} (86%) rename docker/{Dockerfile.nrUE.ubuntu20 => Dockerfile.nrUE.ubuntu22} (83%) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 5d353f2b77..82edcbb973 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -286,7 +286,7 @@ class Containerize(): self.host = result.group(0) if self.host == 'Ubuntu': self.cli = 'docker' - self.dockerfileprefix = '.ubuntu20' + self.dockerfileprefix = '.ubuntu22' self.cliBuildOptions = '' elif self.host == 'Red Hat': self.cli = 'sudo podman' @@ -677,7 +677,7 @@ class Containerize(): return False # build ran-unittests image - dockerfile = "ci-scripts/docker/Dockerfile.unittest.ubuntu20" + dockerfile = "ci-scripts/docker/Dockerfile.unittest.ubuntu22" ret = cmd.run(f'docker build --progress=plain --tag ran-unittests:{baseTag} --file {dockerfile} . &> {lSourcePath}/cmake_targets/log/unittest-build.log') if ret.returncode != 0: build_log_name = f'build_log_{self.testCase_id}' diff --git a/ci-scripts/docker/Dockerfile.unittest.ubuntu20 b/ci-scripts/docker/Dockerfile.unittest.ubuntu22 similarity index 98% rename from ci-scripts/docker/Dockerfile.unittest.ubuntu20 rename to ci-scripts/docker/Dockerfile.unittest.ubuntu22 index 57bc7f3bef..6098a1d1f6 100644 --- a/ci-scripts/docker/Dockerfile.unittest.ubuntu20 +++ b/ci-scripts/docker/Dockerfile.unittest.ubuntu22 @@ -21,7 +21,7 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface BUILD service -# Valid for Ubuntu 20.04 +# Valid for Ubuntu 22.04 # #--------------------------------------------------------------------- diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md index 3ac4962321..e761886855 100644 --- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md +++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md @@ -12,7 +12,7 @@ -This page is only valid for an `Ubuntu18` host. +This page is only valid for an `Ubuntu 22` host. **Table of Contents** diff --git a/ci-scripts/yaml_files/5g_l2sim_tdd/README.md b/ci-scripts/yaml_files/5g_l2sim_tdd/README.md index 7fdb1bb8be..6579fcac5f 100644 --- a/ci-scripts/yaml_files/5g_l2sim_tdd/README.md +++ b/ci-scripts/yaml_files/5g_l2sim_tdd/README.md @@ -12,10 +12,8 @@ -This page is valid for an `Ubuntu18` host. -It is also valid for `Ubuntu 20.04`. +It is also valid for `Ubuntu 22.04`. -This tutorial is only valid once this file is merged into the `develop` branch. # 1. Adapt the `docker-compose` to your environment # The yaml file is in the following directory: `ci-scripts/yaml_files/5g_l2sim_tdd` diff --git a/ci-scripts/yaml_files/5g_rfsimulator/README.md b/ci-scripts/yaml_files/5g_rfsimulator/README.md index eec4eb17d2..87e98633f3 100644 --- a/ci-scripts/yaml_files/5g_rfsimulator/README.md +++ b/ci-scripts/yaml_files/5g_rfsimulator/README.md @@ -12,7 +12,7 @@ -This page is only valid for an `Ubuntu18` host. +This page is only valid for an `Ubuntu 22` host. **NOTE: this version (2023-01-27) has been updated for the `v1.5.0` version of the `OAI 5G CN`.** diff --git a/doc/Aerial_FAPI_Split_Tutorial.md b/doc/Aerial_FAPI_Split_Tutorial.md index d04c723ca2..46541fff95 100644 --- a/doc/Aerial_FAPI_Split_Tutorial.md +++ b/doc/Aerial_FAPI_Split_Tutorial.md @@ -202,8 +202,8 @@ With the nvIPC sources in the project directory, the docker image can be built. In order to build the final image, there is an intermediary image to be built (ran-base) ```bash ~$ cd ~/openairinterface5g/ -~/openairinterface5g$ docker build . -f docker/Dockerfile.base.ubuntu20 --tag ran-base:latest -~/openairinterface5g$ docker build . -f docker/Dockerfile.gNB.aerial.ubuntu20 --tag oai-gnb-aerial:latest +~/openairinterface5g$ docker build . -f docker/Dockerfile.base.ubuntu22 --tag ran-base:latest +~/openairinterface5g$ docker build . -f docker/Dockerfile.gNB.aerial.ubuntu22 --tag oai-gnb-aerial:latest ``` diff --git a/doc/TESTBenches.md b/doc/TESTBenches.md index c9453b10e0..58b7eeb862 100644 --- a/doc/TESTBenches.md +++ b/doc/TESTBenches.md @@ -112,16 +112,16 @@ information on how the images are built. - [RAN-Ubuntu18-Image-Builder](https://jenkins-oai.eurecom.fr/job/RAN-Ubuntu18-Image-Builder/) ~BUILD-ONLY ~4G-LTE ~5G-NR - run formatting check from `ci-scripts/docker/Dockerfile.formatting.bionic` - - obelix: Ubuntu 20 image build using docker (Note: builds U20 images while pipeline is named U18!) - - base image from `Dockerfile.base.ubuntu20` - - build image from `Dockerfile.build.ubuntu20`, followed by - - target image from `Dockerfile.eNB.ubuntu20` - - target image from `Dockerfile.gNB.ubuntu20` - - target image from `Dockerfile.nr-cuup.ubuntu20` - - target image from `Dockerfile.nrUE.ubuntu20` - - target image from `Dockerfile.lteUE.ubuntu20` - - target image from `Dockerfile.lteRU.ubuntu20` - - build unit tests from `ci-scripts/docker/Dockerfile.unittest.ubuntu20`, and run them + - obelix: Ubuntu 22 image build using docker (Note: builds U22 images while pipeline is named U18!) + - base image from `Dockerfile.base.ubuntu22` + - build image from `Dockerfile.build.ubuntu22`, followed by + - target image from `Dockerfile.eNB.ubuntu22` + - target image from `Dockerfile.gNB.ubuntu22` + - target image from `Dockerfile.nr-cuup.ubuntu22` + - target image from `Dockerfile.nrUE.ubuntu22` + - target image from `Dockerfile.lteUE.ubuntu22` + - target image from `Dockerfile.lteRU.ubuntu22` + - build unit tests from `ci-scripts/docker/Dockerfile.unittest.ubuntu22`, and run them #### Image Test pipelines diff --git a/docker/Dockerfile.base.ubuntu20 b/docker/Dockerfile.base.ubuntu22 similarity index 91% rename from docker/Dockerfile.base.ubuntu20 rename to docker/Dockerfile.base.ubuntu22 index 5687e21ac2..9ed0cd6beb 100644 --- a/docker/Dockerfile.base.ubuntu20 +++ b/docker/Dockerfile.base.ubuntu22 @@ -21,12 +21,12 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface BUILD service -# Valid for Ubuntu 20.04 +# Valid for Ubuntu 22.04 # #--------------------------------------------------------------------- -FROM ubuntu:focal AS ran-base +FROM ubuntu:jammy AS ran-base ARG NEEDED_GIT_PROXY ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe/Paris @@ -34,6 +34,7 @@ ENV BUILD_UHD_FROM_SOURCE=True ENV UHD_VERSION=4.4.0.0 #install developers pkg/repo +#use gcc-12 to avoid problems of default gcc-11 in FlexRIC RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ DEBIAN_FRONTEND=noninteractive apt-get install --yes \ @@ -41,9 +42,12 @@ RUN apt-get update && \ build-essential \ psmisc \ git \ + gcc-12 \ + g++-12 \ xxd \ # python3-pip for conf template generation python3-pip && \ + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 --slave /usr/bin/g++ g++ /usr/bin/g++-12 && \ pip3 install --ignore-installed pyyaml # Add "Tini - A tiny but valid init for containers", https://github.com/krallin/tini diff --git a/docker/Dockerfile.build.ubuntu20 b/docker/Dockerfile.build.ubuntu22 similarity index 91% rename from docker/Dockerfile.build.ubuntu20 rename to docker/Dockerfile.build.ubuntu22 index 3459e0b265..e92aecceda 100644 --- a/docker/Dockerfile.build.ubuntu20 +++ b/docker/Dockerfile.build.ubuntu22 @@ -21,7 +21,7 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface BUILD service -# Valid for Ubuntu 20.04 +# Valid for Ubuntu 22.04 # #--------------------------------------------------------------------- @@ -42,6 +42,6 @@ RUN /bin/sh oaienv && \ -w USRP -t Ethernet \ --build-e2 --cmake-opt -DXAPP_MULTILANGUAGE=OFF \ --noavx512 \ - --cmake-opt -DCMAKE_C_FLAGS="-Werror -fstack-protector-strong" --cmake-opt -DCMAKE_CXX_FLAGS="-Werror -fstack-protector-strong" $BUILD_OPTION && \ + --cmake-opt -DCMAKE_C_FLAGS="-Werror" --cmake-opt -DCMAKE_CXX_FLAGS="-Werror" $BUILD_OPTION && \ # Mainly to see if the sanitize option was perfectly executed ldd ran_build/build/nr-softmodem diff --git a/docker/Dockerfile.eNB.ubuntu20 b/docker/Dockerfile.eNB.ubuntu22 similarity index 84% rename from docker/Dockerfile.eNB.ubuntu20 rename to docker/Dockerfile.eNB.ubuntu22 index 8822349c0b..f71abefbc1 100644 --- a/docker/Dockerfile.eNB.ubuntu20 +++ b/docker/Dockerfile.eNB.ubuntu22 @@ -21,7 +21,7 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface BUILD service -# Valid for Ubuntu 20.04 +# Valid for Ubuntu 22.04 # #--------------------------------------------------------------------- @@ -31,7 +31,7 @@ FROM ran-build:latest AS enb-build #start from scratch for target executable -FROM ubuntu:focal as oai-enb +FROM ubuntu:jammy as oai-enb ARG BUILD_OPTION ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe/Paris @@ -42,14 +42,14 @@ RUN apt-get update && \ software-properties-common \ procps \ libsctp1 \ - libboost-chrono1.71.0 \ - libboost-date-time1.71.0 \ - libboost-filesystem1.71.0 \ - libboost-regex1.71.0 \ - libboost-serialization1.71.0 \ - libboost-thread1.71.0 \ - libboost-system1.71.0 \ - libboost-program-options1.71.0 \ + libboost-chrono1.74.0 \ + libboost-date-time1.74.0 \ + libboost-filesystem1.74.0 \ + libboost-regex1.74.0 \ + libboost-serialization1.74.0 \ + libboost-thread1.74.0 \ + libboost-system1.74.0 \ + libboost-program-options1.74.0 \ tzdata \ libblas3 \ libatlas3-base \ @@ -61,19 +61,24 @@ RUN apt-get update && \ iputils-ping \ iproute2 \ gdb \ - python \ python3 \ python3-six \ python3-requests \ libusb-1.0-0 && \ # if the --sanitize option was used to build, additional packages are required /bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \ - libasan5 \ + #libasan5 \ # see below libubsan1 \ liblapacke; fi' && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* +# we select another compile (gcc-12) for compilation, requiring another libasan +# library version. Installing it above would install the wrong version. Hence, +# copy the right version from ran-build. When upgrading to Ubuntu24, install +# the correct one above! +COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libasan.so.8.0.0 /usr/lib/x86_64-linux-gnu/ + WORKDIR /opt/oai-enb/bin COPY --from=enb-build \ /oai-ran/cmake_targets/ran_build/build/lte-softmodem ./ diff --git a/docker/Dockerfile.gNB.aerial.ubuntu20 b/docker/Dockerfile.gNB.aerial.ubuntu22 similarity index 98% rename from docker/Dockerfile.gNB.aerial.ubuntu20 rename to docker/Dockerfile.gNB.aerial.ubuntu22 index 3984e236cb..f3cfe7a4be 100644 --- a/docker/Dockerfile.gNB.aerial.ubuntu20 +++ b/docker/Dockerfile.gNB.aerial.ubuntu22 @@ -58,7 +58,7 @@ RUN /bin/sh oaienv && \ #start from scratch for target executable -FROM ubuntu:focal as oai-gnb-aerial +FROM ubuntu:jammy as oai-gnb-aerial ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe diff --git a/docker/Dockerfile.gNB.aerial.ubuntu20.sanitize-address b/docker/Dockerfile.gNB.aerial.ubuntu22.sanitize-address similarity index 99% rename from docker/Dockerfile.gNB.aerial.ubuntu20.sanitize-address rename to docker/Dockerfile.gNB.aerial.ubuntu22.sanitize-address index 147d7231a4..0713d65a2c 100644 --- a/docker/Dockerfile.gNB.aerial.ubuntu20.sanitize-address +++ b/docker/Dockerfile.gNB.aerial.ubuntu22.sanitize-address @@ -58,7 +58,7 @@ RUN /bin/sh oaienv && \ #start from scratch for target executable -FROM ubuntu:focal as oai-gnb-aerial +FROM ubuntu:jammy as oai-gnb-aerial ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe diff --git a/docker/Dockerfile.gNB.aw2s.ubuntu20 b/docker/Dockerfile.gNB.aw2s.ubuntu22 similarity index 99% rename from docker/Dockerfile.gNB.aw2s.ubuntu20 rename to docker/Dockerfile.gNB.aw2s.ubuntu22 index c0bd7f7401..a000d9a643 100644 --- a/docker/Dockerfile.gNB.aw2s.ubuntu20 +++ b/docker/Dockerfile.gNB.aw2s.ubuntu22 @@ -21,7 +21,7 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface BUILD service -# Valid for Ubuntu18.04 +# Valid for Ubuntu 22.04 # #--------------------------------------------------------------------- diff --git a/docker/Dockerfile.gNB.ubuntu20 b/docker/Dockerfile.gNB.ubuntu22 similarity index 84% rename from docker/Dockerfile.gNB.ubuntu20 rename to docker/Dockerfile.gNB.ubuntu22 index dc24bb7636..f039d9dce0 100644 --- a/docker/Dockerfile.gNB.ubuntu20 +++ b/docker/Dockerfile.gNB.ubuntu22 @@ -31,7 +31,7 @@ FROM ran-build:latest AS gnb-build #start from scratch for target executable -FROM ubuntu:focal as oai-gnb +FROM ubuntu:jammy as oai-gnb ARG BUILD_OPTION ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe/Paris @@ -42,14 +42,14 @@ RUN apt-get update && \ software-properties-common \ procps \ libsctp1 \ - libboost-chrono1.71.0 \ - libboost-date-time1.71.0 \ - libboost-filesystem1.71.0 \ - libboost-regex1.71.0 \ - libboost-serialization1.71.0 \ - libboost-thread1.71.0 \ - libboost-system1.71.0 \ - libboost-program-options1.71.0 \ + libboost-chrono1.74.0 \ + libboost-date-time1.74.0 \ + libboost-filesystem1.74.0 \ + libboost-regex1.74.0 \ + libboost-serialization1.74.0 \ + libboost-thread1.74.0 \ + libboost-system1.74.0 \ + libboost-program-options1.74.0 \ tzdata \ libblas3 \ libatlas3-base \ @@ -61,19 +61,24 @@ RUN apt-get update && \ iproute2 \ iputils-ping \ gdb \ - python \ python3 \ python3-six \ python3-requests \ libusb-1.0-0 && \ # if the --sanitize option was used to build, additional packages are required /bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \ - libasan5 \ + #libasan5 \ # see below libubsan1 \ liblapacke; fi' && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* +# we select another compile (gcc-12) for compilation, requiring another libasan +# library version. Installing it above would install the wrong version. Hence, +# copy the right version from ran-build. When upgrading to Ubuntu24, install +# the correct one above! +COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libasan.so.8.0.0 /usr/lib/x86_64-linux-gnu/ + WORKDIR /opt/oai-gnb/bin COPY --from=gnb-build \ /oai-ran/cmake_targets/ran_build/build/nr-softmodem ./ diff --git a/docker/Dockerfile.lteRU.ubuntu20 b/docker/Dockerfile.lteRU.ubuntu22 similarity index 86% rename from docker/Dockerfile.lteRU.ubuntu20 rename to docker/Dockerfile.lteRU.ubuntu22 index 6fa2a167b7..44a7337e40 100644 --- a/docker/Dockerfile.lteRU.ubuntu20 +++ b/docker/Dockerfile.lteRU.ubuntu22 @@ -21,7 +21,7 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface BUILD service -# Valid for Ubuntu 20.04 +# Valid for Ubuntu 22.04 # #--------------------------------------------------------------------- @@ -31,7 +31,7 @@ FROM ran-build:latest AS ru-build #start from scratch for target executable -FROM ubuntu:focal as oai-lte-ru +FROM ubuntu:jammy as oai-lte-ru ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe/Paris @@ -46,7 +46,6 @@ RUN apt-get update && \ libconfig9 \ net-tools \ gdb \ - python \ python3 \ python3-six \ python3-requests \ @@ -74,13 +73,13 @@ COPY --from=ru-base /usr/local/lib/libuhd.so.4.4.0 /usr/local/lib COPY --from=ru-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ru/bin COPY --from=ru-base \ - /usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.71.0 \ - /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.71.0 \ - /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.71.0 \ - /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.71.0 \ - /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.71.0 \ - /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.71.0 \ - /usr/lib/x86_64-linux-gnu/libboost_system.so.1.71.0 \ + /usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.74.0 \ + /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.74.0 \ + /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.74.0 \ + /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.74.0 \ + /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.74.0 \ + /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.74.0 \ + /usr/lib/x86_64-linux-gnu/libboost_system.so.1.74.0 \ /usr/lib/x86_64-linux-gnu/ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \ diff --git a/docker/Dockerfile.lteUE.ubuntu20 b/docker/Dockerfile.lteUE.ubuntu22 similarity index 83% rename from docker/Dockerfile.lteUE.ubuntu20 rename to docker/Dockerfile.lteUE.ubuntu22 index 12652c3141..1a0b8c1841 100644 --- a/docker/Dockerfile.lteUE.ubuntu20 +++ b/docker/Dockerfile.lteUE.ubuntu22 @@ -31,7 +31,7 @@ FROM ran-build:latest AS lte-ue-build #start from scratch for target executable -FROM ubuntu:focal as oai-lte-ue +FROM ubuntu:jammy as oai-lte-ue ARG BUILD_OPTION ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe/Paris @@ -42,25 +42,24 @@ RUN apt-get update && \ software-properties-common \ procps \ libsctp1 \ - libboost-chrono1.71.0 \ - libboost-date-time1.71.0 \ - libboost-filesystem1.71.0 \ - libboost-regex1.71.0 \ - libboost-serialization1.71.0 \ - libboost-thread1.71.0 \ - libboost-system1.71.0 \ - libboost-program-options1.71.0 \ + libboost-chrono1.74.0 \ + libboost-date-time1.74.0 \ + libboost-filesystem1.74.0 \ + libboost-regex1.74.0 \ + libboost-serialization1.74.0 \ + libboost-thread1.74.0 \ + libboost-system1.74.0 \ + libboost-program-options1.74.0 \ tzdata \ liblapacke \ libatlas3-base \ libconfig9 \ openssl \ net-tools \ - python \ python3 \ python3-six \ python3-requests \ - libpython3.8 \ + libpython3.10 \ libusb-1.0-0 \ iputils-ping \ iproute2 \ @@ -68,12 +67,18 @@ RUN apt-get update && \ iperf && \ # if the --sanitize option was used to build, additional packages are required /bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \ - libasan5 \ + #libasan5 \ # see below libubsan1 \ liblapacke; fi' && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* +# we select another compile (gcc-12) for compilation, requiring another libasan +# library version. Installing it above would install the wrong version. Hence, +# copy the right version from ran-build. When upgrading to Ubuntu24, install +# the correct one above! +COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libasan.so.8.0.0 /usr/lib/x86_64-linux-gnu/ + WORKDIR /opt/oai-lte-ue/bin COPY --from=lte-ue-build \ /oai-ran/cmake_targets/ran_build/build/lte-uesoftmodem \ diff --git a/docker/Dockerfile.nr-cuup.ubuntu20 b/docker/Dockerfile.nr-cuup.ubuntu22 similarity index 86% rename from docker/Dockerfile.nr-cuup.ubuntu20 rename to docker/Dockerfile.nr-cuup.ubuntu22 index 0a371e669c..b618a578be 100644 --- a/docker/Dockerfile.nr-cuup.ubuntu20 +++ b/docker/Dockerfile.nr-cuup.ubuntu22 @@ -30,7 +30,7 @@ FROM ran-base:latest as gnb-base FROM ran-build:latest AS gnb-build -FROM ubuntu:focal as oai-nr-cuup +FROM ubuntu:jammy as oai-nr-cuup ARG BUILD_OPTION ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe @@ -45,11 +45,17 @@ RUN apt-get update && \ openssl && \ # if the --sanitize option was used to build, additional packages are required /bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \ - libasan5 \ + #libasan5 \ see below libubsan1 \ liblapacke; fi' && \ rm -rf /var/lib/apt/lists/* +# we select another compile (gcc-12) for compilation, requiring another libasan +# library version. Installing it above would install the wrong version. Hence, +# copy the right version from ran-build. When upgrading to Ubuntu24, install +# the correct one above! +COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libasan.so.8.0.0 /usr/lib/x86_64-linux-gnu/ + WORKDIR /opt/oai-gnb/bin COPY --from=gnb-build \ /oai-ran/cmake_targets/ran_build/build/nr-cuup \ diff --git a/docker/Dockerfile.nrUE.ubuntu20 b/docker/Dockerfile.nrUE.ubuntu22 similarity index 83% rename from docker/Dockerfile.nrUE.ubuntu20 rename to docker/Dockerfile.nrUE.ubuntu22 index dfbd5f93e6..13387d2523 100644 --- a/docker/Dockerfile.nrUE.ubuntu20 +++ b/docker/Dockerfile.nrUE.ubuntu22 @@ -21,7 +21,7 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface BUILD service -# Valid for Ubuntu 20.04 +# Valid for Ubuntu 22.04 # #--------------------------------------------------------------------- @@ -31,7 +31,7 @@ FROM ran-build:latest AS nr-ue-build #start from scratch for target executable -FROM ubuntu:focal as oai-nr-ue +FROM ubuntu:jammy as oai-nr-ue ARG BUILD_OPTION ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe/Paris @@ -42,14 +42,14 @@ RUN apt-get update && \ software-properties-common \ procps \ libsctp1 \ - libboost-chrono1.71.0 \ - libboost-date-time1.71.0 \ - libboost-filesystem1.71.0 \ - libboost-regex1.71.0 \ - libboost-serialization1.71.0 \ - libboost-thread1.71.0 \ - libboost-system1.71.0 \ - libboost-program-options1.71.0 \ + libboost-chrono1.74.0 \ + libboost-date-time1.74.0 \ + libboost-filesystem1.74.0 \ + libboost-regex1.74.0 \ + libboost-serialization1.74.0 \ + libboost-thread1.74.0 \ + libboost-system1.74.0 \ + libboost-program-options1.74.0 \ tzdata \ liblapacke \ libatlas3-base \ @@ -57,7 +57,6 @@ RUN apt-get update && \ openssl \ net-tools \ gdb \ - python \ python3 \ python3-six \ python3-requests \ @@ -68,11 +67,17 @@ RUN apt-get update && \ iperf && \ # if the --sanitize option was used to build, additional packages are required /bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \ - libasan5 \ + #libasan5 \ # see below libubsan1; fi' && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* +# we select another compile (gcc-12) for compilation, requiring another libasan +# library version. Installing it above would install the wrong version. Hence, +# copy the right version from ran-build. When upgrading to Ubuntu24, install +# the correct one above! +COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libasan.so.8.0.0 /usr/lib/x86_64-linux-gnu/ + WORKDIR /opt/oai-nr-ue/bin COPY --from=nr-ue-build \ /oai-ran/cmake_targets/ran_build/build/nr-uesoftmodem \ diff --git a/docker/README.md b/docker/README.md index 578cd47274..483a049f9d 100644 --- a/docker/README.md +++ b/docker/README.md @@ -75,18 +75,18 @@ Targets can be: The currently-supported OS are: - `rhel9` for Red Hat Entreprise Linux (including images for an OpenShift cluster) -- `ubuntu20` for Ubuntu 20.04 LTS +- `ubuntu22` for Ubuntu 22.04 LTS - `rocky` for Rocky-Linux 8.7 For more details regarding the build on an Openshift Cluster, see [OpenShift README](../openshift/README.md). -# 3. Building using `docker` under Ubuntu 20.04 # +# 3. Building using `docker` under Ubuntu 22.04 # ## 3.1. Pre-requisites ## * `git` installed * `docker-ce` installed -* Pulling `ubuntu:focal` from DockerHub +* Pulling `ubuntu:jammy` from DockerHub ## 3.2. Building the shared images ## @@ -96,8 +96,8 @@ There are two shared images: one that has all dependencies, and a second that co git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git cd openairinterface5g git checkout develop -docker build --target ran-base --tag ran-base:latest --file docker/Dockerfile.base.ubuntu20 . -docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.build.ubuntu20 . +docker build --target ran-base --tag ran-base:latest --file docker/Dockerfile.base.ubuntu22 . +docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.build.ubuntu22 . ``` After building both: @@ -115,12 +115,12 @@ Note that the steps are identical for `rocky-linux`. ### 3.2.1. Additional build otions -This is only available for the Ubuntu-20 version. +This is only available for the Ubuntu version of Dockerfiles. You can, for example, create a `sanitizer` version of the ran-build image. ```bash -docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.build.ubuntu20 --build-arg "BUILD_OPTION=--sanitize" . +docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.build.ubuntu22 --build-arg "BUILD_OPTION=--sanitize" . ``` Currently the `--sanitize` option for `build_oai` enables: @@ -146,7 +146,7 @@ You can also use this docker build arguments to pass any available option(s) on For example, the eNB: ```bash -docker build --target oai-enb --tag oai-enb:latest --file docker/Dockerfile.eNB.ubuntu20 . +docker build --target oai-enb --tag oai-enb:latest --file docker/Dockerfile.eNB.ubuntu22 . ``` After a while: @@ -171,7 +171,7 @@ Note that the steps are identical for `rocky-linux`. If you have used the sanitizer option, then you should also pass it when building the target image: ```bash -docker build --target oai-gnb --tag oai-gnb:latest --file docker/Dockerfile.gNB.ubuntu20 --build-arg "BUILD_OPTION=--sanitize" . +docker build --target oai-gnb --tag oai-gnb:latest --file docker/Dockerfile.gNB.ubuntu22 --build-arg "BUILD_OPTION=--sanitize" . ``` Normally the target image will be around 200 Mbytes bigger. From 70719c3b8ff14364266660e01e3317fe34b7362f Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Tue, 25 Jun 2024 10:26:54 +0200 Subject: [PATCH 14/25] fix(test): using older version of iperf2 for lte feMBMS RF-sim test iperf2 2.0.13, used in Ubuntu 20, does not need a "back channel"; we can therefore use it in feMBMS (which does a broadcast, without back channel). Ubuntu 22 comes with 2.1.5, which seems to require a back channel, or at least, we cannot use it reliably in feMBMS. Hence, downgrade to older iperf2 version. Signed-off-by: Raphael Defosseux --- docker/Dockerfile.eNB.ubuntu22 | 9 ++++++++- docker/Dockerfile.lteUE.ubuntu22 | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile.eNB.ubuntu22 b/docker/Dockerfile.eNB.ubuntu22 index f71abefbc1..c57e11a2a5 100644 --- a/docker/Dockerfile.eNB.ubuntu22 +++ b/docker/Dockerfile.eNB.ubuntu22 @@ -56,7 +56,7 @@ RUN apt-get update && \ libconfig9 \ openssl \ net-tools \ - iperf \ + wget \ iperf3 \ iputils-ping \ iproute2 \ @@ -65,6 +65,13 @@ RUN apt-get update && \ python3-six \ python3-requests \ libusb-1.0-0 && \ +# Installing older version of iperf2 for feMBMS test + wget --quiet http://fr.archive.ubuntu.com/ubuntu/pool/universe/i/iperf/iperf_2.0.13+dfsg1-1build1_amd64.deb && \ + dpkg -i iperf_2.0.13+dfsg1-1build1_amd64.deb && \ +# iperf --version returns 1 that fails docker build + iperf --version || true && \ + rm -f iperf_2.0.13+dfsg1-1build1_amd64.deb && \ + apt-get remove -y wget && \ # if the --sanitize option was used to build, additional packages are required /bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \ #libasan5 \ # see below diff --git a/docker/Dockerfile.lteUE.ubuntu22 b/docker/Dockerfile.lteUE.ubuntu22 index 1a0b8c1841..d3d4571782 100644 --- a/docker/Dockerfile.lteUE.ubuntu22 +++ b/docker/Dockerfile.lteUE.ubuntu22 @@ -64,7 +64,14 @@ RUN apt-get update && \ iputils-ping \ iproute2 \ iperf3 \ - iperf && \ + wget && \ +# Installing older version of iperf2 for feMBMS test + wget --quiet http://fr.archive.ubuntu.com/ubuntu/pool/universe/i/iperf/iperf_2.0.13+dfsg1-1build1_amd64.deb && \ + dpkg -i iperf_2.0.13+dfsg1-1build1_amd64.deb && \ +# iperf --version returns 1 that fails docker build + iperf --version || true && \ + rm -f iperf_2.0.13+dfsg1-1build1_amd64.deb && \ + apt-get remove -y wget && \ # if the --sanitize option was used to build, additional packages are required /bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \ #libasan5 \ # see below From 199f8c21cb3bb14a6dfac3732d626b62c2054c68 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 28 May 2024 12:55:32 +0200 Subject: [PATCH 15/25] Update cross-compilation builder to Ubuntu 22 Update instructions and CI for cross-compilation on Ubuntu 22. Note that for the dockerfile, we use egrep -L which has changed and does not exit with code 0 on no match. Instead, use -vqz to invert return code (0 if nothing found, otherwise 1). --- ci-scripts/cls_containerize.py | 2 +- doc/TESTBenches.md | 4 ++-- doc/cross-compile.md | 20 ++++++++-------- ...4 => Dockerfile.base.ubuntu22.cross-arm64} | 24 +++++++++---------- ... => Dockerfile.build.ubuntu22.cross-arm64} | 6 ++--- 5 files changed, 28 insertions(+), 28 deletions(-) rename docker/{Dockerfile.base.ubuntu20.cross-arm64 => Dockerfile.base.ubuntu22.cross-arm64} (83%) rename docker/{Dockerfile.build.ubuntu20.cross-arm64 => Dockerfile.build.ubuntu22.cross-arm64} (94%) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 82edcbb973..911a6555b5 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -321,7 +321,7 @@ class Containerize(): imageNames.append(('oai-nr-cuup', 'nr-cuup', 'oai-nr-cuup-asan', '--build-arg "BUILD_OPTION=--sanitize"')) result = re.search('build_cross_arm64', self.imageKind) if result is not None: - self.dockerfileprefix = '.ubuntu20.cross-arm64' + self.dockerfileprefix = '.ubuntu22.cross-arm64' # Workaround for some servers, we need to erase completely the workspace if self.forcedWorkspaceCleanup: diff --git a/doc/TESTBenches.md b/doc/TESTBenches.md index 58b7eeb862..17c869d55e 100644 --- a/doc/TESTBenches.md +++ b/doc/TESTBenches.md @@ -89,8 +89,8 @@ information on how the images are built. - [RAN-ARM-Cross-Compile-Builder](https://jenkins-oai.eurecom.fr/job/RAN-ARM-Cross-Compile-Builder/) ~BUILD-ONLY ~4G-LTE ~5G-NR - orion: Cross-compilation from Intel to ARM - - base image from `Dockerfile.base.ubuntu20.cross-arm64` - - build image from `Dockerfile.build.ubuntu20.cross-arm64` (no target images) + - base image from `Dockerfile.base.ubuntu22.cross-arm64` + - build image from `Dockerfile.build.ubuntu22.cross-arm64` (no target images) - [RAN-cppcheck](https://jenkins-oai.eurecom.fr/job/RAN-cppcheck/) ~BUILD-ONLY ~4G-LTE ~5G-NR - bellatrix diff --git a/doc/cross-compile.md b/doc/cross-compile.md index 7e8205eaa6..b452aabb9d 100644 --- a/doc/cross-compile.md +++ b/doc/cross-compile.md @@ -5,7 +5,7 @@ ## Environment -- OS: ubuntu 20.04 +- OS: ubuntu 22.04 ### Set up the environment @@ -15,21 +15,21 @@ Set up for install the package for aarch64. sudo dpkg --add-architecture arm64 echo -e \ - "deb [arch=arm64] http://ports.ubuntu.com/ focal main restricted\n"\ - "deb [arch=arm64] http://ports.ubuntu.com/ focal-updates main restricted\n"\ - "deb [arch=arm64] http://ports.ubuntu.com/ focal universe\n"\ - "deb [arch=arm64] http://ports.ubuntu.com/ focal-updates universe\n"\ - "deb [arch=arm64] http://ports.ubuntu.com/ focal multiverse\n"\ - "deb [arch=arm64] http://ports.ubuntu.com/ focal-updates multiverse\n"\ - "deb [arch=arm64] http://ports.ubuntu.com/ focal-backports main restricted universe multiverse"\ + "deb [arch=arm64] http://ports.ubuntu.com/ jammy main restricted\n"\ + "deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates main restricted\n"\ + "deb [arch=arm64] http://ports.ubuntu.com/ jammy universe\n"\ + "deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates universe\n"\ + "deb [arch=arm64] http://ports.ubuntu.com/ jammy multiverse\n"\ + "deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates multiverse\n"\ + "deb [arch=arm64] http://ports.ubuntu.com/ jammy-backports main restricted universe multiverse"\ | sudo tee /etc/apt/sources.list.d/arm-cross-compile-sources.list sudo cp /etc/apt/sources.list "/etc/apt/sources.list.`date`.backup" sudo sed -i -E "s/(deb)\ (http:.+)/\1\ [arch=amd64]\ \2/" /etc/apt/sources.list sudo apt update -sudo apt install -y gcc-9-aarch64-linux-gnu \ - g++-9-aarch64-linux-gnu +sudo apt install -y gcc-11-aarch64-linux-gnu \ + g++-11-aarch64-linux-gnu sudo apt-get install -y \ libatlas-base-dev:arm64 \ diff --git a/docker/Dockerfile.base.ubuntu20.cross-arm64 b/docker/Dockerfile.base.ubuntu22.cross-arm64 similarity index 83% rename from docker/Dockerfile.base.ubuntu20.cross-arm64 rename to docker/Dockerfile.base.ubuntu22.cross-arm64 index 70b790ba4d..83d891a110 100644 --- a/docker/Dockerfile.base.ubuntu20.cross-arm64 +++ b/docker/Dockerfile.base.ubuntu22.cross-arm64 @@ -21,12 +21,12 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface BUILD service -# Valid for Ubuntu 20.04 to cross-compile for ARM64 +# Valid for Ubuntu 22.04 to cross-compile for ARM64 # #--------------------------------------------------------------------- -# Very important, the focal image shall not be using mirrors. A lot of them do NOT support ARM64. -FROM ubuntu:focal AS ran-base +# Very important, the jammy image shall not be using mirrors. A lot of them do NOT support ARM64. +FROM ubuntu:jammy AS ran-base ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe/Paris # Specifying a working version of SIMDE for ARM: @@ -37,13 +37,13 @@ RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ #enabling arm64 architecture dpkg --add-architecture arm64 && \ - echo "deb [arch=arm64] http://ports.ubuntu.com/ focal main restricted\n" \ - "deb [arch=arm64] http://ports.ubuntu.com/ focal-updates main restricted\n" \ - "deb [arch=arm64] http://ports.ubuntu.com/ focal universe\n" \ - "deb [arch=arm64] http://ports.ubuntu.com/ focal-updates universe\n" \ - "deb [arch=arm64] http://ports.ubuntu.com/ focal multiverse\n" \ - "deb [arch=arm64] http://ports.ubuntu.com/ focal-updates multiverse\n" \ - "deb [arch=arm64] http://ports.ubuntu.com/ focal-backports main restricted universe multiverse" \ + echo "deb [arch=arm64] http://ports.ubuntu.com/ jammy main restricted\n" \ + "deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates main restricted\n" \ + "deb [arch=arm64] http://ports.ubuntu.com/ jammy universe\n" \ + "deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates universe\n" \ + "deb [arch=arm64] http://ports.ubuntu.com/ jammy multiverse\n" \ + "deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates multiverse\n" \ + "deb [arch=arm64] http://ports.ubuntu.com/ jammy-backports main restricted universe multiverse" \ | tee /etc/apt/sources.list.d/arm-cross-compile-sources.list && \ cp /etc/apt/sources.list "/etc/apt/sources.list.`date`.backup" && \ sed -i -E "s/(deb)\ (http:.+)/\1\ [arch=amd64]\ \2/" /etc/apt/sources.list && \ @@ -69,8 +69,8 @@ RUN apt-get update && \ zlib1g-dev:arm64 \ # cross build libs and compilers libc6-dev-i386 \ - gcc-9-aarch64-linux-gnu \ - g++-9-aarch64-linux-gnu && \ + gcc-11-aarch64-linux-gnu \ + g++-11-aarch64-linux-gnu && \ apt-get clean # Add "Tini - A tiny but valid init for containers", https://github.com/krallin/tini diff --git a/docker/Dockerfile.build.ubuntu20.cross-arm64 b/docker/Dockerfile.build.ubuntu22.cross-arm64 similarity index 94% rename from docker/Dockerfile.build.ubuntu20.cross-arm64 rename to docker/Dockerfile.build.ubuntu22.cross-arm64 index c278bf66be..371651e5ec 100644 --- a/docker/Dockerfile.build.ubuntu20.cross-arm64 +++ b/docker/Dockerfile.build.ubuntu22.cross-arm64 @@ -21,7 +21,7 @@ #--------------------------------------------------------------------- # # Dockerfile for the Open-Air-Interface BUILD service -# Valid for Ubuntu 20.04 to cross-compile for ARM64 +# Valid for Ubuntu 22.04 to cross-compile for ARM64 # #--------------------------------------------------------------------- @@ -47,6 +47,6 @@ RUN /bin/sh oaienv && \ ninja dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim lte-softmodem nr-softmodem nr-cuup oairu lte-uesoftmodem nr-uesoftmodem params_libconfig coding rfsimulator > ../../log/all.txt 2>&1; \ # displaying errors and warnings egrep -A3 "warning:|error:" ../../log/all.txt || true && \ - # will fail only for errors - egrep -L "error:" ../../log/all.txt && \ + # will fail only if string "errors:" is found + egrep "error:" -vqz ../../log/all.txt && \ echo "====== End of log for cross-build executables ======" From ee57ae6598d3a4b2c2d39ed3a7f47b15162a66d0 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 28 May 2024 13:30:38 +0200 Subject: [PATCH 16/25] doc/cross-compile.md: update some text, compile with ninja --- cmake_targets/cross-arm.cmake | 4 ++-- doc/cross-compile.md | 14 +++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/cmake_targets/cross-arm.cmake b/cmake_targets/cross-arm.cmake index 6209245876..5384c09c5a 100644 --- a/cmake_targets/cross-arm.cmake +++ b/cmake_targets/cross-arm.cmake @@ -1,8 +1,8 @@ set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_PROCESSOR arm) -set(CMAKE_C_COMPILER /usr/bin/aarch64-linux-gnu-gcc-9) -set(CMAKE_CXX_COMPILER /usr/bin/aarch64-linux-gnu-g++-9) +set(CMAKE_C_COMPILER /usr/bin/aarch64-linux-gnu-gcc-11) +set(CMAKE_CXX_COMPILER /usr/bin/aarch64-linux-gnu-g++-11) set(CROSS_COMPILE 1) set(bnProc_gen_128_DIR ${CMAKE_CURRENT_BINARY_DIR}/${NATIVE_DIR}) # /../build) diff --git a/doc/cross-compile.md b/doc/cross-compile.md index b452aabb9d..ce61ce2e40 100644 --- a/doc/cross-compile.md +++ b/doc/cross-compile.md @@ -46,11 +46,15 @@ sudo apt-get install -y \ zlib1g-dev:arm64 ``` +The above enables apt to download packages for arm64. It also installs +gcc cross-compilers for aarch64 in version 11. This version needs to match the +versions of gcc defined in the cmake cross-compilation file (`cross-arm.cmake`). + ## Install and Build ### Install required packages -Use the host compiler to install some dependencies. +Use the host compiler to install its dependencies. ```shell cd cmake_targets @@ -85,9 +89,9 @@ be defined in order to tell cmake where the host tools have been built. ```shell cd ../build-cross -cmake ../../.. -DCMAKE_TOOLCHAIN_FILE=../../../cmake_targets/cross-arm.cmake -DNATIVE_DIR=../build +cmake ../../.. -GNinja -DCMAKE_TOOLCHAIN_FILE=../../../cmake_targets/cross-arm.cmake -DNATIVE_DIR=../build -make -j`nproc` dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim -make -j`nproc` lte-softmodem nr-softmodem nr-cuup oairu lte-uesoftmodem nr-uesoftmodem -make -j`nproc` params_libconfig coding rfsimulator +ninja -j`nproc` dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim +ninja -j`nproc` lte-softmodem nr-softmodem nr-cuup oairu lte-uesoftmodem nr-uesoftmodem +ninja -j`nproc` params_libconfig coding rfsimulator ``` From 6ba76d6ac1213cec0b515fa7819c15993ca913cc Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 25 Jun 2024 18:46:03 +0200 Subject: [PATCH 17/25] Update FEATURE_SET - CellGroupConfig is handled through DU (hence MAC) - mention number of DUs/CU-UPs handled per CU-CP - mention number of UEs handled - take out BWPs, as we don't support it properly - typos --- doc/FEATURE_SET.md | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/doc/FEATURE_SET.md b/doc/FEATURE_SET.md index ac6d2c6f83..ffacc9039b 100644 --- a/doc/FEATURE_SET.md +++ b/doc/FEATURE_SET.md @@ -117,9 +117,7 @@ Furthermore, the gNB and UE support - evalution of RSRP report - evaluation of CQI report - MAC scheduling of SR reception -- Bandwidth part (BWP) operation - - Handle multiple dedicated BWPs, supports one UE - - BWP switching through RRCReconfiguration method +- Support of up to 16 UEs (can be increased to 32) ## gNB RLC @@ -154,18 +152,15 @@ Furthermore, the gNB and UE support - NR RRC (38.331) Rel 17 messages using new [asn1c](https://github.com/mouse07410/asn1c) - LTE RRC (36.331) also updated to Rel 15 -- Generation of CellGroupConfig (for eNB) and MIB -- Generation of system information block 1 (SIB1) -- Generation of system information block 2 (SIB2) -- Application to read configuration file and program gNB RRC +- Generation of MIB/SIB1 (received from DU) - RRC can configure PDCP, RLC, MAC -- Interface with GTP-U (tunnel creation/handling for S1-U (NSA), N3 (SA) interfaces) +- Interface with GTP-U (tunnel creation/handling for S1-U (NSA), N3 (SA), F1 interfaces) - Integration of RRC messages and procedures supporting UE 5G SA connection - RRCSetupRequest/RRCSetup/RRCSetupComplete - RRC Uplink/Downlink Information transfer carrying NAS messages transparently - RRC Reconfiguration/Reconfiguration complete - RRC Reestablishment/Reestablishment complete - - Support for master cell group configuration + - Support for MasterCellGroup configuration (from DU) - Interface with NGAP for the interactions with the AMF - Interface with F1AP for CU/DU split deployment option - Periodic RRC measurements of serving cell (no A/B events) @@ -200,7 +195,8 @@ Furthermore, the gNB and UE support - F1 UE Context release req/cmd/complete - F1 gNB CU configuration update - Interface with RRC -- Interface with gtp-u (tunnel creation/handling for F1-U interface) +- Interface with GTP-u (tunnel creation/handling for F1-U interface) +- One CU(-CP) can handle multiple DUs ## gNB E1AP @@ -216,6 +212,7 @@ Furthermore, the gNB and UE support - E1 Bearer Context Modification Request - E1 Bearer Context Modification Response - Interface with RRC and PDCP +- One CU-CP can handle multiple CU-UPs ## gNB GTP-U From 9e694c228e8c6898c19dd19ab033fc4b0473c31b Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 25 Jun 2024 18:14:20 +0200 Subject: [PATCH 18/25] Stream line information on how to get sources - come straight to point: how to clone (don't talk about git config) - refer to contributing documentation where necessary instead of repeating information --- doc/GET_SOURCES.md | 58 +++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/doc/GET_SOURCES.md b/doc/GET_SOURCES.md index 98fd933882..980e302b42 100644 --- a/doc/GET_SOURCES.md +++ b/doc/GET_SOURCES.md @@ -1,58 +1,58 @@ -The OpenAirInterface software can be obtained from our gitLab -server. You will need a git client to get the sources. The repository -is currently used for main developments. +The OpenAirInterface software can be obtained from our gitLab server. You will +need a git client to get the sources. The repository is used for main +developments. # Prerequisites -You need to install git using the following commands: +You need to install `git` using the following commands: ```shell sudo apt-get update sudo apt-get install git ``` -# Using EURECOM Gitlab +# Clone the Git repository (for OAI Users without login to gitlab server) The [openairinterface5g repository](https://gitlab.eurecom.fr/oai/openairinterface5g.git) holds the source code for the RAN (4G and 5G). -Configure git with your name/email address (only important if you are developer and want to contribute/push code to Git Repository): +## All users, anonymous access + +Clone the RAN repository: + +```shell +git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git +``` + +## For contributors + +Configure git with your name/email address, important if you are developer and +want to contribute by pushing code. Please put your full name and the e-mail +address you use in Gitlab. ```shell git config --global user.name "Your Name" git config --global user.email "Your email address" ``` -## In order to clone the Git repository (for OAI Users without login to gitlab server) - -Cloning RAN repository: - -```shell -git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git -``` - -## In order to contribute to the Git RAN repository (for OAI Developers/admins with login to gitlab server) - -Please send email to [contact@openairinterface.org](mailto:contact@openairinterface.org) to be added to the repository -as a developer (only important for users who want to commit code to the repository). If -you do not have account on gitlab.eurecom.fr, please register yourself to gitlab.eurecom.fr and provide the login name in the email. - -More information can be found in [a separate page](../CONTRIBUTING.md). +More information can be found in [the contributing page](../CONTRIBUTING.md). # Which branch to checkout? -`develop`: contains recent commits that are tested on our CI test bench. The update frequency is about once a week. 5G is only in this branch. It is the recommended and default branch. -`master`: contains a stable version of 4G, and will be updated in the future with 5G. +- `develop`: contains recent commits that are tested on our CI test bench. The + update frequency is about once a week. 5G is only in this branch. **It is the + recommended and default branch.** +- `master`: contains a known stable version. -Please see the work flow and policies page: https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/oai-policies-home - -You can find the latest stable tag release here: https://gitlab.eurecom.fr/oai/openairinterface5g/tags +You can find the latest stable tag release here: +https://gitlab.eurecom.fr/oai/openairinterface5g/tags The tag naming conventions are: -- On `master` branch: **v1.`x`.`y`** where - * `x` is the minor release number, incremented every 2-3 months when we are merging `develop` into `master` branch. - * `y` is the maintenance number, starting at 0 when we do a minor release and being incremented when a bug fix is incorporated into `master` branch. +- On `master` branch: **v`x`.`y`.`z`** - On `develop` branch **`yyyy`.w`xx`** * `yyyy` is the calendar year * `xx` the week number within the year + +More information on work flow and policies can be found in [this +document](./code-style-contrib.md). From ca54d75f3ef0694483586fbb8418e95396198011 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 25 Jun 2024 18:14:26 +0200 Subject: [PATCH 19/25] README.md: update folder structure info --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 542f18c4df..1c4e7777a2 100644 --- a/README.md +++ b/README.md @@ -70,11 +70,11 @@ openairinterface5g ├── executables : Top-level executable source files (gNB, eNB, ...) ├── maketags : Script to generate emacs tags. ├── nfapi : (n)FAPI code for MAC-PHY interface -├── openair1 : 3GPP LTE Rel-10/12 PHY layer / 3GPP NR Rel-15 layer. A local Readme file provides more details. -├── openair2 : 3GPP LTE Rel-10 RLC/MAC/PDCP/RRC/X2AP + LTE Rel-14 M2AP implementation. Also 3GPP NR Rel-15 RLC/MAC/PDCP/RRC/X2AP. -├── openair3 : 3GPP LTE Rel10 for S1AP, NAS GTPV1-U for both ENB and UE. +├── openair1 : Layer 1 (3GPP LTE Rel-10/12 PHY, NR Rel-15 PHY) +├── openair2 : Layer 2 (3GPP LTE Rel-10 MAC/RLC/PDCP/RRC/X2AP, LTE Rel-14 M2AP, NR Rel-15+ MAC/RLC/PDCP/SDAP/RRC/X2AP/F1AP/E1AP), E2AP +├── openair3 : Layer 3 (3GPP LTE Rel-10 S1AP/GTP, NR Rel-15 NGAP/GTP) ├── openshift : OpenShift helm charts for some deployment options of OAI -├── radio : Drivers for various radios such as USRP, AW2S, RFsim, ... +├── radio : Drivers for various radios such as USRP, AW2S, RFsim, 7.2 FHI, ... └── targets : Some configuration files; only historical relevance, and might be deleted in the future ``` From 760aee6d29d59ff7ef3b64bf165265eb81717457 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 25 Jun 2024 18:45:51 +0200 Subject: [PATCH 20/25] Correct link in build instructions --- doc/BUILD.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/BUILD.md b/doc/BUILD.md index 1cc9a688c5..fb41985bf9 100644 --- a/doc/BUILD.md +++ b/doc/BUILD.md @@ -149,7 +149,7 @@ cd openairinterface5g/cmake_targets/ After completing the build, the binaries are available in the `cmake_targets/ran_build/build` directory. -Detailed information about these simulators can be found [in this dedicated page](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/OpenAirLTEPhySimul) +Detailed information about these simulators can be found [in the dedicated page](./physical-simulators.md) ## Building UEs, eNodeB and gNodeB Executables From 28489a29ba5a7fa3b60a6c841c9a7e7e2ce73b4b Mon Sep 17 00:00:00 2001 From: Bartosz Podrygajlo Date: Fri, 14 Jun 2024 16:54:35 +0200 Subject: [PATCH 21/25] Remove references to unused library OML --- executables/lte-enb.c | 1 - executables/lte-softmodem.c | 2 +- executables/lte-ue.c | 1 - executables/lte-uesoftmodem.c | 2 +- executables/nr-gnb.c | 1 - 5 files changed, 2 insertions(+), 5 deletions(-) diff --git a/executables/lte-enb.c b/executables/lte-enb.c index 532d8bcfc0..5e686d6527 100644 --- a/executables/lte-enb.c +++ b/executables/lte-enb.c @@ -79,7 +79,6 @@ #include "common/utils/LOG/log.h" #include "UTIL/OTG/otg_tx.h" #include "UTIL/OTG/otg_externs.h" -#include "UTIL/MATH/oml.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" #include "enb_config.h" diff --git a/executables/lte-softmodem.c b/executables/lte-softmodem.c index 615f6106fe..43b1f5c675 100644 --- a/executables/lte-softmodem.c +++ b/executables/lte-softmodem.c @@ -69,7 +69,7 @@ unsigned short config_frames[4] = {2,9,11,13}; #include "common/utils/LOG/log.h" #include "UTIL/OTG/otg_tx.h" #include "UTIL/OTG/otg_externs.h" -#include "UTIL/MATH/oml.h" +#include "SIMULATION/TOOLS/sim.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" #include "enb_config.h" diff --git a/executables/lte-ue.c b/executables/lte-ue.c index df5c47c3ca..6c5cfd3f32 100644 --- a/executables/lte-ue.c +++ b/executables/lte-ue.c @@ -56,7 +56,6 @@ #include "nfapi/oai_integration/vendor_ext.h" #include "UTIL/OTG/otg_tx.h" #include "UTIL/OTG/otg_externs.h" -#include "UTIL/MATH/oml.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" #include "lte-softmodem.h" diff --git a/executables/lte-uesoftmodem.c b/executables/lte-uesoftmodem.c index 47f6c884c4..600722f651 100644 --- a/executables/lte-uesoftmodem.c +++ b/executables/lte-uesoftmodem.c @@ -66,7 +66,7 @@ #include "nfapi/oai_integration/vendor_ext.h" #include "UTIL/OTG/otg_tx.h" #include "UTIL/OTG/otg_externs.h" -#include "UTIL/MATH/oml.h" +#include "SIMULATION/TOOLS/sim.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c index 53c0500f9c..2e9716c40c 100644 --- a/executables/nr-gnb.c +++ b/executables/nr-gnb.c @@ -71,7 +71,6 @@ #include "common/utils/LOG/log.h" #include "UTIL/OTG/otg_tx.h" #include "UTIL/OTG/otg_externs.h" -#include "UTIL/MATH/oml.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" #include "gnb_paramdef.h" From d6f425adc6eb50a511fcd1e34ed2461468104622 Mon Sep 17 00:00:00 2001 From: Bartosz Podrygajlo Date: Fri, 14 Jun 2024 17:11:20 +0200 Subject: [PATCH 22/25] Remove unused directory ALG_DS --- openair2/UTIL/ALG_DS/CMakeLists.txt | 2 -- openair2/UTIL/ALG_DS/README.md | 2 -- openair2/UTIL/CMakeLists.txt | 2 -- 3 files changed, 6 deletions(-) delete mode 100644 openair2/UTIL/ALG_DS/CMakeLists.txt delete mode 100644 openair2/UTIL/ALG_DS/README.md diff --git a/openair2/UTIL/ALG_DS/CMakeLists.txt b/openair2/UTIL/ALG_DS/CMakeLists.txt deleted file mode 100644 index 2b16a1b9c9..0000000000 --- a/openair2/UTIL/ALG_DS/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -add_subdirectory(DS) - diff --git a/openair2/UTIL/ALG_DS/README.md b/openair2/UTIL/ALG_DS/README.md deleted file mode 100644 index dd9403dad3..0000000000 --- a/openair2/UTIL/ALG_DS/README.md +++ /dev/null @@ -1,2 +0,0 @@ -Algorithms and Data Structures in C for common usage - diff --git a/openair2/UTIL/CMakeLists.txt b/openair2/UTIL/CMakeLists.txt index 7ba707d9da..e69de29bb2 100644 --- a/openair2/UTIL/CMakeLists.txt +++ b/openair2/UTIL/CMakeLists.txt @@ -1,2 +0,0 @@ -add_subdirectory(ALG_DS) - From deacf439a42a97a6013b892a0f77c5c524978e3d Mon Sep 17 00:00:00 2001 From: Bartosz Podrygajlo Date: Tue, 7 May 2024 08:32:45 +0200 Subject: [PATCH 23/25] CMakeLists for common/utils/LOG --- CMakeLists.txt | 11 +++-------- common/utils/CMakeLists.txt | 1 + common/utils/LOG/CMakeLists.txt | 10 ++++++++++ 3 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 common/utils/LOG/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 683127851c..4363719cc2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -650,7 +650,6 @@ add_library(HASHTABLE include_directories(${OPENAIR_DIR}/common/utils/hashtable) add_library(UTIL - ${OPENAIR_DIR}/common/utils/LOG/log.c ${OPENAIR_DIR}/common/utils/LOG/vcd_signal_dumper.c ${OPENAIR2_DIR}/UTIL/MATH/oml.c ${OPENAIR2_DIR}/UTIL/OPT/probe.c @@ -662,8 +661,6 @@ add_library(UTIL ) if (ENABLE_LTTNG) find_package(LTTngUST 2.3.8 EXACT REQUIRED) - target_sources(UTIL PRIVATE common/utils/LOG/lttng-tp.c) - target_link_libraries(UTIL PUBLIC lttng-ust) else() message(STATUS "LTTNG support disabled") endif() @@ -674,7 +671,7 @@ if (cap_FOUND) target_link_libraries(UTIL PRIVATE cap) target_compile_definitions(UTIL PRIVATE HAVE_LIB_CAP) endif() -target_link_libraries(UTIL PUBLIC ${T_LIB} pthread) +target_link_libraries(UTIL PUBLIC ${T_LIB} pthread LOG) set(SECURITY_SRC ${OPENAIR3_DIR}/SECU/secu_defs.c @@ -1207,10 +1204,9 @@ set(PHY_MEX_UE ${OPENAIR1_DIR}/PHY/TOOLS/simde_operations.c ${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation_avx2.c ${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_ue_measurements.c - ${OPENAIR_DIR}/common/utils/LOG/log.c ) add_library(PHY_MEX ${PHY_MEX_UE}) -target_link_libraries(PHY_MEX PRIVATE asn1_lte_rrc_hdrs) +target_link_libraries(PHY_MEX PRIVATE asn1_lte_rrc_hdrs LOG) #Layer 2 library ##################### @@ -1949,10 +1945,9 @@ set(CMAKE_MODULE_PATH "${OPENAIR_DIR}/cmake_targets/tools/MODULES" "${CMAKE_MODU # add executables for operation ################################# add_library(minimal_lib - ${OPENAIR_DIR}/common/utils/LOG/log.c ${OPENAIR_DIR}/common/utils/minimal_stub.c ) -target_link_libraries(minimal_lib pthread dl ${T_LIB}) +target_link_libraries(minimal_lib PUBLIC pthread dl ${T_LIB} LOG) add_executable(nfapi_test ${OPENAIR_DIR}/openair2/NR_PHY_INTERFACE/nfapi_5g_test.c diff --git a/common/utils/CMakeLists.txt b/common/utils/CMakeLists.txt index c945f644bc..9d882a4272 100644 --- a/common/utils/CMakeLists.txt +++ b/common/utils/CMakeLists.txt @@ -11,3 +11,4 @@ endif() add_subdirectory(T) add_subdirectory(nr) +add_subdirectory(LOG) diff --git a/common/utils/LOG/CMakeLists.txt b/common/utils/LOG/CMakeLists.txt new file mode 100644 index 0000000000..c525969015 --- /dev/null +++ b/common/utils/LOG/CMakeLists.txt @@ -0,0 +1,10 @@ +set(log_sources log.c) +if (ENABLE_LTTNG) + set(log_sources ${log_sources} lttng-tp.c) +endif() +add_library(LOG ${log_sources}) +target_include_directories(LOG PUBLIC .) +target_link_libraries(LOG PRIVATE ${T_LIB}) +if (ENABLE_LTTNG) + target_link_libraries(LOG PUBLIC lttng-ust) +endif() From b1f7cc90256aeedc9256a2a830a26208cf5282c3 Mon Sep 17 00:00:00 2001 From: Bartosz Podrygajlo Date: Mon, 6 May 2024 11:49:26 -0400 Subject: [PATCH 24/25] Add unit testcase for thread-pool. Extract thread-pool into a separate CMake library. Extract utils into a separate CMake library. --- CMakeLists.txt | 10 +- common/utils/CMakeLists.txt | 4 + common/utils/threadPool/CMakeLists.txt | 6 + common/utils/threadPool/Makefile | 3 - common/utils/threadPool/test/CMakeLists.txt | 6 + .../utils/threadPool/test/test_thread-pool.c | 133 ++++++++++++++++++ common/utils/threadPool/thread-pool.c | 129 ----------------- 7 files changed, 151 insertions(+), 140 deletions(-) create mode 100644 common/utils/threadPool/CMakeLists.txt delete mode 100644 common/utils/threadPool/Makefile create mode 100644 common/utils/threadPool/test/CMakeLists.txt create mode 100644 common/utils/threadPool/test/test_thread-pool.c diff --git a/CMakeLists.txt b/CMakeLists.txt index 4363719cc2..78933f5577 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -651,13 +651,7 @@ include_directories(${OPENAIR_DIR}/common/utils/hashtable) add_library(UTIL ${OPENAIR_DIR}/common/utils/LOG/vcd_signal_dumper.c - ${OPENAIR2_DIR}/UTIL/MATH/oml.c ${OPENAIR2_DIR}/UTIL/OPT/probe.c - ${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c - ${OPENAIR_DIR}/common/utils/utils.c - ${OPENAIR_DIR}/common/utils/system.c - ${OPENAIR_DIR}/common/utils/time_meas.c - ${OPENAIR_DIR}/common/utils/time_stat.c ) if (ENABLE_LTTNG) find_package(LTTngUST 2.3.8 EXACT REQUIRED) @@ -671,7 +665,7 @@ if (cap_FOUND) target_link_libraries(UTIL PRIVATE cap) target_compile_definitions(UTIL PRIVATE HAVE_LIB_CAP) endif() -target_link_libraries(UTIL PUBLIC ${T_LIB} pthread LOG) +target_link_libraries(UTIL PUBLIC ${T_LIB} pthread LOG thread-pool utils) set(SECURITY_SRC ${OPENAIR3_DIR}/SECU/secu_defs.c @@ -1206,7 +1200,7 @@ set(PHY_MEX_UE ${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_ue_measurements.c ) add_library(PHY_MEX ${PHY_MEX_UE}) -target_link_libraries(PHY_MEX PRIVATE asn1_lte_rrc_hdrs LOG) +target_link_libraries(PHY_MEX PRIVATE asn1_lte_rrc_hdrs UTIL) #Layer 2 library ##################### diff --git a/common/utils/CMakeLists.txt b/common/utils/CMakeLists.txt index 9d882a4272..932f458a77 100644 --- a/common/utils/CMakeLists.txt +++ b/common/utils/CMakeLists.txt @@ -12,3 +12,7 @@ endif() add_subdirectory(T) add_subdirectory(nr) add_subdirectory(LOG) +add_subdirectory(threadPool) +add_library(utils utils.c system.c time_meas.c time_stat.c) +target_include_directories(utils PUBLIC .) +target_link_libraries(utils PRIVATE ${T_LIB}) diff --git a/common/utils/threadPool/CMakeLists.txt b/common/utils/threadPool/CMakeLists.txt new file mode 100644 index 0000000000..eb48e39a94 --- /dev/null +++ b/common/utils/threadPool/CMakeLists.txt @@ -0,0 +1,6 @@ +if (ENABLE_TESTS) + add_subdirectory(test) +endif() +add_library(thread-pool thread-pool.c) +target_link_libraries(thread-pool PRIVATE utils) +target_include_directories(thread-pool PUBLIC .) diff --git a/common/utils/threadPool/Makefile b/common/utils/threadPool/Makefile deleted file mode 100644 index 8913edb1f4..0000000000 --- a/common/utils/threadPool/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -thread-pool-test: thread-pool.c thread-pool.h - gcc -g -O3 thread-pool.c -I ${OPENAIR_DIR}/nfapi/open-nFAPI/nfapi/public_inc -I ${OPENAIR_DIR}/ -I ${OPENAIR_DIR}/common/utils/ -I. -I ${OPENAIR_DIR}/openair2/COMMON ${OPENAIR_DIR}/common/utils/system.c ${OPENAIR_DIR}/common/utils/LOG/log.c ${OPENAIR_DIR}/common/config/config_userapi.c ${OPENAIR_DIR}/common/config/config_load_configmodule.c ${OPENAIR_DIR}/common/config/config_cmdline.c -lpthread -ldl -D TEST_THREAD_POOL -DMAX_NUM_CCs=1 -I../LOG -I../../utils/T -o thread-pool-test - diff --git a/common/utils/threadPool/test/CMakeLists.txt b/common/utils/threadPool/test/CMakeLists.txt new file mode 100644 index 0000000000..c756ba874a --- /dev/null +++ b/common/utils/threadPool/test/CMakeLists.txt @@ -0,0 +1,6 @@ +add_executable(test_thread-pool + test_thread-pool.c) +add_dependencies(tests test_thread-pool) +target_link_libraries(test_thread-pool PRIVATE thread-pool pthread LOG minimal_lib) +add_test(NAME test_thread-pool + COMMAND ./test_thread-pool) diff --git a/common/utils/threadPool/test/test_thread-pool.c b/common/utils/threadPool/test/test_thread-pool.c new file mode 100644 index 0000000000..0d6defd5cb --- /dev/null +++ b/common/utils/threadPool/test/test_thread-pool.c @@ -0,0 +1,133 @@ +/* + * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The OpenAirInterface Software Alliance licenses this file to You under + * the OAI Public License, Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.openairinterface.org/?page_id=698 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *------------------------------------------------------------------------------- + * For more information about the OpenAirInterface (OAI) Software Alliance: + * contact@openairinterface.org + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "log.h" + +void displayList(notifiedFIFO_t *nf) +{ + int n = 0; + notifiedFIFO_elt_t *ptr = nf->outF; + + while (ptr) { + printf("element: %d, key: %lu\n", ++n, ptr->key); + ptr = ptr->next; + } + + printf("End of list: %d elements\n", n); +} + +struct testData { + int id; + int sleepTime; + char txt[30]; +}; + +void processing(void *arg) +{ + struct testData *in = (struct testData *)arg; + // printf("doing: %d, %s, in thr %ld\n",in->id, in->txt,pthread_self() ); + sprintf(in->txt, "Done by %ld, job %d", pthread_self(), in->id); + in->sleepTime = rand() % 1000; + usleep(in->sleepTime); + // printf("done: %d, %s, in thr %ld\n",in->id, in->txt,pthread_self() ); +} + +int main() +{ + logInit(); + notifiedFIFO_t myFifo; + initNotifiedFIFO(&myFifo); + pushNotifiedFIFO(&myFifo, newNotifiedFIFO_elt(sizeof(struct testData), 1234, NULL, NULL)); + + for (int i = 10; i > 1; i--) { + pushNotifiedFIFO(&myFifo, newNotifiedFIFO_elt(sizeof(struct testData), 1000 + i, NULL, NULL)); + } + + displayList(&myFifo); + notifiedFIFO_elt_t *tmp = pullNotifiedFIFO(&myFifo); + printf("pulled: %lu\n", tmp->key); + displayList(&myFifo); + tmp = pullNotifiedFIFO(&myFifo); + printf("pulled: %lu\n", tmp->key); + displayList(&myFifo); + pushNotifiedFIFO(&myFifo, newNotifiedFIFO_elt(sizeof(struct testData), 12345678, NULL, NULL)); + displayList(&myFifo); + + do { + tmp = pollNotifiedFIFO(&myFifo); + + if (tmp) { + printf("pulled: %lu\n", tmp->key); + displayList(&myFifo); + } else + printf("Empty list \n"); + } while (tmp); + + tpool_t pool; + char params[] = "1,2,3,4,5"; + initTpool(params, &pool, true); + notifiedFIFO_t worker_back; + initNotifiedFIFO(&worker_back); + + //sleep(1); + int cumulProcessTime = 0; + struct timespec st, end; + clock_gettime(CLOCK_MONOTONIC, &st); + int nb_jobs = 4; + for (int i = 0; i < 1000; i++) { + int parall = nb_jobs; + for (int j = 0; j < parall; j++) { + notifiedFIFO_elt_t *work = newNotifiedFIFO_elt(sizeof(struct testData), i, &worker_back, processing); + struct testData *x = (struct testData *)NotifiedFifoData(work); + x->id = i; + pushTpool(&pool, work); + } + int sleepmax = 0; + while (parall) { + tmp = pullTpool(&worker_back, &pool); + if (tmp) { + parall--; + struct testData *dd = NotifiedFifoData(tmp); + if (dd->sleepTime > sleepmax) + sleepmax = dd->sleepTime; + delNotifiedFIFO_elt(tmp); + } + } + cumulProcessTime += sleepmax; + } + clock_gettime(CLOCK_MONOTONIC, &end); + long long dur = (end.tv_sec - st.tv_sec) * 1000 * 1000 + (end.tv_nsec - st.tv_nsec) / 1000; + printf("In µs, Total time per group of %d job:%lld, work time per job %d, overhead per job %lld\n", + nb_jobs, + dur / 1000, + cumulProcessTime / 1000, + (dur - cumulProcessTime) / (1000 * nb_jobs)); + return 0; +} diff --git a/common/utils/threadPool/thread-pool.c b/common/utils/threadPool/thread-pool.c index 6410f7f4b9..64341501cb 100644 --- a/common/utils/threadPool/thread-pool.c +++ b/common/utils/threadPool/thread-pool.c @@ -33,17 +33,6 @@ #include #include -void displayList(notifiedFIFO_t *nf) { - int n=0; - notifiedFIFO_elt_t *ptr=nf->outF; - - while(ptr) { - printf("element: %d, key: %lu\n",++n,ptr->key); - ptr=ptr->next; - } - - printf("End of list: %d elements\n",n); -} static inline notifiedFIFO_elt_t *pullNotifiedFifoRemember( notifiedFIFO_t *nf, struct one_thread *thr) { mutexlock(nf->lockF); @@ -176,121 +165,3 @@ void initFloatingCoresTpool(int nbThreads,tpool_t *pool, bool performanceMeas, c threads[sizeof(threads)-1]=0; initNamedTpool(threads, pool, performanceMeas, name); } - -#ifdef TEST_THREAD_POOL -int oai_exit = 0; - -void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) -{ - if (assert) { - abort(); - } else { - exit(EXIT_SUCCESS); - } -} - -struct testData { - int id; - int sleepTime; - char txt[30]; -}; - -void processing(void *arg) { - struct testData *in=(struct testData *)arg; - //printf("doing: %d, %s, in thr %ld\n",in->id, in->txt,pthread_self() ); - sprintf(in->txt,"Done by %ld, job %d", pthread_self(), in->id); - in->sleepTime=rand()%1000; - usleep(in->sleepTime); - //printf("done: %d, %s, in thr %ld\n",in->id, in->txt,pthread_self() ); -} - -int main() { - notifiedFIFO_t myFifo; - initNotifiedFIFO(&myFifo); - pushNotifiedFIFO(&myFifo,newNotifiedFIFO_elt(sizeof(struct testData), 1234,NULL,NULL)); - - for(int i=10; i>1; i--) { - pushNotifiedFIFO(&myFifo,newNotifiedFIFO_elt(sizeof(struct testData), 1000+i,NULL,NULL)); - } - - displayList(&myFifo); - notifiedFIFO_elt_t *tmp=pullNotifiedFIFO(&myFifo); - printf("pulled: %lu\n", tmp->key); - displayList(&myFifo); - tmp=pullNotifiedFIFO(&myFifo); - printf("pulled: %lu\n", tmp->key); - displayList(&myFifo); - pushNotifiedFIFO(&myFifo,newNotifiedFIFO_elt(sizeof(struct testData), 12345678, NULL, NULL)); - displayList(&myFifo); - - do { - tmp=pollNotifiedFIFO(&myFifo); - - if (tmp) { - printf("pulled: %lu\n", tmp->key); - displayList(&myFifo); - } else - printf("Empty list \n"); - } while(tmp); - - tpool_t pool; - char params[]="1,2,3,4,5"; - initTpool(params,&pool, true); - notifiedFIFO_t worker_back; - initNotifiedFIFO(&worker_back); - - sleep(1); - int cumulProcessTime=0, cumulTime=0; - struct timespec st,end; - clock_gettime(CLOCK_MONOTONIC, &st); - int nb_jobs=4; - for (int i=0; i <1000 ; i++) { - int parall=nb_jobs; - for (int j=0; j id=i; - pushTpool(&pool, work); - } - int sleepmax=0; - while (parall) { - tmp=pullTpool(&worker_back,&pool); - if (tmp) { - parall--; - struct testData *dd=NotifiedFifoData(tmp); - if (dd->sleepTime > sleepmax) - sleepmax=dd->sleepTime; - delNotifiedFIFO_elt(tmp); - } - } - cumulProcessTime+=sleepmax; - } - clock_gettime(CLOCK_MONOTONIC, &end); - long long dur=(end.tv_sec-st.tv_sec)*1000*1000+(end.tv_nsec-st.tv_nsec)/1000; - printf("In µs, Total time per group of %d job:%lld, work time per job %d, overhead per job %lld\n", - nb_jobs, dur/1000, cumulProcessTime/1000, (dur-cumulProcessTime)/(1000*nb_jobs)); - - /* - for (int i=0; i <1000 ; i++) { - notifiedFIFO_elt_t *work=newNotifiedFIFO_elt(sizeof(struct testData), i, &worker_back, processing); - struct testData *x=(struct testData *)NotifiedFifoData(work); - x->id=i; - pushTpool(&pool, work); - } - - do { - tmp=pullTpool(&worker_back,&pool); - - if (tmp) { - struct testData *dd=NotifiedFifoData(tmp); - printf("Result: %s\n",dd->txt); - delNotifiedFIFO_elt(tmp); - } else - printf("Empty list \n"); - - abortTpoolJob(&pool,510); - } while(tmp); - */ - return 0; -} -#endif From d1e6b9507c8cd5e825ef8b0f98a7469d6d18d4ed Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 26 Jun 2024 14:43:05 +0200 Subject: [PATCH 25/25] Revert log level change on HARQ occasion This reverts a change in commit ccba7c875df082c924f65a65c5b8ec2996d5d624. There is no real reason to show this warning (the gNB will work just fine, simply not schedule since no free HARQ) and it makes users unsure. --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index 20f6810f71..3134ec3cda 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -1353,7 +1353,7 @@ int nr_acknack_scheduling(gNB_MAC_INST *mac, return pucch_index; // index of current PUCCH structure } } - LOG_W(NR_MAC, "DL %4d.%2d, Couldn't find scheduling occasion for this HARQ process\n", frame, slot); + LOG_D(NR_MAC, "DL %4d.%2d, Couldn't find scheduling occasion for this HARQ process\n", frame, slot); return -1; }