lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

August 2023

  • 1 participants
  • 1514 discussions
[S] Change in osmo-bsc[master]: meas_feed: Increase wqueue max_len to 100 and make it vty-configurable
by pespin 30 Aug '23

30 Aug '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34244 ) Change subject: meas_feed: Increase wqueue max_len to 100 and make it vty-configurable ...................................................................... meas_feed: Increase wqueue max_len to 100 and make it vty-configurable The previous amount of 10 messages may be small if the BSC is processing lots of measurements from lots of BTS connected to it. Increase it to 100 by default, and allow changing the write_queue length through the VTY. Related: SYS#6550 Change-Id: Ib2e3591498c038b8e59f3ad447ac1f65928d6da8 --- M include/osmocom/bsc/meas_feed.h M src/osmo-bsc/bsc_vty.c M src/osmo-bsc/meas_feed.c 3 files changed, 48 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified daniel: Looks good to me, but someone else must approve fixeria: Looks good to me, approved diff --git a/include/osmocom/bsc/meas_feed.h b/include/osmocom/bsc/meas_feed.h index 353278e..f2bd4ba 100644 --- a/include/osmocom/bsc/meas_feed.h +++ b/include/osmocom/bsc/meas_feed.h @@ -35,9 +35,12 @@ }; #define MEAS_FEED_VERSION 1 +#define MEAS_FEED_WQUEUE_MAX_LEN_DEFAULT 100 int meas_feed_cfg_set(const char *dst_host, uint16_t dst_port); void meas_feed_scenario_set(const char *name); +void meas_feed_wqueue_max_length_set(unsigned int max_length); void meas_feed_cfg_get(char **host, uint16_t *port); const char *meas_feed_scenario_get(void); +unsigned int meas_feed_wqueue_max_length_get(void); diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index 7918d81..02f708e 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -385,6 +385,7 @@ uint16_t meas_port; char *meas_host; const char *meas_scenario; + unsigned int max_len = meas_feed_wqueue_max_length_get(); meas_feed_cfg_get(&meas_host, &meas_port); meas_scenario = meas_feed_scenario_get(); @@ -395,6 +396,9 @@ if (strlen(meas_scenario) > 0) vty_out(vty, " meas-feed scenario %s%s", meas_scenario, VTY_NEWLINE); + if (max_len != MEAS_FEED_WQUEUE_MAX_LEN_DEFAULT) + vty_out(vty, " meas-feed write-queue-max-length %u%s", + max_len, VTY_NEWLINE); } if (gsmnet->allow_unusable_timeslots) @@ -2416,6 +2420,16 @@ return CMD_SUCCESS; } +DEFUN_ATTR(cfg_net_meas_feed_wqueue_max_len, cfg_net_meas_feed_wqueue_max_len_cmd, + "meas-feed write-queue-max-length <1-65535>", + MEAS_FEED_STR "Set the maximum length of the message write queue towards the UDP socket\n" + "Maximum number of messages to be queued waiting for transmission\n", + CMD_ATTR_IMMEDIATE) +{ + meas_feed_wqueue_max_length_set(atoi(argv[0])); + return CMD_SUCCESS; +} + static void legacy_timers(struct vty *vty, const char **T_arg) { if (!strcmp((*T_arg), "T993111") || !strcmp((*T_arg), "t993111")) { @@ -3580,6 +3594,7 @@ install_element(GSMNET_NODE, &cfg_net_dyn_ts_allow_tch_f_cmd); install_element(GSMNET_NODE, &cfg_net_meas_feed_dest_cmd); install_element(GSMNET_NODE, &cfg_net_meas_feed_scenario_cmd); + install_element(GSMNET_NODE, &cfg_net_meas_feed_wqueue_max_len_cmd); install_element(GSMNET_NODE, &cfg_net_timer_cmd); install_element(GSMNET_NODE, &cfg_net_allow_unusable_timeslots_cmd); install_element(GSMNET_NODE, &cfg_net_pcu_sock_cmd); diff --git a/src/osmo-bsc/meas_feed.c b/src/osmo-bsc/meas_feed.c index fbfd553..23b7d04 100644 --- a/src/osmo-bsc/meas_feed.c +++ b/src/osmo-bsc/meas_feed.c @@ -24,6 +24,7 @@ struct meas_feed_state { struct osmo_wqueue wqueue; + unsigned int wqueue_max_len; char scenario[31+1]; char *dst_host; uint16_t dst_port; @@ -31,6 +32,7 @@ static struct meas_feed_state g_mfs = { .wqueue.bfd.fd = -1, + .wqueue_max_len = MEAS_FEED_WQUEUE_MAX_LEN_DEFAULT, }; static int process_meas_rep(struct gsm_meas_rep *mr) @@ -152,7 +154,7 @@ meas_feed_close(); } - osmo_wqueue_init(&g_mfs.wqueue, 10); + osmo_wqueue_init(&g_mfs.wqueue, g_mfs.wqueue_max_len); g_mfs.wqueue.write_cb = feed_write_cb; g_mfs.wqueue.read_cb = feed_read_cb; @@ -179,6 +181,18 @@ *host = g_mfs.dst_host; } +void meas_feed_wqueue_max_length_set(unsigned int max_length) +{ + g_mfs.wqueue_max_len = max_length; + if (g_mfs.wqueue.bfd.fd) + g_mfs.wqueue.max_length = max_length; +} + +unsigned int meas_feed_wqueue_max_length_get(void) +{ + return g_mfs.wqueue_max_len; +} + void meas_feed_scenario_set(const char *name) { osmo_strlcpy(g_mfs.scenario, name, sizeof(g_mfs.scenario)); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34244 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ib2e3591498c038b8e59f3ad447ac1f65928d6da8 Gerrit-Change-Number: 34244 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-trx[master]: ms: fix thread prio startup issue
by pespin 30 Aug '23

30 Aug '23
Attention is currently required from: Hoernchen. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/34250 ) Change subject: ms: fix thread prio startup issue ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34250 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I7e2f83a9b9df024acaf9076c58189cb6b7bcc34b Gerrit-Change-Number: 34250 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Comment-Date: Wed, 30 Aug 2023 11:08:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-trx[master]: ms: fix a few coverity complaints related to initialization
by pespin 30 Aug '23

30 Aug '23
Attention is currently required from: Hoernchen. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/34251 ) Change subject: ms: fix a few coverity complaints related to initialization ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34251 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I203f4da7a4418fc5053d26901bec649d04fad096 Gerrit-Change-Number: 34251 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Comment-Date: Wed, 30 Aug 2023 11:07:04 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ci[master]: jobs/master-builds: xgoldmon: remove osmo-ci dir
by pespin 30 Aug '23

30 Aug '23
Attention is currently required from: osmith. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/34249 ) Change subject: jobs/master-builds: xgoldmon: remove osmo-ci dir ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/34249 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I877944dbca9d1c3ca57b05e947ba9b3506971bdc Gerrit-Change-Number: 34249 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Wed, 30 Aug 2023 11:06:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-bsc[master]: meas_feed: Increase wqueue max_len to 100 and make it vty-configurable
by fixeria 30 Aug '23

30 Aug '23
Attention is currently required from: laforge, pespin, daniel. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34244 ) Change subject: meas_feed: Increase wqueue max_len to 100 and make it vty-configurable ...................................................................... Patch Set 4: Code-Review+2 (1 comment) File src/osmo-bsc/bsc_vty.c: https://gerrit.osmocom.org/c/osmo-bsc/+/34244/comment/d4a98d93_7982dfd7 PS2, Line 2424: 0-65535 > Ack Done -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34244 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ib2e3591498c038b8e59f3ad447ac1f65928d6da8 Gerrit-Change-Number: 34244 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Wed, 30 Aug 2023 11:04:11 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: daniel <dwillmann(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-trx[master]: ms: fix thread prio startup issue
by Hoernchen 30 Aug '23

30 Aug '23
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-trx/+/34250 to look at the new patch set (#2). Change subject: ms: fix thread prio startup issue ...................................................................... ms: fix thread prio startup issue This fixes the 20 second startup delay caused by tx/control threads getting temporarily stuck while trying to set their own priority. Apparently the only sane way for core affinity+priority is to set both as attributes during thread creation using pthreads. This switches the cmd queue to the timeout version, too, to ensure the thread doesn't get stuck waiting for messages, and allows cleaner exits. Change-Id: I7e2f83a9b9df024acaf9076c58189cb6b7bcc34b --- M Transceiver52M/ms/ms.h M Transceiver52M/ms/ms_trxcon_if.h M Transceiver52M/ms/ms_upper.cpp M Transceiver52M/ms/ms_upper.h M osmocom-bb 5 files changed, 111 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/50/34250/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34250 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I7e2f83a9b9df024acaf9076c58189cb6b7bcc34b Gerrit-Change-Number: 34250 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in osmo-trx[master]: ms: fix a few coverity complaints related to initialization
by Hoernchen 30 Aug '23

30 Aug '23
Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-trx/+/34251 ) Change subject: ms: fix a few coverity complaints related to initialization ...................................................................... ms: fix a few coverity complaints related to initialization Change-Id: I203f4da7a4418fc5053d26901bec649d04fad096 --- M Transceiver52M/ms/ms.h M Transceiver52M/ms/ms_upper.h M Transceiver52M/ms/threadpool.h 3 files changed, 18 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/51/34251/1 diff --git a/Transceiver52M/ms/ms.h b/Transceiver52M/ms/ms.h index 62ef96e..b106fd3 100644 --- a/Transceiver52M/ms/ms.h +++ b/Transceiver52M/ms/ms.h @@ -50,7 +50,7 @@ template <typename T> void clamp_array(T *start2, unsigned int len, T max) { - for (int i = 0; i < len; i++) { + for (unsigned int i = 0; i < len; i++) { const T t1 = start2[i] < -max ? -max : start2[i]; const T t2 = t1 > max ? max : t1; start2[i] = t2; @@ -263,7 +263,6 @@ std::thread lower_rx_task; std::thread lower_tx_task; - std::thread *calcrval_task; // provides bursts to upper rx thread rx_queue_t rxqueue; @@ -300,10 +299,12 @@ void maybe_update_gain(one_burst &brst); ms_trx() - : timing_advance(0), do_auto_gain(false), rxqueue(), first_sch_buf(new blade_sample_type[SCH_LEN_SPS]), - burst_copy_buffer(new blade_sample_type[ONE_TS_BURST_LEN]), rcv_done{ false }, - sch_thread_done{ false }, hw_cpus(std::thread::hardware_concurrency()), - hw_target(hw_cpus > 4 ? sched_params::target::ODROID : sched_params::target::PI4) + : mTSC(0), mBSIC(0), timing_advance(0), do_auto_gain(false), rxqueue(), + first_sch_buf(new blade_sample_type[SCH_LEN_SPS]), + burst_copy_buffer(new blade_sample_type[ONE_TS_BURST_LEN]), first_sch_buf_rcv_ts(0), + rcv_done{ false }, sch_thread_done{ false }, hw_cpus(std::thread::hardware_concurrency()), + hw_target(hw_cpus > 4 ? sched_params::target::ODROID : sched_params::target::PI4), + upper_is_ready(false) { std::cerr << "scheduling for: " << (hw_cpus > 4 ? "odroid" : "pi4") << std::endl; set_name_aff_sched(worker_thread.get_handle(), sched_params::thread_names::SCH_SEARCH); diff --git a/Transceiver52M/ms/ms_upper.h b/Transceiver52M/ms/ms_upper.h index 0c430de..06f7c54 100644 --- a/Transceiver52M/ms/ms_upper.h +++ b/Transceiver52M/ms/ms_upper.h @@ -44,5 +44,5 @@ void driveReceiveFIFO(); void driveTx(); - upper_trx(){}; + upper_trx() : mOn(false){}; }; diff --git a/Transceiver52M/ms/threadpool.h b/Transceiver52M/ms/threadpool.h index a5dec97..2180c68 100644 --- a/Transceiver52M/ms/threadpool.h +++ b/Transceiver52M/ms/threadpool.h @@ -45,7 +45,7 @@ return; } - single_thread_pool() : worker_thread(std::thread([this] { thread_loop(); })) + single_thread_pool() : stop_flag(false), is_ready(false), worker_thread(std::thread([this] { thread_loop(); })) { } ~single_thread_pool() -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34251 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I203f4da7a4418fc5053d26901bec649d04fad096 Gerrit-Change-Number: 34251 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-trx[master]: ms: fix thread prio startup issue
by Hoernchen 30 Aug '23

30 Aug '23
Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-trx/+/34250 ) Change subject: ms: fix thread prio startup issue ...................................................................... ms: fix thread prio startup issue This fixes the 20 second startup delay caused by tx/control threads getting temporarily stuck while trying to set their own priority. Apparently the only sane way for core affinity+priority is to set both as attributes during thread creation using pthreads. This switches the cmd queue to the timeout version, too, to ensure the thread doesn't get stuck waiting for messages, and allows cleaner exits. Change-Id: I7e2f83a9b9df024acaf9076c58189cb6b7bcc34b --- M Transceiver52M/ms/ms.h M Transceiver52M/ms/ms_trxcon_if.h M Transceiver52M/ms/ms_upper.cpp M Transceiver52M/ms/ms_upper.h 4 files changed, 109 insertions(+), 30 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/50/34250/1 diff --git a/Transceiver52M/ms/ms.h b/Transceiver52M/ms/ms.h index 1c210b0..62ef96e 100644 --- a/Transceiver52M/ms/ms.h +++ b/Transceiver52M/ms/ms.h @@ -336,6 +336,15 @@ set_name_aff_sched(h, tgt.name, tgt.core, tgt.schedtype, tgt.prio); } + using pt_sig = void *(*)(void *); + + pthread_t spawn_worker_thread(sched_params::thread_names name, pt_sig fun, void *arg) + { + auto tgt = schdp[hw_target][name]; + std::cerr << "scheduling for: " << tgt.name << ":" << tgt.core << " prio:" << tgt.prio << std::endl; + return do_spawn_thr(tgt.name, tgt.core, tgt.schedtype, tgt.prio, fun, arg); + } + private: void set_name_aff_sched(std::thread::native_handle_type h, const char *name, int cpunum, int schedtype, int prio) @@ -359,4 +368,27 @@ return exit(0); } } + + pthread_t do_spawn_thr(const char *name, int cpunum, int schedtype, int prio, pt_sig fun, void *arg) + { + pthread_t thread; + + pthread_attr_t attr; + pthread_attr_init(&attr); + + sched_param sch_params; + sch_params.sched_priority = prio; + cpu_set_t cpuset; + CPU_ZERO(&cpuset); + CPU_SET(cpunum, &cpuset); + auto a = pthread_attr_setaffinity_np(&attr, sizeof(cpu_set_t), &cpuset); + a |= pthread_attr_setschedpolicy(&attr, schedtype); + a |= pthread_attr_setschedparam(&attr, &sch_params); + a |= pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED); + std::cerr << "arg rc:" << a << std::endl; + pthread_create(&thread, &attr, fun, arg); + pthread_setname_np(thread, name); + pthread_attr_destroy(&attr); + return thread; + } }; diff --git a/Transceiver52M/ms/ms_trxcon_if.h b/Transceiver52M/ms/ms_trxcon_if.h index 9879d1a..0928d40 100644 --- a/Transceiver52M/ms/ms_trxcon_if.h +++ b/Transceiver52M/ms/ms_trxcon_if.h @@ -38,5 +38,5 @@ } }; using tx_queue_t = spsc_cond<8 * 1, internal_q_tx_buf, true, false>; -using cmd_queue_t = spsc_cond<8 * 1, trxcon_phyif_cmd, true, false>; +using cmd_queue_t = spsc_cond_timeout<8 * 1, trxcon_phyif_cmd, true, false>; using cmdr_queue_t = spsc_cond<8 * 1, trxcon_phyif_rsp, false, false>; diff --git a/Transceiver52M/ms/ms_upper.cpp b/Transceiver52M/ms/ms_upper.cpp index 3c34efe..b161f4a 100644 --- a/Transceiver52M/ms/ms_upper.cpp +++ b/Transceiver52M/ms/ms_upper.cpp @@ -27,6 +27,8 @@ #include <radioInterface.h> #include <grgsm_vitac/grgsm_vitac.h> +// #define TXDEBUG + extern "C" { #include "sch.h" @@ -66,29 +68,54 @@ { g_exit_flag = true; - if (thr_control.joinable()) - thr_control.join(); - if (thr_rx.joinable()) - thr_rx.join(); - if (thr_tx.joinable()) - thr_tx.join(); + pthread_join(thr_control, NULL); + pthread_join(thr_tx, NULL); } + void upper_trx::start_threads() { - thr_control = std::thread([this] { - set_name_aff_sched(sched_params::thread_names::U_CTL); - while (!g_exit_flag) { - driveControl(); - } - std::cerr << "exit U control!" << std::endl; - }); - thr_tx = std::thread([this] { - set_name_aff_sched(sched_params::thread_names::U_TX); - while (!g_exit_flag) { - driveTx(); - } - std::cerr << "exit U tx!" << std::endl; - }); + DBGLG(...) << "spawning threads.." << std::endl; + + thr_control = spawn_worker_thread( + sched_params::thread_names::U_CTL, + [](void *args) -> void * { + upper_trx *t = reinterpret_cast<upper_trx *>(args); +#ifdef TXDEBUG + struct sched_param param; + int policy; + pthread_getschedparam(pthread_self(), &policy, &param); + printf("ID: %lu, CPU: %d policy = %d priority = %d\n", pthread_self(), sched_getcpu(), policy, + param.sched_priority); +#endif + std::cerr << "started U control!" << std::endl; + while (!g_exit_flag) { + t->driveControl(); + } + std::cerr << "exit U control!" << std::endl; + + return 0; + }, + this); + thr_tx = spawn_worker_thread( + sched_params::thread_names::U_TX, + [](void *args) -> void * { + upper_trx *t = reinterpret_cast<upper_trx *>(args); +#ifdef TXDEBUG + struct sched_param param; + int policy; + pthread_getschedparam(pthread_self(), &policy, &param); + printf("ID: %lu, CPU: %d policy = %d priority = %d\n", pthread_self(), sched_getcpu(), policy, + param.sched_priority); +#endif + std::cerr << "started U tx!" << std::endl; + while (!g_exit_flag) { + t->driveTx(); + } + std::cerr << "exit U tx!" << std::endl; + + return 0; + }, + this); #ifdef LSANDEBUG std::thread([this] { @@ -251,7 +278,7 @@ internal_q_tx_buf *burst = &e; -#ifdef TXDEBUG +#ifdef TXDEBUG2 DBGLG() << "got burst!" << burst->r.fn << ":" << burst->ts << " current: " << timekeeper.gsmtime().FN() << " dff: " << (int64_t)((int64_t)timekeeper.gsmtime().FN() - (int64_t)burst->r.fn) << std::endl; #endif @@ -270,7 +297,7 @@ // float -> int16 blade_sample_type burst_buf[txburst->size()]; convert_and_scale(burst_buf, txburst->begin(), txburst->size() * 2, 1); -#ifdef TXDEBUG +#ifdef TXDEBUG2 auto check = signalVector(txburst->size(), 40); convert_and_scale(check.begin(), burst_buf, txburst->size() * 2, 1); estim_burst_params ebp; @@ -313,7 +340,7 @@ static void print_cmd(trxcon_phyif_cmd_type c) { - DBGLG() << cmd2str(c) << std::endl; + DBGLG() << "handling " << cmd2str(c) << std::endl; } #endif @@ -323,6 +350,8 @@ trxcon_phyif_cmd cmd; while (!cmdq_to_phy.spsc_pop(&cmd)) { cmdq_to_phy.spsc_prep_pop(); + if (g_exit_flag) + return false; } if (g_exit_flag) diff --git a/Transceiver52M/ms/ms_upper.h b/Transceiver52M/ms/ms_upper.h index 2362365..0c430de 100644 --- a/Transceiver52M/ms/ms_upper.h +++ b/Transceiver52M/ms/ms_upper.h @@ -27,22 +27,22 @@ #include "ms.h" class upper_trx : public ms_trx { - bool mOn; + volatile bool mOn; char demodded_softbits[444]; // void driveControl(); - bool driveControl(); - void driveReceiveFIFO(); - void driveTx(); - bool pullRadioVector(GSM::Time &wTime, int &RSSI, int &timingOffset); - std::thread thr_control, thr_rx, thr_tx; + pthread_t thr_control, thr_tx; public: void start_threads(); void main_loop(); void stop_upper_threads(); + bool driveControl(); + void driveReceiveFIFO(); + void driveTx(); + upper_trx(){}; }; -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34250 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I7e2f83a9b9df024acaf9076c58189cb6b7bcc34b Gerrit-Change-Number: 34250 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-ci[master]: jobs/master-builds: xgoldmon: remove osmo-ci dir
by osmith 30 Aug '23

30 Aug '23
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/34249 ) Change subject: jobs/master-builds: xgoldmon: remove osmo-ci dir ...................................................................... jobs/master-builds: xgoldmon: remove osmo-ci dir Fix running the job multiple times in a row. As the master jobs don't wipe the git repositories, we need to remove the osmo-ci dir first before attempting another shallow clone. Fixes: 451cbe7d ("jobs/master-builds: add xgoldmon") Change-Id: I877944dbca9d1c3ca57b05e947ba9b3506971bdc --- M jobs/master-builds.yml 1 file changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/49/34249/1 diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index f57bc96..b102563 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -529,6 +529,7 @@ - xgoldmon: git_base_url: https://github.com/2b-as cmd: | + rm -rf osmo-ci git clone --depth=1 https://gerrit.osmocom.org/osmo-ci -b master {docker_run_ccache} {docker_img} {timeout_cmd} /build/osmo-ci/scripts/xgoldmon-jenkins.sh -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/34249 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I877944dbca9d1c3ca57b05e947ba9b3506971bdc Gerrit-Change-Number: 34249 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-trx[master]: ms/va: make ancient gcc < 8 happy
by Hoernchen 30 Aug '23

30 Aug '23
Hoernchen has submitted this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/34248 ) Change subject: ms/va: make ancient gcc < 8 happy ...................................................................... ms/va: make ancient gcc < 8 happy Change-Id: Ib94b9b073a0d2af84ce5791b5f40c63cd7ef9329 --- M Transceiver52M/grgsm_vitac/grgsm_vitac.h 1 file changed, 14 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/Transceiver52M/grgsm_vitac/grgsm_vitac.h b/Transceiver52M/grgsm_vitac/grgsm_vitac.h index d00c3ad..c1e470c 100644 --- a/Transceiver52M/grgsm_vitac/grgsm_vitac.h +++ b/Transceiver52M/grgsm_vitac/grgsm_vitac.h @@ -42,6 +42,10 @@ #define MULTI_VER_TARGET_ATTR_CLANGONLY #endif +/* ancient gcc < 8 has no attribute, clang always pretends to be gcc 4 */ +#if !defined(__clang__) && __GNUC__ < 8 +#define NO_UBSAN __attribute__((no_sanitize_undefined)) +#else #if defined(__has_attribute) #if __has_attribute(no_sanitize) #define NO_UBSAN __attribute__((no_sanitize("undefined"))) @@ -49,6 +53,7 @@ #else #define NO_UBSAN #endif +#endif #define SYNC_SEARCH_RANGE 30 const int d_OSR(4); -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34248 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: Ib94b9b073a0d2af84ce5791b5f40c63cd7ef9329 Gerrit-Change-Number: 34248 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • ...
  • 152
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.