Change in libosmocore[master]: stats_statsd: Send all stat_items as gauges

2018-10-24 Thread Holger Freyther
Holger Freyther has posted comments on this change. ( 
https://gerrit.osmocom.org/11323 )

Change subject: stats_statsd: Send all stat_items as gauges
..


Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/#/c/11323/2/src/stats_statsd.c
File src/stats_statsd.c:

https://gerrit.osmocom.org/#/c/11323/2/src/stats_statsd.c@196
PS2, Line 196: value
What is the difference between the two branches? value vs. 0? Could you use 
max(value, 0) then and simplify it further?



--
To view, visit https://gerrit.osmocom.org/11323
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia16270d36c9a14521594de4b99a48c83e4ac07d4
Gerrit-Change-Number: 11323
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Comment-Date: Wed, 24 Oct 2018 21:25:11 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in libosmocore[master]: stats_statsd: Send all stat_items as gauges

2018-10-24 Thread Holger Freyther
Holger Freyther has posted comments on this change. ( 
https://gerrit.osmocom.org/11323 )

Change subject: stats_statsd: Send all stat_items as gauges
..


Patch Set 2:

> We could do with TTCN3, but there's no support for statsd at the
 > moment so we need that first.

Not everything needs to be an integration test. ;)


--
To view, visit https://gerrit.osmocom.org/11323
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia16270d36c9a14521594de4b99a48c83e4ac07d4
Gerrit-Change-Number: 11323
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Comment-Date: Wed, 24 Oct 2018 21:24:10 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in libosmocore[master]: GSUP/SM: (WIP) introduce MO/MT FORWARD_SM messages

2018-10-24 Thread Vadim Yanitskiy
Vadim Yanitskiy has restored this change. ( https://gerrit.osmocom.org/11069 )

Change subject: GSUP/SM: (WIP) introduce MO/MT FORWARD_SM messages
..


Restored
--
To view, visit https://gerrit.osmocom.org/11069
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: restore
Gerrit-Change-Id: Ibe325c64ae2d6c626b232533bb4cbc65fc2b5d71
Gerrit-Change-Number: 11069
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-ttcn3-hacks[master]: library/GSUP_Types.ttcn: implement SRI_FOR_SM message

2018-10-24 Thread Vadim Yanitskiy
Vadim Yanitskiy has abandoned this change. ( https://gerrit.osmocom.org/11061 )

Change subject: library/GSUP_Types.ttcn: implement SRI_FOR_SM message
..


Abandoned
--
To view, visit https://gerrit.osmocom.org/11061
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: I7c1a882748d82ed5ef0b22cf1ae5764da5e874a0
Gerrit-Change-Number: 11061
Gerrit-PatchSet: 3
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Ivan Kluchnikov 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-trx[master]: sigProcLib: add a CorrType for extended (11-bit) RACH

2018-10-24 Thread Vadim Yanitskiy
Vadim Yanitskiy has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11422 )

Change subject: sigProcLib: add a CorrType for extended (11-bit) RACH
..

sigProcLib: add a CorrType for extended (11-bit) RACH

This is a preparatory change that enables a possibility to choose
the amount of synch. sequences to be used for Access Burst (RACH)
detection. The VTY flag will be introduced in further changes.

There are two correlation types now:

  - RACH (default) - TS0 only;
  - EXT_RACH - all TS0, TS1, and TS2 together.

Change-Id: Ia4f20524350bb8c380d7e10360758eddae8b03e9
Related: OS#3054
---
M Transceiver52M/sigProcLib.cpp
M Transceiver52M/sigProcLib.h
2 files changed, 12 insertions(+), 6 deletions(-)

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



diff --git a/Transceiver52M/sigProcLib.cpp b/Transceiver52M/sigProcLib.cpp
index 072fb3b..28c4ded 100644
--- a/Transceiver52M/sigProcLib.cpp
+++ b/Transceiver52M/sigProcLib.cpp
@@ -1602,18 +1602,22 @@
  *   tail: Search 8 symbols + maximum expected delay
  */
 static int detectRACHBurst(const signalVector , float threshold, int sps,
-   complex , float , unsigned max_toa)
+   complex , float , unsigned max_toa, 
bool ext)
 {
   int rc, target, head, tail;
-  CorrelationSequence *sync;
+  int i, num_seq;

   target = 8 + 40;
   head = 8;
   tail = 8 + max_toa;
-  sync = gRACHSequences[0];
+  num_seq = ext ? 3 : 1;

-  rc = detectGeneralBurst(burst, threshold, sps, amplitude, toa,
-  target, head, tail, sync);
+  for (i = 0; i < num_seq; i++) {
+rc = detectGeneralBurst(burst, threshold, sps, amplitude, toa,
+target, head, tail, gRACHSequences[i]);
+if (rc > 0)
+  break;
+  }

   return rc;
 }
@@ -1682,9 +1686,10 @@
 rc = analyzeTrafficBurst(burst, tsc, threshold, sps,
  amp, toa, max_toa);
 break;
+  case EXT_RACH:
   case RACH:
 rc = detectRACHBurst(burst, threshold, sps, amp, toa,
- max_toa);
+ max_toa, type == EXT_RACH);
 break;
   default:
 LOG(ERR) << "Invalid correlation type";
diff --git a/Transceiver52M/sigProcLib.h b/Transceiver52M/sigProcLib.h
index 9bc7e10..79a5c3f 100644
--- a/Transceiver52M/sigProcLib.h
+++ b/Transceiver52M/sigProcLib.h
@@ -29,6 +29,7 @@
 enum CorrType{
   OFF, ///< timeslot is off
   TSC, ///< timeslot should contain a normal burst
+  EXT_RACH,///< timeslot should contain an extended access burst
   RACH,///< timeslot should contain an access burst
   EDGE,///< timeslot should contain an EDGE burst
   IDLE ///< timeslot is an idle (or dummy) burst

--
To view, visit https://gerrit.osmocom.org/11422
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia4f20524350bb8c380d7e10360758eddae8b03e9
Gerrit-Change-Number: 11422
Gerrit-PatchSet: 3
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-trx[master]: sigProcLib: introduce both TS1 and TS2 RACH synch. sequences

2018-10-24 Thread Vadim Yanitskiy
Vadim Yanitskiy has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11390 )

Change subject: sigProcLib: introduce both TS1 and TS2 RACH synch. sequences
..

sigProcLib: introduce both TS1 and TS2 RACH synch. sequences

According to 3GPP TS 05.02, section 5.2.7, there are three
synch. sequences for Access Bursts:

  - TS0: GSM, GMSK (default),
  - TS1: EGPRS, 8-PSK,
  - TS2: EGPRS, GMSK.

Let's prepare everythyng to be able to detect all TS0-3 synch.
sequences, but keep detection of both TS1 and TS2 disabled
until the corresponding VTY option is introduced.

Change-Id: I838c21db29c54f1924dd478c2b34b46b70aab2cd
Related: OS#3054
---
M GSM/GSMCommon.cpp
M GSM/GSMCommon.h
M Transceiver52M/radioInterface.cpp
M Transceiver52M/sigProcLib.cpp
4 files changed, 31 insertions(+), 19 deletions(-)

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



diff --git a/GSM/GSMCommon.cpp b/GSM/GSMCommon.cpp
index 8aba3be..711ca70 100644
--- a/GSM/GSMCommon.cpp
+++ b/GSM/GSMCommon.cpp
@@ -54,7 +54,10 @@

 const BitVector 
GSM::gDummyBurst("0001011011101101010010011101001000100010001110001011100010111000101011101001010001100110011100010010001001010101");

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

 //   
|-head-||-midamble--||--data||t|
 const BitVector 
GSM::gRACHBurst("0011101001001011000110011010101000000110011111001001010110011000");
diff --git a/GSM/GSMCommon.h b/GSM/GSMCommon.h
index 8b8d5e8..f703c30 100644
--- a/GSM/GSMCommon.h
+++ b/GSM/GSMCommon.h
@@ -52,7 +52,9 @@
 extern const BitVector gDummyBurst;

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

diff --git a/Transceiver52M/radioInterface.cpp 
b/Transceiver52M/radioInterface.cpp
index 0f949d7..6245cfc 100644
--- a/Transceiver52M/radioInterface.cpp
+++ b/Transceiver52M/radioInterface.cpp
@@ -245,7 +245,7 @@
* Pre-allocate head room for the largest correlation size
* so we can later avoid a re-allocation and copy
* */
-  size_t head = GSM::gRACHSynchSequence.size();
+  size_t head = GSM::gRACHSynchSequenceTS0.size();

   /*
* Form receive bursts and pass up to transceiver. Use repeating
diff --git a/Transceiver52M/sigProcLib.cpp b/Transceiver52M/sigProcLib.cpp
index 692fbe0..072fb3b 100644
--- a/Transceiver52M/sigProcLib.cpp
+++ b/Transceiver52M/sigProcLib.cpp
@@ -132,7 +132,7 @@

 static CorrelationSequence *gMidambles[] = 
{NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};
 static CorrelationSequence *gEdgeMidambles[] = 
{NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};
-static CorrelationSequence *gRACHSequence = NULL;
+static CorrelationSequence *gRACHSequences[] = {NULL,NULL,NULL};
 static PulseSequence *GSMPulse1 = NULL;
 static PulseSequence *GSMPulse4 = NULL;

@@ -150,11 +150,15 @@
 delayFilters[i] = NULL;
   }

+  for (int i = 0; i < 3; i++) {
+delete gRACHSequences[i];
+gRACHSequences[i] = NULL;
+  }
+
   delete GMSKRotation1;
   delete GMSKReverseRotation1;
   delete GMSKRotation4;
   delete GMSKReverseRotation4;
-  delete gRACHSequence;
   delete GSMPulse1;
   delete GSMPulse4;
   delete dnsampler;
@@ -163,7 +167,6 @@
   GMSKRotation4 = NULL;
   GMSKReverseRotation4 = NULL;
   GMSKReverseRotation1 = NULL;
-  gRACHSequence = NULL;
   GSMPulse1 = NULL;
   GSMPulse4 = NULL;
 }
@@ -1332,7 +1335,7 @@
   return seq;
 }

-static bool generateRACHSequence(int sps)
+static bool generateRACHSequence(CorrelationSequence **seq, const BitVector 
, int sps)
 {
   bool status = true;
   float toa;
@@ -1340,13 +1343,14 @@
   signalVector *autocorr = NULL;
   signalVector *seq0 = NULL, *seq1 = NULL, *_seq1 = NULL;

-  delete gRACHSequence;
+  if (*seq != NULL)
+delete *seq;

-  seq0 = modulateBurst(gRACHSynchSequence, 0, sps, false);
+  seq0 = modulateBurst(bv, 0, sps, false);
   if (!seq0)
 return false;

-  seq1 = modulateBurst(gRACHSynchSequence.segment(0, 40), 0, sps, true);
+  seq1 = modulateBurst(bv.segment(0, 40), 0, sps, true);
   if (!seq1) {
 status = false;
 goto release;
@@ -1366,19 +1370,19 @@
 goto release;
   }

-  gRACHSequence = 

Jenkins build is back to normal : master-osmo-ggsn » --disable-gtp-linux,a2=default,a3=default,osmocom-master-debian9 #1023

2018-10-24 Thread jenkins
See 




Change in osmo-bsc[master]: cosmetic: fix spec ref for gsm0808_cipher_mode()

2018-10-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11437 )

Change subject: cosmetic: fix spec ref for gsm0808_cipher_mode()
..


Patch Set 1:

> What am I missing?

That this code has nothing to do with the 04.08 (Mobile Layer 3), but with 
BSSAP/BSSMAP specified in 08.08.

It's nice that some other spec also mentions something about what that layer of 
the stack / that interface has to do in case of a cipher mode set.  But that 
still doesn't make it apply here.  You have to find the related section in 
08.08 (or these days, 48.008).


--
To view, visit https://gerrit.osmocom.org/11437
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I359caf1dd30f033c0b606040ccf27aa4c5a9d2c6
Gerrit-Change-Number: 11437
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 24 Oct 2018 18:49:53 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-bsc[master]: lchan_fsm: generate proper multirate configuration IE on RSL

2018-10-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11445 )

Change subject: lchan_fsm: generate proper multirate configuration IE on RSL
..

lchan_fsm: generate proper multirate configuration IE on RSL

During the generation of the multirate configuration IE in the channel
activation message that is sent over RSL, all AMR rates except the
highest one are trimmed. This was to ensure that the multirate
configuration IE only contains one codec rate per active set. Lets fix
that and generate a proper IE with threshold and hysteresis values.

- extend lchan_mr_config so that it can generate a full multirate
  configuration IE

Change-Id: I7f9f8e8d9e2724cbe3ce2f3599bc0e5185fd8453
Related: OS#3529
---
M src/osmo-bsc/lchan_fsm.c
M tests/handover/handover_test.c
2 files changed, 72 insertions(+), 58 deletions(-)

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



diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c
index 39edaff..915b62a 100644
--- a/src/osmo-bsc/lchan_fsm.c
+++ b/src/osmo-bsc/lchan_fsm.c
@@ -36,6 +36,8 @@
 #include 
 #include 
 #include 
+#include 
+

 static struct osmo_fsm lchan_fsm;

@@ -402,66 +404,71 @@
osmo_fsm_inst_dispatch(lchan->ts->fi, TS_EV_LCHAN_UNUSED, lchan);
 }

-/*! Configure the multirate setting on this channel. */
-void lchan_mr_config(struct gsm_lchan *lchan, struct gsm48_multi_rate_conf 
*mr_conf)
+/* Configure the multirate setting on this channel. */
+static int lchan_mr_config(struct gsm_lchan *lchan, const struct 
gsm48_multi_rate_conf *mr_conf)
 {
-   struct gsm48_multi_rate_conf *ms_conf, *bts_conf;
bool full_rate = (lchan->type == GSM_LCHAN_TCH_F);
+   struct gsm_bts *bts = lchan->ts->trx->bts;
+   struct bsc_msc_data *msc = lchan->conn->sccp.msc;
+   struct amr_multirate_conf *mr;
+   int rc;
+   int rc_rate;
+   struct gsm48_multi_rate_conf mr_conf_filtered;
+   const struct gsm48_multi_rate_conf *mr_conf_bts;

-   /* initialize the data structure */
-   lchan->mr_ms_lv[0] = sizeof(*ms_conf);
-   lchan->mr_bts_lv[0] = sizeof(*bts_conf);
-   ms_conf = (struct gsm48_multi_rate_conf *) >mr_ms_lv[1];
-   bts_conf = (struct gsm48_multi_rate_conf *) >mr_bts_lv[1];
+   /* There are two different active sets, depending on the channel rate,
+* make sure the appropate one is selected. */
+   if (full_rate)
+   mr = >mr_full;
+   else
+   mr = >mr_half;

-   *ms_conf = *bts_conf = (struct gsm48_multi_rate_conf){
-   .ver = 1,
-   .icmi = 1,
-   .m4_75 = mr_conf->m4_75,
-   .m5_15 = mr_conf->m5_15,
-   .m5_90 = mr_conf->m5_90,
-   .m6_70 = mr_conf->m6_70,
-   .m7_40 = mr_conf->m7_40,
-   .m7_95 = mr_conf->m7_95,
-   .m10_2 = full_rate? mr_conf->m10_2 : 0,
-   .m12_2 = full_rate? mr_conf->m12_2 : 0,
-   };
-}
-
-/* Mask all rates instead of the highest possible */
-static void lchan_mr_config_mask(struct gsm48_multi_rate_conf *mr_conf)
-{
-   unsigned int i;
-   bool highest_seen = false;
-   uint8_t *_mr_conf = (uint8_t *) mr_conf;
-
-   /* FIXME: At the moment we can not support multiple codec rates in one
-* struct gsm48_multi_rate_conf, because the struct lacks the fields
-* for Threshold and Hysteresis. Those fields are not needed when only
-* a single codec rate is in place, but as soon as multiple codec
-* rates are used the parameters are mandatory. The layout for the
-* struct would then also be different because each rate needs its
-* own Threshold and Hysteresis value. (See also 3GPP TS 04.08,
-* chapter 10.5.2.21aa MultiRate configuration).
-*
-* Since we are unable to signal multiple codec rates properly, we just
-* remove all codec rates from the active set, except the highest
-* possible. Doing so we lack the functionality to switch towards the
-* other, lower codec rates that were offered by the MSC, but it is
-* still guaranteed that a rate is selected that is supported by all
-* entities.
-*
-* To fix this problem, we should implement a proper encoder for
-* struct gsm48_multi_rate_conf, in libosmocore and use it here.
-* struct amr_mode already seems to have members for threshold and
-* hysteresis we can use. */
-
-   for (i = 7; i > 0; i--) {
-   if (_mr_conf[1] & (1 << i) && highest_seen == false) {
-   highest_seen = true;
-   } else if (highest_seen)
-   _mr_conf[1] &= ~(1 << i);
+   /* The VTY allows to forbid certain codec rates. Unfortunately we can
+* not articulate all of the prohibitions on through S0-S15 on the A
+* 

Change in libosmocore[master]: stats_statsd: Send all stat_items as gauges

2018-10-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11323 )

Change subject: stats_statsd: Send all stat_items as gauges
..

stats_statsd: Send all stat_items as gauges

When sending a statsd metric we need to specify a type which can be a
"g"auge, "c"ounter, "t"imer, "h"istogram, and "m"eter.

We used to just pass the stat_item unit into this field, but that is the
unit of the metric (Seconds for a timer, % for utilization, ...).

Change the type field so stat_items are sent as "g"auges. Note that
negative values don't seem to be supported by statsd.

Change-Id: Ia16270d36c9a14521594de4b99a48c83e4ac07d4
---
M src/stats_statsd.c
1 file changed, 8 insertions(+), 11 deletions(-)

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



diff --git a/src/stats_statsd.c b/src/stats_statsd.c
index 5ae2570..c3f739e 100644
--- a/src/stats_statsd.c
+++ b/src/stats_statsd.c
@@ -184,20 +184,17 @@
const struct osmo_stat_item_group *statg,
const struct osmo_stat_item_desc *desc, int64_t value)
 {
-   const char *unit = desc->unit;
-
-   if (unit == OSMO_STAT_ITEM_NO_UNIT) {
-   unit = "g";
-   if (value < 0)
-   osmo_stats_reporter_statsd_send(srep,
+   if (value < 0) {
+   return osmo_stats_reporter_statsd_send(srep,
statg->desc->group_name_prefix,
statg->idx,
-   desc->name, 0, unit);
+   desc->name, 0, "g");
+   } else {
+   return osmo_stats_reporter_statsd_send(srep,
+   statg->desc->group_name_prefix,
+   statg->idx,
+   desc->name, value, "g");
}
-   return osmo_stats_reporter_statsd_send(srep,
-   statg->desc->group_name_prefix,
-   statg->idx,
-   desc->name, value, unit);
 }
 #endif /* !EMBEDDED */


--
To view, visit https://gerrit.osmocom.org/11323
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia16270d36c9a14521594de4b99a48c83e4ac07d4
Gerrit-Change-Number: 11323
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: lynxis lazus 


Change in libosmocore[master]: stats_statsd: Send all stat_items as gauges

2018-10-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11323 )

Change subject: stats_statsd: Send all stat_items as gauges
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11323
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia16270d36c9a14521594de4b99a48c83e4ac07d4
Gerrit-Change-Number: 11323
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Comment-Date: Wed, 24 Oct 2018 18:46:38 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bts[master]: common/scheduler.c: track TDMA frame loss per logical channels

2018-10-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10309 )

Change subject: common/scheduler.c: track TDMA frame loss per logical channels
..


Patch Set 4: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/10309
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I70d05b67a35ddcbdd1b6394dbd7198404a440e76
Gerrit-Change-Number: 10309
Gerrit-PatchSet: 4
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Wed, 24 Oct 2018 18:45:27 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmocore[master]: GSUP/SM: (WIP) introduce MO/MT FORWARD_SM messages

2018-10-24 Thread Vadim Yanitskiy
Vadim Yanitskiy has abandoned this change. ( https://gerrit.osmocom.org/11069 )

Change subject: GSUP/SM: (WIP) introduce MO/MT FORWARD_SM messages
..


Abandoned
--
To view, visit https://gerrit.osmocom.org/11069
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: Ibe325c64ae2d6c626b232533bb4cbc65fc2b5d71
Gerrit-Change-Number: 11069
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in libosmocore[master]: GSUP/SM: (WIP) introduce new SRI_FOR_SM message

2018-10-24 Thread Vadim Yanitskiy
Vadim Yanitskiy has abandoned this change. ( https://gerrit.osmocom.org/11068 )

Change subject: GSUP/SM: (WIP) introduce new SRI_FOR_SM message
..


Abandoned
--
To view, visit https://gerrit.osmocom.org/11068
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: I4303dc817a5f8ee97b78d840672c443a6eddb332
Gerrit-Change-Number: 11068
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-bts[master]: common/scheduler.c: track TDMA frame loss per logical channels

2018-10-24 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/10309 )

Change subject: common/scheduler.c: track TDMA frame loss per logical channels
..


Patch Set 4: Code-Review+1

+1, It has been tested locally by Vadim and I can take over from it and do some 
improvements from here.


--
To view, visit https://gerrit.osmocom.org/10309
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I70d05b67a35ddcbdd1b6394dbd7198404a440e76
Gerrit-Change-Number: 10309
Gerrit-PatchSet: 4
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Wed, 24 Oct 2018 16:42:31 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bts[master]: common/scheduler.c: track TDMA frame loss per logical channels

2018-10-24 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/10309 )

Change subject: common/scheduler.c: track TDMA frame loss per logical channels
..


Set Ready For Review


--
To view, visit https://gerrit.osmocom.org/10309
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I70d05b67a35ddcbdd1b6394dbd7198404a440e76
Gerrit-Change-Number: 10309
Gerrit-PatchSet: 4
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Wed, 24 Oct 2018 16:21:34 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmocom-bb[master]: mobile: display MS IMSI in vty

2018-10-24 Thread Max
Max has abandoned this change. ( https://gerrit.osmocom.org/11440 )

Change subject: mobile: display MS IMSI in vty
..


Abandoned
--
To view, visit https://gerrit.osmocom.org/11440
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: Id05f4f5f3416dcdb9ce2fd24f9360f5e6faaf654
Gerrit-Change-Number: 11440
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: fixeria 


Jenkins build is back to normal : master-sysmo-usim-tool » a1=default,a2=default,a3=default,simtester #76

2018-10-24 Thread jenkins
See 




Build failed in Jenkins: master-sysmo-usim-tool » a1=default,a2=default,a3=default,simtester #75

2018-10-24 Thread jenkins
See 


Changes:

[pma...@sysmocom.de] sysmo_usimsjs1: use correct parameter for 3G auth

--
Started by upstream project "master-sysmo-usim-tool" build number 75
originally caused by:
 Started by an SCM change
Building remotely on simtester in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url git://git.sysmocom.de/sysmo-usim-tool # 
 > timeout=10
Fetching upstream changes from git://git.sysmocom.de/sysmo-usim-tool
 > git --version # timeout=10
 > git fetch --tags --progress git://git.sysmocom.de/sysmo-usim-tool 
 > +refs/heads/*:refs/remotes/origin/*
Checking out Revision 4fb937bf468d53c5dd06a6d1b91dd90fcb5acd3c 
(refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 4fb937bf468d53c5dd06a6d1b91dd90fcb5acd3c
Commit message: "sysmo_usimsjs1: use correct parameter for 3G auth"
 > git rev-list --no-walk b8845748f5f5a5834c47d65983ec196025164ed9 # timeout=10
[simtester] $ /bin/sh -xe /tmp/jenkins5608341372603670905.sh
+ cd ./tests
+ ./run-tests
 PREPARING TEST CARD 
sysmoUSIM-SJS1 parameterization tool
Copyright (c)2017 Sysmocom s.f.m.c. GmbH

Initializing smartcard terminal...

Detected Card ICCID:  898821132030028

Authenticating...
 * Remaining attempts: 3
 * Authenticating...
 * Authentication successful
 * Remaining attempts: 3

Detected Card IMSI:  26242320302

Writing ICCID value...
 * New ICCID setting:
   ICCID: 898821132030028f
 * Initalizing...
 * Programming...

Done!
sysmoUSIM-SJS1 parameterization tool
Copyright (c)2017 Sysmocom s.f.m.c. GmbH

Initializing smartcard terminal...

Detected Card ICCID:  898821132030028

Authenticating...
 * Remaining attempts: 3
 * Authenticating...
 * Authentication successful
 * Remaining attempts: 3

Detected Card IMSI:  26242320302

Writing IMSI value...
 * New ISMI setting:
   IMSI: 926242320302
 * Initalizing...
 * Programming...

Done!
 TEST CARD PREPARED =

==> Executing Testcase 01_auth.sh
Test 01_auth.sh passed
==> Executing Testcase 02_mode_read.sh
Test 02_mode_read.sh passed
==> Executing Testcase 03_mode_write.sh
Test 03_mode_write.sh passed
==> Executing Testcase 04_algo.sh
--- 04_algo.out 2018-10-15 15:44:13.097293287 +0200
+++ /tmp/filellbs8m 2018-10-24 17:25:04.109788524 +0200
@@ -62,7 +62,7 @@
 Programming Authentication parameters...
  * New algorithm setting:
2G: 3=COMP128v1
-   3G: 3=COMP128v1
+   3G: 1=MILENAGE
  * Initalizing...
  * Programming...
 
@@ -87,7 +87,7 @@
  * Reading...
  * Current algorithm setting:
2G: 3=COMP128v1
-   3G: 3=COMP128v1
+   3G: 1=MILENAGE
 
 Done!
 sysmoUSIM-SJS1 parameterization tool
@@ -108,7 +108,7 @@
 Programming Authentication parameters...
  * New algorithm setting:
2G: 4=XOR-2G
-   3G: 4=XOR-2G
+   3G: 1=MILENAGE
  * Initalizing...
  * Programming...
 
@@ -133,7 +133,7 @@
  * Reading...
  * Current algorithm setting:
2G: 4=XOR-2G
-   3G: 4=XOR-2G
+   3G: 1=MILENAGE
 
 Done!
 sysmoUSIM-SJS1 parameterization tool
@@ -154,7 +154,7 @@
 Programming Authentication parameters...
  * New algorithm setting:
2G: 5=GBA
-   3G: 5=GBA
+   3G: 1=MILENAGE
  * Initalizing...
  * Programming...
 
@@ -179,7 +179,7 @@
  * Reading...
  * Current algorithm setting:
2G: 5=GBA
-   3G: 5=GBA
+   3G: 1=MILENAGE
 
 Done!
 sysmoUSIM-SJS1 parameterization tool
@@ -200,7 +200,7 @@
 Programming Authentication parameters...
  * New algorithm setting:
2G: 6=COMP128v2
-   3G: 6=COMP128v2
+   3G: 1=MILENAGE
  * Initalizing...
  * Programming...
 
@@ -225,7 +225,7 @@
  * Reading...
  * Current algorithm setting:
2G: 6=COMP128v2
-   3G: 6=COMP128v2
+   3G: 1=MILENAGE
 
 Done!
 sysmoUSIM-SJS1 parameterization tool
@@ -246,7 +246,7 @@
 Programming Authentication parameters...
  * New algorithm setting:
2G: 7=COMP128v3
-   3G: 7=COMP128v3
+   3G: 1=MILENAGE
  * Initalizing...
  * Programming...
 
@@ -271,7 +271,7 @@
  * Reading...
  * Current algorithm setting:
2G: 7=COMP128v3
-   3G: 7=COMP128v3
+   3G: 1=MILENAGE
 
 Done!
 sysmoUSIM-SJS1 parameterization tool
@@ -292,7 +292,7 @@
 Programming Authentication parameters...
  * New algorithm setting:
2G: 9=CIS-B
-   3G: 9=CIS-B
+   3G: 1=MILENAGE
  * Initalizing...
  * Programming...
 
@@ -317,7 +317,7 @@
  * Reading...
  * Current algorithm setting:
2G: 9=CIS-B
-   3G: 9=CIS-B
+   3G: 1=MILENAGE
 
 Done!
 sysmoUSIM-SJS1 parameterization tool
@@ -338,7 +338,7 @@
 Programming Authentication parameters...
  * New algorithm setting:
2G: 5=GBA
-   3G: 5=GBA
+   3G: 8=XOR-3G
  * Initalizing...
  * Programming...
 
@@ -363,7 +363,7 @@
  

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

2018-10-24 Thread jenkins
See 


--
[...truncated 3.67 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 

Change in osmo-bts[master]: bts-trx: Try decoding received UL bursts when SACCH frame detected as...

2018-10-24 Thread Pau Espin Pedrol
Pau Espin Pedrol has abandoned this change. ( https://gerrit.osmocom.org/11446 )

Change subject: bts-trx: Try decoding received UL bursts when SACCH frame 
detected as lost
..


Abandoned

Same issue fixed by without need to make code more complex. I agree correct fix 
is to make sure we don't loss frames in TRX. 
https://gerrit.osmocom.org/#/c/docker-playground/+/11453/
--
To view, visit https://gerrit.osmocom.org/11446
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: I910277df181df5082b234c1c97a75eebdffc2cb5
Gerrit-Change-Number: 11446
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 


Change in docker-playground[master]: bts: jenkins.sh: increase trx-advance in trxcon

2018-10-24 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/11453


Change subject: bts: jenkins.sh: increase trx-advance in trxcon
..

bts: jenkins.sh: increase trx-advance in trxcon

Otherwise sometimes 4th UL SACCH burst arrives too late and osmo-bts-trx
submits a fake ul meas report instead of using actual frame in progress
of being received, resulting in rxqual=7.

Fixes: OS#3665
Change-Id: I37836024b20305a3f561ef9971838154a511b978
---
M ttcn3-bts-test/jenkins.sh
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/53/11453/1

diff --git a/ttcn3-bts-test/jenkins.sh b/ttcn3-bts-test/jenkins.sh
index fe448f5..3f93400 100755
--- a/ttcn3-bts-test/jenkins.sh
+++ b/ttcn3-bts-test/jenkins.sh
@@ -50,7 +50,7 @@
-v $VOL_BASE_DIR/unix:/data/unix \
--name ${BUILD_TAG}-trxcon -d \
$REPO_USER/osmocom-bb-host-master \
-   /usr/local/bin/trxcon -i 172.18.9.21 -s /data/unix/osmocom_l2
+   /usr/local/bin/trxcon -i 172.18.9.21 -s /data/unix/osmocom_l2 
-f 21


 echo Starting container with BTS testsuite

--
To view, visit https://gerrit.osmocom.org/11453
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I37836024b20305a3f561ef9971838154a511b978
Gerrit-Change-Number: 11453
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-ttcn3-hacks[master]: RSL_Emulation: Fail explicitly on ASP_IPA_EVENT_DOWN

2018-10-24 Thread daniel
daniel has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11429 )

Change subject: RSL_Emulation: Fail explicitly on ASP_IPA_EVENT_DOWN
..

RSL_Emulation: Fail explicitly on ASP_IPA_EVENT_DOWN

Otherwise RSL layer fails this way when this event is received:

RSL_Emulation.ttcn:429 Receive operation on port IPA_PT succeeded, message from 
TC_chan_act_a51-RSL-IPA(3): @IPA_Emulation.ASP_IPA_Event: { up_down := 
ASP_IPA_EVENT_DOWN (0) } id 9
- Function main_client was stopped. PTC terminates.
RSL_Emulation.ttcn:429 Message with id 9 was extracted from the queue of IPA_PT.
RSL_Emulation.ttcn:430 setverdict(fail): none -> fail reason: "Received unknown 
primitive from IPA", new component reason: "Received unknown primitive from IPA"

We now fail with a clearer message "Lost IPA connection!". These
failures seem to happen under high load when the BTS doesn't get a
steady clock from osmo-trx.

Change-Id: Idc6565c9de72d98015d56a41e5616c46051c8a8d
---
M library/RSL_Emulation.ttcn
1 file changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/library/RSL_Emulation.ttcn b/library/RSL_Emulation.ttcn
index c56c278..cf02d00 100644
--- a/library/RSL_Emulation.ttcn
+++ b/library/RSL_Emulation.ttcn
@@ -23,6 +23,7 @@
  * (at your option) any later version.
  */

+import from Misc_Helpers all;
 import from General_Types all;
 import from Osmocom_Types all;
 import from GSM_Types all;
@@ -346,6 +347,13 @@
[not bts_role] IPA_PT.receive(ASP_IPA_Event:{up_down := 
ASP_IPA_EVENT_UP}) -> value evt {
CCHAN_PT.send(evt);
}
+   [bts_role] IPA_PT.receive(ASP_IPA_Event:{up_down := 
ASP_IPA_EVENT_DOWN}) {
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, 
"Lost IPA connection!");
+
+   }
+   [not bts_role] IPA_PT.receive(ASP_IPA_Event:{up_down := 
ASP_IPA_EVENT_DOWN}) {
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, 
"Lost IPA connection!");
+   }
[bts_role] IPA_PT.receive(ASP_IPA_Event:{up_down := 
ASP_IPA_EVENT_ID_ACK}) {

IPA_PT.send(ts_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,ts_RSL_PAGING_LOAD_IND(23)));
}

--
To view, visit https://gerrit.osmocom.org/11429
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Idc6565c9de72d98015d56a41e5616c46051c8a8d
Gerrit-Change-Number: 11429
Gerrit-PatchSet: 5
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: daniel 
Gerrit-CC: Harald Welte 


Change in libosmocore[master]: stats_statsd: Send all stat_items as gauges

2018-10-24 Thread daniel
Hello lynxis lazus, Harald Welte, Jenkins Builder, Holger Freyther,

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

https://gerrit.osmocom.org/11323

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

Change subject: stats_statsd: Send all stat_items as gauges
..

stats_statsd: Send all stat_items as gauges

When sending a statsd metric we need to specify a type which can be a
"g"auge, "c"ounter, "t"imer, "h"istogram, and "m"eter.

We used to just pass the stat_item unit into this field, but that is the
unit of the metric (Seconds for a timer, % for utilization, ...).

Change the type field so stat_items are sent as "g"auges. Note that
negative values don't seem to be supported by statsd.

Change-Id: Ia16270d36c9a14521594de4b99a48c83e4ac07d4
---
M src/stats_statsd.c
1 file changed, 8 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/23/11323/2
--
To view, visit https://gerrit.osmocom.org/11323
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia16270d36c9a14521594de4b99a48c83e4ac07d4
Gerrit-Change-Number: 11323
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: lynxis lazus 


Change in osmo-ttcn3-hacks[master]: RSL_Emulation: Fail explicitly on ASP_IPA_EVENT_DOWN

2018-10-24 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/11429 )

Change subject: RSL_Emulation: Fail explicitly on ASP_IPA_EVENT_DOWN
..


Patch Set 5: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11429
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc6565c9de72d98015d56a41e5616c46051c8a8d
Gerrit-Change-Number: 11429
Gerrit-PatchSet: 5
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: daniel 
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Wed, 24 Oct 2018 14:37:14 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: RSL_Emulation: Fail explicitly on ASP_IPA_EVENT_DOWN

2018-10-24 Thread daniel
daniel has uploaded a new patch set (#5) to the change originally created by 
Pau Espin Pedrol. ( https://gerrit.osmocom.org/11429 )

Change subject: RSL_Emulation: Fail explicitly on ASP_IPA_EVENT_DOWN
..

RSL_Emulation: Fail explicitly on ASP_IPA_EVENT_DOWN

Otherwise RSL layer fails this way when this event is received:

RSL_Emulation.ttcn:429 Receive operation on port IPA_PT succeeded, message from 
TC_chan_act_a51-RSL-IPA(3): @IPA_Emulation.ASP_IPA_Event: { up_down := 
ASP_IPA_EVENT_DOWN (0) } id 9
- Function main_client was stopped. PTC terminates.
RSL_Emulation.ttcn:429 Message with id 9 was extracted from the queue of IPA_PT.
RSL_Emulation.ttcn:430 setverdict(fail): none -> fail reason: "Received unknown 
primitive from IPA", new component reason: "Received unknown primitive from IPA"

We now fail with a clearer message "Lost IPA connection!". These
failures seem to happen under high load when the BTS doesn't get a
steady clock from osmo-trx.

Change-Id: Idc6565c9de72d98015d56a41e5616c46051c8a8d
---
M library/RSL_Emulation.ttcn
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/29/11429/5
--
To view, visit https://gerrit.osmocom.org/11429
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idc6565c9de72d98015d56a41e5616c46051c8a8d
Gerrit-Change-Number: 11429
Gerrit-PatchSet: 5
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: daniel 
Gerrit-CC: Harald Welte 


Change in osmo-ttcn3-hacks[master]: Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling

2018-10-24 Thread daniel
daniel has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11451 )

Change subject: Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling
..

Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling

This function can now be called from anywhere to try and safely shutdown
a testcase. It is not optimal as we can't call "all component.stop" from
outside the mtc, but without any proper and orderly shutdown handling of
all our emulation components I believe this is the best we can do.

To use it:

import from Misc_Helpers all;

in your module and then call

Misc_Helpers.f_shutdown(__BFILE__, __LINE__);

You can also pass the function a verdict and a message and it will take care
of calling setverdict, but beware of the following:

While setverdict would accept any number of arguments as log message
and convert them to a log string f_shutdown expects one charstring.
It's possible to use the log2str function to use the log arguments in
setverdict for f_shutdown, for example

setverdict(fail, "Template didn't match: ", tmpl_foo);
would become
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("Template didn't 
match: ", tmpl_foo));

Change-Id: I84d1aa6732f6b748d2bfdeac8f6309023717f267
---
M bsc-nat/gen_links.sh
M bsc/gen_links.sh
M ggsn_tests/gen_links.sh
M hlr/gen_links.sh
M lapdm/gen_links.sh
A library/Misc_Helpers.ttcn
M mgw/gen_links.sh
M msc/gen_links.sh
M pcu/gen_links.sh
M sccp/gen_links.sh
M selftest/gen_links.sh
M sgsn/gen_links.sh
M sip/gen_links.sh
M sysinfo/gen_links.sh
14 files changed, 41 insertions(+), 13 deletions(-)

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



diff --git a/bsc-nat/gen_links.sh b/bsc-nat/gen_links.sh
index 453d8ca..1ab54f1 100755
--- a/bsc-nat/gen_links.sh
+++ b/bsc-nat/gen_links.sh
@@ -47,7 +47,7 @@
 gen_links $DIR $FILES

 DIR=../library
-FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn 
IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc 
IPA_Emulation.ttcnpp L3_Templates.ttcn BSSMAP_Templates.ttcn 
BSSMAP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn 
MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc 
Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn BSSAP_CodecPort.ttcn"
+FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn 
IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn 
IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp L3_Templates.ttcn 
BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn 
MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn 
MGCP_CodecPort_CtrlFunctDef.cc Osmocom_CTRL_Types.ttcn 
Osmocom_CTRL_Functions.ttcn BSSAP_CodecPort.ttcn"
 gen_links $DIR $FILES

 ignore_pp_results
diff --git a/bsc/gen_links.sh b/bsc/gen_links.sh
index 88983d7..bf10761 100755
--- a/bsc/gen_links.sh
+++ b/bsc/gen_links.sh
@@ -67,7 +67,7 @@
 gen_links $DIR $FILES

 DIR=../library
-FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn 
Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc 
IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn 
IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp L3_Templates.ttcn 
BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn RLCMAC_CSN1_Types.ttcn 
GSM_RR_Types.ttcn RSL_Types.ttcn RSL_Emulation.ttcn MGCP_Emulation.ttcn 
MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn 
MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc 
BSSAP_CodecPort.ttcn BSSAP_Adapter.ttcn Osmocom_CTRL_Types.ttcn 
Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn RTP_CodecPort.ttcn 
RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc RTP_Emulation.ttcn 
IuUP_Types.ttcn IuUP_EncDec.cc IuUP_Emulation.ttcn SCCP_Templates.ttcn 
IPA_Testing.ttcn"
+FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn 
Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc 
IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn 
IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp L3_Templates.ttcn 
BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn RLCMAC_CSN1_Types.ttcn 
GSM_RR_Types.ttcn RSL_Types.ttcn RSL_Emulation.ttcn MGCP_Emulation.ttcn 
MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn 
MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc 
BSSAP_CodecPort.ttcn BSSAP_Adapter.ttcn Osmocom_CTRL_Types.ttcn 
Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn RTP_CodecPort.ttcn 
RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc RTP_Emulation.ttcn 
IuUP_Types.ttcn IuUP_EncDec.cc IuUP_Emulation.ttcn SCCP_Templates.ttcn 
IPA_Testing.ttcn"
 gen_links $DIR $FILES

 ignore_pp_results
diff --git a/ggsn_tests/gen_links.sh b/ggsn_tests/gen_links.sh
index 4e012ae..82e35d4 100755
--- a/ggsn_tests/gen_links.sh
+++ b/ggsn_tests/gen_links.sh
@@ -45,7 +45,7 @@
 gen_links $DIR $FILES

 

Change in osmo-ttcn3-hacks[master]: BTS_Tests: Use Misc_Helpers.f_shutdown consistently

2018-10-24 Thread daniel
daniel has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11452 )

Change subject: BTS_Tests: Use Misc_Helpers.f_shutdown consistently
..

BTS_Tests: Use Misc_Helpers.f_shutdown consistently

Replace all calls to setverdict(fail) with f_shutdown() since I'd rather
fail and stop early in case we encounter an error.
Only replace setverdict(pass) with f_shutdown() if it is followed by
mtc.stop

Remove internal function f_shutdown and use the one from Misc_Helpers

Change-Id: Ia8b01a1876e969d6f0760ea625e4df83af4f54ca
---
M bts/BTS_Tests.ttcn
M bts/gen_links.sh
2 files changed, 131 insertions(+), 208 deletions(-)

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



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index fe0a933..5b073ef 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -1,5 +1,6 @@
 module BTS_Tests {

+import from Misc_Helpers all;
 import from General_Types all;
 import from GSM_Types all;
 import from GSM_RR_Types all;
@@ -270,8 +271,7 @@
pcu_last_info := sd.data;
}
[] pt.receive(t_SD_PCUIF(pcu_conn_id, tr_PCUIF_INFO_IND(?, ?, ?))) -> 
value sd {
-   setverdict(fail, "Invalid PCU Version/BTS Number received");
-   mtc.stop;
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Invalid PCU 
Version/BTS Number received");
}
 }

@@ -289,8 +289,7 @@
alt {
[] as_pcu_info_ind(pt, pcu_conn_id, pcu_last_info);
[] T.timeout {
-   setverdict(fail, "Timeout waiting for PCU INFO_IND");
-   mtc.stop;
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Timeout 
waiting for PCU INFO_IND");
}
}
 }
@@ -341,8 +340,7 @@
alt {
[] RSL_CCHAN.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP});
[] T.timeout {
-   setverdict(fail, "Timeout waiting for ASP_IPA_EVENT_UP");
-   mtc.stop;
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Timeout 
waiting for ASP_IPA_EVENT_UP");
}
}
f_sleep(0.5);   /* workaround for OS#3000 */
@@ -366,12 +364,6 @@
}
 }

-function f_shutdown() runs on test_CT {
-   /* mtc.stop cleanly stops testcase execution to avoid unclean shutdown 
*/
-   all component.stop;
-   mtc.stop;
-}
-
 /* Attach L1CTL to master test_CT (classic tests, non-handler mode) */
 function f_init_l1ctl() runs on test_CT {
map(self:L1CTL, system:L1CTL);
@@ -415,8 +407,7 @@

 private altstep as_Tguard() runs on ConnHdlr {
[] g_Tguard.timeout {
-   setverdict(fail, "Tguard timeout");
-   mtc.stop;
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Tguard 
timeout");
}
 }

@@ -430,8 +421,7 @@
res := TRXC_CodecPort_CtrlFunct.f_IPL4_connect(BB_TRXC, mp_bb_trxc_ip, 
mp_bb_trxc_port,
"", -1, -1, {udp:={}}, 
{});
if (not ispresent(res.connId)) {
-   setverdict(fail, "Could not connect to trx-control interface of 
trxcon, check your configuration");
-   mtc.stop;
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Could not 
connect to trx-control interface of trxcon, check your configuration");
}
g_bb_trxc_conn_id := res.connId;
 }
@@ -481,15 +471,13 @@
setverdict(pass);
}
[] T.timeout {
-   setverdict(fail, "Timeout expecting " & id);
-   mtc.stop;
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Timeout 
expecting " & id);
}
[not ignore_other] as_l1_sacch();
[not ignore_other] as_meas_res();
[not ignore_other] as_l1_dcch();
[not ignore_other] RSL.receive {
-   setverdict(fail, "Unexpected RSL message received");
-   mtc.stop;
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Unexpected 
RSL message received");
}
[ignore_other] RSL.receive { repeat; }
}
@@ -566,7 +554,7 @@
f_init(testcasename());
vc_conn := f_start_handler(refers(f_TC_chan_act_stress), pars);
vc_conn.done;
-   f_shutdown();
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
 }

 /* Test if re-activation of an already active channel fails as expected */
@@ -576,8 +564,7 @@
RSL.send(ts_RSL_CHAN_ACT(g_chan_nr, g_pars.chan_mode));
alt {
[] RSL.receive(tr_RSL_CHAN_ACT_ACK(g_chan_nr)) {
-   setverdict(fail, "Unexpected CHAN ACT ACK on double 
activation");
-   mtc.stop;
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Unexpected 
CHAN ACT ACK on double activation");
}
[] RSL.receive(tr_RSL_CHAN_ACT_NACK(g_chan_nr)) {
 

Change in osmo-ttcn3-hacks[master]: RSL_Emulation: Fail explicitly on ASP_IPA_EVENT_DOWN

2018-10-24 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/11429 )

Change subject: RSL_Emulation: Fail explicitly on ASP_IPA_EVENT_DOWN
..


Patch Set 4: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/#/c/11429/4/library/RSL_Emulation.ttcn
File library/RSL_Emulation.ttcn:

https://gerrit.osmocom.org/#/c/11429/4/library/RSL_Emulation.ttcn@354
PS4, Line 354:  [not bts_role] IPA_PT.receive(ASP_IPA_Event:{up_down := 
ASP_IPA_EVENT_DOWN}) -> value evt {
you can drop "-> value evt" here.



--
To view, visit https://gerrit.osmocom.org/11429
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc6565c9de72d98015d56a41e5616c46051c8a8d
Gerrit-Change-Number: 11429
Gerrit-PatchSet: 4
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: daniel 
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Wed, 24 Oct 2018 14:17:15 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in libosmocore[master]: stats_statsd: Send all stat_items as gauges

2018-10-24 Thread daniel
daniel has posted comments on this change. ( https://gerrit.osmocom.org/11323 )

Change subject: stats_statsd: Send all stat_items as gauges
..


Patch Set 1:

(1 comment)

The stats test actually implements its own srep->send_item, so we couldn't do 
it through make check easily.

We could do with TTCN3, but there's no support for statsd at the moment so we 
need that first.

https://gerrit.osmocom.org/#/c/11323/1/src/stats_statsd.c
File src/stats_statsd.c:

https://gerrit.osmocom.org/#/c/11323/1/src/stats_statsd.c@187
PS1, Line 187: const char *unit = desc->unit;
> Can you move this into the if below.
I should probably just remove this as unit is no longer used and also remove 
the if (unit ==... check



--
To view, visit https://gerrit.osmocom.org/11323
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia16270d36c9a14521594de4b99a48c83e4ac07d4
Gerrit-Change-Number: 11323
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Comment-Date: Wed, 24 Oct 2018 14:16:25 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-ttcn3-hacks[master]: Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling

2018-10-24 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/11451 )

Change subject: Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11451
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I84d1aa6732f6b748d2bfdeac8f6309023717f267
Gerrit-Change-Number: 11451
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: daniel 
Gerrit-Comment-Date: Wed, 24 Oct 2018 14:15:56 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: BTS_Tests: Use Misc_Helpers.f_shutdown consistently

2018-10-24 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/11452 )

Change subject: BTS_Tests: Use Misc_Helpers.f_shutdown consistently
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11452
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia8b01a1876e969d6f0760ea625e4df83af4f54ca
Gerrit-Change-Number: 11452
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 24 Oct 2018 14:15:59 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: bsc_vty: check amr mode parameters

2018-10-24 Thread dexter
dexter has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11444 )

Change subject: bsc_vty: check amr mode parameters
..

bsc_vty: check amr mode parameters

The vty already has a well working interface to configure the AMR
mode, threshold and hysteresis parameters. However there are no checks
yet to prevent against misconfiguration.

- Use gsm48_multirate_config() to perform a global check of the overall
  configuration

- Add check AMR modes during input (order, duplicates)

Change-Id: I8b9f69b89a39bbf4800d9790f7abe43ce66aeb71
Related: OS#3529
---
M src/osmo-bsc/bsc_vty.c
1 file changed, 104 insertions(+), 21 deletions(-)

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



diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index 08b5dad..dd540c1 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -3511,11 +3511,45 @@
struct gsm48_multi_rate_conf *mr_conf =
(struct gsm48_multi_rate_conf *) mr->gsm48_ie;
int i;
+   int mode;
+   int mode_prev = -1;

+   /* Check if mode parameters are in order */
+   for (i = 0; i < argc; i++) {
+   mode = atoi(argv[i]);
+   if (mode_prev > mode) {
+   vty_out(vty, "Modes must be listed in order%s",
+   VTY_NEWLINE);
+   return;
+   }
+
+   if (mode_prev == mode) {
+   vty_out(vty, "Modes must be unique %s", VTY_NEWLINE);
+   return;
+   }
+   mode_prev = mode;
+   }
+
+   /* Prepare the multirate configuration IE */
mr->gsm48_ie[1] = 0;
for (i = 0; i < argc; i++)
mr->gsm48_ie[1] |= 1 << atoi(argv[i]);
mr_conf->icmi = 0;
+
+   /* Store actual mode identifier values */
+   for (i = 0; i < argc; i++) {
+   mr->ms_mode[i].mode = atoi(argv[i]);
+   mr->bts_mode[i].mode = atoi(argv[i]);
+   }
+   mr->num_modes = argc;
+
+   /* Trim excess threshold and hysteresis values from previous config */
+   for (i = argc - 1; i < 4; i++) {
+   mr->ms_mode[i].threshold = 0;
+   mr->bts_mode[i].threshold = 0;
+   mr->ms_mode[i].hysteresis = 0;
+   mr->bts_mode[i].hysteresis = 0;
+   }
 }

 static void get_amr_th_from_arg(struct vty *vty, int argc, const char *argv[], 
int full)
@@ -3567,6 +3601,55 @@
}
 }

+/* Give the current amr configuration a final consistency chack by feeding the
+ * the configuration into the gsm48 multirate IE generator function */
+static int check_amr_config(struct vty *vty)
+{
+   int rc = 0;
+   struct amr_multirate_conf *mr;
+   const struct gsm48_multi_rate_conf *mr_conf;
+   struct gsm_bts *bts = vty->index;
+   int vty_rc = CMD_SUCCESS;
+
+   mr = >mr_full;
+   mr_conf = (struct gsm48_multi_rate_conf*) mr->gsm48_ie;
+   rc = gsm48_multirate_config(NULL, mr_conf, mr->ms_mode, mr->num_modes);
+   if (rc != 0) {
+   vty_out(vty,
+   "Invalid AMR multirate configuration (tch-f, ms) - 
check parameters%s",
+   VTY_NEWLINE);
+   vty_rc = CMD_WARNING;
+   }
+
+   rc = gsm48_multirate_config(NULL, mr_conf, mr->bts_mode, mr->num_modes);
+   if (rc != 0) {
+   vty_out(vty,
+   "Invalid AMR multirate configuration (tch-f, bts) - 
check parameters%s",
+   VTY_NEWLINE);
+   vty_rc = CMD_WARNING;
+   }
+
+   mr = >mr_half;
+   mr_conf = (struct gsm48_multi_rate_conf*) mr->gsm48_ie;
+   rc = gsm48_multirate_config(NULL, mr_conf, mr->ms_mode, mr->num_modes);
+   if (rc != 0) {
+   vty_out(vty,
+   "Invalid AMR multirate configuration (tch-h, ms) - 
check parameters%s",
+   VTY_NEWLINE);
+   vty_rc = CMD_WARNING;
+   }
+
+   rc = gsm48_multirate_config(NULL, mr_conf, mr->bts_mode, mr->num_modes);
+   if (rc != 0) {
+   vty_out(vty,
+   "Invalid AMR multirate configuration (tch-h, bts) - 
check parameters%s",
+   VTY_NEWLINE);
+   vty_rc = CMD_WARNING;
+   }
+
+   return vty_rc;
+}
+
 #define AMR_TCHF_PAR_STR " (0|1|2|3|4|5|6|7)"
 #define AMR_TCHF_HELP_STR "4,75k\n5,15k\n5,90k\n6,70k\n7,40k\n7,95k\n" \
"10,2k\n12,2k\n"
@@ -3583,7 +3666,7 @@
AMR_TCHF_HELP_STR)
 {
get_amr_from_arg(vty, 1, argv, 1);
-   return CMD_SUCCESS;
+   return check_amr_config(vty);
 }

 DEFUN(cfg_bts_amr_fr_modes2, cfg_bts_amr_fr_modes2_cmd,
@@ -3592,7 +3675,7 @@
AMR_TCHF_HELP_STR AMR_TCHF_HELP_STR)
 {
get_amr_from_arg(vty, 2, argv, 1);
-   return CMD_SUCCESS;
+   

Change in osmo-ttcn3-hacks[master]: Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling

2018-10-24 Thread daniel
daniel has posted comments on this change. ( https://gerrit.osmocom.org/11451 )

Change subject: Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling
..


Patch Set 1:

(2 comments)

https://gerrit.osmocom.org/#/c/11451/1/library/Misc_Helpers.ttcn
File library/Misc_Helpers.ttcn:

https://gerrit.osmocom.org/#/c/11451/1/library/Misc_Helpers.ttcn@3
PS1, Line 3: /* Try to properly shutdown a testcase.
> whitespace
Done


https://gerrit.osmocom.org/#/c/11451/1/library/Misc_Helpers.ttcn@15
PS1, Line 15:
> Yes, just passed them as separate parameters to f_shutdown function, probably 
> best is first place si […]
Done



--
To view, visit https://gerrit.osmocom.org/11451
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I84d1aa6732f6b748d2bfdeac8f6309023717f267
Gerrit-Change-Number: 11451
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: daniel 
Gerrit-Comment-Date: Wed, 24 Oct 2018 14:03:57 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-ttcn3-hacks[master]: RSL_Emulation: Fail explicitly on ASP_IPA_EVENT_DOWN

2018-10-24 Thread daniel
daniel has uploaded a new patch set (#4) to the change originally created by 
Pau Espin Pedrol. ( https://gerrit.osmocom.org/11429 )

Change subject: RSL_Emulation: Fail explicitly on ASP_IPA_EVENT_DOWN
..

RSL_Emulation: Fail explicitly on ASP_IPA_EVENT_DOWN

Otherwise RSL layer fails this way when this event is received:

RSL_Emulation.ttcn:429 Receive operation on port IPA_PT succeeded, message from 
TC_chan_act_a51-RSL-IPA(3): @IPA_Emulation.ASP_IPA_Event: { up_down := 
ASP_IPA_EVENT_DOWN (0) } id 9
- Function main_client was stopped. PTC terminates.
RSL_Emulation.ttcn:429 Message with id 9 was extracted from the queue of IPA_PT.
RSL_Emulation.ttcn:430 setverdict(fail): none -> fail reason: "Received unknown 
primitive from IPA", new component reason: "Received unknown primitive from IPA"

We now fail with a clearer message "Lost IPA connection!". These
failures seem to happen under high load when the BTS doesn't get a
steady clock from osmo-trx.

Change-Id: Idc6565c9de72d98015d56a41e5616c46051c8a8d
---
M library/RSL_Emulation.ttcn
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/29/11429/4
--
To view, visit https://gerrit.osmocom.org/11429
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idc6565c9de72d98015d56a41e5616c46051c8a8d
Gerrit-Change-Number: 11429
Gerrit-PatchSet: 4
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: daniel 
Gerrit-CC: Harald Welte 


Change in osmo-ttcn3-hacks[master]: Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling

2018-10-24 Thread daniel
Hello Pau Espin Pedrol, Jenkins Builder,

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

https://gerrit.osmocom.org/11451

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

Change subject: Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling
..

Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling

This function can now be called from anywhere to try and safely shutdown
a testcase. It is not optimal as we can't call "all component.stop" from
outside the mtc, but without any proper and orderly shutdown handling of
all our emulation components I believe this is the best we can do.

To use it:

import from Misc_Helpers all;

in your module and then call

Misc_Helpers.f_shutdown(__BFILE__, __LINE__);

You can also pass the function a verdict and a message and it will take care
of calling setverdict, but beware of the following:

While setverdict would accept any number of arguments as log message
and convert them to a log string f_shutdown expects one charstring.
It's possible to use the log2str function to use the log arguments in
setverdict for f_shutdown, for example

setverdict(fail, "Template didn't match: ", tmpl_foo);
would become
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("Template didn't 
match: ", tmpl_foo));

Change-Id: I84d1aa6732f6b748d2bfdeac8f6309023717f267
---
M bsc-nat/gen_links.sh
M bsc/gen_links.sh
M ggsn_tests/gen_links.sh
M hlr/gen_links.sh
M lapdm/gen_links.sh
A library/Misc_Helpers.ttcn
M mgw/gen_links.sh
M msc/gen_links.sh
M pcu/gen_links.sh
M sccp/gen_links.sh
M selftest/gen_links.sh
M sgsn/gen_links.sh
M sip/gen_links.sh
M sysinfo/gen_links.sh
14 files changed, 41 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/51/11451/2
--
To view, visit https://gerrit.osmocom.org/11451
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I84d1aa6732f6b748d2bfdeac8f6309023717f267
Gerrit-Change-Number: 11451
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: daniel 


Change in osmo-ttcn3-hacks[master]: BTS_Tests: Use Misc_Helpers.f_shutdown consistently

2018-10-24 Thread daniel
Hello Pau Espin Pedrol, Jenkins Builder,

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

https://gerrit.osmocom.org/11452

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

Change subject: BTS_Tests: Use Misc_Helpers.f_shutdown consistently
..

BTS_Tests: Use Misc_Helpers.f_shutdown consistently

Replace all calls to setverdict(fail) with f_shutdown() since I'd rather
fail and stop early in case we encounter an error.
Only replace setverdict(pass) with f_shutdown() if it is followed by
mtc.stop

Remove internal function f_shutdown and use the one from Misc_Helpers

Change-Id: Ia8b01a1876e969d6f0760ea625e4df83af4f54ca
---
M bts/BTS_Tests.ttcn
M bts/gen_links.sh
2 files changed, 131 insertions(+), 208 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/52/11452/2
--
To view, visit https://gerrit.osmocom.org/11452
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia8b01a1876e969d6f0760ea625e4df83af4f54ca
Gerrit-Change-Number: 11452
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-bsc[master]: gsm_04_08: improve gsm48_multirate_config()

2018-10-24 Thread dexter
dexter has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11443 )

Change subject: gsm_04_08: improve gsm48_multirate_config()
..

gsm_04_08: improve gsm48_multirate_config()

The function gsm48_multirate_config() generates the multirate
configuration IE, that is sent via RSL to configure the active set of
AMR codecs inside the BTS. The function already works, but it does not
check the input data for consistancy. Lets add some consistancy check to
make sure that inconsistant parameters are rejected. Also allow the
output pointer to be NULL, so that the function can be used to perform
a dry run to be able to verify parameters.

- Check for invalid / inconsistant configuration parameters
- Perform a dry-run when lv pointer is set to NULL

Change-Id: I06beb7dd7236c81c3a91af4d09c31891f4b910a4
Related: OS#3529
---
M include/osmocom/bsc/gsm_04_08_rr.h
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/gsm_04_08_rr.c
M tests/gsm0408/Makefile.am
M tests/gsm0408/gsm0408_test.c
M tests/gsm0408/gsm0408_test.ok
6 files changed, 237 insertions(+), 26 deletions(-)

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



diff --git a/include/osmocom/bsc/gsm_04_08_rr.h 
b/include/osmocom/bsc/gsm_04_08_rr.h
index e2e861d..8e4f787 100644
--- a/include/osmocom/bsc/gsm_04_08_rr.h
+++ b/include/osmocom/bsc/gsm_04_08_rr.h
@@ -23,7 +23,8 @@
 struct msgb *msg, struct bsc_subscr *bsub);
 int gsm48_send_rr_classmark_enquiry(struct gsm_lchan *lchan);
 int gsm48_send_rr_ciph_mode(struct gsm_lchan *lchan, int want_imeisv);
-int gsm48_multirate_config(uint8_t *lv, const struct amr_multirate_conf *mr, 
const struct amr_mode *modes);
+int gsm48_multirate_config(uint8_t *lv, const struct gsm48_multi_rate_conf 
*mr_conf,
+  const struct amr_mode *modes, unsigned int 
num_modes);
 struct msgb *gsm48_make_ho_cmd(struct gsm_lchan *new_lchan, uint8_t 
power_command, uint8_t ho_ref);
 int gsm48_send_ho_cmd(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan,
  uint8_t power_command, uint8_t ho_ref);
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index f156cc8..08b5dad 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -4391,11 +4391,12 @@

mr.ms_mode[0].mode = amr_mode;
mr.bts_mode[0].mode = amr_mode;
+   mr.num_modes = 1;

/* encode this configuration into the lchan for both uplink and
 * downlink direction */
-   gsm48_multirate_config(lchan->mr_ms_lv, , mr.ms_mode);
-   gsm48_multirate_config(lchan->mr_bts_lv, , mr.bts_mode);
+   gsm48_multirate_config(lchan->mr_ms_lv, mr_conf, mr.ms_mode, 
mr.num_modes);
+   gsm48_multirate_config(lchan->mr_bts_lv, mr_conf, mr.bts_mode, 
mr.num_modes);

return 0;
 }
diff --git a/src/osmo-bsc/gsm_04_08_rr.c b/src/osmo-bsc/gsm_04_08_rr.c
index 35044a3..4659c1a 100644
--- a/src/osmo-bsc/gsm_04_08_rr.c
+++ b/src/osmo-bsc/gsm_04_08_rr.c
@@ -321,47 +321,113 @@
cd->arfcn_lo = bts->c0->arfcn & 0xff;
 }

-/*! \brief Encode a TS 04.08 multirate config LV according to 10.5.2.21aa
- *  \param[out] lv caller-allocated buffer of 7 bytes. First octet is IS length
- *  \param[in] mr multi-rate configuration to encode
- *  \param[in] modes array describing the AMR modes
- *  \returns 0 on success */
-int gsm48_multirate_config(uint8_t *lv, const struct amr_multirate_conf *mr, 
const struct amr_mode *modes)
+/*! \brief Encode a TS 04.08 multirate config LV according to 10.5.2.21aa.
+ *  \param[out] lv caller-allocated buffer of 7 bytes. First octet is is 
length.
+ *  \param[in] mr_conf multi-rate configuration to encode (selected modes).
+ *  \param[in] modes array describing the AMR modes.
+ *  \param[in] num_modes length of the modes array.
+ *  \returns 0 on success, -EINVAL on failure. */
+int gsm48_multirate_config(uint8_t *lv,
+  const struct gsm48_multi_rate_conf *mr_conf,
+  const struct amr_mode *modes, unsigned int num_modes)
 {
-   int num = 0, i;
+   int num = 0;
+   unsigned int i;
+   unsigned int k;
+   unsigned int m = 0;
+   bool mode_valid;
+   uint8_t *gsm48_ie = (uint8_t *) mr_conf;
+   const struct amr_mode *modes_selected[4];

+   /* Check if modes for consistency (order and duplicates) */
+   for (i = 0; i < num_modes; i++) {
+   if (i > 0 && modes[i - 1].mode > modes[i].mode) {
+   LOGP(DRR, LOGL_ERROR,
+"BUG: Multirate codec with inconsistant config 
(mode order).\n");
+   return -EINVAL;
+   }
+   if (i > 0 && modes[i - 1].mode == modes[i].mode) {
+   LOGP(DRR, LOGL_ERROR,
+"BUG: Multirate codec with inconsistant config 
(duplicate modes).\n");
+   return 

Change in osmo-bts[master]: bts-trx: Try decoding received UL bursts when SACCH frame detected as...

2018-10-24 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/11446 )

Change subject: bts-trx: Try decoding received UL bursts when SACCH frame 
detected as lost
..


Patch Set 1: Code-Review-1

It makes sense to investigate the problem carefully. I think, that
this change makes complicated things even more complex. Why?

  - In general, SACCH frame loss detection is implemented in a
hackish way ATM - it's being triggered by DL processing path,
which is not (and should not be) synchronized with the UL
processing path. We have at least ~20 TDMA frame difference
between them. See both 'osmotrx fn-advance' and 'osmotrx rts-advance'
configuration options for OsmoBTS, and '-f --trx-advance' command
line option for trxcon.

  - Instead of complicating the code more, I think we should focus on
implementing (and discussing) the TDMA frame loss detection on the
link between L1 and TRX.


--
To view, visit https://gerrit.osmocom.org/11446
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I910277df181df5082b234c1c97a75eebdffc2cb5
Gerrit-Change-Number: 11446
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Wed, 24 Oct 2018 13:32:58 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling

2018-10-24 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/11451 )

Change subject: Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/11451/1/library/Misc_Helpers.ttcn
File library/Misc_Helpers.ttcn:

https://gerrit.osmocom.org/#/c/11451/1/library/Misc_Helpers.ttcn@15
PS1, Line 15:
> I looked around in the compiled files a bit and I don't see any way to 
> automatically include file/li […]
Yes, just passed them as separate parameters to f_shutdown function, probably 
best is first place since we always want to print that shutdown procedure 
started from there.



--
To view, visit https://gerrit.osmocom.org/11451
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I84d1aa6732f6b748d2bfdeac8f6309023717f267
Gerrit-Change-Number: 11451
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: daniel 
Gerrit-Comment-Date: Wed, 24 Oct 2018 12:37:39 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-ttcn3-hacks[master]: Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling

2018-10-24 Thread daniel
daniel has posted comments on this change. ( https://gerrit.osmocom.org/11451 )

Change subject: Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/11451/1/library/Misc_Helpers.ttcn
File library/Misc_Helpers.ttcn:

https://gerrit.osmocom.org/#/c/11451/1/library/Misc_Helpers.ttcn@15
PS1, Line 15:
> Once we add the __FILE__ and __LINE thing, I'd add an extra log here to 
> always known from where the  […]
I looked around in the compiled files a bit and I don't see any way to 
automatically include file/line from the caller (like with C macros).
So I guess the only way is to add them as optional arguments and pass __BFILE__ 
and __LINE__ in the caller. Not the nicest solution, but okay



--
To view, visit https://gerrit.osmocom.org/11451
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I84d1aa6732f6b748d2bfdeac8f6309023717f267
Gerrit-Change-Number: 11451
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: daniel 
Gerrit-Comment-Date: Wed, 24 Oct 2018 12:12:03 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Jenkins build is back to normal : master-osmo-sgsn » --enable-iu,a2=default,a3=default,osmocom-master-debian9 #6365

2018-10-24 Thread jenkins
See 




Build failed in Jenkins: master-osmo-sgsn » --enable-iu,a2=default,a3=default,osmocom-master-debian9 #6364

2018-10-24 Thread jenkins
See 


--
[...truncated 1.05 MB...]
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to 
x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain 
format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
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 for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) 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
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 library containing dlopen... -ldl
checking for LIBOSMOCORE... yes
checking for LIBOSMOVTY... yes
checking for LIBOSMOCTRL... yes
checking for LIBOSMOGSM... yes
checking for LIBOSMOABIS... yes
checking for LIBOSMOGB... yes
checking for LIBOSMONETIF... yes
checking for LIBGTP... yes
checking for LIBCARES... yes
checking for ANSI C header files... (cached) yes
checking if gcc supports -fvisibility=hidden... yes
checking whether C compiler accepts -Werror=implicit... yes
checking whether C compiler accepts -Werror=maybe-uninitialized... yes
checking whether C compiler accepts -Werror=memset-transposed-args... yes
checking whether C compiler accepts -Werror=null-dereference... no
checking whether C compiler accepts -Werror=sizeof-array-argument... no
checking whether C compiler accepts -Werror=sizeof-pointer-memaccess... yes
checking whether to enable code coverage support... no
checking whether struct tm has tm_gmtoff member... yes
checking whether to enable VTY/CTRL tests... no
CFLAGS="-g -O2 -Wall -Werror=implicit -Werror=maybe-uninitialized 
-Werror=memset-transposed-args -Werror=sizeof-pointer-memaccess"
CPPFLAGS=" -Wall"
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating osmo-sgsn.pc
config.status: creating include/Makefile
config.status: creating include/osmocom/Makefile
config.status: creating include/osmocom/sgsn/Makefile
config.status: creating src/Makefile
config.status: creating src/gprs/Makefile
config.status: creating tests/Makefile
config.status: creating tests/atlocal
config.status: creating tests/gprs/Makefile
config.status: creating tests/gbproxy/Makefile
config.status: creating tests/sgsn/Makefile
config.status: creating tests/gtphub/Makefile
config.status: creating tests/xid/Makefile
config.status: creating tests/sndcp_xid/Makefile
config.status: creating tests/slhc/Makefile
config.status: creating tests/v42bis/Makefile
config.status: creating doc/Makefile
config.status: creating doc/examples/Makefile
config.status: creating contrib/Makefile
config.status: creating contrib/systemd/Makefile
config.status: creating Makefile
config.status: creating bscconfig.h
config.status: executing tests/atconfig commands
config.status: executing depfiles commands
config.status: executing libtool commands
make[1]: Entering directory 

Build failed in Jenkins: master-osmo-ggsn » --disable-gtp-linux,a2=default,a3=default,osmocom-master-debian9 #1022

2018-10-24 Thread jenkins
See 


--
[...truncated 10.48 KB...]
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
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 execinfo.h usability... yes
checking execinfo.h presence... yes
checking for execinfo.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/timerfd.h usability... yes
checking sys/timerfd.h presence... yes
checking for sys/timerfd.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking netinet/tcp.h usability... yes
checking netinet/tcp.h presence... yes
checking for netinet/tcp.h... yes
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for library containing dlopen... -ldl
checking for library containing dlsym... -ldl
checking for backtrace in -lexecinfo... no
checking for doxygen... (cached) false
checking whether SYS_getrandom is declared... yes
checking if gcc supports -fvisibility=hidden... yes
checking for clock_gettime... yes
checking for localtime_r... yes
checking whether struct tm has tm_gmtoff member... yes
checking for TALLOC... yes
checking for PCSC... yes
checking for LIBGNUTLS... yes
checking whether to enable VTY/CTRL tests... no
checking whether C compiler accepts -mavx2... yes
checking whether C compiler accepts -mssse3... yes
checking whether C compiler accepts -msse4.1... yes
checking whether gcc has __builtin_cpu_supports built-in... yes
CFLAGS="-g -O2 -DBUILDING_LIBOSMOCORE -Wall"
CPPFLAGS=" -DBUILDING_LIBOSMOCORE -Wall"
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating libosmocore.pc
config.status: creating libosmocodec.pc
config.status: creating libosmocoding.pc
config.status: creating libosmovty.pc
config.status: creating libosmogsm.pc
config.status: creating libosmogb.pc
config.status: creating libosmoctrl.pc
config.status: creating libosmosim.pc
config.status: creating include/Makefile
config.status: creating src/Makefile
config.status: creating src/vty/Makefile
config.status: creating src/codec/Makefile
config.status: creating src/coding/Makefile
config.status: creating src/sim/Makefile
config.status: creating src/gsm/Makefile
config.status: creating src/gb/Makefile
config.status: creating src/ctrl/Makefile
config.status: creating src/pseudotalloc/Makefile
config.status: creating tests/Makefile
config.status: creating tests/atlocal
config.status: creating utils/Makefile
config.status: creating Doxyfile.core
config.status: creating Doxyfile.gsm
config.status: creating Doxyfile.vty
config.status: creating Doxyfile.codec
config.status: creating Doxyfile.coding
config.status: creating Doxyfile.gb
config.status: creating Doxyfile.ctrl
config.status: creating Makefile
config.status: creating config.h
config.status: executing tests/atconfig commands
config.status: executing depfiles commands
config.status: executing libtool commands
configure: WARNING: unrecognized options: --with-systemdsystemunitdir
+ make -j 8 install
echo 0.12.0.91-7a2e > .version-t && mv .version-t .version
make  install-recursive
make[1]: Entering directory 
'
Making install in include
make[2]: Entering directory 
'
  GEN  osmocom/gsm/gsm0503.h
Generating header file...
Generate 'xcch' declaration
Generate 'rach' declaration
Generate 'rach_ext' declaration
Generate 'sch' declaration
Generate 'cs2' declaration
Generate 'cs3' declaration
Generate 'cs2_np' declaration
Generate 'cs3_np' declaration
Generate 'tch_afs_12_2' declaration
Generate 'tch_afs_10_2' declaration
Generate 'tch_afs_7_95' declaration
Generate 'tch_afs_7_4' declaration
Generate 'tch_afs_6_7' declaration
Generate 'tch_afs_5_9' declaration
Generate 'tch_afs_5_15' declaration
Generate 'tch_afs_4_75' declaration
Generate 'tch_fr' declaration
Generate 'tch_hr' declaration
Generate 'tch_ahs_7_95' declaration
Generate 'tch_ahs_7_4' declaration
Generate 'tch_ahs_6_7' declaration
Generate 'tch_ahs_5_9' 

Change in osmo-ttcn3-hacks[master]: BTS_Tests: Use Misc_Helpers.f_shutdown consistently

2018-10-24 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/11452 )

Change subject: BTS_Tests: Use Misc_Helpers.f_shutdown consistently
..


Patch Set 1:

I like it, but see my comment on adding __LINE__ and __FILE__ in previous 
commit.


--
To view, visit https://gerrit.osmocom.org/11452
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia8b01a1876e969d6f0760ea625e4df83af4f54ca
Gerrit-Change-Number: 11452
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 24 Oct 2018 11:27:11 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-ttcn3-hacks[master]: Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling

2018-10-24 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/11451 )

Change subject: Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/11451/1/library/Misc_Helpers.ttcn
File library/Misc_Helpers.ttcn:

https://gerrit.osmocom.org/#/c/11451/1/library/Misc_Helpers.ttcn@15
PS1, Line 15:
Once we add the __FILE__ and __LINE thing, I'd add an extra log here to always 
known from where the test was stopped, even if veredict was not set in this 
call (by calling with verdict=none or without parameters).



--
To view, visit https://gerrit.osmocom.org/11451
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I84d1aa6732f6b748d2bfdeac8f6309023717f267
Gerrit-Change-Number: 11451
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 24 Oct 2018 11:26:27 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in libosmocore[master]: vty: adjust telnet log

2018-10-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11450 )

Change subject: vty: adjust telnet log
..

vty: adjust telnet log

Adjust wording so telnet command can be directly copy-pasted from the log to 
access
the interface without the need for further editing.

Change-Id: I1876447f9285adcd1b09937a6121afabd0b32e52
---
M src/vty/telnet_interface.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  Pau Espin Pedrol: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved



diff --git a/src/vty/telnet_interface.c b/src/vty/telnet_interface.c
index fdd88c1..fcb4c8d 100644
--- a/src/vty/telnet_interface.c
+++ b/src/vty/telnet_interface.c
@@ -101,7 +101,7 @@
return -1;
}

-   LOGP(DLGLOBAL, LOGL_NOTICE, "telnet at %s %d\n", ip, port);
+   LOGP(DLGLOBAL, LOGL_NOTICE, "Available via telnet %s %d\n", ip, port);
return 0;
 }


--
To view, visit https://gerrit.osmocom.org/11450
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I1876447f9285adcd1b09937a6121afabd0b32e52
Gerrit-Change-Number: 11450
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 


Change in libosmocore[master]: vty: adjust telnet log

2018-10-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11450 )

Change subject: vty: adjust telnet log
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11450
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I1876447f9285adcd1b09937a6121afabd0b32e52
Gerrit-Change-Number: 11450
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 24 Oct 2018 11:25:46 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling

2018-10-24 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/11451 )

Change subject: Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling
..


Patch Set 1: Code-Review-1

What about passing __FILE__, __LINE__ as parameters to the function so we can 
log correctly file and LINE during setverdict?

check 
https://github.com/maaron/ttcn3/blob/master/LTE%20-%20Formal%20Delivery%2036.523-3v10.1.0/14/ETWS.ttcn


--
To view, visit https://gerrit.osmocom.org/11451
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I84d1aa6732f6b748d2bfdeac8f6309023717f267
Gerrit-Change-Number: 11451
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 24 Oct 2018 11:21:05 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling

2018-10-24 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/11451 )

Change subject: Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/11451/1/library/Misc_Helpers.ttcn
File library/Misc_Helpers.ttcn:

https://gerrit.osmocom.org/#/c/11451/1/library/Misc_Helpers.ttcn@3
PS1, Line 3: /* Try to properly shutdown a testcase.
whitespace



--
To view, visit https://gerrit.osmocom.org/11451
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I84d1aa6732f6b748d2bfdeac8f6309023717f267
Gerrit-Change-Number: 11451
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 24 Oct 2018 11:14:59 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-ttcn3-hacks[master]: RSL_Emulation: Fail explicitly on ASP_IPA_EVENT_DOWN

2018-10-24 Thread daniel
daniel has posted comments on this change. ( https://gerrit.osmocom.org/11429 )

Change subject: RSL_Emulation: Fail explicitly on ASP_IPA_EVENT_DOWN
..


Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/#/c/11429/3/library/RSL_Emulation.ttcn
File library/RSL_Emulation.ttcn:

https://gerrit.osmocom.org/#/c/11429/3/library/RSL_Emulation.ttcn@357
PS3, Line 357:  // Both doesn't really make sense
Pau, I'm not sure what to do here. Since we failed before anyway it probably 
makes sense to fail as well.

Just thinking about it, it's probably best to not have a guard expression and 
just have one alt statement for IPA_EVENT_DOWN. Does that make sense?



--
To view, visit https://gerrit.osmocom.org/11429
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc6565c9de72d98015d56a41e5616c46051c8a8d
Gerrit-Change-Number: 11429
Gerrit-PatchSet: 3
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: daniel 
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Wed, 24 Oct 2018 11:02:39 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-ttcn3-hacks[master]: Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling

2018-10-24 Thread daniel
daniel has uploaded this change for review. ( https://gerrit.osmocom.org/11451


Change subject: Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling
..

Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling

This function can now be called from anywhere to try and safely shutdown
a testcase. It is not optimal as we can't call "all component.stop" from
outside the mtc, but without any proper and orderly shutdown handling of
all our emulation components I believe this is the best we can do.

To use it:

import from Misc_Helpers all;

in your module and then call

Misc_Helpers.f_shutdown();

You can pass the function a verdict and a message and it will take care
of calling setverdict, but beware of the following:

1. The file/line of the verdict is always pointing to the f_shutdown
function.
2. While setverdict would accept any number of arguments as log message
and convert them to a log string f_shutdown expects one charstring.
It's possible to use the log2str function to use the log arguments in
setverdict for f_shutdown, for example

setverdict(fail, "Template didn't match: ", tmpl_foo);
would become
Misc_Helpers.f_shutdown(fail, log2str("Template didn't match: ", tmpl_foo));

Change-Id: I84d1aa6732f6b748d2bfdeac8f6309023717f267
---
M bsc-nat/gen_links.sh
M bsc/gen_links.sh
M ggsn_tests/gen_links.sh
M hlr/gen_links.sh
M lapdm/gen_links.sh
A library/Misc_Helpers.ttcn
M mgw/gen_links.sh
M msc/gen_links.sh
M pcu/gen_links.sh
M sccp/gen_links.sh
M selftest/gen_links.sh
M sgsn/gen_links.sh
M sip/gen_links.sh
M sysinfo/gen_links.sh
14 files changed, 38 insertions(+), 13 deletions(-)



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

diff --git a/bsc-nat/gen_links.sh b/bsc-nat/gen_links.sh
index 453d8ca..1ab54f1 100755
--- a/bsc-nat/gen_links.sh
+++ b/bsc-nat/gen_links.sh
@@ -47,7 +47,7 @@
 gen_links $DIR $FILES

 DIR=../library
-FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn 
IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc 
IPA_Emulation.ttcnpp L3_Templates.ttcn BSSMAP_Templates.ttcn 
BSSMAP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn 
MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc 
Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn BSSAP_CodecPort.ttcn"
+FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn 
IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn 
IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp L3_Templates.ttcn 
BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn 
MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn 
MGCP_CodecPort_CtrlFunctDef.cc Osmocom_CTRL_Types.ttcn 
Osmocom_CTRL_Functions.ttcn BSSAP_CodecPort.ttcn"
 gen_links $DIR $FILES

 ignore_pp_results
diff --git a/bsc/gen_links.sh b/bsc/gen_links.sh
index 88983d7..bf10761 100755
--- a/bsc/gen_links.sh
+++ b/bsc/gen_links.sh
@@ -67,7 +67,7 @@
 gen_links $DIR $FILES

 DIR=../library
-FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn 
Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc 
IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn 
IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp L3_Templates.ttcn 
BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn RLCMAC_CSN1_Types.ttcn 
GSM_RR_Types.ttcn RSL_Types.ttcn RSL_Emulation.ttcn MGCP_Emulation.ttcn 
MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn 
MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc 
BSSAP_CodecPort.ttcn BSSAP_Adapter.ttcn Osmocom_CTRL_Types.ttcn 
Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn RTP_CodecPort.ttcn 
RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc RTP_Emulation.ttcn 
IuUP_Types.ttcn IuUP_EncDec.cc IuUP_Emulation.ttcn SCCP_Templates.ttcn 
IPA_Testing.ttcn"
+FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn 
Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc 
IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn 
IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp L3_Templates.ttcn 
BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn RLCMAC_CSN1_Types.ttcn 
GSM_RR_Types.ttcn RSL_Types.ttcn RSL_Emulation.ttcn MGCP_Emulation.ttcn 
MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn 
MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc 
BSSAP_CodecPort.ttcn BSSAP_Adapter.ttcn Osmocom_CTRL_Types.ttcn 
Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn RTP_CodecPort.ttcn 
RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc RTP_Emulation.ttcn 
IuUP_Types.ttcn IuUP_EncDec.cc IuUP_Emulation.ttcn SCCP_Templates.ttcn 
IPA_Testing.ttcn"
 gen_links $DIR $FILES

 ignore_pp_results
diff --git a/ggsn_tests/gen_links.sh b/ggsn_tests/gen_links.sh
index 4e012ae..82e35d4 100755
--- a/ggsn_tests/gen_links.sh
+++ b/ggsn_tests/gen_links.sh
@@ -45,7 +45,7 @@
 

Change in osmo-ttcn3-hacks[master]: BTS_Tests: Use Misc_Helpers.f_shutdown consistently

2018-10-24 Thread daniel
daniel has uploaded this change for review. ( https://gerrit.osmocom.org/11452


Change subject: BTS_Tests: Use Misc_Helpers.f_shutdown consistently
..

BTS_Tests: Use Misc_Helpers.f_shutdown consistently

Replace all calls to setverdict(fail) with f_shutdown() since I'd rather
fail and stop early in case we encounter an error.
Only replace setverdict(pass) with f_shutdown() if it is followed by
mtc.stop

Remove internal function f_shutdown and use the one from Misc_Helpers

Change-Id: Ia8b01a1876e969d6f0760ea625e4df83af4f54ca
---
M bts/BTS_Tests.ttcn
M bts/gen_links.sh
2 files changed, 131 insertions(+), 208 deletions(-)



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

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index fe0a933..38cfe78 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -1,5 +1,6 @@
 module BTS_Tests {

+import from Misc_Helpers all;
 import from General_Types all;
 import from GSM_Types all;
 import from GSM_RR_Types all;
@@ -270,8 +271,7 @@
pcu_last_info := sd.data;
}
[] pt.receive(t_SD_PCUIF(pcu_conn_id, tr_PCUIF_INFO_IND(?, ?, ?))) -> 
value sd {
-   setverdict(fail, "Invalid PCU Version/BTS Number received");
-   mtc.stop;
+   Misc_Helpers.f_shutdown(fail, "Invalid PCU Version/BTS Number 
received");
}
 }

@@ -289,8 +289,7 @@
alt {
[] as_pcu_info_ind(pt, pcu_conn_id, pcu_last_info);
[] T.timeout {
-   setverdict(fail, "Timeout waiting for PCU INFO_IND");
-   mtc.stop;
+   Misc_Helpers.f_shutdown(fail, "Timeout waiting for PCU 
INFO_IND");
}
}
 }
@@ -341,8 +340,7 @@
alt {
[] RSL_CCHAN.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP});
[] T.timeout {
-   setverdict(fail, "Timeout waiting for ASP_IPA_EVENT_UP");
-   mtc.stop;
+   Misc_Helpers.f_shutdown(fail, "Timeout waiting for 
ASP_IPA_EVENT_UP");
}
}
f_sleep(0.5);   /* workaround for OS#3000 */
@@ -366,12 +364,6 @@
}
 }

-function f_shutdown() runs on test_CT {
-   /* mtc.stop cleanly stops testcase execution to avoid unclean shutdown 
*/
-   all component.stop;
-   mtc.stop;
-}
-
 /* Attach L1CTL to master test_CT (classic tests, non-handler mode) */
 function f_init_l1ctl() runs on test_CT {
map(self:L1CTL, system:L1CTL);
@@ -415,8 +407,7 @@

 private altstep as_Tguard() runs on ConnHdlr {
[] g_Tguard.timeout {
-   setverdict(fail, "Tguard timeout");
-   mtc.stop;
+   Misc_Helpers.f_shutdown(fail, "Tguard timeout");
}
 }

@@ -430,8 +421,7 @@
res := TRXC_CodecPort_CtrlFunct.f_IPL4_connect(BB_TRXC, mp_bb_trxc_ip, 
mp_bb_trxc_port,
"", -1, -1, {udp:={}}, 
{});
if (not ispresent(res.connId)) {
-   setverdict(fail, "Could not connect to trx-control interface of 
trxcon, check your configuration");
-   mtc.stop;
+   Misc_Helpers.f_shutdown(fail, "Could not connect to trx-control 
interface of trxcon, check your configuration");
}
g_bb_trxc_conn_id := res.connId;
 }
@@ -481,15 +471,13 @@
setverdict(pass);
}
[] T.timeout {
-   setverdict(fail, "Timeout expecting " & id);
-   mtc.stop;
+   Misc_Helpers.f_shutdown(fail, "Timeout expecting " & id);
}
[not ignore_other] as_l1_sacch();
[not ignore_other] as_meas_res();
[not ignore_other] as_l1_dcch();
[not ignore_other] RSL.receive {
-   setverdict(fail, "Unexpected RSL message received");
-   mtc.stop;
+   Misc_Helpers.f_shutdown(fail, "Unexpected RSL message 
received");
}
[ignore_other] RSL.receive { repeat; }
}
@@ -566,7 +554,7 @@
f_init(testcasename());
vc_conn := f_start_handler(refers(f_TC_chan_act_stress), pars);
vc_conn.done;
-   f_shutdown();
+   Misc_Helpers.f_shutdown();
 }

 /* Test if re-activation of an already active channel fails as expected */
@@ -576,8 +564,7 @@
RSL.send(ts_RSL_CHAN_ACT(g_chan_nr, g_pars.chan_mode));
alt {
[] RSL.receive(tr_RSL_CHAN_ACT_ACK(g_chan_nr)) {
-   setverdict(fail, "Unexpected CHAN ACT ACK on double 
activation");
-   mtc.stop;
+   Misc_Helpers.f_shutdown(fail, "Unexpected CHAN ACT ACK on 
double activation");
}
[] RSL.receive(tr_RSL_CHAN_ACT_NACK(g_chan_nr)) {
setverdict(pass);
@@ -591,7 +578,7 @@
f_init();
vc_conn := f_start_handler(refers(f_TC_chan_act_react), pars);
vc_conn.done;
-   f_shutdown();
+   

Change in osmo-ttcn3-hacks[master]: RSL_Emulation: Fail explicitly on ASP_IPA_EVENT_DOWN

2018-10-24 Thread daniel
daniel has uploaded a new patch set (#3) to the change originally created by 
Pau Espin Pedrol. ( https://gerrit.osmocom.org/11429 )

Change subject: RSL_Emulation: Fail explicitly on ASP_IPA_EVENT_DOWN
..

RSL_Emulation: Fail explicitly on ASP_IPA_EVENT_DOWN

Otherwise RSL layer fails this way when this event is received:

RSL_Emulation.ttcn:429 Receive operation on port IPA_PT succeeded, message from 
TC_chan_act_a51-RSL-IPA(3): @IPA_Emulation.ASP_IPA_Event: { up_down := 
ASP_IPA_EVENT_DOWN (0) } id 9
- Function main_client was stopped. PTC terminates.
RSL_Emulation.ttcn:429 Message with id 9 was extracted from the queue of IPA_PT.
RSL_Emulation.ttcn:430 setverdict(fail): none -> fail reason: "Received unknown 
primitive from IPA", new component reason: "Received unknown primitive from IPA"

We now fail with a clearer message "Lost IPA connection!". These
failures seem to happen under high load when the BTS doesn't get a
steady clock from osmo-trx.

Change-Id: Idc6565c9de72d98015d56a41e5616c46051c8a8d
---
M library/RSL_Emulation.ttcn
1 file changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/29/11429/3
--
To view, visit https://gerrit.osmocom.org/11429
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idc6565c9de72d98015d56a41e5616c46051c8a8d
Gerrit-Change-Number: 11429
Gerrit-PatchSet: 3
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: daniel 
Gerrit-CC: Harald Welte 


Change in osmo-dev[master]: 3G+2G.deps: add osmo-sip-connector

2018-10-24 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/11140 )

Change subject: 3G+2G.deps: add osmo-sip-connector
..


Patch Set 2: Verified+1


--
To view, visit https://gerrit.osmocom.org/11140
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I57fa43209581638c39554079d7c4b65ce24890f8
Gerrit-Change-Number: 11140
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 24 Oct 2018 10:49:31 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-dev[master]: change default of MGW4BSC_PORT to 2427

2018-10-24 Thread osmith
osmith has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11141 )

Change subject: change default of MGW4BSC_PORT to 2427
..

change default of MGW4BSC_PORT to 2427

That way one can view the MGCP traffic in wireshark without changing
the MGCP port. We are using a different IP for the two MGWs already, so
they won't conflict even if they use the same port.

Change-Id: I2c73df138642bc3fd52eea493fcab5261e5bc5c8
---
M net/config_2g3g
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Pau Espin Pedrol: Looks good to me, but someone else must approve
  osmith: Verified



diff --git a/net/config_2g3g b/net/config_2g3g
index c7a19de..266997f 100644
--- a/net/config_2g3g
+++ b/net/config_2g3g
@@ -49,7 +49,7 @@
 BSC_IP="${PUBLIC_IP}"
 BSC_PC="0.42.0"
 MGW4BSC_IP="${PUBLIC_IP2}"
-MGW4BSC_PORT="12427"
+MGW4BSC_PORT="2427"
 MGW4BSC_VTY_IP="127.0.0.2"

 HNBGW_PC="0.3.0"

--
To view, visit https://gerrit.osmocom.org/11141
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I2c73df138642bc3fd52eea493fcab5261e5bc5c8
Gerrit-Change-Number: 11141
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 


Change in osmo-dev[master]: 3G+2G.deps: add osmo-sip-connector

2018-10-24 Thread osmith
osmith has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11140 )

Change subject: 3G+2G.deps: add osmo-sip-connector
..

3G+2G.deps: add osmo-sip-connector

Change-Id: I57fa43209581638c39554079d7c4b65ce24890f8
---
M 3G+2G.deps
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Pau Espin Pedrol: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, but someone else must approve
  osmith: Verified



diff --git a/3G+2G.deps b/3G+2G.deps
index 5b4fa0a..5a17146 100644
--- a/3G+2G.deps
+++ b/3G+2G.deps
@@ -12,3 +12,4 @@
 osmo-msc   osmo-iuh osmo-mgw libsmpp34
 osmo-bsc   libosmo-sccp osmo-mgw
 osmo-sgsn  osmo-iuh osmo-ggsn
+osmo-sip-connector libosmocore

--
To view, visit https://gerrit.osmocom.org/11140
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I57fa43209581638c39554079d7c4b65ce24890f8
Gerrit-Change-Number: 11140
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 


Change in osmo-dev[master]: find the terminal once and abort if missing

2018-10-24 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/11143 )

Change subject: find the terminal once and abort if missing
..


Patch Set 6: Verified+1


--
To view, visit https://gerrit.osmocom.org/11143
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie823e17ff1e7ad3ba23998233b41a810c90858b3
Gerrit-Change-Number: 11143
Gerrit-PatchSet: 6
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 24 Oct 2018 10:49:23 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-dev[master]: find the terminal once and abort if missing

2018-10-24 Thread osmith
osmith has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11143 )

Change subject: find the terminal once and abort if missing
..

find the terminal once and abort if missing

Change-Id: Ie823e17ff1e7ad3ba23998233b41a810c90858b3
---
M net/tmpl_std/run.sh
1 file changed, 16 insertions(+), 4 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  osmith: Verified



diff --git a/net/tmpl_std/run.sh b/net/tmpl_std/run.sh
index 57dcc23..cca7a75 100755
--- a/net/tmpl_std/run.sh
+++ b/net/tmpl_std/run.sh
@@ -34,18 +34,30 @@
 logdir="current_log"
 mkdir -p "$logdir"

+find_term() {
+  # Find a terminal program and write to the global "terminal" variable
+  local programs="urxvt xterm"
+  local program
+  for program in $programs; do
+terminal="$(which $program)"
+[ -n "$terminal" ] && return
+  done
+
+  # No terminal found
+  echo "ERROR: Couldn't find terminal program! Looked for: $programs"
+  exit 1
+}
+
 term() {
   title="$2"
   if [ -z "$title" ]; then
 title="$(basename $@)"
   fi
-  terminal="$(which urxvt || which xterm)"
-  if ! which $terminal; then
-echo "CANNOT FIND XTERM PROGRAM"
-  fi
   exec $terminal -title "CN:$title" -e sh -c "export 
LD_LIBRARY_PATH='/usr/local/lib'; $1; echo; while true; do echo 'q Enter to 
close'; read q_to_close; if [ \"x\$q_to_close\" = xq ]; then break; fi; done"
 }

+find_term
+
 sudo tcpdump -i $dev -n -w current_log/$dev.single.pcap -U not port 22 &
 sudo tcpdump -i lo -n -w current_log/lo.single.pcap -U not port 22 &


--
To view, visit https://gerrit.osmocom.org/11143
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie823e17ff1e7ad3ba23998233b41a810c90858b3
Gerrit-Change-Number: 11143
Gerrit-PatchSet: 6
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 


Change in osmo-dev[master]: change default of MGW4BSC_PORT to 2427

2018-10-24 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/11141 )

Change subject: change default of MGW4BSC_PORT to 2427
..


Patch Set 2: Verified+1


--
To view, visit https://gerrit.osmocom.org/11141
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2c73df138642bc3fd52eea493fcab5261e5bc5c8
Gerrit-Change-Number: 11141
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 24 Oct 2018 10:49:28 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmocore[master]: vty: adjust telnet log

2018-10-24 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/11450 )

Change subject: vty: adjust telnet log
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/11450
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I1876447f9285adcd1b09937a6121afabd0b32e52
Gerrit-Change-Number: 11450
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 24 Oct 2018 10:44:02 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmocom-bb[master]: mobile: display MS IMSI in vty

2018-10-24 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/11440 )

Change subject: mobile: display MS IMSI in vty
..


Patch Set 1:

Curious, "sh subs 1" gives me empty IMSI while with this patch I can see it via 
"sh ms 1". Anyway, it's purely cosmetic - will investigate later on.


--
To view, visit https://gerrit.osmocom.org/11440
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id05f4f5f3416dcdb9ce2fd24f9360f5e6faaf654
Gerrit-Change-Number: 11440
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: fixeria 
Gerrit-Comment-Date: Wed, 24 Oct 2018 09:39:23 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in libosmocore[master]: vty: adjust telnet log

2018-10-24 Thread Max
Max has uploaded this change for review. ( https://gerrit.osmocom.org/11450


Change subject: vty: adjust telnet log
..

vty: adjust telnet log

Adjust wording so telnet command can be directly copy-pasted from the log to 
access
the interface without the need for further editing.

Change-Id: I1876447f9285adcd1b09937a6121afabd0b32e52
---
M src/vty/telnet_interface.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/50/11450/1

diff --git a/src/vty/telnet_interface.c b/src/vty/telnet_interface.c
index fdd88c1..fcb4c8d 100644
--- a/src/vty/telnet_interface.c
+++ b/src/vty/telnet_interface.c
@@ -101,7 +101,7 @@
return -1;
}

-   LOGP(DLGLOBAL, LOGL_NOTICE, "telnet at %s %d\n", ip, port);
+   LOGP(DLGLOBAL, LOGL_NOTICE, "Available via telnet %s %d\n", ip, port);
return 0;
 }


--
To view, visit https://gerrit.osmocom.org/11450
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1876447f9285adcd1b09937a6121afabd0b32e52
Gerrit-Change-Number: 11450
Gerrit-PatchSet: 1
Gerrit-Owner: Max 


Change in osmo-msc[master]: gsm_04_08_cc: Add global guard timer for MNCC

2018-10-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11307 )

Change subject: gsm_04_08_cc: Add global guard timer for MNCC
..

gsm_04_08_cc: Add global guard timer for MNCC

The external MNCC handler may hang indefinitely in cases where the remote
end of the MNCC ceases to work properly. Add a global guard timer to
make sure the call reaches ACTIVE state.

Change-Id: I7375d1e17cd746aac4eadfe1e587e82cf1630d3d
Related: OS#3599
---
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/transaction.h
M src/libmsc/gsm_04_08_cc.c
M src/libmsc/msc_vty.c
M src/libmsc/osmo_msc.c
M tests/msc_vlr/msc_vlr_test_call.err
6 files changed, 94 insertions(+), 0 deletions(-)

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



diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 54026f6..579697e 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -332,6 +332,9 @@
/* Periodic location update default value */
uint8_t t3212;

+   /* Global MNCC guard timer value */
+   int mncc_guard_timeout;
+
struct {
struct mgcp_client_conf conf;
struct mgcp_client *client;
diff --git a/include/osmocom/msc/transaction.h 
b/include/osmocom/msc/transaction.h
index 4ffb468..b7d7971 100644
--- a/include/osmocom/msc/transaction.h
+++ b/include/osmocom/msc/transaction.h
@@ -69,6 +69,7 @@
int Tcurrent;   /* current CC timer */
int T308_second;/* used to send release again */
struct osmo_timer_list timer;
+   struct osmo_timer_list timer_guard;
struct gsm_mncc msg;/* stores 
setup/disconnect/release message */
} cc;
struct {
diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c
index 19e6cba..f9888d7 100644
--- a/src/libmsc/gsm_04_08_cc.c
+++ b/src/libmsc/gsm_04_08_cc.c
@@ -73,6 +73,43 @@

 static uint32_t new_callref = 0x8001;

+static void gsm48_cc_guard_timeout(void *arg)
+{
+   struct gsm_trans *trans = arg;
+   DEBUGP(DCC, "(sub %s) guard timeout expired\n",
+  vlr_subscr_msisdn_or_name(trans->vsub));
+   trans_free(trans);
+   return;
+}
+
+static void gsm48_stop_guard_timer(struct gsm_trans *trans)
+{
+   if (osmo_timer_pending(>cc.timer_guard)) {
+   DEBUGP(DCC, "(sub %s) stopping pending guard timer\n",
+  vlr_subscr_msisdn_or_name(trans->vsub));
+   osmo_timer_del(>cc.timer_guard);
+   }
+}
+
+static void gsm48_start_guard_timer(struct gsm_trans *trans)
+{
+   /* NOTE: The purpose of this timer is to prevent the cc state machine
+* from hanging in cases where mncc, gsm48 or both become unresponsive
+* for some reason. The timer is started initially with the setup from
+* the gsm48 side and then re-started with every incoming mncc message.
+* Once the mncc state reaches its active state the timer is stopped.
+* So if the cc state machine does not show any activity for an
+* extended amount of time during call setup or teardown the guard
+* timer will time out and hard-clear the connection. */
+   if (osmo_timer_pending(>cc.timer_guard))
+   gsm48_stop_guard_timer(trans);
+   DEBUGP(DCC, "(sub %s) starting guard timer with %d seconds\n",
+  vlr_subscr_msisdn_or_name(trans->vsub),
+  trans->net->mncc_guard_timeout);
+   osmo_timer_setup(>cc.timer_guard, gsm48_cc_guard_timeout, trans);
+   osmo_timer_schedule(>cc.timer_guard,
+   trans->net->mncc_guard_timeout, 0);
+}

 /* Call Control */

@@ -149,6 +186,10 @@

count_statistics(trans, state);
trans->cc.state = state;
+
+   /* Stop the guard timer when a call reaches the active state */
+   if (state == GSM_CSTATE_ACTIVE)
+   gsm48_stop_guard_timer(trans);
 }

 static int gsm48_cc_tx_status(struct gsm_trans *trans, void *arg)
@@ -259,6 +300,8 @@
}
if (trans->cc.state != GSM_CSTATE_NULL)
new_cc_state(trans, GSM_CSTATE_NULL);
+
+   gsm48_stop_guard_timer(trans);
 }

 static int gsm48_cc_tx_setup(struct gsm_trans *trans, void *arg);
@@ -474,6 +517,8 @@
struct tlv_parsed tp;
struct gsm_mncc setup;

+   gsm48_start_guard_timer(trans);
+
memset(, 0, sizeof(struct gsm_mncc));
setup.callref = trans->callref;

@@ -1970,6 +2015,8 @@
log_set_context(LOG_CTX_VLR_SUBSCR, trans->vsub);
}

+   gsm48_start_guard_timer(trans);
+
if (trans->conn)
conn = trans->conn;

diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index fe6ae88..a16cec8 100644
--- a/src/libmsc/msc_vty.c
+++ 

Change in osmo-msc[master]: gsm_04_08_cc: Add global guard timer for MNCC

2018-10-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11307 )

Change subject: gsm_04_08_cc: Add global guard timer for MNCC
..


Patch Set 5: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11307
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7375d1e17cd746aac4eadfe1e587e82cf1630d3d
Gerrit-Change-Number: 11307
Gerrit-PatchSet: 5
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Comment-Date: Wed, 24 Oct 2018 09:04:10 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in docker-playground[master]: repo-install-test: version test for all programs

2018-10-24 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/11436 )

Change subject: repo-install-test: version test for all programs
..


Patch Set 1: Verified+1


--
To view, visit https://gerrit.osmocom.org/11436
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I796f1e34d2c026b11dff89511b667fa457856088
Gerrit-Change-Number: 11436
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 24 Oct 2018 08:30:06 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: cosmetic: fix spec ref for gsm0808_cipher_mode()

2018-10-24 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/11437 )

Change subject: cosmetic: fix spec ref for gsm0808_cipher_mode()
..


Patch Set 1:

> I don't really see where the entire function does anything related to GSM TS 
> 04.08?  It's dealing with BSSAP/BSSMAP which is in 08.08 ?!?

Well, originally this said:

> GSM 08.08 § 3.4.7 cipher mode handling.

So I went looking for that chapter in GSM 08.08, but I could not find it.

* GSM 08.08 goes only until 3.3, no 3.4:
https://www.etsi.org/deliver/etsi_gts/08/0808/05.12.00_60/gsmts_0808v051200p.pdf

* GSM 04.08 has "3.4.7 Ciphering mode setting procedure", page 59 in this PDF:
https://www.etsi.org/deliver/etsi_gts/04/0408/05.03.00_60/gsmts_0408v050300p.pdf

...so my conclusion was, that this was meant to point to 04.08 § 3.4.7.

What am I missing?


--
To view, visit https://gerrit.osmocom.org/11437
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I359caf1dd30f033c0b606040ccf27aa4c5a9d2c6
Gerrit-Change-Number: 11437
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 24 Oct 2018 08:28:56 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-msc[master]: gsm_04_08_cc: Add global guard timer for MNCC

2018-10-24 Thread dexter
Hello Neels Hofmeyr, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/11307

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

Change subject: gsm_04_08_cc: Add global guard timer for MNCC
..

gsm_04_08_cc: Add global guard timer for MNCC

The external MNCC handler may hang indefinitely in cases where the remote
end of the MNCC ceases to work properly. Add a global guard timer to
make sure the call reaches ACTIVE state.

Change-Id: I7375d1e17cd746aac4eadfe1e587e82cf1630d3d
Related: OS#3599
---
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/transaction.h
M src/libmsc/gsm_04_08_cc.c
M src/libmsc/msc_vty.c
M src/libmsc/osmo_msc.c
M tests/msc_vlr/msc_vlr_test_call.err
6 files changed, 94 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/07/11307/5
--
To view, visit https://gerrit.osmocom.org/11307
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I7375d1e17cd746aac4eadfe1e587e82cf1630d3d
Gerrit-Change-Number: 11307
Gerrit-PatchSet: 5
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 


Change in osmo-msc[master]: gsm_04_08_cc: Add global guard timer for MNCC

2018-10-24 Thread dexter
Hello Neels Hofmeyr, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/11307

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

Change subject: gsm_04_08_cc: Add global guard timer for MNCC
..

gsm_04_08_cc: Add global guard timer for MNCC

The external MNCC handler may hang indefinitely in cases where the remote
end of the MNCC ceases to work properly. Add a global guard timer to
make sure the call reaches ACTIVE state.

Change-Id: I7375d1e17cd746aac4eadfe1e587e82cf1630d3d
Related: OS#3599
---
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/transaction.h
M src/libmsc/gsm_04_08_cc.c
M src/libmsc/msc_vty.c
M src/libmsc/osmo_msc.c
M tests/msc_vlr/msc_vlr_test_call.err
6 files changed, 94 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/07/11307/4
--
To view, visit https://gerrit.osmocom.org/11307
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I7375d1e17cd746aac4eadfe1e587e82cf1630d3d
Gerrit-Change-Number: 11307
Gerrit-PatchSet: 4
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 


Change in osmo-bsc[master]: codec_pref: also check amr codec rates in check_codec_pref()

2018-10-24 Thread dexter
dexter has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11442 )

Change subject: codec_pref: also check amr codec rates in check_codec_pref()
..

codec_pref: also check amr codec rates in check_codec_pref()

The function check_codec_pref() currently only does a basic check over
the general codec configuration of bts and msc. However, it does not yet
check if the amr codec rate settings for the BTSs contradict the
allowed/forbidden amr codec rates of the MSC. When the two settings do
contradict AMR would not work, even when everything else is correctly
configured. We need to check this on startup to spot configuration
problems quickly.

- Add function to calculate intersections of struct
  gsm48_multi_rate_conf variables.
- Calculate the intersection between the multi rate config of
  each BTS with the one of the MSC

Change-Id: I3537d1c89e2520d35cc0e150ba8e6d3693e06710
Related: OS#3529
---
M include/osmocom/bsc/codec_pref.h
M src/osmo-bsc/codec_pref.c
2 files changed, 53 insertions(+), 0 deletions(-)

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



diff --git a/include/osmocom/bsc/codec_pref.h b/include/osmocom/bsc/codec_pref.h
index d62d29f..51340c1 100644
--- a/include/osmocom/bsc/codec_pref.h
+++ b/include/osmocom/bsc/codec_pref.h
@@ -22,4 +22,8 @@
  const struct bsc_msc_data *msc,
  const struct gsm_bts *bts);
 
+int calc_amr_rate_intersection(struct gsm48_multi_rate_conf *c,
+  const struct gsm48_multi_rate_conf *b,
+  const struct gsm48_multi_rate_conf *a);
+
 int check_codec_pref(struct llist_head *mscs);
diff --git a/src/osmo-bsc/codec_pref.c b/src/osmo-bsc/codec_pref.c
index 9f30c7b..c99c383 100644
--- a/src/osmo-bsc/codec_pref.c
+++ b/src/osmo-bsc/codec_pref.c
@@ -393,6 +393,35 @@
}
 }

+/*! Calculate the intersection of the rate configuration of two multirate 
configuration
+ *  IE structures. The result c will be a copy of a, but the rate 
configuration bits
+ *  will be the intersection of the rate configuration bits in a and b.
+ *  \param[out] c user provided memory to store the result.
+ *  \param[in] a multi rate configuration a.
+ *  \param[in] b multi rate configuration b.
+ *  \returns 0 on success, -1 when the result contains an empty set of modes. 
*/
+int calc_amr_rate_intersection(struct gsm48_multi_rate_conf *c,
+  const struct gsm48_multi_rate_conf *b,
+  const struct gsm48_multi_rate_conf *a)
+{
+   struct gsm48_multi_rate_conf res;
+   uint8_t *_a = (uint8_t *) a;
+   uint8_t *_b = (uint8_t *) b;
+   uint8_t *_res = (uint8_t *) & res;
+
+   memcpy(, a, sizeof(res));
+
+   _res[1] = _a[1] & _b[1];
+
+   if (_res[1] == 0x00)
+   return -1;
+
+   if (c)
+   memcpy(c, , sizeof(*c));
+
+   return 0;
+}
+
 /*! Visit the codec settings for the MSC and for each BTS in order to make sure
  *  that the configuration does not contain any combinations that lead into a
  *  mutually exclusive codec configuration (empty intersection).
@@ -404,6 +433,8 @@
struct gsm_bts *bts;
struct gsm0808_speech_codec_list scl;
int rc = 0;
+   int rc_rate;
+   const struct gsm48_multi_rate_conf *bts_gsm48_ie;

llist_for_each_entry(msc, mscs, entry) {
llist_for_each_entry(bts, >network->bts_list, list) {
@@ -414,6 +445,24 @@
 bts->nr, msc->nr);
rc = -1;
}
+
+   bts_gsm48_ie = (struct gsm48_multi_rate_conf 
*)>mr_full.gsm48_ie;
+   rc_rate = calc_amr_rate_intersection(NULL, 
>amr_conf, bts_gsm48_ie);
+   if (rc_rate < 0) {
+   LOGP(DMSC, LOGL_FATAL,
+"network amr tch-f mode config of BTS %u 
does not intersect with amr-config of MSC %u\n",
+bts->nr, msc->nr);
+   rc = -1;
+   }
+
+   bts_gsm48_ie = (struct gsm48_multi_rate_conf 
*)>mr_half.gsm48_ie;
+   rc_rate = calc_amr_rate_intersection(NULL, 
>amr_conf, bts_gsm48_ie);
+   if (rc_rate < 0) {
+   LOGP(DMSC, LOGL_FATAL,
+"network amr tch-h mode config of BTS %u 
does not intersect with amr-config of MSC %u\n",
+bts->nr, msc->nr);
+   rc = -1;
+   }
}
}


--
To view, visit https://gerrit.osmocom.org/11442
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: