Build failure of network:osmocom:nightly/osmo-msc in Debian_9.0/aarch64

2018-05-09 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/Debian_9.0/aarch64

Package network:osmocom:nightly/osmo-msc failed to build in Debian_9.0/aarch64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-msc

Last lines of build log:
[  305s] [  257.656639] dracut-initqueue[480]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  306s] [  258.407351] dracut-initqueue[480]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  307s] [  259.098133] dracut-initqueue[480]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  307s] [  259.727334] dracut-initqueue[480]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  308s] [  260.393702] dracut-initqueue[480]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  308s] [  260.405743] dracut-initqueue[480]: Warning: Could not boot.
[  308s]  Starting Setup Virtual Console...
[  308s] [  OK  ] Started Setup Virtual Console.
[  308s]  Starting Dracut Emergency Shell...
[  308s] Warning: /dev/disk/by-uuid/00750419-b769-40be-aa7a-a81dca13c577 does 
not exist
[  308s] 
[  308s] Generating "/run/initramfs/rdsosreport.txt"
[  309s] 
[  309s] 
[  309s] Entering emergency mode. Exit the shell to continue.
[  309s] Type "journalctl" to view system logs.
[  309s] You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick 
or /boot
[  309s] after mounting them and attach it to a bug report.
[  309s] 
[  309s] 
[  355s] dracut:/# ### WATCHDOG TRIGGERED, KILLING VM ###
[  356s] /var/cache/obs/worker/root_3/root: 40802
[  356s] qemu-system-aarch64: terminating on signal 15 from pid 13075 (fuser)
[  356s] ### VM INTERACTION END ###
[  356s] /var/run/obs/worker/3/build/build-vm: line 458: kill: (40784) - No 
such process
[  356s] No buildstatus set, either the base system is broken 
(kernel/initrd/udev/glibc/bash/perl)
[  356s] or the build host has a kernel or hardware problem...

gave up after 11 failed build attempts...

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-sgsn in Debian_9.0/aarch64

2018-05-09 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-sgsn/Debian_9.0/aarch64

Package network:osmocom:nightly/osmo-sgsn failed to build in Debian_9.0/aarch64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-sgsn

Last lines of build log:
[  363s] [  299.919831] dracut-initqueue[461]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  364s] [  300.568788] dracut-initqueue[461]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  365s] [  301.190918] dracut-initqueue[461]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  365s] [  301.792257] dracut-initqueue[461]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  366s] [  302.539567] dracut-initqueue[461]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  367s] [  303.215832] dracut-initqueue[461]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  367s] [  303.867144] dracut-initqueue[461]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  368s] [  304.509769] dracut-initqueue[461]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  369s] [  305.146383] dracut-initqueue[461]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  369s] ### WATCHDOG TRIGGERED, KILLING VM ###
[  369s] [  305.796789] dracut-initqueue[461]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  369s] [  305.803694] dracut-initqueue[461]: Warning: Could not boot.
[  369s]  Starting Setup Virtual Console...
[  369s] [  OK  ] Started Setup Virtual Console.
[  369s]  Starting Dracut Emergency Shell...
[  370s] Warning: /dev/disk/by-uuid/00750419-b769-40be-aa7a-a81dca13c577 does 
not exist
[  370s] 
[  370s] Generating "/run/initramfs/rdsosreport.txt"
[  375s] 
[  375s] 
[  375s] Entering emergency mode. Exit the shell to continue.
[  375s] T/var/cache/obs/worker/root_6/root: 29596
[  375s] ypqemu-system-aarch64: terminating on signal 15 from pid 3353 ()
[  375s] e### VM INTERACTION END ###
[  375s] /var/run/obs/worker/6/build/build-vm: line 458: kill: (29585) - No 
such process
[  375s] No buildstatus set, either the base system is broken 
(kernel/initrd/udev/glibc/bash/perl)
[  375s] or the build host has a kernel or hardware problem...

gave up after 11 failed build attempts...

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


[PATCH] osmo-bsc[master]: debug log: verbosely log all lchan alloc choices

2018-05-09 Thread Neels Hofmeyr

debug log: verbosely log all lchan alloc choices

Change-Id: If0070b8f7b6cc7fffbc582cf9f472e60f3096000
---
M src/libbsc/chan_alloc.c
1 file changed, 40 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/98/8098/2

diff --git a/src/libbsc/chan_alloc.c b/src/libbsc/chan_alloc.c
index bdb9d9d..d773382 100644
--- a/src/libbsc/chan_alloc.c
+++ b/src/libbsc/chan_alloc.c
@@ -37,21 +37,29 @@
 
 bool ts_is_usable(const struct gsm_bts_trx_ts *ts)
 {
-   if (!trx_is_usable(ts->trx))
+   if (!trx_is_usable(ts->trx)) {
+   LOGP(DRLL, LOGL_DEBUG, "%s not usable\n", 
gsm_trx_name(ts->trx));
return false;
+   }
 
/* If a TCH/F_PDCH TS is busy changing, it is already taken or not
 * yet available. */
if (ts->pchan == GSM_PCHAN_TCH_F_PDCH) {
-   if (ts->flags & TS_F_PDCH_PENDING_MASK)
+   if (ts->flags & TS_F_PDCH_PENDING_MASK) {
+   LOGP(DRLL, LOGL_DEBUG, "%s in switchover, not 
available\n",
+gsm_ts_and_pchan_name(ts));
return false;
+   }
}
 
/* If a dynamic channel is busy changing, it is already taken or not
 * yet available. */
if (ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH) {
-   if (ts->dyn.pchan_is != ts->dyn.pchan_want)
+   if (ts->dyn.pchan_is != ts->dyn.pchan_want) {
+   LOGP(DRLL, LOGL_DEBUG, "%s in switchover, not 
available\n",
+gsm_ts_and_pchan_name(ts));
return false;
+   }
}
 
return true;
@@ -218,8 +226,14 @@
int j, start, stop, dir, ss;
int check_subslots;
 
-   if (!trx_is_usable(trx))
+#define LOGPLCHANALLOC(fmt, args...) \
+   LOGP(DRLL, LOGL_DEBUG, "looking for lchan %s as %s: " fmt, \
+gsm_pchan_name(pchan), gsm_pchan_name(as_pchan), ## args)
+
+   if (!trx_is_usable(trx)) {
+   LOGPLCHANALLOC("%s trx not usable\n", gsm_trx_name(trx));
return NULL;
+   }
 
if (trx->bts->chan_alloc_reverse) {
/* check TS 7..0 */
@@ -239,28 +253,44 @@
continue;
/* The caller first selects what kind of TS to search in, e.g. 
looking for exact
 * GSM_PCHAN_TCH_F, or maybe among dynamic 
GSM_PCHAN_TCH_F_TCH_H_PDCH... */
-   if (ts->pchan != pchan)
+   if (ts->pchan != pchan) {
+   LOGPLCHANALLOC("%s is != %s\n", 
gsm_ts_and_pchan_name(ts),
+  gsm_pchan_name(pchan));
continue;
+   }
/* Next, is this timeslot in or can it be switched to the pchan 
we want to use it for? */
-   if (!ts_usable_as_pchan(ts, as_pchan))
+   if (!ts_usable_as_pchan(ts, as_pchan)) {
+   LOGPLCHANALLOC("%s is not usable as %s\n", 
gsm_ts_and_pchan_name(ts),
+  gsm_pchan_name(as_pchan));
continue;
+   }
/* If we need to switch it, after above check we are also 
allowed to switch it, and we
 * will always use the first lchan after the switch. Return 
that lchan and rely on the
 * caller to perform the pchan switchover. */
-   if (ts_pchan(ts) != as_pchan)
+   if (ts_pchan(ts) != as_pchan) {
+   LOGPLCHANALLOC("%s is a match, will switch to %s\n", 
gsm_ts_and_pchan_name(ts),
+  gsm_pchan_name(as_pchan));
return ts->lchan;
+   }
 
/* TS is in desired pchan mode. Go ahead and check for an 
available lchan. */
check_subslots = ts_subslots(ts);
for (ss = 0; ss < check_subslots; ss++) {
struct gsm_lchan *lc = >lchan[ss];
if (lc->type == GSM_LCHAN_NONE &&
-   lc->state == LCHAN_S_NONE)
+   lc->state == LCHAN_S_NONE) {
+   LOGPLCHANALLOC("%s ss=%d is available\n", 
gsm_ts_and_pchan_name(ts),
+  lc->nr);
return lc;
+   }
+   LOGPLCHANALLOC("%s ss=%d in type=%s,state=%s not 
suitable\n",
+  gsm_ts_and_pchan_name(ts), lc->nr, 
gsm_lchant_name(lc->type),
+  gsm_lchans_name(lc->state));
}
}
 
return NULL;
+#undef LOGPLCHANALLOC
 }
 
 static struct gsm_lchan *
@@ -308,6 +338,8 @@
struct gsm_lchan *lchan = NULL;
enum gsm_phys_chan_config first, first_cbch, second, second_cbch;
 
+   LOGP(DRLL, LOGL_DEBUG, "bts-%d 

[ABANDON] osmo-bsc[master]: prevent ARFCN+BSIC collisions in config

2018-05-09 Thread Neels Hofmeyr
Neels Hofmeyr has abandoned this change.

Change subject: prevent ARFCN+BSIC collisions in config
..


Abandoned

-- 
To view, visit https://gerrit.osmocom.org/7814
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: Ia7c38188ccbad5d8b7398e3e5220015e62c08c8b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


[PATCH] osmo-bsc[master]: debug log: verbosely log all lchan alloc choices

2018-05-09 Thread Neels Hofmeyr

Review at  https://gerrit.osmocom.org/8098

debug log: verbosely log all lchan alloc choices

Change-Id: If0070b8f7b6cc7fffbc582cf9f472e60f3096000
---
M src/libbsc/chan_alloc.c
1 file changed, 43 insertions(+), 9 deletions(-)


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

diff --git a/src/libbsc/chan_alloc.c b/src/libbsc/chan_alloc.c
index bdb9d9d..369781b 100644
--- a/src/libbsc/chan_alloc.c
+++ b/src/libbsc/chan_alloc.c
@@ -37,21 +37,29 @@
 
 bool ts_is_usable(const struct gsm_bts_trx_ts *ts)
 {
-   if (!trx_is_usable(ts->trx))
+   if (!trx_is_usable(ts->trx)) {
+   LOGP(DRLL, LOGL_DEBUG, "%s not usable\n", 
gsm_trx_name(ts->trx));
return false;
+   }
 
/* If a TCH/F_PDCH TS is busy changing, it is already taken or not
 * yet available. */
if (ts->pchan == GSM_PCHAN_TCH_F_PDCH) {
-   if (ts->flags & TS_F_PDCH_PENDING_MASK)
+   if (ts->flags & TS_F_PDCH_PENDING_MASK) {
+   LOGP(DRLL, LOGL_DEBUG, "%s in switchover, not 
available\n",
+gsm_ts_and_pchan_name(ts));
return false;
+   }
}
 
/* If a dynamic channel is busy changing, it is already taken or not
 * yet available. */
if (ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH) {
-   if (ts->dyn.pchan_is != ts->dyn.pchan_want)
+   if (ts->dyn.pchan_is != ts->dyn.pchan_want) {
+   LOGP(DRLL, LOGL_DEBUG, "%s in switchover, not 
available\n",
+gsm_ts_and_pchan_name(ts));
return false;
+   }
}
 
return true;
@@ -218,8 +226,14 @@
int j, start, stop, dir, ss;
int check_subslots;
 
-   if (!trx_is_usable(trx))
+#define LOGPLCHANALLOC(fmt, args...) \
+   LOGP(DRLL, LOGL_DEBUG, "looking for lchan %s as %s: " fmt, \
+gsm_pchan_name(pchan), gsm_pchan_name(as_pchan), ## args)
+
+   if (!trx_is_usable(trx)) {
+   LOGPLCHANALLOC("%s trx not usable\n", gsm_trx_name(trx));
return NULL;
+   }
 
if (trx->bts->chan_alloc_reverse) {
/* check TS 7..0 */
@@ -235,32 +249,50 @@
 
for (j = start; j != stop; j += dir) {
ts = >ts[j];
-   if (!ts_is_usable(ts))
+   if (!ts_is_usable(ts)) {
+   LOGPLCHANALLOC("%s not usable\n", 
gsm_ts_and_pchan_name(ts));
continue;
+   }
/* The caller first selects what kind of TS to search in, e.g. 
looking for exact
 * GSM_PCHAN_TCH_F, or maybe among dynamic 
GSM_PCHAN_TCH_F_TCH_H_PDCH... */
-   if (ts->pchan != pchan)
+   if (ts->pchan != pchan) {
+   LOGPLCHANALLOC("%s is != %s\n", 
gsm_ts_and_pchan_name(ts),
+  gsm_pchan_name(pchan));
continue;
+   }
/* Next, is this timeslot in or can it be switched to the pchan 
we want to use it for? */
-   if (!ts_usable_as_pchan(ts, as_pchan))
+   if (!ts_usable_as_pchan(ts, as_pchan)) {
+   LOGPLCHANALLOC("%s is not usable as %s\n", 
gsm_ts_and_pchan_name(ts),
+  gsm_pchan_name(as_pchan));
continue;
+   }
/* If we need to switch it, after above check we are also 
allowed to switch it, and we
 * will always use the first lchan after the switch. Return 
that lchan and rely on the
 * caller to perform the pchan switchover. */
-   if (ts_pchan(ts) != as_pchan)
+   if (ts_pchan(ts) != as_pchan) {
+   LOGPLCHANALLOC("%s is a match, will switch to %s\n", 
gsm_ts_and_pchan_name(ts),
+  gsm_pchan_name(as_pchan));
return ts->lchan;
+   }
 
/* TS is in desired pchan mode. Go ahead and check for an 
available lchan. */
check_subslots = ts_subslots(ts);
for (ss = 0; ss < check_subslots; ss++) {
struct gsm_lchan *lc = >lchan[ss];
if (lc->type == GSM_LCHAN_NONE &&
-   lc->state == LCHAN_S_NONE)
+   lc->state == LCHAN_S_NONE) {
+   LOGPLCHANALLOC("%s ss=%d is available\n", 
gsm_ts_and_pchan_name(ts),
+  lc->nr);
return lc;
+   }
+   LOGPLCHANALLOC("%s ss=%d in type=%s,state=%s not 
suitable\n",
+  gsm_ts_and_pchan_name(ts), lc->nr, 
gsm_lchant_name(lc->type),
+  

[PATCH] osmo-bsc[master]: log: indicate hr/fr in audio_support_to_gsm88() error

2018-05-09 Thread Neels Hofmeyr

Review at  https://gerrit.osmocom.org/8101

log: indicate hr/fr in audio_support_to_gsm88() error

Change-Id: Iaaa710d0274fe813d227cb658d82a24db68c4161
---
M src/osmo-bsc/osmo_bsc_bssap.c
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index dcc6b9f..bfa4091 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -59,7 +59,7 @@
return GSM0808_PERM_HR3;
break;
default:
-   LOGP(DMSC, LOGL_ERROR, "Wrong speech mode: %d\n",
+   LOGP(DMSC, LOGL_ERROR, "Wrong speech mode: hr%d, using 
hr1 instead\n",
 audio->ver);
return GSM0808_PERM_HR1;
}
@@ -75,7 +75,7 @@
return GSM0808_PERM_FR3;
break;
default:
-   LOGP(DMSC, LOGL_ERROR, "Wrong speech mode: %d\n",
+   LOGP(DMSC, LOGL_ERROR, "Wrong speech mode: fr%d, using 
fr1 instead\n",
 audio->ver);
return GSM0808_PERM_FR1;
}

-- 
To view, visit https://gerrit.osmocom.org/8101
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaaa710d0274fe813d227cb658d82a24db68c4161
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 


[PATCH] osmo-bsc[master]: deprecate dyn_ts_allow_tch_f and by default allow all TCH

2018-05-09 Thread Neels Hofmeyr

Review at  https://gerrit.osmocom.org/8099

deprecate dyn_ts_allow_tch_f and by default allow all TCH

In osmo-nitb, the way TCH lchans were assigned often resulted in mismatching
TCH kinds, causing problems in the lack of transcoding. Hence
dyn_ts_allow_tch_f was introduced as a workaround.

Now however, we always assign an SDCCH to a requesting MS first, and only later
assign a TCH channel, which then adheres to the codec list configured at 'msc'
in the vty config. Hence it is now considerably harder to obtain a mismatch.

Furthermore, forcing specific codecs is possible by simply omitting the
unwanted ones from the msc config's codec-list. The equivalent of
'dyn_ts_allow_tch_f 0' could be e.g. 'codec-list hr3 hr2 hr1'.

Change-Id: Ib2335d02ea545aff837aadd49f15b2fdb418c46e
---
M src/libbsc/bsc_vty.c
M src/libbsc/net_init.c
2 files changed, 7 insertions(+), 3 deletions(-)


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

diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index 1efca0c..ea4c8d0 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -1001,8 +1001,8 @@
VTY_OUT_TIMER(3119);
VTY_OUT_TIMER(3122);
VTY_OUT_TIMER(3141);
-   vty_out(vty, " dyn_ts_allow_tch_f %d%s",
-   gsmnet->dyn_ts_allow_tch_f ? 1 : 0, VTY_NEWLINE);
+   if (!gsmnet->dyn_ts_allow_tch_f)
+   vty_out(vty, " dyn_ts_allow_tch_f 0%s", VTY_NEWLINE);
if (gsmnet->tz.override != 0) {
if (gsmnet->tz.dst)
vty_out(vty, " timezone %d %d %d%s",
@@ -4615,7 +4615,7 @@
return CMD_SUCCESS;
 }
 
-DEFUN(cfg_net_dyn_ts_allow_tch_f,
+DEFUN_DEPRECATED(cfg_net_dyn_ts_allow_tch_f,
   cfg_net_dyn_ts_allow_tch_f_cmd,
   "dyn_ts_allow_tch_f (0|1)",
   "Allow or disallow allocating TCH/F on TCH_F_TCH_H_PDCH timeslots\n"
@@ -4624,6 +4624,8 @@
 {
struct gsm_network *gsmnet = gsmnet_from_vty(vty);
gsmnet->dyn_ts_allow_tch_f = atoi(argv[0]) ? true : false;
+   vty_out(vty, "%% dyn_ts_allow_tch_f is deprecated, rather use 
msc/codec-list to pick codecs%s",
+   VTY_NEWLINE);
return CMD_SUCCESS;
 }
 
diff --git a/src/libbsc/net_init.c b/src/libbsc/net_init.c
index d5ea5b2..f03a2e1 100644
--- a/src/libbsc/net_init.c
+++ b/src/libbsc/net_init.c
@@ -52,6 +52,8 @@
.mnc = 1,
};
 
+   net->dyn_ts_allow_tch_f = true;
+
/* Permit a compile-time default of A5/3 and A5/1 */
net->a5_encryption_mask = (1 << 3) | (1 << 1);
 

-- 
To view, visit https://gerrit.osmocom.org/8099
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2335d02ea545aff837aadd49f15b2fdb418c46e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 


[PATCH] osmo-bsc[master]: cosmetic: dyn ts init: undup logging for gprs = none

2018-05-09 Thread Neels Hofmeyr

Review at  https://gerrit.osmocom.org/8102

cosmetic: dyn ts init: undup logging for gprs = none

Reshuffle the decision not to activate PDCH when GPRS is off:
Even though all current callers should avoid passing a PDCH activation in case
GPRS is off, it's a better idea to not assert on it and crash osmo-bsc.

Move the decision to omit PDCH activation and logging about it into the actual
functions that do PDCH activation. If PDCH activation is skipped, the lchan
then just stays as it was, and that's what it should anyway be doing.

Change-Id: Ib26642f08044d71a2469e6dbabf1e6fbcb02044d
---
M src/libbsc/abis_rsl.c
M src/libbsc/bsc_dyn_ts.c
2 files changed, 20 insertions(+), 22 deletions(-)


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

diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c
index 167ef6b..ffbf630 100644
--- a/src/libbsc/abis_rsl.c
+++ b/src/libbsc/abis_rsl.c
@@ -2495,6 +2495,16 @@
return abis_rsl_sendmsg(msg);
 }
 
+static bool check_gprs_enabled(struct gsm_bts_trx_ts *ts)
+{
+   if (ts->trx->bts->gprs.mode == BTS_GPRS_NONE) {
+   LOGP(DRSL, LOGL_NOTICE, "%s: GPRS mode is 'none': not 
activating PDCH.\n",
+gsm_ts_and_pchan_name(ts));
+   return false;
+   }
+   return true;
+}
+
 int rsl_ipacc_pdch_activate(struct gsm_bts_trx_ts *ts, int act)
 {
struct msgb *msg = rsl_msgb_alloc();
@@ -2512,8 +2522,9 @@
}
 
if (act){
-   /* Callers should heed the GPRS mode. */
-   OSMO_ASSERT(ts->trx->bts->gprs.mode != BTS_GPRS_NONE);
+   if (!check_gprs_enabled(ts))
+   return -ENOTSUP;
+
msg_type = RSL_MT_IPAC_PDCH_ACT;
ts->flags |= TS_F_PDCH_ACT_PENDING;
} else {
@@ -2647,8 +2658,6 @@
int rc = -EIO;
 
OSMO_ASSERT(ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH);
-   DEBUGP(DRSL, "%s starting switchover to %s\n",
-  gsm_ts_and_pchan_name(ts), gsm_pchan_name(to_pchan));
 
if (ts->dyn.pchan_is != ts->dyn.pchan_want) {
LOGP(DRSL, LOGL_ERROR,
@@ -2680,6 +2689,12 @@
}
}
 
+   if (to_pchan == GSM_PCHAN_PDCH && !check_gprs_enabled(ts))
+   return -ENOTSUP;
+
+   DEBUGP(DRSL, "%s starting switchover to %s\n",
+  gsm_ts_and_pchan_name(ts), gsm_pchan_name(to_pchan));
+
/* Record that we're busy switching. */
ts->dyn.pchan_want = to_pchan;
 
diff --git a/src/libbsc/bsc_dyn_ts.c b/src/libbsc/bsc_dyn_ts.c
index aa3c252..6a1cff7 100644
--- a/src/libbsc/bsc_dyn_ts.c
+++ b/src/libbsc/bsc_dyn_ts.c
@@ -27,31 +27,14 @@
 {
int rc;
 
-   if (ts->trx->bts->gprs.mode == BTS_GPRS_NONE) {
-   LOGP(DRSL, LOGL_NOTICE, "%s: GPRS mode is 'none':"
-" not activating PDCH.\n",
-gsm_ts_and_pchan_name(ts));
-   return;
-   }
-
-   LOGP(DRSL, LOGL_DEBUG, "%s: trying to PDCH ACT\n",
-gsm_ts_and_pchan_name(ts));
-
rc = rsl_ipacc_pdch_activate(ts, 1);
-   if (rc != 0)
+   if (rc != 0 && rc != -ENOTSUP)
LOGP(DRSL, LOGL_ERROR, "%s %s: PDCH ACT failed\n",
 gsm_ts_name(ts), gsm_pchan_name(ts->pchan));
 }
 
 void tchf_tchh_pdch_ts_init(struct gsm_bts_trx_ts *ts)
 {
-   if (ts->trx->bts->gprs.mode == BTS_GPRS_NONE) {
-   LOGP(DRSL, LOGL_NOTICE, "%s: GPRS mode is 'none':"
-" not activating PDCH.\n",
-gsm_ts_and_pchan_name(ts));
-   return;
-   }
-
dyn_ts_switchover_start(ts, GSM_PCHAN_PDCH);
 }
 

-- 
To view, visit https://gerrit.osmocom.org/8102
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib26642f08044d71a2469e6dbabf1e6fbcb02044d
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 


[PATCH] osmo-bsc[master]: fix default fallbacks in audio_support_to_gsm88()

2018-05-09 Thread Neels Hofmeyr

Review at  https://gerrit.osmocom.org/8100

fix default fallbacks in audio_support_to_gsm88()

For audio->hr == true, use HR1, and for hr == false use FR1; not vice versa.

Change-Id: Ifb4dba7c8e9c1d0a22a007355fbd2eda57e789d3
---
M src/osmo-bsc/osmo_bsc_bssap.c
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 3f7e4f8..dcc6b9f 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -61,7 +61,7 @@
default:
LOGP(DMSC, LOGL_ERROR, "Wrong speech mode: %d\n",
 audio->ver);
-   return GSM0808_PERM_FR1;
+   return GSM0808_PERM_HR1;
}
} else {
switch (audio->ver) {
@@ -77,7 +77,7 @@
default:
LOGP(DMSC, LOGL_ERROR, "Wrong speech mode: %d\n",
 audio->ver);
-   return GSM0808_PERM_HR1;
+   return GSM0808_PERM_FR1;
}
}
 }

-- 
To view, visit https://gerrit.osmocom.org/8100
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb4dba7c8e9c1d0a22a007355fbd2eda57e789d3
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 


Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/aarch64

2018-05-09 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/aarch64

Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/aarch64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-bsc

Last lines of build log:
[  334s] [  296.158894] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  335s] [  296.950431] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  336s] [  297.644363] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  337s] [  298.337569] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  337s] [  299.078545] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  338s] [  299.726713] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  339s] [  300.435680] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  339s] [  301.096394] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  340s] [  301.686831] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  341s] [  302.530987] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  341s] [  303.176840] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  342s] [  303.864445] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  343s] [  304.480152] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  343s] [  305.176964] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  344s] [  305.899673] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  345s] [  306.637132] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  346s] [  307.375342] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  346s] [  308.192437] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  347s] ### WATCHDOG TRIGGERED, KILLING VM ###
[  347s] [  308.883039] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  348s] [  309.583432] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  348s] /var/cache/obs/worker/root_11/root: 22855
[  348s] qemu-system-aarch64: terminating on signal 15 from pid 1339 (fuser)
[  348s] ### VM INTERACTION END ###
[  348s] /var/run/obs/worker/11/build/build-vm: line 458: kill: (22844) - No 
such process
[  348s] No buildstatus set, either the base system is broken 
(kernel/initrd/udev/glibc/bash/perl)
[  348s] or the build host has a kernel or hardware problem...

gave up after 12 failed build attempts...

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/openbsc in Debian_9.0/aarch64

2018-05-09 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/aarch64

Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/aarch64

Check out the package for editing:
  osc checkout network:osmocom:nightly openbsc

Last lines of build log:
[  321s] [  281.204438] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  322s] [  281.826838] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  323s] [  282.485707] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  323s] [  283.156951] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  324s] [  283.805781] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  325s] [  284.476808] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  325s] [  285.116480] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  326s] [  285.787609] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  327s] [  286.435795] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  327s] [  287.036819] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  328s] [  287.686070] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  329s] [  288.326598] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  329s] [  288.996061] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  330s] [  289.646693] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  331s] [  290.335875] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  331s] [  290.966947] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  332s] [  291.585575] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  333s] [  292.217080] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  333s] ### WATCHDOG TRIGGERED, KILLING VM ###
[  333s] [  292.825875] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  334s] [  293.446891] dracut-initqueue[449]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  334s] /var/cache/obs/worker/root_9/root: 15294
[  334s] qemu-system-aarch64: terminating on signal 15 from pid 46467 ()
[  334s] ### VM INTERACTION END ###
[  334s] /var/run/obs/worker/9/build/build-vm: line 458: kill: (15279) - No 
such process
[  334s] No buildstatus set, either the base system is broken 
(kernel/initrd/udev/glibc/bash/perl)
[  334s] or the build host has a kernel or hardware problem...

gave up after 11 failed build attempts...

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-mgw in Debian_9.0/aarch64

2018-05-09 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-mgw/Debian_9.0/aarch64

Package network:osmocom:nightly/osmo-mgw failed to build in Debian_9.0/aarch64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-mgw

Last lines of build log:
[  289s] [  258.056108] dracut-initqueue[456]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  289s] [  258.748078] dracut-initqueue[456]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  290s] [  259.460723] dracut-initqueue[456]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  291s] [  260.137201] dracut-initqueue[456]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  292s] [  260.806194] dracut-initqueue[456]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  292s] [  260.813245] dracut-initqueue[456]: Warning: Could not boot.
[  292s]  Starting Setup Virtual Console...
[  292s] [  OK  ] Started Setup Virtual Console.
[  292s]  Starting Dracut Emergency Shell...
[  292s] Warning: /dev/disk/by-uuid/00750419-b769-40be-aa7a-a81dca13c577 does 
not exist
[  292s] 
[  292s] Generating "/run/initramfs/rdsosreport.txt"
[  292s] 
[  292s] 
[  292s] Entering emergency mode. Exit the shell to continue.
[  292s] Type "journalctl" to view system logs.
[  292s] You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick 
or /boot
[  292s] after mounting them and attach it to a bug report.
[  292s] 
[  292s] 
[  334s] dracut:/# ### WATCHDOG TRIGGERED, KILLING VM ###
[  335s] /var/cache/obs/worker/root_21/root: 20457
[  335s] qemu-system-aarch64: terminating on signal 15 from pid 47289 ()
[  335s] ### VM INTERACTION END ###
[  335s] /var/run/obs/worker/21/build/build-vm: line 458: kill: (20447) - No 
such process
[  335s] No buildstatus set, either the base system is broken 
(kernel/initrd/udev/glibc/bash/perl)
[  335s] or the build host has a kernel or hardware problem...

gave up after 12 failed build attempts...

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


[PATCH] osmo-bts[master]: dyn TS: be less strict on chan_nr, to allow arbitrary pchan ...

2018-05-09 Thread Neels Hofmeyr

Review at  https://gerrit.osmocom.org/8097

dyn TS: be less strict on chan_nr, to allow arbitrary pchan switches

To allow switching a dyn TS also between TCH/H <-> TCH/F and anything else,
don't thwart RSL messages just because their chan_nr doesn't reflect the
current pchan mode. For dyn TS, leave that to message handling.

In particular, a TS switch is invoked by a Chan Activ message, in which case
the current pchan by definition mismatches the incoming chan_nr's reflected
channel type.

With this patch, I have tested successful direct TCH/H<->TCH/F switchover on
sysmoBTS, with osmo-bsc patch I72d5d833b186b1e1925d513885b405d8c19aa496 (and
'msc'/'codec-list' vty config to change TCH kinds while gprs mode was none).

Change-Id: I19e5e509101ec91204de9baff04582d99bc8dcb8
---
M src/common/gsm_data_shared.c
1 file changed, 4 insertions(+), 10 deletions(-)


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

diff --git a/src/common/gsm_data_shared.c b/src/common/gsm_data_shared.c
index 328b57e..2a1f9c8 100644
--- a/src/common/gsm_data_shared.c
+++ b/src/common/gsm_data_shared.c
@@ -716,19 +716,13 @@
lch_idx = 0;/* TCH/F */ 
if (ts->pchan != GSM_PCHAN_TCH_F &&
ts->pchan != GSM_PCHAN_PDCH &&
-   ts->pchan != GSM_PCHAN_TCH_F_PDCH
-   && !(ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH
-&& (ts->dyn.pchan_is == GSM_PCHAN_TCH_F
-|| ts->dyn.pchan_is == GSM_PCHAN_NONE
-|| ts->dyn.pchan_want == GSM_PCHAN_TCH_F)))
+   ts->pchan != GSM_PCHAN_TCH_F_PDCH &&
+   ts->pchan != GSM_PCHAN_TCH_F_TCH_H_PDCH)
ok = false;
} else if ((cbits & 0x1e) == 0x02) {
lch_idx = cbits & 0x1;  /* TCH/H */
-   if (ts->pchan != GSM_PCHAN_TCH_H
-   && !(ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH
-&& (ts->dyn.pchan_is == GSM_PCHAN_TCH_H
-|| ts->dyn.pchan_is == GSM_PCHAN_NONE
-|| ts->dyn.pchan_want == GSM_PCHAN_TCH_H)))
+   if (ts->pchan != GSM_PCHAN_TCH_H &&
+   ts->pchan != GSM_PCHAN_TCH_F_TCH_H_PDCH)
ok = false;
} else if ((cbits & 0x1c) == 0x04) {
lch_idx = cbits & 0x3;  /* SDCCH/4 */

-- 
To view, visit https://gerrit.osmocom.org/8097
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I19e5e509101ec91204de9baff04582d99bc8dcb8
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 


Build failure of network:osmocom:nightly/libosmo-sccp in Debian_9.0/aarch64

2018-05-09 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmo-sccp/Debian_9.0/aarch64

Package network:osmocom:nightly/libosmo-sccp failed to build in 
Debian_9.0/aarch64

Check out the package for editing:
  osc checkout network:osmocom:nightly libosmo-sccp

Last lines of build log:
[   13s] [67/70] preinstalling sysvinit-utils...
[   13s] [68/70] preinstalling e2fsprogs...
[   14s] [69/70] preinstalling sysv-rc...
[   14s] [70/70] preinstalling initscripts...
[   14s] 
[   14s] [1/1] preinstalling libdevmapper1.02.1...
[   15s] copying packages...
[   18s] reordering...cycle: libc6 -> libgcc1
[   18s]   breaking dependency libgcc1 -> libc6
[   18s] cycle: debhelper -> dh-autoreconf
[   18s]   breaking dependency debhelper -> dh-autoreconf
[   18s] cycle: dh-strip-nondeterminism -> debhelper
[   18s]   breaking dependency debhelper -> dh-strip-nondeterminism
[   18s] done
[   18s] objdump: /boot/Image.guest: File format not recognized
[   21s] booting kvm...
[   22s] ### VM INTERACTION START ###
[   22s] /usr/bin/qemu-system-aarch64 -nodefaults -no-reboot -nographic -vga 
none -enable-kvm -cpu host -M virt,gic-version=host -object 
rng-random,filename=/dev/hwrng,id=rng0 -device virtio-rng-device,rng=rng0 
-runas qemu -net none -kernel /boot/Image.guest -initrd /boot/initrd.guest 
-append root=/dev/disk/by-id/virtio-0 rootfstype=ext4 rootflags=noatime panic=1 
quiet no-kvmclock nmi_watchdog=0 rw rd.driver.pre=binfmt_misc elevator=noop 
console=ttyAMA0 init=/.build/build -m 2048 -drive 
file=/var/cache/obs/worker/root_6/root,format=raw,if=none,id=disk,serial=0,cache=unsafe
 -device virtio-blk-device,drive=disk -drive 
file=/var/cache/obs/worker/root_6/swap,format=raw,if=none,id=swap,serial=1,cache=unsafe
 -device virtio-blk-device,drive=swap -serial stdio -chardev 
socket,id=monitor,server,nowait,path=/var/cache/obs/worker/root_6/root.qemu/monitor
 -mon chardev=monitor,mode=readline -smp 4
[   22s] qemu-system-aarch64: -drive 
file=/var/cache/obs/worker/root_6/root,format=raw,if=none,id=disk,serial=0,cache=unsafe:
 'serial' is deprecated, please use the corresponding option of '-device' 
instead
[   22s] qemu-system-aarch64: -drive 
file=/var/cache/obs/worker/root_6/swap,format=raw,if=none,id=swap,serial=1,cache=unsafe:
 'serial' is deprecated, please use the corresponding option of '-device' 
instead
[  328s] ### WATCHDOG TRIGGERED, KILLING VM ###
[  328s] /var/cache/obs/worker/root_6/root: 24789
[  328s] qemu-system-aarch64: terminating on signal 15 from pid 30317 ()
[  328s] ### VM INTERACTION END ###
[  328s] /var/run/obs/worker/6/build/build-vm: line 458: kill: (24757) - No 
such process
[  328s] No buildstatus set, either the base system is broken 
(kernel/initrd/udev/glibc/bash/perl)
[  328s] or the build host has a kernel or hardware problem...

gave up after 11 failed build attempts...

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-iuh in Debian_9.0/aarch64

2018-05-09 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_9.0/aarch64

Package network:osmocom:nightly/osmo-iuh failed to build in Debian_9.0/aarch64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-iuh

Last lines of build log:
[  319s] [  274.220813] dracut-initqueue[458]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  320s] [  274.846570] dracut-initqueue[458]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  321s] [  275.505844] dracut-initqueue[458]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  321s] [  276.146389] dracut-initqueue[458]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  322s] [  276.815662] dracut-initqueue[458]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  322s] [  276.823865] dracut-initqueue[458]: Warning: Could not boot.
[  322s]  Starting Setup Virtual Console...
[  322s] [  OK  ] Started Setup Virtual Console.
[  322s]  Starting Dracut Emergency Shell...
[  322s] Warning: /dev/disk/by-uuid/00750419-b769-40be-aa7a-a81dca13c577 does 
not exist
[  322s] 
[  322s] Generating "/run/initramfs/rdsosreport.txt"
[  322s] 
[  322s] 
[  322s] Entering emergency mode. Exit the shell to continue.
[  322s] Type "journalctl" to view system logs.
[  322s] You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick 
or /boot
[  322s] after mounting them and attach it to a bug report.
[  322s] 
[  322s] 
[  337s] dracut:/# ### WATCHDOG TRIGGERED, KILLING VM ###
[  337s] /var/cache/obs/worker/root_17/root: 42909
[  337s] qemu-system-aarch64: terminating on signal 15 from pid 31945 ()
[  337s] ### VM INTERACTION END ###
[  337s] /var/run/obs/worker/17/build/build-vm: line 458: kill: (42902) - No 
such process
[  338s] No buildstatus set, either the base system is broken 
(kernel/initrd/udev/glibc/bash/perl)
[  338s] or the build host has a kernel or hardware problem...

gave up after 10 failed build attempts...

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


[PATCH] osmo-bsc[master]: dyn TS: init only when both RSL and the Channel OM are estab...

2018-05-09 Thread Neels Hofmeyr

Review at  https://gerrit.osmocom.org/8095

dyn TS: init only when both RSL and the Channel OM are established

Recent Icf6e25ff068e8a2600562d52726ead65e864ec02 changed the dyn_ts_init() hook
from bootstrap_rsl() to the Channel OPSTART ACK, but this is not sufficient.
Now RBS2k never calls dyn_ts_init(), and we may need to wait for RSL:

Dyn TS should actually be initialized only when *both* OML opstart and RSL link
are established. To that end, introduce a generalized API to query OML and RSL
status and to trigger a timeslot init at the appropriate time.

Add gsm_ts_check_init() to be called both when RSL and OML opstart are
established: trigger gsm_ts_init() only when both are given.

Add gsm_bts_trx_ts->initialized flag to mark whether initialization has already
taken place. Add gsm_bts_mark_all_ts_uninitialized() to conveniently clear this
flag for all TS in a BTS.

Add gsm_bts_model.oml_is_ts_ready() callback so that each BTS implementation
can return the OML status of a timeslot in its own OML implementation.
Actually, currently all BTS models that need this init mechanism store the TS'
OML status in ts->mo.nm_state. While we would in practice correctly init dyn TS
by just looking at ts->mo.nm_state, semantically, the decision whether the TS
is ready is up to the BTS models' specific OML implementations.

>From bootstrap_rsl(), call gsm_ts_check_init(), in case the TS OML Opstart has
happened before RSL is established -- applies to all BTS models.

For all BTS models:
- call gsm_{bts,trx}_mark_all_ts_uninitialized() when OM is torn down, to make
  sure the TS init mechanism will work a second time.

For all BTS models supporting dyn TS, i.e. osmo-bts, nanobts and RBS2k:
- implement oml_is_ts_ready().
- call gsm_ts_check_init() when a Channel OM is taken into operation.

Any BTS models that don't set oml_is_ts_ready() will see a ts init as soon as
RSL is bootstrapped (incidentally, the old dyn TS behavior before recent
Icf6e25ff068e8a2600562d52726ead65e864ec02).

This firstly fixes dyn TS for RBS2k by re-adding the initial switch to PDCH,
and furthermore does so only after both OML TS opstart and RSL are through.

This fixes the ttcn3-bsc-tests around dyn TS, since for the osmo-bts-virtual,
the RSL is established only after OML opstart on the TS, which was broken by
Icf6e25ff068e8a2600562d52726ead65e864ec02.

Nokia Site and Siemens BS11 practically do not require this init mechanism,
since all that happens there so far is dyn TS init, and these BTS models do not
support dyn TS of any kind. A future patch may add oml_is_ts_ready().

Related: OS#3205
Change-Id: I99f29d2ba079f6f4b77f0af12d9784588d2f56b3
---
M include/osmocom/bsc/gsm_data.h
M src/libbsc/abis_om2000.c
M src/libbsc/abis_rsl.c
M src/libbsc/bsc_init.c
M src/libbsc/bts_ericsson_rbs2000.c
M src/libbsc/bts_ipaccess_nanobts.c
M src/libbsc/bts_nokia_site.c
M src/libbsc/bts_siemens_bs11.c
8 files changed, 73 insertions(+), 3 deletions(-)


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

diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index f113904..29b97f0 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -459,6 +459,8 @@
 /* One Timeslot in a TRX */
 struct gsm_bts_trx_ts {
struct gsm_bts_trx *trx;
+   bool initialized;
+
/* number of this timeslot at the TRX */
uint8_t nr;
 
@@ -605,6 +607,7 @@
int (*start)(struct gsm_network *net);
int (*oml_rcvmsg)(struct msgb *msg);
char * (*oml_status)(const struct gsm_bts *bts);
+   bool (*oml_is_ts_ready)(const struct gsm_bts_trx_ts *ts);
 
void (*e1line_bind_ops)(struct e1inp_line *line);
 
@@ -1387,4 +1390,8 @@
 
 bool classmark_is_r99(struct gsm_classmark *cm);
 
+void gsm_ts_check_init(struct gsm_bts_trx_ts *ts);
+void gsm_trx_mark_all_ts_uninitialized(struct gsm_bts_trx *trx);
+void gsm_bts_mark_all_ts_uninitialized(struct gsm_bts *bts);
+
 #endif /* _GSM_DATA_H */
diff --git a/src/libbsc/abis_om2000.c b/src/libbsc/abis_om2000.c
index 6057bc6..d533ea1 100644
--- a/src/libbsc/abis_om2000.c
+++ b/src/libbsc/abis_om2000.c
@@ -2737,8 +2737,10 @@
 bts->nr, 255, trx->nr);
 
for (i = 0; i < ARRAY_SIZE(trx->ts); i++) {
-   om2k_mo_init(>ts[i].rbs2000.om2k_mo, OM2K_MO_CLS_TS,
+   struct gsm_bts_trx_ts *ts = >ts[i];
+   om2k_mo_init(>rbs2000.om2k_mo, OM2K_MO_CLS_TS,
bts->nr, trx->nr, i);
+   gsm_ts_check_init(ts);
}
 }
 
diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c
index b36e496..e6d0cea 100644
--- a/src/libbsc/abis_rsl.c
+++ b/src/libbsc/abis_rsl.c
@@ -3017,3 +3017,40 @@
/* Now release it */
return rsl_rf_chan_release(lchan, 0, SACCH_NONE);
 }
+
+/* Initial timeslot actions when a timeslot first comes into operation. */
+static bool gsm_ts_init(struct gsm_bts_trx_ts *ts)
+{
+   dyn_ts_init(ts);
+   return 

[PATCH] osmo-bsc[master]: dyn TS: allow any pchan type changes, fix for gprs mode none

2018-05-09 Thread Neels Hofmeyr

Review at  https://gerrit.osmocom.org/8096

dyn TS: allow any pchan type changes, fix for gprs mode none

In rsl_chan_activate_lchan(), remove a condition to also allow switching pchan
modes when not in PDCH mode, which is actually not needed and would hinder
switching from pchan=NONE or between TCH/F <-> TCH/H.

Refactor the part where lchan_alloc() decides to switch a pchan mode into a
separate function, ts_usable_as_pchan(), which transparently checks both dyn TS
kinds for:

- Already in switchover? (missing check for ip.access style dyn TS)
- Is the lchan->state in error? (missing check for ip.access style dyn TS)
- Switch from pchan=NONE? (missing feature for Osmocom style dyn TS, for proper
  handling with gprs mode none)
- Switch between TCH/F <-> TCH/H when all subslots are unused?
  (missing feature for Osmocom style dyn TS, also useful for gprs mode none)

Always pass the desired pchan in the dyn_as_pchan argument to the _lc_find_*
functions to make switchover decisions transparent. Use the _lc_dyn_find_bts()
function for ip.access style dyn TS for the same reason.

Related: OS#3244
Change-Id: I72d5d833b186b1e1925d513885b405d8c19aa496
---
M src/libbsc/abis_rsl.c
M src/libbsc/chan_alloc.c
2 files changed, 96 insertions(+), 68 deletions(-)


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

diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c
index e6d0cea..167ef6b 100644
--- a/src/libbsc/abis_rsl.c
+++ b/src/libbsc/abis_rsl.c
@@ -569,7 +569,6 @@
 * released.
 */
if (lchan->ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH
-   && lchan->ts->dyn.pchan_is == GSM_PCHAN_PDCH
&& lchan->ts->dyn.pchan_is == lchan->ts->dyn.pchan_want) {
enum gsm_phys_chan_config pchan_want;
pchan_want = pchan_for_lchant(lchan->type);
diff --git a/src/libbsc/chan_alloc.c b/src/libbsc/chan_alloc.c
index 9668968..bdb9d9d 100644
--- a/src/libbsc/chan_alloc.c
+++ b/src/libbsc/chan_alloc.c
@@ -133,9 +133,86 @@
return count;
 }
 
+static bool ts_usable_as_pchan(struct gsm_bts_trx_ts *ts,
+  enum gsm_phys_chan_config as_pchan)
+{
+   switch (ts->pchan) {
+   case GSM_PCHAN_TCH_F_PDCH:
+   if (ts->flags & TS_F_PDCH_PENDING_MASK) {
+   /* currently being switched over. Not usable. */
+   return false;
+   }
+   switch (as_pchan) {
+   case GSM_PCHAN_TCH_F:
+   case GSM_PCHAN_PDCH:
+   /* continue to check below. */
+   break;
+   default:
+   return false;
+   }
+   break;
+
+   case GSM_PCHAN_TCH_F_TCH_H_PDCH:
+   if (ts->dyn.pchan_is != ts->dyn.pchan_want) {
+   /* currently being switched over. Not usable. */
+   return false;
+   }
+   switch (as_pchan) {
+   case GSM_PCHAN_TCH_F:
+   case GSM_PCHAN_TCH_H:
+   case GSM_PCHAN_PDCH:
+   /* continue to check below. */
+   break;
+   default:
+   return false;
+   }
+   break;
+
+   default:
+   /* static timeslots never switch. */
+   return ts->pchan == as_pchan;
+   }
+
+   /* Dynamic timeslots -- Checks depending on the current actual pchan 
mode: */
+   switch (ts_pchan(ts)) {
+   case GSM_PCHAN_NONE:
+   /* Not initialized, possibly because GPRS was disabled. We may 
switch. */
+   return true;
+
+   case GSM_PCHAN_PDCH:
+   /* This slot is in PDCH mode and available to switch pchan 
mode. But check for
+* error states: */
+   if (ts->lchan->state != LCHAN_S_NONE && ts->lchan->state != 
LCHAN_S_ACTIVE)
+   return false;
+   return true;
+
+   case GSM_PCHAN_TCH_F:
+   case GSM_PCHAN_TCH_H:
+   /* No need to switch at all? */
+   if (ts_pchan(ts) == as_pchan)
+   return true;
+
+   /* If any lchan is in use, we can't change the pchan kind */
+   {
+   int ss;
+   int subslots = ts_subslots(ts);
+   for (ss = 0; ss < subslots; ss++) {
+   struct gsm_lchan *lc = >lchan[ss];
+   if (lc->type != GSM_LCHAN_NONE || lc->state != 
LCHAN_S_NONE)
+   return false;
+   }
+   }
+   return true;
+
+   default:
+   /* Not implemented. */
+   return false;
+   }
+}
+
 static struct gsm_lchan *
 _lc_find_trx(struct gsm_bts_trx *trx, enum gsm_phys_chan_config pchan,
-enum gsm_phys_chan_config 

Build failure of network:osmocom:nightly/osmo-hlr in Debian_9.0/aarch64

2018-05-09 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/Debian_9.0/aarch64

Package network:osmocom:nightly/osmo-hlr failed to build in Debian_9.0/aarch64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-hlr

Last lines of build log:
[  310s] [  271.307403] dracut-initqueue[445]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  311s] [  272.035066] dracut-initqueue[445]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  312s] [  272.723359] dracut-initqueue[445]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  312s] [  273.378441] dracut-initqueue[445]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  313s] [  274.077913] dracut-initqueue[445]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  313s] [  274.090871] dracut-initqueue[445]: Warning: Could not boot.
[  313s]  Starting Setup Virtual Console...
[  313s] [  OK  ] Started Setup Virtual Console.
[  313s]  Starting Dracut Emergency Shell...
[  313s] Warning: /dev/disk/by-uuid/00750419-b769-40be-aa7a-a81dca13c577 does 
not exist
[  313s] 
[  313s] Generating "/run/initramfs/rdsosreport.txt"
[  315s] 
[  315s] 
[  315s] Entering emergency mode. Exit the shell to continue.
[  315s] Type "journalctl" to view system logs.
[  315s] You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick 
or /boot
[  315s] after mounting them and attach it to a bug report.
[  315s] 
[  315s] 
[  339s] dracut:/# ### WATCHDOG TRIGGERED, KILLING VM ###
[  340s] /var/cache/obs/worker/root_30/root: 27275
[  340s] qemu-system-aarch64: terminating on signal 15 from pid 6246 (fuser)
[  340s] ### VM INTERACTION END ###
[  340s] /var/run/obs/worker/30/build/build-vm: line 458: kill: (27268) - No 
such process
[  340s] No buildstatus set, either the base system is broken 
(kernel/initrd/udev/glibc/bash/perl)
[  340s] or the build host has a kernel or hardware problem...

gave up after 12 failed build attempts...

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-bts in Debian_9.0/aarch64

2018-05-09 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bts/Debian_9.0/aarch64

Package network:osmocom:nightly/osmo-bts failed to build in Debian_9.0/aarch64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-bts

Last lines of build log:
[  288s] [  252.508226] dracut-initqueue[493]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  288s] [  253.133959] dracut-initqueue[493]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  289s] [  253.830477] dracut-initqueue[493]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  290s] [  254.520365] dracut-initqueue[493]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  290s] [  255.131042] dracut-initqueue[493]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  290s] [  255.137609] dracut-initqueue[493]: Warning: Could not boot.
[  290s]  Starting Setup Virtual Console...
[  290s] [  OK  ] Started Setup Virtual Console.
[  290s]  Starting Dracut Emergency Shell...
[  290s] Warning: /dev/disk/by-uuid/00750419-b769-40be-aa7a-a81dca13c577 does 
not exist
[  290s] 
[  290s] Generating "/run/initramfs/rdsosreport.txt"
[  291s] 
[  291s] 
[  291s] Entering emergency mode. Exit the shell to continue.
[  291s] Type "journalctl" to view system logs.
[  291s] You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick 
or /boot
[  291s] after mounting them and attach it to a bug report.
[  291s] 
[  291s] 
[  341s] dracut:/# ### WATCHDOG TRIGGERED, KILLING VM ###
[  342s] /var/cache/obs/worker/root_6/root: 16372
[  342s] qemu-system-aarch64: terminating on signal 15 from pid 2275 ()
[  342s] ### VM INTERACTION END ###
[  342s] /var/run/obs/worker/6/build/build-vm: line 458: kill: (16362) - No 
such process
[  342s] No buildstatus set, either the base system is broken 
(kernel/initrd/udev/glibc/bash/perl)
[  342s] or the build host has a kernel or hardware problem...

gave up after 13 failed build attempts...

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-trx in Debian_9.0/aarch64

2018-05-09 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/Debian_9.0/aarch64

Package network:osmocom:nightly/osmo-trx failed to build in Debian_9.0/aarch64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-trx

Last lines of build log:
[  324s] [  263.146782] dracut-initqueue[462]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  324s] [  263.737183] dracut-initqueue[462]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  325s] [  264.341515] dracut-initqueue[462]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  325s] [  265.010589] dracut-initqueue[462]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  326s] [  265.686389] dracut-initqueue[462]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  326s] [  265.714508] dracut-initqueue[462]: Warning: Could not boot.
[  326s]  Starting Setup Virtual Console...
[  326s] [  OK  ] Started Setup Virtual Console.
[  326s]  Starting Dracut Emergency Shell...
[  326s] Warning: /dev/disk/by-uuid/00750419-b769-40be-aa7a-a81dca13c577 does 
not exist
[  326s] 
[  326s] Generating "/run/initramfs/rdsosreport.txt"
[  327s] 
[  327s] 
[  327s] Entering emergency mode. Exit the shell to continue.
[  327s] Type "journalctl" to view system logs.
[  327s] You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick 
or /boot
[  327s] after mounting them and attach it to a bug report.
[  327s] 
[  327s] 
[  365s] dracut:/# ### WATCHDOG TRIGGERED, KILLING VM ###
[  366s] /var/cache/obs/worker/root_20/root: 27904
[  366s] qemu-system-aarch64: terminating on signal 15 from pid 4942 (fuser)
[  366s] ### VM INTERACTION END ###
[  366s] /var/run/obs/worker/20/build/build-vm: line 458: kill: (27891) - No 
such process
[  366s] No buildstatus set, either the base system is broken 
(kernel/initrd/udev/glibc/bash/perl)
[  366s] or the build host has a kernel or hardware problem...

gave up after 12 failed build attempts...

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-pcu in Debian_9.0/aarch64

2018-05-09 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_9.0/aarch64

Package network:osmocom:nightly/osmo-pcu failed to build in Debian_9.0/aarch64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-pcu

Last lines of build log:
[  326s] [  268.367557] dracut-initqueue[475]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  327s] [  269.051609] dracut-initqueue[475]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  327s] [  269.796728] dracut-initqueue[475]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  328s] [  270.647051] dracut-initqueue[475]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  329s] [  271.235551] dracut-initqueue[475]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  329s] [  271.242228] dracut-initqueue[475]: Warning: Could not boot.
[  329s]  Starting Setup Virtual Console...
[  329s] [  OK  ] Started Setup Virtual Console.
[  329s]  Starting Dracut Emergency Shell...
[  329s] Warning: /dev/disk/by-uuid/00750419-b769-40be-aa7a-a81dca13c577 does 
not exist
[  329s] 
[  329s] Generating "/run/initramfs/rdsosreport.txt"
[  330s] 
[  330s] 
[  330s] Entering emergency mode. Exit the shell to continue.
[  330s] Type "journalctl" to view system logs.
[  330s] You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick 
or /boot
[  330s] after mounting them and attach it to a bug report.
[  330s] 
[  330s] 
[  362s] dracut:/# ### WATCHDOG TRIGGERED, KILLING VM ###
[  363s] /var/cache/obs/worker/root_2/root: 41975
[  363s] qemu-system-aarch64: terminating on signal 15 from pid 16751 (fuser)
[  363s] ### VM INTERACTION END ###
[  363s] /var/run/obs/worker/2/build/build-vm: line 458: kill: (41946) - No 
such process
[  363s] No buildstatus set, either the base system is broken 
(kernel/initrd/udev/glibc/bash/perl)
[  363s] or the build host has a kernel or hardware problem...

gave up after 13 failed build attempts...

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/libosmo-netif in Debian_9.0/aarch64

2018-05-09 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmo-netif/Debian_9.0/aarch64

Package network:osmocom:nightly/libosmo-netif failed to build in 
Debian_9.0/aarch64

Check out the package for editing:
  osc checkout network:osmocom:nightly libosmo-netif

Last lines of build log:
[  326s] [  288.665100] dracut-initqueue[468]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  326s] [  289.324650] dracut-initqueue[468]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  327s] [  290.003074] dracut-initqueue[468]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  328s] [  290.676055] dracut-initqueue[468]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  328s] [  291.429474] dracut-initqueue[468]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  328s] [  291.436030] dracut-initqueue[468]: Warning: Could not boot.
[  329s]  Starting Setup Virtual Console...
[  329s] [  OK  ] Started Setup Virtual Console.
[  329s]  Starting Dracut Emergency Shell...
[  329s] Warning: /dev/disk/by-uuid/00750419-b769-40be-aa7a-a81dca13c577 does 
not exist
[  329s] 
[  329s] Generating "/run/initramfs/rdsosreport.txt"
[  329s] 
[  329s] 
[  329s] Entering emergency mode. Exit the shell to continue.
[  329s] Type "journalctl" to view system logs.
[  329s] You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick 
or /boot
[  329s] after mounting them and attach it to a bug report.
[  329s] 
[  329s] 
[  339s] dracut:/# ### WATCHDOG TRIGGERED, KILLING VM ###
[  341s] /var/cache/obs/worker/root_15/root: 29927
[  341s] qemu-system-aarch64: terminating on signal 15 from pid 46684 (fuser)
[  341s] ### VM INTERACTION END ###
[  341s] /var/run/obs/worker/15/build/build-vm: line 458: kill: (29920) - No 
such process
[  341s] No buildstatus set, either the base system is broken 
(kernel/initrd/udev/glibc/bash/perl)
[  341s] or the build host has a kernel or hardware problem...

gave up after 12 failed build attempts...

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-sip-connector in Debian_9.0/aarch64

2018-05-09 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-sip-connector/Debian_9.0/aarch64

Package network:osmocom:nightly/osmo-sip-connector failed to build in 
Debian_9.0/aarch64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-sip-connector

Last lines of build log:
[  334s] [  288.635974] dracut-initqueue[467]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  335s] [  289.341341] dracut-initqueue[467]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  335s] [  290.013001] dracut-initqueue[467]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  336s] [  290.725797] dracut-initqueue[467]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  337s] [  291.469633] dracut-initqueue[467]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  338s] [  292.308498] dracut-initqueue[467]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  338s] [  293.053594] dracut-initqueue[467]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  339s] [  293.793698] dracut-initqueue[467]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  340s] [  294.520236] dracut-initqueue[467]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  341s] [  295.339046] dracut-initqueue[467]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  341s] [  295.965900] dracut-initqueue[467]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  342s] [  296.645742] dracut-initqueue[467]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  343s] [  297.425038] dracut-initqueue[467]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  343s] [  298.067127] dracut-initqueue[467]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  344s] ### WATCHDOG TRIGGERED, KILLING VM ###
[  344s] [  298.729273] dracut-initqueue[467]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  345s] [  299.381340] dracut-initqueue[467]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  345s] [  299.997850] dracut-initqueue[467]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  346s] [  300.716520] dracut-initqueue[467]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  347s] [  301.419016] dracut-initqueue[467]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  347s] [  302.086701] dracut-initqueue[467]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  347s] /var/cache/obs/worker/root_23/root: 17469
[  347s] qemu-system-aarch64: terminating on signal 15 from pid 38856 (fuser)
[  348s] ### VM INTERACTION END ###
[  348s] /var/run/obs/worker/23/build/build-vm: line 458: kill: (17461) - No 
such process
[  348s] No buildstatus set, either the base system is broken 
(kernel/initrd/udev/glibc/bash/perl)
[  348s] or the build host has a kernel or hardware problem...

gave up after 12 failed build attempts...

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failed in Jenkins: master-osmo-pcu » master,osmocom-master-debian9,none,False #456

2018-05-09 Thread jenkins
See 


--
[...truncated 111.86 KB...]
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared 
libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared 
libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for pkg-config... /usr/bin/pkg-config
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.20... yes
checking for ANSI C header files... (cached) yes
checking for LIBOSMOCORE... yes
checking for LIBOSMOVTY... yes
checking for LIBOSMOGSM... yes
checking for LIBOSMOGB... yes
checking whether to enable direct DSP access for PDCH of sysmocom-bts... unset
checking whether to enable direct PHY access for PDCH of NuRAN Wireless 
Litecell 1.5 BTS... no
checking whether to enable VTY tests... no
CFLAGS="-g -O2 -fsanitize=address -fsanitize=undefined"
CPPFLAGS=" -fsanitize=address -fsanitize=undefined"
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating osmo-pcu.pc
config.status: creating include/Makefile
config.status: creating src/Makefile
config.status: creating examples/Makefile
config.status: creating tests/Makefile
config.status: creating Makefile
config.status: executing tests/atconfig commands
config.status: executing depfiles commands
config.status: executing libtool commands
make[1]: Entering directory 
'
Making all in include
make[2]: Entering directory 
'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory 
'
Making all in src
make[2]: Entering directory 
'
  CXX  gprs_debug.lo
  CXX  csn1.lo
  CXX  gsm_rlcmac.lo
  CXX  gprs_bssgp_pcu.lo
../../../src/gprs_bssgp_pcu.cpp:975:2: warning: #warning "This causes ASAN to 
complain. It is not critical for normal operation but should be fixed 
nevertheless" [-Wcpp]
 #warning "This causes ASAN to complain. It is not critical for normal 
operation but should be fixed nevertheless"
  ^~~
  CXX  gprs_rlcmac.lo
  CXX  gprs_rlcmac_sched.lo
  CXX  gprs_rlcmac_meas.lo
  CXX  gprs_rlcmac_ts_alloc.lo
  CXX  gprs_ms.lo
  CXX  gprs_ms_storage.lo
  CXX  gsm_timer.lo
  CXX  pcu_l1_if.lo
  CC   pcu_vty.lo
  CXX  pcu_vty_functions.lo
  CC   mslot_class.lo
  CXX  tbf.lo
  CXX  tbf_ul.lo
  CXX  tbf_dl.lo
  CXX  bts.lo
  CXX  pdch.lo
  CXX  poll_controller.lo
  CXX  encoding.lo
  CXX  sba.lo
  CXX  decoding.lo
  CXX  llc.lo
  CXX  rlc.lo
  CXX  osmobts_sock.lo
  CC   gprs_codel.lo
  CXX  gprs_coding_scheme.lo
  CXX  egprs_rlc_compression.lo
  CXXLDlibgprs.la
ar: `u' modifier ignored since `D' is the default (see `U')
  CXX  pcu_main.o
  CXXLDosmo-pcu
make[2]: Leaving directory 
'
Making all in examples
make[2]: Entering directory 
'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory 

Build failure of network:osmocom:nightly/osmo-pcap in Debian_9.0/aarch64

2018-05-09 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcap/Debian_9.0/aarch64

Package network:osmocom:nightly/osmo-pcap failed to build in Debian_9.0/aarch64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-pcap

Last lines of build log:
[  287s] [  255.533075] dracut-initqueue[474]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  288s] [  256.340462] dracut-initqueue[474]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  288s] [  256.981985] dracut-initqueue[474]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  289s] [  257.625105] dracut-initqueue[474]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  290s] [  258.463060] dracut-initqueue[474]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  290s] [  258.469300] dracut-initqueue[474]: Warning: Could not boot.
[  290s]  Starting Setup Virtual Console...
[  290s] [  OK  ] Started Setup Virtual Console.
[  290s]  Starting Dracut Emergency Shell...
[  290s] Warning: /dev/disk/by-uuid/00750419-b769-40be-aa7a-a81dca13c577 does 
not exist
[  290s] 
[  290s] Generating "/run/initramfs/rdsosreport.txt"
[  291s] 
[  291s] 
[  291s] Entering emergency mode. Exit the shell to continue.
[  291s] Type "journalctl" to view system logs.
[  291s] You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick 
or /boot
[  291s] after mounting them and attach it to a bug report.
[  291s] 
[  291s] 
[  340s] dracut:/# ### WATCHDOG TRIGGERED, KILLING VM ###
[  342s] /var/cache/obs/worker/root_18/root: 32805
[  342s] qemu-system-aarch64: terminating on signal 15 from pid 13428 (fuser)
[  342s] ### VM INTERACTION END ###
[  342s] /var/run/obs/worker/18/build/build-vm: line 458: kill: (32796) - No 
such process
[  342s] No buildstatus set, either the base system is broken 
(kernel/initrd/udev/glibc/bash/perl)
[  342s] or the build host has a kernel or hardware problem...

gave up after 12 failed build attempts...

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/libgtpnl in Debian_9.0/aarch64

2018-05-09 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libgtpnl/Debian_9.0/aarch64

Package network:osmocom:nightly/libgtpnl failed to build in Debian_9.0/aarch64

Check out the package for editing:
  osc checkout network:osmocom:nightly libgtpnl

Last lines of build log:
[  324s] [  267.684346] dracut-initqueue[465]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  325s] [  268.478254] dracut-initqueue[465]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  326s] [  269.303794] dracut-initqueue[465]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  327s] [  269.983236] dracut-initqueue[465]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  327s] [  270.641630] dracut-initqueue[465]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  327s] [  270.681803] dracut-initqueue[465]: Warning: Could not boot.
[  327s]  Starting Setup Virtual Console...
[  327s] [  OK  ] Started Setup Virtual Console.
[  328s]  Starting Dracut Emergency Shell...
[  328s] Warning: /dev/disk/by-uuid/00750419-b769-40be-aa7a-a81dca13c577 does 
not exist
[  328s] 
[  328s] Generating "/run/initramfs/rdsosreport.txt"
[  328s] 
[  328s] 
[  328s] Entering emergency mode. Exit the shell to continue.
[  328s] Type "journalctl" to view system logs.
[  328s] You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick 
or /boot
[  328s] after mounting them and attach it to a bug report.
[  328s] 
[  328s] 
[  362s] dracut:/# ### WATCHDOG TRIGGERED, KILLING VM ###
[  363s] /var/cache/obs/worker/root_26/root: 44500
[  363s] qemu-system-aarch64: terminating on signal 15 from pid 14171 ()
[  363s] ### VM INTERACTION END ###
[  363s] /var/run/obs/worker/26/build/build-vm: line 458: kill: (44488) - No 
such process
[  363s] No buildstatus set, either the base system is broken 
(kernel/initrd/udev/glibc/bash/perl)
[  363s] or the build host has a kernel or hardware problem...

gave up after 12 failed build attempts...

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-ggsn in Debian_9.0/aarch64

2018-05-09 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-ggsn/Debian_9.0/aarch64

Package network:osmocom:nightly/osmo-ggsn failed to build in Debian_9.0/aarch64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-ggsn

Last lines of build log:
[  322s] [  264.183107] dracut-initqueue[479]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  323s] [  264.875011] dracut-initqueue[479]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  324s] [  265.596644] dracut-initqueue[479]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  325s] [  266.487142] dracut-initqueue[479]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  325s] [  267.217708] dracut-initqueue[479]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  325s] [  267.224017] dracut-initqueue[479]: Warning: Could not boot.
[  325s]  Starting Setup Virtual Console...
[  325s] [  OK  ] Started Setup Virtual Console.
[  325s]  Starting Dracut Emergency Shell...
[  326s] Warning: /dev/disk/by-uuid/00750419-b769-40be-aa7a-a81dca13c577 does 
not exist
[  326s] 
[  326s] Generating "/run/initramfs/rdsosreport.txt"
[  326s] 
[  326s] 
[  326s] Entering emergency mode. Exit the shell to continue.
[  326s] Type "journalctl" to view system logs.
[  326s] You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick 
or /boot
[  326s] after mounting them and attach it to a bug report.
[  326s] 
[  326s] 
[  363s] dracut:/# ### WATCHDOG TRIGGERED, KILLING VM ###
[  364s] /var/cache/obs/worker/root_29/root: 26546
[  364s] qemu-system-aarch64: terminating on signal 15 from pid 542 ()
[  364s] ### VM INTERACTION END ###
[  364s] /var/run/obs/worker/29/build/build-vm: line 458: kill: (26539) - No 
such process
[  364s] No buildstatus set, either the base system is broken 
(kernel/initrd/udev/glibc/bash/perl)
[  364s] or the build host has a kernel or hardware problem...

gave up after 12 failed build attempts...

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/libosmo-abis in Debian_9.0/aarch64

2018-05-09 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmo-abis/Debian_9.0/aarch64

Package network:osmocom:nightly/libosmo-abis failed to build in 
Debian_9.0/aarch64

Check out the package for editing:
  osc checkout network:osmocom:nightly libosmo-abis

Last lines of build log:
[  319s] [  269.610380] dracut-initqueue[459]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  319s] [  270.247706] dracut-initqueue[459]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  320s] [  271.014869] dracut-initqueue[459]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  321s] [  271.681245] dracut-initqueue[459]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  322s] [  272.376867] dracut-initqueue[459]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  322s] [  272.403541] dracut-initqueue[459]: Warning: Could not boot.
[  322s]  Starting Setup Virtual Console...
[  322s] [  OK  ] Started Setup Virtual Console.
[  322s]  Starting Dracut Emergency Shell...
[  322s] Warning: /dev/disk/by-uuid/00750419-b769-40be-aa7a-a81dca13c577 does 
not exist
[  322s] 
[  322s] Generating "/run/initramfs/rdsosreport.txt"
[  322s] 
[  322s] 
[  322s] Entering emergency mode. Exit the shell to continue.
[  322s] Type "journalctl" to view system logs.
[  322s] You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick 
or /boot
[  322s] after mounting them and attach it to a bug report.
[  322s] 
[  322s] 
[  358s] dracut:/# ### WATCHDOG TRIGGERED, KILLING VM ###
[  359s] /var/cache/obs/worker/root_8/root:  2198
[  359s] qemu-system-aarch64: terminating on signal 15 from pid 24908 ()
[  359s] ### VM INTERACTION END ###
[  359s] /var/run/obs/worker/8/build/build-vm: line 458: kill: (2183) - No such 
process
[  359s] No buildstatus set, either the base system is broken 
(kernel/initrd/udev/glibc/bash/perl)
[  359s] or the build host has a kernel or hardware problem...

gave up after 12 failed build attempts...

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failed in Jenkins: master-rtl-sdr » a1=default,a2=default,a3=default,osmocom-master-debian9 #29

2018-05-09 Thread jenkins
See 


--
[...truncated 93.29 KB...]
make[2]: Nothing to be done for 'dvi'.
make[2]: Leaving directory 
'
Making dvi in src
make[2]: Entering directory 
'
make[2]: Nothing to be done for 'dvi'.
make[2]: Leaving directory 
'
make[2]: Entering directory 
'
make[2]: Nothing to be done for 'dvi-am'.
make[2]: Leaving directory 
'
make[1]: Leaving directory 
'
make[1]: Entering directory 
'
make  check-recursive
make[2]: Entering directory 
'
Making check in include
make[3]: Entering directory 
'
make[3]: Nothing to be done for 'check'.
make[3]: Leaving directory 
'
Making check in src
make[3]: Entering directory 
'
make[3]: Nothing to be done for 'check'.
make[3]: Leaving directory 
'
make[3]: Entering directory 
'
make[3]: Leaving directory 
'
make[2]: Leaving directory 
'
make[1]: Leaving directory 
'
make[1]: Entering directory 
'
make  install-recursive
make[2]: Entering directory 
'
Making install in include
make[3]: Entering directory 
'
make[4]: Entering directory 
'
make[4]: Nothing to be done for 'install-exec-am'.
 /bin/mkdir -p 
'
 /usr/bin/install -c -m 644 ../../../include/rtl-sdr.h 
../../../include/rtl-sdr_export.h 
'
make[4]: Leaving directory 

Build failure of network:osmocom:nightly/libusrp in Debian_9.0/aarch64

2018-05-09 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libusrp/Debian_9.0/aarch64

Package network:osmocom:nightly/libusrp failed to build in Debian_9.0/aarch64

Check out the package for editing:
  osc checkout network:osmocom:nightly libusrp

Last lines of build log:
[  335s] [  266.898583] dracut-initqueue[485]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  335s] [  267.656998] dracut-initqueue[485]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  336s] [  268.345881] dracut-initqueue[485]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  337s] [  268.985856] dracut-initqueue[485]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  337s] [  269.695803] dracut-initqueue[485]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  337s] [  269.722355] dracut-initqueue[485]: Warning: Could not boot.
[  338s]  Starting Setup Virtual Console...
[  338s] [  OK  ] Started Setup Virtual Console.
[  338s]  Starting Dracut Emergency Shell...
[  338s] Warning: /dev/disk/by-uuid/00750419-b769-40be-aa7a-a81dca13c577 does 
not exist
[  338s] 
[  338s] Generating "/run/initramfs/rdsosreport.txt"
[  338s] 
[  338s] 
[  338s] Entering emergency mode. Exit the shell to continue.
[  338s] Type "journalctl" to view system logs.
[  338s] You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick 
or /boot
[  338s] after mounting them and attach it to a bug report.
[  338s] 
[  338s] 
[  372s] dracut:/# ### WATCHDOG TRIGGERED, KILLING VM ###
[  373s] /var/cache/obs/worker/root_3/root: 44876
[  373s] qemu-system-aarch64: terminating on signal 15 from pid 21417 ()
[  373s] ### VM INTERACTION END ###
[  373s] /var/run/obs/worker/3/build/build-vm: line 458: kill: (44868) - No 
such process
[  373s] No buildstatus set, either the base system is broken 
(kernel/initrd/udev/glibc/bash/perl)
[  373s] or the build host has a kernel or hardware problem...

gave up after 12 failed build attempts...

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/libasn1c in Debian_9.0/aarch64

2018-05-09 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libasn1c/Debian_9.0/aarch64

Package network:osmocom:nightly/libasn1c failed to build in Debian_9.0/aarch64

Check out the package for editing:
  osc checkout network:osmocom:nightly libasn1c

Last lines of build log:
[  269s] [  245.774908] dracut-initqueue[458]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  269s] [  246.425587] dracut-initqueue[458]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  270s] [  247.104955] dracut-initqueue[458]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  271s] [  247.735725] dracut-initqueue[458]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  271s] [  248.404882] dracut-initqueue[458]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  271s] [  248.411640] dracut-initqueue[458]: Warning: Could not boot.
[  271s]  Starting Setup Virtual Console...
[  271s] [  OK  ] Started Setup Virtual Console.
[  271s]  Starting Dracut Emergency Shell...
[  271s] Warning: /dev/disk/by-uuid/00750419-b769-40be-aa7a-a81dca13c577 does 
not exist
[  271s] 
[  271s] Generating "/run/initramfs/rdsosreport.txt"
[  272s] 
[  272s] 
[  272s] Entering emergency mode. Exit the shell to continue.
[  272s] Type "journalctl" to view system logs.
[  272s] You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick 
or /boot
[  272s] after mounting them and attach it to a bug report.
[  272s] 
[  272s] 
[  328s] dracut:/# ### WATCHDOG TRIGGERED, KILLING VM ###
[  328s] /var/cache/obs/worker/root_16/root: 44466
[  328s] qemu-system-aarch64: terminating on signal 15 from pid 10476 ()
[  328s] ### VM INTERACTION END ###
[  328s] /var/run/obs/worker/16/build/build-vm: line 458: kill: (44459) - No 
such process
[  328s] No buildstatus set, either the base system is broken 
(kernel/initrd/udev/glibc/bash/perl)
[  328s] or the build host has a kernel or hardware problem...

gave up after 11 failed build attempts...

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/libsmpp34 in Debian_9.0/aarch64

2018-05-09 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libsmpp34/Debian_9.0/aarch64

Package network:osmocom:nightly/libsmpp34 failed to build in Debian_9.0/aarch64

Check out the package for editing:
  osc checkout network:osmocom:nightly libsmpp34

Last lines of build log:
[  332s] [  268.399406] dracut-initqueue[485]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  333s] [  269.093605] dracut-initqueue[485]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  334s] [  269.847551] dracut-initqueue[485]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  334s] [  270.622045] dracut-initqueue[485]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  335s] [  271.386153] dracut-initqueue[485]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  335s] [  271.394964] dracut-initqueue[485]: Warning: Could not boot.
[  335s]  Starting Setup Virtual Console...
[  335s] [  OK  ] Started Setup Virtual Console.
[  335s]  Starting Dracut Emergency Shell...
[  335s] Warning: /dev/disk/by-uuid/00750419-b769-40be-aa7a-a81dca13c577 does 
not exist
[  335s] 
[  335s] Generating "/run/initramfs/rdsosreport.txt"
[  336s] 
[  336s] 
[  336s] Entering emergency mode. Exit the shell to continue.
[  336s] Type "journalctl" to view system logs.
[  336s] You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick 
or /boot
[  336s] after mounting them and attach it to a bug report.
[  336s] 
[  336s] 
[  368s] dracut:/# ### WATCHDOG TRIGGERED, KILLING VM ###
[  370s] /var/cache/obs/worker/root_15/root: 44611
[  370s] qemu-system-aarch64: terminating on signal 15 from pid 17612 (fuser)
[  370s] ### VM INTERACTION END ###
[  370s] /var/run/obs/worker/15/build/build-vm: line 458: kill: (44596) - No 
such process
[  370s] No buildstatus set, either the base system is broken 
(kernel/initrd/udev/glibc/bash/perl)
[  370s] or the build host has a kernel or hardware problem...

gave up after 12 failed build attempts...

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/libosmocore in Debian_9.0/aarch64

2018-05-09 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/Debian_9.0/aarch64

Package network:osmocom:nightly/libosmocore failed to build in 
Debian_9.0/aarch64

Check out the package for editing:
  osc checkout network:osmocom:nightly libosmocore

Last lines of build log:
[  329s] [  265.972907] dracut-initqueue[455]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  330s] [  266.704919] dracut-initqueue[455]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  331s] [  267.411708] dracut-initqueue[455]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  331s] [  268.176277] dracut-initqueue[455]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  332s] [  268.916897] dracut-initqueue[455]: Warning: dracut-initqueue 
timeout - starting timeout scripts
[  332s] [  268.950824] dracut-initqueue[455]: Warning: Could not boot.
[  332s]  Starting Setup Virtual Console...
[  332s] [  OK  ] Started Setup Virtual Console.
[  332s]  Starting Dracut Emergency Shell...
[  332s] Warning: /dev/disk/by-uuid/00750419-b769-40be-aa7a-a81dca13c577 does 
not exist
[  332s] 
[  332s] Generating "/run/initramfs/rdsosreport.txt"
[  333s] 
[  333s] 
[  333s] Entering emergency mode. Exit the shell to continue.
[  333s] Type "journalctl" to view system logs.
[  333s] You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick 
or /boot
[  333s] after mounting them and attach it to a bug report.
[  333s] 
[  333s] 
[  367s] dracut:/# ### WATCHDOG TRIGGERED, KILLING VM ###
[  369s] /var/cache/obs/worker/root_24/root: 32525
[  369s] qemu-system-aarch64: terminating on signal 15 from pid 6657 ()
[  369s] ### VM INTERACTION END ###
[  369s] /var/run/obs/worker/24/build/build-vm: line 458: kill: (32516) - No 
such process
[  369s] No buildstatus set, either the base system is broken 
(kernel/initrd/udev/glibc/bash/perl)
[  369s] or the build host has a kernel or hardware problem...

gave up after 12 failed build attempts...

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


[MERGED] osmo-bts[master]: osmo-bts-trx: Enable A5/3 cipher support

2018-05-09 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: osmo-bts-trx: Enable A5/3 cipher support
..


osmo-bts-trx: Enable A5/3 cipher support

This actually should have been working since 2015, when the following
patch was merged to libosmcore:

commit f8699ca51eeb4f3d34336501abcaf071b4a95a47
Author: Max 
Date:   Wed Mar 25 17:20:31 2015 +0100

gsm: Add A5/3-4 cipher support

however, it seems nobody so far bothered to actually enable A5/3 for
osmo-bts-trx!

Change-Id: I8192d6d07cdb87783bce997456ead673c600f7c0
Closes: OS#3253
---
M src/osmo-bts-trx/main.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo-bts-trx/main.c b/src/osmo-bts-trx/main.c
index 6e5a4ca..3b82e42 100644
--- a/src/osmo-bts-trx/main.c
+++ b/src/osmo-bts-trx/main.c
@@ -98,7 +98,7 @@
 int bts_model_init(struct gsm_bts *bts)
 {
bts->variant = BTS_OSMO_TRX;
-   bts->support.ciphers = CIPHER_A5(1) | CIPHER_A5(2);
+   bts->support.ciphers = CIPHER_A5(1) | CIPHER_A5(2) | CIPHER_A5(3);
 
/* FIXME: this needs to be overridden with the real hardrware
 * value */

-- 
To view, visit https://gerrit.osmocom.org/8094
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8192d6d07cdb87783bce997456ead673c600f7c0
Gerrit-PatchSet: 4
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-bts[master]: rsl: If CHAN ACT or MODE MODIF fails, send respective NACK

2018-05-09 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: rsl: If CHAN ACT or MODE MODIF fails, send respective NACK
..


rsl: If CHAN ACT or MODE MODIF fails, send respective NACK

The existign code only sent an ERROR REPORT, but it failed to actually
send a proper NACK to the related request.  This is confusing, as the
operation should always be ACKed or NACKed, and not simply result in no
response.

Change-Id: Ic374a8e5e239ffe37082a54cdb94cb6ac9723e83
Closes: OS#3254
---
M src/common/rsl.c
1 file changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/common/rsl.c b/src/common/rsl.c
index 4d8279c..5dd2c59 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1032,8 +1032,8 @@
const uint8_t *val = TLVP_VAL(, RSL_IE_ENCR_INFO);
 
if (encr_info2lchan(lchan, val, len) < 0) {
-return rsl_tx_error_report(msg->trx, 
RSL_ERR_IE_CONTENT,
-   >chan_nr, NULL, msg);
+   rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT, 
>chan_nr, NULL, msg);
+   return rsl_tx_chan_act_acknack(lchan, 
RSL_ERR_ENCR_UNIMPL);
}
} else
memset(>encr, 0, sizeof(lchan->encr));
@@ -1476,8 +1476,8 @@
const uint8_t *val = TLVP_VAL(, RSL_IE_ENCR_INFO);
 
if (encr_info2lchan(lchan, val, len) < 0) {
-return rsl_tx_error_report(msg->trx, 
RSL_ERR_IE_CONTENT, >chan_nr,
-   NULL, msg);
+   rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT, 
>chan_nr, NULL, msg);
+   return rsl_tx_mode_modif_nack(lchan, 
RSL_ERR_ENCR_UNIMPL);
}
}
 

-- 
To view, visit https://gerrit.osmocom.org/8092
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic374a8e5e239ffe37082a54cdb94cb6ac9723e83
Gerrit-PatchSet: 3
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-bts[master]: rsl: Properly NACK CHAN_ACKT / MODE_MODIFY

2018-05-09 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: rsl: Properly NACK CHAN_ACKT / MODE_MODIFY
..


rsl: Properly NACK CHAN_ACKT / MODE_MODIFY

Whenever we encounter an error condition during processing of RSL CHAN
ACT or RSL MODE MODIFY, it's insufficient to simply send an RSL ERROR
INDICATION, but we also must send a proper NACK back to the BSC.

Change-Id: I4dd7ff2fd2cdbc6e892cd329c826ac1bc3b16bb9
---
M src/common/rsl.c
1 file changed, 17 insertions(+), 13 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/common/rsl.c b/src/common/rsl.c
index f5c153a..4d8279c 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1076,15 +1076,17 @@
uint8_t osmo_si;
 
if (!OSMO_IN_ARRAY(rsl_si, rsl_sacch_sitypes)) {
-   return rsl_tx_error_report(msg->trx, 
RSL_ERR_IE_CONTENT,
-  >chan_nr, NULL, 
msg);
+   rsl_tx_error_report(msg->trx, 
RSL_ERR_IE_CONTENT,
+   >chan_nr, NULL, msg);
+   return rsl_tx_chan_act_acknack(lchan, 
RSL_ERR_IE_CONTENT);
}
 
osmo_si = osmo_rsl2sitype(rsl_si);
if (osmo_si == SYSINFO_TYPE_NONE) {
LOGP(DRSL, LOGL_NOTICE, " Rx SACCH SI 0x%02x 
not supported.\n", rsl_si);
-   return rsl_tx_error_report(msg->trx, 
RSL_ERR_IE_CONTENT, >chan_nr,
-  NULL, msg);
+   rsl_tx_error_report(msg->trx, 
RSL_ERR_IE_CONTENT, >chan_nr,
+   NULL, msg);
+   return rsl_tx_chan_act_acknack(lchan, 
RSL_ERR_IE_CONTENT);
}
 
lapdm_ui_prefix_lchan(lchan, cur, osmo_si, si_len);
@@ -1092,8 +1094,9 @@
cur += si_len;
if (cur >= val + tot_len) {
LOGP(DRSL, LOGL_ERROR, "Error parsing SACCH 
INFO IE\n");
-   return rsl_tx_error_report(msg->trx, 
RSL_ERR_IE_CONTENT, >chan_nr,
-  NULL, msg);
+   rsl_tx_error_report(msg->trx, 
RSL_ERR_IE_CONTENT, >chan_nr,
+   NULL, msg);
+   return rsl_tx_chan_act_acknack(lchan, 
RSL_ERR_IE_CONTENT);
}
}
} else {
@@ -1104,8 +1107,8 @@
if (TLVP_PRESENT(, RSL_IE_MR_CONFIG)) {
if (TLVP_LEN(, RSL_IE_MR_CONFIG) > sizeof(lchan->mr_bts_lv) 
- 1) {
LOGP(DRSL, LOGL_ERROR, "Error parsing MultiRate conf 
IE\n");
-   return rsl_tx_error_report(msg->trx, 
RSL_ERR_IE_CONTENT, >chan_nr,
-  NULL, msg);
+   rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT, 
>chan_nr, NULL, msg);
+   return rsl_tx_chan_act_acknack(lchan, 
RSL_ERR_IE_CONTENT);
}
memcpy(lchan->mr_bts_lv, TLVP_VAL(, RSL_IE_MR_CONFIG) - 1,
   TLVP_LEN(, RSL_IE_MR_CONFIG) + 1);
@@ -1161,9 +1164,10 @@
   gsm_ts_and_pchan_name(ts));
rc = 0;
}
-   if (rc)
-   return rsl_tx_error_report(msg->trx, 
RSL_ERR_NORMAL_UNSPEC, >chan_nr,
-  NULL, msg);
+   if (rc) {
+   rsl_tx_error_report(msg->trx, RSL_ERR_NORMAL_UNSPEC, 
>chan_nr, NULL, msg);
+   return rsl_tx_chan_act_acknack(lchan, 
RSL_ERR_NORMAL_UNSPEC);
+   }
return 0;
}
 
@@ -1483,8 +1487,8 @@
if (TLVP_PRESENT(, RSL_IE_MR_CONFIG)) {
if (TLVP_LEN(, RSL_IE_MR_CONFIG) > sizeof(lchan->mr_bts_lv) 
- 1) {
LOGP(DRSL, LOGL_ERROR, "Error parsing MultiRate conf 
IE\n");
-   return rsl_tx_error_report(msg->trx, 
RSL_ERR_IE_CONTENT, >chan_nr,
-  NULL, msg);
+   rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT, 
>chan_nr, NULL, msg);
+   return rsl_tx_mode_modif_nack(lchan, 
RSL_ERR_IE_CONTENT);;
}
memcpy(lchan->mr_bts_lv, TLVP_VAL(, RSL_IE_MR_CONFIG) - 1,
TLVP_LEN(, RSL_IE_MR_CONFIG) + 1);

-- 
To view, visit https://gerrit.osmocom.org/8093
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: 

[MERGED] osmo-bts[master]: rsl: Make channel activation fail if encryption algorithm no...

2018-05-09 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: rsl: Make channel activation fail if encryption algorithm not 
supported
..


rsl: Make channel activation fail if encryption algorithm not supported

The code actually always *wanted* to make lchan activation fail in
case we don't support the algorithm, but it failed ot do so.

The problem is encr_info2lchan() which uses bts_supports_cipher() to
determine if the cipher is supported. However, if bts_supports_cipher()
returns 0 (not supported), it uses this value as return value of
encr_info2lchan() where '0' means success (standard osmocom convention).
This results in channel activation proceeding, which it shouldn't.

Change-Id: I46275b8fc2a1a74f68b4cc60e0f64ba226b108cd
Related: OS#3254
---
M src/common/rsl.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/common/rsl.c b/src/common/rsl.c
index 229d960..f5c153a 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -871,7 +871,7 @@
if (rc != 1) {
LOGP(DRSL, LOGL_ERROR, "%s: BTS doesn't support cipher 
0x%02x\n",
gsm_lchan_name(lchan), *val);
-   return rc;
+   return -EINVAL;
}
 
/* length can be '1' in case of no ciphering */

-- 
To view, visit https://gerrit.osmocom.org/8091
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I46275b8fc2a1a74f68b4cc60e0f64ba226b108cd
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-bts[master]: rsl: log errors when parsing of encryption information fails

2018-05-09 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: rsl: log errors when parsing of  encryption information fails
..


rsl: log errors when parsing of  encryption information fails

... also log a DEBUG message whenever we change the lchan->encr

Related: OS#3254
Change-Id: Icda7722eef319f343178b0bb8f79362026948199
---
M src/common/rsl.c
1 file changed, 10 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/common/rsl.c b/src/common/rsl.c
index 8a1a232..229d960 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -868,18 +868,26 @@
 
/* check if the encryption algorithm sent by BSC is supported! */
rc = bts_supports_cipher(bts, *val);
-   if (rc != 1)
+   if (rc != 1) {
+   LOGP(DRSL, LOGL_ERROR, "%s: BTS doesn't support cipher 
0x%02x\n",
+   gsm_lchan_name(lchan), *val);
return rc;
+   }
 
/* length can be '1' in case of no ciphering */
-   if (len < 1)
+   if (len < 1) {
+   LOGP(DRSL, LOGL_ERROR, "%s: Encryption Info cannot have 
len=%d\n",
+   gsm_lchan_name(lchan), len);
return -EINVAL;
+   }
 
lchan->encr.alg_id = *val++;
lchan->encr.key_len = len -1;
if (lchan->encr.key_len > sizeof(lchan->encr.key))
lchan->encr.key_len = sizeof(lchan->encr.key);
memcpy(lchan->encr.key, val, lchan->encr.key_len);
+   DEBUGP(DRSL, "%s: Setting lchan cipher algorithm 0x%02x\n",
+   gsm_lchan_name(lchan), lchan->encr.alg_id);
 
return 0;
 }

-- 
To view, visit https://gerrit.osmocom.org/8090
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icda7722eef319f343178b0bb8f79362026948199
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-bts[master]: rsl: Make channel activation fail if encryption algorithm no...

2018-05-09 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/8091
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I46275b8fc2a1a74f68b4cc60e0f64ba226b108cd
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-bts[master]: rsl: Properly NACK CHAN_ACKT / MODE_MODIFY

2018-05-09 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/8093
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4dd7ff2fd2cdbc6e892cd329c826ac1bc3b16bb9
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-bts[master]: osmo-bts-trx: Enable A5/3 cipher support

2018-05-09 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/8094
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8192d6d07cdb87783bce997456ead673c600f7c0
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-bts[master]: FIX REL_IND merge mismatch

2018-05-09 Thread Harald Welte

Patch Set 6: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6966
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I823c9101bcca72d5792e16379b02d3602ffc2726
Gerrit-PatchSet: 6
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-bts[master]: rsl: If CHAN ACT or MODE MODIF fails, send respective NACK

2018-05-09 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/8092
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic374a8e5e239ffe37082a54cdb94cb6ac9723e83
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-bts[master]: rsl: log errors when parsing of encryption information fails

2018-05-09 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/8090
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icda7722eef319f343178b0bb8f79362026948199
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[PATCH] osmo-bts[master]: osmo-bts-trx: Enable A5/3 cipher support

2018-05-09 Thread Harald Welte

Review at  https://gerrit.osmocom.org/8094

osmo-bts-trx: Enable A5/3 cipher support

This actually should have been working since 2015, when the following
patch was merged to libosmcore:

commit f8699ca51eeb4f3d34336501abcaf071b4a95a47
Author: Max 
Date:   Wed Mar 25 17:20:31 2015 +0100

gsm: Add A5/3-4 cipher support

however, it seems nobody so far bothered to actually enable A5/3 for
osmo-bts-trx!

Change-Id: I8192d6d07cdb87783bce997456ead673c600f7c0
Closes: OS#3253
---
M src/osmo-bts-trx/main.c
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/src/osmo-bts-trx/main.c b/src/osmo-bts-trx/main.c
index 6e5a4ca..3b82e42 100644
--- a/src/osmo-bts-trx/main.c
+++ b/src/osmo-bts-trx/main.c
@@ -98,7 +98,7 @@
 int bts_model_init(struct gsm_bts *bts)
 {
bts->variant = BTS_OSMO_TRX;
-   bts->support.ciphers = CIPHER_A5(1) | CIPHER_A5(2);
+   bts->support.ciphers = CIPHER_A5(1) | CIPHER_A5(2) | CIPHER_A5(3);
 
/* FIXME: this needs to be overridden with the real hardrware
 * value */

-- 
To view, visit https://gerrit.osmocom.org/8094
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8192d6d07cdb87783bce997456ead673c600f7c0
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[PATCH] osmo-bts[master]: rsl: Properly NACK CHAN_ACKT / MODE_MODIFY

2018-05-09 Thread Harald Welte

Review at  https://gerrit.osmocom.org/8093

rsl: Properly NACK CHAN_ACKT / MODE_MODIFY

Whenever we encounter an error condition during processing of RSL CHAN
ACT or RSL MODE MODIFY, it's insufficient to simply send an RSL ERROR
INDICATION, but we also must send a proper NACK back to the BSC.

Change-Id: I4dd7ff2fd2cdbc6e892cd329c826ac1bc3b16bb9
---
M src/common/rsl.c
1 file changed, 17 insertions(+), 13 deletions(-)


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

diff --git a/src/common/rsl.c b/src/common/rsl.c
index 6fc3ac8..1a97c5d 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1005,15 +1005,17 @@
uint8_t osmo_si;
 
if (!OSMO_IN_ARRAY(rsl_si, rsl_sacch_sitypes)) {
-   return rsl_tx_error_report(msg->trx, 
RSL_ERR_IE_CONTENT,
-  >chan_nr, NULL, 
msg);
+   rsl_tx_error_report(msg->trx, 
RSL_ERR_IE_CONTENT,
+   >chan_nr, NULL, msg);
+   return rsl_tx_chan_act_acknack(lchan, 
RSL_ERR_IE_CONTENT);
}
 
osmo_si = osmo_rsl2sitype(rsl_si);
if (osmo_si == SYSINFO_TYPE_NONE) {
LOGP(DRSL, LOGL_NOTICE, " Rx SACCH SI 0x%02x 
not supported.\n", rsl_si);
-   return rsl_tx_error_report(msg->trx, 
RSL_ERR_IE_CONTENT, >chan_nr,
-  NULL, msg);
+   rsl_tx_error_report(msg->trx, 
RSL_ERR_IE_CONTENT, >chan_nr,
+   NULL, msg);
+   return rsl_tx_chan_act_acknack(lchan, 
RSL_ERR_IE_CONTENT);
}
 
lapdm_ui_prefix_lchan(lchan, cur, osmo_si, si_len);
@@ -1021,8 +1023,9 @@
cur += si_len;
if (cur >= val + tot_len) {
LOGP(DRSL, LOGL_ERROR, "Error parsing SACCH 
INFO IE\n");
-   return rsl_tx_error_report(msg->trx, 
RSL_ERR_IE_CONTENT, >chan_nr,
-  NULL, msg);
+   rsl_tx_error_report(msg->trx, 
RSL_ERR_IE_CONTENT, >chan_nr,
+   NULL, msg);
+   return rsl_tx_chan_act_acknack(lchan, 
RSL_ERR_IE_CONTENT);
}
}
} else {
@@ -1033,8 +1036,8 @@
if (TLVP_PRESENT(, RSL_IE_MR_CONFIG)) {
if (TLVP_LEN(, RSL_IE_MR_CONFIG) > sizeof(lchan->mr_bts_lv) 
- 1) {
LOGP(DRSL, LOGL_ERROR, "Error parsing MultiRate conf 
IE\n");
-   return rsl_tx_error_report(msg->trx, 
RSL_ERR_IE_CONTENT, >chan_nr,
-  NULL, msg);
+   rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT, 
>chan_nr, NULL, msg);
+   return rsl_tx_chan_act_acknack(lchan, 
RSL_ERR_IE_CONTENT);
}
memcpy(lchan->mr_bts_lv, TLVP_VAL(, RSL_IE_MR_CONFIG) - 1,
   TLVP_LEN(, RSL_IE_MR_CONFIG) + 1);
@@ -1090,9 +1093,10 @@
   gsm_ts_and_pchan_name(ts));
rc = 0;
}
-   if (rc)
-   return rsl_tx_error_report(msg->trx, 
RSL_ERR_NORMAL_UNSPEC, >chan_nr,
-  NULL, msg);
+   if (rc) {
+   rsl_tx_error_report(msg->trx, RSL_ERR_NORMAL_UNSPEC, 
>chan_nr, NULL, msg);
+   return rsl_tx_chan_act_acknack(lchan, 
RSL_ERR_NORMAL_UNSPEC);
+   }
return 0;
}
 
@@ -1398,8 +1402,8 @@
if (TLVP_PRESENT(, RSL_IE_MR_CONFIG)) {
if (TLVP_LEN(, RSL_IE_MR_CONFIG) > sizeof(lchan->mr_bts_lv) 
- 1) {
LOGP(DRSL, LOGL_ERROR, "Error parsing MultiRate conf 
IE\n");
-   return rsl_tx_error_report(msg->trx, 
RSL_ERR_IE_CONTENT, >chan_nr,
-  NULL, msg);
+   rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT, 
>chan_nr, NULL, msg);
+   return rsl_tx_mode_modif_nack(lchan, 
RSL_ERR_IE_CONTENT);;
}
memcpy(lchan->mr_bts_lv, TLVP_VAL(, RSL_IE_MR_CONFIG) - 1,
TLVP_LEN(, RSL_IE_MR_CONFIG) + 1);

-- 
To view, visit https://gerrit.osmocom.org/8093
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4dd7ff2fd2cdbc6e892cd329c826ac1bc3b16bb9
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 

[PATCH] osmo-bts[master]: rsl: Make channel activation fail if encryption algorithm no...

2018-05-09 Thread Harald Welte

Review at  https://gerrit.osmocom.org/8091

rsl: Make channel activation fail if encryption algorithm not supported

The code actually always *wanted* to make lchan activation fail in
case we don't support the algorithm, but it failed ot do so.

The problem is encr_info2lchan() which uses bts_supports_cipher() to
determine if the cipher is supported. However, if bts_supports_cipher()
returns 0 (not supported), it uses this value as return value of
encr_info2lchan() where '0' means success (standard osmocom convention).
This results in channel activation proceeding, which it shouldn't.

Change-Id: I46275b8fc2a1a74f68b4cc60e0f64ba226b108cd
Related: OS#3254
---
M src/common/rsl.c
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/src/common/rsl.c b/src/common/rsl.c
index f50c1d2..23778b7 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -824,7 +824,7 @@
if (rc != 1) {
LOGP(DRSL, LOGL_ERROR, "%s: BTS doesn't support cipher 
0x%02x\n",
gsm_lchan_name(lchan), *val);
-   return rc;
+   return -EINVAL;
}
 
/* length can be '1' in case of no ciphering */

-- 
To view, visit https://gerrit.osmocom.org/8091
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I46275b8fc2a1a74f68b4cc60e0f64ba226b108cd
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[PATCH] osmo-bts[master]: rsl: log errors when parsing of encryption information fails

2018-05-09 Thread Harald Welte

Review at  https://gerrit.osmocom.org/8090

rsl: log errors when parsing of  encryption information fails

... also log a DEBUG message whenever we change the lchan->encr

Related: OS#3254
Change-Id: Icda7722eef319f343178b0bb8f79362026948199
---
M src/common/rsl.c
1 file changed, 10 insertions(+), 2 deletions(-)


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

diff --git a/src/common/rsl.c b/src/common/rsl.c
index 9adb89a..f50c1d2 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -821,18 +821,26 @@
 
/* check if the encryption algorithm sent by BSC is supported! */
rc = bts_supports_cipher(bts, *val);
-   if (rc != 1)
+   if (rc != 1) {
+   LOGP(DRSL, LOGL_ERROR, "%s: BTS doesn't support cipher 
0x%02x\n",
+   gsm_lchan_name(lchan), *val);
return rc;
+   }
 
/* length can be '1' in case of no ciphering */
-   if (len < 1)
+   if (len < 1) {
+   LOGP(DRSL, LOGL_ERROR, "%s: Encryption Info cannot have 
len=%d\n",
+   gsm_lchan_name(lchan), len);
return -EINVAL;
+   }
 
lchan->encr.alg_id = *val++;
lchan->encr.key_len = len -1;
if (lchan->encr.key_len > sizeof(lchan->encr.key))
lchan->encr.key_len = sizeof(lchan->encr.key);
memcpy(lchan->encr.key, val, lchan->encr.key_len);
+   DEBUGP(DRSL, "%s: Setting lchan cipher algorithm 0x%02x\n",
+   gsm_lchan_name(lchan), lchan->encr.alg_id);
 
return 0;
 }

-- 
To view, visit https://gerrit.osmocom.org/8090
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icda7722eef319f343178b0bb8f79362026948199
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[PATCH] osmo-bts[master]: rsl: If CHAN ACT or MODE MODIF fails, send respective NACK

2018-05-09 Thread Harald Welte

Review at  https://gerrit.osmocom.org/8092

rsl: If CHAN ACT or MODE MODIF fails, send respective NACK

The existign code only sent an ERROR REPORT, but it failed to actually
send a proper NACK to the related request.  This is confusing, as the
operation should always be ACKed or NACKed, and not simply result in no
response.

Change-Id: Ic374a8e5e239ffe37082a54cdb94cb6ac9723e83
Closes: OS#3254
---
M src/common/rsl.c
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/src/common/rsl.c b/src/common/rsl.c
index 23778b7..6fc3ac8 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -961,8 +961,8 @@
const uint8_t *val = TLVP_VAL(, RSL_IE_ENCR_INFO);
 
if (encr_info2lchan(lchan, val, len) < 0) {
-return rsl_tx_error_report(msg->trx, 
RSL_ERR_IE_CONTENT,
-   >chan_nr, NULL, msg);
+   rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT, 
>chan_nr, NULL, msg);
+   return rsl_tx_chan_act_acknack(lchan, 
RSL_ERR_ENCR_UNIMPL);
}
} else
memset(>encr, 0, sizeof(lchan->encr));
@@ -1387,8 +1387,8 @@
const uint8_t *val = TLVP_VAL(, RSL_IE_ENCR_INFO);
 
if (encr_info2lchan(lchan, val, len) < 0) {
-return rsl_tx_error_report(msg->trx, 
RSL_ERR_IE_CONTENT, >chan_nr,
-   NULL, msg);
+   rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT, 
>chan_nr, NULL, msg);
+   return rsl_tx_mode_modif_nack(lchan, 
RSL_ERR_ENCR_UNIMPL);
}
}
 

-- 
To view, visit https://gerrit.osmocom.org/8092
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic374a8e5e239ffe37082a54cdb94cb6ac9723e83
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


osmo-ggsn[master]: ggsn_vty.c: fix: use CONFIG_NODE as parent by default

2018-05-09 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/8089
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I65be7910dc46166caa34a0984a6763e1477dec99
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-ggsn[master]: ggsn_vty.c: fix: use CONFIG_NODE as parent by default

2018-05-09 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: ggsn_vty.c: fix: use CONFIG_NODE as parent by default
..


ggsn_vty.c: fix: use CONFIG_NODE as parent by default

There are some configuration nodes, which are handled by extenral
libraries, such as libosmoctrl. So, when switching back to the
parent node, this should be kept in mind.

Change-Id: I65be7910dc46166caa34a0984a6763e1477dec99
---
M ggsn/ggsn_vty.c
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/ggsn/ggsn_vty.c b/ggsn/ggsn_vty.c
index 6ddfc0d..53f4ebf 100644
--- a/ggsn/ggsn_vty.c
+++ b/ggsn/ggsn_vty.c
@@ -948,6 +948,10 @@
vty->index_sub = >ggsn->cfg.description;
}
break;
+   default:
+   vty->node = CONFIG_NODE;
+   vty->index = NULL;
+   vty->index_sub = NULL;
}
 
return vty->node;

-- 
To view, visit https://gerrit.osmocom.org/8089
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I65be7910dc46166caa34a0984a6763e1477dec99
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: bts (RLL): DCCH/SAPI0 LAPDm without contention resolution is...

2018-05-09 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: bts (RLL): DCCH/SAPI0 LAPDm without contention resolution is 
legal
..


bts (RLL): DCCH/SAPI0 LAPDm without contention resolution is legal

The diffrence is whether we establish the LAPDm link
* after RACH + IMM.ASS (we must include L3 payload for contention
  resolution required)
* after assignment from one channel to another (we must not include L3
  payload, i.e. no contention resolution)

Change-Id: Ib67763856ffc5f5fd04a87f4192705777931c400
Related: OS#3252
---
M bts/BTS_Tests.ttcn
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 49e5fa1..c706437 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -3108,10 +3108,10 @@
 }
 testcase TC_rll_est_ind() runs on test_CT {
var RllTestCases tcs := {
-   /* normal SAPI0 establishment */
+   /* SAPI0 establishment (contention resolution) */
valueof(t_EITC(0, valueof(ts_RslLinkID_DCCH(0)), '01020304'O, 
true)),
-   /* SAPI 0 requires contention resolution */
-   valueof(t_EITC(0, valueof(ts_RslLinkID_DCCH(0)), ''O, false)),
+   /* normal SAPI0 establishment */
+   valueof(t_EITC(0, valueof(ts_RslLinkID_DCCH(0)), ''O, true)),
/* SAPI 3 doesn't support contention resolution */
valueof(t_EITC(3, valueof(ts_RslLinkID_DCCH(3)), '01020304'O, 
false)),
valueof(t_EITC(3, valueof(ts_RslLinkID_SACCH(3)), '01020304'O, 
false)),

-- 
To view, visit https://gerrit.osmocom.org/8088
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib67763856ffc5f5fd04a87f4192705777931c400
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-ttcn3-hacks[master]: bts (RLL): DCCH/SAPI0 LAPDm without contention resolution is...

2018-05-09 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/8088
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib67763856ffc5f5fd04a87f4192705777931c400
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[PATCH] osmo-ggsn[master]: ggsn_vty.c: fix: use CONFIG_NODE as parent by default

2018-05-09 Thread Vadim Yanitskiy

Review at  https://gerrit.osmocom.org/8089

ggsn_vty.c: fix: use CONFIG_NODE as parent by default

There are some configuration nodes, which are handled by extenral
libraries, such as libosmoctrl. So, when switching back to the
parent node, this should be kept in mind.

Change-Id: I65be7910dc46166caa34a0984a6763e1477dec99
---
M ggsn/ggsn_vty.c
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/ggsn/ggsn_vty.c b/ggsn/ggsn_vty.c
index 6ddfc0d..53f4ebf 100644
--- a/ggsn/ggsn_vty.c
+++ b/ggsn/ggsn_vty.c
@@ -948,6 +948,10 @@
vty->index_sub = >ggsn->cfg.description;
}
break;
+   default:
+   vty->node = CONFIG_NODE;
+   vty->index = NULL;
+   vty->index_sub = NULL;
}
 
return vty->node;

-- 
To view, visit https://gerrit.osmocom.org/8089
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I65be7910dc46166caa34a0984a6763e1477dec99
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 


Build failed in Jenkins: master-asn1c » a1=default,a2=default,a3=default,osmocom-master-debian9 #117

2018-05-09 Thread jenkins
See 


--
[...truncated 3.66 KB...]

+ ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared 
libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared 
libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared 
libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking for autoconf... /usr/bin/autoconf
checking for autoheader... /usr/bin/autoheader
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking 

[PATCH] osmo-ttcn3-hacks[master]: bts (RLL): DCCH/SAPI0 LAPDm without contention resolution is...

2018-05-09 Thread Harald Welte

Review at  https://gerrit.osmocom.org/8088

bts (RLL): DCCH/SAPI0 LAPDm without contention resolution is legal

The diffrence is whether we establish the LAPDm link
* after RACH + IMM.ASS (we must include L3 payload for contention
  resolution required)
* after assignment from one channel to another (we must not include L3
  payload, i.e. no contention resolution)

Change-Id: Ib67763856ffc5f5fd04a87f4192705777931c400
Related: OS#3252
---
M bts/BTS_Tests.ttcn
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/88/8088/1

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 49e5fa1..c706437 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -3108,10 +3108,10 @@
 }
 testcase TC_rll_est_ind() runs on test_CT {
var RllTestCases tcs := {
-   /* normal SAPI0 establishment */
+   /* SAPI0 establishment (contention resolution) */
valueof(t_EITC(0, valueof(ts_RslLinkID_DCCH(0)), '01020304'O, 
true)),
-   /* SAPI 0 requires contention resolution */
-   valueof(t_EITC(0, valueof(ts_RslLinkID_DCCH(0)), ''O, false)),
+   /* normal SAPI0 establishment */
+   valueof(t_EITC(0, valueof(ts_RslLinkID_DCCH(0)), ''O, true)),
/* SAPI 3 doesn't support contention resolution */
valueof(t_EITC(3, valueof(ts_RslLinkID_DCCH(3)), '01020304'O, 
false)),
valueof(t_EITC(3, valueof(ts_RslLinkID_SACCH(3)), '01020304'O, 
false)),

-- 
To view, visit https://gerrit.osmocom.org/8088
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib67763856ffc5f5fd04a87f4192705777931c400
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


libosmocore[master]: lapdm: don't enforce contention resolution on SAPI0/DCCH

2018-05-09 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/8087
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id903492ee90809fe98defcf4abc0419b8150069f
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] libosmocore[master]: lapdm: don't enforce contention resolution on SAPI0/DCCH

2018-05-09 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: lapdm: don't enforce contention resolution on SAPI0/DCCH
..


lapdm: don't enforce contention resolution on SAPI0/DCCH

In Change-Id: I8c2c103cdc7f9a45d7b2080c572f559fc3db58e4 we introduced
a check to enforce contention resolution always being used in
MS-originated LAPDm establishment on the main DCCH / SAPI0.  This is
only required after RACH request (IMM.ASS.) and not after a normal
assignment command which was sent already via a dedicated channel.

Hence, we cannot enforce a strict requirement for contention resolution
in those cases.

We *could* use the RSL Channel Activation type as a constraint on
whether or not to enforce contention-resoluiton-only LAPDm
establishment, but this is out of the scope of the LAPDm code but would
have to be done inside OsmoBTS.

Related: OS#3252
Change-Id: Id903492ee90809fe98defcf4abc0419b8150069f
---
M src/gsm/lapdm.c
1 file changed, 2 insertions(+), 5 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c
index b9e7304..3a6fc5b 100644
--- a/src/gsm/lapdm.c
+++ b/src/gsm/lapdm.c
@@ -552,16 +552,13 @@
return RLL_CAUSE_SABM_INFO_NOTALL;
} else {
switch (lctx->sapi) {
-   case 0:
-   /* SAPI0 must use contention resolution, i.e. 
L3 payload must exist */
-   if (lctx->length == 0)
-   return RLL_CAUSE_UFRM_INC_PARAM;
-   break;
case 3:
/* SAPI3 doesn't support contention resolution 
*/
if (lctx->length > 0)
return RLL_CAUSE_SABM_INFO_NOTALL;
break;
+   default:
+   break;
}
}
} else if (le->mode == LAPDM_MODE_MS) {

-- 
To view, visit https://gerrit.osmocom.org/8087
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id903492ee90809fe98defcf4abc0419b8150069f
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-mgw[master]: stats: use libosmocore rate counter for in/out_stream.err_ts...

2018-05-09 Thread Harald Welte

Patch Set 1:

(2 comments)

https://gerrit.osmocom.org/#/c/8086/1/src/libosmo-mgcp/mgcp_conn.c
File src/libosmo-mgcp/mgcp_conn.c:

Line 139:   conn_rtp->state.in_stream.err_ts_ctr =
no need to break those lines, we don't have 80 columns limits anymore


https://gerrit.osmocom.org/#/c/8086/1/src/libosmo-mgcp/mgcp_network.c
File src/libosmo-mgcp/mgcp_network.c:

Line 517:   state->out_stream.last_tsdelta = 0;
this somehow doesn't look like counter related changes?


-- 
To view, visit https://gerrit.osmocom.org/8086
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9fbd65bf2f4d1e015a05996db4c1f7ff20be2c95
Gerrit-PatchSet: 1
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: Yes


[PATCH] libosmocore[master]: lapdm: don't enforce contention resolution on SAPI0/DCCH

2018-05-09 Thread Harald Welte

Review at  https://gerrit.osmocom.org/8087

lapdm: don't enforce contention resolution on SAPI0/DCCH

In Change-Id: I8c2c103cdc7f9a45d7b2080c572f559fc3db58e4 we introduced
a check to enforce contention resolution always being used in
MS-originated LAPDm establishment on the main DCCH / SAPI0.  This is
only required after RACH request (IMM.ASS.) and not after a normal
assignment command which was sent already via a dedicated channel.

Hence, we cannot enforce a strict requirement for contention resolution
in those cases.

We *could* use the RSL Channel Activation type as a constraint on
whether or not to enforce contention-resoluiton-only LAPDm
establishment, but this is out of the scope of the LAPDm code but would
have to be done inside OsmoBTS.

Related: OS#3252
Change-Id: Id903492ee90809fe98defcf4abc0419b8150069f
---
M src/gsm/lapdm.c
1 file changed, 2 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/87/8087/1

diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c
index b9e7304..3a6fc5b 100644
--- a/src/gsm/lapdm.c
+++ b/src/gsm/lapdm.c
@@ -552,16 +552,13 @@
return RLL_CAUSE_SABM_INFO_NOTALL;
} else {
switch (lctx->sapi) {
-   case 0:
-   /* SAPI0 must use contention resolution, i.e. 
L3 payload must exist */
-   if (lctx->length == 0)
-   return RLL_CAUSE_UFRM_INC_PARAM;
-   break;
case 3:
/* SAPI3 doesn't support contention resolution 
*/
if (lctx->length > 0)
return RLL_CAUSE_SABM_INFO_NOTALL;
break;
+   default:
+   break;
}
}
} else if (le->mode == LAPDM_MODE_MS) {

-- 
To view, visit https://gerrit.osmocom.org/8087
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id903492ee90809fe98defcf4abc0419b8150069f
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[PATCH] osmo-mgw[master]: stats: use libosmocore rate counter for in/out_stream.err_ts...

2018-05-09 Thread dexter

Review at  https://gerrit.osmocom.org/8086

stats: use libosmocore rate counter for in/out_stream.err_ts_counter

The two counters: in_stream.err_ts_counter and out_stream.err_ts_counter
are still handcoded. To make them better accessible they should
 be replaced with libosmocore rate counters.

- replace state.in_stream.err_ts_counter with libosmocore rate counter
- replace state.out_stream.err_ts_counter with libosmocore rate counter

Change-Id: I9fbd65bf2f4d1e015a05996db4c1f7ff20be2c95
Related: OS#2517
---
M include/osmocom/mgcp/mgcp_internal.h
M src/libosmo-mgcp/mgcp_conn.c
M src/libosmo-mgcp/mgcp_network.c
M src/libosmo-mgcp/mgcp_stat.c
M src/libosmo-mgcp/mgcp_vty.c
M tests/mgcp/mgcp_test.c
6 files changed, 65 insertions(+), 17 deletions(-)


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

diff --git a/include/osmocom/mgcp/mgcp_internal.h 
b/include/osmocom/mgcp/mgcp_internal.h
index 0da2c56..ff02768 100644
--- a/include/osmocom/mgcp/mgcp_internal.h
+++ b/include/osmocom/mgcp/mgcp_internal.h
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #define CI_UNUSED 0
 
@@ -45,7 +46,7 @@
uint32_t ssrc;
uint16_t last_seq;
uint32_t last_timestamp;
-   uint32_t err_ts_counter;
+   struct rate_ctr *err_ts_ctr;
int32_t last_tsdelta;
uint32_t last_arrival_time;
 };
@@ -202,6 +203,8 @@
uint32_t octets;
} stats;
} osmux;
+
+   struct rate_ctr_group *rate_ctr_group;
 };
 
 /*! Connection type, specifies which member of the union "u" in mgcp_conn
diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c
index 998dbc5..0055049 100644
--- a/src/libosmo-mgcp/mgcp_conn.c
+++ b/src/libosmo-mgcp/mgcp_conn.c
@@ -26,7 +26,27 @@
 #include 
 #include 
 #include 
+#include 
 #include 
+
+const static struct rate_ctr_desc rate_ctr_desc[] = {
+   {
+   .name = "in_stream_err_ts_ctr",
+   .description = "inbound rtp-stream timestamp errors",
+   },{
+   .name = "out_stream_err_ts_ctr",
+   .description = "outbound rtp-stream timestamp errors",
+   }
+};
+
+const static struct rate_ctr_group_desc rate_ctr_group_desc = {
+   .group_name_prefix = "conn_rtp",
+   .group_description = "rtp connection statistics",
+   .class_id = 1,
+   .num_ctr = 2,
+   .ctr_desc = rate_ctr_desc
+};
+
 
 /* Allocate a new connection identifier. According to RFC3435, they must
  * be unique only within the scope of the endpoint. (Caller must provide
@@ -87,6 +107,10 @@
 static void mgcp_rtp_conn_init(struct mgcp_conn_rtp *conn_rtp, struct 
mgcp_conn *conn)
 {
struct mgcp_rtp_end *end = _rtp->end;
+   /* FIXME: Each new rate counter group requires an unique index. At the
+* moment we generate this index using this counter, but perhaps there
+* is a more concious way to assign the indexes. */
+   static unsigned int rate_ctr_index = 0;
 
conn_rtp->type = MGCP_RTP_DEFAULT;
conn_rtp->osmux.allocated_cid = -1;
@@ -108,6 +132,15 @@
 
mgcp_rtp_codec_init(>codec);
mgcp_rtp_codec_init(>alt_codec);
+
+   conn_rtp->rate_ctr_group =
+   rate_ctr_group_alloc(conn, _ctr_group_desc,
+rate_ctr_index);
+   conn_rtp->state.in_stream.err_ts_ctr =
+   _rtp->rate_ctr_group->ctr[0];
+   conn_rtp->state.out_stream.err_ts_ctr =
+   _rtp->rate_ctr_group->ctr[1];
+   rate_ctr_index++;
 }
 
 /* Cleanup rtp connection struct */
@@ -116,6 +149,7 @@
osmux_disable_conn(conn_rtp);
osmux_release_cid(conn_rtp);
mgcp_free_rtp_port(_rtp->end);
+   rate_ctr_group_free(conn_rtp->rate_ctr_group);
 }
 
 /*! allocate a new connection list entry.
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index 6923b97..c56e433 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -222,7 +222,7 @@
 
if (seq == sstate->last_seq) {
if (timestamp != sstate->last_timestamp) {
-   sstate->err_ts_counter += 1;
+   rate_ctr_inc(sstate->err_ts_ctr);
LOGP(DRTP, LOGL_ERROR,
 "The %s timestamp delta is != 0 but the sequence "
 "number %d is the same, "
@@ -272,7 +272,7 @@
ts_alignment_error(sstate, state->packet_duration, timestamp);
 
if (timestamp_error) {
-   sstate->err_ts_counter += 1;
+   rate_ctr_inc(sstate->err_ts_ctr);
LOGP(DRTP, LOGL_NOTICE,
 "The %s timestamp has an alignment error of %d "
 "on 0x%x SSRC: %u "
@@ -505,13 +505,16 @@
mgcp_rtp_annex_count(endp, state, seq, transit, ssrc);
 
if (!state->initialized) {
+   /* FIXME: Move this initialization to mgcp.conn.c */
   

[MERGED] osmo-bts[master]: add/improve various logging around dyn ts

2018-05-09 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: add/improve various logging around dyn ts
..


add/improve various logging around dyn ts

This logging turned up while I was debugging dynamic timeslots:
- OML Set Channel Attributes logging.
- a specific dyn TS pchan error.
- show pchan and lchan types on CHAN ACT ACK and REL ACK logging.
- on RSL message Rx, log the current pchan kind in detail, using
  gsm_ts_and_pchan_name(). This logs the underlying pchan as well as the
  current pchan mode a dyn TS is in.
- move 2 dyn TS logging from DL1C to DRSL, where all the other dyn ts logging
  is.

Change-Id: Ia89c134060e85f7065afd5642d1c541c65dd25ea
---
M src/common/oml.c
M src/common/rsl.c
2 files changed, 22 insertions(+), 10 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/common/oml.c b/src/common/oml.c
index 89db9cf..41debc1 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -950,6 +950,7 @@
/* Call into BTS driver to check attribute values */
rc = bts_model_check_oml(bts, foh->msg_type, ts->mo.nm_attr, tp_merged, 
ts);
if (rc < 0) {
+   LOGP(DOML, LOGL_ERROR, "SET CHAN ATTR: invalid attribute value, 
rc=%d\n", rc);
talloc_free(tp_merged);
/* Send NACK */
return oml_fom_ack_nack(msg, -rc);
@@ -965,6 +966,9 @@
ts->pchan = abis_nm_pchan4chcomb(comb);
rc = conf_lchans(ts);
if (rc < 0) {
+   LOGP(DOML, LOGL_ERROR, "SET CHAN ATTR: invalid Chan 
Comb 0x%x"
+" (pchan=%s, conf_lchans()->%d)\n",
+comb, gsm_pchan_name(ts->pchan), rc);
talloc_free(tp_merged);
/* Send NACK */
return oml_fom_ack_nack(msg, -rc);
@@ -980,8 +984,8 @@
/* If there is no TSC specified, use the BCC */
ts->tsc = BSIC2BCC(bts->bsic);
}
-   LOGP(DOML, LOGL_INFO, "%s SET CHAN ATTR (TSC = %u)\n",
-   gsm_abis_mo_name(>mo), ts->tsc);
+   LOGP(DOML, LOGL_INFO, "%s SET CHAN ATTR (TSC=%u pchan=%s)\n",
+   gsm_abis_mo_name(>mo), ts->tsc, gsm_pchan_name(ts->pchan));
 
/* call into BTS driver to apply new attributes to hardware */
return bts_model_apply_oml(bts, msg, tp_merged, NM_OC_CHANNEL, ts);
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 902b68f..8a1a232 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -683,7 +683,9 @@
return 0;
}
 
-   LOGP(DRSL, LOGL_NOTICE, "%s Tx RF CHAN REL ACK\n", 
gsm_lchan_name(lchan));
+   LOGP(DRSL, LOGL_NOTICE, "%s (ss=%d) %s Tx CHAN REL ACK\n",
+gsm_ts_and_pchan_name(lchan->ts), lchan->nr,
+gsm_lchant_name(lchan->type));
 
/*
 * Free the LAPDm resources now that the BTS
@@ -702,7 +704,9 @@
uint8_t chan_nr = gsm_lchan2chan_nr(lchan);
uint8_t ie[2];
 
-   LOGP(DRSL, LOGL_NOTICE, "%s Tx CHAN ACT ACK\n", gsm_lchan_name(lchan));
+   LOGP(DRSL, LOGL_NOTICE, "%s (ss=%d) %s Tx CHAN ACT ACK\n",
+gsm_ts_and_pchan_name(lchan->ts), lchan->nr,
+gsm_lchant_name(lchan->type));
 
msg = rsl_msgb_alloc(sizeof(struct abis_rsl_dchan_hdr));
if (!msg)
@@ -986,6 +990,9 @@
return 1;
}
}
+
+   LOGP(DRSL, LOGL_DEBUG, "%s: rx Channel Activation in state: %s.\n",
+gsm_lchan_name(lchan), gsm_lchans_name(lchan->state));
 
/* Initialize channel defaults */
lchan->ms_power = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0);
@@ -2106,7 +2113,7 @@
if (ts->flags & TS_F_PDCH_PENDING_MASK) {
/* Only one of the pending flags should ever be set at the same
 * time, but just log both in case both should be set. */
-   LOGP(DL1C, LOGL_ERROR,
+   LOGP(DRSL, LOGL_ERROR,
 "%s Request to PDCH %s, but PDCH%s%s is still pending\n",
 gsm_lchan_name(lchan), pdch_act? "ACT" : "DEACT",
 (ts->flags & TS_F_PDCH_ACT_PENDING)? " ACT" : "",
@@ -2212,8 +2219,8 @@
break;
default:
LOGP(DRSL, LOGL_ERROR,
-"%s Dyn TS disconnected, but invalid desired pchan",
-gsm_ts_and_pchan_name(ts));
+"%s Dyn TS disconnected, but invalid desired pchan: %s\n",
+gsm_ts_and_pchan_name(ts), 
gsm_pchan_name(ts->dyn.pchan_want));
ts->dyn.pchan_want = GSM_PCHAN_NONE;
/* TODO: how would this recover? */
return;
@@ -2351,7 +2358,7 @@
ts->flags |= TS_F_PDCH_ACTIVE;
else
ts->flags &= ~TS_F_PDCH_ACTIVE;
-   DEBUGP(DL1C, "%s %s 

[MERGED] osmo-ttcn3-hacks[master]: bsc: Add TODO notes about extensions of PDCH tests

2018-05-09 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: bsc: Add TODO notes about extensions of PDCH tests
..


bsc: Add TODO notes about extensions of PDCH tests

Change-Id: I3c0d338a9b8affe7f77c1b0b392999b5af668c71
---
M bsc/BSC_Tests.ttcn
1 file changed, 7 insertions(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 0299026..057906f 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -2389,7 +2389,13 @@
setverdict(pass);
 }
 
-
+/* Dyn PDCH todo:
+   * activate OSMO as TCH/F
+   * activate OSMO as TCH/H
+   * does the BSC-located PCU socket get the updated INFO?
+   * what if no PCU is connected at the time?
+   * is the info correct on delayed PCU (re)connect?
+ */
 
 control {
/* CTRL interface testing */

-- 
To view, visit https://gerrit.osmocom.org/8085
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3c0d338a9b8affe7f77c1b0b392999b5af668c71
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-bts[master]: ip.access dyn ts: properly NACK a PDCH ACT on a still active...

2018-05-09 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: ip.access dyn ts: properly NACK a PDCH ACT on a still active 
lchan
..


ip.access dyn ts: properly NACK a PDCH ACT on a still active lchan

Fixes: BTS_Tests.TC_dyn_ipa_pdch_tchf_act_pdch_act_nack
Change-Id: I12816ef9953467decd9f745217135702a544c8fc
---
M src/common/rsl.c
1 file changed, 7 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/common/rsl.c b/src/common/rsl.c
index c3e9604..902b68f 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -2115,6 +2115,13 @@
return;
}
 
+   if (lchan->state != LCHAN_S_NONE) {
+   LOGP(DRSL, LOGL_ERROR,
+"%s Request to PDCH %s, but lchan is still active\n",
+gsm_ts_and_pchan_name(ts), pdch_act? "ACT" : "DEACT");
+   rsl_tx_dyn_pdch_nack(lchan, pdch_act, RSL_ERR_NORMAL_UNSPEC);
+   }
+
ts->flags |= pdch_act? TS_F_PDCH_ACT_PENDING
 : TS_F_PDCH_DEACT_PENDING;
 

-- 
To view, visit https://gerrit.osmocom.org/8080
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I12816ef9953467decd9f745217135702a544c8fc
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: bts: fix TC_dyn_osmo_pdch_double_act

2018-05-09 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: bts: fix TC_dyn_osmo_pdch_double_act
..


bts: fix TC_dyn_osmo_pdch_double_act

Do not expect success on second activation.

Change-Id: I6b1ef158e1fdb32b392aa15bff71d0fe30ce6f1f
---
M bts/BTS_Tests.ttcn
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 8379fba..49e5fa1 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -2762,7 +2762,9 @@
f_init_pcu(PCU, id, pcu_conn_id, first_info);
 
f_dyn_osmo_pdch_act(pcu_conn_id, bts_nr, trx_nr);
-   f_dyn_osmo_pdch_act(pcu_conn_id, bts_nr, trx_nr);
+   /* Send a second Chan Activ and expect it to be NACKed */
+   f_rsl_transceive(ts_RSL_CHAN_ACT(g_chan_nr, g_pars.chan_mode), 
tr_RSL_CHAN_ACT_NACK(g_chan_nr),
+"RSL CHAN ACT NACK");
setverdict(pass);
 }
 testcase TC_dyn_osmo_pdch_double_act() runs on test_CT {

-- 
To view, visit https://gerrit.osmocom.org/8077
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6b1ef158e1fdb32b392aa15bff71d0fe30ce6f1f
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


[MERGED] osmo-bts[master]: fix RSL Chan Activ Nack messages

2018-05-09 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: fix RSL Chan Activ Nack messages
..


fix RSL Chan Activ Nack messages

In early rsl_rx_chan_activ(), do not use rsl_tx_chan_act_acknack() to trigger
sending a NACK, instead use rsl_tx_chan_act_nack() directly.

Rationale: the previously used rsl_tx_chan_act_acknack() may decide to omit the
NACK, particularly based on the lchan->rel_act_kind. lchan->rel_act_kind
indicates whether the Chan Release or Activation was explicitly requested via
RSL, and thus whether an ACK/NACK should go back to RSL or not. This gets set
only late in rsl_rx_chan_activ(). We cannot set it on top, because we need to
first establish whether the Chan Activ is permitted or not. In case of early
rejection of the Chan Activ, we do not want to modify the lchan state, but
merely reply with a NACK, unconditionally.

Before this patch, NACKs that rsl_rx_chan_activ() wants to trigger would
possibly be not be sent out on RSL, because lchan->rel_act_kind is not
explicitly initialized until later.

Fixes: BTS_Tests.TC_dyn_ipa_pdch_act_tchf_act_nack
Change-Id: Ic981f768cc024f0acd3d7ae55846cfbc7bc089ce
---
M src/common/rsl.c
1 file changed, 4 insertions(+), 6 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/common/rsl.c b/src/common/rsl.c
index a09d3a2..c3e9604 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -966,7 +966,7 @@
LOGP(DRSL, LOGL_ERROR,
 "%s: error: lchan is not available, but in state: %s.\n",
 gsm_lchan_name(lchan), gsm_lchans_name(lchan->state));
-   return rsl_tx_chan_act_acknack(lchan, RSL_ERR_EQUIPMENT_FAIL);
+   return rsl_tx_chan_act_nack(lchan, RSL_ERR_EQUIPMENT_FAIL);
}
 
if (ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH) {
@@ -981,8 +981,7 @@
 */
rc = dyn_ts_l1_reconnect(ts, msg);
if (rc)
-   return rsl_tx_chan_act_acknack(lchan,
-  RSL_ERR_NORMAL_UNSPEC);
+   return rsl_tx_chan_act_nack(lchan, 
RSL_ERR_NORMAL_UNSPEC);
/* indicate that the msgb should not be freed. */
return 1;
}
@@ -998,7 +997,7 @@
/* 9.3.3 Activation Type */
if (!TLVP_PRESENT(, RSL_IE_ACT_TYPE)) {
LOGP(DRSL, LOGL_NOTICE, "missing Activation Type\n");
-   return rsl_tx_chan_act_acknack(lchan, RSL_ERR_MAND_IE_ERROR);
+   return rsl_tx_chan_act_nack(lchan, RSL_ERR_MAND_IE_ERROR);
}
type = *TLVP_VAL(, RSL_IE_ACT_TYPE);
 
@@ -1006,8 +1005,7 @@
if (type != RSL_ACT_OSMO_PDCH) {
if (!TLVP_PRESENT(, RSL_IE_CHAN_MODE)) {
LOGP(DRSL, LOGL_NOTICE, "missing Channel Mode\n");
-   return rsl_tx_chan_act_acknack(lchan,
-  RSL_ERR_MAND_IE_ERROR);
+   return rsl_tx_chan_act_nack(lchan, 
RSL_ERR_MAND_IE_ERROR);
}
cm = (struct rsl_ie_chan_mode *) TLVP_VAL(, 
RSL_IE_CHAN_MODE);
lchan_tchmode_from_cmode(lchan, cm);

-- 
To view, visit https://gerrit.osmocom.org/8079
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic981f768cc024f0acd3d7ae55846cfbc7bc089ce
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-bts[master]: ignore RSL RF CHAN REL for inactive lchans

2018-05-09 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: ignore RSL RF CHAN REL for inactive lchans
..


ignore RSL RF CHAN REL for inactive lchans

When an RF CHANnel RELease request is received on an already released lchan,
there is no "REL NACK" message or similar, we just ACK the release.

When ACKing the release, make sure to reflect the same chan_nr that the release
was asked for, since the lchan state may actually reflect a different chan_nr.

Factor the actual Rel Ack message sending out of rsl_tx_rf_rel_ack(), which
makes all sorts of decisions around normal Rel Ack: add static tx_rf_rel_ack(),
with chan_nr argument instead of deriving chan_nr from the lchan.

Use this to directly ACK an unusual Chan Rel with the chan_nr that came in with
the request.

Fixes: BTS_Tests.TC_dyn_osmo_pdch_unsol_deact
   (after I6b790e866ce4e66d9385b286b727ae41a83d3e67)

Change-Id: Iceaa2e87874ced42d664a2a0b01a1c59e46a19b3
---
M src/common/rsl.c
1 file changed, 29 insertions(+), 9 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/common/rsl.c b/src/common/rsl.c
index 52eb5f4..a09d3a2 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -613,10 +613,26 @@
  * dedicated channel related messages
  */
 
+/* Send an RF CHANnel RELease ACKnowledge with the given chan_nr. This chan_nr 
may mismatch the current
+ * lchan state, if we received a CHANnel RELease for an already released 
channel, and we're just acking
+ * what we got without taking any action. */
+static int tx_rf_rel_ack(struct gsm_lchan *lchan, uint8_t chan_nr)
+{
+   struct msgb *msg;
+
+   msg = rsl_msgb_alloc(sizeof(struct abis_rsl_dchan_hdr));
+   if (!msg)
+   return -ENOMEM;
+
+   rsl_dch_push_hdr(msg, RSL_MT_RF_CHAN_REL_ACK, chan_nr);
+   msg->trx = lchan->ts->trx;
+
+   return abis_bts_rsl_sendmsg(msg);
+}
+
 /* 8.4.19 sending RF CHANnel RELease ACKnowledge */
 int rsl_tx_rf_rel_ack(struct gsm_lchan *lchan)
 {
-   struct msgb *msg;
uint8_t chan_nr = gsm_lchan2chan_nr(lchan);
bool send_rel_ack;
 
@@ -675,14 +691,7 @@
 */
lapdm_channel_exit(>lapdm_ch);
 
-   msg = rsl_msgb_alloc(sizeof(struct abis_rsl_dchan_hdr));
-   if (!msg)
-   return -ENOMEM;
-
-   rsl_dch_push_hdr(msg, RSL_MT_RF_CHAN_REL_ACK, chan_nr);
-   msg->trx = lchan->ts->trx;
-
-   return abis_bts_rsl_sendmsg(msg);
+   return tx_rf_rel_ack(lchan, chan_nr);
 }
 
 /* 8.4.2 sending CHANnel ACTIVation ACKnowledge */
@@ -1187,6 +1196,17 @@
 {
int rc;
 
+   if (lchan->state == LCHAN_S_NONE) {
+   LOGP(DRSL, LOGL_ERROR,
+"%s ss=%d state=%s Rx RSL RF Channel Release, but is 
already inactive;"
+" just ACKing the release\n",
+gsm_ts_and_pchan_name(lchan->ts), lchan->nr,
+gsm_lchans_name(lchan->state));
+   /* Just ack the release and ignore. Make sure to reflect the 
same chan_nr we received,
+* not necessarily reflecting the current lchan state. */
+   return tx_rf_rel_ack(lchan, chan_nr);
+   }
+
if (lchan->abis_ip.rtp_socket) {
rsl_tx_ipac_dlcx_ind(lchan, RSL_ERR_NORMAL_UNSPEC);
osmo_rtp_socket_log_stats(lchan->abis_ip.rtp_socket, DRTP, 
LOGL_INFO,

-- 
To view, visit https://gerrit.osmocom.org/8078
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iceaa2e87874ced42d664a2a0b01a1c59e46a19b3
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: bts: fix TC_dyn_osmo_pdch_unsol_deact

2018-05-09 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: bts: fix TC_dyn_osmo_pdch_unsol_deact
..


bts: fix TC_dyn_osmo_pdch_unsol_deact

TC_dyn_osmo_pdch_unsol_deact sends a release request on an already released
lchan, which obviously would never trigger a change in the PCU configuration
and hence it makes no sense to expect a PCU info ind to be sent.

Instead of f_dyn_osmo_pdch_deact(), which expects a PCU info_ind, just send a
CHAN_REL and expect a trivial REL_ACK.

Drop some unused local vars.

Change-Id: I6b790e866ce4e66d9385b286b727ae41a83d3e67
---
M bts/BTS_Tests.ttcn
1 file changed, 3 insertions(+), 4 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 5e93ba3..8379fba 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -2732,14 +2732,13 @@
 /* send a RF CHAN REL for PDCH on an osmocom dynamci PDCH that's already 
inactive */
 function f_TC_dyn_osmo_pdch_unsol_deact(charstring id) runs on ConnHdlr {
var PCUIF_Message first_info;
-   var integer ts_nr := g_chan_nr.tn;
-   var integer trx_nr := 0;
-   var integer bts_nr := 0;
var integer pcu_conn_id := -1;
 
f_init_pcu(PCU, id, pcu_conn_id, first_info);
 
-   f_dyn_osmo_pdch_deact(pcu_conn_id, bts_nr, trx_nr);
+   RSL.send(ts_RSL_RF_CHAN_REL(g_chan_nr));
+   /* since the lchan is already released, we don't expect any PCU 
changes, just a rel ack. */
+   RSL.receive(tr_RSL_RF_CHAN_REL_ACK(g_chan_nr));
setverdict(pass);
 }
 testcase TC_dyn_osmo_pdch_unsol_deact() runs on test_CT {

-- 
To view, visit https://gerrit.osmocom.org/8074
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6b790e866ce4e66d9385b286b727ae41a83d3e67
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-ttcn3-hacks[master]: bsc: Add TODO notes about extensions of PDCH tests

2018-05-09 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/8085
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3c0d338a9b8affe7f77c1b0b392999b5af668c71
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-ttcn3-hacks[master]: add bts/expected-results.xml

2018-05-09 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: add bts/expected-results.xml
..


add bts/expected-results.xml

Change-Id: I677b65cbfd5762ff016b188a0f18ce1e5710f45d
---
A bts/expected-results.xml
1 file changed, 91 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bts/expected-results.xml b/bts/expected-results.xml
new file mode 100644
index 000..6ac0686
--- /dev/null
+++ b/bts/expected-results.xml
@@ -0,0 +1,91 @@
+
+
+  
+  
+  
+  
+  
+  
+  
+  
+  
+Dynamic test case error: Error message was received from 
MC: The connect operation refers to test component with component reference 
116, which has already terminated.
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+no verdict
+  
+  
+  
+  
+  
+  
+  
+  
+  
+RSL for unknown Dchan
+  BTS_Tests.ttcn:MASKED BTS_Tests control part
+  BTS_Tests.ttcn:MASKED TC_dyn_osmo_pdch_unsol_deact testcase
+
+  
+  
+"Timeout expecting RSL CHAN ACT"
+  BTS_Tests.ttcn:MASKED BTS_Tests control part
+  BTS_Tests.ttcn:MASKED TC_dyn_osmo_pdch_double_act testcase
+
+  
+  
+  
+  
+  
+  
+Tguard timeout
+  BTS_Tests.ttcn:MASKED BTS_Tests control part
+  BTS_Tests.ttcn:MASKED TC_dyn_ipa_pdch_tchf_act_pdch_act_nack testcase
+
+  
+  
+"Timeout expecting RSL CHAN ACT"
+  BTS_Tests.ttcn:MASKED BTS_Tests control part
+  BTS_Tests.ttcn:MASKED TC_dyn_ipa_pdch_act_tchf_act_nack testcase
+
+  
+

-- 
To view, visit https://gerrit.osmocom.org/8073
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I677b65cbfd5762ff016b188a0f18ce1e5710f45d
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-trx[master]: trx_vty.c: fix: use CONFIG_NODE as parent by default

2018-05-09 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/8083
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia0600a46d19825806e5aed9257b6c57c3907808b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: neels 
Gerrit-HasComments: No


[MERGED] osmo-trx[master]: trx_vty.c: fix: use CONFIG_NODE as parent by default

2018-05-09 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: trx_vty.c: fix: use CONFIG_NODE as parent by default
..


trx_vty.c: fix: use CONFIG_NODE as parent by default

There are some configuration nodes, which are handled by extenral
libraries, such as libosmoctrl. So, when switching back to the
parent node, this should be kept in mind.

Instead of aborting, let's got to the CONFIG_NODE by default.

Fixes: OS#3250
Change-Id: Ia0600a46d19825806e5aed9257b6c57c3907808b
---
M CommonLibs/trx_vty.c
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Neels Hofmeyr: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/CommonLibs/trx_vty.c b/CommonLibs/trx_vty.c
index 843d19f..e69df77 100644
--- a/CommonLibs/trx_vty.c
+++ b/CommonLibs/trx_vty.c
@@ -503,7 +503,9 @@
vty->index_sub = NULL;
break;
default:
-   OSMO_ASSERT(0);
+   vty->node = CONFIG_NODE;
+   vty->index = NULL;
+   vty->index_sub = NULL;
}
 
return vty->node;

-- 
To view, visit https://gerrit.osmocom.org/8083
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia0600a46d19825806e5aed9257b6c57c3907808b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: neels 


osmo-trx[master]: trx_vty.c: fix: use CONFIG_NODE as parent by default

2018-05-09 Thread Neels Hofmeyr

Patch Set 1: Code-Review+1

as explained in OS#3250, the go_parent action here can be a lot simpler, but 
this change would fix it as well. Now we need a +2 from Tom.

-- 
To view, visit https://gerrit.osmocom.org/8083
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia0600a46d19825806e5aed9257b6c57c3907808b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: neels 
Gerrit-HasComments: No


[PATCH] osmo-ttcn3-hacks[master]: bsc: Add TODO notes about extensions of PDCH tests

2018-05-09 Thread Harald Welte

Review at  https://gerrit.osmocom.org/8085

bsc: Add TODO notes about extensions of PDCH tests

Change-Id: I3c0d338a9b8affe7f77c1b0b392999b5af668c71
---
M bsc/BSC_Tests.ttcn
1 file changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/85/8085/1

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 0299026..057906f 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -2389,7 +2389,13 @@
setverdict(pass);
 }
 
-
+/* Dyn PDCH todo:
+   * activate OSMO as TCH/F
+   * activate OSMO as TCH/H
+   * does the BSC-located PCU socket get the updated INFO?
+   * what if no PCU is connected at the time?
+   * is the info correct on delayed PCU (re)connect?
+ */
 
 control {
/* CTRL interface testing */

-- 
To view, visit https://gerrit.osmocom.org/8085
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c0d338a9b8affe7f77c1b0b392999b5af668c71
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[MERGED] osmo-gsm-tester[master]: Unload suite local modules after suite exit to avoid collisions

2018-05-09 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged.

Change subject: Unload suite local modules after suite exit to avoid collisions
..


Unload suite local modules after suite exit to avoid collisions

Since sys.path is modified idynamically to load modules from "lib" subdir of 
each suite, from python env point of view all those modules share a namespace. 
As a result, there can be name collisions.

If a name collision appears (eg test1 loads "testlib.py" and test2
afterwards also loads its own "testlib.py"), then python interpreter
thinks the testlib.py module is already loaded, so test2 ends up using
"testlib.py" from test1.

The way to solve this is to make suite local
modules to live only through the scope of the suite, and unload the
modules once the suite is finished.

Change-Id: I4efe815f85bc4ec2ca91aa9c2d3a369048f21571
---
M src/osmo_gsm_tester/suite.py
M suites/dyn_ts_ipa/mo_mt_call_dyn_ipa.py
M suites/dyn_ts_osmo/mo_mt_call_dyn_osmo.py
M suites/voice/mo_mt_call_tchf.py
M suites/voice/mo_mt_call_tchh.py
5 files changed, 31 insertions(+), 0 deletions(-)

Approvals:
  Pau Espin Pedrol: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py
index 44aabbd..76cd248 100644
--- a/src/osmo_gsm_tester/suite.py
+++ b/src/osmo_gsm_tester/suite.py
@@ -70,6 +70,7 @@
 resources_pool = None
 reserved_resources = None
 objects_to_clean_up = None
+test_import_modules_to_clean_up = []
 _resource_requirements = None
 _config = None
 _processes = None
@@ -99,6 +100,27 @@
 obj = self.objects_to_clean_up.pop()
 try:
 obj.cleanup()
+except Exception:
+log.log_exn()
+
+def test_import_modules_register_for_cleanup(self, mod):
+'''
+Tests are required to call this API for any module loaded from its own
+lib subdir, because they are loaded in the global namespace. Otherwise
+later tests importing modules with the same name will re-use an already
+loaded module.
+'''
+if mod not in self.test_import_modules_to_clean_up:
+self.dbg('registering module %r for cleanup' % mod)
+self.test_import_modules_to_clean_up.append(mod)
+
+def test_import_modules_cleanup(self):
+while self.test_import_modules_to_clean_up:
+mod = self.test_import_modules_to_clean_up.pop()
+try:
+self.dbg('Cleaning up module %r' % mod)
+del sys.modules[mod.__name__]
+del mod
 except Exception:
 log.log_exn()
 
@@ -179,6 +201,7 @@
 self.objects_cleanup()
 self.free_resources()
 MainLoop.unregister_poll_func(self.poll)
+self.test_import_modules_cleanup()
 util.import_path_remove(suite_libdir)
 self.duration = time.time() - self.start_timestamp
 
diff --git a/suites/dyn_ts_ipa/mo_mt_call_dyn_ipa.py 
b/suites/dyn_ts_ipa/mo_mt_call_dyn_ipa.py
index f1771b9..82e357c 100755
--- a/suites/dyn_ts_ipa/mo_mt_call_dyn_ipa.py
+++ b/suites/dyn_ts_ipa/mo_mt_call_dyn_ipa.py
@@ -1,6 +1,8 @@
 #!/usr/bin/env python3
 from osmo_gsm_tester.testenv import *
 
+import testlib
+suite.test_import_modules_register_for_cleanup(testlib)
 from testlib import call_test_setup_run
 
 def my_bts_setup(bts):
diff --git a/suites/dyn_ts_osmo/mo_mt_call_dyn_osmo.py 
b/suites/dyn_ts_osmo/mo_mt_call_dyn_osmo.py
index c7fe0c3..1424da8 100755
--- a/suites/dyn_ts_osmo/mo_mt_call_dyn_osmo.py
+++ b/suites/dyn_ts_osmo/mo_mt_call_dyn_osmo.py
@@ -1,6 +1,8 @@
 #!/usr/bin/env python3
 from osmo_gsm_tester.testenv import *
 
+import testlib
+suite.test_import_modules_register_for_cleanup(testlib)
 from testlib import call_test_setup_run
 
 def my_bts_setup(bts):
diff --git a/suites/voice/mo_mt_call_tchf.py b/suites/voice/mo_mt_call_tchf.py
index a640a97..af55dfd 100755
--- a/suites/voice/mo_mt_call_tchf.py
+++ b/suites/voice/mo_mt_call_tchf.py
@@ -1,6 +1,8 @@
 #!/usr/bin/env python3
 from osmo_gsm_tester.testenv import *
 
+import testlib
+suite.test_import_modules_register_for_cleanup(testlib)
 from testlib import call_test_setup_run
 
 def my_bts_setup(bts):
diff --git a/suites/voice/mo_mt_call_tchh.py b/suites/voice/mo_mt_call_tchh.py
index e6f6b98..43d0760 100755
--- a/suites/voice/mo_mt_call_tchh.py
+++ b/suites/voice/mo_mt_call_tchh.py
@@ -1,6 +1,8 @@
 #!/usr/bin/env python3
 from osmo_gsm_tester.testenv import *
 
+import testlib
+suite.test_import_modules_register_for_cleanup(testlib)
 from testlib import call_test_setup_run
 
 def my_bts_setup(bts):

-- 
To view, visit https://gerrit.osmocom.org/8084
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4efe815f85bc4ec2ca91aa9c2d3a369048f21571
Gerrit-PatchSet: 1
Gerrit-Project: 

osmo-gsm-tester[master]: Unload suite local modules after suite exit to avoid collisions

2018-05-09 Thread Pau Espin Pedrol

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/8084
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4efe815f85bc4ec2ca91aa9c2d3a369048f21571
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


[PATCH] osmo-bts[master]: FIX REL_IND merge mismatch

2018-05-09 Thread Harald Welte
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/6966

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

FIX REL_IND merge mismatch

During the merge of Change-Id: Ie4f70c75f0137b4bd72d579b3a32575bac2fca3
the patch hunk was applied at a slightly wrong location.

Change-Id: I823c9101bcca72d5792e16379b02d3602ffc2726
---
M src/common/rsl.c
1 file changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/66/6966/5

diff --git a/src/common/rsl.c b/src/common/rsl.c
index 9adb89a..fff2272 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -2503,6 +2503,13 @@
LOGP(DRSL, LOGL_INFO, "%s Handing RLL msg %s from LAPDm to MEAS 
REP\n",
gsm_lchan_name(lchan), rsl_msg_name(rh->msg_type));
 
+   rc = rsl_tx_meas_res(lchan, msgb_l3(msg), msgb_l3len(msg), le);
+   msgb_free(msg);
+   return rc;
+   } else {
+   LOGP(DRSL, LOGL_INFO, "%s Fwd RLL msg %s from LAPDm to A-bis\n",
+   gsm_lchan_name(lchan), rsl_msg_name(rh->msg_type));
+
/* REL_IND handling */
if (rh->msg_type == RSL_MT_REL_IND &&
(lchan->type == GSM_LCHAN_TCH_F || lchan->type == 
GSM_LCHAN_TCH_H)) {
@@ -2518,13 +2525,6 @@
lchan->pending_rel_ind_msg = msg;
return 0;
}
-
-   rc = rsl_tx_meas_res(lchan, msgb_l3(msg), msgb_l3len(msg), le);
-   msgb_free(msg);
-   return rc;
-   } else {
-   LOGP(DRSL, LOGL_INFO, "%s Fwd RLL msg %s from LAPDm to A-bis\n",
-   gsm_lchan_name(lchan), rsl_msg_name(rh->msg_type));
 
return abis_bts_rsl_sendmsg(msg);
}

-- 
To view, visit https://gerrit.osmocom.org/6966
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I823c9101bcca72d5792e16379b02d3602ffc2726
Gerrit-PatchSet: 5
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-ttcn3-hacks[master]: bts: Add RLL tests

2018-05-09 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/8081
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I336378de6106e5369600cbb49e0c47cc59864630
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-ttcn3-hacks[master]: bts: Add RLL tests

2018-05-09 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: bts: Add RLL tests
..


bts: Add RLL tests

This adds a series of test cases to BTS_Tests.ttcn implementing testing
of the RLL sub-layr of RSL, i.e. the translation between LAPDm frames
on the Um interface and the RLL frames on the Abis side (and vice vrsa).

Related: OS#3174
Change-Id: I336378de6106e5369600cbb49e0c47cc59864630
---
M bts/BTS_Tests.ttcn
M library/L1CTL_PortType.ttcn
M library/LAPDm_Types.ttcn
M library/RSL_Types.ttcn
4 files changed, 605 insertions(+), 9 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index f820cf4..5e93ba3 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -105,6 +105,7 @@
 
/* all logical channels available on the BTS */
var ChannelNrs g_AllChannels;
+   var ChannelNrs g_AllChanTypes;
 }
 
 /* an individual call / channel */
@@ -141,7 +142,13 @@
RslChannelNr chan_nr,
RSL_IE_ChannelMode chan_mode,
float t_guard,
-   ConnL1Pars l1_pars
+   ConnL1Pars l1_pars,
+   TestSpecUnion spec optional
+}
+
+/* Test-specific parameters */
+type union TestSpecUnion {
+   RllTestCase rll
 }
 
 template (value) RachControlParameters ts_RachCtrl_default := {
@@ -289,6 +296,16 @@
valueof(ts_RslChanNr_SDCCH8(6,2)), 
valueof(ts_RslChanNr_SDCCH8(6,3)),
valueof(ts_RslChanNr_SDCCH8(6,4)), 
valueof(ts_RslChanNr_SDCCH8(6,5)),
valueof(ts_RslChanNr_SDCCH8(6,6)), 
valueof(ts_RslChanNr_SDCCH8(6,7))
+   };
+   g_AllChanTypes := {
+   /* TS 1..4: TCH/F */
+   //valueof(ts_RslChanNr_Bm(1)),
+   /* TS 5: TCH/H */
+   //valueof(ts_RslChanNr_Lm(5,1)),
+   /* TS 0: SDCCH/4 */
+   valueof(ts_RslChanNr_SDCCH4(0,2)),
+   /* TS 6: SDCCH/8 */
+   valueof(ts_RslChanNr_SDCCH8(6,4))
};
 
f_init_rsl(id);
@@ -480,7 +497,8 @@
bs_power_level := 0,
ms_power_level := 0,
ms_actual_ta := 0
-   }
+   },
+   spec := omit
 }
 
 /***
@@ -1313,6 +1331,7 @@
f_rsl_chan_deact();
f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr);
 }
+
 testcase TC_meas_res_sign_tchf() runs on test_CT {
var ConnHdlr vc_conn;
var ConnHdlrPars pars;
@@ -1372,7 +1391,7 @@
 }
 
 
-/* Test if a channel without valid uplink bursts generates RSL CONN FAIL IND */
+/* Test if a channel without valid uplink bursts generates RSL CONN FAIL IND 
(TS 48.058 4.10) */
 private function f_TC_conn_fail_crit(charstring id) runs on ConnHdlr {
f_l1_tune(L1CTL);
RSL.clear;
@@ -2993,6 +3012,421 @@
 }
 
 
+/***
+ * LAPDm / RLL related
+ ***/
+
+private function f_tx_lapdm(template (value) LapdmFrame l,
+   template (value) RslLinkId link_id) runs on 
ConnHdlr {
+   var octetstring l2 := enc_LapdmFrame(valueof(l));
+   if (valueof(link_id.c) == SACCH) {
+   /* prepend dummy L1 header */
+   l2 := ''O & l2;
+   }
+   log("encoding ", l, " to ", l2);
+   L1CTL.send(ts_L1CTL_DATA_REQ(g_chan_nr, link_id, l2));
+}
+
+type record RllTestCase {
+   uint3_t sapi,
+   RslLinkId   link_id,
+   octetstring l3,
+   boolean exp
+}
+type record of RllTestCase RllTestCases;
+template RllTestCase t_EITC(uint3_t sapi, RslLinkId id, octetstring l3, 
boolean exp) := {
+   sapi := sapi,
+   link_id := id,
+   l3 := l3,
+   exp := exp
+}
+
+/* execute the same callback function with a set of different parameters (tcs) 
on a
+ * variety of logical channels */
+private function f_rll_testmatrix(RllTestCases tcs, void_fn fn) runs on 
test_CT {
+   var ConnHdlrPars pars;
+   var ConnHdlr vc_conn;
+   f_init(testcasename());
+
+   /* test on each of the channels we have */
+   for (var integer i := 0; i < sizeof(g_AllChanTypes); i := i+1) {
+   pars := valueof(t_Pars(g_AllChanTypes[i], 
ts_RSL_ChanMode_SIGN));
+
+   /* test each of the test cases on the current channel */
+   for (var integer j := 0; j < sizeof(tcs); j := j+1) {
+   pars.spec.rll := tcs[j];
+   log(testcasename(), ": XXX Starting ", tcs[j] , " on ", 
g_AllChanTypes[i]);
+   vc_conn := f_start_handler(fn, pars);
+   vc_conn.done;
+   }
+   }
+
+   f_shutdown();
+}
+
+/* test if SABM on Um triggers EST IND (TS 48.058 3.1) */
+private function f_TC_rll_est_ind(charstring id) runs on 

[PATCH] osmo-bts[master]: WIP: FIX REL_IND merge mismatch

2018-05-09 Thread Harald Welte
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/6966

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

WIP: FIX REL_IND merge mismatch

During the merge of Change-Id: Ie4f70c75f0137b4bd72d579b3a32575bac2fca3
the patch hunk was applied at a slightly wrong location.

Change-Id: I823c9101bcca72d5792e16379b02d3602ffc2726
---
M src/common/rsl.c
1 file changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/66/6966/4

diff --git a/src/common/rsl.c b/src/common/rsl.c
index 9adb89a..fff2272 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -2503,6 +2503,13 @@
LOGP(DRSL, LOGL_INFO, "%s Handing RLL msg %s from LAPDm to MEAS 
REP\n",
gsm_lchan_name(lchan), rsl_msg_name(rh->msg_type));
 
+   rc = rsl_tx_meas_res(lchan, msgb_l3(msg), msgb_l3len(msg), le);
+   msgb_free(msg);
+   return rc;
+   } else {
+   LOGP(DRSL, LOGL_INFO, "%s Fwd RLL msg %s from LAPDm to A-bis\n",
+   gsm_lchan_name(lchan), rsl_msg_name(rh->msg_type));
+
/* REL_IND handling */
if (rh->msg_type == RSL_MT_REL_IND &&
(lchan->type == GSM_LCHAN_TCH_F || lchan->type == 
GSM_LCHAN_TCH_H)) {
@@ -2518,13 +2525,6 @@
lchan->pending_rel_ind_msg = msg;
return 0;
}
-
-   rc = rsl_tx_meas_res(lchan, msgb_l3(msg), msgb_l3len(msg), le);
-   msgb_free(msg);
-   return rc;
-   } else {
-   LOGP(DRSL, LOGL_INFO, "%s Fwd RLL msg %s from LAPDm to A-bis\n",
-   gsm_lchan_name(lchan), rsl_msg_name(rh->msg_type));
 
return abis_bts_rsl_sendmsg(msg);
}

-- 
To view, visit https://gerrit.osmocom.org/6966
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I823c9101bcca72d5792e16379b02d3602ffc2726
Gerrit-PatchSet: 4
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[PATCH] osmo-gsm-tester[master]: Unload suite local modules after suite exit to avoid collisions

2018-05-09 Thread Pau Espin Pedrol

Review at  https://gerrit.osmocom.org/8084

Unload suite local modules after suite exit to avoid collisions

Since sys.path is modified idynamically to load modules from "lib" subdir of 
each suite, from python env point of view all those modules share a namespace. 
As a result, there can be name collisions.

If a name collision appears (eg test1 loads "testlib.py" and test2
afterwards also loads its own "testlib.py"), then python interpreter
thinks the testlib.py module is already loaded, so test2 ends up using
"testlib.py" from test1.

The way to solve this is to make suite local
modules to live only through the scope of the suite, and unload the
modules once the suite is finished.

Change-Id: I4efe815f85bc4ec2ca91aa9c2d3a369048f21571
---
M src/osmo_gsm_tester/suite.py
M suites/dyn_ts_ipa/mo_mt_call_dyn_ipa.py
M suites/dyn_ts_osmo/mo_mt_call_dyn_osmo.py
M suites/voice/mo_mt_call_tchf.py
M suites/voice/mo_mt_call_tchh.py
5 files changed, 31 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/84/8084/1

diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py
index 44aabbd..76cd248 100644
--- a/src/osmo_gsm_tester/suite.py
+++ b/src/osmo_gsm_tester/suite.py
@@ -70,6 +70,7 @@
 resources_pool = None
 reserved_resources = None
 objects_to_clean_up = None
+test_import_modules_to_clean_up = []
 _resource_requirements = None
 _config = None
 _processes = None
@@ -99,6 +100,27 @@
 obj = self.objects_to_clean_up.pop()
 try:
 obj.cleanup()
+except Exception:
+log.log_exn()
+
+def test_import_modules_register_for_cleanup(self, mod):
+'''
+Tests are required to call this API for any module loaded from its own
+lib subdir, because they are loaded in the global namespace. Otherwise
+later tests importing modules with the same name will re-use an already
+loaded module.
+'''
+if mod not in self.test_import_modules_to_clean_up:
+self.dbg('registering module %r for cleanup' % mod)
+self.test_import_modules_to_clean_up.append(mod)
+
+def test_import_modules_cleanup(self):
+while self.test_import_modules_to_clean_up:
+mod = self.test_import_modules_to_clean_up.pop()
+try:
+self.dbg('Cleaning up module %r' % mod)
+del sys.modules[mod.__name__]
+del mod
 except Exception:
 log.log_exn()
 
@@ -179,6 +201,7 @@
 self.objects_cleanup()
 self.free_resources()
 MainLoop.unregister_poll_func(self.poll)
+self.test_import_modules_cleanup()
 util.import_path_remove(suite_libdir)
 self.duration = time.time() - self.start_timestamp
 
diff --git a/suites/dyn_ts_ipa/mo_mt_call_dyn_ipa.py 
b/suites/dyn_ts_ipa/mo_mt_call_dyn_ipa.py
index f1771b9..82e357c 100755
--- a/suites/dyn_ts_ipa/mo_mt_call_dyn_ipa.py
+++ b/suites/dyn_ts_ipa/mo_mt_call_dyn_ipa.py
@@ -1,6 +1,8 @@
 #!/usr/bin/env python3
 from osmo_gsm_tester.testenv import *
 
+import testlib
+suite.test_import_modules_register_for_cleanup(testlib)
 from testlib import call_test_setup_run
 
 def my_bts_setup(bts):
diff --git a/suites/dyn_ts_osmo/mo_mt_call_dyn_osmo.py 
b/suites/dyn_ts_osmo/mo_mt_call_dyn_osmo.py
index c7fe0c3..1424da8 100755
--- a/suites/dyn_ts_osmo/mo_mt_call_dyn_osmo.py
+++ b/suites/dyn_ts_osmo/mo_mt_call_dyn_osmo.py
@@ -1,6 +1,8 @@
 #!/usr/bin/env python3
 from osmo_gsm_tester.testenv import *
 
+import testlib
+suite.test_import_modules_register_for_cleanup(testlib)
 from testlib import call_test_setup_run
 
 def my_bts_setup(bts):
diff --git a/suites/voice/mo_mt_call_tchf.py b/suites/voice/mo_mt_call_tchf.py
index a640a97..af55dfd 100755
--- a/suites/voice/mo_mt_call_tchf.py
+++ b/suites/voice/mo_mt_call_tchf.py
@@ -1,6 +1,8 @@
 #!/usr/bin/env python3
 from osmo_gsm_tester.testenv import *
 
+import testlib
+suite.test_import_modules_register_for_cleanup(testlib)
 from testlib import call_test_setup_run
 
 def my_bts_setup(bts):
diff --git a/suites/voice/mo_mt_call_tchh.py b/suites/voice/mo_mt_call_tchh.py
index e6f6b98..43d0760 100755
--- a/suites/voice/mo_mt_call_tchh.py
+++ b/suites/voice/mo_mt_call_tchh.py
@@ -1,6 +1,8 @@
 #!/usr/bin/env python3
 from osmo_gsm_tester.testenv import *
 
+import testlib
+suite.test_import_modules_register_for_cleanup(testlib)
 from testlib import call_test_setup_run
 
 def my_bts_setup(bts):

-- 
To view, visit https://gerrit.osmocom.org/8084
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4efe815f85bc4ec2ca91aa9c2d3a369048f21571
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 


osmo-ttcn3-hacks[master]: bts: Add RLL tests

2018-05-09 Thread Harald Welte

Patch Set 2: Code-Review+1

-- 
To view, visit https://gerrit.osmocom.org/8081
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I336378de6106e5369600cbb49e0c47cc59864630
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-trx[master]: trx_vty.c: fix: use CONFIG_NODE as parent by default

2018-05-09 Thread Harald Welte

Patch Set 1: Code-Review+1

-- 
To view, visit https://gerrit.osmocom.org/8083
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia0600a46d19825806e5aed9257b6c57c3907808b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-HasComments: No


[PATCH] osmo-ttcn3-hacks[master]: bts: Add RLL tests

2018-05-09 Thread Harald Welte
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/8081

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

bts: Add RLL tests

This adds a series of test cases to BTS_Tests.ttcn implementing testing
of the RLL sub-layr of RSL, i.e. the translation between LAPDm frames
on the Um interface and the RLL frames on the Abis side (and vice vrsa).

Related: OS#3174
Change-Id: I336378de6106e5369600cbb49e0c47cc59864630
---
M bts/BTS_Tests.ttcn
M library/L1CTL_PortType.ttcn
M library/LAPDm_Types.ttcn
M library/RSL_Types.ttcn
4 files changed, 605 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/81/8081/2

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index f820cf4..5e93ba3 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -105,6 +105,7 @@
 
/* all logical channels available on the BTS */
var ChannelNrs g_AllChannels;
+   var ChannelNrs g_AllChanTypes;
 }
 
 /* an individual call / channel */
@@ -141,7 +142,13 @@
RslChannelNr chan_nr,
RSL_IE_ChannelMode chan_mode,
float t_guard,
-   ConnL1Pars l1_pars
+   ConnL1Pars l1_pars,
+   TestSpecUnion spec optional
+}
+
+/* Test-specific parameters */
+type union TestSpecUnion {
+   RllTestCase rll
 }
 
 template (value) RachControlParameters ts_RachCtrl_default := {
@@ -289,6 +296,16 @@
valueof(ts_RslChanNr_SDCCH8(6,2)), 
valueof(ts_RslChanNr_SDCCH8(6,3)),
valueof(ts_RslChanNr_SDCCH8(6,4)), 
valueof(ts_RslChanNr_SDCCH8(6,5)),
valueof(ts_RslChanNr_SDCCH8(6,6)), 
valueof(ts_RslChanNr_SDCCH8(6,7))
+   };
+   g_AllChanTypes := {
+   /* TS 1..4: TCH/F */
+   //valueof(ts_RslChanNr_Bm(1)),
+   /* TS 5: TCH/H */
+   //valueof(ts_RslChanNr_Lm(5,1)),
+   /* TS 0: SDCCH/4 */
+   valueof(ts_RslChanNr_SDCCH4(0,2)),
+   /* TS 6: SDCCH/8 */
+   valueof(ts_RslChanNr_SDCCH8(6,4))
};
 
f_init_rsl(id);
@@ -480,7 +497,8 @@
bs_power_level := 0,
ms_power_level := 0,
ms_actual_ta := 0
-   }
+   },
+   spec := omit
 }
 
 /***
@@ -1313,6 +1331,7 @@
f_rsl_chan_deact();
f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr);
 }
+
 testcase TC_meas_res_sign_tchf() runs on test_CT {
var ConnHdlr vc_conn;
var ConnHdlrPars pars;
@@ -1372,7 +1391,7 @@
 }
 
 
-/* Test if a channel without valid uplink bursts generates RSL CONN FAIL IND */
+/* Test if a channel without valid uplink bursts generates RSL CONN FAIL IND 
(TS 48.058 4.10) */
 private function f_TC_conn_fail_crit(charstring id) runs on ConnHdlr {
f_l1_tune(L1CTL);
RSL.clear;
@@ -2993,6 +3012,421 @@
 }
 
 
+/***
+ * LAPDm / RLL related
+ ***/
+
+private function f_tx_lapdm(template (value) LapdmFrame l,
+   template (value) RslLinkId link_id) runs on 
ConnHdlr {
+   var octetstring l2 := enc_LapdmFrame(valueof(l));
+   if (valueof(link_id.c) == SACCH) {
+   /* prepend dummy L1 header */
+   l2 := ''O & l2;
+   }
+   log("encoding ", l, " to ", l2);
+   L1CTL.send(ts_L1CTL_DATA_REQ(g_chan_nr, link_id, l2));
+}
+
+type record RllTestCase {
+   uint3_t sapi,
+   RslLinkId   link_id,
+   octetstring l3,
+   boolean exp
+}
+type record of RllTestCase RllTestCases;
+template RllTestCase t_EITC(uint3_t sapi, RslLinkId id, octetstring l3, 
boolean exp) := {
+   sapi := sapi,
+   link_id := id,
+   l3 := l3,
+   exp := exp
+}
+
+/* execute the same callback function with a set of different parameters (tcs) 
on a
+ * variety of logical channels */
+private function f_rll_testmatrix(RllTestCases tcs, void_fn fn) runs on 
test_CT {
+   var ConnHdlrPars pars;
+   var ConnHdlr vc_conn;
+   f_init(testcasename());
+
+   /* test on each of the channels we have */
+   for (var integer i := 0; i < sizeof(g_AllChanTypes); i := i+1) {
+   pars := valueof(t_Pars(g_AllChanTypes[i], 
ts_RSL_ChanMode_SIGN));
+
+   /* test each of the test cases on the current channel */
+   for (var integer j := 0; j < sizeof(tcs); j := j+1) {
+   pars.spec.rll := tcs[j];
+   log(testcasename(), ": XXX Starting ", tcs[j] , " on ", 
g_AllChanTypes[i]);
+   vc_conn := f_start_handler(fn, pars);
+   vc_conn.done;
+   }
+   }
+
+   f_shutdown();
+}
+
+/* test if SABM on Um triggers EST IND (TS 48.058 3.1) */
+private function f_TC_rll_est_ind(charstring id) runs on ConnHdlr {
+   var 

[PATCH] osmo-trx[master]: trx_vty.c: fix: use CONFIG_NODE as parent by default

2018-05-09 Thread Vadim Yanitskiy

Review at  https://gerrit.osmocom.org/8083

trx_vty.c: fix: use CONFIG_NODE as parent by default

There are some configuration nodes, which are handled by extenral
libraries, such as libosmoctrl. So, when switching back to the
parent node, this should be kept in mind.

Instead of aborting, let's got to the CONFIG_NODE by default.

Fixes: OS#3250
Change-Id: Ia0600a46d19825806e5aed9257b6c57c3907808b
---
M CommonLibs/trx_vty.c
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/CommonLibs/trx_vty.c b/CommonLibs/trx_vty.c
index 843d19f..e69df77 100644
--- a/CommonLibs/trx_vty.c
+++ b/CommonLibs/trx_vty.c
@@ -503,7 +503,9 @@
vty->index_sub = NULL;
break;
default:
-   OSMO_ASSERT(0);
+   vty->node = CONFIG_NODE;
+   vty->index = NULL;
+   vty->index_sub = NULL;
}
 
return vty->node;

-- 
To view, visit https://gerrit.osmocom.org/8083
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia0600a46d19825806e5aed9257b6c57c3907808b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 


osmo-ttcn3-hacks[master]: bts: Add RLL tests

2018-05-09 Thread Harald Welte

Patch Set 1:

(2 comments)

https://gerrit.osmocom.org/#/c/8081/1/bts/BTS_Tests.default
File bts/BTS_Tests.default:

Line 2: //"BTS-Test-RSL-IPA".FileMask := ERROR | WARNING;
not acceptable


https://gerrit.osmocom.org/#/c/8081/1/library/RSL_Emulation.ttcn
File library/RSL_Emulation.ttcn:

Line 424:   //setverdict(fail, "RSL for unknown 
Dchan");
not acceptable


-- 
To view, visit https://gerrit.osmocom.org/8081
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I336378de6106e5369600cbb49e0c47cc59864630
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: Yes


osmo-ttcn3-hacks[master]: bts: Add RLL tests

2018-05-09 Thread Harald Welte

Patch Set 1: Code-Review-1

-- 
To view, visit https://gerrit.osmocom.org/8081
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I336378de6106e5369600cbb49e0c47cc59864630
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: bts: Add RLL tests

2018-05-09 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/8081
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I336378de6106e5369600cbb49e0c47cc59864630
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No