Build failure of network:osmocom:latest/openbsc in Debian_Unstable/x86_64

2019-06-24 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:latest/openbsc/Debian_Unstable/x86_64

Package network:osmocom:latest/openbsc failed to build in Debian_Unstable/x86_64

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

Last lines of build log:
[  165s] | configure: exit 0
[  165s] 
[  165s] # -*- compilation -*-
[  165s] 4. testsuite.at:23: testing db ...
[  165s] ./testsuite.at:28: $abs_top_builddir/tests/db/db_test
[  165s] --- expout 2019-06-25 03:01:12.81600 +
[  165s] +++ 
/usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/4/stdout 
2019-06-25 03:01:12.96400 +
[  165s] @@ -1,4 +1,6 @@
[  165s]  Testing subscriber database code.
[  165s]  DB: Database initialized.
[  165s] +no tables in statement !
[  165s] +no tables in statement !
[  165s]  DB: Database prepared.
[  165s]  Done
[  165s] 4. testsuite.at:23: 4. db (testsuite.at:23): FAILED (testsuite.at:28)
[  165s] make[1]: *** [debian/rules:30: override_dh_auto_test] Error 1
[  165s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  165s] make: *** [debian/rules:13: build] Error 2
[  165s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[  165s] 
[  165s] lamb20 failed "build openbsc_1.2.0.dsc" at Tue Jun 25 03:01:14 UTC 
2019.
[  165s] 
[  165s] ### VM INTERACTION START ###
[  168s] [  154.467574] sysrq: SysRq : Power Off
[  168s] [  154.477326] reboot: Power down
[  168s] ### VM INTERACTION END ###
[  168s] 
[  168s] lamb20 failed "build openbsc_1.2.0.dsc" at Tue Jun 25 03:01:18 UTC 
2019.
[  168s] 

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


Build failure of network:osmocom:latest/osmo-sysmon in Debian_Unstable/x86_64

2019-06-24 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sysmon/Debian_Unstable/x86_64

Package network:osmocom:latest/osmo-sysmon failed to build in 
Debian_Unstable/x86_64

Check out the package for editing:
  osc checkout network:osmocom:latest osmo-sysmon

Last lines of build log:
[  158s] #define VERSION "0.1.0"
[  158s] #define STDC_HEADERS 1
[  158s] [  124.742441] serial8250: too much work for irq4
[  158s] #define HAVE_SYS_TYPES_H 1
[  158s] #define HAVE_SYS_STAT_H 1
[  158s] #define HAVE_STDLIB_H 1
[  158s] #define HAVE_STRING_H 1
[  158s] #define HAVE_MEMORY_H 1
[  158s] #define HAVE_STRINGS_H 1
[  158s] #define HAVE_INTTYPES_H 1
[  158s] #define HAVE_STDINT_H 1
[  158s] #define HAVE_UNISTD_H 1
[  158s] #define HAVE_DLFCN_H 1
[  158s] #define LT_OBJDIR ".libs/"
[  158s] 
[  158s] configure: exit 1
[  158s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr 
--includedir=\${prefix}/include --mandir=\${prefix}/share/man 
--infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var 
--disable-silent-rules --libdir=\${prefix}/lib/x86_64-linux-gnu 
--libexecdir=\${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode 
--disable-dependency-tracking returned exit code 1
[  158s] make: *** [debian/rules:45: build] Error 2
[  158s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[  158s] 
[  158s] cloud120 failed "build osmo-sysmon_0.1.0.dsc" at Tue Jun 25 02:59:43 
UTC 2019.
[  158s] 
[  158s] ### VM INTERACTION START ###
[  162s] [  127.901751] sysrq: SysRq : Power Off
[  162s] [  127.906837] reboot: Power down
[  162s] ### VM INTERACTION END ###
[  162s] 
[  162s] cloud120 failed "build osmo-sysmon_0.1.0.dsc" at Tue Jun 25 02:59:48 
UTC 2019.
[  162s] 

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


Build failure of network:osmocom:nightly/libosmocore in Raspbian_9.0/armv7l

2019-06-24 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/Raspbian_9.0/armv7l

Package network:osmocom:nightly/libosmocore failed to build in 
Raspbian_9.0/armv7l

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

Last lines of build log:
[  841s] -Returned: 0, Current node: 1 '%s> '
[  841s] -Going to execute 'ambiguous_str'
[  841s] -Called: 'ambiguous_str [ARG]' (argc=0)
[  841s] -Returned: 0, Current node: 1 '%s> '
[  841s] -Going to execute 'ambiguous_str arg'
[  841s] -Called: 'ambiguous_str [ARG]' (argc=1)
[  841s] -Returned: 0, Current node: 1 '%s> '
[  841s] -Going to execute 'ambiguous_str arg keyword'
[  841s] -Called: 'ambiguous_str ARG keyword'
[  841s] -Returned: 0, Current node: 1 '%s> '
[  841s] -All tests passed
[  841s] ./testsuite.at:196: exit code was 139, expected 0
[  841s] 31. testsuite.at:192: 31. vty (testsuite.at:192): FAILED 
(testsuite.at:196)
[  841s] debian/rules:26: recipe for target 'override_dh_auto_test' failed
[  841s] make[1]: *** [override_dh_auto_test] Error 1
[  841s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  841s] debian/rules:15: recipe for target 'build' failed
[  841s] make: *** [build] Error 2
[  841s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  841s] 
[  841s] obs-arm-6 failed "build libosmocore_1.1.0.72.28a1.dsc" at Tue Jun 25 
02:47:56 UTC 2019.
[  841s] 
[  841s] ### VM INTERACTION START ###
[  843s] [  814.834347] sysrq: SysRq : Power Off
[  843s] [  814.856664] reboot: Power down
[  844s] ### VM INTERACTION END ###
[  844s] 
[  844s] obs-arm-6 failed "build libosmocore_1.1.0.72.28a1.dsc" at Tue Jun 25 
02:48:01 UTC 2019.
[  844s] 

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


Change in ...osmo-python-tests[master]: osmo_trap2cgi.py: Don't recurse in ctrl_client()

2019-06-24 Thread msuraev
msuraev has posted comments on this change. ( 
https://gerrit.osmocom.org/c/python/osmo-python-tests/+/14545 )

Change subject: osmo_trap2cgi.py: Don't recurse in ctrl_client()
..


Patch Set 2:

(1 comment)

Looks good overall but I can't test it of course.
The only thing I'd recommend is to bump the version so it'd be obvious whether 
you're using recursion or loop code.

https://gerrit.osmocom.org/#/c/14545/1/scripts/osmo_trap2cgi.py
File scripts/osmo_trap2cgi.py:

https://gerrit.osmocom.org/#/c/14545/1/scripts/osmo_trap2cgi.py@215
PS1, Line 215: await conn_client(proxy)
> Yes, see also my generic comment. So I'll try to get the recursion out of 
> this script. […]
Nothing special, the recursion variant seems easier to review/understand.



--
To view, visit https://gerrit.osmocom.org/c/python/osmo-python-tests/+/14545
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Change-Id: Ic909e371771f3056cb87e18793fd4225ffb90a2c
Gerrit-Change-Number: 14545
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: msuraev 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Mon, 24 Jun 2019 16:10:13 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: daniel 
Gerrit-MessageType: comment


Change in ...osmo-python-tests[master]: osmo_trap2cgi.py: Don't recurse in ctrl_client()

2019-06-24 Thread daniel
daniel has posted comments on this change. ( 
https://gerrit.osmocom.org/c/python/osmo-python-tests/+/14545 )

Change subject: osmo_trap2cgi.py: Don't recurse in ctrl_client()
..


Patch Set 2:

I ran this script with timeout 0 against a closed port and before this patch 
the script would crash with a recursion error. With this it ran for a long time 
trying to reconnect.

It also reconnected normally after closing an open connection.


--
To view, visit https://gerrit.osmocom.org/c/python/osmo-python-tests/+/14545
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Change-Id: Ic909e371771f3056cb87e18793fd4225ffb90a2c
Gerrit-Change-Number: 14545
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Mon, 24 Jun 2019 15:47:06 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in ...osmo-python-tests[master]: osmo_trap2cgi.py: Don't recurse in ctrl_client()

2019-06-24 Thread daniel
Hello Max, pespin, Jenkins Builder,

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

https://gerrit.osmocom.org/c/python/osmo-python-tests/+/14545

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

Change subject: osmo_trap2cgi.py: Don't recurse in ctrl_client()
..

osmo_trap2cgi.py: Don't recurse in ctrl_client()

Use a loop instead. Without it the script will eventually crash with a
RecursionError.

   File "/usr/bin/osmo_trap2cgi.py", line 211, in conn_client
 await ctrl_client(proxy, reader, writer)
   File "/usr/bin/osmo_trap2cgi.py", line 202, in ctrl_client
 proxy.dispatch(wr, data)
[...]
   File "/usr/bin/osmo_trap2cgi.py", line 202, in ctrl_client
 proxy.dispatch(wr, data)
   File "/usr/bin/osmo_trap2cgi.py", line 201, in ctrl_client
[...]
RecursionError: maximum recursion depth exceeded in comparison

Change-Id: Ic909e371771f3056cb87e18793fd4225ffb90a2c
Related: SYS#4399
---
M scripts/osmo_trap2cgi.py
1 file changed, 17 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests 
refs/changes/45/14545/2
--
To view, visit https://gerrit.osmocom.org/c/python/osmo-python-tests/+/14545
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Change-Id: Ic909e371771f3056cb87e18793fd4225ffb90a2c
Gerrit-Change-Number: 14545
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: newpatchset


Change in ...osmocom-bb[master]: trx_toolkit/data_msg.py: tests: use random reference data

2019-06-24 Thread fixeria
fixeria has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/14572 )

Change subject: trx_toolkit/data_msg.py: tests: use random reference data
..

trx_toolkit/data_msg.py: tests: use random reference data

Having fn = 1024 and tn = 0 in all tests decreases the chances
to spot encoding / decoding bugs of higher or lower values.
Let's randomize the reference data before all the tests.

Change-Id: Id3c5be9faaf0bef727b975c7182098af0cec6e71
---
M src/target/trx_toolkit/data_msg.py
1 file changed, 14 insertions(+), 27 deletions(-)

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



diff --git a/src/target/trx_toolkit/data_msg.py 
b/src/target/trx_toolkit/data_msg.py
index da109d9..5cfb745 100644
--- a/src/target/trx_toolkit/data_msg.py
+++ b/src/target/trx_toolkit/data_msg.py
@@ -432,10 +432,6 @@
log.basicConfig(level = log.DEBUG,
format = "[%(levelname)s] %(filename)s:%(lineno)d %(message)s")

-   # Common reference data
-   fn = 1024
-   tn = 0
-
# Generate two random bursts
burst_l12trx_ref = []
burst_trx2l1_ref = []
@@ -450,17 +446,18 @@
log.info("Generating the reference messages")

# Create messages of both types
-   msg_l12trx_ref = DATAMSG_L12TRX(fn = fn, tn = tn)
-   msg_trx2l1_ref = DATAMSG_TRX2L1(fn = fn, tn = tn)
+   msg_l12trx_ref = DATAMSG_L12TRX(burst = burst_l12trx_ref)
+   msg_trx2l1_ref = DATAMSG_TRX2L1(burst = burst_trx2l1_ref)

-   # Fill in message specific fields
-   msg_trx2l1_ref.rssi = -88
-   msg_l12trx_ref.pwr = 0x33
-   msg_trx2l1_ref.toa256 = -256
+   # Validate header randomization
+   for i in range(0, 100):
+   msg_l12trx_ref.rand_hdr()
+   msg_trx2l1_ref.rand_hdr()

-   # Specify the reference bursts
-   msg_l12trx_ref.burst = burst_l12trx_ref
-   msg_trx2l1_ref.burst = burst_trx2l1_ref
+   assert(msg_l12trx_ref.validate())
+   assert(msg_trx2l1_ref.validate())
+
+   log.info("Validate header randomization: OK")

log.info("Encoding the reference messages")

@@ -493,10 +490,10 @@
log.info("Compare bursts: OK")

# Compare both parsed messages with the reference data
-   assert(msg_l12trx_dec.fn == fn)
-   assert(msg_trx2l1_dec.fn == fn)
-   assert(msg_l12trx_dec.tn == tn)
-   assert(msg_trx2l1_dec.tn == tn)
+   assert(msg_l12trx_dec.fn == msg_l12trx_ref.fn)
+   assert(msg_trx2l1_dec.fn == msg_trx2l1_ref.fn)
+   assert(msg_l12trx_dec.tn == msg_l12trx_ref.tn)
+   assert(msg_trx2l1_dec.tn == msg_trx2l1_ref.tn)

log.info("Compare FN / TN: OK")

@@ -507,16 +504,6 @@

log.info("Compare message specific data: OK")

-   # Validate header randomization
-   for i in range(0, 100):
-   msg_l12trx_ref.rand_hdr()
-   msg_trx2l1_ref.rand_hdr()
-
-   assert(msg_l12trx_ref.validate())
-   assert(msg_trx2l1_ref.validate())
-
-   log.info("Validate header randomization: OK")
-
# Bit conversation test
usbits_ref = list(range(0, 256))
sbits_ref = list(range(-127, 128))

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Id3c5be9faaf0bef727b975c7182098af0cec6e71
Gerrit-Change-Number: 14572
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in ...osmocom-bb[master]: trx_toolkit/data_msg.py: inline both gen_fn() and parse_fn()

2019-06-24 Thread fixeria
fixeria has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/14574 )

Change subject: trx_toolkit/data_msg.py: inline both gen_fn() and parse_fn()
..

trx_toolkit/data_msg.py: inline both gen_fn() and parse_fn()

Both functions are never used outside of both gen_msg() and parse_msg().
AFAIR, they were more complicated until we started to use struct, but
now they can be easily inlined.

Change-Id: Ie64b271cf502f3df23b32f4b14a1e2b551a0f794
---
M src/target/trx_toolkit/data_msg.py
1 file changed, 3 insertions(+), 14 deletions(-)

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



diff --git a/src/target/trx_toolkit/data_msg.py 
b/src/target/trx_toolkit/data_msg.py
index f14c295..6d6b76c 100644
--- a/src/target/trx_toolkit/data_msg.py
+++ b/src/target/trx_toolkit/data_msg.py
@@ -136,16 +136,6 @@

return True

-   # Generates frame number to bytes
-   def gen_fn(self, fn):
-   # Big endian, 4 bytes
-   return struct.pack(">L", fn)
-
-   # Parses frame number from bytes
-   def parse_fn(self, buf):
-   # Big endian, 4 bytes
-   return struct.unpack(">L", buf)[0]
-
# Generates a TRX DATA message
def gen_msg(self, legacy = False):
# Validate all the fields
@@ -158,9 +148,8 @@
# Put timeslot index
buf.append(self.tn)

-   # Put frame number
-   fn = self.gen_fn(self.fn)
-   buf += fn
+   # Put frame number (4 octets, BE)
+   buf += struct.pack(">L", self.fn)

# Generate message specific header part
hdr = self.gen_hdr()
@@ -186,7 +175,7 @@
raise ValueError("Message is to short")

# Parse both fn and tn
-   self.fn = self.parse_fn(msg[1:5])
+   self.fn = struct.unpack(">L", msg[1:5])[0]
self.tn = msg[0]

# Specific message part

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ie64b271cf502f3df23b32f4b14a1e2b551a0f794
Gerrit-Change-Number: 14574
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in ...osmocom-bb[master]: trx_toolkit/data_msg.py: add basic class documentation

2019-06-24 Thread fixeria
fixeria has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/14575 )

Change subject: trx_toolkit/data_msg.py: add basic class documentation
..

trx_toolkit/data_msg.py: add basic class documentation

Change-Id: I538bc96e5e24d3b7e344e4dbe2877bf60c13c720
Related# OS#4006
---
M src/target/trx_toolkit/data_msg.py
1 file changed, 79 insertions(+), 0 deletions(-)

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



diff --git a/src/target/trx_toolkit/data_msg.py 
b/src/target/trx_toolkit/data_msg.py
index 6d6b76c..9ad19f6 100644
--- a/src/target/trx_toolkit/data_msg.py
+++ b/src/target/trx_toolkit/data_msg.py
@@ -28,6 +28,38 @@
 from gsm_shared import *

 class DATAMSG:
+   """ TRXD (DATA) message codec (common part).
+
+   The DATA messages are used to carry bursts in both directions
+   between L1 and TRX. There exist two kinds of them:
+
+ - L12TRX (L1 -> TRX) - to be transmitted bursts,
+ - TRX2L1 (TRX -> L1) - received bursts.
+
+   Both of them have quite similar structure, and start with
+   the common fixed-size message header (no TLVs):
+
+ +---+-++
+ | common header | specific header | burst bits |
+ +---+-++
+
+   while the message specific headers and bit types are different.
+
+   The common header is represented by this class, which is the
+   parent of both DATAMSG_L12TRX and DATAMSG_TRX2L2 (see below),
+   and has the following fields:
+
+ +--+---+
+ | TN (1 octet) | FN (4 octets, BE) |
+ +--+---+
+
+   where:
+
+ - TN is TDMA time-slot number (1 octet), and
+ - FN is TDMA frame number (4 octets, big endian).
+
+   """
+
# Common constructor
def __init__(self, fn = None, tn = None, burst = None):
self.burst = burst
@@ -186,6 +218,25 @@
self.parse_burst(msg_burst)

 class DATAMSG_L12TRX(DATAMSG):
+   """ L12TRX (L1 -> TRX) message codec.
+
+   This message represents a Downlink burst on the BTS side,
+   or an Uplink burst on the MS side, and has the following
+   message specific fixed-size header preceding the burst bits:
+
+ +-++
+ | PWR | hard-bits (1 or 0) |
+ +-++
+
+   where PWR (1 octet) is relative (to the full-scale amplitude)
+   transmit power level in dB. The absolute value is set on
+   the control interface.
+
+   Each hard-bit (1 or 0) of the burst is represented using one
+   byte (0x01 or 0x00 respectively).
+
+   """
+
# Constants
HDR_LEN = 6
PWR_MIN = 0x00
@@ -276,6 +327,34 @@
return msg

 class DATAMSG_TRX2L1(DATAMSG):
+   """ TRX2L1 (TRX -> L1) message codec.
+
+   This message represents an Uplink burst on the BTS side,
+   or a Downlink burst on the MS side, and has the following
+   message specific fixed-size header preceding the burst bits:
+
+ +--+-++
+ | RSSI | ToA | soft-bits (254..0) |
+ +--+-++
+
+   where:
+
+ - RSSI (1 octet) - Received Signal Strength Indication
+encoded without the negative sign.
+ - ToA (2 octets) - Timing of Arrival in units of 1/256
+of symbol (big endian).
+
+   Unlike to be transmitted bursts, the received bursts are designated
+   using the soft-bits notation, so the receiver can indicate its
+   assurance from 0 to -127 that a given bit is 1, and from 0 to +127
+   that a given bit is 0. The Viterbi algorithm allows to approximate
+   the original sequence of hard-bits (1 or 0) using these values.
+
+   Each soft-bit (-127..127) of the burst is encoded as an unsigned
+   value in range (254..0) respectively using the constant shift.
+
+   """
+
# Constants
HDR_LEN = 8


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I538bc96e5e24d3b7e344e4dbe2877bf60c13c720
Gerrit-Change-Number: 14575
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in ...osmocom-bb[master]: trx_toolkit/data_msg.py: drop double field initialization

2019-06-24 Thread fixeria
fixeria has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/14573 )

Change subject: trx_toolkit/data_msg.py: drop double field initialization
..

trx_toolkit/data_msg.py: drop double field initialization

Those fields are being initialized by __init__().

Change-Id: Ibf71be552a7eb5dab1d096421a8557514294683e
---
M src/target/trx_toolkit/data_msg.py
1 file changed, 0 insertions(+), 5 deletions(-)

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



diff --git a/src/target/trx_toolkit/data_msg.py 
b/src/target/trx_toolkit/data_msg.py
index 5cfb745..f14c295 100644
--- a/src/target/trx_toolkit/data_msg.py
+++ b/src/target/trx_toolkit/data_msg.py
@@ -28,11 +28,6 @@
 from gsm_shared import *

 class DATAMSG:
-   # Common message fields
-   burst = None
-   fn = None
-   tn = None
-
# Common constructor
def __init__(self, fn = None, tn = None, burst = None):
self.burst = burst

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ibf71be552a7eb5dab1d096421a8557514294683e
Gerrit-Change-Number: 14573
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in ...osmocom-bb[master]: trx_toolkit/data_msg.py: add basic class documentation

2019-06-24 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/14575 )

Change subject: trx_toolkit/data_msg.py: add basic class documentation
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I538bc96e5e24d3b7e344e4dbe2877bf60c13c720
Gerrit-Change-Number: 14575
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Mon, 24 Jun 2019 14:18:04 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmocom-bb[master]: trx_toolkit/data_msg.py: legacy flag is only for version 0x00

2019-06-24 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/14584


Change subject: trx_toolkit/data_msg.py: legacy flag is only for version 0x00
..

trx_toolkit/data_msg.py: legacy flag is only for version 0x00

Since version 0x01, the burst bits are encoded as L16V,
so appending two dummy octets doesn't make sense.

Change-Id: I4d6c0bf54649d636ea6cb3fa2f37486b6619d5b3
---
M src/target/trx_toolkit/data_msg.py
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/84/14584/1

diff --git a/src/target/trx_toolkit/data_msg.py 
b/src/target/trx_toolkit/data_msg.py
index 7e6ee2e..66fe3c1 100644
--- a/src/target/trx_toolkit/data_msg.py
+++ b/src/target/trx_toolkit/data_msg.py
@@ -258,7 +258,7 @@

# This is a rudiment from (legacy) OpenBTS transceiver,
# some L1 implementations still expect two dummy bytes.
-   if legacy:
+   if legacy and self.ver == 0x00:
buf += bytearray(2)

return buf

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I4d6c0bf54649d636ea6cb3fa2f37486b6619d5b3
Gerrit-Change-Number: 14584
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


Change in ...osmocom-bb[master]: trx_toolkit/fake_trx.py: introduce a TRXC command for C/I simulation

2019-06-24 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/14586


Change subject: trx_toolkit/fake_trx.py: introduce a TRXC command for C/I 
simulation
..

trx_toolkit/fake_trx.py: introduce a TRXC command for C/I simulation

Change-Id: I7080effbbc1022d1884c6d6f0cb580eba8e514ff
---
M src/target/trx_toolkit/fake_trx.py
1 file changed, 28 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/86/14586/1

diff --git a/src/target/trx_toolkit/fake_trx.py 
b/src/target/trx_toolkit/fake_trx.py
index 12bcb80..641dd07 100755
--- a/src/target/trx_toolkit/fake_trx.py
+++ b/src/target/trx_toolkit/fake_trx.py
@@ -63,8 +63,15 @@
  from (rssi_base - rssi_rand_threshold)
to (rssi_base + rssi_rand_threshold).

-   Please note that randomization of both RSSI and ToA is optional,
-   and can be enabled from the control interface.
+ - C/I (Carrier-to-Interference ratio) - value in dB, computed from
+   the training sequence of each received burst, by comparing the
+   "ideal" training sequence with the actual one. A pair of both
+   base and threshold values defines a range of C/I randomization:
+
+ from (ci_base - ci_rand_threshold)
+   to (ci_base + ci_rand_threshold).
+
+   Please note that the randomization is optional and disabled by default.

== Timing Advance handling

@@ -250,6 +257,25 @@
self.rssi_base += int(request[1])
return 0

+   # C/I simulation
+   # Absolute form: CMD FAKE_CI  
+   elif self.ctrl_if.verify_cmd(request, "FAKE_CI", 2):
+   log.debug("(%s) Recv FAKE_CI cmd" % self)
+
+   # Parse and apply both base and threshold
+   self.ci_base = int(request[1])
+   self.ci_rand_threshold = int(request[2])
+   return 0
+
+   # C/I simulation
+   # Relative form: CMD FAKE_CI <+-BASE_DELTA>
+   elif self.ctrl_if.verify_cmd(request, "FAKE_CI", 1):
+   log.debug("(%s) Recv FAKE_CI cmd" % self)
+
+   # Parse and apply delta
+   self.ci_base += int(request[1])
+   return 0
+
# Path loss simulation: burst dropping
# Syntax: CMD FAKE_DROP 
# Dropping pattern: fn % 1 == 0

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I7080effbbc1022d1884c6d6f0cb580eba8e514ff
Gerrit-Change-Number: 14586
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


Change in ...osmocom-bb[master]: trx_toolkit/fake_trx.py: add basic TRXD version 0x01 support

2019-06-24 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/14585


Change subject: trx_toolkit/fake_trx.py: add basic TRXD version 0x01 support
..

trx_toolkit/fake_trx.py: add basic TRXD version 0x01 support

Change-Id: I164f5ae4ce7694d6e324aab927a04e96d489ebd8
---
M src/target/trx_toolkit/ctrl_if_trx.py
M src/target/trx_toolkit/data_if.py
M src/target/trx_toolkit/fake_trx.py
3 files changed, 71 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/85/14585/1

diff --git a/src/target/trx_toolkit/ctrl_if_trx.py 
b/src/target/trx_toolkit/ctrl_if_trx.py
index 26a844f..f343215 100644
--- a/src/target/trx_toolkit/ctrl_if_trx.py
+++ b/src/target/trx_toolkit/ctrl_if_trx.py
@@ -4,7 +4,7 @@
 # TRX Toolkit
 # CTRL interface implementation (common commands)
 #
-# (C) 2016-2018 by Vadim Yanitskiy 
+# (C) 2016-2019 by Vadim Yanitskiy 
 #
 # All Rights Reserved
 #
@@ -147,6 +147,18 @@

return (0, [str(meas_dbm)])

+   # Protocol version negotiation
+   if self.verify_cmd(request, "SETVER", 1):
+   log.debug("(%s) Recv SETVER cmd" % self.trx)
+
+   ver = int(request[1])
+   if not self.trx.data_if.set_hdr_ver(ver):
+   log.error("Protocol version 0x%02x is not 
supported" % ver)
+   return -1
+
+   log.info("Using protocol version 0x%02x on DATA 
interface" % ver)
+   return 0
+
# Wrong / unknown command
else:
# We don't care about other commands,
diff --git a/src/target/trx_toolkit/data_if.py 
b/src/target/trx_toolkit/data_if.py
index 027fd85..5dcb5d1 100644
--- a/src/target/trx_toolkit/data_if.py
+++ b/src/target/trx_toolkit/data_if.py
@@ -4,7 +4,7 @@
 # TRX Toolkit
 # DATA interface implementation
 #
-# (C) 2017-2018 by Vadim Yanitskiy 
+# (C) 2017-2019 by Vadim Yanitskiy 
 #
 # All Rights Reserved
 #
@@ -29,9 +29,29 @@

 class DATAInterface(UDPLink):
def __init__(self, *udp_link_args):
+   # Default header version (legacy)
+   self._hdr_ver = 0x00
+
UDPLink.__init__(self, *udp_link_args)
log.debug("Init TRXD interface (%s)" % self.desc_link())

+   def set_hdr_ver(self, ver):
+   if not ver in DATAMSG.known_versions:
+   return False
+
+   self._hdr_ver = ver
+   return True
+
+   def match_hdr_ver(self, msg):
+   if msg.ver == self._hdr_ver:
+   return True
+
+   log.error("Rx unexpected version %u message "
+ "from R:%s:%u, we need version %u"
+   % (msg.ver, self.remote_addr,
+  self.remote_port, self._hdr_ver))
+   return None
+
def recv_raw_data(self):
data, _ = self.sock.recvfrom(512)
return data
@@ -64,6 +84,13 @@
"from R:%s:%u" % (self.remote_addr, 
self.remote_port))
return None

+   if msg.ver != self._hdr_ver:
+   log.error("Rx unexpected version %u message "
+   "from R:%s:%u, we need version %u"
+   % (msg.ver, self.remote_addr,
+  self.remote_port, self._hdr_ver))
+   return None
+
return msg
 
def send_msg(self, msg, legacy = False):
diff --git a/src/target/trx_toolkit/fake_trx.py 
b/src/target/trx_toolkit/fake_trx.py
index 928333f..12bcb80 100755
--- a/src/target/trx_toolkit/fake_trx.py
+++ b/src/target/trx_toolkit/fake_trx.py
@@ -35,6 +35,7 @@
 from app_common import ApplicationBase
 from burst_fwd import BurstForwarder
 from transceiver import Transceiver
+from data_msg import Modulation
 from clck_gen import CLCKGen
 from trx_list import TRXList
 from fake_pm import FakePM
@@ -98,6 +99,7 @@

TOA256_BASE_DEFAULT = 0
RSSI_BASE_DEFAULT = -60
+   CI_BASE_DEFAULT = 0 # FIXME!

def __init__(self, *trx_args, **trx_kwargs):
Transceiver.__init__(self, *trx_args, **trx_kwargs)
@@ -105,11 +107,14 @@
# Actual ToA / RSSI / TA values
self.toa256_base = self.TOA256_BASE_DEFAULT
self.rssi_base = self.RSSI_BASE_DEFAULT
+   self.ci_base = self.CI_BASE_DEFAULT
+   self.tsc = 0 # FIXME!
self.ta = 0

# ToA / RSSI randomization threshold
self.toa256_rand_threshold = 0
self.rssi_rand_threshold = 0
+   self.ci_rand_threshold = 0

# Path loss simulation (burst dropping)
self.burst_drop_amount = 0
@@ -137

Change in ...docker-playground[master]: Have only one bts/bsc configured in osmo-bsc and bscnat

2019-06-24 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/docker-playground/+/14546 )

Change subject: Have only one bts/bsc configured in osmo-bsc and bscnat
..

Have only one bts/bsc configured in osmo-bsc and bscnat

The way our counter reporting works is that each counter group is
reported even if the same one exists multiple times. To avoid that
change the default config (used by regen_doc.sh) to only configure one
bts / bsc.

Change-Id: I57468d983580b5ed4f15961ac1eac9bed9096556
Related: OS#1700
---
M osmo-bsc-master/osmo-bsc.cfg
M osmo-nitb-master/bscs.config
2 files changed, 0 insertions(+), 194 deletions(-)

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



diff --git a/osmo-bsc-master/osmo-bsc.cfg b/osmo-bsc-master/osmo-bsc.cfg
index 7ce9173..71516dd 100644
--- a/osmo-bsc-master/osmo-bsc.cfg
+++ b/osmo-bsc-master/osmo-bsc.cfg
@@ -157,186 +157,6 @@
timeslot 7
 phys_chan_config PDCH
 hopping enabled 0
- bts 1
-  type sysmobts
-  band DCS1800
-  cell_identity 1
-  location_area_code 2
-  dtx uplink force
-  dtx downlink
-  base_station_id_code 63
-  ms max power 15
-  cell reselection hysteresis 4
-  rxlev access min 0
-  radio-link-timeout 32
-  channel allocator ascending
-  rach tx integer 9
-  rach max transmission 7
-  channel-descrption attach 1
-  channel-descrption bs-pa-mfrms 5
-  channel-descrption bs-ag-blks-res 1
-  early-classmark-sending forbidden
-  ip.access unit_id 1235 0
-  oml ip.access stream_id 255 line 0
-  neighbor-list mode manual-si5
-  neighbor-list add arfcn 100
-  neighbor-list add arfcn 200
-  si5 neighbor-list add arfcn 10
-  si5 neighbor-list add arfcn 20
-  codec-support fr
-  gprs mode gprs
-  gprs 11bit_rach_support_for_egprs 0
-  gprs routing area 0
-  gprs network-control-order nc0
-  gprs cell bvci 1235
-  gprs cell timer blocking-timer 3
-  gprs cell timer blocking-retries 3
-  gprs cell timer unblocking-retries 3
-  gprs cell timer reset-timer 3
-  gprs cell timer reset-retries 3
-  gprs cell timer suspend-timer 10
-  gprs cell timer suspend-retries 3
-  gprs cell timer resume-timer 10
-  gprs cell timer resume-retries 3
-  gprs cell timer capability-update-timer 10
-  gprs cell timer capability-update-retries 3
-  gprs nsei 1235
-  gprs ns timer tns-block 3
-  gprs ns timer tns-block-retries 3
-  gprs ns timer tns-reset 3
-  gprs ns timer tns-reset-retries 3
-  gprs ns timer tns-test 30
-  gprs ns timer tns-alive 3
-  gprs ns timer tns-alive-retries 10
-  gprs nsvc 0 nsvci 1235
-  gprs nsvc 0 local udp port 23000
-  gprs nsvc 0 remote udp port 23000
-  gprs nsvc 0 remote ip 192.168.100.239
-  gprs nsvc 1 nsvci 0
-  gprs nsvc 1 local udp port 0
-  gprs nsvc 1 remote udp port 0
-  gprs nsvc 1 remote ip 0.0.0.0
-  no force-combined-si
-  trx 0
-   rf_locked 0
-   arfcn 871
-   nominal power 23
-   max_power_red 20
-   rsl e1 tei 0
-   timeslot 0
-phys_chan_config CCCH+SDCCH4
-hopping enabled 0
-   timeslot 1
-phys_chan_config TCH/F
-hopping enabled 0
-   timeslot 2
-phys_chan_config TCH/F
-hopping enabled 0
-   timeslot 3
-phys_chan_config TCH/F
-hopping enabled 0
-   timeslot 4
-phys_chan_config TCH/F
-hopping enabled 0
-   timeslot 5
-phys_chan_config TCH/F
-hopping enabled 0
-   timeslot 6
-phys_chan_config PDCH
-hopping enabled 0
-   timeslot 7
-phys_chan_config PDCH
-hopping enabled 0
- bts 2
-  type sysmobts
-  band DCS1800
-  cell_identity 1
-  location_area_code 1
-  dtx uplink force
-  dtx downlink
-  base_station_id_code 63
-  ms max power 15
-  cell reselection hysteresis 4
-  rxlev access min 0
-  radio-link-timeout 32
-  channel allocator ascending
-  rach tx integer 9
-  rach max transmission 7
-  channel-descrption attach 1
-  channel-descrption bs-pa-mfrms 5
-  channel-descrption bs-ag-blks-res 1
-  early-classmark-sending forbidden
-  ip.access unit_id 1236 0
-  oml ip.access stream_id 255 line 0
-  neighbor-list mode manual-si5
-  neighbor-list add arfcn 100
-  neighbor-list add arfcn 200
-  si5 neighbor-list add arfcn 10
-  si5 neighbor-list add arfcn 20
-  codec-support fr
-  gprs mode gprs
-  gprs 11bit_rach_support_for_egprs 0
-  gprs routing area 0
-  gprs network-control-order nc0
-  gprs cell bvci 1236
-  gprs cell timer blocking-timer 3
-  gprs cell timer blocking-retries 3
-  gprs cell timer unblocking-retries 3
-  gprs cell timer reset-timer 3
-  gprs cell timer reset-retries 3
-  gprs cell timer suspend-timer 10
-  gprs cell timer suspend-retries 3
-  gprs cell timer resume-timer 10
-  gprs cell timer resume-retries 3
-  gprs cell timer capability-update-timer 10
-  gprs cell timer capability-update-retries 3
-  gprs nsei 1236
-  gprs ns timer tns-block 3
-  gprs ns timer tns-block-retries 3
-  gprs ns timer tns-reset 3
-  gprs ns timer tns-reset-retries 3
-  gprs ns timer tns-test 30
-  gprs ns tim

Change in ...docker-playground[master]: osmo-mgw: Bind to 0.0.0.0 by default

2019-06-24 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/docker-playground/+/14531 )

Change subject: osmo-mgw: Bind to 0.0.0.0 by default
..

osmo-mgw: Bind to 0.0.0.0 by default

Don't bind to a specific IP otherwise starting osmo-mgw will fail (if we
don't configure that exact IP address)

Related: OS#1700
Change-Id: Ic5828957a29d4f317e1ebf4f03b5f5359f6250e8
---
M osmo-mgw-master/osmo-mgw.cfg
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  daniel: Verified



diff --git a/osmo-mgw-master/osmo-mgw.cfg b/osmo-mgw-master/osmo-mgw.cfg
index 682c4ed..8f07294 100644
--- a/osmo-mgw-master/osmo-mgw.cfg
+++ b/osmo-mgw-master/osmo-mgw.cfg
@@ -34,10 +34,10 @@
  bind 0.0.0.0
 !
 mgcp
-  bind ip 172.18.0.180
+  bind ip 0.0.0.0
   bind port 2427
   rtp port-range 4002 16000
-  rtp bind-ip 172.18.0.180
+  rtp bind-ip 0.0.0.0
   rtp ip-probing
   rtp ip-dscp 184
   no rtp keep-alive

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ic5828957a29d4f317e1ebf4f03b5f5359f6250e8
Gerrit-Change-Number: 14531
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-MessageType: merged


Change in ...docker-playground[master]: osmo-sgsn-master: Bind to localhost instead of a specific IP by default

2019-06-24 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/docker-playground/+/14537 )

Change subject: osmo-sgsn-master: Bind to localhost instead of a specific IP by 
default
..

osmo-sgsn-master: Bind to localhost instead of a specific IP by default

This does not break ttcn3-sgsn-test since it uses a custom config file
with the correct IPs.

Change-Id: I2a922139c50d06217e5e6105ea65bf673daa10a8
Related: OS#1700
---
M osmo-sgsn-master/osmo-sgsn.cfg
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  daniel: Verified



diff --git a/osmo-sgsn-master/osmo-sgsn.cfg b/osmo-sgsn-master/osmo-sgsn.cfg
index 6db56b7..b39a83e 100644
--- a/osmo-sgsn-master/osmo-sgsn.cfg
+++ b/osmo-sgsn-master/osmo-sgsn.cfg
@@ -7,8 +7,8 @@
  bind 0.0.0.0
 !
 sgsn
- gtp local-ip 172.18.0.21
- ggsn 0 remote-ip 172.18.0.201
+ gtp local-ip 127.0.0.1
+ ggsn 0 remote-ip 127.0.0.2
  ggsn 0 gtp-version 1
 ns
  timer tns-block 3
@@ -18,7 +18,7 @@
  timer tns-test 30
  timer tns-alive 3
  timer tns-alive-retries 10
- encapsulation udp local-ip 172.18.0.21
+ encapsulation udp local-ip 127.0.0.1
  encapsulation udp local-port 23000
  encapsulation framerelay-gre enabled 0
 bssgp

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I2a922139c50d06217e5e6105ea65bf673daa10a8
Gerrit-Change-Number: 14537
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in ...docker-playground[master]: osmo-mgw: Bind to 0.0.0.0 by default

2019-06-24 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/14531 )

Change subject: osmo-mgw: Bind to 0.0.0.0 by default
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ic5828957a29d4f317e1ebf4f03b5f5359f6250e8
Gerrit-Change-Number: 14531
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Mon, 24 Jun 2019 14:11:58 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-gsm-tester[master]: tests: voice: Add voice call test with Osmux enabled

2019-06-24 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/14548 )

Change subject: tests: voice: Add voice call test with Osmux enabled
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/14548
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: Ie4f360a77f6fcbc74f140a7fcb5feef2d94ac734
Gerrit-Change-Number: 14548
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Mon, 24 Jun 2019 14:11:26 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-gsm-tester[master]: tests: voice: Add voice call test with Osmux enabled

2019-06-24 Thread laforge
laforge has removed a vote on this change.

Change subject: tests: voice: Add voice call test with Osmux enabled
..


Removed Code-Review+2 by laforge 
--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/14548
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: Ie4f360a77f6fcbc74f140a7fcb5feef2d94ac734
Gerrit-Change-Number: 14548
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: deleteVote


Change in ...osmo-gsm-tester[master]: tests: voice: Add voice call test with Osmux enabled

2019-06-24 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/14548 )

Change subject: tests: voice: Add voice call test with Osmux enabled
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/14548
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: Ie4f360a77f6fcbc74f140a7fcb5feef2d94ac734
Gerrit-Change-Number: 14548
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Mon, 24 Jun 2019 14:11:14 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...gr-gsm[master]: Filter out SoapyAudio devices

2019-06-24 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/gr-gsm/+/13812 )

Change subject: Filter out SoapyAudio devices
..

Filter out SoapyAudio devices

When gr-osmosdr is compiled with SoapySDR support and SoapyAudio is
installed the audio device is picked as a first choice when detecting
devices but grgsm tools are not able to work with audio devices. So in
such cases the user has to always specify the correct SDR device in the
args parameter which is a bit inconvenient.

When args is not specified call osmosdr.device_find to get all devices
and filter out unspported ones like SoapyAudio devices. When args is
specifed just try to create osmosdr.source with whatever value has been
specified.

Add -l and --list-devices command line option that prints information
about all detected devices.

Example commands:
  grgsm_capture --list-devices
  grgsm_capture --list-devices --args=nofake
  grgsm_capture --args=uhd,type=b210 -a 111 capture.cfile
  grgsm_livemon --args=rtl
  grgsm_livemon --args=uhd,type=b210

Change-Id: Ib84081041ca6c2bc18b9da0c32bac9d3ecef65ca
---
M apps/grgsm_livemon.grc
M apps/grgsm_livemon_headless.grc
M apps/grgsm_scanner
M apps/helpers/grgsm_capture
M python/__init__.py
M python/misc_utils/CMakeLists.txt
A python/misc_utils/device.py
7 files changed, 89 insertions(+), 8 deletions(-)

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



diff --git a/apps/grgsm_livemon.grc b/apps/grgsm_livemon.grc
index 46b83e2..176aa6c 100644
--- a/apps/grgsm_livemon.grc
+++ b/apps/grgsm_livemon.grc
@@ -2844,7 +2844,7 @@
 
 
   args
-  args
+  str(grgsm.device.get_default_args(args))
 
 
   _enabled
diff --git a/apps/grgsm_livemon_headless.grc b/apps/grgsm_livemon_headless.grc
index a1ce284..2f3e981 100644
--- a/apps/grgsm_livemon_headless.grc
+++ b/apps/grgsm_livemon_headless.grc
@@ -2414,7 +2414,7 @@
 
 
   args
-  args
+  str(grgsm.device.get_default_args(args))
 
 
   _enabled
diff --git a/apps/grgsm_scanner b/apps/grgsm_scanner
index 32210ed..ce33a60 100755
--- a/apps/grgsm_scanner
+++ b/apps/grgsm_scanner
@@ -36,7 +36,7 @@
 import osmosdr
 import pmt
 import time
-
+import sys

 # from wideband_receiver import *

@@ -208,7 +208,8 @@

 # if no file name is given process data from rtl_sdr source
 print "Args=", args
-self.rtlsdr_source = osmosdr.source(args="numchan=" + str(1) + " " + 
args)
+self.rtlsdr_source = osmosdr.source(args="numchan=" + str(1) + " " +
+str(grgsm.device.get_default_args(args)))
 #self.rtlsdr_source.set_min_output_buffer(int(sample_rate*rec_len)) 
#this line causes segfaults on HackRF
 self.rtlsdr_source.set_sample_rate(sample_rate)

@@ -387,7 +388,10 @@
 parser.add_option("-g", "--gain", dest="gain", type="eng_float", 
default=24.0,
   help="Set gain [default=%default]")
 parser.add_option("", "--args", dest="args", type="string", default="",
-  help="Set device arguments [default=%default]")
+  help="Set device arguments [default=%default]."
+  " Use --list-devices the view the available devices")
+parser.add_option("-l", "--list-devices", action="store_true",
+  help="List available SDR devices, use --args to specify 
hints")
 parser.add_option("--speed", dest="speed", type="intx", default=4,
   help="Scan speed [default=%default]. Value range 0-5.")
 parser.add_option("-v", "--verbose", action="store_true",
@@ -404,6 +408,10 @@
 if options is None:
 (options, args) = argument_parser().parse_args()

+if options.list_devices:
+grgsm.device.print_devices(options.args)
+sys.exit(0)
+
 if options.band not in grgsm.arfcn.get_bands():
 parser.error("Invalid GSM band\n")

diff --git a/apps/helpers/grgsm_capture b/apps/helpers/grgsm_capture
index 081544a..f3886ba 100755
--- a/apps/helpers/grgsm_capture
+++ b/apps/helpers/grgsm_capture
@@ -53,8 +53,8 @@
 # Setting up RF source
 ##

-self.sdr_source = \
-osmosdr.source(args="numchan=" + str(1) + " " + 
device_args)
+self.sdr_source = osmosdr.source(args="numchan=" + str(1) + " " +
+str(grgsm.device.get_default_args(device_args)))

 self.sdr_source.set_sample_rate(samp_rate)
 self.sdr_source.set_center_freq(freq, 0)
@@ -141,12 +141,19 @@

 osmogroup.add_option("", "--args", dest="device_args", type="string",
   default="", help="Set device arguments "
-  "[default=%default]")
+  "[default=%default]. Use --list-devices 

Change in ...gr-gsm[master]: Filter out SoapyAudio devices

2019-06-24 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/gr-gsm/+/13812 )

Change subject: Filter out SoapyAudio devices
..


Patch Set 3: Verified+1


--
To view, visit https://gerrit.osmocom.org/c/gr-gsm/+/13812
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: gr-gsm
Gerrit-Branch: master
Gerrit-Change-Id: Ib84081041ca6c2bc18b9da0c32bac9d3ecef65ca
Gerrit-Change-Number: 13812
Gerrit-PatchSet: 3
Gerrit-Owner: Vasil Velichkov 
Gerrit-Reviewer: Piotr Krysik 
Gerrit-Reviewer: Vasil Velichkov 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Mon, 24 Jun 2019 14:10:40 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmocom-bb[master]: trx_toolkit/data_msg.py: tests: use random reference data

2019-06-24 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/14572 )

Change subject: trx_toolkit/data_msg.py: tests: use random reference data
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Id3c5be9faaf0bef727b975c7182098af0cec6e71
Gerrit-Change-Number: 14572
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Mon, 24 Jun 2019 14:07:54 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmocom-bb[master]: trx_toolkit/data_msg.py: implement header version coding

2019-06-24 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/14576 )

Change subject: trx_toolkit/data_msg.py: implement header version coding
..


Patch Set 2: Code-Review+1

I'm not sure why known_versions already incldues '1' if this patch only 
prepares for new versions (and current being 0), but apart from that fine.


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Idb0377d66290eb9c15d6998a5806a84fa2e5dd02
Gerrit-Change-Number: 14576
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Mon, 24 Jun 2019 14:06:23 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmocom-bb[master]: trx_toolkit/data_msg.py: add basic class documentation

2019-06-24 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/14575 )

Change subject: trx_toolkit/data_msg.py: add basic class documentation
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I538bc96e5e24d3b7e344e4dbe2877bf60c13c720
Gerrit-Change-Number: 14575
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Mon, 24 Jun 2019 13:54:36 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmocom-bb[master]: trx_toolkit/data_msg.py: inline both gen_fn() and parse_fn()

2019-06-24 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/14574 )

Change subject: trx_toolkit/data_msg.py: inline both gen_fn() and parse_fn()
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ie64b271cf502f3df23b32f4b14a1e2b551a0f794
Gerrit-Change-Number: 14574
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Mon, 24 Jun 2019 13:54:20 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmocom-bb[master]: trx_toolkit/data_msg.py: drop double field initialization

2019-06-24 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/14573 )

Change subject: trx_toolkit/data_msg.py: drop double field initialization
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ibf71be552a7eb5dab1d096421a8557514294683e
Gerrit-Change-Number: 14573
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Mon, 24 Jun 2019 13:54:04 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmocom-bb[master]: trx_toolkit/data_msg.py: tests: use random reference data

2019-06-24 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/14572 )

Change subject: trx_toolkit/data_msg.py: tests: use random reference data
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Id3c5be9faaf0bef727b975c7182098af0cec6e71
Gerrit-Change-Number: 14572
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Mon, 24 Jun 2019 13:53:56 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: lib/mgcp: Add new port with support to handle multiple MGCP sockets

2019-06-24 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14512 )

Change subject: lib/mgcp: Add new port with support to handle multiple MGCP 
sockets
..

lib/mgcp: Add new port with support to handle multiple MGCP sockets

* Some scenarios like MGW BSC-attached in SCCPlite require handling of
2 MGCP-over-UDP sockets in MGCP Emulation: 1 for regular
libosmomgcp-client from osmo-bsc and another one from the forward socket
from osmo-bsc (of MGCP-over-IPA messages communicated with MSC).

* Old port is kept for backward compatibility with other tests and
enabled by default. It's also interesting to keep it because it makes
tests without special needs (2 sockets) to use the old port/API which
produces simpler code to read and mantain.

* Users of the new port have to enable multi_conn_mode parameter and
expect to interact with port MGCP_CLIENT_MULTI instead of MGCP_CLIENT,
which will offer messages containing information about the UDP
connection being used by that message.

Change-Id: Ic0ba8c5cde068c07671512a83095d83e28b86746
---
M bsc/BSC_Tests.ttcn
M library/MGCP_CodecPort.ttcn
M library/MGCP_Emulation.ttcn
M msc/MSC_Tests.ttcn
4 files changed, 84 insertions(+), 13 deletions(-)

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



diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 976bc46..4c86e51 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -294,7 +294,8 @@
callagent_ip := mp_bsc_ip,
callagent_udp_port := -1,
mgw_ip := mp_test_ip,
-   mgw_udp_port := 2427
+   mgw_udp_port := 2427,
+   multi_conn_mode := false
};

vc_MGCP := MGCP_Emulation_CT.create(id);
diff --git a/library/MGCP_CodecPort.ttcn b/library/MGCP_CodecPort.ttcn
index d33afe1..8614eef 100644
--- a/library/MGCP_CodecPort.ttcn
+++ b/library/MGCP_CodecPort.ttcn
@@ -41,11 +41,33 @@
MgcpMessage msg
}

+   type record MGCP_SendTo {
+   ConnectionIdconnId,
+   HostNameremName,
+   PortNumber  remPort,
+   MgcpMessage msg
+   };
+
template MGCP_Send t_MGCP_Send(template ConnectionId connId, template 
MgcpMessage msg) := {
connId := connId,
msg := msg
}

+   template MGCP_SendTo t_MGCP_SendTo(template ConnectionId connId, 
HostName remName,
+PortNumber remPort,template 
MgcpMessage msg) := {
+   connId := connId,
+   remName := remName,
+   remPort := remPort,
+   msg := msg
+   }
+
+   template MGCP_SendTo t_MGCP_SendToMrf(MGCP_RecvFrom mrf,template 
MgcpMessage msg) := {
+   connId := mrf.connId,
+   remName := mrf.remName,
+   remPort := mrf.remPort,
+   msg := msg
+   }
+
private function IPL4_to_MGCP_RecvFrom(in ASP_RecvFrom pin, out 
MGCP_RecvFrom pout) {
pout.connId := pin.connId;
pout.remName := pin.remName;
@@ -65,13 +87,23 @@
pout.msg := char2oct(enc_MgcpMessage(pin.msg));
} with { extension "prototype(fast)" };

+   private function MGCP_to_IPL4_SendTo(in MGCP_SendTo pin, out ASP_SendTo 
out_ud) {
+   out_ud.connId := pin.connId;
+   out_ud.remName := pin.remName;
+   out_ud.remPort := pin.remPort;
+   out_ud.proto := { udp := {} };
+   out_ud.msg := char2oct(enc_MgcpMessage(pin.msg));
+   } with { extension "prototype(fast)" };
+
type port MGCP_CODEC_PT message {
-   out MGCP_Send;
+   out MGCP_Send,
+   MGCP_SendTo;
in  MGCP_RecvFrom,
ASP_ConnId_ReadyToRelease,
ASP_Event;
} with { extension "user IPL4asp_PT
-   out(MGCP_Send -> ASP_Send:function(MGCP_to_IPL4_Send))
+   out(MGCP_Send -> ASP_Send:function(MGCP_to_IPL4_Send);
+   MGCP_SendTo -> ASP_SendTo: function(MGCP_to_IPL4_SendTo))
in(ASP_RecvFrom -> MGCP_RecvFrom: 
function(IPL4_to_MGCP_RecvFrom);
   ASP_ConnId_ReadyToRelease -> ASP_ConnId_ReadyToRelease: 
simple;
   ASP_Event -> ASP_Event: simple)"
diff --git a/library/MGCP_Emulation.ttcn b/library/MGCP_Emulation.ttcn
index 23cfeb4..494b171 100644
--- a/library/MGCP_Emulation.ttcn
+++ b/library/MGCP_Emulation.ttcn
@@ -37,8 +37,11 @@
 import from IPL4asp_Types all;

 type component MGCP_ConnHdlr {
+   /* Simple send/recv without caring about peer addr+port. Used with 
multi_conn_mode=false. */
port MGCP_Conn_PT MGCP;
-   /* procedure based port to register for incoming connections */
+   /* Handle multiple connec

Change in ...osmo-ttcn3-hacks[master]: bsc: Test MGCP-over-IPA forwarding in SCCPlite tests

2019-06-24 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14513 )

Change subject: bsc: Test MGCP-over-IPA forwarding in SCCPlite tests
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14513
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I31fed700772dd0b063f913b1e1639fd428c46e7d
Gerrit-Change-Number: 14513
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Mon, 24 Jun 2019 13:53:24 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: bsc: Test MGCP-over-IPA forwarding in SCCPlite tests

2019-06-24 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14513 )

Change subject: bsc: Test MGCP-over-IPA forwarding in SCCPlite tests
..

bsc: Test MGCP-over-IPA forwarding in SCCPlite tests

* MGCP-over-IPA handling in MSC_ConnectionHandler means we need to use
the new MGCP_CLIENT_MULTI port since we'll be managing MGCP messages
from 2 different UDP connections, and we need to be able to route
answers correctly. As a result, parameter multi_conn_mode is enabled for
SCCPlite and all code adapted to use that port in that type of scenario.
* iDuring calls when on SCCPlite, send a full (all-required-params-in)
CRCX through the MGCP-over-IPA connection towards the BSC in order to
emulate the MSC, and expect the correct answer back. This way we test
BSC funcionality to forward MGCP messages coming from MSC works as
expected.

Related: OS#2536
Depends: osmo-bsc.git I38ad8fa645c08900e0e1f1b4b96136bc6d96b3ab
Change-Id: I31fed700772dd0b063f913b1e1639fd428c46e7d
---
M bsc/BSC_Tests.ttcn
M bsc/MSC_ConnectionHandler.ttcn
2 files changed, 135 insertions(+), 18 deletions(-)

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



diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 4c86e51..ec1be13 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -38,6 +38,7 @@
 import from MGCP_Emulation all;
 import from MGCP_Templates all;
 import from MGCP_Types all;
+import from MGCP_CodecPort all;

 import from Osmocom_CTRL_Functions all;
 import from Osmocom_CTRL_Types all;
@@ -295,7 +296,9 @@
callagent_udp_port := -1,
mgw_ip := mp_test_ip,
mgw_udp_port := 2427,
-   multi_conn_mode := false
+   /* Enable it for SCCPlite, since we have 2 MGCP sockets towards 
MGW (UDP one +
+  the on  with MGCP over IPA forwarded from MSC one) */
+   multi_conn_mode := (mp_bssap_cfg.transport == 
BSSAP_TRANSPORT_SCCPlite_SERVER)
};

vc_MGCP := MGCP_Emulation_CT.create(id);
@@ -1718,6 +1721,7 @@
}
connect(vc_conn:BSSAP, g_bssap.vc_RAN:CLIENT);
connect(vc_conn:MGCP, vc_MGCP:MGCP_CLIENT);
+   connect(vc_conn:MGCP_MULTI, vc_MGCP:MGCP_CLIENT_MULTI);
 }

 function f_start_handler(void_fn fn, template (omit) TestHdlrParams pars := 
omit)
@@ -2891,18 +2895,32 @@
 /* Expecting MGCP to DLCX the endpoint's two connections: towards BTS and 
towards MSC */
 private function f_expect_dlcx_conns(boolean exp_clear_cmpl := true) runs on 
MSC_ConnHdlr {
var MgcpCommand mgcp;
+   var template MgcpResponse mgcp_resp;
+   var MGCP_RecvFrom mrf;
+   var template MgcpMessage msg_resp;
+   var template MgcpMessage msg_dlcx := {
+   command := tr_DLCX()
+   }

-   MGCP.receive(tr_DLCX()) -> value mgcp {
+   if (g_pars.aoip) {
+   MGCP.receive(tr_DLCX()) -> value mgcp {
log("Got first DLCX: ", mgcp);
MGCP.send(ts_DLCX_ACK2(mgcp.line.trans_id));
-   };
+   };

-   /* For SCCPLite, BSC doesn't handle the MSC-side */
-   if (g_pars.aoip) {
MGCP.receive(tr_DLCX()) -> value mgcp {
log("Got second DLCX: ", mgcp);
MGCP.send(ts_DLCX_ACK2(mgcp.line.trans_id));
};
+   } else  {
+   /* For SCCPLite, BSC doesn't handle the MSC-side */
+   MGCP_MULTI.receive(tr_MGCP_RecvFrom_any(msg_dlcx)) -> value mrf 
{
+   log("Got first DLCX: ", mrf.msg.command);
+   msg_resp := {
+   response := 
ts_DLCX_ACK2(mrf.msg.command.line.trans_id)
+   }
+   MGCP_MULTI.send(t_MGCP_SendToMrf(mrf, msg_resp));
+   };
}

if (exp_clear_cmpl) {
diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index 4f9870f..57706c9 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -15,6 +15,7 @@
 import from General_Types all;
 import from Osmocom_Types all;
 import from GSM_Types all;
+import from IPA_Emulation all;
 import from SCCPasp_Types all;
 import from BSSAP_Types all;
 import from RAN_Emulation all;
@@ -23,6 +24,7 @@
 import from IPL4asp_Types all;
 import from Native_Functions all;

+import from MGCP_CodecPort all;
 import from MGCP_Types all;
 import from MGCP_Templates all;
 import from MGCP_Emulation all;
@@ -330,13 +332,35 @@
return ts_MDCX_ACK(mgcp_cmd.line.trans_id, mgcp_conn.conn_id, sdp);
 }

+function tr_MGCP_RecvFrom_any(template MgcpMessage msg)
+runs on MSC_ConnHdlr return template MGCP_RecvFrom {
+   var template MGCP_RecvFrom mrf := {
+   connId := ?,
+   remName := ?,
+   remP

Change in ...osmo-ttcn3-hacks[master]: bsc: Refactor altstep as_Media_mgw()

2019-06-24 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14511 )

Change subject: bsc: Refactor altstep as_Media_mgw()
..

bsc: Refactor altstep as_Media_mgw()

Move logic handling CRCX and MDCX to function, so they can be reused for
other ports in forthcoming commits.

Change-Id: I07344657c5d1465a8e0c278adb76150ca7f449ba
---
M bsc/MSC_ConnectionHandler.ttcn
1 file changed, 66 insertions(+), 52 deletions(-)

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



diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index 4436b0c..4f9870f 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -270,69 +270,83 @@

 }

+function f_rx_crcx(MgcpCommand mgcp_cmd)
+runs on MSC_ConnHdlr return template MgcpResponse {
+   var MgcpOsmuxCID osmux_cid;
+   var SDP_Message sdp;
+   var integer cid := f_get_free_mgcp_conn();
+   if (match(mgcp_cmd.line.ep, t_MGCP_EP_wildcard)) {
+   if (cid != 0) {
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, 
"MGCP wildcard EP only works in first CRCX");
+   }
+   /* we keep the endpoint name allocated during MediaState_init */
+   } else {
+   /* Call Agent allocated endpoint, trust/use it always */
+   g_media.mgcp_ep := mgcp_cmd.line.ep;
+   }
+   if (isvalue(mgcp_cmd.sdp)) {
+   sdp := mgcp_cmd.sdp;
+   g_media.mgcp_conn[cid].peer.host := 
sdp.connection.conn_addr.addr;
+   g_media.mgcp_conn[cid].peer.port_nr := 
sdp.media_list[0].media_field.ports.port_number;
+   }
+   var MgcpConnState mgcp_conn := g_media.mgcp_conn[cid];
+   sdp := valueof(ts_SDP(mgcp_conn.mgw.host, mgcp_conn.mgw.host, "foo", 
"21",
+   mgcp_conn.mgw.port_nr, { 
int2str(mgcp_conn.rtp_pt) },
+   {valueof(ts_SDP_rtpmap(mgcp_conn.rtp_pt,
+   mgcp_conn.mime_type & "/" &
+   
int2str(mgcp_conn.sample_rate))),
+   valueof(ts_SDP_ptime(mgcp_conn.ptime)) } ));
+   var template MgcpResponse mgcp_resp;
+   if (g_pars.use_osmux and f_MgcpCmd_contains_par(mgcp_cmd, "X-OSMUX")) {
+   osmux_cid := f_MgcpCmd_extract_osmux_cid(mgcp_cmd);
+   mgcp_resp := ts_CRCX_ACK_osmux(mgcp_cmd.line.trans_id, 
mgcp_conn.conn_id, osmux_cid, sdp);
+   } else {
+   mgcp_resp := ts_CRCX_ACK(mgcp_cmd.line.trans_id, 
mgcp_conn.conn_id, sdp);
+   }
+   f_mgcp_par_append(mgcp_resp.params, ts_MgcpParSpecEP(g_media.mgcp_ep));
+   g_media.mgcp_conn[cid].crcx_seen := g_media.mgcp_conn[cid].crcx_seen + 
1;
+   return mgcp_resp;
+}
+
+function f_rx_mdcx(MgcpCommand mgcp_cmd)
+   runs on MSC_ConnHdlr return template MgcpResponse {
+   var SDP_Message sdp;
+   var integer cid := f_get_mgcp_conn(f_MgcpCmd_extract_conn_id(mgcp_cmd));
+   if (isvalue(mgcp_cmd.sdp)) {
+   sdp := mgcp_cmd.sdp;
+   g_media.mgcp_conn[cid].peer.host := 
sdp.connection.conn_addr.addr;
+   g_media.mgcp_conn[cid].peer.port_nr := 
sdp.media_list[0].media_field.ports.port_number;
+   } else {
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "MDCX has no 
[recognizable] SDP");
+   }
+   var MgcpConnState mgcp_conn := g_media.mgcp_conn[cid];
+   sdp := valueof(ts_SDP(mgcp_conn.peer.host, mgcp_conn.peer.host, "foo", 
"21",
+   mgcp_conn.peer.port_nr, { 
int2str(mgcp_conn.rtp_pt) },
+   {valueof(ts_SDP_rtpmap(mgcp_conn.rtp_pt,
+   mgcp_conn.mime_type & "/" &
+   
int2str(mgcp_conn.sample_rate))),
+   valueof(ts_SDP_ptime(mgcp_conn.ptime)) } ));
+   g_media.mgcp_conn[cid].mdcx_seen := g_media.mgcp_conn[cid].mdcx_seen + 
1;
+   return ts_MDCX_ACK(mgcp_cmd.line.trans_id, mgcp_conn.conn_id, sdp);
+}
+
 /* altstep for handling of MGCP media related commands. Activated by 
as_Media() to test
  * MGW level media handling */
 altstep as_Media_mgw(boolean norepeat := false) runs on MSC_ConnHdlr {
var MgcpCommand mgcp_cmd;
-   var MgcpOsmuxCID osmux_cid;
+   var template MgcpResponse mgcp_resp;

[] MGCP.receive(tr_CRCX) -> value mgcp_cmd {
-   var SDP_Message sdp;
-   var integer cid := f_get_free_mgcp_conn();
-   if (match(mgcp_cmd.line.ep, t_MGCP_EP_wildcard)) {
-   if (cid != 0) {
-   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, 
fail, "MGCP wildcard EP only works in first CRCX");
-   }
-   /* we keep the endpoint name allocated dur

Change in ...osmo-ttcn3-hacks[master]: bsc: Refactor altstep as_Media_mgw()

2019-06-24 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14511 )

Change subject: bsc: Refactor altstep as_Media_mgw()
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14511
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I07344657c5d1465a8e0c278adb76150ca7f449ba
Gerrit-Change-Number: 14511
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Mon, 24 Jun 2019 13:53:00 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: lib/mgcp: Add new port with support to handle multiple MGCP sockets

2019-06-24 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14512 )

Change subject: lib/mgcp: Add new port with support to handle multiple MGCP 
sockets
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14512
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ic0ba8c5cde068c07671512a83095d83e28b86746
Gerrit-Change-Number: 14512
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Mon, 24 Jun 2019 13:52:57 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...docker-playground[master]: ttcn3-{hlr, mgw, pcu}-test: log to file

2019-06-24 Thread osmith
osmith has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/docker-playground/+/14563 )

Change subject: ttcn3-{hlr,mgw,pcu}-test: log to file
..

ttcn3-{hlr,mgw,pcu}-test: log to file

Add missing file output which all other tests already have.

Related: OS#4067
Change-Id: Ifb4a39e6e2987f4dc04369508fe0dff0913a02ff
---
M ttcn3-hlr-test/osmo-hlr.cfg
M ttcn3-mgw-test/osmo-mgw.cfg
M ttcn3-pcu-test/osmo-pcu.cfg
M ttcn3-pcu-test/sns/osmo-pcu.cfg
4 files changed, 41 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  osmith: Verified



diff --git a/ttcn3-hlr-test/osmo-hlr.cfg b/ttcn3-hlr-test/osmo-hlr.cfg
index 8ed77d4..47bbd23 100644
--- a/ttcn3-hlr-test/osmo-hlr.cfg
+++ b/ttcn3-hlr-test/osmo-hlr.cfg
@@ -10,6 +10,16 @@
  logging level all debug
  logging level linp error
 !
+log file /data/osmo-hlr.log
+ logging filter all 1
+ logging color 0
+ logging print level 1
+ logging print category 1
+ logging print category-hex 0
+ logging print file basename last
+ logging print extended-timestamp 1
+ logging level set-all debug
+!
 line vty
  bind 0.0.0.0
 ctrl
diff --git a/ttcn3-mgw-test/osmo-mgw.cfg b/ttcn3-mgw-test/osmo-mgw.cfg
index 8158860..882c7d0 100644
--- a/ttcn3-mgw-test/osmo-mgw.cfg
+++ b/ttcn3-mgw-test/osmo-mgw.cfg
@@ -28,6 +28,17 @@
  logging level lm3ua notice
  logging level lmgcp debug
 !
+log file /data/osmo-mgw.log
+ logging filter all 1
+ logging color 0
+ logging print level 1
+ logging print category 1
+ logging timestamp 1
+ logging print file basename last
+ logging print extended-timestamp 1
+ logging level set-all notice
+ logging level lmgcp debug
+!
 stats interval 5
 !
 line vty
diff --git a/ttcn3-pcu-test/osmo-pcu.cfg b/ttcn3-pcu-test/osmo-pcu.cfg
index 918beea..e8a8552 100644
--- a/ttcn3-pcu-test/osmo-pcu.cfg
+++ b/ttcn3-pcu-test/osmo-pcu.cfg
@@ -1,3 +1,13 @@
+log file /data/osmo-pcu.log
+ logging filter all 1
+ logging color 0
+ logging print level 1
+ logging print category 1
+ logging print category-hex 0
+ logging print file basename last
+ logging print extended-timestamp 1
+ logging level set-all debug
+
 line vty
  no login
  bind 0.0.0.0
diff --git a/ttcn3-pcu-test/sns/osmo-pcu.cfg b/ttcn3-pcu-test/sns/osmo-pcu.cfg
index 34ba20d..f9bce3a 100644
--- a/ttcn3-pcu-test/sns/osmo-pcu.cfg
+++ b/ttcn3-pcu-test/sns/osmo-pcu.cfg
@@ -1,3 +1,13 @@
+log file /data/osmo-pcu.log
+ logging filter all 1
+ logging color 0
+ logging print level 1
+ logging print category 1
+ logging print category-hex 0
+ logging print file basename last
+ logging print extended-timestamp 1
+ logging level set-all debug
+
 line vty
  no login
  bind 0.0.0.0

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ifb4a39e6e2987f4dc04369508fe0dff0913a02ff
Gerrit-Change-Number: 14563
Gerrit-PatchSet: 4
Gerrit-Owner: osmith 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in ...osmo-ttcn3-hacks[master]: bsc: Refactor altstep as_Media_mgw()

2019-06-24 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14511 )

Change subject: bsc: Refactor altstep as_Media_mgw()
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14511
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I07344657c5d1465a8e0c278adb76150ca7f449ba
Gerrit-Change-Number: 14511
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Mon, 24 Jun 2019 13:52:13 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...docker-playground[master]: ttcn3-{hlr, mgw, pcu}-test: log to file

2019-06-24 Thread osmith
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/14563 )

Change subject: ttcn3-{hlr,mgw,pcu}-test: log to file
..


Patch Set 3: Verified+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ifb4a39e6e2987f4dc04369508fe0dff0913a02ff
Gerrit-Change-Number: 14563
Gerrit-PatchSet: 3
Gerrit-Owner: osmith 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Mon, 24 Jun 2019 13:51:57 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-gsm-tester[master]: Introduce osmux support for msc, bsc, mgw

2019-06-24 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/14547 )

Change subject: Introduce osmux support for msc,bsc,mgw
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/14547
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: Ief3518e77650f2cddb48357b07fe95346e46ee1b
Gerrit-Change-Number: 14547
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Mon, 24 Jun 2019 13:51:29 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-pcu[master]: decompress_crbb: add length argument for search_runlen

2019-06-24 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/14481 )

Change subject: decompress_crbb: add length argument for search_runlen
..

decompress_crbb: add length argument for search_runlen

search_runlen() must know the exact size in bits when parsing
the bits otherwise it read over the buffer.
Fixes testcase #7 which was wrongly decoded.

Change-Id: Ie34a0651e7e7efea4e9ecff1e3a467588113cf47
---
M src/egprs_rlc_compression.cpp
M tests/bitcomp/BitcompTest.cpp
M tests/bitcomp/BitcompTest.err
3 files changed, 14 insertions(+), 14 deletions(-)

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



diff --git a/src/egprs_rlc_compression.cpp b/src/egprs_rlc_compression.cpp
index 014e930..8f4fd87 100644
--- a/src/egprs_rlc_compression.cpp
+++ b/src/egprs_rlc_compression.cpp
@@ -449,6 +449,7 @@
 /* Calculate runlength of a  codeword
  * \param root[in]  Root of Ones or Zeros tree
  * \param bmbuf[in] Received compressed bitmap buf
+ * \param length[in] Length of bitmap buf in bits
  * \param bit_pos[in] The start bit pos to read codeword
  * \param len_codewd[in] Length of code word
  * \param rlen[out] Calculated run length
@@ -456,6 +457,7 @@
 static int search_runlen(
egprs_compress_node *root,
const uint8_t *bmbuf,
+   uint8_t length,
uint8_t bit_pos,
uint8_t *len_codewd,
uint16_t *rlen)
@@ -469,6 +471,9 @@
while (iter->run_length == -1) {
if ((!iter->left) && (!iter->right))
return -1;
+   if (bit_pos >= length)
+   return -1;
+
/* get the bit value at the bitpos and put it in right most of 
dir */
dir = (bmbuf[bit_pos/8] >> (7 - (bit_pos & 0x07))) & 0x01;
bit_pos++;
@@ -498,7 +503,7 @@
const uint8_t *orig_crbb_buf,
bitvec *dest)
 {
-
+   int8_t remaining_bmap_len = compress_bmap_len;
uint8_t bit_pos = 0;
uint8_t data;
egprs_compress_node *list = NULL;
@@ -509,7 +514,7 @@
int rc = 0;
egprs_compress *compress = instance();

-   while (compress_bmap_len > 0) {
+   while (remaining_bmap_len > 0) {
if (start) {
data = 0xff;
list = compress->ones_list;
@@ -517,7 +522,7 @@
data = 0x00;
list = compress->zeros_list;
}
-   rc = search_runlen(list, orig_crbb_buf,
+   rc = search_runlen(list, orig_crbb_buf, compress_bmap_len,
bit_pos, &nbits, &run_length);
if (rc == -1)
return -1;
@@ -525,6 +530,7 @@
if (run_length < 64)
start = !start;
cbmaplen = cbmaplen + run_length;
+
/* put run length of Ones in uncompressed bitmap */
while (run_length != 0) {
if (run_length > 8) {
@@ -536,7 +542,7 @@
}
}
bit_pos = bit_pos + nbits;
-   compress_bmap_len = compress_bmap_len - nbits;
+   remaining_bmap_len = remaining_bmap_len - nbits;
}
return 0;
 }
diff --git a/tests/bitcomp/BitcompTest.cpp b/tests/bitcomp/BitcompTest.cpp
index 3fd3b1a..14246fe 100644
--- a/tests/bitcomp/BitcompTest.cpp
+++ b/tests/bitcomp/BitcompTest.cpp
@@ -91,14 +91,13 @@
.ucmp_len = 90,
.expect_rc = 0,
},
-   /* TODO: previously marked as "Invalid inputs" but succeeds */
+   /* Invalid inputs */
{ .crbb_len = 18, .cc = 1,
.crbb_data = {0x1E, 0x70, 0xc0},
.ucmp_data = {0xb0, 0x00, 0x00},
.ucmp_len = 19,
-   .expect_rc = 0,
+   .expect_rc = -1,
},
-   /* Invalid inputs */
{ .crbb_len = 14, .cc = 1,
.crbb_data = {0x00, 0x1E, 0x7c},
.ucmp_data = {0x0},
diff --git a/tests/bitcomp/BitcompTest.err b/tests/bitcomp/BitcompTest.err
index 0642845..0c9bc66 100644
--- a/tests/bitcomp/BitcompTest.err
+++ b/tests/bitcomp/BitcompTest.err
@@ -108,13 +108,8 @@
 Run_length = 1
 Run_length = 1
 Run_length = 2
-Run_length = 15
-rc = 0
-
-expected data = b0 00 00
-expected len = 19
-decoded data = b0 00 00
-decoded len = 19
+rc = -1
+Failed to decode CRBB: length 18, data 1e 70 c0

 Test:8
 Tree based decoding:

--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/14481
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settin

Change in ...osmo-pcu[master]: decompress_crbb: add length argument for search_runlen

2019-06-24 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/14481 )

Change subject: decompress_crbb: add length argument for search_runlen
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/14481
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ie34a0651e7e7efea4e9ecff1e3a467588113cf47
Gerrit-Change-Number: 14481
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Mon, 24 Jun 2019 13:51:05 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-bsc[master]: doc/manuals, vty doc: more handover doc clarifications

2019-06-24 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/14582 )

Change subject: doc/manuals, vty doc: more handover doc clarifications
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I1639efb2dbcca4f0e9c33a74f3067606ce5f4209
Gerrit-Change-Number: 14582
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Mon, 24 Jun 2019 13:49:29 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-pcu[master]: Encoding: drop struct gprs_rlcmac_bts* from all functions

2019-06-24 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/14570 )

Change subject: Encoding: drop struct gprs_rlcmac_bts* from all functions
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/14570
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ia07755e825913a16352ab13f6cf55f2918de8681
Gerrit-Change-Number: 14570
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Mon, 24 Jun 2019 13:48:41 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-pcu[master]: Encoding: drop struct gprs_rlcmac_bts* from all functions

2019-06-24 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/14570 )

Change subject: Encoding: drop struct gprs_rlcmac_bts* from all functions
..

Encoding: drop struct gprs_rlcmac_bts* from all functions

The bts is not used at all.

Change-Id: Ia07755e825913a16352ab13f6cf55f2918de8681
---
M src/encoding.cpp
M src/encoding.h
M src/tbf.cpp
M src/tbf_ul.cpp
4 files changed, 12 insertions(+), 17 deletions(-)

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



diff --git a/src/encoding.cpp b/src/encoding.cpp
index 530cba7..a290c65 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -543,7 +543,6 @@

 /* generate uplink assignment */
 void Encoding::write_packet_uplink_assignment(
-   struct gprs_rlcmac_bts *bts,
bitvec * dest, uint8_t old_tfi,
uint8_t old_downlink, uint32_t tlli, uint8_t use_tlli,
struct gprs_rlcmac_ul_tbf *tbf, uint8_t poll, uint8_t rrbp, uint8_t 
alpha,
@@ -787,7 +786,7 @@
 }
 
 static void write_packet_ack_nack_desc_gprs(
-   struct gprs_rlcmac_bts *bts, bitvec * dest, unsigned& wp,
+   bitvec * dest, unsigned& wp,
gprs_rlc_ul_window *window, bool is_final)
 {
char rbb[65];
@@ -809,12 +808,12 @@
 }

 static void write_packet_uplink_ack_gprs(
-   struct gprs_rlcmac_bts *bts, bitvec * dest, unsigned& wp,
+   bitvec * dest, unsigned& wp,
struct gprs_rlcmac_ul_tbf *tbf, bool is_final)
 {

bitvec_write_field(dest, &wp, mcs_chan_code(tbf->current_cs()), 2); // 
CHANNEL_CODING_COMMAND
-   write_packet_ack_nack_desc_gprs(bts, dest, wp, tbf->window(), is_final);
+   write_packet_ack_nack_desc_gprs(dest, wp, tbf->window(), is_final);

bitvec_write_field(dest, &wp, 1, 1); // 1: have 
CONTENTION_RESOLUTION_TLLI
bitvec_write_field(dest, &wp, tbf->tlli(), 32); // 
CONTENTION_RESOLUTION_TLLI
@@ -830,7 +829,7 @@
 };

 static void write_packet_ack_nack_desc_egprs(
-   struct gprs_rlcmac_bts *bts, bitvec * dest, unsigned& wp,
+   bitvec * dest, unsigned& wp,
gprs_rlc_ul_window *window, bool is_final, unsigned& rest_bits)
 {
unsigned int urbb_len = 0;
@@ -988,7 +987,7 @@
 }

 static void write_packet_uplink_ack_egprs(
-   struct gprs_rlcmac_bts *bts, bitvec * dest, unsigned& wp,
+   bitvec * dest, unsigned& wp,
struct gprs_rlcmac_ul_tbf *tbf, bool is_final)
 {
bitvec_write_field(dest, &wp, 0, 2); // fixed 00
@@ -1010,15 +1009,14 @@

/* -2 for last bit 0 mandatory and REL5 not supported */
unsigned bits_ack_nack = dest->data_len * 8 - wp - 2;
-   write_packet_ack_nack_desc_egprs(bts, dest, wp, tbf->window(), 
is_final, bits_ack_nack);
+   write_packet_ack_nack_desc_egprs(dest, wp, tbf->window(), is_final, 
bits_ack_nack);

bitvec_write_field(dest, &wp, 0, 1); // fixed 0
bitvec_write_field(dest, &wp, 0, 1); // 0: don't have REL 5
 };

 void Encoding::write_packet_uplink_ack(
-   struct gprs_rlcmac_bts *bts, bitvec * dest,
-   struct gprs_rlcmac_ul_tbf *tbf, bool is_final,
+   bitvec * dest, struct gprs_rlcmac_ul_tbf *tbf, bool is_final,
uint8_t rrbp)
 {
unsigned wp = 0;
@@ -1039,11 +1037,11 @@
if (tbf->is_egprs_enabled()) {
/* PU_AckNack_EGPRS = on */
bitvec_write_field(dest, &wp, 1, 1);  // 1: EGPRS
-   write_packet_uplink_ack_egprs(bts, dest, wp, tbf, is_final);
+   write_packet_uplink_ack_egprs(dest, wp, tbf, is_final);
} else {
/* PU_AckNack_GPRS = on */
bitvec_write_field(dest, &wp, 0, 1);  // 0: GPRS
-   write_packet_uplink_ack_gprs(bts, dest, wp, tbf, is_final);
+   write_packet_uplink_ack_gprs(dest, wp, tbf, is_final);
}

LOGP(DRLCMACUL, LOGL_DEBUG,
diff --git a/src/encoding.h b/src/encoding.h
index 2309dc3..6dcced0 100644
--- a/src/encoding.h
+++ b/src/encoding.h
@@ -27,7 +27,6 @@
 #include 
 }

-struct gprs_rlcmac_bts;
 struct gprs_rlcmac_tbf;
 struct bitvec;
 struct gprs_llc;
@@ -57,7 +56,6 @@
);

static void write_packet_uplink_assignment(
-   struct gprs_rlcmac_bts *bts,
bitvec * dest, uint8_t old_tfi,
uint8_t old_downlink, uint32_t tlli, uint8_t use_tlli,
struct gprs_rlcmac_ul_tbf *tbf, uint8_t poll, uint8_t 
rrbp,
@@ -76,8 +74,7 @@
bitvec * dest, uint32_t tlli);

static void write_packet_uplink_ack(
-   struct gprs_rlcmac_bts *bts, bitvec * dest,
-   struct gprs_rlcmac_ul_tbf *tbf, bool is_final,
+   bitvec * dest, struct gprs_rlcmac_ul_tbf *tbf, bool 
is_final,
uint8_t rrbp);

static int write_paging_request(bitvec * dest

Change in ...osmo-pcu[master]: Encoding: use uint16_t when interacting with the window object

2019-06-24 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/14571 )

Change subject: Encoding: use uint16_t when interacting with the window object
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/14571
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: If62fa09d7bfa8e91ce707824f7019edb1b83da9e
Gerrit-Change-Number: 14571
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Mon, 24 Jun 2019 13:48:59 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-pcu[master]: rlc: replace int with uint16_t

2019-06-24 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/14569 )

Change subject: rlc: replace int with uint16_t
..

rlc: replace int with uint16_t

The i value will only count forward and is limited to 11 bit. The integer is 
also
converted when returning to uint16_t

Change-Id: Ib8a9081bbcb8b4344498254c58941002d17f9381
---
M src/rlc.cpp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/rlc.cpp b/src/rlc.cpp
index e5067c9..c6d4330 100644
--- a/src/rlc.cpp
+++ b/src/rlc.cpp
@@ -91,7 +91,7 @@
 /* Update the receive block bitmap */
 uint16_t gprs_rlc_ul_window::update_egprs_rbb(uint8_t *rbb)
 {
-   int i;
+   uint16_t i;
uint16_t bsn;
uint16_t bitmask = 0x80;
int8_t pos = 0;

--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/14569
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ib8a9081bbcb8b4344498254c58941002d17f9381
Gerrit-Change-Number: 14569
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in ...osmo-pcu[master]: rlc: replace int with uint16_t

2019-06-24 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/14569 )

Change subject: rlc: replace int with uint16_t
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/14569
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ib8a9081bbcb8b4344498254c58941002d17f9381
Gerrit-Change-Number: 14569
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Mon, 24 Jun 2019 13:48:08 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...libosmocore[master]: utils.h: require a semi colon after OSMO_ASSERT

2019-06-24 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/14578 )

Change subject: utils.h: require a semi colon after OSMO_ASSERT
..


Patch Set 3: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I2272d29a81496164bebd1696a694383a28a86434
Gerrit-Change-Number: 14578
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Mon, 24 Jun 2019 13:47:31 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...libosmocore[master]: utils.h: require a semi colon after OSMO_ASSERT

2019-06-24 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/14578 )

Change subject: utils.h: require a semi colon after OSMO_ASSERT
..


Patch Set 3:

I didn't even know you could do a "do if ..." construct.  I would have nested 
them. Intresting :)


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I2272d29a81496164bebd1696a694383a28a86434
Gerrit-Change-Number: 14578
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Mon, 24 Jun 2019 13:47:51 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in ...docker-playground[master]: redmine: migrate from 3.4 to 3.4-passenger

2019-06-24 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/docker-playground/+/14583 )

Change subject: redmine: migrate from 3.4 to 3.4-passenger
..

redmine: migrate from 3.4 to 3.4-passenger

This provides much more reasonable performance on our high-end server

Change-Id: Idaa19566d1d5ac4ea0ff0296d57d1f9ca2bd599b
---
M redmine/Dockerfile
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  laforge: Looks good to me, approved; Verified



diff --git a/redmine/Dockerfile b/redmine/Dockerfile
index 488d6f4..6402236 100644
--- a/redmine/Dockerfile
+++ b/redmine/Dockerfile
@@ -1,4 +1,4 @@
-FROM redmine:3.4
+FROM redmine:3.4-passenger

 RUNapt-get update && \
apt-get install -y --no-install-recommends \

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Idaa19566d1d5ac4ea0ff0296d57d1f9ca2bd599b
Gerrit-Change-Number: 14583
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in ...docker-playground[master]: redmine: migrate from 3.4 to 3.4-passenger

2019-06-24 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/14583 )

Change subject: redmine: migrate from 3.4 to 3.4-passenger
..


Patch Set 1: Verified+1 Code-Review+2

change already deployed, vastly improved performance


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Idaa19566d1d5ac4ea0ff0296d57d1f9ca2bd599b
Gerrit-Change-Number: 14583
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Mon, 24 Jun 2019 13:46:05 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...docker-playground[master]: ttcn3-{hlr, mgw, pcu}-test: log to file

2019-06-24 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/14563 )

Change subject: ttcn3-{hlr,mgw,pcu}-test: log to file
..


Patch Set 3: Code-Review+2


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ifb4a39e6e2987f4dc04369508fe0dff0913a02ff
Gerrit-Change-Number: 14563
Gerrit-PatchSet: 3
Gerrit-Owner: osmith 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Mon, 24 Jun 2019 13:46:47 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-pcu[master]: Cosmetic: Osmcoom -> Osmocom

2019-06-24 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/14580 )

Change subject: Cosmetic: Osmcoom -> Osmocom
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/14580
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I02c6b2655df54ca40717ce7609013d0bc54eabdf
Gerrit-Change-Number: 14580
Gerrit-PatchSet: 1
Gerrit-Owner: keith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Mon, 24 Jun 2019 13:45:47 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-pcu[master]: Cosmetic: Osmcoom -> Osmocom

2019-06-24 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/14580 )

Change subject: Cosmetic: Osmcoom -> Osmocom
..

Cosmetic: Osmcoom -> Osmocom

Change-Id: I02c6b2655df54ca40717ce7609013d0bc54eabdf
---
M debian/control
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/debian/control b/debian/control
index c808795..9ff9d88 100644
--- a/debian/control
+++ b/debian/control
@@ -20,7 +20,7 @@
 Description: Osmocom GPRS/EDGE Packet Control Unit (PCU)
  The GPRS Packet Control Unit is co-located with the GSM BTS or GSM BSC
  in order to provide packet-switched services for 2G (2.5G, 2.75G)
- networks.  OsmoPCU is the Osmcoom implementation of this network
+ networks.  OsmoPCU is the Osmocom implementation of this network
  element. It interfaces to osmo-bts via the PCU socket of OsmoBTS
  and via Gb (NS-over-IP) interface with the SGSN such as OsmoSGSN.

@@ -33,7 +33,7 @@
 Description: Debug symbols for the Osmocom GPRS/EDGE Packet Control Unit (PCU)
  The GPRS Packet Control Unit is co-located with the GSM BTS or GSM BSC
  in order to provide packet-switched services for 2G (2.5G, 2.75G)
- networks.  OsmoPCU is the Osmcoom implementation of this network
+ networks.  OsmoPCU is the Osmocom implementation of this network
  element. It interfaces to osmo-bts via the PCU socket of OsmoBTS
  and via Gb (NS-over-IP) interface with the SGSN such as OsmoSGSN.


--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/14580
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I02c6b2655df54ca40717ce7609013d0bc54eabdf
Gerrit-Change-Number: 14580
Gerrit-PatchSet: 1
Gerrit-Owner: keith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in ...osmocom-bb[master]: trxcon/scheduler: fix bit shift in BSIC / TDMA FN calculation

2019-06-24 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/14581 )

Change subject: trxcon/scheduler: fix bit shift in BSIC / TDMA FN calculation
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I4e72db1143a68064ba83668414dc3d60c0e1ad78
Gerrit-Change-Number: 14581
Gerrit-PatchSet: 2
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Mon, 24 Jun 2019 13:45:28 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmocom-bb[master]: trxcon/scheduler: fix bit shift in BSIC / TDMA FN calculation

2019-06-24 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/14581 )

Change subject: trxcon/scheduler: fix bit shift in BSIC / TDMA FN calculation
..

trxcon/scheduler: fix bit shift in BSIC / TDMA FN calculation

Ubsan is unhappy about shifts into the sign bit of our implicitly
promoted value.

Change-Id: I4e72db1143a68064ba83668414dc3d60c0e1ad78
---
M src/host/trxcon/sched_lchan_sch.c
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/host/trxcon/sched_lchan_sch.c 
b/src/host/trxcon/sched_lchan_sch.c
index e1977e1..9eed506 100644
--- a/src/host/trxcon/sched_lchan_sch.c
+++ b/src/host/trxcon/sched_lchan_sch.c
@@ -47,7 +47,7 @@
uint8_t t3p;
uint32_t sb;

-   sb = (sb_info[3] << 24)
+   sb = ((uint32_t)sb_info[3] << 24)
   | (sb_info[2] << 16)
   | (sb_info[1] << 8)
   | sb_info[0];

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I4e72db1143a68064ba83668414dc3d60c0e1ad78
Gerrit-Change-Number: 14581
Gerrit-PatchSet: 2
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in ...osmocom-bb[master]: trxcon/scheduler: fix bit shift in BSIC / TDMA FN calculation

2019-06-24 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/14581 )

Change subject: trxcon/scheduler: fix bit shift in BSIC / TDMA FN calculation
..


Patch Set 2: Code-Review+1


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I4e72db1143a68064ba83668414dc3d60c0e1ad78
Gerrit-Change-Number: 14581
Gerrit-PatchSet: 2
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Comment-Date: Mon, 24 Jun 2019 12:56:57 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmocom-bb[master]: trxcon/scheduler: fix bit shift in BSIC / TDMA FN calculation

2019-06-24 Thread fixeria
fixeria has uploaded a new patch set (#2) to the change originally created by 
Hoernchen. ( https://gerrit.osmocom.org/c/osmocom-bb/+/14581 )

Change subject: trxcon/scheduler: fix bit shift in BSIC / TDMA FN calculation
..

trxcon/scheduler: fix bit shift in BSIC / TDMA FN calculation

Ubsan is unhappy about shifts into the sign bit of our implicitly
promoted value.

Change-Id: I4e72db1143a68064ba83668414dc3d60c0e1ad78
---
M src/host/trxcon/sched_lchan_sch.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/81/14581/2
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/14581
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I4e72db1143a68064ba83668414dc3d60c0e1ad78
Gerrit-Change-Number: 14581
Gerrit-PatchSet: 2
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset


Change in ...osmo-pcu[master]: Cosmetic: Osmcoom -> Osmocom

2019-06-24 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/14580 )

Change subject: Cosmetic: Osmcoom -> Osmocom
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/14580
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I02c6b2655df54ca40717ce7609013d0bc54eabdf
Gerrit-Change-Number: 14580
Gerrit-PatchSet: 1
Gerrit-Owner: keith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Comment-Date: Mon, 24 Jun 2019 12:51:51 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...docker-playground[master]: redmine: migrate from 3.4 to 3.4-passenger

2019-06-24 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/docker-playground/+/14583


Change subject: redmine: migrate from 3.4 to 3.4-passenger
..

redmine: migrate from 3.4 to 3.4-passenger

This provides much more reasonable performance on our high-end server

Change-Id: Idaa19566d1d5ac4ea0ff0296d57d1f9ca2bd599b
---
M redmine/Dockerfile
1 file changed, 1 insertion(+), 1 deletion(-)



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

diff --git a/redmine/Dockerfile b/redmine/Dockerfile
index 488d6f4..6402236 100644
--- a/redmine/Dockerfile
+++ b/redmine/Dockerfile
@@ -1,4 +1,4 @@
-FROM redmine:3.4
+FROM redmine:3.4-passenger

 RUNapt-get update && \
apt-get install -y --no-install-recommends \

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Idaa19566d1d5ac4ea0ff0296d57d1f9ca2bd599b
Gerrit-Change-Number: 14583
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in ...osmo-bsc[master]: doc/manuals, vty doc: more handover doc clarifications

2019-06-24 Thread neels
neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/14582


Change subject: doc/manuals, vty doc: more handover doc clarifications
..

doc/manuals, vty doc: more handover doc clarifications

Related: OS#3487
Change-Id: I1639efb2dbcca4f0e9c33a74f3067606ce5f4209
---
M doc/manuals/chapters/handover.adoc
M include/osmocom/bsc/handover_cfg.h
M src/osmo-bsc/handover_vty.c
3 files changed, 25 insertions(+), 19 deletions(-)



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

diff --git a/doc/manuals/chapters/handover.adoc 
b/doc/manuals/chapters/handover.adoc
index 2f9d598..bb99751 100644
--- a/doc/manuals/chapters/handover.adoc
+++ b/doc/manuals/chapters/handover.adoc
@@ -434,7 +434,8 @@

 Configuration settings relevant for algorithm 1 start with `handover1`. For
 further details, please refer to the OsmoBSC VTY Reference
-(<>) or the telnet VTY online documentation.
+(<>) or the telnet VTY online documentation. See the
+`handover1` settings on the `config-net` and `config-net-bts` nodes.

  Handover Algorithm 2

@@ -451,7 +452,8 @@

 Configuration settings relevant for algorithm 2 start with `handover2`. For
 further details, please refer to the OsmoBSC VTY Reference
-<> or the telnet VTY online documentation.
+<> or the telnet VTY online documentation. See the `handover2`
+settings on the `config-net` and `config-net-bts` nodes.

 = Load Distribution

@@ -472,8 +474,8 @@
 adhere to minimum reception levels and distance, see `min rxlev` and `max
 distance`.

-Load distribution will take effect only for already established voice channels.
-An MS will always first establish a voice call with its current cell choice; in
+Load distribution will take effect only for already established channels.
+For example, an MS will always first establish a voice call with its current 
cell choice; in
 load situations, it might be moved to another cell shortly after that.
 Considering the best neighbor _before_ starting a new voice call might be
 desirable, but is currently not implemented. Consider that RXLEV/RXQUAL ratings
diff --git a/include/osmocom/bsc/handover_cfg.h 
b/include/osmocom/bsc/handover_cfg.h
index 92b5cd4..f174aad 100644
--- a/include/osmocom/bsc/handover_cfg.h
+++ b/include/osmocom/bsc/handover_cfg.h
@@ -96,22 +96,22 @@
"handover1 ", "window rxlev averaging", "<1-10>", atoi, "%u", 
as_is, \
HO_CFG_STR_HANDOVER1 \
HO_CFG_STR_WIN_RXLEV \
-   "How many RxLev measurements are used for averaging\n" \
+   "How many RxLev measurements to use for averaging\n" \
"RxLev averaging: " HO_CFG_STR_AVG_COUNT) \
\
HO_CFG_ONE_MEMBER(unsigned int, hodec1_rxqual_avg_win, 1, \
"handover1 ", "window rxqual averaging", "<1-10>", atoi, "%u", 
as_is, \
HO_CFG_STR_HANDOVER1 \
HO_CFG_STR_WIN_RXQUAL \
-   "How many RxQual measurements are used for averaging\n" \
+   "How many RxQual measurements to use for averaging\n" \
"RxQual averaging: " HO_CFG_STR_AVG_COUNT) \
\
HO_CFG_ONE_MEMBER(unsigned int, hodec1_rxlev_neigh_avg_win, 10, \
"handover1 ", "window rxlev neighbor averaging", "<1-10>", 
atoi, "%u", as_is, \
HO_CFG_STR_HANDOVER1 \
HO_CFG_STR_WIN_RXLEV \
-   "How many Neighbor RxLev measurements are used for averaging\n" 
\
-   "How many Neighbor RxLev measurements are used for averaging\n" 
\
+   "How many Neighbor RxLev measurements to use for averaging\n" \
+   "How many Neighbor RxLev measurements to use for averaging\n" \
"Neighbor RxLev averaging: " HO_CFG_STR_AVG_COUNT) \
\
HO_CFG_ONE_MEMBER(unsigned int, hodec1_pwr_interval, 6, \
@@ -142,22 +142,22 @@
"handover2 ", "window rxlev averaging", "<1-10>", atoi, "%u", 
as_is, \
HO_CFG_STR_HANDOVER2 \
HO_CFG_STR_WIN_RXLEV \
-   "How many RxLev measurements are used for averaging\n" \
+   "How many RxLev measurements to use for averaging\n" \
"RxLev averaging: " HO_CFG_STR_AVG_COUNT) \
\
HO_CFG_ONE_MEMBER(unsigned int, hodec2_rxqual_avg_win, 1, \
"handover2 ", "window rxqual averaging", "<1-10>", atoi, "%u", 
as_is, \
HO_CFG_STR_HANDOVER2 \
HO_CFG_STR_WIN_RXQUAL \
-   "How many RxQual measurements are used for averaging\n" \
+   "How many RxQual measurements to use for averaging\n" \
"RxQual averaging: " HO_CFG_STR_AVG_COUNT) \
\
HO_CFG_ONE_MEMBER(unsigned int, hodec2_rxlev_neigh_avg_win, 10, \
"handover2 ", "window rxlev neighbor averaging", "<1-10>", 
atoi, "%u", as_is, \
HO_CFG_STR_

Change in ...osmocom-bb[master]: trcon: fix shift

2019-06-24 Thread Hoernchen
Hoernchen has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/14581


Change subject: trcon: fix shift
..

trcon: fix shift

Ubsan is unhappy about shifts into the sign bit of our implicitly
promoted value.

Change-Id: I4e72db1143a68064ba83668414dc3d60c0e1ad78
---
M src/host/trxcon/sched_lchan_sch.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/81/14581/1

diff --git a/src/host/trxcon/sched_lchan_sch.c 
b/src/host/trxcon/sched_lchan_sch.c
index e1977e1..9eed506 100644
--- a/src/host/trxcon/sched_lchan_sch.c
+++ b/src/host/trxcon/sched_lchan_sch.c
@@ -47,7 +47,7 @@
uint8_t t3p;
uint32_t sb;

-   sb = (sb_info[3] << 24)
+   sb = ((uint32_t)sb_info[3] << 24)
   | (sb_info[2] << 16)
   | (sb_info[1] << 8)
   | sb_info[0];

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I4e72db1143a68064ba83668414dc3d60c0e1ad78
Gerrit-Change-Number: 14581
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-MessageType: newchange


Change in ...osmo-pcu[master]: Cosmetic: Osmcoom -> Osmocom

2019-06-24 Thread keith
keith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/14580


Change subject: Cosmetic: Osmcoom -> Osmocom
..

Cosmetic: Osmcoom -> Osmocom

Change-Id: I02c6b2655df54ca40717ce7609013d0bc54eabdf
---
M debian/control
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/80/14580/1

diff --git a/debian/control b/debian/control
index c808795..9ff9d88 100644
--- a/debian/control
+++ b/debian/control
@@ -20,7 +20,7 @@
 Description: Osmocom GPRS/EDGE Packet Control Unit (PCU)
  The GPRS Packet Control Unit is co-located with the GSM BTS or GSM BSC
  in order to provide packet-switched services for 2G (2.5G, 2.75G)
- networks.  OsmoPCU is the Osmcoom implementation of this network
+ networks.  OsmoPCU is the Osmocom implementation of this network
  element. It interfaces to osmo-bts via the PCU socket of OsmoBTS
  and via Gb (NS-over-IP) interface with the SGSN such as OsmoSGSN.

@@ -33,7 +33,7 @@
 Description: Debug symbols for the Osmocom GPRS/EDGE Packet Control Unit (PCU)
  The GPRS Packet Control Unit is co-located with the GSM BTS or GSM BSC
  in order to provide packet-switched services for 2G (2.5G, 2.75G)
- networks.  OsmoPCU is the Osmcoom implementation of this network
+ networks.  OsmoPCU is the Osmocom implementation of this network
  element. It interfaces to osmo-bts via the PCU socket of OsmoBTS
  and via Gb (NS-over-IP) interface with the SGSN such as OsmoSGSN.


--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/14580
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I02c6b2655df54ca40717ce7609013d0bc54eabdf
Gerrit-Change-Number: 14580
Gerrit-PatchSet: 1
Gerrit-Owner: keith 
Gerrit-MessageType: newchange


Change in ...docker-playground[master]: ttcn3-{hlr, mgw, pcu}-test: log to file

2019-06-24 Thread osmith
Hello pespin, fixeria, laforge,

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

https://gerrit.osmocom.org/c/docker-playground/+/14563

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

Change subject: ttcn3-{hlr,mgw,pcu}-test: log to file
..

ttcn3-{hlr,mgw,pcu}-test: log to file

Add missing file output which all other tests already have.

Related: OS#4067
Change-Id: Ifb4a39e6e2987f4dc04369508fe0dff0913a02ff
---
M ttcn3-hlr-test/osmo-hlr.cfg
M ttcn3-mgw-test/osmo-mgw.cfg
M ttcn3-pcu-test/osmo-pcu.cfg
M ttcn3-pcu-test/sns/osmo-pcu.cfg
4 files changed, 41 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/63/14563/3
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/14563
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ifb4a39e6e2987f4dc04369508fe0dff0913a02ff
Gerrit-Change-Number: 14563
Gerrit-PatchSet: 3
Gerrit-Owner: osmith 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: newpatchset


Change in ...docker-playground[master]: ttcn3-hlr-test: log to file and gsmtap

2019-06-24 Thread osmith
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/14563 )

Change subject: ttcn3-hlr-test: log to file and gsmtap
..


Patch Set 2:

That makes sense. I'll update the patch to add the missing file logging only.

GSMTAP discussion:
https://lists.osmocom.org/pipermail/openbsc/2019-June/012946.html


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ifb4a39e6e2987f4dc04369508fe0dff0913a02ff
Gerrit-Change-Number: 14563
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Mon, 24 Jun 2019 07:26:22 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment