Change in pysim[master]: pySim/transport: introduce Calypso based reader interface

2018-10-26 Thread Vadim Yanitskiy
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/11480

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

Change subject: pySim/transport: introduce Calypso based reader interface
..

pySim/transport: introduce Calypso based reader interface

This interface allows to use a Calypso based phone (e.g. Motorola
C1XX) as a SIM card reader. It basically implements a few L1CTL
messages that are used to interact with the SIM card through
the OsmocomBB 'layer1' firmware.

Please note, that this is an experimental implementation, and
there is a risk that SIM programming would fail. Nevertheless,
I've managed to program and read one of my SIMs a few times.

Change-Id: Iec8101140581bf9e2cf7cf3a0b54bdf1875fc51b
---
M pySim/exceptions.py
A pySim/transport/calypso.py
2 files changed, 160 insertions(+), 0 deletions(-)


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

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iec8101140581bf9e2cf7cf3a0b54bdf1875fc51b
Gerrit-Change-Number: 11480
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)


Change in pysim[master]: pySim/transport: introduce Calypso based reader interface

2018-10-26 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/11480


Change subject: pySim/transport: introduce Calypso based reader interface
..

pySim/transport: introduce Calypso based reader interface

This interface allows to use a Calypso based phone (e.g. Motorola
C1XX) as a SIM card reader. It basically implements a few L1CTL
messages that are used to interact with the SIM card through
the OsmocomBB 'layer1' firmware.

Please note, that this is an experimental implementation, and
there is a risk that SIM programming would fail. Nevertheless,
I've managed to program and read one of my SIMs a few times.

Change-Id: Iec8101140581bf9e2cf7cf3a0b54bdf1875fc51b
---
M pySim/exceptions.py
A pySim/transport/calypso.py
2 files changed, 160 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/80/11480/1

diff --git a/pySim/exceptions.py b/pySim/exceptions.py
index 403f54c..831b1c9 100644
--- a/pySim/exceptions.py
+++ b/pySim/exceptions.py
@@ -31,3 +31,6 @@

 class ProtocolError(exceptions.Exception):
pass
+
+class ReaderError(exceptions.Exception):
+   pass
diff --git a/pySim/transport/calypso.py b/pySim/transport/calypso.py
new file mode 100644
index 000..c0cfcbb
--- /dev/null
+++ b/pySim/transport/calypso.py
@@ -0,0 +1,157 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+""" pySim: Transport Link for Calypso bases phones
+"""
+
+#
+# Copyright (C) 2018 Vadim Yanitskiy 
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see .
+#
+
+from __future__ import absolute_import
+
+import select
+import struct
+import socket
+import os
+
+from pySim.transport import LinkBase
+from pySim.exceptions import *
+from pySim.utils import h2b, b2h
+from pySim.utils import h2i, i2h
+
+class L1CTLMessage(object):
+
+   # Every (encoded) L1CTL message has the following structure:
+   #  - msg_length (2 bytes, net order)
+   #  - l1ctl_hdr (packed structure)
+   #- msg_type
+   #- flags
+   #- padding (2 spare bytes)
+   #  - ... payload ...
+
+   def __init__(self, msg_type, flags = 0x00):
+   # Init L1CTL message header
+   self.data = struct.pack("BBxx", msg_type, flags)
+
+   def gen_msg(self):
+   return struct.pack("!H", len(self.data)) + self.data
+
+class L1CTLMessageReset(L1CTLMessage):
+
+   # L1CTL message types
+   L1CTL_RESET_REQ = 0x0d
+   L1CTL_RESET_IND = 0x07
+   L1CTL_RESET_CONF= 0x0e
+
+   # Reset types
+   L1CTL_RES_T_BOOT= 0x00
+   L1CTL_RES_T_FULL= 0x01
+   L1CTL_RES_T_SCHED   = 0x02
+
+   def __init__(self, type = L1CTL_RES_T_FULL):
+   super(L1CTLMessageReset, self).__init__(self.L1CTL_RESET_REQ)
+   self.data += struct.pack("Bxxx", type)
+
+class L1CTLMessageSIM(L1CTLMessage):
+
+   # SIM related message types
+   L1CTL_SIM_REQ   = 0x16
+   L1CTL_SIM_CONF  = 0x17
+
+   def __init__(self, pdu):
+   super(L1CTLMessageSIM, self).__init__(self.L1CTL_SIM_REQ)
+   self.data += pdu
+
+class CalypsoSimLink(LinkBase):
+
+   def __init__(self, sock_path = "/tmp/osmocom_l2"):
+   # Make sure that a given socket path exists
+   if not os.path.exists(sock_path):
+   raise ReaderError("There is no such ('%s') UNIX socket" 
% sock_path)
+
+   print("Connecting to osmocon at '%s'..." % sock_path)
+
+   # Establish a client connection
+   self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
+   self.sock.connect(sock_path)
+
+   def __del__(self):
+   self.sock.close()
+
+   def reset_card(self):
+   # Request FULL reset
+   req_msg = L1CTLMessageReset()
+   self.sock.send(req_msg.gen_msg())
+
+   # Wait for confirmation (timeout is 3 seconds)
+   s, _, _ = select.select([self.sock], [], [], 3.0)
+   if not s:
+   raise ReaderError("Timeout waiting for L1CTL_RESET_REQ")
+   else:
+   rsp = self.sock.recv(128)
+   rsp_msg = struct.unpack_from("!HB", rsp)
+   if 

Change in pysim[master]: pySim-*.py: add command line option for Calypso reader

2018-10-26 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/11482


Change subject: pySim-*.py: add command line option for Calypso reader
..

pySim-*.py: add command line option for Calypso reader

Change-Id: Ia895ced62d29e06ae8af05cd95c9d181fb53b9df
---
M pySim-prog.py
M pySim-read.py
2 files changed, 14 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/82/11482/1

diff --git a/pySim-prog.py b/pySim-prog.py
index ba1b783..8a17d9d 100755
--- a/pySim-prog.py
+++ b/pySim-prog.py
@@ -58,6 +58,10 @@
help="Which PC/SC reader number for SIM access",
default=None,
)
+   parser.add_option("--calypso-phy", dest="osmocon_sock", metavar="PATH",
+   help="Socket path for Calypso (e.g. Motorola C1XX) 
based reader (via OsmocomBB)",
+   default=None,
+   )
parser.add_option("-t", "--type", dest="type",
help="Card type (user -t list to view) [default: 
%default]",
default="auto",
@@ -566,6 +570,9 @@
if opts.pcsc_dev is not None:
from pySim.transport.pcsc import PcscSimLink
sl = PcscSimLink(opts.pcsc_dev)
+   if opts.osmocon_sock is not None:
+   from pySim.transport.calypso import CalypsoSimLink
+   sl = CalypsoSimLink(sock_path=opts.osmocon_sock)
else: # Serial reader is default
from pySim.transport.serial import SerialSimLink
sl = SerialSimLink(device=opts.device, baudrate=opts.baudrate)
diff --git a/pySim-read.py b/pySim-read.py
index 066b0df..65184ed 100755
--- a/pySim-read.py
+++ b/pySim-read.py
@@ -56,6 +56,10 @@
help="Which PC/SC reader number for SIM access",
default=None,
)
+   parser.add_option("--calypso-phy", dest="osmocon_sock", metavar="PATH",
+   help="Socket path for Calypso (e.g. Motorola C1XX) 
based reader (via OsmocomBB)",
+   default=None,
+   )

(options, args) = parser.parse_args()

@@ -74,6 +78,9 @@
if opts.pcsc_dev is not None:
from pySim.transport.pcsc import PcscSimLink
sl = PcscSimLink(opts.pcsc_dev)
+   if opts.osmocon_sock is not None:
+   from pySim.transport.calypso import CalypsoSimLink
+   sl = CalypsoSimLink(sock_path=opts.osmocon_sock)
else: # Serial reader is default
from pySim.transport.serial import SerialSimLink
sl = SerialSimLink(device=opts.device, baudrate=opts.baudrate)

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

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia895ced62d29e06ae8af05cd95c9d181fb53b9df
Gerrit-Change-Number: 11482
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 


Change in pysim[master]: pySim-*.py: refactor card reader driver initialization

2018-10-26 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/11481


Change subject: pySim-*.py: refactor card reader driver initialization
..

pySim-*.py: refactor card reader driver initialization

This would facilitate adding new card reader drivers.

Change-Id: Ia893537786c95a6aab3a51fb1ba7169023d5ef97
---
M pySim-prog.py
M pySim-read.py
2 files changed, 10 insertions(+), 10 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/81/11481/1

diff --git a/pySim-prog.py b/pySim-prog.py
index ae5e482..ba1b783 100755
--- a/pySim-prog.py
+++ b/pySim-prog.py
@@ -562,13 +562,13 @@
# Parse options
opts = parse_options()

-   # Connect to the card
-   if opts.pcsc_dev is None:
-   from pySim.transport.serial import SerialSimLink
-   sl = SerialSimLink(device=opts.device, baudrate=opts.baudrate)
-   else:
+   # Init card reader driver
+   if opts.pcsc_dev is not None:
from pySim.transport.pcsc import PcscSimLink
sl = PcscSimLink(opts.pcsc_dev)
+   else: # Serial reader is default
+   from pySim.transport.serial import SerialSimLink
+   sl = SerialSimLink(device=opts.device, baudrate=opts.baudrate)

# Create command layer
scc = SimCardCommands(transport=sl)
diff --git a/pySim-read.py b/pySim-read.py
index e807e3e..066b0df 100755
--- a/pySim-read.py
+++ b/pySim-read.py
@@ -70,13 +70,13 @@
# Parse options
opts = parse_options()

-   # Connect to the card
-   if opts.pcsc_dev is None:
-   from pySim.transport.serial import SerialSimLink
-   sl = SerialSimLink(device=opts.device, baudrate=opts.baudrate)
-   else:
+   # Init card reader driver
+   if opts.pcsc_dev is not None:
from pySim.transport.pcsc import PcscSimLink
sl = PcscSimLink(opts.pcsc_dev)
+   else: # Serial reader is default
+   from pySim.transport.serial import SerialSimLink
+   sl = SerialSimLink(device=opts.device, baudrate=opts.baudrate)

# Create command layer
scc = SimCardCommands(transport=sl)

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

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia893537786c95a6aab3a51fb1ba7169023d5ef97
Gerrit-Change-Number: 11481
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 


Change in osmocom-bb[master]: mobile: cleanup app init

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

Change subject: mobile: cleanup app init
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/11456/1//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/#/c/11456/1//COMMIT_MSG@9
PS1, Line 9: remove redundant printf
> ok, fine.
Let's do this removement in a separate change, because this is the
only part I would vote +1. Other points look useless for me, sorry.



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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc38feb03656bd9a52aa29095ff7423e0e6ad53b
Gerrit-Change-Number: 11456
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 26 Oct 2018 23:04:09 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmocom-bb[master]: layer23/common: move SIM APDU caching from l1ctl.c

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

Change subject: layer23/common: move SIM APDU caching from l1ctl.c
..

layer23/common: move SIM APDU caching from l1ctl.c

L1CTL implementation (i.e. l1ctl.c) is not a good place for the
SIM specific stuff. Let's move it to the proper place (i.e. sim.c).

As a bonus, this change fixes a possible problem of loosing the
cached APDUs if two or more L2&3 applications are using a single
LAPDm connection. The APDU buffer is dedicated per MS now.

Change-Id: I564c610e45aa3b630ca5d1ec6bc1cace0dc9c566
---
M src/host/layer23/include/osmocom/bb/common/sim.h
M src/host/layer23/src/common/l1ctl.c
M src/host/layer23/src/common/sim.c
3 files changed, 29 insertions(+), 16 deletions(-)

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



diff --git a/src/host/layer23/include/osmocom/bb/common/sim.h 
b/src/host/layer23/include/osmocom/bb/common/sim.h
index 95d2147..8b1f830 100644
--- a/src/host/layer23/include/osmocom/bb/common/sim.h
+++ b/src/host/layer23/include/osmocom/bb/common/sim.h
@@ -176,6 +176,10 @@
uint8_t reset;
uint8_t chv1_remain, chv2_remain;
uint8_t unblk1_remain, unblk2_remain;
+
+   /* APDU cache (used by GSMTAP) */
+   uint8_t apdu_data[256 + 7];
+   uint16_t apdu_len;
 };

 struct sim_hdr {
diff --git a/src/host/layer23/src/common/l1ctl.c 
b/src/host/layer23/src/common/l1ctl.c
index 6f4a6d8..b3f73a8 100644
--- a/src/host/layer23/src/common/l1ctl.c
+++ b/src/host/layer23/src/common/l1ctl.c
@@ -50,9 +50,6 @@

 extern struct gsmtap_inst *gsmtap_inst;

-static int apdu_len = -1;
-static uint8_t apdu_data[256 + 7];
-
 static struct msgb *osmo_l1_alloc(uint8_t msg_type)
 {
struct l1ctl_hdr *l1h;
@@ -620,12 +617,6 @@
struct msgb *msg;
uint8_t *dat;

-   if (length <= sizeof(apdu_data)) {
-   memcpy(apdu_data, data, length);
-   apdu_len = length;
-   } else
-   apdu_len = -1;
-
msg = osmo_l1_alloc(L1CTL_SIM_REQ);
if (!msg)
return -1;
@@ -642,13 +633,6 @@
uint16_t len = msgb_l2len(msg);
uint8_t *data = msg->data;

-   if (apdu_len > -1 && apdu_len + len <= sizeof(apdu_data)) {
-   memcpy(apdu_data + apdu_len, data, len);
-   apdu_len += len;
-   gsmtap_send_ex(gsmtap_inst, GSMTAP_TYPE_SIM, 0, 0, 0, 0, 0, 0,
-   0, apdu_data, apdu_len);
-   }
-
LOGP(DL1C, LOGL_INFO, "SIM %s\n", osmo_hexdump(data, len));

sim_apdu_resp(ms, msg);
diff --git a/src/host/layer23/src/common/sim.c 
b/src/host/layer23/src/common/sim.c
index c2d6033..7f5240d 100644
--- a/src/host/layer23/src/common/sim.c
+++ b/src/host/layer23/src/common/sim.c
@@ -24,11 +24,15 @@
 #include 
 #include 
 #include 
+#include 
+#include 

 #include 
 #include 
 #include 

+extern struct gsmtap_inst *gsmtap_inst;
+
 static int sim_process_job(struct osmocom_ms *ms);

 /*
@@ -185,6 +189,16 @@
LOGP(DSIM, LOGL_INFO, "sending APDU (class 0x%02x, ins 0x%02x)\n",
data[0], data[1]);

+   /* Cache this APDU, so it can be sent to GSMTAP on response */
+   if (length <= sizeof(ms->sim.apdu_data)) {
+   memcpy(ms->sim.apdu_data, data, length);
+   ms->sim.apdu_len = length;
+   } else {
+   LOGP(DSIM, LOGL_NOTICE, "Cannot cache SIM APDU "
+   "(len=%u), so it won't be sent to GSMTAP\n", length);
+   ms->sim.apdu_len = 0;
+   }
+
/* adding SAP client support
 * it makes more sense to do it here then in L1CTL */
if (ms->subscr.sim_type == GSM_SIM_TYPE_SAP) {
@@ -861,6 +875,17 @@
struct gsm_response_mfdf_gsm *mfdf_gsm;
int i;

+   /* If there is cached APDU */
+   if (ms->sim.apdu_len) {
+   /* ... and APDU buffer has enough space, send it to GSMTAP */
+   if ((ms->sim.apdu_len + length) <= sizeof(ms->sim.apdu_data)) {
+   memcpy(ms->sim.apdu_data + ms->sim.apdu_len, data, 
length);
+   ms->sim.apdu_len += length;
+   gsmtap_send_ex(gsmtap_inst, GSMTAP_TYPE_SIM,
+   0, 0, 0, 0, 0, 0, 0, ms->sim.apdu_data, 
ms->sim.apdu_len);
+   }
+   }
+
/* ignore, if current job already gone */
if (!sim->job_msg) {
LOGP(DSIM, LOGL_ERROR, "received APDU but no job, "

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I564c610e45aa3b630ca5d1ec6bc1cace0dc9c566
Gerrit-Change-Number: 11247
Gerrit-PatchSet: 2
Gerrit-Owner: 

Change in osmocom-bb[master]: layer23/l23sap.c: use the CHAN_IS_SACCH() macro

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

Change subject: layer23/l23sap.c: use the CHAN_IS_SACCH() macro
..


Abandoned

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

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


Change in osmocom-bb[master]: layer23/l23sap.c: fix: use host byte order for dl->frame_nr

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

Change subject: layer23/l23sap.c: fix: use host byte order for dl->frame_nr
..


Abandoned

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

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


Change in osmo-bts[master]: Add OC-2G BTS sources

2018-10-26 Thread Omar Ramadan
Omar Ramadan has posted comments on this change. ( 
https://gerrit.osmocom.org/11447 )

Change subject: Add OC-2G BTS sources
..


Patch Set 4:

Thanks for the review Harald. I've squashed the changes as requested and have 
also added oc2g as a target to jenkins_bts_model which I have verified as 
passing. However, it hasn't shown up in jenkins (I think we need to add the 
target configuration)


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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I327384fe5ac944dc3996a3f00932d6f1a10d5a35
Gerrit-Change-Number: 11447
Gerrit-PatchSet: 4
Gerrit-Owner: Omar Ramadan 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Omar Ramadan 
Gerrit-Comment-Date: Fri, 26 Oct 2018 22:58:05 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmocom-bb[master]: layer23/l1ctl.c: fix: use host byte order for TDMA fn

2018-10-26 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/11477


Change subject: layer23/l1ctl.c: fix: use host byte order for TDMA fn
..

layer23/l1ctl.c: fix: use host byte order for TDMA fn

Change-Id: Iad00eebf03b38b9c4fc2d7ed66697d23a953d8b2
---
M src/host/layer23/src/common/l1ctl.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/77/11477/1

diff --git a/src/host/layer23/src/common/l1ctl.c 
b/src/host/layer23/src/common/l1ctl.c
index b3f73a8..96db52f 100644
--- a/src/host/layer23/src/common/l1ctl.c
+++ b/src/host/layer23/src/common/l1ctl.c
@@ -180,7 +180,7 @@
 * - select correct paging block that is for us.
 * - initialize ds_fail according to BS_PA_MFRMS.
 */
-   if ((dl->frame_nr % 51) != 6)
+   if ((meas->last_fn % 51) != 6)
break;
if (!meas->ds_fail)
break;

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad00eebf03b38b9c4fc2d7ed66697d23a953d8b2
Gerrit-Change-Number: 11477
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 


Change in osmocom-bb[master]: layer23/common: move signal loss criteria to L23SAP

2018-10-26 Thread Vadim Yanitskiy
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/11251

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

Change subject: layer23/common: move signal loss criteria to L23SAP
..

layer23/common: move signal loss criteria to L23SAP

Change-Id: Ib70bf9104cf3b5489413dd90819fd4955ec16f95
---
M src/host/layer23/src/common/l1ctl.c
M src/host/layer23/src/common/l23sap.c
2 files changed, 83 insertions(+), 67 deletions(-)


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib70bf9104cf3b5489413dd90819fd4955ec16f95
Gerrit-Change-Number: 11251
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmocom-bb[master]: (WIP) misc/cbch_sacn: indicate CBCH cbits to L1/PHY

2018-10-26 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/11478


Change subject: (WIP) misc/cbch_sacn: indicate CBCH cbits to L1/PHY
..

(WIP) misc/cbch_sacn: indicate CBCH cbits to L1/PHY

Change-Id: If19f2b2ed645c0f6f5baf7ed853b41011603f1a0
---
M src/host/layer23/src/misc/app_cbch_sniff.c
1 file changed, 8 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/78/11478/1

diff --git a/src/host/layer23/src/misc/app_cbch_sniff.c 
b/src/host/layer23/src/misc/app_cbch_sniff.c
index 8256eaf..4d50c15 100644
--- a/src/host/layer23/src/misc/app_cbch_sniff.c
+++ b/src/host/layer23/src/misc/app_cbch_sniff.c
@@ -48,6 +48,12 @@
return 0;
}

+#define L1SAP_CHAN_IS_SDCCH4(chan_nr) ((chan_nr >> 3) & 3)
+#define L1SAP_CHAN_IS_SDCCH8(chan_nr) ((chan_nr >> 3) & 7)
+#define L1SAP_SDCCH_TO_CBCH(chan_nr) \
+   (L1SAP_CHAN_IS_SDCCH4(chan_nr) ? ((0x18 << 3) | (chan_nr & 0x07)) \
+   : L1SAP_CHAN_IS_SDCCH8(chan_nr) ? ((0x19 << 3) | (chan_nr & 
0x07)) : 0x00)
+
if (s->h) {
LOGP(DRR, LOGL_INFO, "chan_nr = 0x%02x TSC = %d  MAIO = %d  "
"HSN = %d  hseq (%d): %s\n",
@@ -56,13 +62,13 @@
osmo_hexdump((unsigned char *) s->hopping, s->hopp_len 
* 2));
return l1ctl_tx_dm_est_req_h1(ms,
s->maio, s->hsn, s->hopping, s->hopp_len,
-   s->chan_nr, s->tsc,
+   L1SAP_SDCCH_TO_CBCH(s->chan_nr), s->tsc,
GSM48_CMODE_SIGN, 0);
} else {
LOGP(DRR, LOGL_INFO, "chan_nr = 0x%02x TSC = %d  ARFCN = %d\n",
s->chan_nr, s->tsc, s->arfcn);
return l1ctl_tx_dm_est_req_h0(ms, s->arfcn,
-   s->chan_nr, s->tsc, GSM48_CMODE_SIGN, 0);
+   L1SAP_SDCCH_TO_CBCH(s->chan_nr), s->tsc, 
GSM48_CMODE_SIGN, 0);
}
 }


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If19f2b2ed645c0f6f5baf7ed853b41011603f1a0
Gerrit-Change-Number: 11478
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 


Change in osmocom-bb[master]: layer23/ccch_scan: unwrap dump_bcch() as gsm48_rx_bcch()

2018-10-26 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/11479


Change subject: layer23/ccch_scan: unwrap dump_bcch() as gsm48_rx_bcch()
..

layer23/ccch_scan: unwrap dump_bcch() as gsm48_rx_bcch()

Change-Id: I382fbdb60513324164cd1147c36f3367bb6fb22c
---
M src/host/layer23/src/misc/app_ccch_scan.c
1 file changed, 11 insertions(+), 14 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/79/11479/1

diff --git a/src/host/layer23/src/misc/app_ccch_scan.c 
b/src/host/layer23/src/misc/app_ccch_scan.c
index 88a2bef..4c88ded 100644
--- a/src/host/layer23/src/misc/app_ccch_scan.c
+++ b/src/host/layer23/src/misc/app_ccch_scan.c
@@ -130,11 +130,16 @@
l1ctl_tx_ccch_mode_req(ms, app_state.ccch_mode);
 }

-static void dump_bcch(struct osmocom_ms *ms, uint8_t tc, const uint8_t *data)
+int gsm48_rx_bcch(struct msgb *msg, struct osmocom_ms *ms)
 {
struct gsm48_system_information_type_header *si_hdr;
-   si_hdr = (struct gsm48_system_information_type_header *) data;
-   uint8_t si_type = si_hdr->system_information;
+   uint8_t si_type, tc = 0;
+
+   /* FIXME: we have lost the gsm frame time until here,
+* need to store it in some msgb context, so tc=0 */
+
+   si_hdr = (struct gsm48_system_information_type_header *) msg->l3h;
+   si_type = si_hdr->system_information;

LOGP(DRR, LOGL_INFO, "BCCH message (type=0x%02x): %s\n",
si_type, gsm48_rr_msg_name(si_type));
@@ -146,13 +151,15 @@
switch (si_type) {
case GSM48_MT_RR_SYSINFO_3:
handle_si3(ms,
-   (struct gsm48_system_information_type_3 *) data);
+   (struct gsm48_system_information_type_3 *) si_hdr);
break;

default:
/* We don't care about other types of SI */
break; /* thus there is nothing to do */
};
+
+   return 0;
 }


@@ -446,16 +453,6 @@
return rc;
 }

-int gsm48_rx_bcch(struct msgb *msg, struct osmocom_ms *ms)
-{
-   /* FIXME: we have lost the gsm frame time until here, need to store it
-* in some msgb context */
-   //dump_bcch(dl->time.tc, ccch->data);
-   dump_bcch(ms, 0, msg->l3h);
-
-   return 0;
-}
-
 void layer3_app_reset(void)
 {
/* Reset state */

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I382fbdb60513324164cd1147c36f3367bb6fb22c
Gerrit-Change-Number: 11479
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 


Change in osmocom-bb[master]: l1ctl_proto.h: use flexible array member for traffic messages

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

Change subject: l1ctl_proto.h: use flexible array member for traffic messages
..


Patch Set 2:

> this may need synchronization with other implementations of
 > l1ctl_proto, such as the TTCN-3 code?

Sure, thanks!


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I119fa36c84e95c3003d57c19e25f8146ed45c3c6
Gerrit-Change-Number: 11395
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 26 Oct 2018 22:45:55 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-bts[master]: Add OC-2G BTS sources

2018-10-26 Thread Omar Ramadan
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/11447

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

Change subject: Add OC-2G BTS sources
..

Add OC-2G BTS sources

Change-Id: I327384fe5ac944dc3996a3f00932d6f1a10d5a35
---
M configure.ac
M contrib/jenkins_bts_model.sh
A contrib/jenkins_oc2g.sh
A contrib/systemd/oc2gbts-mgr.service
A contrib/systemd/osmo-bts-oc2g.service
A doc/examples/oc2g/oc2gbts-mgr.cfg
A doc/examples/oc2g/osmo-bts.cfg
M include/osmo-bts/gsm_data_shared.h
M include/osmo-bts/phy_link.h
M src/Makefile.am
M src/common/gsm_data_shared.c
A src/osmo-bts-oc2g/Makefile.am
A src/osmo-bts-oc2g/calib_file.c
A src/osmo-bts-oc2g/hw_info.ver_major
A src/osmo-bts-oc2g/hw_misc.c
A src/osmo-bts-oc2g/hw_misc.h
A src/osmo-bts-oc2g/l1_if.c
A src/osmo-bts-oc2g/l1_if.h
A src/osmo-bts-oc2g/l1_transp.h
A src/osmo-bts-oc2g/l1_transp_hw.c
A src/osmo-bts-oc2g/main.c
A src/osmo-bts-oc2g/misc/oc2gbts_bid.c
A src/osmo-bts-oc2g/misc/oc2gbts_bid.h
A src/osmo-bts-oc2g/misc/oc2gbts_bts.c
A src/osmo-bts-oc2g/misc/oc2gbts_bts.h
A src/osmo-bts-oc2g/misc/oc2gbts_clock.c
A src/osmo-bts-oc2g/misc/oc2gbts_clock.h
A src/osmo-bts-oc2g/misc/oc2gbts_led.c
A src/osmo-bts-oc2g/misc/oc2gbts_led.h
A src/osmo-bts-oc2g/misc/oc2gbts_mgr.c
A src/osmo-bts-oc2g/misc/oc2gbts_mgr.h
A src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c
A src/osmo-bts-oc2g/misc/oc2gbts_mgr_nl.c
A src/osmo-bts-oc2g/misc/oc2gbts_mgr_temp.c
A src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c
A src/osmo-bts-oc2g/misc/oc2gbts_misc.c
A src/osmo-bts-oc2g/misc/oc2gbts_misc.h
A src/osmo-bts-oc2g/misc/oc2gbts_nl.c
A src/osmo-bts-oc2g/misc/oc2gbts_nl.h
A src/osmo-bts-oc2g/misc/oc2gbts_par.c
A src/osmo-bts-oc2g/misc/oc2gbts_par.h
A src/osmo-bts-oc2g/misc/oc2gbts_power.c
A src/osmo-bts-oc2g/misc/oc2gbts_power.h
A src/osmo-bts-oc2g/misc/oc2gbts_swd.c
A src/osmo-bts-oc2g/misc/oc2gbts_swd.h
A src/osmo-bts-oc2g/misc/oc2gbts_temp.c
A src/osmo-bts-oc2g/misc/oc2gbts_temp.h
A src/osmo-bts-oc2g/misc/oc2gbts_util.c
A src/osmo-bts-oc2g/oc2gbts.c
A src/osmo-bts-oc2g/oc2gbts.h
A src/osmo-bts-oc2g/oc2gbts_vty.c
A src/osmo-bts-oc2g/oml.c
A src/osmo-bts-oc2g/oml_router.c
A src/osmo-bts-oc2g/oml_router.h
A src/osmo-bts-oc2g/tch.c
A src/osmo-bts-oc2g/utils.c
A src/osmo-bts-oc2g/utils.h
57 files changed, 13,546 insertions(+), 1 deletion(-)


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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I327384fe5ac944dc3996a3f00932d6f1a10d5a35
Gerrit-Change-Number: 11447
Gerrit-PatchSet: 4
Gerrit-Owner: Omar Ramadan 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in libosmocore[master]: add osmo_sock_get_{local, remote}_ip{, _port}()

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

Change subject: add osmo_sock_get_{local,remote}_ip{,_port}()
..

add osmo_sock_get_{local,remote}_ip{,_port}()

Return only the IP or port of either the local or remote connection,
not the whole set of IP and port of both the local and remote
connection like osmo_sock_get_name() does it. This is needed for
OS#2841, where we only want to print the remote IP.

Related: OS#2841
Change-Id: I6803c204771c59a2002bc6a0e6b79c83c35f87e1
---
M include/osmocom/core/socket.h
M src/socket.c
2 files changed, 92 insertions(+), 25 deletions(-)

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



diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h
index f23a243..28f89a5 100644
--- a/include/osmocom/core/socket.h
+++ b/include/osmocom/core/socket.h
@@ -9,6 +9,7 @@

 #include 
 #include 
+#include 

 struct sockaddr;
 struct osmo_fd;
@@ -56,6 +57,11 @@
const char *socket_path, unsigned int flags);

 char *osmo_sock_get_name(void *ctx, int fd);
+int osmo_sock_get_local_ip(int fd, char *host, size_t len);
+int osmo_sock_get_local_ip_port(int fd, char *port, size_t len);
+int osmo_sock_get_remote_ip(int fd, char *host, size_t len);
+int osmo_sock_get_remote_ip_port(int fd, char *port, size_t len);
+

 int osmo_sock_mcast_loop_set(int fd, bool enable);
 int osmo_sock_mcast_ttl_set(int fd, uint8_t ttl);
diff --git a/src/socket.c b/src/socket.c
index bb5505f..c7e1c9d 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -682,6 +682,86 @@
return osmo_fd_init_ofd(ofd, osmo_sock_unix_init(type, proto, 
socket_path, flags));
 }

+/*! Get the IP and/or port number on socket. This is for internal usage.
+ *  Convenience wrappers: osmo_sock_get_local_ip(),
+ *  osmo_sock_get_local_ip_port(), osmo_sock_get_remote_ip(),
+ *  osmo_sock_get_remote_ip_port() and osmo_sock_get_name()
+ *  \param[in] fd file descriptor of socket
+ *  \param[out] ip IP address (will be filled in when not NULL)
+ *  \param[in] ip_len length of the ip buffer
+ *  \param[out] port number (will be filled in when not NULL)
+ *  \param[in] port_len length of the port buffer
+ *  \param[in] local (true) or remote (false) name will get looked at
+ *  \returns 0 on success; negative otherwise
+ */
+static int osmo_sock_get_name2(int fd, char *ip, size_t ip_len, char *port, 
size_t port_len, bool local)
+{
+   struct sockaddr sa;
+   socklen_t len = sizeof(sa);
+   char ipbuf[64], portbuf[16];
+   int rc;
+
+   rc = local ? getsockname(fd, , ) : getpeername(fd, , );
+   if (rc < 0)
+   return rc;
+
+   rc = getnameinfo(, len, ipbuf, sizeof(ipbuf),
+portbuf, sizeof(portbuf),
+NI_NUMERICHOST | NI_NUMERICSERV);
+   if (rc < 0)
+   return rc;
+
+   if (ip)
+   strncpy(ip, ipbuf, ip_len);
+   if (port)
+   strncpy(port, portbuf, port_len);
+   return 0;
+}
+
+/*! Get local IP address on socket
+ *  \param[in] fd file descriptor of socket
+ *  \param[out] ip IP address (will be filled in)
+ *  \param[in] len length of the output buffer
+ *  \returns 0 on success; negative otherwise
+ */
+int osmo_sock_get_local_ip(int fd, char *ip, size_t len)
+{
+   return osmo_sock_get_name2(fd, ip, len, NULL, 0, true);
+}
+
+/*! Get local port on socket
+ *  \param[in] fd file descriptor of socket
+ *  \param[out] port number (will be filled in)
+ *  \param[in] len length of the output buffer
+ *  \returns 0 on success; negative otherwise
+ */
+int osmo_sock_get_local_ip_port(int fd, char *port, size_t len)
+{
+   return osmo_sock_get_name2(fd, NULL, 0, port, len, true);
+}
+
+/*! Get remote IP address on socket
+ *  \param[in] fd file descriptor of socket
+ *  \param[out] ip IP address (will be filled in)
+ *  \param[in] len length of the output buffer
+ *  \returns 0 on success; negative otherwise
+ */
+int osmo_sock_get_remote_ip(int fd, char *ip, size_t len)
+{
+   return osmo_sock_get_name2(fd, ip, len, NULL, 0, false);
+}
+
+/*! Get remote port on socket
+ *  \param[in] fd file descriptor of socket
+ *  \param[out] port number (will be filled in)
+ *  \param[in] len length of the output buffer
+ *  \returns 0 on success; negative otherwise
+ */
+int osmo_sock_get_remote_ip_port(int fd, char *port, size_t len)
+{
+   return osmo_sock_get_name2(fd, NULL, 0, port, len, false);
+}
+
 /*! Get address/port information on socket in dyn-alloc string
  *  \param[in] ctx talloc context from which to allocate string buffer
  *  \param[in] fd file descriptor of socket
@@ -689,37 +769,18 @@
  */
 char *osmo_sock_get_name(void *ctx, int fd)
 {
-   struct sockaddr sa_l, sa_r;
-   socklen_t sa_len_l = sizeof(sa_l);
-   socklen_t sa_len_r = sizeof(sa_r);
char hostbuf_l[64], 

Change in osmo-bts[master]: Add OC-2G BTS sources

2018-10-26 Thread Omar Ramadan
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/11447

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

Change subject: Add OC-2G BTS sources
..

Add OC-2G BTS sources

Change-Id: I327384fe5ac944dc3996a3f00932d6f1a10d5a35
---
M configure.ac
A contrib/systemd/oc2gbts-mgr.service
A contrib/systemd/osmo-bts-oc2g.service
A doc/examples/oc2g/oc2gbts-mgr.cfg
A doc/examples/oc2g/osmo-bts.cfg
M include/osmo-bts/gsm_data_shared.h
M include/osmo-bts/phy_link.h
M src/Makefile.am
M src/common/gsm_data_shared.c
A src/osmo-bts-oc2g/Makefile.am
A src/osmo-bts-oc2g/calib_file.c
A src/osmo-bts-oc2g/hw_info.ver_major
A src/osmo-bts-oc2g/hw_misc.c
A src/osmo-bts-oc2g/hw_misc.h
A src/osmo-bts-oc2g/l1_if.c
A src/osmo-bts-oc2g/l1_if.h
A src/osmo-bts-oc2g/l1_transp.h
A src/osmo-bts-oc2g/l1_transp_hw.c
A src/osmo-bts-oc2g/main.c
A src/osmo-bts-oc2g/misc/oc2gbts_bid.c
A src/osmo-bts-oc2g/misc/oc2gbts_bid.h
A src/osmo-bts-oc2g/misc/oc2gbts_bts.c
A src/osmo-bts-oc2g/misc/oc2gbts_bts.h
A src/osmo-bts-oc2g/misc/oc2gbts_clock.c
A src/osmo-bts-oc2g/misc/oc2gbts_clock.h
A src/osmo-bts-oc2g/misc/oc2gbts_led.c
A src/osmo-bts-oc2g/misc/oc2gbts_led.h
A src/osmo-bts-oc2g/misc/oc2gbts_mgr.c
A src/osmo-bts-oc2g/misc/oc2gbts_mgr.h
A src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c
A src/osmo-bts-oc2g/misc/oc2gbts_mgr_nl.c
A src/osmo-bts-oc2g/misc/oc2gbts_mgr_temp.c
A src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c
A src/osmo-bts-oc2g/misc/oc2gbts_misc.c
A src/osmo-bts-oc2g/misc/oc2gbts_misc.h
A src/osmo-bts-oc2g/misc/oc2gbts_nl.c
A src/osmo-bts-oc2g/misc/oc2gbts_nl.h
A src/osmo-bts-oc2g/misc/oc2gbts_par.c
A src/osmo-bts-oc2g/misc/oc2gbts_par.h
A src/osmo-bts-oc2g/misc/oc2gbts_power.c
A src/osmo-bts-oc2g/misc/oc2gbts_power.h
A src/osmo-bts-oc2g/misc/oc2gbts_swd.c
A src/osmo-bts-oc2g/misc/oc2gbts_swd.h
A src/osmo-bts-oc2g/misc/oc2gbts_temp.c
A src/osmo-bts-oc2g/misc/oc2gbts_temp.h
A src/osmo-bts-oc2g/misc/oc2gbts_util.c
A src/osmo-bts-oc2g/oc2gbts.c
A src/osmo-bts-oc2g/oc2gbts.h
A src/osmo-bts-oc2g/oc2gbts_vty.c
A src/osmo-bts-oc2g/oml.c
A src/osmo-bts-oc2g/oml_router.c
A src/osmo-bts-oc2g/oml_router.h
A src/osmo-bts-oc2g/tch.c
A src/osmo-bts-oc2g/utils.c
A src/osmo-bts-oc2g/utils.h
55 files changed, 13,517 insertions(+), 1 deletion(-)


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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I327384fe5ac944dc3996a3f00932d6f1a10d5a35
Gerrit-Change-Number: 11447
Gerrit-PatchSet: 3
Gerrit-Owner: Omar Ramadan 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-bts[master]: Add OC-2G to build

2018-10-26 Thread Omar Ramadan
Omar Ramadan has abandoned this change. ( https://gerrit.osmocom.org/11449 )

Change subject: Add OC-2G to build
..


Abandoned

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: I4a8dcf759a2818c8e457bcb82775c4e60c94d771
Gerrit-Change-Number: 11449
Gerrit-PatchSet: 1
Gerrit-Owner: Omar Ramadan 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Harald Welte 


Change in osmo-bts[master]: Add OC-2G systemd service and config

2018-10-26 Thread Omar Ramadan
Omar Ramadan has abandoned this change. ( https://gerrit.osmocom.org/11448 )

Change subject: Add OC-2G systemd service and config
..


Abandoned

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: Ic4b5a97b9677051442f3c3341ba23add35b43715
Gerrit-Change-Number: 11448
Gerrit-PatchSet: 1
Gerrit-Owner: Omar Ramadan 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Harald Welte 


Change in osmo-bts[master]: Add OC-2G BTS sources

2018-10-26 Thread Omar Ramadan
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/11447

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

Change subject: Add OC-2G BTS sources
..

Add OC-2G BTS sources

Change-Id: I327384fe5ac944dc3996a3f00932d6f1a10d5a35
---
M configure.ac
A contrib/systemd/oc2gbts-mgr.service
A contrib/systemd/osmo-bts-oc2g.service
A doc/examples/oc2g/oc2gbts-mgr.cfg
A doc/examples/oc2g/osmo-bts.cfg
M include/osmo-bts/gsm_data_shared.h
M include/osmo-bts/l1sap.h
M include/osmo-bts/phy_link.h
M src/Makefile.am
M src/common/gsm_data_shared.c
A src/osmo-bts-oc2g/Makefile.am
A src/osmo-bts-oc2g/calib_file.c
A src/osmo-bts-oc2g/hw_info.ver_major
A src/osmo-bts-oc2g/hw_misc.c
A src/osmo-bts-oc2g/hw_misc.h
A src/osmo-bts-oc2g/l1_if.c
A src/osmo-bts-oc2g/l1_if.h
A src/osmo-bts-oc2g/l1_transp.h
A src/osmo-bts-oc2g/l1_transp_hw.c
A src/osmo-bts-oc2g/main.c
A src/osmo-bts-oc2g/misc/oc2gbts_bid.c
A src/osmo-bts-oc2g/misc/oc2gbts_bid.h
A src/osmo-bts-oc2g/misc/oc2gbts_bts.c
A src/osmo-bts-oc2g/misc/oc2gbts_bts.h
A src/osmo-bts-oc2g/misc/oc2gbts_clock.c
A src/osmo-bts-oc2g/misc/oc2gbts_clock.h
A src/osmo-bts-oc2g/misc/oc2gbts_led.c
A src/osmo-bts-oc2g/misc/oc2gbts_led.h
A src/osmo-bts-oc2g/misc/oc2gbts_mgr.c
A src/osmo-bts-oc2g/misc/oc2gbts_mgr.h
A src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c
A src/osmo-bts-oc2g/misc/oc2gbts_mgr_nl.c
A src/osmo-bts-oc2g/misc/oc2gbts_mgr_temp.c
A src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c
A src/osmo-bts-oc2g/misc/oc2gbts_misc.c
A src/osmo-bts-oc2g/misc/oc2gbts_misc.h
A src/osmo-bts-oc2g/misc/oc2gbts_nl.c
A src/osmo-bts-oc2g/misc/oc2gbts_nl.h
A src/osmo-bts-oc2g/misc/oc2gbts_par.c
A src/osmo-bts-oc2g/misc/oc2gbts_par.h
A src/osmo-bts-oc2g/misc/oc2gbts_power.c
A src/osmo-bts-oc2g/misc/oc2gbts_power.h
A src/osmo-bts-oc2g/misc/oc2gbts_swd.c
A src/osmo-bts-oc2g/misc/oc2gbts_swd.h
A src/osmo-bts-oc2g/misc/oc2gbts_temp.c
A src/osmo-bts-oc2g/misc/oc2gbts_temp.h
A src/osmo-bts-oc2g/misc/oc2gbts_util.c
A src/osmo-bts-oc2g/oc2gbts.c
A src/osmo-bts-oc2g/oc2gbts.h
A src/osmo-bts-oc2g/oc2gbts_vty.c
A src/osmo-bts-oc2g/oml.c
A src/osmo-bts-oc2g/oml_router.c
A src/osmo-bts-oc2g/oml_router.h
A src/osmo-bts-oc2g/tch.c
A src/osmo-bts-oc2g/utils.c
A src/osmo-bts-oc2g/utils.h
56 files changed, 13,518 insertions(+), 2 deletions(-)


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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I327384fe5ac944dc3996a3f00932d6f1a10d5a35
Gerrit-Change-Number: 11447
Gerrit-PatchSet: 2
Gerrit-Owner: Omar Ramadan 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-ci[master]: osmo-layer1-headers.sh: Add support for OC-2G

2018-10-26 Thread Omar Ramadan
Omar Ramadan has posted comments on this change. ( 
https://gerrit.osmocom.org/11469 )

Change subject: osmo-layer1-headers.sh: Add support for OC-2G
..


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


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iceb62df4511ed50f0286e5762d9ffc4b068f70a6
Gerrit-Change-Number: 11469
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Omar Ramadan 
Gerrit-Comment-Date: Fri, 26 Oct 2018 21:48:03 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: ansible: ogt: Add new local IP addr to be available for resources

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

Change subject: ansible: ogt: Add new local IP addr to be available for 
resources
..


Patch Set 1: Verified+1


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I32574a935289fa208647d16663b77c0708c0572c
Gerrit-Change-Number: 11468
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Fri, 26 Oct 2018 19:25:50 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: ansible: ogt: install udhcpc and iperf3

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

Change subject: ansible: ogt: install udhcpc and iperf3
..


Patch Set 1: Verified+1


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5beddd74fca726c5ea2c9527836a9f50d92b4ce8
Gerrit-Change-Number: 11471
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Fri, 26 Oct 2018 19:25:52 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: ansible: ogt: install udhcpc and iperf3

2018-10-26 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11471 )

Change subject: ansible: ogt: install udhcpc and iperf3
..

ansible: ogt: install udhcpc and iperf3

These tools are used during gprs data plane setup and performance
testing.

Change-Id: I5beddd74fca726c5ea2c9527836a9f50d92b4ce8
---
M ansible/roles/gsm-tester/tasks/main.yml
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Pau Espin Pedrol: Verified



diff --git a/ansible/roles/gsm-tester/tasks/main.yml 
b/ansible/roles/gsm-tester/tasks/main.yml
index 4f57b17..70a0549 100644
--- a/ansible/roles/gsm-tester/tasks/main.yml
+++ b/ansible/roles/gsm-tester/tasks/main.yml
@@ -122,6 +122,8 @@
 - sudo
 - libcap2-bin
 - python3-pip
+- udhcpc
+- iperf3

 - name: install gsm tester pip dependencies
   pip:

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I5beddd74fca726c5ea2c9527836a9f50d92b4ce8
Gerrit-Change-Number: 11471
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-ci[master]: ansible: ogt: Deploy osmo-gsm-tester_netns_exec.sh

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

Change subject: ansible: ogt: Deploy osmo-gsm-tester_netns_exec.sh
..


Patch Set 1: Verified+1


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I587dd5630b211a906351f064c718f8f4c5fe6273
Gerrit-Change-Number: 11465
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Fri, 26 Oct 2018 19:25:48 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: ansible: ogt: Deploy osmo-gsm-tester_netns_exec.sh

2018-10-26 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11465 )

Change subject: ansible: ogt: Deploy osmo-gsm-tester_netns_exec.sh
..

ansible: ogt: Deploy osmo-gsm-tester_netns_exec.sh

Related: OS#2308
Change-Id: I587dd5630b211a906351f064c718f8f4c5fe6273
---
A ansible/roles/gsm-tester/files/osmo-gsm-tester_netns_exec.sh
M ansible/roles/gsm-tester/tasks/main.yml
2 files changed, 18 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Pau Espin Pedrol: Verified



diff --git a/ansible/roles/gsm-tester/files/osmo-gsm-tester_netns_exec.sh 
b/ansible/roles/gsm-tester/files/osmo-gsm-tester_netns_exec.sh
new file mode 100755
index 000..336b746
--- /dev/null
+++ b/ansible/roles/gsm-tester/files/osmo-gsm-tester_netns_exec.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+netns="$1"
+shift
+#TODO: Later on I may want to call myself with specific ENV and calling sudo 
in order to run inside the netns but with dropped privileges
+ip netns exec $netns "$@"
diff --git a/ansible/roles/gsm-tester/tasks/main.yml 
b/ansible/roles/gsm-tester/tasks/main.yml
index 61db8e9..4f57b17 100644
--- a/ansible/roles/gsm-tester/tasks/main.yml
+++ b/ansible/roles/gsm-tester/tasks/main.yml
@@ -237,6 +237,19 @@
 dest: /etc/sudoers.d/osmo-gsm-tester_setcap_net_admin
 mode: 0440

+- name: create a wrapper script to run processes on modem netns
+  copy:
+src: osmo-gsm-tester_netns_exec.sh
+dest: /usr/local/bin/osmo-gsm-tester_netns_exec.sh
+mode: 755
+
+- name: allow osmo-gsm-tester sudo osmo-gsm-tester_netns_exec.sh
+  copy:
+content: |
+  %osmo-gsm-tester ALL=(root) NOPASSWD: 
/usr/local/bin/osmo-gsm-tester_netns_exec.sh
+dest: /etc/sudoers.d/osmo-gsm-tester_netns_exec
+mode: 0440
+
 - name: logrotate limit filesizes to 10M
   copy:
 content: "maxsize 10M"

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I587dd5630b211a906351f064c718f8f4c5fe6273
Gerrit-Change-Number: 11465
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-ci[master]: ansible: ogt: Add new local IP addr to be available for resources

2018-10-26 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11468 )

Change subject: ansible: ogt: Add new local IP addr to be available for 
resources
..

ansible: ogt: Add new local IP addr to be available for resources

Change-Id: I32574a935289fa208647d16663b77c0708c0572c
---
M ansible/roles/gsm-tester-network/templates/interface.j2
1 file changed, 8 insertions(+), 3 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Pau Espin Pedrol: Verified



diff --git a/ansible/roles/gsm-tester-network/templates/interface.j2 
b/ansible/roles/gsm-tester-network/templates/interface.j2
index c849210..f694261 100644
--- a/ansible/roles/gsm-tester-network/templates/interface.j2
+++ b/ansible/roles/gsm-tester-network/templates/interface.j2
@@ -46,20 +46,25 @@

 auto {{ bts_interface }}:8
 iface {{ bts_interface }}:8 inet static
-address 10.42.42.50
+address 10.42.42.10
 netmask 255.255.255.0

 auto {{ bts_interface }}:9
 iface {{ bts_interface }}:9 inet static
-address 10.42.42.51
+address 10.42.42.50
 netmask 255.255.255.0

 auto {{ bts_interface }}:10
 iface {{ bts_interface }}:10 inet static
-address 10.42.42.52
+address 10.42.42.51
 netmask 255.255.255.0

 auto {{ bts_interface }}:11
 iface {{ bts_interface }}:11 inet static
+address 10.42.42.52
+netmask 255.255.255.0
+
+auto {{ bts_interface }}:12
+iface {{ bts_interface }}:12 inet static
 address 10.42.42.53
 netmask 255.255.255.0

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I32574a935289fa208647d16663b77c0708c0572c
Gerrit-Change-Number: 11468
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-ci[master]: ansible: ogt: install udhcpc and iperf3

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

Change subject: ansible: ogt: install udhcpc and iperf3
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5beddd74fca726c5ea2c9527836a9f50d92b4ce8
Gerrit-Change-Number: 11471
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Comment-Date: Fri, 26 Oct 2018 17:55:06 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: ansible: ogt: Add new local IP addr to be available for resources

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

Change subject: ansible: ogt: Add new local IP addr to be available for 
resources
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I32574a935289fa208647d16663b77c0708c0572c
Gerrit-Change-Number: 11468
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Fri, 26 Oct 2018 17:55:14 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmocore[master]: add osmo_sock_get_{local, remote}_ip{, _port}()

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

Change subject: add osmo_sock_get_{local,remote}_ip{,_port}()
..


Patch Set 6: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6803c204771c59a2002bc6a0e6b79c83c35f87e1
Gerrit-Change-Number: 11455
Gerrit-PatchSet: 6
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 
Gerrit-CC: Max 
Gerrit-Comment-Date: Fri, 26 Oct 2018 17:54:52 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmocore[master]: add osmo_sock_get_{local, remote}_ip{, _port}()

2018-10-26 Thread Harald Welte
Harald Welte has uploaded a new patch set (#6) to the change originally created 
by osmith. ( https://gerrit.osmocom.org/11455 )

Change subject: add osmo_sock_get_{local,remote}_ip{,_port}()
..

add osmo_sock_get_{local,remote}_ip{,_port}()

Return only the IP or port of either the local or remote connection,
not the whole set of IP and port of both the local and remote
connection like osmo_sock_get_name() does it. This is needed for
OS#2841, where we only want to print the remote IP.

Related: OS#2841
Change-Id: I6803c204771c59a2002bc6a0e6b79c83c35f87e1
---
M include/osmocom/core/socket.h
M src/socket.c
2 files changed, 92 insertions(+), 25 deletions(-)


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6803c204771c59a2002bc6a0e6b79c83c35f87e1
Gerrit-Change-Number: 11455
Gerrit-PatchSet: 6
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 
Gerrit-CC: Max 


Change in osmocom-bb[master]: trxcon: make TRX bind address configurable

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

Change subject: trxcon: make TRX bind address configurable
..

trxcon: make TRX bind address configurable

Previously the wildcard address (i.e. '0.0.0.0') was hard-coded
as the bind address of TRX interface. Let's make it configurable
by introducing a command line option.

Note that the '--trx-ip' option was deprecated by '--trx-remote',
because it isn't clean whether it is remore or local address. It
still can be used, but was removed from help message.

Change-Id: Ic2f43632cc57bb6f722eba05219e438f97fecb95
---
M src/host/trxcon/trxcon.c
1 file changed, 17 insertions(+), 6 deletions(-)

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



diff --git a/src/host/trxcon/trxcon.c b/src/host/trxcon/trxcon.c
index 84d132e..251321d 100644
--- a/src/host/trxcon/trxcon.c
+++ b/src/host/trxcon/trxcon.c
@@ -68,7 +68,8 @@

/* TRX specific */
struct trx_instance *trx;
-   const char *trx_ip;
+   const char *trx_bind_ip;
+   const char *trx_remote_ip;
uint16_t trx_base_port;
uint32_t trx_fn_advance;
 } app_data;
@@ -152,7 +153,8 @@
printf(" Some help...\n");
printf("  -h --help this text\n");
printf("  -d --debugChange debug flags. Default: %s\n", 
DEBUG_DEFAULT);
-   printf("  -i --trx-ip   IP address of host runing TRX (default 
127.0.0.1)\n");
+   printf("  -b --trx-bind TRX bind IP address (default 0.0.0.0)\n");
+   printf("  -i --trx-remote   TRX remote IP address (default 
127.0.0.1)\n");
printf("  -p --trx-port Base port of TRX instance (default 
6700)\n");
printf("  -f --trx-advance  Scheduler clock advance (default 20)\n");
printf("  -s --socket   Listening socket for layer23 (default 
/tmp/osmocom_l2)\n");
@@ -167,14 +169,18 @@
{"help", 0, 0, 'h'},
{"debug", 1, 0, 'd'},
{"socket", 1, 0, 's'},
+   {"trx-bind", 1, 0, 'b'},
+   /* NOTE: 'trx-ip' is now an alias for 'trx-remote'
+* due to backward compatibility reasons! */
{"trx-ip", 1, 0, 'i'},
+   {"trx-remote", 1, 0, 'i'},
{"trx-port", 1, 0, 'p'},
{"trx-advance", 1, 0, 'f'},
{"daemonize", 0, 0, 'D'},
{0, 0, 0, 0}
};

-   c = getopt_long(argc, argv, "d:i:p:f:s:Dh",
+   c = getopt_long(argc, argv, "d:b:i:p:f:s:Dh",
long_options, _index);
if (c == -1)
break;
@@ -188,8 +194,11 @@
case 'd':
app_data.debug_mask = optarg;
break;
+   case 'b':
+   app_data.trx_bind_ip = optarg;
+   break;
case 'i':
-   app_data.trx_ip = optarg;
+   app_data.trx_remote_ip = optarg;
break;
case 'p':
app_data.trx_base_port = atoi(optarg);
@@ -212,7 +221,8 @@
 static void init_defaults(void)
 {
app_data.bind_socket = "/tmp/osmocom_l2";
-   app_data.trx_ip = "127.0.0.1";
+   app_data.trx_remote_ip = "127.0.0.1";
+   app_data.trx_bind_ip = "0.0.0.0";
app_data.trx_base_port = 6700;
app_data.trx_fn_advance = 20;

@@ -274,7 +284,8 @@
goto exit;

/* Init transceiver interface */
-   rc = trx_if_open(_data.trx, "0.0.0.0", app_data.trx_ip, 
app_data.trx_base_port);
+   rc = trx_if_open(_data.trx,
+   app_data.trx_bind_ip, app_data.trx_remote_ip, 
app_data.trx_base_port);
if (rc)
goto exit;


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic2f43632cc57bb6f722eba05219e438f97fecb95
Gerrit-Change-Number: 11472
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmocom-bb[master]: trxcon: make TRX bind address configurable

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

Change subject: trxcon: make TRX bind address configurable
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2f43632cc57bb6f722eba05219e438f97fecb95
Gerrit-Change-Number: 11472
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 26 Oct 2018 17:52:46 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-gsm-tester[master]: Add support to test gprs IPv4 data plane

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

Change subject: Add support to test gprs IPv4 data plane
..


Patch Set 2: Code-Review+1


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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Icb06bdfcdd37c797be95ab5addb28da2d9f6681c
Gerrit-Change-Number: 11462
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 26 Oct 2018 17:51:05 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-gsm-tester[master]: Introduce iperf3 testing infrastructure

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

Change subject: Introduce iperf3 testing infrastructure
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6ff6bef14feb535d98ca41b9788700d699e1ef1e
Gerrit-Change-Number: 11476
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 26 Oct 2018 17:51:57 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-gsm-tester[master]: pcap_recorder: Add support to run in netns

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

Change subject: pcap_recorder: Add support to run in netns
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie1c848254f221f26c59e7f4bd8c079fe3e7bdfc2
Gerrit-Change-Number: 11474
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 26 Oct 2018 17:51:24 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-gsm-tester[master]: resources.conf: Add extra IPaddr to pool

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

Change subject: resources.conf: Add extra IPaddr to pool
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If0f1a6a3f4e99091ed117bc7a77a5e60eccb2425
Gerrit-Change-Number: 11475
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 26 Oct 2018 17:51:32 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-gsm-tester[master]: utils: Introduce show_usb_device.py

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

Change subject: utils: Introduce show_usb_device.py
..


Patch Set 2: Code-Review-1

actually, if it's written by somebody else, please simply use GIT_AUTHOR_EMAIL 
and GIT_AUTHOR_NAME to fix the attribution.  There's only one time to get this 
right, which is in the initial merge. Thanks!


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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iec049e2d56d61ecd50b65b64d95d69641fa0f8be
Gerrit-Change-Number: 11460
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 26 Oct 2018 17:50:17 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-gsm-tester[master]: utils: Add osmo-gsm-tester_setcap_net_*.sh scripts

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

Change subject: utils: Add osmo-gsm-tester_setcap_net_*.sh scripts
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib88a1b7818155fc608cc6ff763300fbd0e03a07a
Gerrit-Change-Number: 11473
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 26 Oct 2018 17:50:39 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-gsm-tester[master]: utils: Introduce modem-netns-setup.py

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

Change subject: utils: Introduce modem-netns-setup.py
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iadb2df2974e132044fba1f1bc2db8b559912e4e1
Gerrit-Change-Number: 11461
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 26 Oct 2018 17:50:28 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-gsm-tester[master]: utils: Introduce show_usb_device.py

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

Change subject: utils: Introduce show_usb_device.py
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iec049e2d56d61ecd50b65b64d95d69641fa0f8be
Gerrit-Change-Number: 11460
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 26 Oct 2018 17:49:31 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-gsm-tester[master]: utils: Introduce modem-netns-setup.py

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

Change subject: utils: Introduce modem-netns-setup.py
..


Set Ready For Review


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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iadb2df2974e132044fba1f1bc2db8b559912e4e1
Gerrit-Change-Number: 11461
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 26 Oct 2018 16:24:26 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-gsm-tester[master]: Add support to test gprs IPv4 data plane

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

Change subject: Add support to test gprs IPv4 data plane
..


Set Ready For Review


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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Icb06bdfcdd37c797be95ab5addb28da2d9f6681c
Gerrit-Change-Number: 11462
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 26 Oct 2018 16:24:59 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-gsm-tester[master]: utils: Introduce show_usb_device.py

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

Change subject: utils: Introduce show_usb_device.py
..


Set Ready For Review


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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iec049e2d56d61ecd50b65b64d95d69641fa0f8be
Gerrit-Change-Number: 11460
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 26 Oct 2018 16:24:24 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-gsm-tester[master]: pcap_recorder: Add support to run in netns

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


Change subject: pcap_recorder: Add support to run in netns
..

pcap_recorder: Add support to run in netns

Change-Id: Ie1c848254f221f26c59e7f4bd8c079fe3e7bdfc2
---
M src/osmo_gsm_tester/pcap_recorder.py
1 file changed, 10 insertions(+), 6 deletions(-)



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

diff --git a/src/osmo_gsm_tester/pcap_recorder.py 
b/src/osmo_gsm_tester/pcap_recorder.py
index 98dea8b..70833d0 100644
--- a/src/osmo_gsm_tester/pcap_recorder.py
+++ b/src/osmo_gsm_tester/pcap_recorder.py
@@ -26,7 +26,7 @@

 class PcapRecorder(log.Origin):

-def __init__(self, suite_run, run_dir, iface=None, filters=''):
+def __init__(self, suite_run, run_dir, iface=None, filters='', netns=None):
 self.iface = iface
 if not self.iface:
 self.iface = "any"
@@ -34,16 +34,20 @@
 super().__init__(log.C_RUN, 'pcap-recorder_%s' % self.iface, 
filters=self.filters)
 self.suite_run = suite_run
 self.run_dir = run_dir
+self.netns = netns
 self.start()

 def start(self):
 self.dbg('Recording pcap', self.run_dir, self.filters)
 dumpfile = os.path.join(os.path.abspath(self.run_dir), self.name() + 
".pcap")
-self.process = process.Process(self.name(), self.run_dir,
-   ('tcpdump', '-n',
-   '-i', self.iface,
-   '-w', dumpfile,
-   self.filters))
+popen_args = ('tcpdump', '-n',
+  '-i', self.iface,
+  '-w', dumpfile,
+  self.filters)
+if self.netns:
+self.process = process.NetNSProcess(self.name(), self.run_dir, 
self.netns, popen_args)
+else:
+self.process = process.Process(self.name(), self.run_dir, 
popen_args)
 self.suite_run.remember_to_stop(self.process)
 self.process.launch()


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

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


Change in osmo-gsm-tester[master]: resources.conf: Add extra IPaddr to pool

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


Change subject: resources.conf: Add extra IPaddr to pool
..

resources.conf: Add extra IPaddr to pool

Change-Id: If0f1a6a3f4e99091ed117bc7a77a5e60eccb2425
---
M example/resources.conf.prod
M example/resources.conf.rnd
2 files changed, 2 insertions(+), 0 deletions(-)



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

diff --git a/example/resources.conf.prod b/example/resources.conf.prod
index b12a7bc..0c8792e 100644
--- a/example/resources.conf.prod
+++ b/example/resources.conf.prod
@@ -9,6 +9,7 @@
 - addr: 10.42.42.7
 - addr: 10.42.42.8
 - addr: 10.42.42.9
+- addr: 10.42.42.10

 bts:
 - label: sysmoBTS 1002
diff --git a/example/resources.conf.rnd b/example/resources.conf.rnd
index 63650e1..dd9dc8f 100644
--- a/example/resources.conf.rnd
+++ b/example/resources.conf.rnd
@@ -9,6 +9,7 @@
 - addr: 10.42.42.7
 - addr: 10.42.42.8
 - addr: 10.42.42.9
+- addr: 10.42.42.10

 bts:
 - label: sysmoBTS 1002

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

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


Change in osmo-gsm-tester[master]: Introduce iperf3 testing infrastructure

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


Change subject: Introduce iperf3 testing infrastructure
..

Introduce iperf3 testing infrastructure

Change-Id: I6ff6bef14feb535d98ca41b9788700d699e1ef1e
---
A src/osmo_gsm_tester/iperf3.py
M src/osmo_gsm_tester/suite.py
A suites/gprs/iperf3.py
M suites/gprs/suite.conf
4 files changed, 189 insertions(+), 2 deletions(-)



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

diff --git a/src/osmo_gsm_tester/iperf3.py b/src/osmo_gsm_tester/iperf3.py
new file mode 100644
index 000..8141fea
--- /dev/null
+++ b/src/osmo_gsm_tester/iperf3.py
@@ -0,0 +1,107 @@
+# osmo_gsm_tester: specifics for running an iperf3 client and server
+#
+# Copyright (C) 2018 by sysmocom - s.f.m.c. GmbH
+#
+# Author: Pau Espin Pedrol 
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see .
+
+import os
+import json
+
+from . import log, util, process, pcap_recorder
+
+DEFAULT_SRV_PORT = 5003
+
+class IPerf3Server(log.Origin):
+
+def __init__(self, suite_run, ip_address):
+super().__init__(log.C_RUN, 'iperf3-srv_%s' % ip_address.get('addr'))
+self.run_dir = None
+self.config_file = None
+self.process = None
+self.suite_run = suite_run
+self.ip_address = ip_address
+self._port = DEFAULT_SRV_PORT
+
+def start(self):
+self.log('Starting iperf3-srv')
+self.run_dir = 
util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name()))
+
+pcap_recorder.PcapRecorder(self.suite_run, 
self.run_dir.new_dir('pcap'), None,
+   'host %s and port not 22' % self.addr())
+
+self.log_file = self.run_dir.new_file('iperf3_srv.json')
+self.process = process.Process(self.name(), self.run_dir,
+   ('iperf3', '-s', '-B', self.addr(),
+'-p', str(self._port), '-J',
+'--logfile', 
os.path.abspath(self.log_file)),
+   env={})
+self.suite_run.remember_to_stop(self.process)
+self.process.launch()
+
+def stop(self):
+self.suite_run.stop_process(self.process)
+
+def get_results(self):
+with open(self.log_file) as f:
+data = json.load(f)
+return data
+
+def addr(self):
+return self.ip_address.get('addr')
+
+def port(self):
+return self._port
+
+def running(self):
+return not self.process.terminated()
+
+def create_client(self):
+return IPerf3Client(self.suite_run, self)
+
+class IPerf3Client(log.Origin):
+
+def __init__(self, suite_run, iperf3srv):
+super().__init__(log.C_RUN, 'iperf3-cli_%s' % iperf3srv.addr())
+self.run_dir = None
+self.config_file = None
+self.process = None
+self.server = iperf3srv
+self.suite_run = suite_run
+
+def run_test(self, netns=None):
+self.log('Starting iperf3-client connecting to %s:%d' % 
(self.server.addr(), self.server.port()))
+self.run_dir = 
util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name()))
+
+pcap_recorder.PcapRecorder(self.suite_run, 
self.run_dir.new_dir('pcap'), None,
+   'host %s and port not 22' % 
self.server.addr(), netns)
+
+self.log_file = self.run_dir.new_file('iperf3_cli.json')
+popen_args = ('iperf3', '-c',  self.server.addr(),
+  '-p', str(self.server.port()), '-J',
+  '--logfile', os.path.abspath(self.log_file))
+if netns:
+self.process = process.NetNSProcess(self.name(), self.run_dir, 
netns, popen_args, env={})
+else:
+self.process = process.Process(self.name(), self.run_dir, 
popen_args, env={})
+process.run_proc_sync(self.process)
+return self.get_results()
+
+def get_results(self):
+with open(self.log_file) as f:
+data = json.load(f)
+return data
+
+# vim: expandtab tabstop=4 shiftwidth=4
diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py
index 2504941..b65031b 100644
--- a/src/osmo_gsm_tester/suite.py
+++ b/src/osmo_gsm_tester/suite.py
@@ -23,7 +23,7 @@
 

Change in osmo-gsm-tester[master]: utils: Add osmo-gsm-tester_setcap_net_*.sh scripts

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


Change subject: utils: Add osmo-gsm-tester_setcap_net_*.sh scripts
..

utils: Add osmo-gsm-tester_setcap_net_*.sh scripts

This scripts were already being used by osmo-gsm-tester for a while, but
were not avaialable in this repository. Let's put them here to easy find
them and have all this kind of helper scripts together with code using
it.

Change-Id: Ib88a1b7818155fc608cc6ff763300fbd0e03a07a
---
A utils/osmo-gsm-tester_setcap_net_admin.sh
A utils/osmo-gsm-tester_setcap_net_raw.sh
2 files changed, 5 insertions(+), 0 deletions(-)



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

diff --git a/utils/osmo-gsm-tester_setcap_net_admin.sh 
b/utils/osmo-gsm-tester_setcap_net_admin.sh
new file mode 100755
index 000..60e527a
--- /dev/null
+++ b/utils/osmo-gsm-tester_setcap_net_admin.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+/sbin/setcap cap_net_admin+ep "$1"
diff --git a/utils/osmo-gsm-tester_setcap_net_raw.sh 
b/utils/osmo-gsm-tester_setcap_net_raw.sh
new file mode 100755
index 000..1f3a727
--- /dev/null
+++ b/utils/osmo-gsm-tester_setcap_net_raw.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+/sbin/setcap cap_net_raw+ep "$1"

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

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


Change in osmocom-bb[master]: trxcon: make TRX bind address configurable

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

Change subject: trxcon: make TRX bind address configurable
..


Patch Set 1:

Well, since it's used in jenkins tests we probably should start caring about 
OsmocomBB releases to properly use versioning and such :)


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2f43632cc57bb6f722eba05219e438f97fecb95
Gerrit-Change-Number: 11472
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 26 Oct 2018 15:44:24 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmocom-bb[master]: trxcon: make TRX bind address configurable

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

Change subject: trxcon: make TRX bind address configurable
..


Patch Set 1:

> If the deprecated option wasn't part of any official release than I
 > don't think we have to bother with backwards compatibility.

Hmm, not sure that we do care about releases in OsmocomBB :)
AFAIK, this option is used in Jenkins, for some (e.g. BTS) tests.


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2f43632cc57bb6f722eba05219e438f97fecb95
Gerrit-Change-Number: 11472
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 26 Oct 2018 15:36:37 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmocom-bb[master]: trxcon: make TRX bind address configurable

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

Change subject: trxcon: make TRX bind address configurable
..


Patch Set 1:

If the deprecated option wasn't part of any official release than I don't think 
we have to bother with backwards compatibility.


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2f43632cc57bb6f722eba05219e438f97fecb95
Gerrit-Change-Number: 11472
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Comment-Date: Fri, 26 Oct 2018 15:34:30 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmocom-bb[master]: trxcon: make TRX bind address configurable

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

Change subject: trxcon: make TRX bind address configurable
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2f43632cc57bb6f722eba05219e438f97fecb95
Gerrit-Change-Number: 11472
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Comment-Date: Fri, 26 Oct 2018 15:33:18 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmocom-bb[master]: trxcon: make TRX bind address configurable

2018-10-26 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/11472


Change subject: trxcon: make TRX bind address configurable
..

trxcon: make TRX bind address configurable

Previously the wildcard address (i.e. '0.0.0.0') was hard-coded
as the bind address of TRX interface. Let's make it configurable
by introducing a command line option.

Note that the '--trx-ip' option was deprecated by '--trx-remote',
because it isn't clean whether it is remore or local address. It
still can be used, but was removed from help message.

Change-Id: Ic2f43632cc57bb6f722eba05219e438f97fecb95
---
M src/host/trxcon/trxcon.c
1 file changed, 17 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/72/11472/1

diff --git a/src/host/trxcon/trxcon.c b/src/host/trxcon/trxcon.c
index 84d132e..251321d 100644
--- a/src/host/trxcon/trxcon.c
+++ b/src/host/trxcon/trxcon.c
@@ -68,7 +68,8 @@

/* TRX specific */
struct trx_instance *trx;
-   const char *trx_ip;
+   const char *trx_bind_ip;
+   const char *trx_remote_ip;
uint16_t trx_base_port;
uint32_t trx_fn_advance;
 } app_data;
@@ -152,7 +153,8 @@
printf(" Some help...\n");
printf("  -h --help this text\n");
printf("  -d --debugChange debug flags. Default: %s\n", 
DEBUG_DEFAULT);
-   printf("  -i --trx-ip   IP address of host runing TRX (default 
127.0.0.1)\n");
+   printf("  -b --trx-bind TRX bind IP address (default 0.0.0.0)\n");
+   printf("  -i --trx-remote   TRX remote IP address (default 
127.0.0.1)\n");
printf("  -p --trx-port Base port of TRX instance (default 
6700)\n");
printf("  -f --trx-advance  Scheduler clock advance (default 20)\n");
printf("  -s --socket   Listening socket for layer23 (default 
/tmp/osmocom_l2)\n");
@@ -167,14 +169,18 @@
{"help", 0, 0, 'h'},
{"debug", 1, 0, 'd'},
{"socket", 1, 0, 's'},
+   {"trx-bind", 1, 0, 'b'},
+   /* NOTE: 'trx-ip' is now an alias for 'trx-remote'
+* due to backward compatibility reasons! */
{"trx-ip", 1, 0, 'i'},
+   {"trx-remote", 1, 0, 'i'},
{"trx-port", 1, 0, 'p'},
{"trx-advance", 1, 0, 'f'},
{"daemonize", 0, 0, 'D'},
{0, 0, 0, 0}
};

-   c = getopt_long(argc, argv, "d:i:p:f:s:Dh",
+   c = getopt_long(argc, argv, "d:b:i:p:f:s:Dh",
long_options, _index);
if (c == -1)
break;
@@ -188,8 +194,11 @@
case 'd':
app_data.debug_mask = optarg;
break;
+   case 'b':
+   app_data.trx_bind_ip = optarg;
+   break;
case 'i':
-   app_data.trx_ip = optarg;
+   app_data.trx_remote_ip = optarg;
break;
case 'p':
app_data.trx_base_port = atoi(optarg);
@@ -212,7 +221,8 @@
 static void init_defaults(void)
 {
app_data.bind_socket = "/tmp/osmocom_l2";
-   app_data.trx_ip = "127.0.0.1";
+   app_data.trx_remote_ip = "127.0.0.1";
+   app_data.trx_bind_ip = "0.0.0.0";
app_data.trx_base_port = 6700;
app_data.trx_fn_advance = 20;

@@ -274,7 +284,8 @@
goto exit;

/* Init transceiver interface */
-   rc = trx_if_open(_data.trx, "0.0.0.0", app_data.trx_ip, 
app_data.trx_base_port);
+   rc = trx_if_open(_data.trx,
+   app_data.trx_bind_ip, app_data.trx_remote_ip, 
app_data.trx_base_port);
if (rc)
goto exit;


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic2f43632cc57bb6f722eba05219e438f97fecb95
Gerrit-Change-Number: 11472
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 


Change in osmocom-bb[master]: Report socket path on errors

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

Change subject: Report socket path on errors
..

Report socket path on errors

Change-Id: Ib63e1205d7b845c8779eb511635f26bae3a18085
---
M src/host/layer23/src/common/l1l2_interface.c
M src/host/layer23/src/common/sap_interface.c
M src/host/osmocon/osmoload.c
3 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/src/host/layer23/src/common/l1l2_interface.c 
b/src/host/layer23/src/common/l1l2_interface.c
index e21b07e..b366d51 100644
--- a/src/host/layer23/src/common/l1l2_interface.c
+++ b/src/host/layer23/src/common/l1l2_interface.c
@@ -109,7 +109,7 @@
 
rc = osmo_sock_unix_init_ofd(>l2_wq.bfd, SOCK_STREAM, 0, 
socket_path, OSMO_SOCK_F_CONNECT);
if (rc < 0) {
-   fprintf(stderr, "Failed to create unix domain socket.\n");
+   fprintf(stderr, "Failed to create unix domain socket %s\n", 
socket_path);
return rc;
}

diff --git a/src/host/layer23/src/common/sap_interface.c 
b/src/host/layer23/src/common/sap_interface.c
index da03c0f..cab3c6b 100644
--- a/src/host/layer23/src/common/sap_interface.c
+++ b/src/host/layer23/src/common/sap_interface.c
@@ -503,7 +503,7 @@

rc = osmo_sock_unix_init_ofd(>sap_wq.bfd, SOCK_STREAM, 0, 
socket_path, OSMO_SOCK_F_CONNECT);
if (rc < 0) {
-   fprintf(stderr, "Failed to create unix domain socket.\n");
+   fprintf(stderr, "Failed to create unix domain socket %s\n", 
socket_path);
ms->sap_entity.sap_state = SAP_SOCKET_ERROR;
return rc;
}
diff --git a/src/host/osmocon/osmoload.c b/src/host/osmocon/osmoload.c
index b1b48e2..decdc13 100644
--- a/src/host/osmocon/osmoload.c
+++ b/src/host/osmocon/osmoload.c
@@ -499,7 +499,7 @@

rc = osmo_sock_unix_init_ofd(conn, SOCK_STREAM, 0, socket_path, 
OSMO_SOCK_F_CONNECT);
if (rc < 0) {
-   fprintf(stderr, "Failed to create unix domain socket.\n");
+   fprintf(stderr, "Failed to create unix domain socket %s\n", 
socket_path);
exit(1);
}


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib63e1205d7b845c8779eb511635f26bae3a18085
Gerrit-Change-Number: 11464
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 


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

2018-10-26 Thread jenkins
See 


--
[...truncated 3.67 KB...]

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

Change in osmo-ci[master]: ansible: ogt: install udhcpc and iperf3

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


Change subject: ansible: ogt: install udhcpc and iperf3
..

ansible: ogt: install udhcpc and iperf3

These tools are used during gprs data plane setup and performance
testing.

Change-Id: I5beddd74fca726c5ea2c9527836a9f50d92b4ce8
---
M ansible/roles/gsm-tester/tasks/main.yml
1 file changed, 2 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/71/11471/1

diff --git a/ansible/roles/gsm-tester/tasks/main.yml 
b/ansible/roles/gsm-tester/tasks/main.yml
index 4f57b17..70a0549 100644
--- a/ansible/roles/gsm-tester/tasks/main.yml
+++ b/ansible/roles/gsm-tester/tasks/main.yml
@@ -122,6 +122,8 @@
 - sudo
 - libcap2-bin
 - python3-pip
+- udhcpc
+- iperf3

 - name: install gsm tester pip dependencies
   pip:

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5beddd74fca726c5ea2c9527836a9f50d92b4ce8
Gerrit-Change-Number: 11471
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in libosmocore[master]: add osmo_sock_get_{local, remote}_ip{, _port}()

2018-10-26 Thread osmith
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/11455

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

Change subject: add osmo_sock_get_{local,remote}_ip{,_port}()
..

add osmo_sock_get_{local,remote}_ip{,_port}()

Return only the IP or port of either the local or remote connection,
not the whole set of IP and port of both the local and remote
connection like osmo_sock_get_name() does it. This is needed for
OS#2841, where we only want to print the remote IP.

Related: OS#2841
Change-Id: I6803c204771c59a2002bc6a0e6b79c83c35f87e1
---
M include/osmocom/core/socket.h
M src/socket.c
2 files changed, 92 insertions(+), 25 deletions(-)


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6803c204771c59a2002bc6a0e6b79c83c35f87e1
Gerrit-Change-Number: 11455
Gerrit-PatchSet: 5
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 
Gerrit-CC: Max 


Change in libosmocore[master]: add osmo_sock_get_{local, remote}_ip{, _port}()

2018-10-26 Thread osmith
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/11455

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

Change subject: add osmo_sock_get_{local,remote}_ip{,_port}()
..

add osmo_sock_get_{local,remote}_ip{,_port}()

Return only the IP or port of either the local or remote connection,
not the whole set of IP and port of both the local and remote
connection like osmo_sock_get_name() does it. This is needed for
OS#2841, where we only want to print the remote IP.

Related: OS#2841
Change-Id: I6803c204771c59a2002bc6a0e6b79c83c35f87e1
---
M include/osmocom/core/socket.h
M src/socket.c
2 files changed, 92 insertions(+), 25 deletions(-)


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6803c204771c59a2002bc6a0e6b79c83c35f87e1
Gerrit-Change-Number: 11455
Gerrit-PatchSet: 4
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 
Gerrit-CC: Max 


Change in libosmocore[master]: add osmo_sock_get_{local, remote}_ip{, _port}()

2018-10-26 Thread osmith
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/11455

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

Change subject: add osmo_sock_get_{local,remote}_ip{,_port}()
..

add osmo_sock_get_{local,remote}_ip{,_port}()

Return only the IP or port of either the local or remote connection,
not the whole set of IP and port of both the local and remote
connection like osmo_sock_get_name() does it. This is needed for
OS#2841, where we only want to print the remote IP.

Related: OS#2841
Change-Id: I6803c204771c59a2002bc6a0e6b79c83c35f87e1
---
M include/osmocom/core/socket.h
M src/socket.c
2 files changed, 92 insertions(+), 25 deletions(-)


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6803c204771c59a2002bc6a0e6b79c83c35f87e1
Gerrit-Change-Number: 11455
Gerrit-PatchSet: 3
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 
Gerrit-CC: Max 


Change in osmo-mgw[master]: add MGCP CRCX command statistics to osmo-mgw

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

Change subject: add MGCP CRCX command statistics to osmo-mgw
..


Patch Set 3: Code-Review+2

In long functions it might make sense to have a local variable rather than 
always the length ">mgcp_crcx_ctr_group->ctr", but that's purely 
optional/cosmetic.


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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ida82fc340d5c66180e5fe9a0d195e9be6dc64c61
Gerrit-Change-Number: 11463
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: dexter 
Gerrit-Comment-Date: Fri, 26 Oct 2018 14:15:24 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: ansible: ogt: Add new local IP addr to be available for resources

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

Change subject: ansible: ogt: Add new local IP addr to be available for 
resources
..


Patch Set 1:

Well, let's say the way git shows the diff is not the logical path I found to 
add it. I just added a new block after enp2s0:7:

auto enp2s0:8
iface enp2s0:8 inet static
address 10.42.42.10
netmask 255.255.255.0

And then I renamed the interfaces below it incrementing index by 1.

This way IP ranges and indexes are sorted and easy to find how they are divided.


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I32574a935289fa208647d16663b77c0708c0572c
Gerrit-Change-Number: 11468
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Fri, 26 Oct 2018 14:14:06 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in libosmocore[master]: stop printing group description in vty_out_rate_ctr_group_fmt()

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

Change subject: stop printing group description in vty_out_rate_ctr_group_fmt()
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2c55cb54e8b7a7c8c6cf72f22287083767ed0201
Gerrit-Change-Number: 11467
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 26 Oct 2018 14:13:40 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmocore[master]: add osmo_sock_get_{local, remote}_ip{, _port}()

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

Change subject: add osmo_sock_get_{local,remote}_ip{,_port}()
..


Patch Set 2: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/11455/2/include/osmocom/core/socket.h
File include/osmocom/core/socket.h:

https://gerrit.osmocom.org/#/c/11455/2/include/osmocom/core/socket.h@60
PS2, Line 60: bool
please don't make them return bool.  We don't have any functions in osmocom 
that return bool, *except* for predicate functions that are used to check for 
some condition.

The general semantics are, like many things, like in the linux kernel: 0 is 
success, negativ is error, and positive is used to e.g. indicate the 
size/number of bytes/...



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6803c204771c59a2002bc6a0e6b79c83c35f87e1
Gerrit-Change-Number: 11455
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 
Gerrit-CC: Max 
Gerrit-Comment-Date: Fri, 26 Oct 2018 14:12:48 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: ansible: ogt: Add new local IP addr to be available for resources

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

Change subject: ansible: ogt: Add new local IP addr to be available for 
resources
..


Patch Set 1:

it doesn't appear to only add an address but also modify existing ones?


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I32574a935289fa208647d16663b77c0708c0572c
Gerrit-Change-Number: 11468
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Fri, 26 Oct 2018 14:11:19 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-ci[master]: ansible: ogt: Deploy osmo-gsm-tester_netns_exec.sh

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

Change subject: ansible: ogt: Deploy osmo-gsm-tester_netns_exec.sh
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I587dd5630b211a906351f064c718f8f4c5fe6273
Gerrit-Change-Number: 11465
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Comment-Date: Fri, 26 Oct 2018 14:10:39 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: osmo-layer1-headers.sh: Add support for OC-2G

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

Change subject: osmo-layer1-headers.sh: Add support for OC-2G
..

osmo-layer1-headers.sh: Add support for OC-2G

Change-Id: Iceb62df4511ed50f0286e5762d9ffc4b068f70a6
---
M scripts/osmo-layer1-headers.sh
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved; Verified



diff --git a/scripts/osmo-layer1-headers.sh b/scripts/osmo-layer1-headers.sh
index a975396..0adf528 100755
--- a/scripts/osmo-layer1-headers.sh
+++ b/scripts/osmo-layer1-headers.sh
@@ -22,6 +22,10 @@
uri="https://gitlab.com/nrw_litecell15/litecell15-fw;
version="origin/nrw/litecell15"
;;
+oc2g)
+   uri="https://gitlab.com/nrw_oc2g/oc2g-fw;
+   version="origin/nrw/oc2g"
+   ;;
 *)
echo "Unknown BTS model '$1'"
exit 1

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Iceb62df4511ed50f0286e5762d9ffc4b068f70a6
Gerrit-Change-Number: 11469
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Omar Ramadan 


Change in osmo-ci[master]: osmo-layer1-headers.sh: Add support for OC-2G

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

Change subject: osmo-layer1-headers.sh: Add support for OC-2G
..


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


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iceb62df4511ed50f0286e5762d9ffc4b068f70a6
Gerrit-Change-Number: 11469
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Comment-Date: Fri, 26 Oct 2018 14:09:49 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: gerrit-verifications.yml: Add OC2G build matrix to gerrit-osmo-bts

2018-10-26 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/11470


Change subject: gerrit-verifications.yml: Add OC2G build matrix to 
gerrit-osmo-bts
..

gerrit-verifications.yml: Add OC2G build matrix to gerrit-osmo-bts

The gerrit-osmo-bts job is used for build verification of osmo-bts
patches.  This adds (untested) support for OC2G

Change-Id: I62a9a5ec357b7246b2d7915681c646c79eda4b76
---
M jobs/gerrit-verifications.yml
1 file changed, 5 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/70/11470/1

diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml
index f3bde2e..a989760 100644
--- a/jobs/gerrit-verifications.yml
+++ b/jobs/gerrit-verifications.yml
@@ -87,9 +87,9 @@

   - osmo-bts:
   a1_name: FIRMWARE_VERSION
-  a1: !!python/tuple [master, femtobts_v2.7, superfemto_v2.4, 
superfemto_v3.0.1pre, superfemto_v3.1, superfemto_v5.1, v2017.01, 
origin/nrw/litecell15]
+  a1: !!python/tuple [master, femtobts_v2.7, superfemto_v2.4, 
superfemto_v3.0.1pre, superfemto_v3.1, superfemto_v5.1, v2017.01, 
origin/nrw/litecell15, origin/nrw/oc2g, origin/nrw/oc2g-next]
   a2_name: BTS_MODEL
-  a2: !!python/tuple [sysmo, oct, trx, oct+trx, lc15]
+  a2: !!python/tuple [sysmo, oct, trx, oct+trx, lc15, oc2g]
   combination_filter: >
 FIRMWARE_VERSION == "master" ||
 (FIRMWARE_VERSION == "femtobts_v2.7" && BTS_MODEL == "sysmo") ||
@@ -98,7 +98,9 @@
 (FIRMWARE_VERSION == "superfemto_v3.1" && BTS_MODEL == "sysmo") ||
 (FIRMWARE_VERSION == "superfemto_v5.1" && BTS_MODEL == "sysmo") ||
 (FIRMWARE_VERSION == "v2017.01" && BTS_MODEL == "lc15") ||
-(FIRMWARE_VERSION == "origin/nrw/litecell15" && BTS_MODEL == 
"lc15")
+(FIRMWARE_VERSION == "origin/nrw/litecell15" && BTS_MODEL == 
"lc15") ||
+(FIRMWARE_VERSION == "origin/nrw/oc2g" && BTS_MODEL == "oc2g") ||
+(FIRMWARE_VERSION == "origin/nrw/oc2g-next" && BTS_MODEL == "oc2g")
   cmd: './contrib/jenkins_bts_model.sh "$BTS_MODEL"'

   - osmo-ggsn:

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I62a9a5ec357b7246b2d7915681c646c79eda4b76
Gerrit-Change-Number: 11470
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 


Change in osmo-ci[master]: osmo-layer1-headers.sh: Add support for OC-2G

2018-10-26 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/11469


Change subject: osmo-layer1-headers.sh: Add support for OC-2G
..

osmo-layer1-headers.sh: Add support for OC-2G

Change-Id: Iceb62df4511ed50f0286e5762d9ffc4b068f70a6
---
M scripts/osmo-layer1-headers.sh
1 file changed, 4 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/69/11469/1

diff --git a/scripts/osmo-layer1-headers.sh b/scripts/osmo-layer1-headers.sh
index a975396..0adf528 100755
--- a/scripts/osmo-layer1-headers.sh
+++ b/scripts/osmo-layer1-headers.sh
@@ -22,6 +22,10 @@
uri="https://gitlab.com/nrw_litecell15/litecell15-fw;
version="origin/nrw/litecell15"
;;
+oc2g)
+   uri="https://gitlab.com/nrw_oc2g/oc2g-fw;
+   version="origin/nrw/oc2g"
+   ;;
 *)
echo "Unknown BTS model '$1'"
exit 1

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iceb62df4511ed50f0286e5762d9ffc4b068f70a6
Gerrit-Change-Number: 11469
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 


Change in osmo-ci[master]: ansible: ogt: Add new local IP addr to be available for resources

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


Change subject: ansible: ogt: Add new local IP addr to be available for 
resources
..

ansible: ogt: Add new local IP addr to be available for resources

Change-Id: I32574a935289fa208647d16663b77c0708c0572c
---
M ansible/roles/gsm-tester-network/templates/interface.j2
1 file changed, 8 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/68/11468/1

diff --git a/ansible/roles/gsm-tester-network/templates/interface.j2 
b/ansible/roles/gsm-tester-network/templates/interface.j2
index c849210..f694261 100644
--- a/ansible/roles/gsm-tester-network/templates/interface.j2
+++ b/ansible/roles/gsm-tester-network/templates/interface.j2
@@ -46,20 +46,25 @@

 auto {{ bts_interface }}:8
 iface {{ bts_interface }}:8 inet static
-address 10.42.42.50
+address 10.42.42.10
 netmask 255.255.255.0

 auto {{ bts_interface }}:9
 iface {{ bts_interface }}:9 inet static
-address 10.42.42.51
+address 10.42.42.50
 netmask 255.255.255.0

 auto {{ bts_interface }}:10
 iface {{ bts_interface }}:10 inet static
-address 10.42.42.52
+address 10.42.42.51
 netmask 255.255.255.0

 auto {{ bts_interface }}:11
 iface {{ bts_interface }}:11 inet static
+address 10.42.42.52
+netmask 255.255.255.0
+
+auto {{ bts_interface }}:12
+iface {{ bts_interface }}:12 inet static
 address 10.42.42.53
 netmask 255.255.255.0

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I32574a935289fa208647d16663b77c0708c0572c
Gerrit-Change-Number: 11468
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in libosmocore[master]: add osmo_sock_get_{local, remote}_ip{, _port}()

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

Change subject: add osmo_sock_get_{local,remote}_ip{,_port}()
..


Patch Set 2:

(Tested both osmo_sock_get_name() and osmo_sock_get_remote_ip(), and they are 
working as expected.)


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6803c204771c59a2002bc6a0e6b79c83c35f87e1
Gerrit-Change-Number: 11455
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 
Gerrit-CC: Max 
Gerrit-Comment-Date: Fri, 26 Oct 2018 13:46:18 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in libosmocore[master]: add osmo_sock_get_{local, remote}_ip{, _port}()

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

Change subject: add osmo_sock_get_{local,remote}_ip{,_port}()
..


Patch Set 2:

Let's try this again: without defines, no heap-allocated buffer and less 
duplicate code :)


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6803c204771c59a2002bc6a0e6b79c83c35f87e1
Gerrit-Change-Number: 11455
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 
Gerrit-CC: Max 
Gerrit-Comment-Date: Fri, 26 Oct 2018 13:44:17 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in libosmocore[master]: add osmo_sock_get_{local, remote}_ip{, _port}()

2018-10-26 Thread osmith
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/11455

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

Change subject: add osmo_sock_get_{local,remote}_ip{,_port}()
..

add osmo_sock_get_{local,remote}_ip{,_port}()

Return only the IP or port of either the local or remote connection,
not the whole set of IP and port of both the local and remote
connection like osmo_sock_get_name() does it. This is needed for
OS#2841, where we only want to print the remote IP.

Related: OS#2841
Change-Id: I6803c204771c59a2002bc6a0e6b79c83c35f87e1
---
M include/osmocom/core/socket.h
M src/socket.c
2 files changed, 92 insertions(+), 25 deletions(-)


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6803c204771c59a2002bc6a0e6b79c83c35f87e1
Gerrit-Change-Number: 11455
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 
Gerrit-CC: Max 


Change in osmo-mgw[master]: use a dynamic name for rtp connection rate counters

2018-10-26 Thread Stefan Sperling
Stefan Sperling has abandoned this change. ( https://gerrit.osmocom.org/11439 )

Change subject: use a dynamic name for rtp connection rate counters
..


Abandoned

As discussed with Harald, this is a wrong approach.
--
To view, visit https://gerrit.osmocom.org/11439
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: I027644f4b913e1f966c11b081e9027e61591a224
Gerrit-Change-Number: 11439
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: dexter 


Change in osmo-mgw[master]: add MGCP CRCX command statistics to osmo-mgw

2018-10-26 Thread Stefan Sperling
Hello dexter, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/11463

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

Change subject: add MGCP CRCX command statistics to osmo-mgw
..

add MGCP CRCX command statistics to osmo-mgw

Add a counter group for CRCX commands. The group contains counters for
successful connection processing as well as various error conditions.
This provides a quick overview of CRCX failures on each trunk throughout
the lifetime of the osmo-mgw process.

For example, after running the TTCN3 mgw test suite, the counters show
the following values:

OsmoMGW> show rate-counters
crxc statistics:
 crcx:success: 88 (0/s 88/m 0/h 0/d) CRCX command processed 
successfully.
  crcx:bad_action:  0 (0/s 0/m 0/h 0/d) bad action in CRCX 
command.
 crcx:unhandled_param:  1 (0/s 1/m 0/h 0/d) unhandled parameter in 
CRCX command.
  crcx:missing_callid:  1 (0/s 1/m 0/h 0/d) missing CallId in CRCX 
command.
crcx:invalid_mode:  1 (0/s 1/m 0/h 0/d) connection invalid mode 
in CRCX command.
  crcx:limit_exceeded:  0 (0/s 0/m 0/h 0/d) limit of concurrent 
connections was reached.
   crcx:unkown_callid:  0 (0/s 0/m 0/h 0/d) unknown CallId in CRCX 
command.
 crcx:alloc_conn_fail:  0 (0/s 0/m 0/h 0/d) connection allocation 
failure.
 crcx:no_remote_conn_desc:  1 (0/s 1/m 0/h 0/d) no opposite end 
specified for connection.
   crcx:start_rtp_failure:  0 (0/s 0/m 0/h 0/d) failure to start RTP 
processing.
   crcx:conn_rejected:  0 (0/s 0/m 0/h 0/d) connection rejected by 
policy.
OsmoMGW>

These same counters are now also shown by 'show mgcp stats'
in the context of the trunk which they belong to.

With input from Philipp Maier.

Change-Id: Ida82fc340d5c66180e5fe9a0d195e9be6dc64c61
Related: OS#2660
---
M include/osmocom/mgcp/mgcp.h
M src/libosmo-mgcp/mgcp_protocol.c
M src/libosmo-mgcp/mgcp_vty.c
3 files changed, 86 insertions(+), 3 deletions(-)


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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ida82fc340d5c66180e5fe9a0d195e9be6dc64c61
Gerrit-Change-Number: 11463
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: dexter 


Change in libosmocore[master]: stop printing group description in vty_out_rate_ctr_group_fmt()

2018-10-26 Thread Stefan Sperling
Stefan Sperling has uploaded this change for review. ( 
https://gerrit.osmocom.org/11467


Change subject: stop printing group description in vty_out_rate_ctr_group_fmt()
..

stop printing group description in vty_out_rate_ctr_group_fmt()

When vty_out_rate_ctr_group_fmt() prints the description of a
counter group, it assumes this description should appear at
the beginning of a line. However, the caller might be printing
counters in an indented context. So just let the caller worry
about printing the group title if necessary (there is currently
only one known caller, which is updated in this commit).

Note that printing of the group title was an undocumented feature.

Change-Id: I2c55cb54e8b7a7c8c6cf72f22287083767ed0201
Related: OS#2660
---
M src/vty/stats_vty.c
M src/vty/utils.c
2 files changed, 1 insertion(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/67/11467/1

diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c
index 5ded7a4..62153f3 100644
--- a/src/vty/stats_vty.c
+++ b/src/vty/stats_vty.c
@@ -533,6 +533,7 @@
 static int rate_ctr_group_handler(struct rate_ctr_group *ctrg, void *sctx_)
 {
struct vty *vty = sctx_;
+   vty_out(vty, "%s:%s", ctrg->desc->group_description, VTY_NEWLINE);
vty_out_rate_ctr_group_fmt(vty, "%25n: %10c (%S/s %M/m %H/h %D/d) %d", 
ctrg);
return 0;
 }
diff --git a/src/vty/utils.c b/src/vty/utils.c
index 0d663c6..0358d9b 100644
--- a/src/vty/utils.c
+++ b/src/vty/utils.c
@@ -214,9 +214,6 @@
struct rate_ctr_group *ctrg)
 {
struct vty_out_context vctx = {vty, fmt};
-
-   vty_out(vty, "%s:%s", ctrg->desc->group_description, VTY_NEWLINE);
-
rate_ctr_for_each_counter(ctrg, rate_ctr_handler_fmt, );
 }


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c55cb54e8b7a7c8c6cf72f22287083767ed0201
Gerrit-Change-Number: 11467
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling 


Change in osmo-mgw[master]: mgcp_protocol: increase buffer space for codec name in LCO

2018-10-26 Thread dexter
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/11466


Change subject: mgcp_protocol: increase buffer space for codec name in LCO
..

mgcp_protocol: increase buffer space for codec name in LCO

The function that parses the LCO uses an internal buffer to store the
codec name that has been issued via LCO. This buffer is only 9 byte
long, this means an 8 character string can be stored. If a codec name
exceeds this limit it gets chopped. For example "GSM-HR-08" becomes
"GSM-HR-0", which may mess up the codec negotiation.

- Increase the buffer from 9 to 17 byte.

Change-Id: I17ce7acde1f23ab1394227d74214fe2a55cd2264
Related: OS#3673
---
M src/libosmo-mgcp/mgcp_protocol.c
1 file changed, 2 insertions(+), 2 deletions(-)



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

diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c
index e17bdae..860692f 100644
--- a/src/libosmo-mgcp/mgcp_protocol.c
+++ b/src/libosmo-mgcp/mgcp_protocol.c
@@ -518,7 +518,7 @@
 const char *options)
 {
char *p_opt, *a_opt;
-   char codec[9];
+   char codec[17];

if (!options)
return 0;
@@ -544,7 +544,7 @@
 * (e.g. a:PCMU;G726-32) But this implementation only supports a single
 * codec only. */
a_opt = strstr(lco->string, "a:");
-   if (a_opt && sscanf(a_opt, "a:%8[^,]", codec) == 1) {
+   if (a_opt && sscanf(a_opt, "a:%16[^,]", codec) == 1) {
talloc_free(lco->codec);
lco->codec = talloc_strdup(ctx, codec);
}

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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I17ce7acde1f23ab1394227d74214fe2a55cd2264
Gerrit-Change-Number: 11466
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 


Change in osmo-ci[master]: ansible: ogt: Deploy osmo-gsm-tester_netns_exec.sh

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


Change subject: ansible: ogt: Deploy osmo-gsm-tester_netns_exec.sh
..

ansible: ogt: Deploy osmo-gsm-tester_netns_exec.sh

Related: OS#2308
Change-Id: I587dd5630b211a906351f064c718f8f4c5fe6273
---
A ansible/roles/gsm-tester/files/osmo-gsm-tester_netns_exec.sh
M ansible/roles/gsm-tester/tasks/main.yml
2 files changed, 18 insertions(+), 0 deletions(-)



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

diff --git a/ansible/roles/gsm-tester/files/osmo-gsm-tester_netns_exec.sh 
b/ansible/roles/gsm-tester/files/osmo-gsm-tester_netns_exec.sh
new file mode 100755
index 000..336b746
--- /dev/null
+++ b/ansible/roles/gsm-tester/files/osmo-gsm-tester_netns_exec.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+netns="$1"
+shift
+#TODO: Later on I may want to call myself with specific ENV and calling sudo 
in order to run inside the netns but with dropped privileges
+ip netns exec $netns "$@"
diff --git a/ansible/roles/gsm-tester/tasks/main.yml 
b/ansible/roles/gsm-tester/tasks/main.yml
index 61db8e9..4f57b17 100644
--- a/ansible/roles/gsm-tester/tasks/main.yml
+++ b/ansible/roles/gsm-tester/tasks/main.yml
@@ -237,6 +237,19 @@
 dest: /etc/sudoers.d/osmo-gsm-tester_setcap_net_admin
 mode: 0440

+- name: create a wrapper script to run processes on modem netns
+  copy:
+src: osmo-gsm-tester_netns_exec.sh
+dest: /usr/local/bin/osmo-gsm-tester_netns_exec.sh
+mode: 755
+
+- name: allow osmo-gsm-tester sudo osmo-gsm-tester_netns_exec.sh
+  copy:
+content: |
+  %osmo-gsm-tester ALL=(root) NOPASSWD: 
/usr/local/bin/osmo-gsm-tester_netns_exec.sh
+dest: /etc/sudoers.d/osmo-gsm-tester_netns_exec
+mode: 0440
+
 - name: logrotate limit filesizes to 10M
   copy:
 content: "maxsize 10M"

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I587dd5630b211a906351f064c718f8f4c5fe6273
Gerrit-Change-Number: 11465
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmocom-bb[master]: Report socket path on errors

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

Change subject: Report socket path on errors
..


Set Ready For Review


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib63e1205d7b845c8779eb511635f26bae3a18085
Gerrit-Change-Number: 11464
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 26 Oct 2018 11:59:34 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in docker-playground[master]: rename m3ua-test, sua-test to nplab-*-test

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

Change subject: rename m3ua-test, sua-test to nplab-*-test
..


Patch Set 8:

NOTE: I've adjusted the paths in the existing jenkins jobs, as they are not 
replaced with the new jenkins job builder based ones yet (see 
https://gerrit.osmocom.org/#/c/osmo-ci/+/11370/).


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iedf9a8cd9af1da674e018a08a977490520e602de
Gerrit-Change-Number: 11368
Gerrit-PatchSet: 8
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: osmith 
Gerrit-CC: Neels Hofmeyr 
Gerrit-Comment-Date: Fri, 26 Oct 2018 11:09:12 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-mgw[master]: add MGCP CRCX command statistics to osmo-mgw

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

Change subject: add MGCP CRCX command statistics to osmo-mgw
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ida82fc340d5c66180e5fe9a0d195e9be6dc64c61
Gerrit-Change-Number: 11463
Gerrit-PatchSet: 2
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: dexter 
Gerrit-Comment-Date: Fri, 26 Oct 2018 11:06:52 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bts[master]: Add OC-2G systemd service and config

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

Change subject: Add OC-2G systemd service and config
..


Patch Set 1:

see my other comment, let's squash those three patches into one patch, and also 
add the jenkins.sh integration


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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic4b5a97b9677051442f3c3341ba23add35b43715
Gerrit-Change-Number: 11448
Gerrit-PatchSet: 1
Gerrit-Owner: Omar Ramadan 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Fri, 26 Oct 2018 10:46:16 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-bts[master]: Add OC-2G to build

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

Change subject: Add OC-2G to build
..


Patch Set 1:

(2 comments)

I think the three patches in this series should be merged into one patch.  The 
retionale is: Only if the build infrastructure is added together with the 
soruce code, we can do build verification as part of patch verification (V+1) 
and a subsequent merge.

https://gerrit.osmocom.org/#/c/11449/1/include/osmo-bts/gsm_data_shared.h
File include/osmo-bts/gsm_data_shared.h:

https://gerrit.osmocom.org/#/c/11449/1/include/osmo-bts/gsm_data_shared.h@414
PS1, Line 414: uint8_t max_power_backoff_8psk; /* in actual dB */
 : uint8_t c0_idle_power_red;  /* in actual dB */
would be good to mark those as "OC2G only for now" in the comment


https://gerrit.osmocom.org/#/c/11449/1/include/osmo-bts/l1sap.h
File include/osmo-bts/l1sap.h:

https://gerrit.osmocom.org/#/c/11449/1/include/osmo-bts/l1sap.h@53
PS1, Line 53:   return L1SAP_CHAN2SS_BCCH(chan_nr);
unrelated cosmetic change, lets' try to avoid that.



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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4a8dcf759a2818c8e457bcb82775c4e60c94d771
Gerrit-Change-Number: 11449
Gerrit-PatchSet: 1
Gerrit-Owner: Omar Ramadan 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Fri, 26 Oct 2018 10:45:57 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-bts[master]: Add OC-2G BTS sources

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

Change subject: Add OC-2G BTS sources
..


Patch Set 1: -Code-Review

ok, the discussion on the mailing list has gone into the direction of "merge 
this now as-is and then unify with lc15 after merge".

So we are willing to merge this now.  However, in order to merge this code, we 
also need to ensure it's at least build tested.   This means that there is 
something like a contrib/jenkins_oc2g.sh and contrib/jenkins_bts_model.sh is 
extended to cover oc2g.

Those scripts can be manually/locally tested by ensurign osmo-ci.git/scripts is 
included in PATH before calling something like "./contrib/jenkins_bts_model 
sysmo"

Please provide those scripts which ensure that this commit can only be merged 
once it at least passes a simple build test. Thanks1


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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I327384fe5ac944dc3996a3f00932d6f1a10d5a35
Gerrit-Change-Number: 11447
Gerrit-PatchSet: 1
Gerrit-Owner: Omar Ramadan 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 26 Oct 2018 10:43:21 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in docker-playground[master]: Remove top-level Makefile, explain why in README

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

Change subject: Remove top-level Makefile, explain why in README
..

Remove top-level Makefile, explain why in README

Obsoleted by docker_images_require(). The top-level Makefile had the
following drawbacks:
* it was not maintained: many targets were missing, and some of the
  existing ones did not build anymore
* make targets have the same names as the folders, so if they are not
  listed in the Makefile, it will assume that the target has been built
  already (prone to making mistakes)

Extend README.md to describe how to run tests, container caching, how
container dependencies are resolved now and the reasoning for doing
it that way instead of using a top-level Makefile.

Related: OS#3268
Change-Id: Id18a9a7a70f85127e6f6c9447d71764018bdb4ff
---
D Makefile
M README.md
2 files changed, 69 insertions(+), 84 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved; Verified



diff --git a/Makefile b/Makefile
deleted file mode 100644
index e224274..000
--- a/Makefile
+++ /dev/null
@@ -1,82 +0,0 @@
-.PHONY: build
-build: debian-jessie-build osmo-ggsn-master osmo-stp-master sctp-test 
sigtran-tests m3ua-test sua-test debian-stretch-titan ttcn3-ggsn-test
-
-.PHONY: debian-jessie-build
-debian-jessie-build:
-   $(MAKE) -C debian-jessie-build
-
-.PHONY: debian-stretch-titan
-debian-stretch-titan:
-   $(MAKE) -C debian-stretch-titan
-
-.PHONY: osmo-bsc-master
-osmo-bsc-master: debian-jessie-build
-   $(MAKE) -C osmo-bsc-master
-
-.PHONY: osmo-bts-master
-osmo-bts-master: debian-jessie-build
-   $(MAKE) -C osmo-bts-master
-
-.PHONY: osmo-msc-master
-osmo-msc-master: debian-jessie-build
-   $(MAKE) -C osmo-msc-master
-
-.PHONY: osmo-stp-master
-osmo-stp-master: debian-jessie-build
-   $(MAKE) -C osmo-stp-master
-
-.PHONY: osmocom-bb-host-master
-osmocom-bb-host-master: debian-jessie-build
-   $(MAKE) -C osmocom-bb-host-master
-
-.PHONY: osmo-ggsn-master
-osmo-ggsn-master: debian-jessie-build
-   $(MAKE) -C osmo-ggsn-master
-
-.PHONY: osmo-hlr-master
-osmo-hlr-master: debian-jessie-build
-   $(MAKE) -C osmo-hlr-master
-
-.PHONY: ttcn3-bsc-test
-ttcn3-bsc-test: debian-stretch-titan osmo-stp-master osmo-bsc-master 
osmo-bts-master ttcn3-bsc-test
-   $(MAKE) -C ttcn3-bsc-test
-
-.PHONY: ttcn3-bts-test
-ttcn3-bts-test: debian-stretch-titan osmo-bsc-master osmo-bts-master 
osmocom-bb-host-master ttcn3-bts-test
-   $(MAKE) -C ttcn3-bts-test
-
-.PHONY: ttcn3-msc-test
-ttcn3-msc-test: debian-stretch-titan osmo-stp-master osmo-msc-master 
ttcn3-msc-test
-   $(MAKE) -C ttcn3-msc-test
-
-.PHONY: ttcn3-ggsn-test
-ttcn3-ggsn-test: osmo-ggsn-test
-   $(MAKE) -C ggsn-test
-
-.PHONY: ttcn3-mgw-test
-ttcn3-mgw-test: debian-stretch-titan osmo-mgw-master
-   $(MAKE) -C ttcn3-mgw-test
-
-.PHONY: ttcn3-hlr-test
-ttcn3-hlr-test: debian-stretch-titan osmo-hlr-master
-   $(MAKE) -C ttcn3-hlr-test
-
-.PHONY: sctp-test
-sctp-test: debian-jessie-build
-   $(MAKE) -C sctp-test
-
-.PHONY: sigtran-tests
-sigtran-tests: debian-jessie-build
-   $(MAKE) -C sigtran-tests
-
-.PHONY: sua-test
-sua-test: osmo-stp-master
-   $(MAKE) -C sua-test
-
-.PHONY: m3ua-test
-m3ua-test: osmo-stp-master sigtran-tests
-   $(MAKE) -C m3ua-test
-
-.PHONY: gr-gsm-master
-gr-gsm-master:
-   $(MAKE) -C gr-gsm-master
diff --git a/README.md b/README.md
index bb354c0..adb6420 100644
--- a/README.md
+++ b/README.md
@@ -5,5 +5,72 @@
 containers + related stacks around Osmocom.   So far, the main focus is
 test automation.

-See http://laforge.gnumonks.org/blog/20170503-docker-overhyped/ for
-related rambling on why this doesn't work as well as one would want.
+## Running a testsuite
+All testsuite folders start with `ttcn3` or `nplab`. Run the following
+to build/update all required containers and start a specific testsuite:
+
+```
+$ cd ttcn3-mgw-test
+$ ./jenkins.sh
+```
+
+Environment variables:
+* `IMAGE_SUFFIX`: the version of the Osmocom stack to run the testsuite
+  against. Default is `master`, set this to `latest` to test the last
+  stable releases.
+* `NO_DOCKER_IMAGE_BUILD`: when set to `1`, it won't try to update the
+  containers (see "caching" below)
+
+## Building containers manually
+Most folders in this repository contain a `Dockerfile`. Build a docker
+container with the same name as the folder like this:
+
+```
+$ cd debian-jessie-build
+$ make
+```
+
+## Caching
+All folders named `osmo-*-latest` and `osmo-*-master` build the latest
+stable or most recent commit from `master` of the corresponding Osmocom
+program's git repository. When you have built it already, running `make`
+will only do a small HTTP request to check if the sources are outdated
+and skip the build in case it is still up-to-date.
+
+## Dependencies
+Folders that don't have a `jenkins.sh` usually only depend on the
+container 

Change in docker-playground[master]: rename m3ua-test, sua-test to nplab-*-test

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

Change subject: rename m3ua-test, sua-test to nplab-*-test
..

rename m3ua-test, sua-test to nplab-*-test

Allows writing a generic Jenkins Job Builder config by renaming the
container folders to match the job names. This needs changes in the
Jenkins jobs, as done in Ie433925ee81a61c5788b4a6f2bc5b89c2689d251.

Related: OS#3268
Change-Id: Iedf9a8cd9af1da674e018a08a977490520e602de
---
R nplab-m3ua-test/.release
R nplab-m3ua-test/Dockerfile
R nplab-m3ua-test/Makefile
R nplab-m3ua-test/all-sgp-tests.txt
R nplab-m3ua-test/dotguile
R nplab-m3ua-test/jenkins.sh
R nplab-m3ua-test/m3ua-param-testtool.scm
R nplab-m3ua-test/osmo-stp.cfg
R nplab-sua-test/.release
R nplab-sua-test/Dockerfile
R nplab-sua-test/Makefile
R nplab-sua-test/dotguile
R nplab-sua-test/jenkins.sh
R nplab-sua-test/osmo-stp.cfg
R nplab-sua-test/some-sua-sgp-tests.txt
R nplab-sua-test/sua-param-testtool-sgp.scm
16 files changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved; Verified



diff --git a/m3ua-test/.release b/nplab-m3ua-test/.release
similarity index 100%
rename from m3ua-test/.release
rename to nplab-m3ua-test/.release
diff --git a/m3ua-test/Dockerfile b/nplab-m3ua-test/Dockerfile
similarity index 100%
rename from m3ua-test/Dockerfile
rename to nplab-m3ua-test/Dockerfile
diff --git a/m3ua-test/Makefile b/nplab-m3ua-test/Makefile
similarity index 100%
rename from m3ua-test/Makefile
rename to nplab-m3ua-test/Makefile
diff --git a/m3ua-test/all-sgp-tests.txt b/nplab-m3ua-test/all-sgp-tests.txt
similarity index 100%
rename from m3ua-test/all-sgp-tests.txt
rename to nplab-m3ua-test/all-sgp-tests.txt
diff --git a/m3ua-test/dotguile b/nplab-m3ua-test/dotguile
similarity index 100%
rename from m3ua-test/dotguile
rename to nplab-m3ua-test/dotguile
diff --git a/m3ua-test/jenkins.sh b/nplab-m3ua-test/jenkins.sh
similarity index 90%
rename from m3ua-test/jenkins.sh
rename to nplab-m3ua-test/jenkins.sh
index e69e827..800c5b2 100755
--- a/m3ua-test/jenkins.sh
+++ b/nplab-m3ua-test/jenkins.sh
@@ -6,7 +6,7 @@
"debian-jessie-build" \
"osmo-stp-$IMAGE_SUFFIX" \
"debian-stretch-titan" \
-   "m3ua-test"
+   "nplab-m3ua-test"

 mkdir $VOL_BASE_DIR/m3ua-tester
 cp m3ua-param-testtool.scm all-sgp-tests.txt $VOL_BASE_DIR/m3ua-tester/
@@ -29,7 +29,7 @@
--network $NET_NAME --ip 172.18.7.2 \
-v $VOL_BASE_DIR/m3ua-tester:/data \
--name ${BUILD_TAG}-m3ua-test \
-   $REPO_USER/m3ua-test > $WORKSPACE/logs/junit-xml-m3ua.log
+   $REPO_USER/nplab-m3ua-test > $WORKSPACE/logs/junit-xml-m3ua.log

 docker container stop -t 1 ${BUILD_TAG}-stp

diff --git a/m3ua-test/m3ua-param-testtool.scm 
b/nplab-m3ua-test/m3ua-param-testtool.scm
similarity index 100%
rename from m3ua-test/m3ua-param-testtool.scm
rename to nplab-m3ua-test/m3ua-param-testtool.scm
diff --git a/m3ua-test/osmo-stp.cfg b/nplab-m3ua-test/osmo-stp.cfg
similarity index 100%
rename from m3ua-test/osmo-stp.cfg
rename to nplab-m3ua-test/osmo-stp.cfg
diff --git a/sua-test/.release b/nplab-sua-test/.release
similarity index 100%
rename from sua-test/.release
rename to nplab-sua-test/.release
diff --git a/sua-test/Dockerfile b/nplab-sua-test/Dockerfile
similarity index 100%
rename from sua-test/Dockerfile
rename to nplab-sua-test/Dockerfile
diff --git a/sua-test/Makefile b/nplab-sua-test/Makefile
similarity index 100%
rename from sua-test/Makefile
rename to nplab-sua-test/Makefile
diff --git a/sua-test/dotguile b/nplab-sua-test/dotguile
similarity index 100%
rename from sua-test/dotguile
rename to nplab-sua-test/dotguile
diff --git a/sua-test/jenkins.sh b/nplab-sua-test/jenkins.sh
similarity index 91%
rename from sua-test/jenkins.sh
rename to nplab-sua-test/jenkins.sh
index 5e8d4cb..fea5cf0 100755
--- a/sua-test/jenkins.sh
+++ b/nplab-sua-test/jenkins.sh
@@ -7,7 +7,7 @@
"osmo-stp-$IMAGE_SUFFIX" \
"debian-stretch-titan" \
"sigtran-tests" \
-   "sua-test"
+   "nplab-sua-test"

 mkdir $VOL_BASE_DIR/sua-tester
 cp sua-param-testtool-sgp.scm some-sua-sgp-tests.txt $VOL_BASE_DIR/sua-tester/
@@ -30,7 +30,7 @@
--network $NET_NAME --ip 172.18.6.3 \
-v $VOL_BASE_DIR/sua-tester:/data \
--name ${BUILD_TAG}-sua-test \
-   $REPO_USER/sua-test > $VOL_BASE_DIR/junit-xml-sua.log
+   $REPO_USER/nplab-sua-test > $VOL_BASE_DIR/junit-xml-sua.log

 docker container stop -t 1 ${BUILD_TAG}-stp

diff --git a/sua-test/osmo-stp.cfg b/nplab-sua-test/osmo-stp.cfg
similarity index 100%
rename from sua-test/osmo-stp.cfg
rename to nplab-sua-test/osmo-stp.cfg
diff --git a/sua-test/some-sua-sgp-tests.txt 
b/nplab-sua-test/some-sua-sgp-tests.txt
similarity index 100%
rename from sua-test/some-sua-sgp-tests.txt
rename to 

Change in docker-playground[master]: jenkins.sh: IMAGE_SUFFIX, docker_images_require()

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

Change subject: jenkins.sh: IMAGE_SUFFIX, docker_images_require()
..


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


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idbb708ab16cb71bab5069127945b63388222369e
Gerrit-Change-Number: 11366
Gerrit-PatchSet: 6
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Fri, 26 Oct 2018 10:35:42 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in docker-playground[master]: jenkins.sh: IMAGE_SUFFIX, docker_images_require()

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

Change subject: jenkins.sh: IMAGE_SUFFIX, docker_images_require()
..

jenkins.sh: IMAGE_SUFFIX, docker_images_require()

Default value "master" of the IMAGE_SUFFIX environment variable can be
changed to "latest" to test the latest stable builds instead of the
nightly ones. Use docker_images_require() to make sure that the required
images are existing and up-to-date before running the tests.

Related: OS#3268
Change-Id: Idbb708ab16cb71bab5069127945b63388222369e
---
M m3ua-test/jenkins.sh
M sua-test/jenkins.sh
M ttcn3-bsc-test/jenkins-sccplite.sh
M ttcn3-bsc-test/jenkins.sh
M ttcn3-bts-test/jenkins.sh
M ttcn3-ggsn-test/jenkins.sh
M ttcn3-hlr-test/jenkins.sh
M ttcn3-mgw-test/jenkins.sh
M ttcn3-msc-test/jenkins.sh
M ttcn3-sgsn-test/jenkins.sh
M ttcn3-sip-test/jenkins.sh
11 files changed, 97 insertions(+), 18 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved; Verified



diff --git a/m3ua-test/jenkins.sh b/m3ua-test/jenkins.sh
index 61f7c05..e69e827 100755
--- a/m3ua-test/jenkins.sh
+++ b/m3ua-test/jenkins.sh
@@ -1,6 +1,12 @@
 #!/bin/sh

 . ../jenkins-common.sh
+IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}"
+docker_images_require \
+   "debian-jessie-build" \
+   "osmo-stp-$IMAGE_SUFFIX" \
+   "debian-stretch-titan" \
+   "m3ua-test"

 mkdir $VOL_BASE_DIR/m3ua-tester
 cp m3ua-param-testtool.scm all-sgp-tests.txt $VOL_BASE_DIR/m3ua-tester/
@@ -16,7 +22,7 @@
--network $NET_NAME --ip 172.18.7.200 \
-v $VOL_BASE_DIR/stp:/data \
--name ${BUILD_TAG}-stp \
-   -d $REPO_USER/osmo-stp-master
+   -d $REPO_USER/osmo-stp-$IMAGE_SUFFIX

 # start docker container with tests
 docker run --rm \
diff --git a/sua-test/jenkins.sh b/sua-test/jenkins.sh
index 0f87b4e..5e8d4cb 100755
--- a/sua-test/jenkins.sh
+++ b/sua-test/jenkins.sh
@@ -1,6 +1,13 @@
 #!/bin/sh

 . ../jenkins-common.sh
+IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}"
+docker_images_require \
+   "debian-jessie-build" \
+   "osmo-stp-$IMAGE_SUFFIX" \
+   "debian-stretch-titan" \
+   "sigtran-tests" \
+   "sua-test"

 mkdir $VOL_BASE_DIR/sua-tester
 cp sua-param-testtool-sgp.scm some-sua-sgp-tests.txt $VOL_BASE_DIR/sua-tester/
@@ -16,7 +23,7 @@
--network $NET_NAME --ip 172.18.6.200 \
-v $VOL_BASE_DIR/stp:/data \
--name ${BUILD_TAG}-stp \
-   -d $REPO_USER/osmo-stp-master
+   -d $REPO_USER/osmo-stp-$IMAGE_SUFFIX

 # start docker container with tests
 docker run --rm \
diff --git a/ttcn3-bsc-test/jenkins-sccplite.sh 
b/ttcn3-bsc-test/jenkins-sccplite.sh
index bceb0ec..0a6ecf3 100755
--- a/ttcn3-bsc-test/jenkins-sccplite.sh
+++ b/ttcn3-bsc-test/jenkins-sccplite.sh
@@ -1,6 +1,13 @@
 #!/bin/sh

 . ../jenkins-common.sh
+IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}"
+docker_images_require \
+   "debian-jessie-build" \
+   "osmo-bsc-$IMAGE_SUFFIX" \
+   "osmo-bts-$IMAGE_SUFFIX" \
+   "debian-stretch-titan" \
+   "ttcn3-bsc-test"

 #Make sure NET_NAME doesn't clash with the AoIP BSC test
 NET_NAME=ttcn3-bsc_sccplite-test
@@ -18,14 +25,17 @@
--network $NET_NAME --ip 172.18.12.20 \
-v $VOL_BASE_DIR/bsc:/data \
--name ${BUILD_TAG}-bsc -d \
-   $REPO_USER/osmo-bsc-master
+   $REPO_USER/osmo-bsc-$IMAGE_SUFFIX
 
 for i in `seq 0 2`; do
echo Starting container with OML for BTS$i
docker run  --rm \
--network $NET_NAME --ip 172.18.12.10$i \
--name ${BUILD_TAG}-bts$i -d \
-   $REPO_USER/osmo-bts-master /usr/local/bin/respawn.sh 
osmo-bts-omldummy 172.18.12.20 $((i + 1234)) 1
+   $REPO_USER/osmo-bts-$IMAGE_SUFFIX \
+   /usr/local/bin/respawn.sh \
+   osmo-bts-omldummy \
+   172.18.12.20 $((i + 1234)) 1
 done

 echo Starting container with BSC testsuite
diff --git a/ttcn3-bsc-test/jenkins.sh b/ttcn3-bsc-test/jenkins.sh
index 7536396..ec8c23e 100755
--- a/ttcn3-bsc-test/jenkins.sh
+++ b/ttcn3-bsc-test/jenkins.sh
@@ -1,6 +1,14 @@
 #!/bin/sh

 . ../jenkins-common.sh
+IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}"
+docker_images_require \
+   "debian-jessie-build" \
+   "osmo-stp-$IMAGE_SUFFIX" \
+   "osmo-bsc-$IMAGE_SUFFIX" \
+   "osmo-bts-$IMAGE_SUFFIX" \
+   "debian-stretch-titan" \
+   "ttcn3-bsc-test"

 mkdir $VOL_BASE_DIR/bsc-tester
 cp BSC_Tests.cfg $VOL_BASE_DIR/bsc-tester/
@@ -18,21 +26,23 @@
--network $NET_NAME --ip 172.18.2.200 \
-v $VOL_BASE_DIR/stp:/data \
--name ${BUILD_TAG}-stp -d \
-   $REPO_USER/osmo-stp-master
+   $REPO_USER/osmo-stp-$IMAGE_SUFFIX

 echo Starting container with BSC
 docker 

Change in docker-playground[master]: symlinks: ttcn3-bsc-test-sccplite

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

Change subject: symlinks: ttcn3-bsc-test-sccplite
..

symlinks: ttcn3-bsc-test-sccplite

Create the ttcn3-bsc-test-sccplite folder, with symlinks to
ttcn3-bsc-test/jenkins-sccplite.sh and ttcn3-bsc-test/sccplite. This
allows writing the jenkins job builder config files in a generic way.

Related: OS#3268
Change-Id: I1d1d277475090cd615a0e2d07a42b2032cdefb9c
---
A ttcn3-bsc-test-sccplite/jenkins.sh
A ttcn3-bsc-test-sccplite/sccplite
2 files changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved; Verified



diff --git a/ttcn3-bsc-test-sccplite/jenkins.sh 
b/ttcn3-bsc-test-sccplite/jenkins.sh
new file mode 12
index 000..9a6da0f
--- /dev/null
+++ b/ttcn3-bsc-test-sccplite/jenkins.sh
@@ -0,0 +1 @@
+../ttcn3-bsc-test/jenkins-sccplite.sh
\ No newline at end of file
diff --git a/ttcn3-bsc-test-sccplite/sccplite b/ttcn3-bsc-test-sccplite/sccplite
new file mode 12
index 000..9a5b492
--- /dev/null
+++ b/ttcn3-bsc-test-sccplite/sccplite
@@ -0,0 +1 @@
+../ttcn3-bsc-test/sccplite
\ No newline at end of file

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I1d1d277475090cd615a0e2d07a42b2032cdefb9c
Gerrit-Change-Number: 11367
Gerrit-PatchSet: 6
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: osmith 


Change in docker-playground[master]: rename m3ua-test, sua-test to nplab-*-test

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

Change subject: rename m3ua-test, sua-test to nplab-*-test
..


Patch Set 8: Verified+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iedf9a8cd9af1da674e018a08a977490520e602de
Gerrit-Change-Number: 11368
Gerrit-PatchSet: 8
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: osmith 
Gerrit-CC: Neels Hofmeyr 
Gerrit-Comment-Date: Fri, 26 Oct 2018 10:35:07 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in docker-playground[master]: symlinks: ttcn3-bsc-test-sccplite

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

Change subject: symlinks: ttcn3-bsc-test-sccplite
..


Patch Set 6: Verified+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I1d1d277475090cd615a0e2d07a42b2032cdefb9c
Gerrit-Change-Number: 11367
Gerrit-PatchSet: 6
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Fri, 26 Oct 2018 10:35:10 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in docker-playground[master]: Remove top-level Makefile, explain why in README

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

Change subject: Remove top-level Makefile, explain why in README
..


Patch Set 9: Code-Review+2


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id18a9a7a70f85127e6f6c9447d71764018bdb4ff
Gerrit-Change-Number: 11369
Gerrit-PatchSet: 9
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: osmith 
Gerrit-CC: Neels Hofmeyr 
Gerrit-Comment-Date: Fri, 26 Oct 2018 10:34:52 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in docker-playground[master]: Remove top-level Makefile, explain why in README

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

Change subject: Remove top-level Makefile, explain why in README
..


Patch Set 9: Verified+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id18a9a7a70f85127e6f6c9447d71764018bdb4ff
Gerrit-Change-Number: 11369
Gerrit-PatchSet: 9
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: osmith 
Gerrit-CC: Neels Hofmeyr 
Gerrit-Comment-Date: Fri, 26 Oct 2018 10:34:54 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-gsm-tester[master]: process: Make sure sync process is terminated if ogt is stopped

2018-10-26 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11459 )

Change subject: process: Make sure sync process is terminated if ogt is stopped
..

process: Make sure sync process is terminated if ogt is stopped

Change-Id: Iecdac96ea576a312be2a6c6b6799e249074687ef
---
M src/osmo_gsm_tester/process.py
1 file changed, 13 insertions(+), 12 deletions(-)

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



diff --git a/src/osmo_gsm_tester/process.py b/src/osmo_gsm_tester/process.py
index 534cdba..fb5c6f6 100644
--- a/src/osmo_gsm_tester/process.py
+++ b/src/osmo_gsm_tester/process.py
@@ -236,25 +236,26 @@
  ' '.join(self.popen_args))]
 self.dbg(self.popen_args, dir=self.run_dir, conf=self.popen_kwargs)

+def run_proc_sync(proc):
+try:
+proc.launch()
+proc.wait()
+except Exception as e:
+proc.terminate()
+raise e
+if proc.result != 0:
+log.ctx(proc)
+raise log.Error('Exited in error')

 def run_local_sync(run_dir, name, popen_args):
 run_dir =run_dir.new_dir(name)
 proc = Process(name, run_dir, popen_args)
-proc.launch()
-proc.wait()
-if proc.result != 0:
-log.ctx(proc)
-raise log.Error('Exited in error')
+run_proc_sync(proc)

 def run_remote_sync(run_dir, remote_user, remote_addr, name, popen_args, 
remote_cwd=None):
 run_dir = run_dir.new_dir(name)
-proc = RemoteProcess(name, run_dir, remote_user, remote_addr, remote_cwd,
- popen_args)
-proc.launch()
-proc.wait()
-if proc.result != 0:
-log.ctx(proc)
-raise log.Error('Exited in error')
+proc = RemoteProcess(name, run_dir, remote_user, remote_addr, remote_cwd, 
popen_args)
+run_proc_sync(proc)

 def scp(run_dir, remote_user, remote_addr, name, local_path, remote_path):
 run_local_sync(run_dir, name, ('scp', '-r', local_path, '%s@%s:%s' % 
(remote_user, remote_addr, remote_path)))

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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Iecdac96ea576a312be2a6c6b6799e249074687ef
Gerrit-Change-Number: 11459
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-gsm-tester[master]: process: Make sure sync process is terminated if ogt is stopped

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

Change subject: process: Make sure sync process is terminated if ogt is stopped
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iecdac96ea576a312be2a6c6b6799e249074687ef
Gerrit-Change-Number: 11459
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Fri, 26 Oct 2018 10:24:57 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in docker-playground[master]: Remove top-level Makefile, explain why in README

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

Change subject: Remove top-level Makefile, explain why in README
..


Patch Set 9:

> I think this change in usage (shell script vs makefile) should be documented 
> in a readme file.  Add one in case there's none yet.

Done.


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id18a9a7a70f85127e6f6c9447d71764018bdb4ff
Gerrit-Change-Number: 11369
Gerrit-PatchSet: 9
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: osmith 
Gerrit-CC: Neels Hofmeyr 
Gerrit-Comment-Date: Fri, 26 Oct 2018 10:19:13 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-gsm-tester[master]: First round of clean-ups of imports and unused variables

2018-10-26 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11067 )

Change subject: First round of clean-ups of imports and unused variables
..

First round of clean-ups of imports and unused variables

Run pyflakes src/osmo_gsm_tester and then address the first
round of problems.

Change-Id: I02f1d89078dfdf37d53e2e20811bf36fb14ec3b0
---
M src/osmo_gsm_tester/bts.py
M src/osmo_gsm_tester/bts_nanobts.py
M src/osmo_gsm_tester/bts_octphy.py
M src/osmo_gsm_tester/bts_osmo.py
M src/osmo_gsm_tester/bts_osmotrx.py
M src/osmo_gsm_tester/esme.py
M src/osmo_gsm_tester/modem.py
M src/osmo_gsm_tester/pcu_osmo.py
M src/osmo_gsm_tester/report.py
M src/osmo_gsm_tester/smsc.py
M src/osmo_gsm_tester/suite.py
11 files changed, 11 insertions(+), 25 deletions(-)

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



diff --git a/src/osmo_gsm_tester/bts.py b/src/osmo_gsm_tester/bts.py
index f05a1ba..6b0331e 100644
--- a/src/osmo_gsm_tester/bts.py
+++ b/src/osmo_gsm_tester/bts.py
@@ -17,12 +17,9 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see .

-import os
-import pprint
-import tempfile
 import copy
 from abc import ABCMeta, abstractmethod
-from . import log, config, util, template, process, schema, pcu_osmo
+from . import log, config, schema

 class Bts(log.Origin, metaclass=ABCMeta):

diff --git a/src/osmo_gsm_tester/bts_nanobts.py 
b/src/osmo_gsm_tester/bts_nanobts.py
index a18f205..bec2433 100644
--- a/src/osmo_gsm_tester/bts_nanobts.py
+++ b/src/osmo_gsm_tester/bts_nanobts.py
@@ -18,11 +18,8 @@
 # along with this program.  If not, see .

 import os
-import pprint
-import tempfile
 import re
-from abc import ABCMeta, abstractmethod
-from . import log, config, util, template, process, pcap_recorder, bts, pcu
+from . import log, config, util, process, pcap_recorder, bts, pcu
 from . import powersupply
 from .event_loop import MainLoop

diff --git a/src/osmo_gsm_tester/bts_octphy.py 
b/src/osmo_gsm_tester/bts_octphy.py
index f1a0ce8..a1dd494 100644
--- a/src/osmo_gsm_tester/bts_octphy.py
+++ b/src/osmo_gsm_tester/bts_octphy.py
@@ -19,8 +19,7 @@

 import os
 import pprint
-import tempfile
-from . import log, config, util, template, process, pcu_osmo, bts_osmo
+from . import log, config, util, template, process, bts_osmo

 class OsmoBtsOctphy(bts_osmo.OsmoBtsMainUnit):

diff --git a/src/osmo_gsm_tester/bts_osmo.py b/src/osmo_gsm_tester/bts_osmo.py
index 89572ec..9105c28 100644
--- a/src/osmo_gsm_tester/bts_osmo.py
+++ b/src/osmo_gsm_tester/bts_osmo.py
@@ -18,10 +18,9 @@
 # along with this program.  If not, see .

 import os
-import pprint
 import tempfile
 from abc import ABCMeta, abstractmethod
-from . import log, config, util, template, process, bts, pcu_osmo
+from . import log, bts, pcu_osmo

 class OsmoBts(bts.Bts, metaclass=ABCMeta):

diff --git a/src/osmo_gsm_tester/bts_osmotrx.py 
b/src/osmo_gsm_tester/bts_osmotrx.py
index 92b726c..86afeec 100644
--- a/src/osmo_gsm_tester/bts_osmotrx.py
+++ b/src/osmo_gsm_tester/bts_osmotrx.py
@@ -20,9 +20,8 @@
 import os
 import stat
 import pprint
-import tempfile
 from abc import ABCMeta, abstractmethod
-from . import log, config, util, template, process, pcu_osmo, bts_osmo
+from . import log, config, util, template, process, bts_osmo
 from .event_loop import MainLoop

 class OsmoBtsTrx(bts_osmo.OsmoBtsMainUnit):
diff --git a/src/osmo_gsm_tester/esme.py b/src/osmo_gsm_tester/esme.py
index 9653fbf..de3ac16 100644
--- a/src/osmo_gsm_tester/esme.py
+++ b/src/osmo_gsm_tester/esme.py
@@ -23,7 +23,7 @@
 import smpplib.consts
 import smpplib.exceptions

-from . import log, util, sms
+from . import log
 from .event_loop import MainLoop

 # if you want to know what's happening inside python-smpplib
diff --git a/src/osmo_gsm_tester/modem.py b/src/osmo_gsm_tester/modem.py
index d0bbf23..21b208c 100644
--- a/src/osmo_gsm_tester/modem.py
+++ b/src/osmo_gsm_tester/modem.py
@@ -21,9 +21,6 @@
 from .event_loop import MainLoop

 from pydbus import SystemBus, Variant
-import time
-import pprint
-import sys

 # Required for Gio.Cancellable.
 # See 
https://lazka.github.io/pgi-docs/Gio-2.0/classes/Cancellable.html#Gio.Cancellable
diff --git a/src/osmo_gsm_tester/pcu_osmo.py b/src/osmo_gsm_tester/pcu_osmo.py
index ad8ebce..767264c 100644
--- a/src/osmo_gsm_tester/pcu_osmo.py
+++ b/src/osmo_gsm_tester/pcu_osmo.py
@@ -19,8 +19,7 @@

 import os
 import pprint
-import tempfile
-from . import log, config, util, template, process, pcu
+from . import config, util, template, process, pcu

 class OsmoPcu(pcu.Pcu):

diff --git a/src/osmo_gsm_tester/report.py b/src/osmo_gsm_tester/report.py
index a53504b..224cc46 100644
--- a/src/osmo_gsm_tester/report.py
+++ 

Change in osmo-gsm-tester[master]: First round of clean-ups of imports and unused variables

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

Change subject: First round of clean-ups of imports and unused variables
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I02f1d89078dfdf37d53e2e20811bf36fb14ec3b0
Gerrit-Change-Number: 11067
Gerrit-PatchSet: 2
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Fri, 26 Oct 2018 10:18:51 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in docker-playground[master]: Remove top-level Makefile, explain why in README

2018-10-26 Thread osmith
Hello Harald Welte,

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

https://gerrit.osmocom.org/11369

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

Change subject: Remove top-level Makefile, explain why in README
..

Remove top-level Makefile, explain why in README

Obsoleted by docker_images_require(). The top-level Makefile had the
following drawbacks:
* it was not maintained: many targets were missing, and some of the
  existing ones did not build anymore
* make targets have the same names as the folders, so if they are not
  listed in the Makefile, it will assume that the target has been built
  already (prone to making mistakes)

Extend README.md to describe how to run tests, container caching, how
container dependencies are resolved now and the reasoning for doing
it that way instead of using a top-level Makefile.

Related: OS#3268
Change-Id: Id18a9a7a70f85127e6f6c9447d71764018bdb4ff
---
D Makefile
M README.md
2 files changed, 69 insertions(+), 84 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/69/11369/9
--
To view, visit https://gerrit.osmocom.org/11369
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id18a9a7a70f85127e6f6c9447d71764018bdb4ff
Gerrit-Change-Number: 11369
Gerrit-PatchSet: 9
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: osmith 
Gerrit-CC: Neels Hofmeyr 


Change in osmocom-bb[master]: mobile: fix vty bind ip override

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

Change subject: mobile: fix vty bind ip override
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/11457/1/src/host/layer23/src/mobile/main.c
File src/host/layer23/src/mobile/main.c:

https://gerrit.osmocom.org/#/c/11457/1/src/host/layer23/src/mobile/main.c@254
PS1, Line 254: use_custom_vty_ip
You could just check 'vty_ip' against NULL. There is no need
to introduce additional 'use_custom_vty_ip'...



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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I32517567847fd5c54b1742f18bf409ff81e316fa
Gerrit-Change-Number: 11457
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 26 Oct 2018 08:50:19 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


  1   2   >