[S] Change in osmo-trx[master]: transceiver: use log level cache

2024-05-07 Thread Hoernchen
Attention is currently required from: Hoernchen, fixeria, laforge.

Hello Jenkins Builder, fixeria, laforge,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-trx/+/36386?usp=email

to look at the new patch set (#2).

The following approvals got outdated and were removed:
Code-Review+1 by fixeria, Code-Review+1 by laforge, Verified+1 by Jenkins 
Builder


Change subject: transceiver: use log level cache
..

transceiver: use log level cache

This uses the newly added log level caching in libosmocore, which
prevents lock contention during the massive amount of usually disabled
but concurrent (threads) log statements.

Depends: libosmocore.git I539872fc9e3c50b407e6bc388f1e091fa2c826c3
Change-Id: Ic9f0e81c89827f2696ce046a3396f041703d6ae5
---
M TODO-RELEASE
M Transceiver52M/osmo-trx.cpp
2 files changed, 16 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/86/36386/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36386?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ic9f0e81c89827f2696ce046a3396f041703d6ae5
Gerrit-Change-Number: 36386
Gerrit-PatchSet: 2
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: Hoernchen 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-MessageType: newpatchset


[S] Change in osmo-trx[master]: ms: disabe uhd ms build

2024-03-22 Thread Hoernchen
Hoernchen has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36377?usp=email )

Change subject: ms: disabe uhd ms build
..

ms: disabe uhd ms build

This won't build, and has been in a untested non working state for a
year, but might still be useful after fixing it up in the future in case
someone needs it.

Change-Id: I9db1740b5c399a02a41b1d07792c645cf7d1bd1b
---
M Transceiver52M/Makefile.am
1 file changed, 23 insertions(+), 10 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, but someone else must approve
  pespin: Looks good to me, but someone else must approve
  Hoernchen: Looks good to me, approved




diff --git a/Transceiver52M/Makefile.am b/Transceiver52M/Makefile.am
index dadfde9..0b63b16 100644
--- a/Transceiver52M/Makefile.am
+++ b/Transceiver52M/Makefile.am
@@ -127,16 +127,16 @@
$(UHD_LIBS)
 osmo_trx_uhd_CPPFLAGS  = $(AM_CPPFLAGS) $(UHD_CFLAGS)

-if ENABLE_MS_TRX
-bin_PROGRAMS += osmo-trx-ms-uhd
-osmo_trx_ms_uhd_SOURCES = $(MS_LOWER_SRC) $(MS_UPPER_SRC)
-osmo_trx_ms_uhd_LDADD = \
-   $(builddir)/device/uhd/libdevice.la \
-   $(COMMON_LDADD) \
-   $(UHD_LIBS) \
-   $(TRXCON_LDADD)
-osmo_trx_ms_uhd_CPPFLAGS  = $(AM_CPPFLAGS) $(UHD_CFLAGS) -DBUILDUHD
-endif
+#if ENABLE_MS_TRX
+#bin_PROGRAMS += osmo-trx-ms-uhd
+#osmo_trx_ms_uhd_SOURCES = $(MS_LOWER_SRC) $(MS_UPPER_SRC)
+#osmo_trx_ms_uhd_LDADD = \
+#  $(builddir)/device/uhd/libdevice.la \
+#  $(COMMON_LDADD) \
+#  $(UHD_LIBS) \
+#  $(TRXCON_LDADD)
+#osmo_trx_ms_uhd_CPPFLAGS  = $(AM_CPPFLAGS) $(UHD_CFLAGS) -DBUILDUHD
+#endif
 endif

 if DEVICE_USRP1

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36377?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I9db1740b5c399a02a41b1d07792c645cf7d1bd1b
Gerrit-Change-Number: 36377
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in osmo-trx[master]: ms: disabe uhd ms build

2024-03-22 Thread Hoernchen
Attention is currently required from: laforge.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36377?usp=email )

Change subject: ms: disabe uhd ms build
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36377?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I9db1740b5c399a02a41b1d07792c645cf7d1bd1b
Gerrit-Change-Number: 36377
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Fri, 22 Mar 2024 13:41:16 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: ms: disabe uhd ms build

2024-03-22 Thread Hoernchen
Attention is currently required from: laforge.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36377?usp=email )

Change subject: ms: disabe uhd ms build
..


Patch Set 1:

(1 comment)

File Transceiver52M/Makefile.am:

https://gerrit.osmocom.org/c/osmo-trx/+/36377/comment/ddb3addf_e18c010c
PS1, Line 130: #if ENABLE_MS_TRX
> might be worth adding a reason in a comment here, not just in the commit log. 
> […]
I am not a fan of duplicating VCS information, modern IDEs will show the commit 
messages anyway, and multiple levels of blame are just one click away...



--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36377?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I9db1740b5c399a02a41b1d07792c645cf7d1bd1b
Gerrit-Change-Number: 36377
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Fri, 22 Mar 2024 10:26:45 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: transceiver: use log level cache

2024-03-22 Thread Hoernchen
Hoernchen has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36386?usp=email )


Change subject: transceiver: use log level cache
..

transceiver: use log level cache

Depends: libosmocore.git I539872fc9e3c50b407e6bc388f1e091fa2c826c3
Change-Id: Ic9f0e81c89827f2696ce046a3396f041703d6ae5
---
M Transceiver52M/osmo-trx.cpp
1 file changed, 11 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/86/36386/1

diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp
index 8f5cc85..c460e98 100644
--- a/Transceiver52M/osmo-trx.cpp
+++ b/Transceiver52M/osmo-trx.cpp
@@ -645,6 +645,7 @@

osmo_init_logging2(tall_trx_ctx, _info);
log_enable_multithread();
+   log_cache_enable();
osmo_stats_init(tall_trx_ctx);
vty_init(_vty_info);
logging_vty_add_cmds();

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36386?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ic9f0e81c89827f2696ce046a3396f041703d6ae5
Gerrit-Change-Number: 36386
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-MessageType: newchange


[S] Change in osmo-bsc[master]: test: adjust for libosmocore loglevel cache

2024-03-22 Thread Hoernchen
Hoernchen has abandoned this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/35549?usp=email )

Change subject: test: adjust for libosmocore loglevel cache
..


Abandoned
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/35549?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: If52bcb522d41918db9e0755ead58abdcb8f0209b
Gerrit-Change-Number: 35549
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: fixeria 
Gerrit-MessageType: abandon


[S] Change in osmo-bts[master]: test: adjust for libosmocore loglevel cache

2024-03-22 Thread Hoernchen
Hoernchen has abandoned this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/35550?usp=email )

Change subject: test: adjust for libosmocore loglevel cache
..


Abandoned
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/35550?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ie9c546210bc554843b1029afa20965bde1d7f228
Gerrit-Change-Number: 35550
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: fixeria 
Gerrit-MessageType: abandon


[M] Change in libosmocore[master]: Revert "Revert "logging: add log level cache""

2024-03-22 Thread Hoernchen
Hoernchen has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/35525?usp=email )

Change subject: Revert "Revert "logging: add log level cache""
..

Revert "Revert "logging: add log level cache""

This reverts commit 7f1fb3ea817578f3f2f63e8065aa50f8355caa3b - slightly
amended with the new log_cache_enalbe() function.  The cache is hence
disabled by default, and applications can enable it, if they wish to
benefit from it.

Reason for the original revert was: some fallout expected due to log
manipulation in test code

Change-Id: I539872fc9e3c50b407e6bc388f1e091fa2c826c3
---
M include/osmocom/core/logging.h
M src/core/libosmocore.map
M src/core/logging.c
M src/vty/logging_vty.c
4 files changed, 163 insertions(+), 1 deletion(-)

Approvals:
  Hoernchen: Looks good to me, approved
  Jenkins Builder: Verified
  laforge: Looks good to me, but someone else must approve
  fixeria: Looks good to me, but someone else must approve




diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h
index e8433a1..82e686f 100644
--- a/include/osmocom/core/logging.h
+++ b/include/osmocom/core/logging.h
@@ -409,7 +409,8 @@

 /* filter on the targets */
 void log_set_all_filter(struct log_target *target, int);
-
+int log_cache_enable(void);
+void log_cache_update(int mapped_subsys, uint8_t enabled, uint8_t level);
 void log_set_use_color(struct log_target *target, int);
 void log_set_print_extended_timestamp(struct log_target *target, int);
 void log_set_print_timestamp(struct log_target *target, int);
diff --git a/src/core/libosmocore.map b/src/core/libosmocore.map
index 072efee..fb294ba 100644
--- a/src/core/libosmocore.map
+++ b/src/core/libosmocore.map
@@ -58,6 +58,8 @@
 log_add_target;
 log_category_name;
 log_check_level;
+log_cache_enable;
+log_cache_update;
 log_del_target;
 log_enable_multithread;
 log_fini;
diff --git a/src/core/logging.c b/src/core/logging.c
index 6941f9b..e172124 100644
--- a/src/core/logging.c
+++ b/src/core/logging.c
@@ -93,6 +93,80 @@
 static __thread long int logging_tid;

 #if (!EMBEDDED)
+/*! One global copy that contains the union of log levels for all targets
+*  for all categories, used for quick lock free checks of log targets. */
+static volatile uint8_t *log_level_lookup_cache;
+
+/*! Updates cache for all targets for all categies, caller must hold 
osmo_log_tgt_mutex. */
+static void log_cache_update_all(void)
+{
+   struct log_target *tgt;
+   uint8_t tmp_en[osmo_log_info->num_cat];
+   uint8_t tmp_level[osmo_log_info->num_cat];
+
+   if (!log_level_lookup_cache)
+   return;
+
+   memset(tmp_en, 0, osmo_log_info->num_cat);
+   memset(tmp_level, UINT8_MAX, osmo_log_info->num_cat);
+
+   /* values can also decrease.. */
+   llist_for_each_entry(tgt, _log_target_list, entry) {
+   for (int i = 0; i < osmo_log_info->num_cat; i++) {
+   struct log_category *cat = >categories[i];
+   tmp_en[i] = OSMO_MAX(tmp_en[i], cat->enabled);
+   tmp_level[i] = OSMO_MIN(tmp_level[i], cat->loglevel);
+   tmp_level[i] = tgt->loglevel ? OSMO_MIN(tmp_level[i], 
tgt->loglevel) : tmp_level[i];
+   }
+   }
+
+   for (int i = 0; i < osmo_log_info->num_cat; i++)
+   log_level_lookup_cache[i] = tmp_en[i] ? tmp_level[i] : 
UINT8_MAX;
+}
+
+/*! Updates single cache entry, caller must hold osmo_log_tgt_mutex.
+ *
+ *  \param[in] mapped_subsys plain category index (after mapping)
+ *  \param[in] enabled log category enabled?
+ *  \param[in] level log level
+ */
+void log_cache_update(int mapped_subsys, uint8_t enabled, uint8_t level)
+{
+   struct log_target *tgt;
+   struct log_category tmp = { UINT8_MAX, 0 };
+
+   if (!log_level_lookup_cache)
+   return;
+
+   /* values can also decrease.. */
+   llist_for_each_entry(tgt, _log_target_list, entry) {
+   struct log_category *cat = >categories[mapped_subsys];
+   tmp.enabled = OSMO_MAX(tmp.enabled, cat->enabled);
+   tmp.loglevel = OSMO_MIN(tmp.loglevel, cat->loglevel);
+   tmp.loglevel = tgt->loglevel ? OSMO_MIN(tmp.loglevel, 
tgt->loglevel) : tmp.loglevel;
+   }
+   tmp.enabled = OSMO_MAX(tmp.enabled, enabled);
+   tmp.loglevel = OSMO_MIN(tmp.loglevel, level);
+
+   log_level_lookup_cache[mapped_subsys] = tmp.enabled ? tmp.loglevel : 
UINT8_MAX;
+}
+
+/*! Queries log level cache.
+ *
+ *  \param[in] mapped_subsys plain category index (after mapping)
+ *  \param[in] level log level
+ *  \returns true if logging should happen for at least one log target
+*/
+static bool log_cache_check(int mapped_subsys, int level)
+{
+   if (!log_level_lookup_cache) {
+   /* log-cache is

[M] Change in libosmocore[master]: Revert "Revert "logging: add log level cache""

2024-03-22 Thread Hoernchen
Attention is currently required from: laforge.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/35525?usp=email )

Change subject: Revert "Revert "logging: add log level cache""
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35525?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I539872fc9e3c50b407e6bc388f1e091fa2c826c3
Gerrit-Change-Number: 35525
Gerrit-PatchSet: 3
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Fri, 22 Mar 2024 09:08:27 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[L] Change in osmo-trx[master]: ms: make app configurable

2024-03-21 Thread Hoernchen
Attention is currently required from: pespin.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36373?usp=email )

Change subject: ms: make app configurable
..


Patch Set 4:

(1 comment)

File Transceiver52M/ms/ms_upper.cpp:

https://gerrit.osmocom.org/c/osmo-trx/+/36373/comment/f79e6661_bc85f5cf
PS4, Line 209:  // pow = energyDetect(sv, 20 * 4 /*sps*/);
> so making the app configurable has something to do with disabling all this 
> now?
This is related to the build failure, it doesn't matter right now, that code 
might be reintroduced after my vacation and after the customer gave his lna/pa 
hw a try.



--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36373?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ibd432f7abbd00065a59104d2c006b676d5db7b47
Gerrit-Change-Number: 36373
Gerrit-PatchSet: 4
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Thu, 21 Mar 2024 11:08:01 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[M] Change in osmo-ci[master]: jobs: add osmocom-obs-ewild

2024-03-21 Thread Hoernchen
Hoernchen has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/36378?usp=email )

Change subject: jobs: add osmocom-obs-ewild
..

jobs: add osmocom-obs-ewild

Similar to osmocom-obs-nhofmeyr, add a jenkins job that automatically
picks up changes in Hoernchen/mssdr branches in the Osmocom projects,
and builds binary packages in home:ewild:mssdr.

Related: OS#6409
Change-Id: I9a8aaf00e3fae84a61ff3cab64750926f8a9e2e1
---
A jobs/osmocom-obs-ewild.yml
1 file changed, 86 insertions(+), 0 deletions(-)

Approvals:
  Hoernchen: Looks good to me, approved
  Jenkins Builder: Verified




diff --git a/jobs/osmocom-obs-ewild.yml b/jobs/osmocom-obs-ewild.yml
new file mode 100644
index 000..111ec09
--- /dev/null
+++ b/jobs/osmocom-obs-ewild.yml
@@ -0,0 +1,72 @@
+---
+- project:
+name: Osmocom_OBS_ewild
+jobs:
+  - Osmocom_OBS_ewild_{branch_suffix}
+branch_suffix:
+  - mssdr
+
+- job-template:
+name: 'Osmocom_OBS_ewild_{branch_suffix}'
+project-type: freestyle
+concurrent: false
+defaults: global
+description: |
+  Iterate over Osmocom projects, and update projects from the
+  "Hoernchen/{branch_suffix}" branch in OBS. If a package exists in OBS
+  for a project, but it doesn't have the git branch anymore then delete the
+  package from OBS.
+properties:
+  - build-discarder:
+  days-to-keep: 30
+  num-to-keep: 30
+node: obs
+parameters:
+  - string:
+  name: CI_BRANCH
+  description: osmo-ci.git branch
+  default: 'master'
+builders:
+  - shell: |
+  export PYTHONUNBUFFERED=1
+  BRANCH="Hoernchen/{branch_suffix}"
+  PROJ="home:ewild:{branch_suffix}"
+  VERSION_APPEND="~ewild.{branch_suffix}"
+  PACKAGE="$GERRIT_PROJECT"
+
+  # When manually triggered, run on all Osmocom packages
+  if [ -z "$PACKAGE" ]; then
+PACKAGE="ALL_OSMOCOM_PACKAGES"
+  fi
+
+  ./scripts/obs/update_obs_project.py \
+--apiurl https://obs.osmocom.org \
+--conflict-pkgname "osmocom-nightly" \
+--delete \
+--docker \
+--feed "master" \
+--git-branch "$BRANCH" \
+--version-append "$VERSION_APPEND" \
+"$PROJ" \
+"$PACKAGE"
+scm:
+  - git:
+  branches:
+- '$CI_BRANCH'
+  url: https://gerrit.osmocom.org/osmo-ci
+  git-config-name: 'Jenkins Builder'
+  git-config-email: 'jenk...@osmocom.org'
+triggers:
+  - gerrit:
+  trigger-on:
+- ref-updated-event
+  projects:
+    - project-compare-type: 'ANT'
+  project-pattern: '**'
+  branches:
+- branch-pattern: 'Hoernchen/{branch_suffix}'
+  server-name: gerrit.osmocom.org
+publishers:
+  - email:
+  notify-every-unstable-build: true
+  recipients: 'ew...@sysmocom.de'

--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/36378?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I9a8aaf00e3fae84a61ff3cab64750926f8a9e2e1
Gerrit-Change-Number: 36378
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[M] Change in osmo-ci[master]: jobs: add osmocom-obs-ewild

2024-03-21 Thread Hoernchen
Attention is currently required from: osmith, pespin.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/36378?usp=email )

Change subject: jobs: add osmocom-obs-ewild
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/36378?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I9a8aaf00e3fae84a61ff3cab64750926f8a9e2e1
Gerrit-Change-Number: 36378
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Thu, 21 Mar 2024 09:47:13 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[L] Change in osmo-trx[master]: ms: make app configurable

2024-03-21 Thread Hoernchen
Attention is currently required from: Hoernchen, pespin.

Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-trx/+/36373?usp=email

to look at the new patch set (#4).

The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder


Change subject: ms: make app configurable
..

ms: make app configurable

This adds proper config options.
The ul/dl freq lines can be copied from the osmo-trx (network side) cfg.

Change-Id: Ibd432f7abbd00065a59104d2c006b676d5db7b47
---
M Transceiver52M/Makefile.am
M Transceiver52M/ms/bladerf_specific.h
M Transceiver52M/ms/ms.h
M Transceiver52M/ms/ms_rx_lower.cpp
M Transceiver52M/ms/ms_upper.cpp
M Transceiver52M/ms/ms_upper.h
A Transceiver52M/ms/mssdr_vty.c
A Transceiver52M/ms/mssdr_vty.h
M doc/examples/Makefile.am
A doc/examples/osmo-trx-ms-blade/mssdr.cfg
10 files changed, 581 insertions(+), 197 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/73/36373/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36373?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ibd432f7abbd00065a59104d2c006b676d5db7b47
Gerrit-Change-Number: 36373
Gerrit-PatchSet: 4
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: Hoernchen 
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


[L] Change in osmo-trx[master]: ms: make app configurable

2024-03-21 Thread Hoernchen
Attention is currently required from: pespin.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36373?usp=email )

Change subject: ms: make app configurable
..


Patch Set 3:

(1 comment)

Commit Message:

https://gerrit.osmocom.org/c/osmo-trx/+/36373/comment/48368d16_969b4ad0
PS2, Line 7: ms: add config file
> This is quite misleading, this commit is doing tons of stuff other than 
> "adding a config file". […]
Done



--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36373?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ibd432f7abbd00065a59104d2c006b676d5db7b47
Gerrit-Change-Number: 36373
Gerrit-PatchSet: 3
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Thu, 21 Mar 2024 08:58:32 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: ms: update osmocom-bb submodule

2024-03-21 Thread Hoernchen
Hoernchen has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36048?usp=email )

 (

3 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
 )Change subject: ms: update osmocom-bb submodule
..

ms: update osmocom-bb submodule

Change-Id: I0140f0a5333469f356c85a95660e10bbdd67cd25
---
M osmocom-bb
1 file changed, 10 insertions(+), 1 deletion(-)

Approvals:
  dexter: Looks good to me, but someone else must approve
  Jenkins Builder: Verified
  laforge: Looks good to me, approved




diff --git a/osmocom-bb b/osmocom-bb
index a41ca4b..f12b17d 16
--- a/osmocom-bb
+++ b/osmocom-bb
@@ -1 +1 @@
-Subproject commit a41ca4bbc42bc66557cdc7c646c539d1a4c1e30f
+Subproject commit f12b17dffb782c7428a563620aa83ec047fd99c4

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36048?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I0140f0a5333469f356c85a95660e10bbdd67cd25
Gerrit-Change-Number: 36048
Gerrit-PatchSet: 4
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: laforge 
Gerrit-CC: fixeria 
Gerrit-CC: pespin 
Gerrit-MessageType: merged


[S] Change in osmo-trx[master]: ms: disabe uhd ms build

2024-03-21 Thread Hoernchen
Hoernchen has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36377?usp=email )


Change subject: ms: disabe uhd ms build
..

ms: disabe uhd ms build

This won't build, and has been in a untested non working state for a
year, but might still be useful after fixing it up in the future in case
someone needs it.

Change-Id: I9db1740b5c399a02a41b1d07792c645cf7d1bd1b
---
M Transceiver52M/Makefile.am
1 file changed, 23 insertions(+), 10 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/77/36377/1

diff --git a/Transceiver52M/Makefile.am b/Transceiver52M/Makefile.am
index dadfde9..0b63b16 100644
--- a/Transceiver52M/Makefile.am
+++ b/Transceiver52M/Makefile.am
@@ -127,16 +127,16 @@
$(UHD_LIBS)
 osmo_trx_uhd_CPPFLAGS  = $(AM_CPPFLAGS) $(UHD_CFLAGS)

-if ENABLE_MS_TRX
-bin_PROGRAMS += osmo-trx-ms-uhd
-osmo_trx_ms_uhd_SOURCES = $(MS_LOWER_SRC) $(MS_UPPER_SRC)
-osmo_trx_ms_uhd_LDADD = \
-   $(builddir)/device/uhd/libdevice.la \
-   $(COMMON_LDADD) \
-   $(UHD_LIBS) \
-   $(TRXCON_LDADD)
-osmo_trx_ms_uhd_CPPFLAGS  = $(AM_CPPFLAGS) $(UHD_CFLAGS) -DBUILDUHD
-endif
+#if ENABLE_MS_TRX
+#bin_PROGRAMS += osmo-trx-ms-uhd
+#osmo_trx_ms_uhd_SOURCES = $(MS_LOWER_SRC) $(MS_UPPER_SRC)
+#osmo_trx_ms_uhd_LDADD = \
+#  $(builddir)/device/uhd/libdevice.la \
+#  $(COMMON_LDADD) \
+#  $(UHD_LIBS) \
+#  $(TRXCON_LDADD)
+#osmo_trx_ms_uhd_CPPFLAGS  = $(AM_CPPFLAGS) $(UHD_CFLAGS) -DBUILDUHD
+#endif
 endif

 if DEVICE_USRP1

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36377?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I9db1740b5c399a02a41b1d07792c645cf7d1bd1b
Gerrit-Change-Number: 36377
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-MessageType: newchange


[L] Change in osmo-trx[master]: ms: make app configurable

2024-03-21 Thread Hoernchen
Attention is currently required from: Hoernchen.

Hello Jenkins Builder, 

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-trx/+/36373?usp=email

to look at the new patch set (#3).

The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder


Change subject: ms: make app configurable
..

ms: make app configurable

This adds proper config options.
The ul/dl freq lines can be copied from the osmo-trx (network side) cfg.

Change-Id: Ibd432f7abbd00065a59104d2c006b676d5db7b47
---
M Transceiver52M/Makefile.am
M Transceiver52M/ms/bladerf_specific.h
M Transceiver52M/ms/ms.h
M Transceiver52M/ms/ms_rx_lower.cpp
M Transceiver52M/ms/ms_upper.cpp
M Transceiver52M/ms/ms_upper.h
A Transceiver52M/ms/mssdr_vty.c
A Transceiver52M/ms/mssdr_vty.h
M doc/examples/Makefile.am
A doc/examples/osmo-trx-ms-blade/mssdr.cfg
10 files changed, 580 insertions(+), 196 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/73/36373/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36373?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ibd432f7abbd00065a59104d2c006b676d5db7b47
Gerrit-Change-Number: 36373
Gerrit-PatchSet: 3
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: Hoernchen 
Gerrit-MessageType: newpatchset


[L] Change in osmo-trx[master]: ms: add config file

2024-03-20 Thread Hoernchen
Hoernchen has uploaded a new patch set (#2). ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36373?usp=email )


Change subject: ms: add config file
..

ms: add config file

This adds proper config options.
The ul/dl freq lines can be copied from the osmo-trx (network side) cfg.

Change-Id: Ibd432f7abbd00065a59104d2c006b676d5db7b47
---
M Transceiver52M/Makefile.am
M Transceiver52M/ms/bladerf_specific.h
M Transceiver52M/ms/ms.h
M Transceiver52M/ms/ms_rx_lower.cpp
M Transceiver52M/ms/ms_upper.cpp
M Transceiver52M/ms/ms_upper.h
A Transceiver52M/ms/mssdr_vty.c
A Transceiver52M/ms/mssdr_vty.h
M doc/examples/Makefile.am
A doc/examples/osmo-trx-ms-blade/mssdr.cfg
10 files changed, 580 insertions(+), 196 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/73/36373/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36373?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ibd432f7abbd00065a59104d2c006b676d5db7b47
Gerrit-Change-Number: 36373
Gerrit-PatchSet: 2
Gerrit-Owner: Hoernchen 
Gerrit-CC: Jenkins Builder
Gerrit-MessageType: newpatchset


[L] Change in osmo-trx[master]: ms: add config file

2024-03-20 Thread Hoernchen
Hoernchen has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36373?usp=email )


Change subject: ms: add config file
..

ms: add config file

This adds proper config options.
The ul/dl freq lines can be copied from the osmo-trx (network side) cfg.

Change-Id: Ibd432f7abbd00065a59104d2c006b676d5db7b47
---
M Transceiver52M/Makefile.am
M Transceiver52M/ms/bladerf_specific.h
M Transceiver52M/ms/ms.h
M Transceiver52M/ms/ms_rx_lower.cpp
M Transceiver52M/ms/ms_upper.cpp
M Transceiver52M/ms/ms_upper.h
A Transceiver52M/ms/mssdr_vty.c
A Transceiver52M/ms/mssdr_vty.h
M doc/examples/Makefile.am
A doc/examples/osmo-trx-ms-blade/mssdr.cfg
10 files changed, 580 insertions(+), 196 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/73/36373/1

diff --git a/Transceiver52M/Makefile.am b/Transceiver52M/Makefile.am
index dadfde9..b007a3d 100644
--- a/Transceiver52M/Makefile.am
+++ b/Transceiver52M/Makefile.am
@@ -97,6 +97,7 @@
ms/ms_upper.cpp \
ms/l1ctl_server.c \
ms/logging.c \
+   ms/mssdr_vty.c \
ms/l1ctl_server_cb.cpp \
ms/ms_trxcon_if.cpp

@@ -110,6 +111,7 @@
ms/itrq.h \
ms/sch.h \
ms/threadpool.h \
+   ms/mssdr_vty.h \
grgsm_vitac/viterbi_detector.h \
grgsm_vitac/constants.h \
grgsm_vitac/grgsm_vitac.h
diff --git a/Transceiver52M/ms/bladerf_specific.h 
b/Transceiver52M/ms/bladerf_specific.h
index 9db8bf0..d31ea29 100644
--- a/Transceiver52M/ms/bladerf_specific.h
+++ b/Transceiver52M/ms/bladerf_specific.h
@@ -32,6 +32,9 @@
 #include 
 #include 
 #include 
+extern "C" {
+#include "mssdr_vty.h"
+}

 const size_t BLADE_BUFFER_SIZE = 1024 * 1;
 const size_t BLADE_NUM_BUFFERS = 32 * 1;
@@ -195,8 +198,8 @@
using tx_buf_q_type = spsc_cond_timeout;
const unsigned int rxFullScale, txFullScale;
const int rxtxdelay;
+   bool use_agc;

-   float rxgain, txgain;
static std::atomic stop_lower_threads_flag;
double rxfreq_cache, txfreq_cache;

@@ -205,9 +208,13 @@
int rx_freq;
int sample_rate;
int bandwidth;
+   float rxgain;
+   float txgain;

public:
-   ms_trx_config() : tx_freq(881e6), rx_freq(926e6), 
sample_rate(((1625e3 / 6) * 4)), bandwidth(1e6)
+   ms_trx_config()
+   : tx_freq(881e6), rx_freq(926e6), sample_rate(((1625e3 
/ 6) * 4)), bandwidth(1e6), rxgain(30),
+ txgain(30)
{
}
} cfg;
@@ -223,10 +230,14 @@
{
close_device();
}
-   blade_hw()
-   : rxFullScale(2047), txFullScale(2047), rxtxdelay(-60), 
rxgain(30), txgain(30), rxfreq_cache(0),
+   blade_hw(struct mssdr_cfg *cfgdata)
+   : rxFullScale(2047), txFullScale(2047), rxtxdelay(-60), 
use_agc(cfgdata->use_agc), rxfreq_cache(0),
  txfreq_cache(0)
{
+   cfg.tx_freq = cfgdata->overrides.ul_freq;
+   cfg.rx_freq = cfgdata->overrides.dl_freq;
+   cfg.rxgain = cfgdata->overrides.dl_gain;
+   cfg.txgain = cfgdata->overrides.ul_gain;
}

void close_device()
@@ -251,6 +262,7 @@
int init_device(bh_fn_t rxh, bh_fn_t txh)
{
struct bladerf_rational_rate rate = { 0, 
static_cast((1625e3 * 4)) * 64, 6 * 64 }, actual;
+   std::cerr << "cfg: ul " << cfg.tx_freq << " dl " << cfg.rx_freq 
<< std::endl;
 
bladerf_log_set_verbosity(BLADERF_LOG_LEVEL_DEBUG);
bladerf_set_usb_reset_on_open(true);
@@ -294,9 +306,10 @@
blade_check(bladerf_set_bandwidth, dev, BLADERF_CHANNEL_TX(0), 
(bladerf_bandwidth)cfg.bandwidth,
(bladerf_bandwidth *)NULL);

-   blade_check(bladerf_set_gain_mode, dev, BLADERF_CHANNEL_RX(0), 
BLADERF_GAIN_MGC);
-   setRxGain(rxgain, 0);
-   setTxGain(txgain, 0);
+   blade_check(bladerf_set_gain_mode, dev, BLADERF_CHANNEL_RX(0),
+   use_agc ? BLADERF_GAIN_AUTOMATIC : 
BLADERF_GAIN_MGC);
+   setRxGain(cfg.rxgain, 0);
+   setTxGain(cfg.txgain, 0);
usleep(1000);
 
bladerf_set_stream_timeout(dev, BLADERF_TX, 10);
@@ -350,7 +363,7 @@

double setRxGain(double dB, size_t chan = 0)
{
-   rxgain = dB;
+   cfg.rxgain = dB;
msleep(15);
blade_check(bladerf_set_gain, dev, BLADERF_CHANNEL_RX(0), 
(bladerf_gain)dB);
msleep(15);
@@ -358,7 +371,7 @@
};
double setTxGain(double dB, size_t chan = 0)
{
-   txgain = dB;
+   cfg.txgai

[S] Change in osmo-trx[master]: ms: update osmocom-bb submodule

2024-03-20 Thread Hoernchen
Attention is currently required from: Hoernchen.

Hello Jenkins Builder, dexter, laforge,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-trx/+/36048?usp=email

to look at the new patch set (#4).

The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder

The change is no longer submittable: Verified is unsatisfied now.


Change subject: ms: update osmocom-bb submodule
..

ms: update osmocom-bb submodule

Change-Id: I0140f0a5333469f356c85a95660e10bbdd67cd25
---
M osmocom-bb
1 file changed, 10 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/48/36048/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36048?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I0140f0a5333469f356c85a95660e10bbdd67cd25
Gerrit-Change-Number: 36048
Gerrit-PatchSet: 4
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: laforge 
Gerrit-CC: fixeria 
Gerrit-CC: pespin 
Gerrit-Attention: Hoernchen 
Gerrit-MessageType: newpatchset


[S] Change in osmo-trx[master]: ms: prune ancient, unused code parts

2024-03-20 Thread Hoernchen
Hoernchen has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36375?usp=email )


Change subject: ms: prune ancient, unused code parts
..

ms: prune ancient, unused code parts

Change-Id: I36dcb7ba9364b1eafbaa7267cde3574d82da5dd2
---
M Transceiver52M/ms/bladerf_specific.h
M Transceiver52M/ms/ms.cpp
M Transceiver52M/ms/ms.h
M Transceiver52M/ms/ms_rx_lower.cpp
M Transceiver52M/ms/threadpool.h
5 files changed, 10 insertions(+), 18 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/75/36375/1

diff --git a/Transceiver52M/ms/bladerf_specific.h 
b/Transceiver52M/ms/bladerf_specific.h
index d31ea29..a440125 100644
--- a/Transceiver52M/ms/bladerf_specific.h
+++ b/Transceiver52M/ms/bladerf_specific.h
@@ -186,7 +186,6 @@
 };

 using dev_buf_t = typeof(blade_otw_buffer_helper::x);
-// using buf_in_use = blade_otw_buffer<2, blade_speed_buffer_type::SS>;
 using bh_fn_t = std::function;

 template 
@@ -194,7 +193,6 @@
struct bladerf *dev;
struct bladerf_stream *rx_stream;
struct bladerf_stream *tx_stream;
-   // using pkt2buf = blade_otw_buffer<2, blade_speed_buffer_type::SS>;
using tx_buf_q_type = spsc_cond_timeout;
const unsigned int rxFullScale, txFullScale;
const int rxtxdelay;
diff --git a/Transceiver52M/ms/ms.cpp b/Transceiver52M/ms/ms.cpp
index 4ae8668..f1a915c 100644
--- a/Transceiver52M/ms/ms.cpp
+++ b/Transceiver52M/ms/ms.cpp
@@ -22,19 +22,13 @@
 #include "GSMCommon.h"
 #include 
 #include 
-#include 
+
 #include 
 #include 
 #include 
-#include 
-#include 

 #include "ms.h"

-extern "C" {
-#include "sch.h"
-}
-
 #include "threadsched.h"

 dummylog ms_trx::dummy_log;
diff --git a/Transceiver52M/ms/ms.h b/Transceiver52M/ms/ms.h
index e088f73..9ac2171 100644
--- a/Transceiver52M/ms/ms.h
+++ b/Transceiver52M/ms/ms.h
@@ -181,7 +181,6 @@
std::lock_guard g(m);
global_time_keeper.incTN(1);
global_ts_keeper = new_ts;
-   // std::cerr << "u " << new_ts << std::endl;
}
void inc_and_update_safe(int64_t new_ts)
{
@@ -191,7 +190,6 @@
assert(diff > 0.5 * ONE_TS_BURST_LEN);
global_time_keeper.incTN(1);
global_ts_keeper = new_ts;
-   // std::cerr << "s " << new_ts << std::endl;
}
void dec_by_one()
{
@@ -217,8 +215,6 @@
}
 };

-using ts_hitter_q_t = spsc_cond<64, GSM::Time, true, false>;
-
 // used to globally initialize the sched/hw information
 struct sched_hw_info {
int hw_cpus;
diff --git a/Transceiver52M/ms/ms_rx_lower.cpp 
b/Transceiver52M/ms/ms_rx_lower.cpp
index 3527a8b..71d49aa 100644
--- a/Transceiver52M/ms/ms_rx_lower.cpp
+++ b/Transceiver52M/ms/ms_rx_lower.cpp
@@ -89,8 +89,6 @@
mBSIC = sch.bsic;
mTSC = sch.bsic & 0x7;
timekeeper.set(fn, 0);
-   // global_time_keeper.FN(fn);
-   // global_time_keeper.TN(0);
}

return true;
@@ -261,7 +259,6 @@
clamp_array(bits->begin(), 148, 1.5f);

float_to_sbit(>begin()[0], (signed char 
*)_demod_bits[0], 62, 148);
-   // float_to_sbit(>begin()[106], [39], 62, 39);

if (decode_sch((char *)sch_demod_bits, is_first_sch_acq)) {
auto current_gsm_time_updated = timekeeper.gsmtime();
@@ -371,7 +368,6 @@

if (fracts)
timekeeper.inc_both();
-   // timekeeper.inc_and_update(first_sch_ts_start + 1 * 
ONE_TS_BURST_LEN);

timekeeper.dec_by_one(); // oops, off by one?

diff --git a/Transceiver52M/ms/threadpool.h b/Transceiver52M/ms/threadpool.h
index 4b1eefd..0574236 100644
--- a/Transceiver52M/ms/threadpool.h
+++ b/Transceiver52M/ms/threadpool.h
@@ -21,7 +21,6 @@
  */

 #include 
-#include 
 #include 
 #include 
 #include 

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36375?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I36dcb7ba9364b1eafbaa7267cde3574d82da5dd2
Gerrit-Change-Number: 36375
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-MessageType: newchange


[S] Change in osmo-trx[master]: ms: fix shutdown issues

2024-03-20 Thread Hoernchen
Hoernchen has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36374?usp=email )


Change subject: ms: fix shutdown issues
..

ms: fix shutdown issues

Queues got stuck when killing mobile during a transfer

Change-Id: I02e668a55dece96e421c82706b76bbb411ea6712
---
M Transceiver52M/ms/itrq.h
M Transceiver52M/ms/ms_rx_lower.cpp
M Transceiver52M/ms/ms_trxcon_if.h
M Transceiver52M/ms/ms_upper.cpp
4 files changed, 20 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/74/36374/1

diff --git a/Transceiver52M/ms/itrq.h b/Transceiver52M/ms/itrq.h
index 69ff515..3ce6700 100644
--- a/Transceiver52M/ms/itrq.h
+++ b/Transceiver52M/ms/itrq.h
@@ -34,7 +34,7 @@
std::condition_variable cond_r, cond_w;
std::mutex lr, lw;
std::atomic_int r_flag, w_flag;
-   const int timeout_ms = 200;
+   const int timeout_ms = 600;

 public:
explicit spsc_cond_timeout_detail() : r_flag(0), w_flag(0)
diff --git a/Transceiver52M/ms/ms_rx_lower.cpp 
b/Transceiver52M/ms/ms_rx_lower.cpp
index b169dd8..3527a8b 100644
--- a/Transceiver52M/ms/ms_rx_lower.cpp
+++ b/Transceiver52M/ms/ms_rx_lower.cpp
@@ -54,6 +54,8 @@

 #define PRINT_Q_OVERFLOW

+extern std::atomic g_exit_flag;
+
 bool ms_trx::decode_sch(char *bits, bool update_global_clock)
 {
int fn;
@@ -141,7 +143,7 @@
memcpy(brst.sch_bits, sch_demod_bits, sizeof(sch_demod_bits));
}

-   while (upper_is_ready && !rxqueue.spsc_push())
+   while (!g_exit_flag && upper_is_ready && !rxqueue.spsc_push())
;

if (!use_agc)
diff --git a/Transceiver52M/ms/ms_trxcon_if.h b/Transceiver52M/ms/ms_trxcon_if.h
index 0928d40..14bdb4b 100644
--- a/Transceiver52M/ms/ms_trxcon_if.h
+++ b/Transceiver52M/ms/ms_trxcon_if.h
@@ -37,6 +37,6 @@
memcpy(buf, (void *)br->burst, br->burst_len);
}
 };
-using tx_queue_t = spsc_cond<8 * 1, internal_q_tx_buf, true, false>;
+using tx_queue_t = spsc_cond_timeout<8 * 1, internal_q_tx_buf, 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>;
+using cmdr_queue_t = spsc_cond_timeout<8 * 1, trxcon_phyif_rsp, false, false>;
diff --git a/Transceiver52M/ms/ms_upper.cpp b/Transceiver52M/ms/ms_upper.cpp
index af5bf82..c86029c 100644
--- a/Transceiver52M/ms/ms_upper.cpp
+++ b/Transceiver52M/ms/ms_upper.cpp
@@ -172,9 +172,11 @@
std::fill(workbuf, workbuf + workbuf_size, 0);
// assert(sv.begin() == [40]);

-   while (!rxqueue.spsc_pop()) {
+   while (!rxqueue.spsc_pop() && !g_exit_flag) {
rxqueue.spsc_prep_pop();
}
+   if (g_exit_flag)
+   return false;

wTime = e.gsmts;


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36374?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I02e668a55dece96e421c82706b76bbb411ea6712
Gerrit-Change-Number: 36374
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-MessageType: newchange


[S] Change in osmo-ci[master]: OBS: add gapk, osmocom-bb

2024-03-19 Thread Hoernchen
Attention is currently required from: osmith.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/36351?usp=email )

Change subject: OBS: add gapk, osmocom-bb
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/36351?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Ifd84479f97fe17de35a5f409c8fabadd3bf5c272
Gerrit-Change-Number: 36351
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Tue, 19 Mar 2024 12:30:36 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-ci[master]: jobs/gerrit: build for debian 12: gapk, osmocom-bb

2024-03-19 Thread Hoernchen
Attention is currently required from: osmith, pespin.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/36350?usp=email )

Change subject: jobs/gerrit: build for debian 12: gapk, osmocom-bb
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/36350?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Ib48d90af734e627aa4760af6423481970626d501
Gerrit-Change-Number: 36350
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Tue, 19 Mar 2024 12:09:41 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmocom-bb[master]: debian: initial layer23 packaging

2024-03-19 Thread Hoernchen
Attention is currently required from: osmith, pespin.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/36349?usp=email )

Change subject: debian: initial layer23 packaging
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/36349?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I3713201233e13fca5ea4e0b8c4df913c787965f5
Gerrit-Change-Number: 36349
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Tue, 19 Mar 2024 12:09:35 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: ms: fix up template deduction failure

2024-03-18 Thread Hoernchen
Attention is currently required from: osmith.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36338?usp=email )

Change subject: ms: fix up template deduction failure
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36338?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I590060d201445ad25cf5eb73c4b1360eaf6a6cea
Gerrit-Change-Number: 36338
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Mon, 18 Mar 2024 15:54:33 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: contrib/jenkins: make configure args diff friendly

2024-03-18 Thread Hoernchen
Attention is currently required from: laforge, osmith, pespin.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36330?usp=email )

Change subject: contrib/jenkins: make configure args diff friendly
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36330?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I049af384eccdb6f8e5b305ca35de106eeaca3fa8
Gerrit-Change-Number: 36330
Gerrit-PatchSet: 3
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Mon, 18 Mar 2024 15:54:31 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in gapk[master]: debian: initial

2024-03-18 Thread Hoernchen
Attention is currently required from: osmith.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/gapk/+/36335?usp=email )

Change subject: debian: initial
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/gapk/+/36335?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: gapk
Gerrit-Branch: master
Gerrit-Change-Id: I8e9d42fc332c5d426b9074c6bc58bc6efe037fea
Gerrit-Change-Number: 36335
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Mon, 18 Mar 2024 13:58:17 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in gapk[master]: gitignore: add .version and *~

2024-03-18 Thread Hoernchen
Attention is currently required from: osmith.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/gapk/+/36334?usp=email )

Change subject: gitignore: add .version and *~
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/gapk/+/36334?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: gapk
Gerrit-Branch: master
Gerrit-Change-Id: If0b4c559727b04532353b267180c9d465b323d12
Gerrit-Change-Number: 36334
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Mon, 18 Mar 2024 13:54:29 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: contrib/jenkins: add --with-bladerf

2024-03-18 Thread Hoernchen
Attention is currently required from: osmith.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36331?usp=email )

Change subject: contrib/jenkins: add --with-bladerf
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36331?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I1300aa107fd1031cf921fafc3566f0f64f9cdd72
Gerrit-Change-Number: 36331
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Mon, 18 Mar 2024 13:08:09 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: debian: add osmo-trx-ms-blade

2024-03-18 Thread Hoernchen
Attention is currently required from: osmith, pespin.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36329?usp=email )

Change subject: debian: add osmo-trx-ms-blade
..


Patch Set 2: Code-Review+2

(1 comment)

File debian/control:

https://gerrit.osmocom.org/c/osmo-trx/+/36329/comment/ea4df7e4_e9a6ac43
PS1, Line 19:libbladerf-dev
> I'd say better put the "backend dependency" together with the other ones, aka 
> liblimesuite-dev and l […]
Ack



--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36329?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I85d24355975f292610bcde61a8917aec852043ca
Gerrit-Change-Number: 36329
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Mon, 18 Mar 2024 13:07:47 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: gitignore: add .version

2024-03-18 Thread Hoernchen
Attention is currently required from: osmith.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36327?usp=email )

Change subject: gitignore: add .version
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36327?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ib75781b5d473921b42936e4d3c441e6a520b9108
Gerrit-Change-Number: 36327
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: pespin 
Gerrit-CC: Jenkins Builder
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Mon, 18 Mar 2024 12:40:52 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in docker-playground[master]: debian-bookworm-build: add libbladerf-dev

2024-03-18 Thread Hoernchen
Attention is currently required from: fixeria, osmith, pespin.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/36326?usp=email )

Change subject: debian-bookworm-build: add libbladerf-dev
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/36326?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I3c3fe95d8ebb21f7691a491144885c7deb8049a5
Gerrit-Change-Number: 36326
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Mon, 18 Mar 2024 11:55:24 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[L] Change in osmo-trx[master]: ms: add demod test tool and data

2024-03-04 Thread Hoernchen
Hoernchen has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36047?usp=email )

Change subject: ms: add demod test tool and data
..

ms: add demod test tool and data

It just uses the viterbi equalizer and the sigproclib to generate and
demodulate bursts and prints the bits, only useful for
development.

Change-Id: I852e34d9667d1f12f235f8b3da1fcc0d738b2db9
---
M .checkpatch.conf
M .gitignore
M configure.ac
M utils/Makefile.am
A utils/va-test/Makefile.am
A utils/va-test/burst-gen.cpp
A utils/va-test/demodbits_tsc7.s8
A utils/va-test/nb_chunk_tsc7.cfile
8 files changed, 566 insertions(+), 0 deletions(-)

Approvals:
  dexter: Looks good to me, but someone else must approve; Verified
  laforge: Looks good to me, but someone else must approve
  Jenkins Builder: Verified
  Hoernchen: Looks good to me, approved




diff --git a/.checkpatch.conf b/.checkpatch.conf
index 1e4b479..1699801 100644
--- a/.checkpatch.conf
+++ b/.checkpatch.conf
@@ -1,4 +1,5 @@
 --exclude osmocom-bb/.*
 --exclude .*h
 --exclude Transceiver52M/grgsm_vitac/.*
+--exclude utils/va-test/.*
 --ignore FUNCTION_WITHOUT_ARGS
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 0b33e0f..581b08f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -83,6 +83,7 @@
 !contrib/osmo-trx.spec.in

 utils/osmo-prbs-tool
+utils/va-test/osmo-burst-gen
 /.qtc_clangd/*
 /.cache/*
 /.vscode/*
diff --git a/configure.ac b/configure.ac
index 69055fd..8aecb27 100644
--- a/configure.ac
+++ b/configure.ac
@@ -374,6 +374,7 @@
 tests/CommonLibs/Makefile \
 tests/Transceiver52M/Makefile \
 utils/Makefile \
+utils/va-test/Makefile \
 doc/Makefile \
 doc/examples/Makefile \
 contrib/Makefile \
diff --git a/utils/Makefile.am b/utils/Makefile.am
index bac9a7f..1818093 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -1,6 +1,8 @@
 AM_CPPFLAGS = $(LIBOSMOCODING_CFLAGS)
 AM_CFLAGS = -Wall

+DIST_SUBDIRS = va-test
+
 EXTRA_DIST = clockdump.sh matlab

 noinst_PROGRAMS = osmo-prbs-tool
diff --git a/utils/va-test/Makefile.am b/utils/va-test/Makefile.am
new file mode 100644
index 000..d5a72e5
--- /dev/null
+++ b/utils/va-test/Makefile.am
@@ -0,0 +1,17 @@
+include $(top_srcdir)/Makefile.common
+
+noinst_PROGRAMS = osmo-burst-gen
+
+osmo_burst_gen_SOURCES = burst-gen.cpp \
+   ${top_srcdir}/Transceiver52M/grgsm_vitac/grgsm_vitac.cpp \
+   ${top_srcdir}/Transceiver52M/grgsm_vitac/viterbi_detector.cc
+osmo_burst_gen_LDADD = \
+   ${top_srcdir}/Transceiver52M/libtransceiver_common.la \
+   $(ARCH_LA) \
+   $(GSM_LA) \
+   $(COMMON_LA)
+osmo_burst_gen_CPPFLAGS = -Wall $(STD_DEFINES_AND_INCLUDES) \
+   -I${top_srcdir}/Transceiver52M/arch/common \
+   -I${top_srcdir}/Transceiver52M/device/common \
+   -I${top_srcdir}/Transceiver52M
+
diff --git a/utils/va-test/burst-gen.cpp b/utils/va-test/burst-gen.cpp
new file mode 100644
index 000..bdd0c4b
--- /dev/null
+++ b/utils/va-test/burst-gen.cpp
@@ -0,0 +1,531 @@
+/*
+ * (C) 2023 by sysmocom s.f.m.c. GmbH 
+ * All Rights Reserved
+ *
+ * Author: Eric Wild 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+// this allows messing with the demod to check the detecton offset impact,
+// not intended for actual automated tests.
+
+#include "sigProcLib.h"
+
+extern "C" {
+#include "convert.h"
+#include 
+}
+
+#define _CRT_SECURE_NO_WARNINGS
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include 
+
+#define DO_RACH
+
+const int SAMPLE_SCALE_FACTOR = 1;
+
+template 
+void convert_and_scale(void *dst, void *src, unsigned int src_len, ST scale)
+{
+   for (unsigned int i = 0; i < src_len; i++)
+   reinterpret_cast(dst)[i] = 
static_cast((reinterpret_cast(src)[i]) * scale);
+}
+template 
+void convert_and_scale_default(void *dst, void *src, unsigned int src_len)
+{
+   return convert_and_scale(dst, src, src_len, 
SAMPLE_SCALE_FACTOR);
+}
+
+static const unsigned int txFullScale = (float)(1 << 14) - 1;
+// static const unsigned int rxFullScale = (float)(1 << 14) - 1;
+
+static const BitVector
+   
gRACHBurstx("001110100100101100011001101010100000011

[L] Change in osmo-trx[master]: ms: add sigproclib demod

2024-03-04 Thread Hoernchen
Hoernchen has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36046?usp=email )

Change subject: ms: add sigproclib demod
..

ms: add sigproclib demod

This is basically a fixed version of ttsous ancient branch that can be
used instead of the VA. Required config option part of a future
patchset.

Change-Id: I6558992bd69f18526be5ebe7d424ca00ceb67772
---
M GSM/GSMCommon.cpp
M GSM/GSMCommon.h
M Transceiver52M/Resampler.cpp
M Transceiver52M/ms/ms_rx_lower.cpp
M Transceiver52M/ms/ms_upper.cpp
M Transceiver52M/sigProcLib.cpp
M Transceiver52M/sigProcLib.h
7 files changed, 419 insertions(+), 11 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, but someone else must approve
  Hoernchen: Looks good to me, approved




diff --git a/GSM/GSMCommon.cpp b/GSM/GSMCommon.cpp
index 5e9e4ae..a9e2bb1 100644
--- a/GSM/GSMCommon.cpp
+++ b/GSM/GSMCommon.cpp
@@ -55,12 +55,15 @@
 };

 const BitVector 
GSM::gDummyBurst("0001011011101101010010011101001000100010001110001011100010111000101011101001010001100110011100010010001001010101");
+const BitVector GSM::gDummyBurstTSC("01110001011100010111000101");

 /* 3GPP TS 05.02, section 5.2.7 "Access burst (AB)", synch. sequence bits */
 const BitVector 
GSM::gRACHSynchSequenceTS0("01001011000110011010101000000");  /* 
GSM, GMSK (default) */
 const BitVector 
GSM::gRACHSynchSequenceTS1("01010100100011100010001001101");  /* 
EGPRS, 8-PSK */
 const BitVector 
GSM::gRACHSynchSequenceTS2("111000100111010101101101101110111");  /* 
EGPRS, GMSK */

+const BitVector 
GSM::gSCHSynchSequence("101110010110001001000010110101000101011101111011");
+
 //   
|-head-||-midamble--||--data||t|
 const BitVector 
GSM::gRACHBurst("0011101001001011000110011010101000000110011111001001010110011000");

diff --git a/GSM/GSMCommon.h b/GSM/GSMCommon.h
index 48723b4..aa059c2 100644
--- a/GSM/GSMCommon.h
+++ b/GSM/GSMCommon.h
@@ -52,11 +52,16 @@

 /** C0T0 filler burst, GSM 05.02, 5.2.6 */
 extern const BitVector gDummyBurst;
+extern const BitVector gDummyBurstTSC;

 /** Random access burst synch. sequence */
 extern const BitVector gRACHSynchSequenceTS0;
 extern const BitVector gRACHSynchSequenceTS1;
 extern const BitVector gRACHSynchSequenceTS2;
+
+/** Synchronization burst sync sequence */
+extern const BitVector gSCHSynchSequence;
+
 /** Random access burst synch. sequence, GSM 05.02 5.2.7 */
 extern const BitVector gRACHBurst;

diff --git a/Transceiver52M/Resampler.cpp b/Transceiver52M/Resampler.cpp
index 910c7ff..841c3a9 100644
--- a/Transceiver52M/Resampler.cpp
+++ b/Transceiver52M/Resampler.cpp
@@ -32,7 +32,7 @@
 #define M_PI   3.14159265358979323846264338327f
 #endif

-#define MAX_OUTPUT_LEN 4096
+#define MAX_OUTPUT_LEN 4096*4

 using namespace std;

diff --git a/Transceiver52M/ms/ms_rx_lower.cpp 
b/Transceiver52M/ms/ms_rx_lower.cpp
index c2adda3..d894e96 100644
--- a/Transceiver52M/ms/ms_rx_lower.cpp
+++ b/Transceiver52M/ms/ms_rx_lower.cpp
@@ -19,6 +19,8 @@
  *
  */

+#include "sigProcLib.h"
+#include "signalVector.h"
 #include 
 #include 
 #include 
@@ -155,12 +157,12 @@
auto current_gsm_time = timekeeper.gsmtime();
const auto buf_len = is_first_sch_acq ? SCH_LEN_SPS : ONE_TS_BURST_LEN;
const auto which_in_buffer = is_first_sch_acq ? first_sch_buf : 
burst_copy_buffer;
+   memset((void *)_acq_buffer[0], 0, sizeof(sch_acq_buffer));
+#if 1
const auto which_out_buffer = is_first_sch_acq ? sch_acq_buffer : 
_acq_buffer[40 * 2];
const auto ss = reinterpret_cast 
*>(which_out_buffer);
std::complex channel_imp_resp[CHAN_IMP_RESP_LENGTH * d_OSR];
-
int start;
-   memset((void *)_acq_buffer[0], 0, sizeof(sch_acq_buffer));
convert_and_scale(which_out_buffer, which_in_buffer, buf_len * 2, 1.f / 
float(rxFullScale));
if (is_first_sch_acq) {
float max_corr = 0;
@@ -173,9 +175,22 @@
detect_burst_nb([start], _imp_resp[0], 0, sch_demod_bits);

auto sch_decode_success = decode_sch(sch_demod_bits, is_first_sch_acq);
+#if 0
+   auto burst = new signalVector(buf_len, 50);
+   const auto corr_type = is_first_sch_acq ? 
sch_detect_type::SCH_DETECT_BUFFER : sch_detect_type::SCH_DETECT_FULL;
+   struct estim_burst_params ebp;

+   // scale like uhd, +-2k -> +-32k
+   convert_and_scale(burst->begin(), which_in_buffer, buf_len * 2, 
SAMPLE_SCALE_FACTOR);
+
+   auto rv = detectSCHBurst(*burst, 4, 4, corr_type, );
+
+   int howmuchdelay = ebp.toa * 4;
+   std::cerr << "ooffs: &

[L] Change in osmo-trx[master]: ms: add demod test tool and data

2024-03-04 Thread Hoernchen
Attention is currently required from: pespin.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36047?usp=email )

Change subject: ms: add demod test tool and data
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36047?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I852e34d9667d1f12f235f8b3da1fcc0d738b2db9
Gerrit-Change-Number: 36047
Gerrit-PatchSet: 3
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Mon, 04 Mar 2024 20:05:26 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[L] Change in osmo-trx[master]: ms: add sigproclib demod

2024-03-04 Thread Hoernchen
Attention is currently required from: pespin.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36046?usp=email )

Change subject: ms: add sigproclib demod
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36046?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I6558992bd69f18526be5ebe7d424ca00ceb67772
Gerrit-Change-Number: 36046
Gerrit-PatchSet: 2
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Mon, 04 Mar 2024 20:05:15 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[L] Change in osmo-trx[master]: ms: get rid of std::thread

2024-03-04 Thread Hoernchen
Hoernchen has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36044?usp=email )

Change subject: ms: get rid of std::thread
..

ms: get rid of std::thread

2fc2b594da6e329577b195cb2543a8dd9e1b9ed0 changed std::thread to pthread
for proper affinity to circumvent startup issues, so just stick to
pthread instead of mixing std::thread and pthread, which made tracking
thread creation difficult due to different functions.

Change-Id: I0ba2fd958530394b9d99ed82111064d428c5870f
---
M Transceiver52M/Makefile.am
M Transceiver52M/ms/bladerf_specific.h
M Transceiver52M/ms/ms.cpp
M Transceiver52M/ms/ms.h
M Transceiver52M/ms/ms_upper.cpp
M Transceiver52M/ms/threadpool.h
A Transceiver52M/ms/threadsched.cpp
A Transceiver52M/ms/threadsched.h
M Transceiver52M/ms/uhd_specific.h
9 files changed, 248 insertions(+), 141 deletions(-)

Approvals:
  Hoernchen: Looks good to me, approved
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, but someone else must approve




diff --git a/Transceiver52M/Makefile.am b/Transceiver52M/Makefile.am
index e82111e..dadfde9 100644
--- a/Transceiver52M/Makefile.am
+++ b/Transceiver52M/Makefile.am
@@ -88,6 +88,7 @@
 MS_LOWER_SRC = \
ms/sch.c \
ms/ms.cpp \
+   ms/threadsched.cpp \
ms/ms_rx_lower.cpp \
grgsm_vitac/grgsm_vitac.cpp \
grgsm_vitac/viterbi_detector.cc
@@ -101,6 +102,7 @@

 noinst_HEADERS += \
ms/ms.h \
+   ms/threadsched.h \
ms/bladerf_specific.h \
ms/uhd_specific.h \
ms/ms_upper.h \
diff --git a/Transceiver52M/ms/bladerf_specific.h 
b/Transceiver52M/ms/bladerf_specific.h
index 57aae75..f4abe57 100644
--- a/Transceiver52M/ms/bladerf_specific.h
+++ b/Transceiver52M/ms/bladerf_specific.h
@@ -428,10 +428,12 @@

auto get_rx_burst_handler_fn(bh_fn_t burst_handler)
{
-   auto fn = [this] {
+   using thist = decltype(this);
+   auto fn = [](void *args) -> void * {
+   thist t = reinterpret_cast(args);
int status = 0;
if (!stop_lower_threads_flag)
-   status = bladerf_stream(rx_stream, 
BLADERF_RX_X1);
+   status = bladerf_stream(t->rx_stream, 
BLADERF_RX_X1);
if (status < 0)
std::cerr << "rx stream error! " << 
bladerf_strerror(status) << std::endl;

@@ -441,10 +443,12 @@
}
auto get_tx_burst_handler_fn(bh_fn_t burst_handler)
{
-   auto fn = [this] {
+   using thist = decltype(this);
+   auto fn = [](void *args) -> void * {
+   thist t = reinterpret_cast(args);
int status = 0;
if (!stop_lower_threads_flag)
-   status = bladerf_stream(tx_stream, 
BLADERF_TX_X1);
+   status = bladerf_stream(t->tx_stream, 
BLADERF_TX_X1);
if (status < 0)
std::cerr << "rx stream error! " << 
bladerf_strerror(status) << std::endl;

diff --git a/Transceiver52M/ms/ms.cpp b/Transceiver52M/ms/ms.cpp
index b8710a6..4ae8668 100644
--- a/Transceiver52M/ms/ms.cpp
+++ b/Transceiver52M/ms/ms.cpp
@@ -35,6 +35,8 @@
 #include "sch.h"
 }

+#include "threadsched.h"
+
 dummylog ms_trx::dummy_log;

 #ifdef DBGXX
@@ -83,13 +85,11 @@
if (stop_lower_threads_flag)
return;
auto fn = get_rx_burst_handler_fn(rx_bh());
-   lower_rx_task = std::thread(fn);
-   set_name_aff_sched(lower_rx_task.native_handle(), 
sched_params::thread_names::RXRUN);
+   lower_rx_task = spawn_worker_thread(sched_params::thread_names::RXRUN, 
fn, this);

usleep(1000);
auto fn2 = get_tx_burst_handler_fn(tx_bh());
-   lower_tx_task = std::thread(fn2);
-   set_name_aff_sched(lower_tx_task.native_handle(), 
sched_params::thread_names::TXRUN);
+   lower_tx_task = spawn_worker_thread(sched_params::thread_names::TXRUN, 
fn2, this);

actually_enable_streams();
 }
@@ -105,9 +105,9 @@
stop_lower_threads_flag = true;
close_device();
std::cerr << "dev closed..." << std::endl;
-   lower_rx_task.join();
+   pthread_join(lower_rx_task, nullptr);
std::cerr << "L rx dead..." << std::endl;
-   lower_tx_task.join();
+   pthread_join(lower_tx_task, nullptr);
std::cerr << "L tx dead..." << std::endl;
 }

diff --git a/Transceiver52M/ms/ms.h b/Transceiver52M/ms/ms.h
index 18a6954..2ad78de 100644
--- a/Transceiver52M/ms/ms.h
+++ b/Transceiver52M/ms/ms.h
@@ -26,7 +26,7 @@
 #include 
 #include 
 #i

[S] Change in osmo-trx[master]: ms: hard preswapped VA gsm bits

2024-03-04 Thread Hoernchen
Hoernchen has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36045?usp=email )

Change subject: ms: hard preswapped VA gsm bits
..

ms: hard preswapped VA gsm bits

small * 127 can still be small enough to end up 0 after casting which
breaks everything.

Change-Id: I44b95dced64208eebfb5214da034a5d49abdd0df
---
M Transceiver52M/grgsm_vitac/grgsm_vitac.cpp
1 file changed, 13 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, but someone else must approve
  Hoernchen: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve




diff --git a/Transceiver52M/grgsm_vitac/grgsm_vitac.cpp 
b/Transceiver52M/grgsm_vitac/grgsm_vitac.cpp
index 5779d9d..2016541 100644
--- a/Transceiver52M/grgsm_vitac/grgsm_vitac.cpp
+++ b/Transceiver52M/grgsm_vitac/grgsm_vitac.cpp
@@ -95,7 +95,7 @@
viterbi_detector(filtered_burst, burst_size, rhh, start_state, 
stop_states, 2, output);

for (unsigned int i = 0; i < burst_size; i++)
-   output_binary[i] = (char)(output[i] * -127); // pre flip bits!
+   output_binary[i] = output[i] > 0 ? -127 : 127; // pre flip bits!
 }

 NO_UBSAN void detect_burst_nb(const gr_complex *input, gr_complex 
*chan_imp_resp, int burst_start, char *output_binary,

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36045?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I44b95dced64208eebfb5214da034a5d49abdd0df
Gerrit-Change-Number: 36045
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in osmo-trx[master]: ms: hard preswapped VA gsm bits

2024-03-04 Thread Hoernchen
Attention is currently required from: pespin.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36045?usp=email )

Change subject: ms: hard preswapped VA gsm bits
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36045?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I44b95dced64208eebfb5214da034a5d49abdd0df
Gerrit-Change-Number: 36045
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Mon, 04 Mar 2024 20:05:09 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[L] Change in osmo-trx[master]: ms: get rid of std::thread

2024-03-04 Thread Hoernchen
Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36044?usp=email )

Change subject: ms: get rid of std::thread
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36044?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I0ba2fd958530394b9d99ed82111064d428c5870f
Gerrit-Change-Number: 36044
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Mon, 04 Mar 2024 20:05:01 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[L] Change in osmo-trx[master]: ms: add demod test tool and data

2024-02-23 Thread Hoernchen
Attention is currently required from: pespin.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36047?usp=email )

Change subject: ms: add demod test tool and data
..


Patch Set 3:

(1 comment)

File utils/va-test/burst-gen.cpp:

https://gerrit.osmocom.org/c/osmo-trx/+/36047/comment/df84e167_55cd4328
PS3, Line 80:   // mrv(): bits(), demod_bits() {}
> this can be dropped?
All of this is debug code which is why it contains copied code from the 
sigproclib and constants so they can be modified, there is no point cleaning 
this up or trying to make it pretty, it's supposed to be modified and actively 
debugged.



--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36047?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I852e34d9667d1f12f235f8b3da1fcc0d738b2db9
Gerrit-Change-Number: 36047
Gerrit-PatchSet: 3
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Fri, 23 Feb 2024 11:12:07 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: ms: hard preswapped VA gsm bits

2024-02-22 Thread Hoernchen
Attention is currently required from: pespin.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36045?usp=email )

Change subject: ms: hard preswapped VA gsm bits
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
> iiuc the char there was actually a uint8_t right?
no, just char, and then sbit_t which is still a typedef'd char.



--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36045?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I44b95dced64208eebfb5214da034a5d49abdd0df
Gerrit-Change-Number: 36045
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Thu, 22 Feb 2024 17:00:57 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Hoernchen 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: ms: hard preswapped VA gsm bits

2024-02-22 Thread Hoernchen
Attention is currently required from: pespin.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36045?usp=email )

Change subject: ms: hard preswapped VA gsm bits
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
> I'm not really understanding this code but feel free to merge it if you know 
> what you are doing here […]
The values can be so small that *127 ends being char 0.. The idea was soft bits 
between -127..127, but that does not work as intended, which makes debugging 
really annoying, because the buffer is "empty"..



--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36045?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I44b95dced64208eebfb5214da034a5d49abdd0df
Gerrit-Change-Number: 36045
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Thu, 22 Feb 2024 16:33:03 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[L] Change in osmo-trx[master]: ms: add sigproclib demod

2024-02-22 Thread Hoernchen
Attention is currently required from: pespin.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36046?usp=email )

Change subject: ms: add sigproclib demod
..


Patch Set 2:

(1 comment)

File Transceiver52M/ms/ms_rx_lower.cpp:

https://gerrit.osmocom.org/c/osmo-trx/+/36046/comment/e72298a8_3846cef6
PS2, Line 161: #if 1
> why all thse if 1 and if 0?
" Required config option part of a future
patchset."

This just does what the previous version did, I didn't want to cram the config 
patchset into this one.



--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36046?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I6558992bd69f18526be5ebe7d424ca00ceb67772
Gerrit-Change-Number: 36046
Gerrit-PatchSet: 2
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Thu, 22 Feb 2024 16:25:24 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[L] Change in osmo-trx[master]: ms: add demod test tool and data

2024-02-22 Thread Hoernchen
Attention is currently required from: Hoernchen.

Hello Jenkins Builder, 

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-trx/+/36047?usp=email

to look at the new patch set (#3).

The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder


Change subject: ms: add demod test tool and data
..

ms: add demod test tool and data

It just uses the viterbi equalizer and the sigproclib to generate and
demodulate bursts and prints the bits, only useful for
development.

Change-Id: I852e34d9667d1f12f235f8b3da1fcc0d738b2db9
---
M .checkpatch.conf
M .gitignore
M configure.ac
M utils/Makefile.am
A utils/va-test/Makefile.am
A utils/va-test/burst-gen.cpp
A utils/va-test/demodbits_tsc7.s8
A utils/va-test/nb_chunk_tsc7.cfile
8 files changed, 566 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/47/36047/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36047?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I852e34d9667d1f12f235f8b3da1fcc0d738b2db9
Gerrit-Change-Number: 36047
Gerrit-PatchSet: 3
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: Hoernchen 
Gerrit-MessageType: newpatchset


[L] Change in osmo-trx[master]: ms: add sigproclib demod

2024-02-22 Thread Hoernchen
Attention is currently required from: Hoernchen.

Hello Jenkins Builder, 

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-trx/+/36046?usp=email

to look at the new patch set (#2).

The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder


Change subject: ms: add sigproclib demod
..

ms: add sigproclib demod

This is basically a fixed version of ttsous ancient branch that can be
used instead of the VA. Required config option part of a future
patchset.

Change-Id: I6558992bd69f18526be5ebe7d424ca00ceb67772
---
M GSM/GSMCommon.cpp
M GSM/GSMCommon.h
M Transceiver52M/Resampler.cpp
M Transceiver52M/ms/ms_rx_lower.cpp
M Transceiver52M/ms/ms_upper.cpp
M Transceiver52M/sigProcLib.cpp
M Transceiver52M/sigProcLib.h
7 files changed, 419 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/46/36046/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36046?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I6558992bd69f18526be5ebe7d424ca00ceb67772
Gerrit-Change-Number: 36046
Gerrit-PatchSet: 2
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: Hoernchen 
Gerrit-MessageType: newpatchset


[S] Change in osmo-trx[master]: ms: update osmocom-bb submodule

2024-02-21 Thread Hoernchen
Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36048?usp=email )

Change subject: ms: update osmocom-bb submodule
..


Set Ready For Review


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36048?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I0140f0a5333469f356c85a95660e10bbdd67cd25
Gerrit-Change-Number: 36048
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Wed, 21 Feb 2024 18:43:11 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[L] Change in osmo-trx[master]: ms: add demod test tool and data

2024-02-21 Thread Hoernchen
Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36047?usp=email )

Change subject: ms: add demod test tool and data
..


Set Ready For Review


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36047?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I852e34d9667d1f12f235f8b3da1fcc0d738b2db9
Gerrit-Change-Number: 36047
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Wed, 21 Feb 2024 18:43:05 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[L] Change in osmo-trx[master]: ms: add sigproclib demod

2024-02-21 Thread Hoernchen
Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36046?usp=email )

Change subject: ms: add sigproclib demod
..


Set Ready For Review


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36046?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I6558992bd69f18526be5ebe7d424ca00ceb67772
Gerrit-Change-Number: 36046
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Wed, 21 Feb 2024 18:43:02 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: ms: hard preswapped VA gsm bits

2024-02-21 Thread Hoernchen
Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36045?usp=email )

Change subject: ms: hard preswapped VA gsm bits
..


Set Ready For Review


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36045?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I44b95dced64208eebfb5214da034a5d49abdd0df
Gerrit-Change-Number: 36045
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Wed, 21 Feb 2024 18:43:00 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[L] Change in osmo-trx[master]: ms: get rid of std::thread

2024-02-21 Thread Hoernchen
Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36044?usp=email )

Change subject: ms: get rid of std::thread
..


Set Ready For Review


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36044?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I0ba2fd958530394b9d99ed82111064d428c5870f
Gerrit-Change-Number: 36044
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Wed, 21 Feb 2024 18:42:57 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[M] Change in osmocom-bb[master]: mobile: fix GAPK I/O producing too many UL frames

2024-02-06 Thread Hoernchen
Attention is currently required from: fixeria, laforge.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/35870?usp=email )

Change subject: mobile: fix GAPK I/O producing too many UL frames
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35870?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I3a7fa223cb592acd5b850819e0682c9c8f81e9d1
Gerrit-Change-Number: 35870
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Tue, 06 Feb 2024 14:39:16 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: ms: do not set the blade tuning mode

2024-02-01 Thread Hoernchen
Hoernchen has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/35761?usp=email )

Change subject: ms: do not set the blade tuning mode
..

ms: do not set the blade tuning mode

Sophisticated users can export BLADERF_DEFAULT_TUNING_MODE=fpga which
reduces the startup time to 1 second, or (default)
BLADERF_DEFAULT_TUNING_MODE=host which always works.

Defaulting to fpga mode has the unfortunate side effect that the blade
can get stuck in a weird invalid mode when supplying wrong parameters
that breaks sample streaming until it is power cycled or "reset" by
using host tuning once. So, let's do the safe thing, and not default to
fpga mode.

Change-Id: I109f925f07a198d1fb33fe793e91e455fea05a96
---
M Transceiver52M/ms/bladerf_specific.h
1 file changed, 19 insertions(+), 1 deletion(-)

Approvals:
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified
  laforge: Looks good to me, approved




diff --git a/Transceiver52M/ms/bladerf_specific.h 
b/Transceiver52M/ms/bladerf_specific.h
index e9245d4..57aae75 100644
--- a/Transceiver52M/ms/bladerf_specific.h
+++ b/Transceiver52M/ms/bladerf_specific.h
@@ -255,7 +255,6 @@
bladerf_log_set_verbosity(BLADERF_LOG_LEVEL_DEBUG);
bladerf_set_usb_reset_on_open(true);

-   setenv("BLADERF_DEFAULT_TUNING_MODE","fpga",1); // ensure blade 
2 does not spend 10 seconds initializing host control
blade_check(bladerf_open, , "");
if (!dev) {
std::cerr << "open failed, device missing?" << 
std::endl;

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/35761?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I109f925f07a198d1fb33fe793e91e455fea05a96
Gerrit-Change-Number: 35761
Gerrit-PatchSet: 2
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in osmo-trx[master]: ms: do not set the blade tuning mode

2024-02-01 Thread Hoernchen
Attention is currently required from: fixeria, pespin.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/35761?usp=email )

Change subject: ms: do not set the blade tuning mode
..


Patch Set 2:

(1 comment)

Commit Message:

https://gerrit.osmocom.org/c/osmo-trx/+/35761/comment/507c20d4_13dcab26
PS1, Line 9: Sophisticated users can export BLADERF_DEFAULT_TUNING_MODE=fpga 
which
> One of these two "=fpga" seems wrong in this pargraph?
Ack



--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/35761?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I109f925f07a198d1fb33fe793e91e455fea05a96
Gerrit-Change-Number: 35761
Gerrit-PatchSet: 2
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 01 Feb 2024 12:22:40 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: ms: do not set the blade tuning mode

2024-02-01 Thread Hoernchen
Attention is currently required from: Hoernchen, fixeria.

Hello Jenkins Builder, fixeria,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-trx/+/35761?usp=email

to look at the new patch set (#2).


Change subject: ms: do not set the blade tuning mode
..

ms: do not set the blade tuning mode

Sophisticated users can export BLADERF_DEFAULT_TUNING_MODE=fpga which
reduces the startup time to 1 second, or (default)
BLADERF_DEFAULT_TUNING_MODE=host which always works.

Defaulting to fpga mode has the unfortunate side effect that the blade
can get stuck in a weird invalid mode when supplying wrong parameters
that breaks sample streaming until it is power cycled or "reset" by
using host tuning once. So, let's do the safe thing, and not default to
fpga mode.

Change-Id: I109f925f07a198d1fb33fe793e91e455fea05a96
---
M Transceiver52M/ms/bladerf_specific.h
1 file changed, 19 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/61/35761/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/35761?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I109f925f07a198d1fb33fe793e91e455fea05a96
Gerrit-Change-Number: 35761
Gerrit-PatchSet: 2
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-CC: pespin 
Gerrit-Attention: Hoernchen 
Gerrit-Attention: fixeria 
Gerrit-MessageType: newpatchset


[S] Change in osmo-trx[master]: ms: do not set the blade tuning mode

2024-01-31 Thread Hoernchen
Hoernchen has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/35761?usp=email )


Change subject: ms: do not set the blade tuning mode
..

ms: do not set the blade tuning mode

Sophisticated users can export BLADERF_DEFAULT_TUNING_MODE=fpga which
reduces the startup time to 1 second, or
BLADERF_DEFAULT_TUNING_MODE=fpga which always works.

Defaulting to fpga mode has the unfortunate side effect that the blade
can get stuck in a weird invalid mode when supplying wrong parameters
that breaks sample streaming until it is power cycled or "reset" by
using host tuning once. So, let's do the safe thing, and not default to
fpga mode.

Change-Id: I109f925f07a198d1fb33fe793e91e455fea05a96
---
M Transceiver52M/ms/bladerf_specific.h
1 file changed, 19 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/61/35761/1

diff --git a/Transceiver52M/ms/bladerf_specific.h 
b/Transceiver52M/ms/bladerf_specific.h
index e9245d4..57aae75 100644
--- a/Transceiver52M/ms/bladerf_specific.h
+++ b/Transceiver52M/ms/bladerf_specific.h
@@ -255,7 +255,6 @@
bladerf_log_set_verbosity(BLADERF_LOG_LEVEL_DEBUG);
bladerf_set_usb_reset_on_open(true);

-   setenv("BLADERF_DEFAULT_TUNING_MODE","fpga",1); // ensure blade 
2 does not spend 10 seconds initializing host control
blade_check(bladerf_open, , "");
if (!dev) {
std::cerr << "open failed, device missing?" << 
std::endl;

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/35761?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I109f925f07a198d1fb33fe793e91e455fea05a96
Gerrit-Change-Number: 35761
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-MessageType: newchange


[S] Change in osmo-trx[master]: ms: conditionally override the tuning mode

2024-01-31 Thread Hoernchen
Hoernchen has abandoned this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/35757?usp=email )

Change subject: ms: conditionally override the tuning mode
..


Abandoned
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/35757?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I11f2ecc50b480d71736a7f224295e5e37745385e
Gerrit-Change-Number: 35757
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-CC: pespin 
Gerrit-MessageType: abandon


[S] Change in osmo-trx[master]: ms: conditionally override the tuning mode

2024-01-31 Thread Hoernchen
Attention is currently required from: fixeria, pespin.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/35757?usp=email )

Change subject: ms: conditionally override the tuning mode
..


Patch Set 1:

(1 comment)

File Transceiver52M/ms/bladerf_specific.h:

https://gerrit.osmocom.org/c/osmo-trx/+/35757/comment/7ec7dd40_2e6606cf
PS1, Line 258:  if (getenv("BLADERF_DEFAULT_TUNING_MODE") == NULL)
> This probably deserves some sort of comment here explaining why one may want 
> to set this.
If running modem without parameters somehow gets the blade into a stuck state. 
That is only occurence so far, to be fixed by my config file patch that 
properly overrides the arfc/settings on the transceiver, since the whole thing 
is supposed to only work with ham radio frequencies anyway and should mostly 
ignore what the upper layer wants.



--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/35757?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I11f2ecc50b480d71736a7f224295e5e37745385e
Gerrit-Change-Number: 35757
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: fixeria 
Gerrit-CC: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 31 Jan 2024 18:46:07 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: ms: conditionally override the tuning mode

2024-01-31 Thread Hoernchen
Hoernchen has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/35757?usp=email )


Change subject: ms: conditionally override the tuning mode
..

ms: conditionally override the tuning mode

We want FPGA tuning because it is much faster, but unfortunately
throwing trash at it leads to the blade getting stuck until it is power
cycled or reinitialized using host tuning. Only set FPGA tuning if no
other mode like BLADERF_DEFAULT_TUNING_MODE=host is requested, which
allows easier recovery in those cases.

Change-Id: I11f2ecc50b480d71736a7f224295e5e37745385e
---
M Transceiver52M/ms/bladerf_specific.h
1 file changed, 17 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/57/35757/1

diff --git a/Transceiver52M/ms/bladerf_specific.h 
b/Transceiver52M/ms/bladerf_specific.h
index e9245d4..798f3d7 100644
--- a/Transceiver52M/ms/bladerf_specific.h
+++ b/Transceiver52M/ms/bladerf_specific.h
@@ -255,7 +255,8 @@
bladerf_log_set_verbosity(BLADERF_LOG_LEVEL_DEBUG);
bladerf_set_usb_reset_on_open(true);

-   setenv("BLADERF_DEFAULT_TUNING_MODE","fpga",1); // ensure blade 
2 does not spend 10 seconds initializing host control
+   if (getenv("BLADERF_DEFAULT_TUNING_MODE") == NULL)
+   setenv("BLADERF_DEFAULT_TUNING_MODE","fpga",1); // 
ensure blade 2 does not spend 10 seconds initializing host control
blade_check(bladerf_open, , "");
if (!dev) {
std::cerr << "open failed, device missing?" << 
std::endl;

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/35757?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I11f2ecc50b480d71736a7f224295e5e37745385e
Gerrit-Change-Number: 35757
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-MessageType: newchange


[S] Change in libosmocore[master]: coding: fix wrong n_bits_total reported for PDTCH CS2 and CS3

2024-01-31 Thread Hoernchen
Attention is currently required from: fixeria.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/35755?usp=email )

Change subject: coding: fix wrong n_bits_total reported for PDTCH CS2 and CS3
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35755?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I6b20cc450f25c48175a61da02644d66c08e22ece
Gerrit-Change-Number: 35755
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 31 Jan 2024 17:28:27 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: Prevent poll() in select.c to timeout too early

2024-01-30 Thread Hoernchen
Attention is currently required from: fixeria, jolly, pespin.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/35672?usp=email )

Change subject: Prevent poll() in select.c to timeout too early
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35672?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I79de77c79af4d50d1eb9ca0c5417123ff760dca3
Gerrit-Change-Number: 35672
Gerrit-PatchSet: 2
Gerrit-Owner: jolly 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-CC: fixeria 
Gerrit-Attention: jolly 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Tue, 30 Jan 2024 11:56:08 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: Prevent poll() in select.c to timeout too early

2024-01-30 Thread Hoernchen
Attention is currently required from: fixeria, jolly, laforge, pespin.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/35672?usp=email )

Change subject: Prevent poll() in select.c to timeout too early
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
> It is still unresolved, whether we should round up always or only if the 
> remaining time is < 1 ms. […]
Rounding up is perfectly fine because scheduling granularity can be expected to 
be much higher anyway unless you apply sched_rr or other use other schedulers, 
but even in that case lower latencies imply a select loop that has nothing else 
to do, so the expected delay is "in general" not accurate anyway.



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35672?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I79de77c79af4d50d1eb9ca0c5417123ff760dca3
Gerrit-Change-Number: 35672
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-CC: fixeria 
Gerrit-Attention: jolly 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Tue, 30 Jan 2024 09:23:25 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Hoernchen 
Comment-In-Reply-To: jolly 
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: Prevent poll() in select.c to timeout too early

2024-01-25 Thread Hoernchen
Attention is currently required from: fixeria, jolly, laforge, pespin.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/35672?usp=email )

Change subject: Prevent poll() in select.c to timeout too early
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35672?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I79de77c79af4d50d1eb9ca0c5417123ff760dca3
Gerrit-Change-Number: 35672
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-CC: fixeria 
Gerrit-Attention: jolly 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 25 Jan 2024 18:59:15 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: Prevent poll() in select.c to timeout too early

2024-01-25 Thread Hoernchen
Attention is currently required from: fixeria, jolly, laforge, pespin.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/35672?usp=email )

Change subject: Prevent poll() in select.c to timeout too early
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
rounding up should be fine, but tbh, I can't quite see the actual real world 
issue here - it would require 1) < 1ms timout 2) absolutely nothing else to do 
while repeatedly calling the function which does "nothing" 3) no scheduling of 
any other task because scheduling granularity is way wy above 1ms anyway...



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35672?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I79de77c79af4d50d1eb9ca0c5417123ff760dca3
Gerrit-Change-Number: 35672
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-CC: fixeria 
Gerrit-Attention: jolly 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 25 Jan 2024 17:09:22 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: Transceiver::ctrl_sock_handle_rx(): fix copy-pasted comments

2024-01-23 Thread Hoernchen
Attention is currently required from: fixeria.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/35655?usp=email )

Change subject: Transceiver::ctrl_sock_handle_rx(): fix copy-pasted comments
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/35655?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: If31c0de0b3562c06220dcb9ad6f0c13d8621f6e3
Gerrit-Change-Number: 35655
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Tue, 23 Jan 2024 10:13:17 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmocore[master]: Revert "Revert "logging: add log level cache""

2024-01-11 Thread Hoernchen
Attention is currently required from: fixeria, laforge.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/35525?usp=email )

Change subject: Revert "Revert "logging: add log level cache""
..


Patch Set 1:

(1 comment)

Commit Message:

https://gerrit.osmocom.org/c/libosmocore/+/35525/comment/6f5c6ff1_033c8328
PS1, Line 11: some fallout expected
> Sure, we can fix the unit tests in master of the related packages. […]
But that promise is impossible to keep because that means 11 year old test code 
that checks the number of talloc chunks makes it impossible to change any 
related code because our memory layout is fixed forever and it would stop 
building any time the chunk number changes...

Test code can't be part of that promise and I am surprised to hear that this is 
apparently the case.



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35525?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I539872fc9e3c50b407e6bc388f1e091fa2c826c3
Gerrit-Change-Number: 35525
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 11 Jan 2024 18:27:54 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Hoernchen 
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


[S] Change in osmo-bts[master]: test: adjust for libosmocore loglevel cache

2024-01-11 Thread Hoernchen
Attention is currently required from: fixeria.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/35550?usp=email )

Change subject: test: adjust for libosmocore loglevel cache
..


Patch Set 1:

(1 comment)

File tests/handover/handover_test.c:

https://gerrit.osmocom.org/c/osmo-bts/+/35550/comment/31430458_4d1a7579
PS1, Line 73: osmo_stderr_target->categories[DHO].loglevel = LOGL_DEBUG;
> So, if accessing the logging internals is a bad idea (as you mentioned in the 
> related patch), then w […]
Because this unrelated and it is test code, test code is always weird/old and 
rarely does things normal code "should" do things.

In theory callers of the cache update func "should" hold a vty lock, but this 
does not matter in this case, because there can't really be any other threads...



--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/35550?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ie9c546210bc554843b1029afa20965bde1d7f228
Gerrit-Change-Number: 35550
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 11 Jan 2024 18:00:20 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


[M] Change in libosmocore[master]: Revert "Revert "logging: add log level cache""

2024-01-11 Thread Hoernchen
Attention is currently required from: fixeria, laforge.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/35525?usp=email )

Change subject: Revert "Revert "logging: add log level cache""
..


Patch Set 1:

(1 comment)

Commit Message:

https://gerrit.osmocom.org/c/libosmocore/+/35525/comment/b778a57c_7ec007f1
PS1, Line 11: some fallout expected
> If we revert the revert, we end up with the same problem: old code (mostly 
> tests, but who knows) usi […]
This only affects the two other packages, at least as far as "make check" is 
concerned... so we either fix anything else right now or we abandon the cache.



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35525?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I539872fc9e3c50b407e6bc388f1e091fa2c826c3
Gerrit-Change-Number: 35525
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 11 Jan 2024 17:57:44 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


[S] Change in osmo-bsc[master]: test: adjust for libosmocore loglevel cache

2024-01-11 Thread Hoernchen
Attention is currently required from: fixeria.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/35549?usp=email )

Change subject: test: adjust for libosmocore loglevel cache
..


Patch Set 1:

(1 comment)

File tests/nanobts_omlattr/nanobts_omlattr_test.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/35549/comment/9958137e_0c9ec9a9
PS1, Line 275: talloc_total_blocks(ctx) == 6
> Hmm, why do we even make assumptions on the logging hierarchy here. […]
I have no idea and I don't care because the cache is not about test code 
originally commited >10 years ago... This ist just about making this work. Log 
levels should not be manipulated by accessing the logging structs either



--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/35549?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: If52bcb522d41918db9e0755ead58abdcb8f0209b
Gerrit-Change-Number: 35549
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 11 Jan 2024 17:21:32 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


[M] Change in libosmocore[master]: Revert "Revert "logging: add log level cache""

2024-01-11 Thread Hoernchen
Attention is currently required from: fixeria, laforge.

Hoernchen has removed arehbein from this change.  ( 
https://gerrit.osmocom.org/c/libosmocore/+/35525?usp=email )

Change subject: Revert "Revert "logging: add log level cache""
..


Removed cc arehbein .
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35525?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I539872fc9e3c50b407e6bc388f1e091fa2c826c3
Gerrit-Change-Number: 35525
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-MessageType: deleteReviewer


[S] Change in osmo-bts[master]: test: adjust for libosmocore loglevel cache

2024-01-11 Thread Hoernchen
Hoernchen has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/35550?usp=email )


Change subject: test: adjust for libosmocore loglevel cache
..

test: adjust for libosmocore loglevel cache

Depends: libosmocore.git I539872fc9e3c50b407e6bc388f1e091fa2c826c3
Change-Id: Ie9c546210bc554843b1029afa20965bde1d7f228
---
M tests/handover/handover_test.c
M tests/power/bs_power_loop_test.c
M tests/power/ms_power_loop_test.c
M tests/tx_power/tx_power_test.c
4 files changed, 16 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/50/35550/1

diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index f1235f5..59a277f 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -71,7 +71,7 @@

osmo_init_logging2(tall_bts_ctx, _log_info);
osmo_stderr_target->categories[DHO].loglevel = LOGL_DEBUG;
-
+   log_cache_update(DHO, 1, LOGL_DEBUG);
g_bts_sm = gsm_bts_sm_alloc(tall_bts_ctx);
if (!g_bts_sm) {
fprintf(stderr, "Failed to create BTS Site Manager 
structure\n");
diff --git a/tests/power/bs_power_loop_test.c b/tests/power/bs_power_loop_test.c
index f9eb3b7..d536dc5 100644
--- a/tests/power/bs_power_loop_test.c
+++ b/tests/power/bs_power_loop_test.c
@@ -491,6 +491,8 @@
osmo_init_logging2(tall_bts_ctx, _log_info);
osmo_stderr_target->categories[DLOOP].loglevel = LOGL_DEBUG;
osmo_stderr_target->categories[DL1C].loglevel = LOGL_DEBUG;
+   log_cache_update(DLOOP, 1, LOGL_DEBUG);
+   log_cache_update(DL1C, 1, LOGL_DEBUG);
log_set_print_filename2(osmo_stderr_target, LOG_FILENAME_NONE);
log_set_use_color(osmo_stderr_target, 0);
log_set_print_category(osmo_stderr_target, 0);
diff --git a/tests/power/ms_power_loop_test.c b/tests/power/ms_power_loop_test.c
index d9916d5..777276b 100644
--- a/tests/power/ms_power_loop_test.c
+++ b/tests/power/ms_power_loop_test.c
@@ -415,6 +415,8 @@
osmo_init_logging2(tall_bts_ctx, _log_info);
osmo_stderr_target->categories[DLOOP].loglevel = LOGL_DEBUG;
osmo_stderr_target->categories[DL1C].loglevel = LOGL_DEBUG;
+   log_cache_update(DLOOP, 1, LOGL_DEBUG);
+   log_cache_update(DL1C, 1, LOGL_DEBUG);
log_set_print_filename2(osmo_stderr_target, LOG_FILENAME_NONE);
log_set_use_color(osmo_stderr_target, 0);
log_set_print_category(osmo_stderr_target, 0);
diff --git a/tests/tx_power/tx_power_test.c b/tests/tx_power/tx_power_test.c
index 937d7f8..34b9da7 100644
--- a/tests/tx_power/tx_power_test.c
+++ b/tests/tx_power/tx_power_test.c
@@ -248,6 +248,7 @@
 
osmo_init_logging2(tall_bts_ctx, _log_info);
osmo_stderr_target->categories[DL1C].loglevel = LOGL_DEBUG;
+   log_cache_update(DL1C, 1, LOGL_DEBUG);
log_set_print_filename2(osmo_stderr_target, LOG_FILENAME_NONE);
log_set_use_color(osmo_stderr_target, 0);
log_set_print_category(osmo_stderr_target, 0);

--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/35550?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ie9c546210bc554843b1029afa20965bde1d7f228
Gerrit-Change-Number: 35550
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-MessageType: newchange


[S] Change in osmo-bsc[master]: test: adjust for libosmocore loglevel cache

2024-01-11 Thread Hoernchen
Hoernchen has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/35549?usp=email )


Change subject: test: adjust for libosmocore loglevel cache
..

test: adjust for libosmocore loglevel cache

Depends: libosmocore.git I539872fc9e3c50b407e6bc388f1e091fa2c826c3
Change-Id: If52bcb522d41918db9e0755ead58abdcb8f0209b
---
M tests/nanobts_omlattr/nanobts_omlattr_test.c
1 file changed, 11 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/49/35549/1

diff --git a/tests/nanobts_omlattr/nanobts_omlattr_test.c 
b/tests/nanobts_omlattr/nanobts_omlattr_test.c
index 9ef90ae..1383ac8 100644
--- a/tests/nanobts_omlattr/nanobts_omlattr_test.c
+++ b/tests/nanobts_omlattr/nanobts_omlattr_test.c
@@ -272,7 +272,7 @@
 *  struct log_infocontains616 bytes in   2 
blocks (ref 0) 0x60d00310
 *  struct log_info_catcontains576 bytes in   1 
blocks (ref 0) 0x617000e0
 * That's the root ctx + 5x logging: */
-   OSMO_ASSERT(talloc_total_blocks(ctx) == 6);
+   OSMO_ASSERT(talloc_total_blocks(ctx) == 7);
talloc_free(ctx);
return 0;
 }

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/35549?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: If52bcb522d41918db9e0755ead58abdcb8f0209b
Gerrit-Change-Number: 35549
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-MessageType: newchange


[M] Change in libosmocore[master]: Revert "Revert "logging: add log level cache""

2024-01-11 Thread Hoernchen
ULL, ":")));

+#if !defined(EMBEDDED)
+   log_cache_update_all();
+#endif
+
free(mask);
 }

@@ -680,6 +746,11 @@

subsys = map_subsys(subsys);

+#if !defined(EMBEDDED)
+   if (!log_cache_check(subsys, level))
+   return;
+#endif
+
log_tgt_mutex_lock();

llist_for_each_entry(tar, _log_target_list, entry) {
@@ -754,6 +825,9 @@
 void log_add_target(struct log_target *target)
 {
llist_add_tail(>entry, _log_target_list);
+#if (!EMBEDDED)
+   log_cache_update_all();
+#endif
 }

 /*! Unregister a log target from the logging core
@@ -762,6 +836,9 @@
 void log_del_target(struct log_target *target)
 {
llist_del(>entry);
+#if (!EMBEDDED)
+   log_cache_update_all();
+#endif
 }

 /*! Reset (clear) the logging context */
@@ -922,6 +999,9 @@
 void log_set_log_level(struct log_target *target, int log_level)
 {
target->loglevel = log_level;
+#if !defined(EMBEDDED)
+   log_cache_update_all();
+#endif
 }

 /*! Set a category filter on a given log target
@@ -938,6 +1018,10 @@
category = map_subsys(category);
target->categories[category].enabled = !!enable;
target->categories[category].loglevel = level;
+
+#if !defined(EMBEDDED)
+   log_cache_update(category, !!enable, level);
+#endif
 }

 #if (!EMBEDDED)
@@ -1046,6 +1130,15 @@

/* global log level */
target->loglevel = 0;
+
+#if !defined(EMBEDDED)
+   /* update cache */
+   for (i = 0; i < osmo_log_info->num_cat; i++) {
+   const struct log_info_cat *c = _log_info->cat[i];
+   log_cache_update(i, c->enabled, c->loglevel);
+   }
+#endif
+
return target;
 }

@@ -1424,6 +1517,15 @@
osmo_log_info->num_cat += inf->num_cat;
}

+#if !defined(EMBEDDED)
+   log_level_lookup_cache = talloc_zero_array(osmo_log_info, uint8_t, 
osmo_log_info->num_cat);
+   if (!log_level_lookup_cache) {
+   talloc_free(osmo_log_info);
+   osmo_log_info = NULL;
+   return -ENOMEM;
+   }
+#endif
+
cat_ptr = talloc_zero_array(osmo_log_info, struct log_info_cat,
osmo_log_info->num_cat);
if (!cat_ptr) {
@@ -1454,6 +1556,12 @@

osmo_log_info->cat = cat_ptr;

+#if !defined(EMBEDDED)
+   /* copy everything for level lookup cache */
+   for (i = 0; i < osmo_log_info->num_cat; i++)
+   log_level_lookup_cache[i] = cat_ptr[i].loglevel;
+#endif
+
return 0;
 }

@@ -1486,6 +1594,11 @@

subsys = map_subsys(subsys);

+#if !defined(EMBEDDED)
+   if (!log_cache_check(subsys, level))
+   return 0;
+#endif
+
/* TODO: The following could/should be cached (update on config) */

log_tgt_mutex_lock();
diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c
index 2a07422..678ae68 100644
--- a/src/vty/logging_vty.c
+++ b/src/vty/logging_vty.c
@@ -382,6 +382,10 @@
tgt->categories[category].enabled = 1;
tgt->categories[category].loglevel = level;

+#if !defined(EMBEDDED)
+   log_cache_update(category, 1, level);
+#endif
+
RET_WITH_UNLOCK(CMD_SUCCESS);
 }

@@ -406,6 +410,9 @@

cat->enabled = 1;
cat->loglevel = level;
+#if !defined(EMBEDDED)
+   log_cache_update(i, 1, level);
+#endif
}
RET_WITH_UNLOCK(CMD_SUCCESS);
 }
diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c
index 1d4d4d7..7b7e6ce 100644
--- a/tests/ctrl/ctrl_test.c
+++ b/tests/ctrl/ctrl_test.c
@@ -482,7 +482,7 @@
test_deferred_cmd();

/* Expecting root ctx + msgb root ctx + 5 logging elements */
-   if (talloc_total_blocks(ctx) != 7) {
+   if (talloc_total_blocks(ctx) != 8) {
talloc_report_full(ctx, stdout);
OSMO_ASSERT(false);
}

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35525?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I539872fc9e3c50b407e6bc388f1e091fa2c826c3
Gerrit-Change-Number: 35525
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: arehbein 
Gerrit-CC: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-MessageType: newchange


[M] Change in libosmocore[master]: Revert "logging: add log level cache"

2024-01-11 Thread Hoernchen
Hoernchen has created a revert of this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/35524?usp=email )

Change subject: Revert "logging: add log level cache"
..
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35524?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ife4c49d1bb933e983ac68c57970c9c49b40e08be
Gerrit-Change-Number: 35524
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: arehbein 
Gerrit-CC: pespin 
Gerrit-MessageType: revert


[M] Change in libosmocore[master]: Revert "logging: add log level cache"

2024-01-09 Thread Hoernchen
Hoernchen has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/35524?usp=email )

Change subject: Revert "logging: add log level cache"
..

Revert "logging: add log level cache"

This reverts commit 7dc6d4a629a37bb081d62f6ce61f4e5ee0237247.

Reason for revert: other tests are failing

Change-Id: Ife4c49d1bb933e983ac68c57970c9c49b40e08be
---
M include/osmocom/core/logging.h
M src/core/libosmocore.map
M src/core/logging.c
M src/vty/logging_vty.c
M tests/ctrl/ctrl_test.c
5 files changed, 15 insertions(+), 123 deletions(-)

Approvals:
  Hoernchen: Verified
  Jenkins Builder: Verified
  laforge: Looks good to me, approved




diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h
index e4859cd..e8433a1 100644
--- a/include/osmocom/core/logging.h
+++ b/include/osmocom/core/logging.h
@@ -409,7 +409,7 @@

 /* filter on the targets */
 void log_set_all_filter(struct log_target *target, int);
-void log_cache_update(int mapped_subsys, uint8_t enabled, uint8_t level);
+
 void log_set_use_color(struct log_target *target, int);
 void log_set_print_extended_timestamp(struct log_target *target, int);
 void log_set_print_timestamp(struct log_target *target, int);
diff --git a/src/core/libosmocore.map b/src/core/libosmocore.map
index 06a3864..b66e37d 100644
--- a/src/core/libosmocore.map
+++ b/src/core/libosmocore.map
@@ -58,7 +58,6 @@
 log_add_target;
 log_category_name;
 log_check_level;
-log_cache_update;
 log_del_target;
 log_enable_multithread;
 log_fini;
diff --git a/src/core/logging.c b/src/core/logging.c
index 906d664..6941f9b 100644
--- a/src/core/logging.c
+++ b/src/core/logging.c
@@ -93,68 +93,6 @@
 static __thread long int logging_tid;

 #if (!EMBEDDED)
-/*! One global copy that contains the union of log levels for all targets
-*  for all categories, used for quick lock free checks of log targets. */
-static volatile uint8_t *log_level_lookup_cache;
-
-/*! Updates cache for all targets for all categies, caller must hold 
osmo_log_tgt_mutex. */
-static void log_cache_update_all(void)
-{
-   struct log_target *tgt;
-   uint8_t tmp_en[osmo_log_info->num_cat];
-   uint8_t tmp_level[osmo_log_info->num_cat];
-   memset(tmp_en, 0, osmo_log_info->num_cat);
-   memset(tmp_level, UINT8_MAX, osmo_log_info->num_cat);
-
-   /* values can also decrease.. */
-   llist_for_each_entry(tgt, _log_target_list, entry) {
-   for (int i = 0; i < osmo_log_info->num_cat; i++) {
-   struct log_category *cat = >categories[i];
-   tmp_en[i] = OSMO_MAX(tmp_en[i], cat->enabled);
-   tmp_level[i] = OSMO_MIN(tmp_level[i], cat->loglevel);
-   tmp_level[i] = tgt->loglevel ? OSMO_MIN(tmp_level[i], 
tgt->loglevel) : tmp_level[i];
-   }
-   }
-
-   for (int i = 0; i < osmo_log_info->num_cat; i++)
-   log_level_lookup_cache[i] = tmp_en[i] ? tmp_level[i] : 
UINT8_MAX;
-}
-
-/*! Updates single cache entry, caller must hold osmo_log_tgt_mutex.
- *
- *  \param[in] mapped_subsys plain category index (after mapping)
- *  \param[in] enabled log category enabled?
- *  \param[in] level log level
- */
-void log_cache_update(int mapped_subsys, uint8_t enabled, uint8_t level)
-{
-   struct log_target *tgt;
-   struct log_category tmp = { UINT8_MAX, 0 };
-
-   /* values can also decrease.. */
-   llist_for_each_entry(tgt, _log_target_list, entry) {
-   struct log_category *cat = >categories[mapped_subsys];
-   tmp.enabled = OSMO_MAX(tmp.enabled, cat->enabled);
-   tmp.loglevel = OSMO_MIN(tmp.loglevel, cat->loglevel);
-   tmp.loglevel = tgt->loglevel ? OSMO_MIN(tmp.loglevel, 
tgt->loglevel) : tmp.loglevel;
-   }
-   tmp.enabled = OSMO_MAX(tmp.enabled, enabled);
-   tmp.loglevel = OSMO_MIN(tmp.loglevel, level);
-
-   log_level_lookup_cache[mapped_subsys] = tmp.enabled ? tmp.loglevel : 
UINT8_MAX;
-}
-
-/*! Queries log level cache.
- *
- *  \param[in] mapped_subsys plain category index (after mapping)
- *  \param[in] level log level
- *  \returns true if logging should happen for at least one log target
-*/
-static bool log_cache_check(int mapped_subsys, int level)
-{
-   return (level < log_level_lookup_cache[mapped_subsys]) ? false : true;
-}
-
 /*! This mutex must be held while using osmo_log_target_list or any of its
   log_targets in a multithread program. Prevents race conditions between 
threads
   like producing unordered timestamps or VTY deleting a target while another
@@ -488,10 +426,6 @@
}
} while ((category_token = strtok(NULL, ":")));

-#if !defined(EMBEDDED)
-   log_cache_update_all();
-#endif
-
free(mask);
 }

@@ -746,11 +680,6 @@

subsys = map_subsys(subsys);

-#if !defined

[M] Change in libosmocore[master]: Revert "logging: add log level cache"

2024-01-09 Thread Hoernchen
Attention is currently required from: fixeria.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/35524?usp=email )

Change subject: Revert "logging: add log level cache"
..


Patch Set 1: Verified+1


--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35524?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ife4c49d1bb933e983ac68c57970c9c49b40e08be
Gerrit-Change-Number: 35524
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: arehbein 
Gerrit-CC: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Tue, 09 Jan 2024 16:39:11 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmocore[master]: Revert "logging: add log level cache"

2024-01-09 Thread Hoernchen
he_update_all();
-#endif
-
free(mask);
 }

@@ -746,11 +680,6 @@

subsys = map_subsys(subsys);

-#if !defined(EMBEDDED)
-   if (!log_cache_check(subsys, level))
-   return;
-#endif
-
log_tgt_mutex_lock();

llist_for_each_entry(tar, _log_target_list, entry) {
@@ -825,9 +754,6 @@
 void log_add_target(struct log_target *target)
 {
llist_add_tail(>entry, _log_target_list);
-#if (!EMBEDDED)
-   log_cache_update_all();
-#endif
 }

 /*! Unregister a log target from the logging core
@@ -836,9 +762,6 @@
 void log_del_target(struct log_target *target)
 {
llist_del(>entry);
-#if (!EMBEDDED)
-   log_cache_update_all();
-#endif
 }

 /*! Reset (clear) the logging context */
@@ -999,9 +922,6 @@
 void log_set_log_level(struct log_target *target, int log_level)
 {
target->loglevel = log_level;
-#if !defined(EMBEDDED)
-   log_cache_update_all();
-#endif
 }

 /*! Set a category filter on a given log target
@@ -1018,10 +938,6 @@
category = map_subsys(category);
target->categories[category].enabled = !!enable;
target->categories[category].loglevel = level;
-
-#if !defined(EMBEDDED)
-   log_cache_update(category, !!enable, level);
-#endif
 }

 #if (!EMBEDDED)
@@ -1130,15 +1046,6 @@

/* global log level */
target->loglevel = 0;
-
-#if !defined(EMBEDDED)
-   /* update cache */
-   for (i = 0; i < osmo_log_info->num_cat; i++) {
-   const struct log_info_cat *c = _log_info->cat[i];
-   log_cache_update(i, c->enabled, c->loglevel);
-   }
-#endif
-
return target;
 }

@@ -1517,15 +1424,6 @@
osmo_log_info->num_cat += inf->num_cat;
}

-#if !defined(EMBEDDED)
-   log_level_lookup_cache = talloc_zero_array(osmo_log_info, uint8_t, 
osmo_log_info->num_cat);
-   if (!log_level_lookup_cache) {
-   talloc_free(osmo_log_info);
-   osmo_log_info = NULL;
-   return -ENOMEM;
-   }
-#endif
-
cat_ptr = talloc_zero_array(osmo_log_info, struct log_info_cat,
osmo_log_info->num_cat);
if (!cat_ptr) {
@@ -1556,12 +1454,6 @@

osmo_log_info->cat = cat_ptr;

-#if !defined(EMBEDDED)
-   /* copy everything for level lookup cache */
-   for (i = 0; i < osmo_log_info->num_cat; i++)
-   log_level_lookup_cache[i] = cat_ptr[i].loglevel;
-#endif
-
return 0;
 }

@@ -1594,11 +1486,6 @@

subsys = map_subsys(subsys);

-#if !defined(EMBEDDED)
-   if (!log_cache_check(subsys, level))
-   return 0;
-#endif
-
/* TODO: The following could/should be cached (update on config) */

log_tgt_mutex_lock();
diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c
index 678ae68..2a07422 100644
--- a/src/vty/logging_vty.c
+++ b/src/vty/logging_vty.c
@@ -382,10 +382,6 @@
tgt->categories[category].enabled = 1;
tgt->categories[category].loglevel = level;

-#if !defined(EMBEDDED)
-   log_cache_update(category, 1, level);
-#endif
-
RET_WITH_UNLOCK(CMD_SUCCESS);
 }

@@ -410,9 +406,6 @@

cat->enabled = 1;
cat->loglevel = level;
-#if !defined(EMBEDDED)
-   log_cache_update(i, 1, level);
-#endif
}
RET_WITH_UNLOCK(CMD_SUCCESS);
 }
diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c
index 7b7e6ce..1d4d4d7 100644
--- a/tests/ctrl/ctrl_test.c
+++ b/tests/ctrl/ctrl_test.c
@@ -482,7 +482,7 @@
test_deferred_cmd();

/* Expecting root ctx + msgb root ctx + 5 logging elements */
-   if (talloc_total_blocks(ctx) != 8) {
+   if (talloc_total_blocks(ctx) != 7) {
talloc_report_full(ctx, stdout);
OSMO_ASSERT(false);
}

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35524?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ife4c49d1bb933e983ac68c57970c9c49b40e08be
Gerrit-Change-Number: 35524
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: arehbein 
Gerrit-CC: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-MessageType: newchange


[M] Change in libosmocore[master]: logging: add log level cache

2024-01-09 Thread Hoernchen
Hoernchen has created a revert of this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email )

Change subject: logging: add log level cache
..
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I35f8dd9127dd6e7feae392094fd6b3ce2d32558d
Gerrit-Change-Number: 30633
Gerrit-PatchSet: 15
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: arehbein 
Gerrit-CC: pespin 
Gerrit-MessageType: revert


[M] Change in libosmocore[master]: logging: add log level cache

2024-01-09 Thread Hoernchen
Hoernchen has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email )

Change subject: logging: add log level cache
..

logging: add log level cache

This ensures multithreaded logging attempts, in particular ones that do
nothing, do not hold the lock just for checking the level, which
interferes with other logging attempts.

Closes: OS#5818

Change-Id: I35f8dd9127dd6e7feae392094fd6b3ce2d32558d
---
M include/osmocom/core/logging.h
M src/core/libosmocore.map
M src/core/logging.c
M src/vty/logging_vty.c
M tests/ctrl/ctrl_test.c
5 files changed, 138 insertions(+), 2 deletions(-)

Approvals:
  fixeria: Looks good to me, but someone else must approve
  Jenkins Builder: Verified
  laforge: Looks good to me, but someone else must approve
  Hoernchen: Looks good to me, approved




diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h
index e8433a1..e4859cd 100644
--- a/include/osmocom/core/logging.h
+++ b/include/osmocom/core/logging.h
@@ -409,7 +409,7 @@

 /* filter on the targets */
 void log_set_all_filter(struct log_target *target, int);
-
+void log_cache_update(int mapped_subsys, uint8_t enabled, uint8_t level);
 void log_set_use_color(struct log_target *target, int);
 void log_set_print_extended_timestamp(struct log_target *target, int);
 void log_set_print_timestamp(struct log_target *target, int);
diff --git a/src/core/libosmocore.map b/src/core/libosmocore.map
index b66e37d..06a3864 100644
--- a/src/core/libosmocore.map
+++ b/src/core/libosmocore.map
@@ -58,6 +58,7 @@
 log_add_target;
 log_category_name;
 log_check_level;
+log_cache_update;
 log_del_target;
 log_enable_multithread;
 log_fini;
diff --git a/src/core/logging.c b/src/core/logging.c
index 6941f9b..906d664 100644
--- a/src/core/logging.c
+++ b/src/core/logging.c
@@ -93,6 +93,68 @@
 static __thread long int logging_tid;

 #if (!EMBEDDED)
+/*! One global copy that contains the union of log levels for all targets
+*  for all categories, used for quick lock free checks of log targets. */
+static volatile uint8_t *log_level_lookup_cache;
+
+/*! Updates cache for all targets for all categies, caller must hold 
osmo_log_tgt_mutex. */
+static void log_cache_update_all(void)
+{
+   struct log_target *tgt;
+   uint8_t tmp_en[osmo_log_info->num_cat];
+   uint8_t tmp_level[osmo_log_info->num_cat];
+   memset(tmp_en, 0, osmo_log_info->num_cat);
+   memset(tmp_level, UINT8_MAX, osmo_log_info->num_cat);
+
+   /* values can also decrease.. */
+   llist_for_each_entry(tgt, _log_target_list, entry) {
+   for (int i = 0; i < osmo_log_info->num_cat; i++) {
+   struct log_category *cat = >categories[i];
+   tmp_en[i] = OSMO_MAX(tmp_en[i], cat->enabled);
+   tmp_level[i] = OSMO_MIN(tmp_level[i], cat->loglevel);
+   tmp_level[i] = tgt->loglevel ? OSMO_MIN(tmp_level[i], 
tgt->loglevel) : tmp_level[i];
+   }
+   }
+
+   for (int i = 0; i < osmo_log_info->num_cat; i++)
+   log_level_lookup_cache[i] = tmp_en[i] ? tmp_level[i] : 
UINT8_MAX;
+}
+
+/*! Updates single cache entry, caller must hold osmo_log_tgt_mutex.
+ *
+ *  \param[in] mapped_subsys plain category index (after mapping)
+ *  \param[in] enabled log category enabled?
+ *  \param[in] level log level
+ */
+void log_cache_update(int mapped_subsys, uint8_t enabled, uint8_t level)
+{
+   struct log_target *tgt;
+   struct log_category tmp = { UINT8_MAX, 0 };
+
+   /* values can also decrease.. */
+   llist_for_each_entry(tgt, _log_target_list, entry) {
+   struct log_category *cat = >categories[mapped_subsys];
+   tmp.enabled = OSMO_MAX(tmp.enabled, cat->enabled);
+   tmp.loglevel = OSMO_MIN(tmp.loglevel, cat->loglevel);
+   tmp.loglevel = tgt->loglevel ? OSMO_MIN(tmp.loglevel, 
tgt->loglevel) : tmp.loglevel;
+   }
+   tmp.enabled = OSMO_MAX(tmp.enabled, enabled);
+   tmp.loglevel = OSMO_MIN(tmp.loglevel, level);
+
+   log_level_lookup_cache[mapped_subsys] = tmp.enabled ? tmp.loglevel : 
UINT8_MAX;
+}
+
+/*! Queries log level cache.
+ *
+ *  \param[in] mapped_subsys plain category index (after mapping)
+ *  \param[in] level log level
+ *  \returns true if logging should happen for at least one log target
+*/
+static bool log_cache_check(int mapped_subsys, int level)
+{
+   return (level < log_level_lookup_cache[mapped_subsys]) ? false : true;
+}
+
 /*! This mutex must be held while using osmo_log_target_list or any of its
   log_targets in a multithread program. Prevents race conditions between 
threads
   like producing unordered timestamps or VTY deleting a target while another
@@ -426,6 +488,10 @@
}
} while ((category_token = strtok(NULL, ":")));

+#if !defined(EM

[M] Change in libosmocore[master]: logging: add log level cache

2024-01-09 Thread Hoernchen
Attention is currently required from: arehbein.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email )

Change subject: logging: add log level cache
..


Patch Set 15: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I35f8dd9127dd6e7feae392094fd6b3ce2d32558d
Gerrit-Change-Number: 30633
Gerrit-PatchSet: 15
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: arehbein 
Gerrit-CC: pespin 
Gerrit-Attention: arehbein 
Gerrit-Comment-Date: Tue, 09 Jan 2024 16:07:37 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmocore[master]: logging: add log level cache

2024-01-09 Thread Hoernchen
Attention is currently required from: arehbein, fixeria, laforge.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email )

Change subject: logging: add log level cache
..


Patch Set 15:

(3 comments)

Patchset:

PS9:
> how often do you still want me to ping you, @ewild@sysmocom. […]
Done


File src/core/logging.c:

https://gerrit.osmocom.org/c/libosmocore/+/30633/comment/1797363d_329bd809
PS12, Line 153: logging
> I would suggest […]
Done


https://gerrit.osmocom.org/c/libosmocore/+/30633/comment/297a0f7e_72ee505b
PS12, Line 1557:talloc_free(osmo_log_info);
> do `osmo_log_info = NULL` like below?
Done



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I35f8dd9127dd6e7feae392094fd6b3ce2d32558d
Gerrit-Change-Number: 30633
Gerrit-PatchSet: 15
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: arehbein 
Gerrit-CC: fixeria 
Gerrit-CC: pespin 
Gerrit-Attention: arehbein 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Tue, 09 Jan 2024 15:29:07 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Hoernchen 
Comment-In-Reply-To: arehbein 
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: libosmosim: Support Microsoft smart card discovery process

2023-11-28 Thread Hoernchen
Attention is currently required from: dexter, laforge.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/35154?usp=email )

Change subject: libosmosim: Support Microsoft smart card discovery process
..


Patch Set 4: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35154?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I424964c0afab643e6a5d7824d91c2c86b0d3f25b
Gerrit-Change-Number: 35154
Gerrit-PatchSet: 4
Gerrit-Owner: laforge 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: fixeria 
Gerrit-Attention: laforge 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Tue, 28 Nov 2023 22:09:56 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: libosmosim: Support Microsoft smart card discovery process

2023-11-28 Thread Hoernchen
Attention is currently required from: dexter, laforge.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/35154?usp=email )

Change subject: libosmosim: Support Microsoft smart card discovery process
..


Patch Set 4:

(1 comment)

Patchset:

PS4:
It would probably be useful to add the msdn links to the commit message that 
explain what MS does?



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35154?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I424964c0afab643e6a5d7824d91c2c86b0d3f25b
Gerrit-Change-Number: 35154
Gerrit-PatchSet: 4
Gerrit-Owner: laforge 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: fixeria 
Gerrit-Attention: laforge 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Tue, 28 Nov 2023 22:07:23 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in osmocom-bb[master]: firmware: -nostartfiles -nodefaultlibs are not flags of LD but flags ...

2023-11-22 Thread Hoernchen
Attention is currently required from: laforge.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/35089?usp=email )

Change subject: firmware: -nostartfiles -nodefaultlibs are not flags of LD but 
flags of GCC
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35089?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Id199e4d03d5aae07a347c98f47791f42c12008c6
Gerrit-Change-Number: 35089
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 22 Nov 2023 15:54:27 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[ewild/1.6.1]: Bump version: 1.6.0 → 1.6.1

2023-11-09 Thread Hoernchen
Hoernchen has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/34989?usp=email )

Change subject: Bump version: 1.6.0 → 1.6.1
..

Bump version: 1.6.0 → 1.6.1

Change-Id: I345ba6569ae0765b3d33e4024d07fc5d925bdf80
---
M debian/changelog
1 file changed, 16 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, but someone else must approve
  osmith: Looks good to me, approved




diff --git a/debian/changelog b/debian/changelog
index 90f554e..ac6e089 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+osmo-trx (1.6.1) unstable; urgency=medium
+
+  [ Eric Wild ]
+  * devices: fix wrong gain to power mapping
+
+ -- Eric Wild   Thu, 09 Nov 2023 14:16:21 +0200
+
 osmo-trx (1.6.0) unstable; urgency=medium

   [ Vadim Yanitskiy ]

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34989?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: ewild/1.6.1
Gerrit-Change-Id: I345ba6569ae0765b3d33e4024d07fc5d925bdf80
Gerrit-Change-Number: 34989
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-MessageType: merged


[S] Change in osmo-trx[ewild/1.6.1]: devices: fix wrong gain to power mapping

2023-11-09 Thread Hoernchen
Hoernchen has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/34988?usp=email )

Change subject: devices: fix wrong gain to power mapping
..

devices: fix wrong gain to power mapping

The dev type was set too early, but the actual dev is only being
discovered during open, so update it. This broke the gain to power
mapping by defaulting to a wrong device.

Change-Id: I1dda6023ca6f15bc063c3dfbc704db2410ff7c98
---
M Transceiver52M/device/bladerf/bladerf.cpp
M Transceiver52M/device/common/bandmanager.h
M Transceiver52M/device/lms/LMSDevice.cpp
M Transceiver52M/device/uhd/UHDDevice.cpp
4 files changed, 22 insertions(+), 1 deletion(-)

Approvals:
  osmith: Looks good to me, approved
  Jenkins Builder: Verified
  fixeria: Looks good to me, but someone else must approve




diff --git a/Transceiver52M/device/bladerf/bladerf.cpp 
b/Transceiver52M/device/bladerf/bladerf.cpp
index 3e830b1..2f3c86a 100644
--- a/Transceiver52M/device/bladerf/bladerf.cpp
+++ b/Transceiver52M/device/bladerf/bladerf.cpp
@@ -279,6 +279,7 @@

dev_type = blade_dev_type::BLADE2;
tx_window = TX_WINDOW_FIXED;
+   update_band_dev(dev_key(dev_type, tx_sps, rx_sps));

struct bladerf_devinfo info;
bladerf_get_devinfo(dev, );
diff --git a/Transceiver52M/device/common/bandmanager.h 
b/Transceiver52M/device/common/bandmanager.h
index a198937..d07f21d 100644
--- a/Transceiver52M/device/common/bandmanager.h
+++ b/Transceiver52M/device/common/bandmanager.h
@@ -34,7 +34,7 @@
using powerkeyt = typename powermapt::key_type;
using powermappedt = typename powermapt::mapped_type;
using devkeyt = typename devmapt::key_type;
-   const devkeyt _dev_type;
+   devkeyt m_dev_type;
const powermapt _power_map;
const devmapt _dev_map;
powerkeyt m_fallback;
@@ -102,6 +102,10 @@
band_ass_curr_sess = false;
}

+   void update_band_dev(devkeyt dev_type) {
+   m_dev_type = dev_type;
+   }
+
void get_dev_band_desc(powermappedt )
{
if (m_band == 0) {
diff --git a/Transceiver52M/device/lms/LMSDevice.cpp 
b/Transceiver52M/device/lms/LMSDevice.cpp
index 451d2b9..7c220d2 100644
--- a/Transceiver52M/device/lms/LMSDevice.cpp
+++ b/Transceiver52M/device/lms/LMSDevice.cpp
@@ -245,6 +245,7 @@

m_dev_type = parse_dev_type(m_lms_dev);
dev_desc = dev_param_map.at(m_dev_type);
+   update_band_dev(m_dev_type);

if ((cfg->clock_ref != REF_EXTERNAL) && (cfg->clock_ref != 
REF_INTERNAL)) {
LOGC(DDEV, ERROR) << "Invalid reference type";
diff --git a/Transceiver52M/device/uhd/UHDDevice.cpp 
b/Transceiver52M/device/uhd/UHDDevice.cpp
index ec772aa..85e9e38 100644
--- a/Transceiver52M/device/uhd/UHDDevice.cpp
+++ b/Transceiver52M/device/uhd/UHDDevice.cpp
@@ -530,6 +530,8 @@
if (!parse_dev_type())
return -1;

+   update_band_dev(dev_key(dev_type, tx_sps, rx_sps));
+
if ((dev_type == E3XX) && !uhd_e3xx_version_chk()) {
LOGC(DDEV, ALERT) << "E3XX requires UHD 003.009.000 or greater";
return -1;

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34988?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: ewild/1.6.1
Gerrit-Change-Id: I1dda6023ca6f15bc063c3dfbc704db2410ff7c98
Gerrit-Change-Number: 34988
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-MessageType: merged


[S] Change in osmo-trx[ewild/1.6.1]: devices: fix wrong gain to power mapping

2023-11-09 Thread Hoernchen
Hoernchen has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/34988?usp=email )


Change subject: devices: fix wrong gain to power mapping
..

devices: fix wrong gain to power mapping

The dev type was set too early, but the actual dev is only being
discovered during open, so update it. This broke the gain to power
mapping by defaulting to a wrong device.

Change-Id: I1dda6023ca6f15bc063c3dfbc704db2410ff7c98
---
M Transceiver52M/device/bladerf/bladerf.cpp
M Transceiver52M/device/common/bandmanager.h
M Transceiver52M/device/lms/LMSDevice.cpp
M Transceiver52M/device/uhd/UHDDevice.cpp
4 files changed, 22 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/88/34988/1

diff --git a/Transceiver52M/device/bladerf/bladerf.cpp 
b/Transceiver52M/device/bladerf/bladerf.cpp
index 3e830b1..2f3c86a 100644
--- a/Transceiver52M/device/bladerf/bladerf.cpp
+++ b/Transceiver52M/device/bladerf/bladerf.cpp
@@ -279,6 +279,7 @@

dev_type = blade_dev_type::BLADE2;
tx_window = TX_WINDOW_FIXED;
+   update_band_dev(dev_key(dev_type, tx_sps, rx_sps));

struct bladerf_devinfo info;
bladerf_get_devinfo(dev, );
diff --git a/Transceiver52M/device/common/bandmanager.h 
b/Transceiver52M/device/common/bandmanager.h
index a198937..d07f21d 100644
--- a/Transceiver52M/device/common/bandmanager.h
+++ b/Transceiver52M/device/common/bandmanager.h
@@ -34,7 +34,7 @@
using powerkeyt = typename powermapt::key_type;
using powermappedt = typename powermapt::mapped_type;
using devkeyt = typename devmapt::key_type;
-   const devkeyt _dev_type;
+   devkeyt m_dev_type;
const powermapt _power_map;
const devmapt _dev_map;
powerkeyt m_fallback;
@@ -102,6 +102,10 @@
band_ass_curr_sess = false;
}

+   void update_band_dev(devkeyt dev_type) {
+   m_dev_type = dev_type;
+   }
+
void get_dev_band_desc(powermappedt )
{
if (m_band == 0) {
diff --git a/Transceiver52M/device/lms/LMSDevice.cpp 
b/Transceiver52M/device/lms/LMSDevice.cpp
index 451d2b9..7c220d2 100644
--- a/Transceiver52M/device/lms/LMSDevice.cpp
+++ b/Transceiver52M/device/lms/LMSDevice.cpp
@@ -245,6 +245,7 @@

m_dev_type = parse_dev_type(m_lms_dev);
dev_desc = dev_param_map.at(m_dev_type);
+   update_band_dev(m_dev_type);

if ((cfg->clock_ref != REF_EXTERNAL) && (cfg->clock_ref != 
REF_INTERNAL)) {
LOGC(DDEV, ERROR) << "Invalid reference type";
diff --git a/Transceiver52M/device/uhd/UHDDevice.cpp 
b/Transceiver52M/device/uhd/UHDDevice.cpp
index ec772aa..85e9e38 100644
--- a/Transceiver52M/device/uhd/UHDDevice.cpp
+++ b/Transceiver52M/device/uhd/UHDDevice.cpp
@@ -530,6 +530,8 @@
if (!parse_dev_type())
return -1;

+   update_band_dev(dev_key(dev_type, tx_sps, rx_sps));
+
if ((dev_type == E3XX) && !uhd_e3xx_version_chk()) {
LOGC(DDEV, ALERT) << "E3XX requires UHD 003.009.000 or greater";
return -1;

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34988?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: ewild/1.6.1
Gerrit-Change-Id: I1dda6023ca6f15bc063c3dfbc704db2410ff7c98
Gerrit-Change-Number: 34988
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-MessageType: newchange


[S] Change in osmo-trx[ewild/1.6.1]: Bump version: 1.6.0 → 1.6.1

2023-11-09 Thread Hoernchen
Hoernchen has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/34989?usp=email )


Change subject: Bump version: 1.6.0 → 1.6.1
..

Bump version: 1.6.0 → 1.6.1

Change-Id: I345ba6569ae0765b3d33e4024d07fc5d925bdf80
---
M debian/changelog
1 file changed, 16 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/89/34989/1

diff --git a/debian/changelog b/debian/changelog
index 90f554e..ac6e089 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+osmo-trx (1.6.1) unstable; urgency=medium
+
+  [ Eric Wild ]
+  * devices: fix wrong gain to power mapping
+
+ -- Eric Wild   Thu, 09 Nov 2023 14:16:21 +0200
+
 osmo-trx (1.6.0) unstable; urgency=medium

   [ Vadim Yanitskiy ]

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34989?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: ewild/1.6.1
Gerrit-Change-Id: I345ba6569ae0765b3d33e4024d07fc5d925bdf80
Gerrit-Change-Number: 34989
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-MessageType: newchange


[S] Change in osmo-trx[master]: devices: fix wrong gain to power mapping

2023-11-09 Thread Hoernchen
Hoernchen has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/34972?usp=email )

Change subject: devices: fix wrong gain to power mapping
..

devices: fix wrong gain to power mapping

The dev type was set too early, but the actual dev is only being
discovered during open, so update it. This broke the gain to power
mapping by defaulting to a wrong device.

Change-Id: I1dda6023ca6f15bc063c3dfbc704db2410ff7c98
---
M Transceiver52M/device/bladerf/bladerf.cpp
M Transceiver52M/device/common/bandmanager.h
M Transceiver52M/device/lms/LMSDevice.cpp
M Transceiver52M/device/uhd/UHDDevice.cpp
4 files changed, 22 insertions(+), 1 deletion(-)

Approvals:
  fixeria: Looks good to me, approved; Verified
  Jenkins Builder: Verified




diff --git a/Transceiver52M/device/bladerf/bladerf.cpp 
b/Transceiver52M/device/bladerf/bladerf.cpp
index 3e830b1..2f3c86a 100644
--- a/Transceiver52M/device/bladerf/bladerf.cpp
+++ b/Transceiver52M/device/bladerf/bladerf.cpp
@@ -279,6 +279,7 @@

dev_type = blade_dev_type::BLADE2;
tx_window = TX_WINDOW_FIXED;
+   update_band_dev(dev_key(dev_type, tx_sps, rx_sps));

struct bladerf_devinfo info;
bladerf_get_devinfo(dev, );
diff --git a/Transceiver52M/device/common/bandmanager.h 
b/Transceiver52M/device/common/bandmanager.h
index a198937..d07f21d 100644
--- a/Transceiver52M/device/common/bandmanager.h
+++ b/Transceiver52M/device/common/bandmanager.h
@@ -34,7 +34,7 @@
using powerkeyt = typename powermapt::key_type;
using powermappedt = typename powermapt::mapped_type;
using devkeyt = typename devmapt::key_type;
-   const devkeyt _dev_type;
+   devkeyt m_dev_type;
const powermapt _power_map;
const devmapt _dev_map;
powerkeyt m_fallback;
@@ -102,6 +102,10 @@
band_ass_curr_sess = false;
}

+   void update_band_dev(devkeyt dev_type) {
+   m_dev_type = dev_type;
+   }
+
void get_dev_band_desc(powermappedt )
{
if (m_band == 0) {
diff --git a/Transceiver52M/device/lms/LMSDevice.cpp 
b/Transceiver52M/device/lms/LMSDevice.cpp
index 451d2b9..7c220d2 100644
--- a/Transceiver52M/device/lms/LMSDevice.cpp
+++ b/Transceiver52M/device/lms/LMSDevice.cpp
@@ -245,6 +245,7 @@

m_dev_type = parse_dev_type(m_lms_dev);
dev_desc = dev_param_map.at(m_dev_type);
+   update_band_dev(m_dev_type);

if ((cfg->clock_ref != REF_EXTERNAL) && (cfg->clock_ref != 
REF_INTERNAL)) {
LOGC(DDEV, ERROR) << "Invalid reference type";
diff --git a/Transceiver52M/device/uhd/UHDDevice.cpp 
b/Transceiver52M/device/uhd/UHDDevice.cpp
index ec772aa..85e9e38 100644
--- a/Transceiver52M/device/uhd/UHDDevice.cpp
+++ b/Transceiver52M/device/uhd/UHDDevice.cpp
@@ -530,6 +530,8 @@
if (!parse_dev_type())
return -1;

+   update_band_dev(dev_key(dev_type, tx_sps, rx_sps));
+
if ((dev_type == E3XX) && !uhd_e3xx_version_chk()) {
LOGC(DDEV, ALERT) << "E3XX requires UHD 003.009.000 or greater";
return -1;

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34972?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I1dda6023ca6f15bc063c3dfbc704db2410ff7c98
Gerrit-Change-Number: 34972
Gerrit-PatchSet: 3
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


[S] Change in osmo-trx[master]: ms: init blade with fpga control

2023-11-09 Thread Hoernchen
Hoernchen has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/34965?usp=email )

Change subject: ms: init blade with fpga control
..

ms: init blade with fpga control

Blade 1 defaults to fpga tuning, but the blade 2 code defaults to host,
which does 8000 register reads and writes. The only way to speed this up
is to set the env var, which reduces opening the blade device from 10 to
1 seconds.

Change-Id: I32fe31f1e11f4ceb3c864ec8739d177e780d0a7e
---
M Transceiver52M/ms/bladerf_specific.h
1 file changed, 16 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, but someone else must approve
  fixeria: Looks good to me, approved




diff --git a/Transceiver52M/ms/bladerf_specific.h 
b/Transceiver52M/ms/bladerf_specific.h
index e32d77c..e9245d4 100644
--- a/Transceiver52M/ms/bladerf_specific.h
+++ b/Transceiver52M/ms/bladerf_specific.h
@@ -254,6 +254,8 @@

bladerf_log_set_verbosity(BLADERF_LOG_LEVEL_DEBUG);
bladerf_set_usb_reset_on_open(true);
+
+   setenv("BLADERF_DEFAULT_TUNING_MODE","fpga",1); // ensure blade 
2 does not spend 10 seconds initializing host control
blade_check(bladerf_open, , "");
if (!dev) {
std::cerr << "open failed, device missing?" << 
std::endl;

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34965?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I32fe31f1e11f4ceb3c864ec8739d177e780d0a7e
Gerrit-Change-Number: 34965
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


[S] Change in osmo-trx[master]: devices: fix wrong gain to power mapping

2023-11-07 Thread Hoernchen
Attention is currently required from: Hoernchen, fixeria.

Hello Jenkins Builder, fixeria,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-trx/+/34972?usp=email

to look at the new patch set (#2).

The following approvals got outdated and were removed:
Code-Review+1 by fixeria


Change subject: devices: fix wrong gain to power mapping
..

devices: fix wrong gain to power mapping

The dev type was set too early, but the actual dev is only being
discovered during open, so update it. This broke the gain to power mapping by 
defaulting to a wrong device.

Change-Id: I1dda6023ca6f15bc063c3dfbc704db2410ff7c98
---
M Transceiver52M/device/bladerf/bladerf.cpp
M Transceiver52M/device/common/bandmanager.h
M Transceiver52M/device/lms/LMSDevice.cpp
M Transceiver52M/device/uhd/UHDDevice.cpp
4 files changed, 21 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/72/34972/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34972?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I1dda6023ca6f15bc063c3dfbc704db2410ff7c98
Gerrit-Change-Number: 34972
Gerrit-PatchSet: 2
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-CC: laforge 
Gerrit-Attention: Hoernchen 
Gerrit-Attention: fixeria 
Gerrit-MessageType: newpatchset


[S] Change in osmo-trx[master]: devies: fix band manager dev type

2023-11-06 Thread Hoernchen
Hoernchen has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/34972?usp=email )


Change subject: devies: fix band manager dev type
..

devies: fix band manager dev type

The dev type was set too early, but the actual dev is only being
discovered during open, so update it.

Change-Id: I1dda6023ca6f15bc063c3dfbc704db2410ff7c98
---
M Transceiver52M/device/bladerf/bladerf.cpp
M Transceiver52M/device/common/bandmanager.h
M Transceiver52M/device/lms/LMSDevice.cpp
M Transceiver52M/device/uhd/UHDDevice.cpp
4 files changed, 21 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/72/34972/1

diff --git a/Transceiver52M/device/bladerf/bladerf.cpp 
b/Transceiver52M/device/bladerf/bladerf.cpp
index 3e830b1..2f3c86a 100644
--- a/Transceiver52M/device/bladerf/bladerf.cpp
+++ b/Transceiver52M/device/bladerf/bladerf.cpp
@@ -279,6 +279,7 @@

dev_type = blade_dev_type::BLADE2;
tx_window = TX_WINDOW_FIXED;
+   update_band_dev(dev_key(dev_type, tx_sps, rx_sps));

struct bladerf_devinfo info;
bladerf_get_devinfo(dev, );
diff --git a/Transceiver52M/device/common/bandmanager.h 
b/Transceiver52M/device/common/bandmanager.h
index a198937..d07f21d 100644
--- a/Transceiver52M/device/common/bandmanager.h
+++ b/Transceiver52M/device/common/bandmanager.h
@@ -34,7 +34,7 @@
using powerkeyt = typename powermapt::key_type;
using powermappedt = typename powermapt::mapped_type;
using devkeyt = typename devmapt::key_type;
-   const devkeyt _dev_type;
+   devkeyt m_dev_type;
const powermapt _power_map;
const devmapt _dev_map;
powerkeyt m_fallback;
@@ -102,6 +102,10 @@
band_ass_curr_sess = false;
}

+   void update_band_dev(devkeyt dev_type) {
+   m_dev_type = dev_type;
+   }
+
void get_dev_band_desc(powermappedt )
{
if (m_band == 0) {
diff --git a/Transceiver52M/device/lms/LMSDevice.cpp 
b/Transceiver52M/device/lms/LMSDevice.cpp
index 451d2b9..7c220d2 100644
--- a/Transceiver52M/device/lms/LMSDevice.cpp
+++ b/Transceiver52M/device/lms/LMSDevice.cpp
@@ -245,6 +245,7 @@

m_dev_type = parse_dev_type(m_lms_dev);
dev_desc = dev_param_map.at(m_dev_type);
+   update_band_dev(m_dev_type);

if ((cfg->clock_ref != REF_EXTERNAL) && (cfg->clock_ref != 
REF_INTERNAL)) {
LOGC(DDEV, ERROR) << "Invalid reference type";
diff --git a/Transceiver52M/device/uhd/UHDDevice.cpp 
b/Transceiver52M/device/uhd/UHDDevice.cpp
index ec772aa..85e9e38 100644
--- a/Transceiver52M/device/uhd/UHDDevice.cpp
+++ b/Transceiver52M/device/uhd/UHDDevice.cpp
@@ -530,6 +530,8 @@
if (!parse_dev_type())
return -1;

+   update_band_dev(dev_key(dev_type, tx_sps, rx_sps));
+
if ((dev_type == E3XX) && !uhd_e3xx_version_chk()) {
LOGC(DDEV, ALERT) << "E3XX requires UHD 003.009.000 or greater";
return -1;

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34972?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I1dda6023ca6f15bc063c3dfbc704db2410ff7c98
Gerrit-Change-Number: 34972
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-MessageType: newchange


[S] Change in osmo-trx[master]: ms: init blade with fpga control

2023-11-03 Thread Hoernchen
Hoernchen has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/34965?usp=email )


Change subject: ms: init blade with fpga control
..

ms: init blade with fpga control

Blade 1 defaults to fpga tuning, but the blade 2 code defaults to host,
which does 8000 register reads and writes. The only way to speed this up
is to set the env var, which reduces opening the blade device from 10 to
1 seconds.

Change-Id: I32fe31f1e11f4ceb3c864ec8739d177e780d0a7e
---
M Transceiver52M/ms/bladerf_specific.h
1 file changed, 16 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/65/34965/1

diff --git a/Transceiver52M/ms/bladerf_specific.h 
b/Transceiver52M/ms/bladerf_specific.h
index e32d77c..e9245d4 100644
--- a/Transceiver52M/ms/bladerf_specific.h
+++ b/Transceiver52M/ms/bladerf_specific.h
@@ -254,6 +254,8 @@

bladerf_log_set_verbosity(BLADERF_LOG_LEVEL_DEBUG);
bladerf_set_usb_reset_on_open(true);
+
+   setenv("BLADERF_DEFAULT_TUNING_MODE","fpga",1); // ensure blade 
2 does not spend 10 seconds initializing host control
blade_check(bladerf_open, , "");
if (!dev) {
std::cerr << "open failed, device missing?" << 
std::endl;

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34965?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I32fe31f1e11f4ceb3c864ec8739d177e780d0a7e
Gerrit-Change-Number: 34965
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-MessageType: newchange


[S] Change in libosmocore[master]: socket.c: Fix compilation with --disable-libsctp

2023-10-23 Thread Hoernchen
Attention is currently required from: pespin.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34855?usp=email )

Change subject: socket.c: Fix compilation with --disable-libsctp
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34855?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I988d01461822d18b7350a6e69e3b504f7fd5b84f
Gerrit-Change-Number: 34855
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Mon, 23 Oct 2023 09:41:56 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: Fix typo in libosmocore.map

2023-10-05 Thread Hoernchen
Hoernchen has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34659?usp=email )

Change subject: Fix typo in libosmocore.map
..

Fix typo in libosmocore.map

Fixes: 64ba9edf173cc16f9d94c94a423a8b7a5904efaf
Change-Id: I0fb13fb4ef8160f3ac2cb1cb4dd6ea57fd04b5be
---
M src/core/libosmocore.map
1 file changed, 11 insertions(+), 1 deletion(-)

Approvals:
  osmith: Looks good to me, approved
  Jenkins Builder: Verified




diff --git a/src/core/libosmocore.map b/src/core/libosmocore.map
index 105a80a..6c02cd3 100644
--- a/src/core/libosmocore.map
+++ b/src/core/libosmocore.map
@@ -432,7 +432,7 @@
 osmo_sock_mcast_subscribe;
 osmo_sock_mcast_ttl_set;
 osmo_sock_multiaddr_add_local_addr;
-çosmo_sock_multiaddr_del_local_addr;
+osmo_sock_multiaddr_del_local_addr;
 osmo_sock_set_dscp;
 osmo_sock_set_priority;
 osmo_sock_unix_init;

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34659?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I0fb13fb4ef8160f3ac2cb1cb4dd6ea57fd04b5be
Gerrit-Change-Number: 34659
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-MessageType: merged


[S] Change in osmo-trx[master]: ms: reduce rx burst queue size

2023-10-04 Thread Hoernchen
Hoernchen has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/34272?usp=email )

Change subject: ms: reduce rx burst queue size
..

ms: reduce rx burst queue size

This should be fine, because we can at most receive 1.5 bursts of data
at once and produce 2 bursts with previous data, so if this is insufficent the 
usb buffers are late or the upper layer is stuck and we're in trouble anyway.

Change-Id: Ifb8bf2894c87e4234e3d3f65d66c1e98c8f63c53
---
M Transceiver52M/ms/ms.h
1 file changed, 13 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  fixeria: Looks good to me, approved




diff --git a/Transceiver52M/ms/ms.h b/Transceiver52M/ms/ms.h
index 4d0f0cd..18a6954 100644
--- a/Transceiver52M/ms/ms.h
+++ b/Transceiver52M/ms/ms.h
@@ -44,7 +44,6 @@
 #include "threadpool.h"

 const unsigned int ONE_TS_BURST_LEN = (3 + 58 + 26 + 58 + 3 + 8.25) * 4 
/*sps*/;
-const unsigned int NUM_RXQ_FRAMES = 1; // rx thread <-> upper rx queue
 const unsigned int SCH_LEN_SPS = (ONE_TS_BURST_LEN * 8 /*ts*/ * 12 /*frames*/);

 template 
@@ -133,7 +132,7 @@
};
 };

-using rx_queue_t = spsc_cond_timeout<8 * NUM_RXQ_FRAMES, one_burst, true, 
false>;
+using rx_queue_t = spsc_cond_timeout<4, one_burst, true, false>;

 enum class SCH_STATE { SEARCHING, FOUND };


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34272?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ifb8bf2894c87e4234e3d3f65d66c1e98c8f63c53
Gerrit-Change-Number: 34272
Gerrit-PatchSet: 6
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in osmo-trx[master]: ms: reduce rx burst queue size

2023-09-20 Thread Hoernchen
Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/34272?usp=email )

Change subject: ms: reduce rx burst queue size
..


Set Ready For Review


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34272?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ifb8bf2894c87e4234e3d3f65d66c1e98c8f63c53
Gerrit-Change-Number: 34272
Gerrit-PatchSet: 5
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Wed, 20 Sep 2023 17:50:16 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: ms: adjust ts advance

2023-09-20 Thread Hoernchen
Hoernchen has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/34462?usp=email )

Change subject: ms: adjust ts advance
..

ms: adjust ts advance

..and fix the delay warning.

I'd rather have a proper fn advance of 1, but that breaks gprs, but just
slightly increasing the ts number is sufficient to fix issues with late
tx bursts that then get silently dropped by the sdr.

The mobile app does not care, and will happily work even with fn+3.

Change-Id: I46b3ea6b0094026bd50709739df464438f9e54c4
---
M Transceiver52M/ms/ms.cpp
M Transceiver52M/ms/ms_upper.cpp
2 files changed, 19 insertions(+), 1 deletion(-)

Approvals:
  fixeria: Looks good to me, but someone else must approve
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved




diff --git a/Transceiver52M/ms/ms.cpp b/Transceiver52M/ms/ms.cpp
index ca41144..b8710a6 100644
--- a/Transceiver52M/ms/ms.cpp
+++ b/Transceiver52M/ms/ms.cpp
@@ -130,7 +130,7 @@
tosend.decTN(-diff_tn);
 
// in theory fn equal and tn+3 equal is also a problem...
-   if (diff_fn < 0 || (diff_fn == 0 && (now_time.TN() - target_tn < 1))) {
+   if (diff_fn < 0 || (diff_fn == 0 && (target_tn-now_time.TN() < 3))) {
std::cerr << "## TX too late?! fn DIFF:" << diff_fn << " tn 
LOCAL: " << now_time.TN()
  << " tn OTHER: " << target_tn << std::endl;
return;
diff --git a/Transceiver52M/ms/ms_upper.cpp b/Transceiver52M/ms/ms_upper.cpp
index 63c222f..db15226 100644
--- a/Transceiver52M/ms/ms_upper.cpp
+++ b/Transceiver52M/ms/ms_upper.cpp
@@ -258,6 +258,7 @@
trxcon_phyif_handle_burst_ind(g_trxcon, );
}

+   burstTime.incTN(2);
struct trxcon_phyif_rts_ind rts {
static_cast(burstTime.FN()), 
static_cast(burstTime.TN())
};

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34462?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I46b3ea6b0094026bd50709739df464438f9e54c4
Gerrit-Change-Number: 34462
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in osmo-trx[master]: ms: adjust ts advance

2023-09-20 Thread Hoernchen
Attention is currently required from: pespin.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/34462?usp=email )

Change subject: ms: adjust ts advance
..


Patch Set 1:

(3 comments)

Commit Message:

https://gerrit.osmocom.org/c/osmo-trx/+/34462/comment/343d85ff_51c206e8
PS1, Line 15: The mobile app does not care, and will happily work even with 
fn+3.
> you mean tn+3 here?
no, actual frame advance, 3 frames in advance.


Patchset:

PS1:
> So if I understand correctly this adds a let's say ~0. […]
well this is my attempt to get your gprs side to give me tx bursts much 
earlier, because right now they arrive very late. 2ts advance just is a value 
that appears to "work", while 1fn breaks it.

I need tx bursts as soon as possible, and I'm currently getting bursts 0 ts in 
advance, with only the rx/tx offset of 3ts so save me, and if those bursts are 
just slightly delayed it's too late.


File Transceiver52M/ms/ms_upper.cpp:

https://gerrit.osmocom.org/c/osmo-trx/+/34462/comment/a3dfff55_0e1bc47b
PS1, Line 261:  burstTime.incTN(2);
> just to make sure, incTN(2) on FN=X TN=7 ends up with FN=X+1 TN=1, right?
yes, that is what the magic gsmtime class does.



--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34462?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I46b3ea6b0094026bd50709739df464438f9e54c4
Gerrit-Change-Number: 34462
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 20 Sep 2023 14:16:33 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


  1   2   3   4   5   6   7   8   9   10   >