[PATCH] openbsc[master]: rename osmo-bsc to osmo-bsc-sccplite

2017-10-25 Thread Harald Welte
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/4421

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

rename osmo-bsc to osmo-bsc-sccplite

This is to avoid naming conflicts with the new osmo-bsc, which resides
in its own git repository (osmo-bsc.git) and which uses libosmo-sigtran
and implements (primarily) 3GPP AoIP.

Change-Id: If10d1599b62d010726336134091a4e855c380d93
---
M debian/changelog
M debian/control
A debian/osmocom-bsc-sccplite.examples
A debian/osmocom-bsc-sccplite.install
D debian/osmocom-bsc.examples
D debian/osmocom-bsc.install
M debian/rules
M openbsc/.gitignore
M openbsc/contrib/bsc-test/msc.sh
R openbsc/contrib/systemd/osmo-bsc-sccplite.service
R openbsc/doc/examples/osmo-bsc-sccplite/osmo-bsc-sccplite.cfg
M openbsc/osmoappdesc.py
M openbsc/src/osmo-bsc/Makefile.am
M openbsc/src/osmo-bsc/osmo_bsc_main.c
M openbsc/tests/ctrl_test_runner.py
M openbsc/tests/vty_test_runner.py
16 files changed, 33 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/21/4421/3

diff --git a/debian/changelog b/debian/changelog
index e9a4212..dd850be 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,10 @@
   * Prevent SGSN starting with 'auth-policy remote' when no 'gsup remote-*' 
are configured.
 Note: such configs are broken without extra workarounds anyway.
 
+  [ Harald Welte ]
+  * Rename osmo-bsc to osmo-bsc-sccplite to avoid clashes with new 3GPP AoIP
+osmo-bsc.git code
+
  -- Holger Hans Peter Freyther   Tue, 24 May 2016 
23:14:31 +0200
 
 openbsc (0.14.0) unstable; urgency=low
diff --git a/debian/control b/debian/control
index 58e8966..e31d0c4 100644
--- a/debian/control
+++ b/debian/control
@@ -21,7 +21,7 @@
 Vcs-Browser: http://openbsc.osmocom.org/trac/browser
 Homepage: https://projects.osmocom.org/projects/openbsc
 
-Package: osmocom-bsc
+Package: osmocom-bsc-sccplite
 Architecture: any
 Depends: ${shlibs:Depends},
  ${misc:Depends}
@@ -40,7 +40,7 @@
 Description: GSM Network-in-a-Box, implements BSC, MSC, SMSC, HLR, VLR
  This is the Network-in-a-Box version of OpenBSC. It has all the GSM network
  components bundled together. When using osmocom-nitb, there is no need for a
- Mobile Switching Center (MSC) which is needed when using osmocom-bsc.
+ Mobile Switching Center (MSC) which is needed when using osmocom-bsc-sccplite.
 
 Package: osmocom-ipaccess-utils
 Architecture: any
@@ -64,13 +64,13 @@
 Architecture: any
 Depends: ${shlibs:Depends},
  ${misc:Depends}
-Recommends: osmocom-bsc
+Recommends: osmocom-bsc-sccplite
 Description: Osmocom Base Station Controller Network Address Translation
  This NAT is useful for masquerading multiple BSCs behind one. It listens
  for incoming BSCs on port 5000 and connects to a specified Mobile Switching
  Center (MSC).
  .
- This package is part of OpenBSC and closely related to osmocom-bsc.
+ This package is part of OpenBSC and closely related to osmocom-bsc-sccplite.
 
 Package: openbsc-dev
 Architecture: all
@@ -83,11 +83,11 @@
  The directory structure is copied after the structure in the repository
  and the header and .c file are installed into /usr/src/osmocom/openbsc/.
 
-Package: osmocom-bsc-dbg
+Package: osmocom-bsc-sccplite-dbg
 Architecture: any
 Section: debug
 Priority: extra
-Depends: osmocom-bsc (= ${binary:Version}), ${misc:Depends}
+Depends: osmocom-bsc-sccplite (= ${binary:Version}), ${misc:Depends}
 Description: Debug symbols for the OpenBSC BSC
  Make debugging possible
 
diff --git a/debian/osmocom-bsc-sccplite.examples 
b/debian/osmocom-bsc-sccplite.examples
new file mode 100644
index 000..545709b
--- /dev/null
+++ b/debian/osmocom-bsc-sccplite.examples
@@ -0,0 +1,2 @@
+openbsc/doc/examples/osmo-bsc_mgcp
+openbsc/doc/examples/osmo-bsc-sccplite
diff --git a/debian/osmocom-bsc-sccplite.install 
b/debian/osmocom-bsc-sccplite.install
new file mode 100644
index 000..9ce795c
--- /dev/null
+++ b/debian/osmocom-bsc-sccplite.install
@@ -0,0 +1,2 @@
+/usr/bin/osmo-bsc_mgcp
+/usr/bin/osmo-bsc-sccplite
diff --git a/debian/osmocom-bsc.examples b/debian/osmocom-bsc.examples
deleted file mode 100644
index a95f12b..000
--- a/debian/osmocom-bsc.examples
+++ /dev/null
@@ -1 +0,0 @@
-openbsc/doc/examples/osmo-bsc_mgcp
diff --git a/debian/osmocom-bsc.install b/debian/osmocom-bsc.install
deleted file mode 100644
index ab9459e..000
--- a/debian/osmocom-bsc.install
+++ /dev/null
@@ -1,2 +0,0 @@
-/usr/bin/osmo-bsc_mgcp
-/usr/bin/osmo-bsc
diff --git a/debian/rules b/debian/rules
index d1d74a5..05bbbef 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,7 +17,7 @@
cd openbsc && autoreconf --install --force
 
 override_dh_strip:
-   dh_strip -posmocom-bsc --dbg-package=osmocom-bsc-dbg
+   dh_strip -posmocom-bsc-sccplite --dbg-package=osmocom-bsc-sccplite-dbg
dh_strip -posmocom-nitb --dbg-package=osmocom-nitb-dbg
dh_strip -posmocom-ipaccess-utils 

openbsc[master]: rename osmo-bsc to osmo-bsc-sccplite

2017-10-25 Thread Harald Welte

Patch Set 2: Code-Review+2

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

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


[PATCH] openbsc[master]: rename osmo-bsc to osmo-bsc-sccplite

2017-10-25 Thread Harald Welte
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/4421

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

rename osmo-bsc to osmo-bsc-sccplite

This is to avoid naming conflicts with the new osmo-bsc, which resides
in its own git repository (osmo-bsc.git) and which uses libosmo-sigtran
and implements (primarily) 3GPP AoIP.

Change-Id: If10d1599b62d010726336134091a4e855c380d93
---
M debian/control
A debian/osmocom-bsc-sccplite.examples
A debian/osmocom-bsc-sccplite.install
D debian/osmocom-bsc.examples
D debian/osmocom-bsc.install
M debian/rules
M openbsc/.gitignore
M openbsc/contrib/bsc-test/msc.sh
R openbsc/contrib/systemd/osmo-bsc-sccplite.service
R openbsc/doc/examples/osmo-bsc-sccplite/osmo-bsc-sccplite.cfg
M openbsc/osmoappdesc.py
M openbsc/src/osmo-bsc/Makefile.am
M openbsc/src/osmo-bsc/osmo_bsc_main.c
M openbsc/tests/ctrl_test_runner.py
M openbsc/tests/vty_test_runner.py
15 files changed, 29 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/21/4421/2

diff --git a/debian/control b/debian/control
index 58e8966..e31d0c4 100644
--- a/debian/control
+++ b/debian/control
@@ -21,7 +21,7 @@
 Vcs-Browser: http://openbsc.osmocom.org/trac/browser
 Homepage: https://projects.osmocom.org/projects/openbsc
 
-Package: osmocom-bsc
+Package: osmocom-bsc-sccplite
 Architecture: any
 Depends: ${shlibs:Depends},
  ${misc:Depends}
@@ -40,7 +40,7 @@
 Description: GSM Network-in-a-Box, implements BSC, MSC, SMSC, HLR, VLR
  This is the Network-in-a-Box version of OpenBSC. It has all the GSM network
  components bundled together. When using osmocom-nitb, there is no need for a
- Mobile Switching Center (MSC) which is needed when using osmocom-bsc.
+ Mobile Switching Center (MSC) which is needed when using osmocom-bsc-sccplite.
 
 Package: osmocom-ipaccess-utils
 Architecture: any
@@ -64,13 +64,13 @@
 Architecture: any
 Depends: ${shlibs:Depends},
  ${misc:Depends}
-Recommends: osmocom-bsc
+Recommends: osmocom-bsc-sccplite
 Description: Osmocom Base Station Controller Network Address Translation
  This NAT is useful for masquerading multiple BSCs behind one. It listens
  for incoming BSCs on port 5000 and connects to a specified Mobile Switching
  Center (MSC).
  .
- This package is part of OpenBSC and closely related to osmocom-bsc.
+ This package is part of OpenBSC and closely related to osmocom-bsc-sccplite.
 
 Package: openbsc-dev
 Architecture: all
@@ -83,11 +83,11 @@
  The directory structure is copied after the structure in the repository
  and the header and .c file are installed into /usr/src/osmocom/openbsc/.
 
-Package: osmocom-bsc-dbg
+Package: osmocom-bsc-sccplite-dbg
 Architecture: any
 Section: debug
 Priority: extra
-Depends: osmocom-bsc (= ${binary:Version}), ${misc:Depends}
+Depends: osmocom-bsc-sccplite (= ${binary:Version}), ${misc:Depends}
 Description: Debug symbols for the OpenBSC BSC
  Make debugging possible
 
diff --git a/debian/osmocom-bsc-sccplite.examples 
b/debian/osmocom-bsc-sccplite.examples
new file mode 100644
index 000..545709b
--- /dev/null
+++ b/debian/osmocom-bsc-sccplite.examples
@@ -0,0 +1,2 @@
+openbsc/doc/examples/osmo-bsc_mgcp
+openbsc/doc/examples/osmo-bsc-sccplite
diff --git a/debian/osmocom-bsc-sccplite.install 
b/debian/osmocom-bsc-sccplite.install
new file mode 100644
index 000..9ce795c
--- /dev/null
+++ b/debian/osmocom-bsc-sccplite.install
@@ -0,0 +1,2 @@
+/usr/bin/osmo-bsc_mgcp
+/usr/bin/osmo-bsc-sccplite
diff --git a/debian/osmocom-bsc.examples b/debian/osmocom-bsc.examples
deleted file mode 100644
index a95f12b..000
--- a/debian/osmocom-bsc.examples
+++ /dev/null
@@ -1 +0,0 @@
-openbsc/doc/examples/osmo-bsc_mgcp
diff --git a/debian/osmocom-bsc.install b/debian/osmocom-bsc.install
deleted file mode 100644
index ab9459e..000
--- a/debian/osmocom-bsc.install
+++ /dev/null
@@ -1,2 +0,0 @@
-/usr/bin/osmo-bsc_mgcp
-/usr/bin/osmo-bsc
diff --git a/debian/rules b/debian/rules
index d1d74a5..05bbbef 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,7 +17,7 @@
cd openbsc && autoreconf --install --force
 
 override_dh_strip:
-   dh_strip -posmocom-bsc --dbg-package=osmocom-bsc-dbg
+   dh_strip -posmocom-bsc-sccplite --dbg-package=osmocom-bsc-sccplite-dbg
dh_strip -posmocom-nitb --dbg-package=osmocom-nitb-dbg
dh_strip -posmocom-ipaccess-utils 
--dbg-package=osmocom-ipaccess-utils-dbg
dh_strip -posmocom-bs11-utils --dbg-package=osmocom-bs11-utils-dbg
diff --git a/openbsc/.gitignore b/openbsc/.gitignore
index f54aa59..3a811e7 100644
--- a/openbsc/.gitignore
+++ b/openbsc/.gitignore
@@ -9,7 +9,7 @@
 openbsc.pc
 src/osmo-nitb/osmo-nitb
 src/osmo-bsc_mgcp/osmo-bsc_mgcp
-src/osmo-bsc/osmo-bsc
+src/osmo-bsc/osmo-bsc-sccplite
 src/utils/meas_vis
 src/utils/meas_json
 src/utils/osmo-meas-pcap2db
diff --git a/openbsc/contrib/bsc-test/msc.sh b/openbsc/contrib/bsc-test/msc.sh
index bec011d..766603d 100755
--- 

[PATCH] openbsc[master]: rename osmo-bsc to osmo-bsc-sccplite

2017-10-25 Thread Harald Welte

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

rename osmo-bsc to osmo-bsc-sccplite

This is to avoid naming conflicts with the new osmo-bsc, which resides
in its own git repository (osmo-bsc.git) and which uses libosmo-sigtran
and implements (primarily) 3GPP AoIP.

Change-Id: If10d1599b62d010726336134091a4e855c380d93
---
M debian/control
A debian/osmocom-bsc-sccplite.examples
A debian/osmocom-bsc-sccplite.install
D debian/osmocom-bsc.examples
D debian/osmocom-bsc.install
M debian/rules
M openbsc/.gitignore
M openbsc/contrib/bsc-test/msc.sh
R openbsc/contrib/systemd/osmo-bsc-sccplite.service
R openbsc/doc/examples/osmo-bsc-sccplite/osmo-bsc-sccplite.cfg
M openbsc/osmoappdesc.py
M openbsc/src/osmo-bsc/Makefile.am
M openbsc/src/osmo-bsc/osmo_bsc_main.c
M openbsc/tests/ctrl_test_runner.py
M openbsc/tests/vty_test_runner.py
15 files changed, 29 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/21/4421/1

diff --git a/debian/control b/debian/control
index 58e8966..e31d0c4 100644
--- a/debian/control
+++ b/debian/control
@@ -21,7 +21,7 @@
 Vcs-Browser: http://openbsc.osmocom.org/trac/browser
 Homepage: https://projects.osmocom.org/projects/openbsc
 
-Package: osmocom-bsc
+Package: osmocom-bsc-sccplite
 Architecture: any
 Depends: ${shlibs:Depends},
  ${misc:Depends}
@@ -40,7 +40,7 @@
 Description: GSM Network-in-a-Box, implements BSC, MSC, SMSC, HLR, VLR
  This is the Network-in-a-Box version of OpenBSC. It has all the GSM network
  components bundled together. When using osmocom-nitb, there is no need for a
- Mobile Switching Center (MSC) which is needed when using osmocom-bsc.
+ Mobile Switching Center (MSC) which is needed when using osmocom-bsc-sccplite.
 
 Package: osmocom-ipaccess-utils
 Architecture: any
@@ -64,13 +64,13 @@
 Architecture: any
 Depends: ${shlibs:Depends},
  ${misc:Depends}
-Recommends: osmocom-bsc
+Recommends: osmocom-bsc-sccplite
 Description: Osmocom Base Station Controller Network Address Translation
  This NAT is useful for masquerading multiple BSCs behind one. It listens
  for incoming BSCs on port 5000 and connects to a specified Mobile Switching
  Center (MSC).
  .
- This package is part of OpenBSC and closely related to osmocom-bsc.
+ This package is part of OpenBSC and closely related to osmocom-bsc-sccplite.
 
 Package: openbsc-dev
 Architecture: all
@@ -83,11 +83,11 @@
  The directory structure is copied after the structure in the repository
  and the header and .c file are installed into /usr/src/osmocom/openbsc/.
 
-Package: osmocom-bsc-dbg
+Package: osmocom-bsc-sccplite-dbg
 Architecture: any
 Section: debug
 Priority: extra
-Depends: osmocom-bsc (= ${binary:Version}), ${misc:Depends}
+Depends: osmocom-bsc-sccplite (= ${binary:Version}), ${misc:Depends}
 Description: Debug symbols for the OpenBSC BSC
  Make debugging possible
 
diff --git a/debian/osmocom-bsc-sccplite.examples 
b/debian/osmocom-bsc-sccplite.examples
new file mode 100644
index 000..545709b
--- /dev/null
+++ b/debian/osmocom-bsc-sccplite.examples
@@ -0,0 +1,2 @@
+openbsc/doc/examples/osmo-bsc_mgcp
+openbsc/doc/examples/osmo-bsc-sccplite
diff --git a/debian/osmocom-bsc-sccplite.install 
b/debian/osmocom-bsc-sccplite.install
new file mode 100644
index 000..9ce795c
--- /dev/null
+++ b/debian/osmocom-bsc-sccplite.install
@@ -0,0 +1,2 @@
+/usr/bin/osmo-bsc_mgcp
+/usr/bin/osmo-bsc-sccplite
diff --git a/debian/osmocom-bsc.examples b/debian/osmocom-bsc.examples
deleted file mode 100644
index a95f12b..000
--- a/debian/osmocom-bsc.examples
+++ /dev/null
@@ -1 +0,0 @@
-openbsc/doc/examples/osmo-bsc_mgcp
diff --git a/debian/osmocom-bsc.install b/debian/osmocom-bsc.install
deleted file mode 100644
index ab9459e..000
--- a/debian/osmocom-bsc.install
+++ /dev/null
@@ -1,2 +0,0 @@
-/usr/bin/osmo-bsc_mgcp
-/usr/bin/osmo-bsc
diff --git a/debian/rules b/debian/rules
index d1d74a5..05bbbef 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,7 +17,7 @@
cd openbsc && autoreconf --install --force
 
 override_dh_strip:
-   dh_strip -posmocom-bsc --dbg-package=osmocom-bsc-dbg
+   dh_strip -posmocom-bsc-sccplite --dbg-package=osmocom-bsc-sccplite-dbg
dh_strip -posmocom-nitb --dbg-package=osmocom-nitb-dbg
dh_strip -posmocom-ipaccess-utils 
--dbg-package=osmocom-ipaccess-utils-dbg
dh_strip -posmocom-bs11-utils --dbg-package=osmocom-bs11-utils-dbg
diff --git a/openbsc/.gitignore b/openbsc/.gitignore
index f54aa59..3a811e7 100644
--- a/openbsc/.gitignore
+++ b/openbsc/.gitignore
@@ -9,7 +9,7 @@
 openbsc.pc
 src/osmo-nitb/osmo-nitb
 src/osmo-bsc_mgcp/osmo-bsc_mgcp
-src/osmo-bsc/osmo-bsc
+src/osmo-bsc/osmo-bsc-sccplite
 src/utils/meas_vis
 src/utils/meas_json
 src/utils/osmo-meas-pcap2db
diff --git a/openbsc/contrib/bsc-test/msc.sh b/openbsc/contrib/bsc-test/msc.sh
index bec011d..766603d 100755
--- a/openbsc/contrib/bsc-test/msc.sh
+++ b/openbsc/contrib/bsc-test/msc.sh
@@ -2,7 +2,7 @@
 
 while true;
 do
-   echo "Kill the 

openbsc[master]: remove sgsn, gbproxy and gtphub from openbsc.git

2017-10-25 Thread Harald Welte

Patch Set 3: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If60e28b23f5cfb2c4eb354951363a2bb63f3e0de
Gerrit-PatchSet: 3
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] openbsc[master]: Fix nanobts_omlattr unit test

2017-10-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: Fix nanobts_omlattr unit test
..


Fix nanobts_omlattr unit test

The test clearly fails unless bts->network is set correctly.  Not sure
why this hasn't shown up before?

Port of osmo-bsc Change-Id I47786ed06ff610213d7a0b56d0ebf1c537cd7568

Change-Id: Id1cd4ce8f1e03b9715e1223414918bc69499e13d
---
M openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c 
b/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c
index ee138b8..fc358f5 100644
--- a/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c
+++ b/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c
@@ -200,6 +200,7 @@
gsm_bts_model_register(_model_nanobts);
bts = gsm_bts_alloc_register(net, GSM_BTS_TYPE_NANOBTS, 63);
OSMO_ASSERT(bts);
+   bts->network = net;
trx = talloc_zero(ctx, struct gsm_bts_trx);
 
/* Parameters needed by nanobts_attr_bts_get() */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id1cd4ce8f1e03b9715e1223414918bc69499e13d
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 


[MERGED] openbsc[master]: osmo-bsc: Initialize logging before initializing rate_ctr

2017-10-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: osmo-bsc: Initialize logging before initializing rate_ctr
..


osmo-bsc: Initialize logging before initializing rate_ctr

The library code for rate counter initialization, which is called
from the descendants of bsc_network_alloc() might already want to
log something (particularly after Change-Id
Ifc6ac824f5dae9a848bb4a5d067c64a69eb40b56 in libosmocore), so the
logging framework must be initialized before.

Change-Id: I1e893c97e023e63489fe8c46539b5e507d3cec8f
---
M openbsc/src/osmo-bsc/osmo_bsc_main.c
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/openbsc/src/osmo-bsc/osmo_bsc_main.c 
b/openbsc/src/osmo-bsc/osmo_bsc_main.c
index 90651b9..6081460 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_main.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_main.c
@@ -195,15 +195,15 @@
tall_bsc_ctx = talloc_named_const(NULL, 1, "openbsc");
msgb_talloc_ctx_init(tall_bsc_ctx, 0);
 
+   osmo_init_logging(_info);
+   osmo_stats_init(tall_bsc_ctx);
+
/* Allocate global gsm_network struct */
rc = bsc_network_alloc(NULL);
if (rc) {
fprintf(stderr, "Allocation failed. exiting.\n");
exit(1);
}
-
-   osmo_init_logging(_info);
-   osmo_stats_init(tall_bsc_ctx);
 
bts_init();
libosmo_abis_init(tall_bsc_ctx);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1e893c97e023e63489fe8c46539b5e507d3cec8f
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 


openbsc[master]: osmo-bsc: Initialize logging before initializing rate_ctr

2017-10-25 Thread Harald Welte

Patch Set 1: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1e893c97e023e63489fe8c46539b5e507d3cec8f
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-HasComments: No


[MERGED] openbsc[master]: nanobts_omlattra_test: Initialize logging before executing t...

2017-10-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: nanobts_omlattra_test: Initialize logging before executing tests
..


nanobts_omlattra_test: Initialize logging before executing tests

... the library code we call could want to log something, after all.

Port of osmo-bsc Change-Id Ic01e9bfb63d7b6def9432103e744c23c90f0f6b9

Change-Id: Ib4be9541771e95ca4e051b778fc3958202aab9ab
---
M openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c 
b/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c
index fc358f5..5c6e519 100644
--- a/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c
+++ b/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c
@@ -192,6 +192,9 @@
struct gsm_network *net;
struct gsm_bts_trx *trx;
 
+   osmo_init_logging(_info);
+   log_set_log_level(osmo_stderr_target, LOGL_INFO);
+
ctx = talloc_named_const(NULL, 0, "ctx");
 
/* Allocate environmental structs (bts, net, trx) */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib4be9541771e95ca4e051b778fc3958202aab9ab
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 


openbsc[master]: nanobts_omlattra_test: Initialize logging before executing t...

2017-10-25 Thread Harald Welte

Patch Set 1: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib4be9541771e95ca4e051b778fc3958202aab9ab
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-HasComments: No


openbsc[master]: Fix nanobts_omlattr unit test

2017-10-25 Thread Harald Welte

Patch Set 1: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id1cd4ce8f1e03b9715e1223414918bc69499e13d
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-HasComments: No


openbsc[master]: Fix nanobts_omlattr unit test

2017-10-25 Thread Harald Welte

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id1cd4ce8f1e03b9715e1223414918bc69499e13d
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-HasComments: No


openbsc[master]: osmo-bsc: Initialize logging before initializing rate_ctr

2017-10-25 Thread Harald Welte

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1e893c97e023e63489fe8c46539b5e507d3cec8f
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-HasComments: No


[PATCH] openbsc[master]: nanobts_omlattra_test: Initialize logging before executing t...

2017-10-25 Thread Harald Welte

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

nanobts_omlattra_test: Initialize logging before executing tests

... the library code we call could want to log something, after all.

Port of osmo-bsc Change-Id Ic01e9bfb63d7b6def9432103e744c23c90f0f6b9

Change-Id: Ib4be9541771e95ca4e051b778fc3958202aab9ab
---
M openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/19/4419/1

diff --git a/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c 
b/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c
index fc358f5..5c6e519 100644
--- a/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c
+++ b/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c
@@ -192,6 +192,9 @@
struct gsm_network *net;
struct gsm_bts_trx *trx;
 
+   osmo_init_logging(_info);
+   log_set_log_level(osmo_stderr_target, LOGL_INFO);
+
ctx = talloc_named_const(NULL, 0, "ctx");
 
/* Allocate environmental structs (bts, net, trx) */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib4be9541771e95ca4e051b778fc3958202aab9ab
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


openbsc[master]: nanobts_omlattra_test: Initialize logging before executing t...

2017-10-25 Thread Harald Welte

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib4be9541771e95ca4e051b778fc3958202aab9ab
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-HasComments: No


[PATCH] openbsc[master]: osmo-bsc: Initialize logging before initializing rate_ctr

2017-10-25 Thread Harald Welte

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

osmo-bsc: Initialize logging before initializing rate_ctr

The library code for rate counter initialization, which is called
from the descendants of bsc_network_alloc() might already want to
log something (particularly after Change-Id
Ifc6ac824f5dae9a848bb4a5d067c64a69eb40b56 in libosmocore), so the
logging framework must be initialized before.

Change-Id: I1e893c97e023e63489fe8c46539b5e507d3cec8f
---
M openbsc/src/osmo-bsc/osmo_bsc_main.c
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/20/4420/1

diff --git a/openbsc/src/osmo-bsc/osmo_bsc_main.c 
b/openbsc/src/osmo-bsc/osmo_bsc_main.c
index 90651b9..6081460 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_main.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_main.c
@@ -195,15 +195,15 @@
tall_bsc_ctx = talloc_named_const(NULL, 1, "openbsc");
msgb_talloc_ctx_init(tall_bsc_ctx, 0);
 
+   osmo_init_logging(_info);
+   osmo_stats_init(tall_bsc_ctx);
+
/* Allocate global gsm_network struct */
rc = bsc_network_alloc(NULL);
if (rc) {
fprintf(stderr, "Allocation failed. exiting.\n");
exit(1);
}
-
-   osmo_init_logging(_info);
-   osmo_stats_init(tall_bsc_ctx);
 
bts_init();
libosmo_abis_init(tall_bsc_ctx);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e893c97e023e63489fe8c46539b5e507d3cec8f
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[PATCH] openbsc[master]: Fix nanobts_omlattr unit test

2017-10-25 Thread Harald Welte

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

Fix nanobts_omlattr unit test

The test clearly fails unless bts->network is set correctly.  Not sure
why this hasn't shown up before?

Port of osmo-bsc Change-Id I47786ed06ff610213d7a0b56d0ebf1c537cd7568

Change-Id: Id1cd4ce8f1e03b9715e1223414918bc69499e13d
---
M openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/18/4418/1

diff --git a/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c 
b/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c
index ee138b8..fc358f5 100644
--- a/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c
+++ b/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c
@@ -200,6 +200,7 @@
gsm_bts_model_register(_model_nanobts);
bts = gsm_bts_alloc_register(net, GSM_BTS_TYPE_NANOBTS, 63);
OSMO_ASSERT(bts);
+   bts->network = net;
trx = talloc_zero(ctx, struct gsm_bts_trx);
 
/* Parameters needed by nanobts_attr_bts_get() */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id1cd4ce8f1e03b9715e1223414918bc69499e13d
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[PATCH] openbsc[master]: remove sgsn, gbproxy and gtphub from openbsc.git

2017-10-25 Thread Harald Welte
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/4417

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

remove sgsn, gbproxy and gtphub from openbsc.git

The GPRS related programs osmo-sgsn, osmo-gtphub and osmo-gbproxy
have been split off into the separate osmo-sgsn repository, which
can be found at
git://git.osmocom.org/osmo-sgsn.git
http://git.osmocom.org/osmo-sgsn/

This is technically unrelated but conceptually part of the larger
NITB-split activities.

I did a brief log of all changes in src/gprs and couldn't find any
commits that we might have applied here but which are missing from
osmo-sgsn.git.

Change-Id: If60e28b23f5cfb2c4eb354951363a2bb63f3e0de
---
M debian/control
D debian/osmo-gtphub.default
D debian/osmo-gtphub.examples
D debian/osmo-gtphub.init
D debian/osmo-gtphub.install
D debian/osmocom-gbproxy.init
D debian/osmocom-gbproxy.install
D debian/osmocom-sgsn.default
D debian/osmocom-sgsn.examples
D debian/osmocom-sgsn.init
D debian/osmocom-sgsn.install
M debian/rules
M openbsc/.gitignore
M openbsc/configure.ac
D openbsc/contrib/gprs/gb-proxy-unblock-bug.py
D openbsc/contrib/gprs/gprs-bssgp-histogram.lua
D openbsc/contrib/gprs/gprs-buffer-count.lua
D openbsc/contrib/gprs/gprs-split-trace-by-tlli.lua
D openbsc/contrib/gprs/gprs-verify-nu.lua
D openbsc/contrib/systemd/osmo-gbproxy.service
D openbsc/contrib/systemd/osmo-sgsn.service
D openbsc/doc/examples/osmo-gbproxy/osmo-gbproxy-legacy.cfg
D openbsc/doc/examples/osmo-gbproxy/osmo-gbproxy.cfg
D openbsc/doc/examples/osmo-gtphub/gtphub-example.txt
D openbsc/doc/examples/osmo-gtphub/osmo-gtphub-1iface.cfg
D openbsc/doc/examples/osmo-gtphub/osmo-gtphub.cfg
D openbsc/doc/examples/osmo-sgsn/osmo-sgsn.cfg
M openbsc/include/openbsc/Makefile.am
D openbsc/include/openbsc/crc24.h
D openbsc/include/openbsc/gb_proxy.h
D openbsc/include/openbsc/gprs_gb_parse.h
D openbsc/include/openbsc/gprs_gmm.h
D openbsc/include/openbsc/gprs_llc.h
D openbsc/include/openbsc/gprs_llc_xid.h
D openbsc/include/openbsc/gprs_sgsn.h
D openbsc/include/openbsc/gprs_sndcp.h
D openbsc/include/openbsc/gprs_sndcp_comp.h
D openbsc/include/openbsc/gprs_sndcp_dcomp.h
D openbsc/include/openbsc/gprs_sndcp_pcomp.h
D openbsc/include/openbsc/gprs_sndcp_xid.h
D openbsc/include/openbsc/gprs_subscriber.h
D openbsc/include/openbsc/gprs_utils.h
M openbsc/include/openbsc/gsm_subscriber.h
D openbsc/include/openbsc/gtphub.h
D openbsc/include/openbsc/sgsn.h
M openbsc/include/openbsc/signal.h
D openbsc/include/openbsc/slhc.h
D openbsc/include/openbsc/v42bis.h
D openbsc/include/openbsc/v42bis_private.h
M openbsc/osmoappdesc.py
M openbsc/src/Makefile.am
D openbsc/src/gprs/.gitignore
D openbsc/src/gprs/Makefile.am
D openbsc/src/gprs/crc24.c
D openbsc/src/gprs/gb_proxy.c
D openbsc/src/gprs/gb_proxy_main.c
D openbsc/src/gprs/gb_proxy_patch.c
D openbsc/src/gprs/gb_proxy_peer.c
D openbsc/src/gprs/gb_proxy_tlli.c
D openbsc/src/gprs/gb_proxy_vty.c
D openbsc/src/gprs/gprs_gb_parse.c
D openbsc/src/gprs/gprs_gmm.c
D openbsc/src/gprs/gprs_llc.c
D openbsc/src/gprs/gprs_llc_parse.c
D openbsc/src/gprs/gprs_llc_vty.c
D openbsc/src/gprs/gprs_llc_xid.c
D openbsc/src/gprs/gprs_sgsn.c
D openbsc/src/gprs/gprs_sndcp.c
D openbsc/src/gprs/gprs_sndcp_comp.c
D openbsc/src/gprs/gprs_sndcp_dcomp.c
D openbsc/src/gprs/gprs_sndcp_pcomp.c
D openbsc/src/gprs/gprs_sndcp_vty.c
D openbsc/src/gprs/gprs_sndcp_xid.c
D openbsc/src/gprs/gprs_subscriber.c
D openbsc/src/gprs/gprs_utils.c
D openbsc/src/gprs/gtphub.c
D openbsc/src/gprs/gtphub_ares.c
D openbsc/src/gprs/gtphub_main.c
D openbsc/src/gprs/gtphub_sock.c
D openbsc/src/gprs/gtphub_vty.c
D openbsc/src/gprs/osmo_sgsn.cfg
D openbsc/src/gprs/sgsn_ares.c
D openbsc/src/gprs/sgsn_auth.c
D openbsc/src/gprs/sgsn_cdr.c
D openbsc/src/gprs/sgsn_ctrl.c
D openbsc/src/gprs/sgsn_libgtp.c
D openbsc/src/gprs/sgsn_main.c
D openbsc/src/gprs/sgsn_vty.c
D openbsc/src/gprs/slhc.c
D openbsc/src/gprs/v42bis.c
M openbsc/tests/Makefile.am
M openbsc/tests/atlocal.in
M openbsc/tests/ctrl_test_runner.py
D openbsc/tests/gbproxy/Makefile.am
D openbsc/tests/gbproxy/gbproxy_test.c
D openbsc/tests/gbproxy/gbproxy_test.ok
D openbsc/tests/gprs/Makefile.am
D openbsc/tests/gprs/gprs_test.c
D openbsc/tests/gprs/gprs_test.ok
D openbsc/tests/gtphub/Makefile.am
D openbsc/tests/gtphub/gtphub_test.c
D openbsc/tests/gtphub/gtphub_test.ok
M openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c
D openbsc/tests/oap/Makefile.am
D openbsc/tests/oap/oap_client_test.c
D openbsc/tests/oap/oap_client_test.err
D openbsc/tests/oap/oap_client_test.ok
D openbsc/tests/sgsn/Makefile.am
D openbsc/tests/sgsn/sgsn_test.c
D openbsc/tests/sgsn/sgsn_test.ok
D openbsc/tests/slhc/Makefile.am
D openbsc/tests/slhc/slhc_test.c
D openbsc/tests/slhc/slhc_test.ok
D openbsc/tests/sndcp_xid/Makefile.am
D openbsc/tests/sndcp_xid/sndcp_xid_test.c
D openbsc/tests/sndcp_xid/sndcp_xid_test.ok
M openbsc/tests/testsuite.at
D openbsc/tests/v42bis/Makefile.am
D openbsc/tests/v42bis/v42bis_test.c
D 

[PATCH] openbsc[master]: remove sgsn, gbproxy and gtphub from openbsc.git

2017-10-25 Thread Harald Welte

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

remove sgsn, gbproxy and gtphub from openbsc.git

The GPRS related programs osmo-sgsn, osmo-gtphub and osmo-gbproxy
have been split off into the separate osmo-sgsn repository, which
can be found at
git://git.osmocom.org/osmo-sgsn.git
http://git.osmocom.org/osmo-sgsn/

This is technically unrelated but conceptually part of the larger
NITB-split activities.

I did a brief log of all changes in src/gprs and couldn't find any
commits that we might have applied here but which are missing from
osmo-sgsn.git.

Change-Id: If60e28b23f5cfb2c4eb354951363a2bb63f3e0de
---
M debian/control
D debian/osmo-gtphub.default
D debian/osmo-gtphub.examples
D debian/osmo-gtphub.init
D debian/osmo-gtphub.install
D debian/osmocom-gbproxy.init
D debian/osmocom-gbproxy.install
D debian/osmocom-sgsn.default
D debian/osmocom-sgsn.examples
D debian/osmocom-sgsn.init
D debian/osmocom-sgsn.install
M debian/rules
M openbsc/configure.ac
M openbsc/src/Makefile.am
D openbsc/src/gprs/.gitignore
D openbsc/src/gprs/Makefile.am
D openbsc/src/gprs/crc24.c
D openbsc/src/gprs/gb_proxy.c
D openbsc/src/gprs/gb_proxy_main.c
D openbsc/src/gprs/gb_proxy_patch.c
D openbsc/src/gprs/gb_proxy_peer.c
D openbsc/src/gprs/gb_proxy_tlli.c
D openbsc/src/gprs/gb_proxy_vty.c
D openbsc/src/gprs/gprs_gb_parse.c
D openbsc/src/gprs/gprs_gmm.c
D openbsc/src/gprs/gprs_llc.c
D openbsc/src/gprs/gprs_llc_parse.c
D openbsc/src/gprs/gprs_llc_vty.c
D openbsc/src/gprs/gprs_llc_xid.c
D openbsc/src/gprs/gprs_sgsn.c
D openbsc/src/gprs/gprs_sndcp.c
D openbsc/src/gprs/gprs_sndcp_comp.c
D openbsc/src/gprs/gprs_sndcp_dcomp.c
D openbsc/src/gprs/gprs_sndcp_pcomp.c
D openbsc/src/gprs/gprs_sndcp_vty.c
D openbsc/src/gprs/gprs_sndcp_xid.c
D openbsc/src/gprs/gprs_subscriber.c
D openbsc/src/gprs/gprs_utils.c
D openbsc/src/gprs/gtphub.c
D openbsc/src/gprs/gtphub_ares.c
D openbsc/src/gprs/gtphub_main.c
D openbsc/src/gprs/gtphub_sock.c
D openbsc/src/gprs/gtphub_vty.c
D openbsc/src/gprs/osmo_sgsn.cfg
D openbsc/src/gprs/sgsn_ares.c
D openbsc/src/gprs/sgsn_auth.c
D openbsc/src/gprs/sgsn_cdr.c
D openbsc/src/gprs/sgsn_ctrl.c
D openbsc/src/gprs/sgsn_libgtp.c
D openbsc/src/gprs/sgsn_main.c
D openbsc/src/gprs/sgsn_vty.c
D openbsc/src/gprs/slhc.c
D openbsc/src/gprs/v42bis.c
M openbsc/tests/Makefile.am
D openbsc/tests/gbproxy/Makefile.am
D openbsc/tests/gbproxy/gbproxy_test.c
D openbsc/tests/gbproxy/gbproxy_test.ok
D openbsc/tests/gprs/Makefile.am
D openbsc/tests/gprs/gprs_test.c
D openbsc/tests/gprs/gprs_test.ok
D openbsc/tests/gtphub/Makefile.am
D openbsc/tests/gtphub/gtphub_test.c
D openbsc/tests/gtphub/gtphub_test.ok
D openbsc/tests/oap/Makefile.am
D openbsc/tests/oap/oap_client_test.c
D openbsc/tests/oap/oap_client_test.err
D openbsc/tests/oap/oap_client_test.ok
D openbsc/tests/sgsn/Makefile.am
D openbsc/tests/sgsn/sgsn_test.c
D openbsc/tests/sgsn/sgsn_test.ok
D openbsc/tests/slhc/Makefile.am
D openbsc/tests/slhc/slhc_test.c
D openbsc/tests/slhc/slhc_test.ok
D openbsc/tests/sndcp_xid/Makefile.am
D openbsc/tests/sndcp_xid/sndcp_xid_test.c
D openbsc/tests/sndcp_xid/sndcp_xid_test.ok
M openbsc/tests/testsuite.at
D openbsc/tests/v42bis/Makefile.am
D openbsc/tests/v42bis/v42bis_test.c
D openbsc/tests/v42bis/v42bis_test.ok
D openbsc/tests/xid/Makefile.am
D openbsc/tests/xid/xid_test.c
D openbsc/tests/xid/xid_test.ok
83 files changed, 0 insertions(+), 45,004 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/17/4417/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If60e28b23f5cfb2c4eb354951363a2bb63f3e0de
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


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

2017-10-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/i586

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

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

Last lines of build log:
[  189s] 
[  189s] Makefile:758: recipe for target 'check-local' failed
[  189s] make[5]: *** [check-local] Error 1
[  189s] make[5]: Leaving directory '/usr/src/packages/BUILD/openbsc/tests'
[  189s] Makefile:608: recipe for target 'check-am' failed
[  189s] make[4]: *** [check-am] Error 2
[  189s] make[4]: Leaving directory '/usr/src/packages/BUILD/openbsc/tests'
[  189s] Makefile:460: recipe for target 'check-recursive' failed
[  189s] make[3]: *** [check-recursive] Error 1
[  189s] make[3]: Leaving directory '/usr/src/packages/BUILD/openbsc/tests'
[  189s] Makefile:527: recipe for target 'check-recursive' failed
[  189s] make[2]: *** [check-recursive] Error 1
[  189s] make[2]: Leaving directory '/usr/src/packages/BUILD/openbsc'
[  189s] Makefile:818: recipe for target 'check' failed
[  189s] make[1]: *** [check] Error 2
[  189s] make[1]: Leaving directory '/usr/src/packages/BUILD/openbsc'
[  189s] dh_auto_test: make -j1 check VERBOSE=1 returned exit code 2
[  189s] debian/rules:13: recipe for target 'build' failed
[  189s] make: *** [build] Error 2
[  189s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  189s] 
[  189s] lamb13 failed "build openbsc_0.15.1.20171025.dsc" at Wed Oct 25 
20:09:23 UTC 2017.
[  189s] 
[  189s] ### VM INTERACTION START ###
[  192s] [  184.312622] reboot: Power down
[  192s] ### VM INTERACTION END ###
[  192s] 
[  192s] lamb13 failed "build openbsc_0.15.1.20171025.dsc" at Wed Oct 25 
20:09:27 UTC 2017.
[  192s] 

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


Build failure of network:osmocom:nightly/openbsc in Debian_8.0/x86_64

2017-10-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_8.0/x86_64

Package network:osmocom:nightly/openbsc failed to build in Debian_8.0/x86_64

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

Last lines of build log:
[  270s] Makefile:745: recipe for target 'check-local' failed
[  270s] make[5]: *** [check-local] Error 1
[  270s] make[5]: Leaving directory '/usr/src/packages/BUILD/openbsc/tests'
[  270s] Makefile:597: recipe for target 'check-am' failed
[  270s] make[4]: *** [check-am] Error 2
[  270s] make[4]: Leaving directory '/usr/src/packages/BUILD/openbsc/tests'
[  270s] Makefile:449: recipe for target 'check-recursive' failed
[  270s] make[3]: *** [check-recursive] Error 1
[  270s] make[3]: Leaving directory '/usr/src/packages/BUILD/openbsc/tests'
[  270s] Makefile:516: recipe for target 'check-recursive' failed
[  270s] make[2]: *** [check-recursive] Error 1
[  270s] make[2]: Leaving directory '/usr/src/packages/BUILD/openbsc'
[  270s] Makefile:807: recipe for target 'check' failed
[  270s] make[1]: *** [check] Error 2
[  270s] make[1]: Leaving directory '/usr/src/packages/BUILD/openbsc'
[  270s] dh_auto_test: make -j1 check returned exit code 2
[  270s] debian/rules:13: recipe for target 'build' failed
[  270s] make: *** [build] Error 2
[  270s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  270s] 
[  270s] build79 failed "build openbsc_0.15.1.20171025.dsc" at Wed Oct 25 
20:09:41 UTC 2017.
[  270s] 
[  270s] ### VM INTERACTION START ###
[  271s] Powering off.
[  271s] [  242.430095] reboot: Power down
[  272s] ### VM INTERACTION END ###
[  272s] 
[  272s] build79 failed "build openbsc_0.15.1.20171025.dsc" at Wed Oct 25 
20:09:43 UTC 2017.
[  272s] 

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


Build failure of network:osmocom:nightly/openbsc in xUbuntu_17.04/i586

2017-10-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_17.04/i586

Package network:osmocom:nightly/openbsc failed to build in xUbuntu_17.04/i586

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

Last lines of build log:
[  177s] 
[  177s] Makefile:758: recipe for target 'check-local' failed
[  177s] make[5]: *** [check-local] Error 1
[  177s] make[5]: Leaving directory '/usr/src/packages/BUILD/openbsc/tests'
[  177s] Makefile:608: recipe for target 'check-am' failed
[  177s] make[4]: *** [check-am] Error 2
[  177s] make[4]: Leaving directory '/usr/src/packages/BUILD/openbsc/tests'
[  177s] Makefile:460: recipe for target 'check-recursive' failed
[  177s] make[3]: *** [check-recursive] Error 1
[  177s] make[3]: Leaving directory '/usr/src/packages/BUILD/openbsc/tests'
[  177s] Makefile:527: recipe for target 'check-recursive' failed
[  177s] make[2]: *** [check-recursive] Error 1
[  177s] make[2]: Leaving directory '/usr/src/packages/BUILD/openbsc'
[  177s] Makefile:818: recipe for target 'check' failed
[  177s] make[1]: *** [check] Error 2
[  177s] make[1]: Leaving directory '/usr/src/packages/BUILD/openbsc'
[  177s] dh_auto_test: make -j1 check VERBOSE=1 returned exit code 2
[  177s] debian/rules:13: recipe for target 'build' failed
[  177s] make: *** [build] Error 2
[  177s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  177s] 
[  177s] build85 failed "build openbsc_0.15.1.20171025.dsc" at Wed Oct 25 
20:08:29 UTC 2017.
[  177s] 
[  177s] ### VM INTERACTION START ###
[  181s] [  172.576295] reboot: Power down
[  181s] ### VM INTERACTION END ###
[  181s] 
[  181s] build85 failed "build openbsc_0.15.1.20171025.dsc" at Wed Oct 25 
20:08:33 UTC 2017.
[  181s] 

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


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

2017-10-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/x86_64

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

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

Last lines of build log:
[  164s] 
[  164s] Makefile:758: recipe for target 'check-local' failed
[  164s] make[5]: *** [check-local] Error 1
[  164s] make[5]: Leaving directory '/usr/src/packages/BUILD/openbsc/tests'
[  164s] Makefile:608: recipe for target 'check-am' failed
[  164s] make[4]: *** [check-am] Error 2
[  164s] make[4]: Leaving directory '/usr/src/packages/BUILD/openbsc/tests'
[  164s] Makefile:460: recipe for target 'check-recursive' failed
[  164s] make[3]: *** [check-recursive] Error 1
[  164s] make[3]: Leaving directory '/usr/src/packages/BUILD/openbsc/tests'
[  164s] Makefile:527: recipe for target 'check-recursive' failed
[  164s] make[2]: *** [check-recursive] Error 1
[  164s] make[2]: Leaving directory '/usr/src/packages/BUILD/openbsc'
[  164s] Makefile:818: recipe for target 'check' failed
[  164s] make[1]: *** [check] Error 2
[  164s] make[1]: Leaving directory '/usr/src/packages/BUILD/openbsc'
[  164s] dh_auto_test: make -j1 check VERBOSE=1 returned exit code 2
[  164s] debian/rules:13: recipe for target 'build' failed
[  164s] make: *** [build] Error 2
[  164s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  165s] 
[  165s] build70 failed "build openbsc_0.15.1.20171025.dsc" at Wed Oct 25 
20:09:18 UTC 2017.
[  165s] 
[  165s] ### VM INTERACTION START ###
[  168s] [  159.653446] reboot: Power down
[  168s] ### VM INTERACTION END ###
[  168s] 
[  168s] build70 failed "build openbsc_0.15.1.20171025.dsc" at Wed Oct 25 
20:09:22 UTC 2017.
[  168s] 

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


Build failure of network:osmocom:nightly/openbsc in xUbuntu_16.04/x86_64

2017-10-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_16.04/x86_64

Package network:osmocom:nightly/openbsc failed to build in xUbuntu_16.04/x86_64

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

Last lines of build log:
[  173s] 
[  173s] Makefile:758: recipe for target 'check-local' failed
[  173s] make[5]: *** [check-local] Error 1
[  173s] make[5]: Leaving directory '/usr/src/packages/BUILD/openbsc/tests'
[  173s] Makefile:608: recipe for target 'check-am' failed
[  173s] make[4]: *** [check-am] Error 2
[  173s] make[4]: Leaving directory '/usr/src/packages/BUILD/openbsc/tests'
[  173s] Makefile:460: recipe for target 'check-recursive' failed
[  173s] make[3]: *** [check-recursive] Error 1
[  173s] make[3]: Leaving directory '/usr/src/packages/BUILD/openbsc/tests'
[  173s] Makefile:527: recipe for target 'check-recursive' failed
[  173s] make[2]: *** [check-recursive] Error 1
[  173s] make[2]: Leaving directory '/usr/src/packages/BUILD/openbsc'
[  173s] Makefile:818: recipe for target 'check' failed
[  173s] make[1]: *** [check] Error 2
[  173s] make[1]: Leaving directory '/usr/src/packages/BUILD/openbsc'
[  173s] dh_auto_test: make -j1 check returned exit code 2
[  173s] debian/rules:13: recipe for target 'build' failed
[  173s] make: *** [build] Error 2
[  173s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  173s] 
[  173s] lamb15 failed "build openbsc_0.15.1.20171025.dsc" at Wed Oct 25 
20:07:04 UTC 2017.
[  173s] 
[  173s] ### VM INTERACTION START ###
[  176s] [  169.640727] reboot: Power down
[  176s] ### VM INTERACTION END ###
[  176s] 
[  176s] lamb15 failed "build openbsc_0.15.1.20171025.dsc" at Wed Oct 25 
20:07:07 UTC 2017.
[  176s] 

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


Build failure of network:osmocom:nightly/openbsc in xUbuntu_17.04/x86_64

2017-10-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_17.04/x86_64

Package network:osmocom:nightly/openbsc failed to build in xUbuntu_17.04/x86_64

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

Last lines of build log:
[  234s] You may investigate any problem if you feel able to do so, in which
[  234s] case the test suite provides a good starting point.  Its output may
[  234s] be found below `tests/testsuite.dir'.
[  234s] 
[  234s] Makefile:758: recipe for target 'check-local' failed
[  234s] make[5]: *** [check-local] Error 1
[  234s] make[5]: Leaving directory '/usr/src/packages/BUILD/openbsc/tests'
[  234s] Makefile:608: recipe for target 'check-am' failed
[  234s] make[4]: *** [check-am] Error 2
[  234s] make[4]: Leaving directory '/usr/src/packages/BUILD/openbsc/tests'
[  234s] Makefile:460: recipe for target 'check-recursive' failed
[  234s] make[3]: *** [check-recursive] Error 1
[  234s] make[3]: Leaving directory '/usr/src/packages/BUILD/openbsc/tests'
[  234s] Makefile:527: recipe for target 'check-recursive' failed
[  234s] make[2]: *** [check-recursive] Error 1
[  234s] make[2]: Leaving directory '/usr/src/packages/BUILD/openbsc'
[  234s] Makefile:818: recipe for target 'check' failed
[  234s] make[1]: *** [check] Error 2
[  234s] make[1]: Leaving directory '/usr/src/packages/BUILD/openbsc'
[  234s] dh_auto_test: make -j1 check VERBOSE=1 returned exit code 2
[  234s] debian/rules:13: recipe for target 'build' failed
[  234s] make: *** [build] Error 2
[  234s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  234s] 
[  234s] cloud113 failed "build openbsc_0.15.1.20171025.dsc" at Wed Oct 25 
20:06:38 UTC 2017.
[  234s] 
[  234s] ### VM INTERACTION START ###
[  237s] [  215.166726] reboot: Power down
[  238s] ### VM INTERACTION END ###

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


Build failure of network:osmocom:nightly/osmo-pcu in Debian_8.0/i586

2017-10-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_8.0/i586

Package network:osmocom:nightly/osmo-pcu failed to build in Debian_8.0/i586

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

Last lines of build log:
[  229s]Subject: [osmo-pcu 0.3.0.20171025] testsuite: 2 3 5 6 7 8 11 failed
[  229s] 
[  229s] You may investigate any problem if you feel able to do so, in which
[  229s] case the test suite provides a good starting point.  Its output may
[  229s] be found below `tests/testsuite.dir'.
[  229s] 
[  229s] Makefile:1208: recipe for target 'check-local' failed
[  229s] make[3]: *** [check-local] Error 1
[  229s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests'
[  229s] Makefile:1044: recipe for target 'check-am' failed
[  229s] make[2]: *** [check-am] Error 2
[  229s] make[2]: Leaving directory '/usr/src/packages/BUILD/tests'
[  229s] Makefile:448: recipe for target 'check-recursive' failed
[  229s] make[1]: *** [check-recursive] Error 1
[  229s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  229s] dh_auto_test: make -j1 check returned exit code 2
[  229s] debian/rules:12: recipe for target 'build' failed
[  229s] make: *** [build] Error 2
[  229s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  229s] 
[  229s] cloud109 failed "build osmo-pcu_0.3.0.20171025.dsc" at Wed Oct 25 
20:01:59 UTC 2017.
[  229s] 
[  229s] ### VM INTERACTION START ###
[  230s] Powering off.
[  230s] [  213.147456] reboot: Power down
[  232s] ### VM INTERACTION END ###
[  232s] 
[  232s] cloud109 failed "build osmo-pcu_0.3.0.20171025.dsc" at Wed Oct 25 
20:02:02 UTC 2017.
[  232s] 

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


Build failure of network:osmocom:nightly/osmo-pcu in Debian_8.0/x86_64

2017-10-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_8.0/x86_64

Package network:osmocom:nightly/osmo-pcu failed to build in Debian_8.0/x86_64

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

Last lines of build log:
[  177s]Subject: [osmo-pcu 0.3.0.20171025] testsuite: 2 3 5 6 7 8 11 failed
[  177s] 
[  177s] You may investigate any problem if you feel able to do so, in which
[  177s] case the test suite provides a good starting point.  Its output may
[  177s] be found below `tests/testsuite.dir'.
[  177s] 
[  177s] Makefile:1208: recipe for target 'check-local' failed
[  177s] make[3]: *** [check-local] Error 1
[  177s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests'
[  177s] Makefile:1044: recipe for target 'check-am' failed
[  177s] make[2]: *** [check-am] Error 2
[  177s] make[2]: Leaving directory '/usr/src/packages/BUILD/tests'
[  177s] Makefile:448: recipe for target 'check-recursive' failed
[  177s] make[1]: *** [check-recursive] Error 1
[  177s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  177s] dh_auto_test: make -j1 check returned exit code 2
[  177s] debian/rules:12: recipe for target 'build' failed
[  177s] make: *** [build] Error 2
[  177s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  177s] 
[  177s] lamb07 failed "build osmo-pcu_0.3.0.20171025.dsc" at Wed Oct 25 
20:00:37 UTC 2017.
[  177s] 
[  177s] ### VM INTERACTION START ###
[  178s] Powering off.
[  178s] [  170.236575] reboot: Power down
[  178s] ### VM INTERACTION END ###
[  178s] 
[  178s] lamb07 failed "build osmo-pcu_0.3.0.20171025.dsc" at Wed Oct 25 
20:00:38 UTC 2017.
[  178s] 

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


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

2017-10-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_9.0/i586

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

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

Last lines of build log:
[  160s]To: 
[  160s]Subject: [osmo-pcu 0.3.0.20171025] testsuite: 2 3 5 6 7 8 11 failed
[  160s] 
[  160s] You may investigate any problem if you feel able to do so, in which
[  160s] case the test suite provides a good starting point.  Its output may
[  160s] be found below `tests/testsuite.dir'.
[  160s] 
[  160s] Makefile:1221: recipe for target 'check-local' failed
[  160s] make[3]: *** [check-local] Error 1
[  160s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests'
[  160s] Makefile:1055: recipe for target 'check-am' failed
[  160s] make[2]: *** [check-am] Error 2
[  160s] make[2]: Leaving directory '/usr/src/packages/BUILD/tests'
[  160s] Makefile:460: recipe for target 'check-recursive' failed
[  160s] make[1]: *** [check-recursive] Error 1
[  160s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  160s] dh_auto_test: make -j1 check VERBOSE=1 returned exit code 2
[  160s] debian/rules:12: recipe for target 'build' failed
[  160s] make: *** [build] Error 2
[  160s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  160s] 
[  160s] lamb05 failed "build osmo-pcu_0.3.0.20171025.dsc" at Wed Oct 25 
20:00:07 UTC 2017.
[  160s] 
[  160s] ### VM INTERACTION START ###
[  163s] [  155.917171] reboot: Power down
[  163s] ### VM INTERACTION END ###
[  163s] 
[  163s] lamb05 failed "build osmo-pcu_0.3.0.20171025.dsc" at Wed Oct 25 
20:00:10 UTC 2017.
[  163s] 

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


Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_16.04/i586

2017-10-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_16.04/i586

Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_16.04/i586

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

Last lines of build log:
[  289s]To: 
[  289s]Subject: [osmo-pcu 0.3.0.20171025] testsuite: 2 3 5 6 7 8 11 failed
[  289s] 
[  289s] You may investigate any problem if you feel able to do so, in which
[  289s] case the test suite provides a good starting point.  Its output may
[  289s] be found below `tests/testsuite.dir'.
[  289s] 
[  289s] Makefile:1221: recipe for target 'check-local' failed
[  289s] make[3]: *** [check-local] Error 1
[  289s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests'
[  289s] Makefile:1055: recipe for target 'check-am' failed
[  289s] make[2]: *** [check-am] Error 2
[  289s] make[2]: Leaving directory '/usr/src/packages/BUILD/tests'
[  289s] Makefile:460: recipe for target 'check-recursive' failed
[  289s] make[1]: *** [check-recursive] Error 1
[  289s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  289s] dh_auto_test: make -j1 check returned exit code 2
[  289s] debian/rules:12: recipe for target 'build' failed
[  289s] make: *** [build] Error 2
[  289s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  289s] 
[  289s] lamb21 failed "build osmo-pcu_0.3.0.20171025.dsc" at Wed Oct 25 
20:00:48 UTC 2017.
[  289s] 
[  289s] ### VM INTERACTION START ###
[  292s] [  279.001288] reboot: Power down
[  292s] ### VM INTERACTION END ###
[  292s] 
[  292s] lamb21 failed "build osmo-pcu_0.3.0.20171025.dsc" at Wed Oct 25 
20:00:52 UTC 2017.
[  292s] 

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


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

2017-10-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_9.0/x86_64

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

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

Last lines of build log:
[  161s]To: 
[  161s]Subject: [osmo-pcu 0.3.0.20171025] testsuite: 2 3 5 6 7 8 11 failed
[  161s] 
[  161s] You may investigate any problem if you feel able to do so, in which
[  161s] case the test suite provides a good starting point.  Its output may
[  161s] be found below `tests/testsuite.dir'.
[  161s] 
[  161s] Makefile:1221: recipe for target 'check-local' failed
[  161s] make[3]: *** [check-local] Error 1
[  161s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests'
[  161s] Makefile:1055: recipe for target 'check-am' failed
[  161s] make[2]: *** [check-am] Error 2
[  161s] make[2]: Leaving directory '/usr/src/packages/BUILD/tests'
[  161s] Makefile:460: recipe for target 'check-recursive' failed
[  161s] make[1]: *** [check-recursive] Error 1
[  161s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  161s] dh_auto_test: make -j1 check VERBOSE=1 returned exit code 2
[  161s] debian/rules:12: recipe for target 'build' failed
[  161s] make: *** [build] Error 2
[  161s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  161s] 
[  161s] lamb27 failed "build osmo-pcu_0.3.0.20171025.dsc" at Wed Oct 25 
20:00:37 UTC 2017.
[  161s] 
[  161s] ### VM INTERACTION START ###
[  164s] [  156.717959] sysrq: SysRq : [  156.732987] reboot: Power down
[  164s] ### VM INTERACTION END ###
[  164s] 
[  164s] lamb27 failed "build osmo-pcu_0.3.0.20171025.dsc" at Wed Oct 25 
20:00:40 UTC 2017.
[  164s] 

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


Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_16.10/i586

2017-10-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_16.10/i586

Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_16.10/i586

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

Last lines of build log:
[  150s]To: 
[  150s]Subject: [osmo-pcu 0.3.0.20171025] testsuite: 2 3 5 6 7 8 11 failed
[  150s] 
[  150s] You may investigate any problem if you feel able to do so, in which
[  150s] case the test suite provides a good starting point.  Its output may
[  150s] be found below `tests/testsuite.dir'.
[  150s] 
[  150s] Makefile:1221: recipe for target 'check-local' failed
[  150s] make[3]: *** [check-local] Error 1
[  150s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests'
[  150s] Makefile:1055: recipe for target 'check-am' failed
[  150s] make[2]: *** [check-am] Error 2
[  150s] make[2]: Leaving directory '/usr/src/packages/BUILD/tests'
[  150s] Makefile:460: recipe for target 'check-recursive' failed
[  150s] make[1]: *** [check-recursive] Error 1
[  150s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  150s] dh_auto_test: make -j1 check VERBOSE=1 returned exit code 2
[  150s] debian/rules:12: recipe for target 'build' failed
[  150s] make: *** [build] Error 2
[  150s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  151s] 
[  151s] lamb05 failed "build osmo-pcu_0.3.0.20171025.dsc" at Wed Oct 25 
19:58:06 UTC 2017.
[  151s] 
[  151s] ### VM INTERACTION START ###
[  154s] [  146.571811] reboot: Power down
[  154s] ### VM INTERACTION END ###
[  154s] 
[  154s] lamb05 failed "build osmo-pcu_0.3.0.20171025.dsc" at Wed Oct 25 
19:58:09 UTC 2017.
[  154s] 

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


Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_16.04/x86_64

2017-10-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_16.04/x86_64

Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_16.04/x86_64

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

Last lines of build log:
[  149s]To: 
[  149s]Subject: [osmo-pcu 0.3.0.20171025] testsuite: 2 3 5 6 7 8 11 failed
[  149s] 
[  149s] You may investigate any problem if you feel able to do so, in which
[  149s] case the test suite provides a good starting point.  Its output may
[  149s] be found below `tests/testsuite.dir'.
[  149s] 
[  149s] Makefile:1221: recipe for target 'check-local' failed
[  149s] make[3]: *** [check-local] Error 1
[  149s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests'
[  149s] Makefile:1055: recipe for target 'check-am' failed
[  149s] make[2]: *** [check-am] Error 2
[  149s] make[2]: Leaving directory '/usr/src/packages/BUILD/tests'
[  149s] Makefile:460: recipe for target 'check-recursive' failed
[  149s] make[1]: *** [check-recursive] Error 1
[  149s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  149s] dh_auto_test: make -j1 check returned exit code 2
[  149s] debian/rules:12: recipe for target 'build' failed
[  149s] make: *** [build] Error 2
[  149s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  149s] 
[  149s] lamb70 failed "build osmo-pcu_0.3.0.20171025.dsc" at Wed Oct 25 
19:57:23 UTC 2017.
[  149s] 
[  149s] ### VM INTERACTION START ###
[  152s] [  145.038853] reboot: Power down
[  152s] ### VM INTERACTION END ###
[  152s] 
[  152s] lamb70 failed "build osmo-pcu_0.3.0.20171025.dsc" at Wed Oct 25 
19:57:27 UTC 2017.
[  152s] 

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


Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_16.10/x86_64

2017-10-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_16.10/x86_64

Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_16.10/x86_64

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

Last lines of build log:
[  154s]To: 
[  154s]Subject: [osmo-pcu 0.3.0.20171025] testsuite: 2 3 5 6 7 8 11 failed
[  154s] 
[  154s] You may investigate any problem if you feel able to do so, in which
[  154s] case the test suite provides a good starting point.  Its output may
[  154s] be found below `tests/testsuite.dir'.
[  154s] 
[  154s] Makefile:1221: recipe for target 'check-local' failed
[  154s] make[3]: *** [check-local] Error 1
[  154s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests'
[  154s] Makefile:1055: recipe for target 'check-am' failed
[  154s] make[2]: *** [check-am] Error 2
[  154s] make[2]: Leaving directory '/usr/src/packages/BUILD/tests'
[  154s] Makefile:460: recipe for target 'check-recursive' failed
[  154s] make[1]: *** [check-recursive] Error 1
[  154s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  154s] dh_auto_test: make -j1 check VERBOSE=1 returned exit code 2
[  154s] debian/rules:12: recipe for target 'build' failed
[  154s] make: *** [build] Error 2
[  154s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  154s] 
[  154s] lamb56 failed "build osmo-pcu_0.3.0.20171025.dsc" at Wed Oct 25 
19:57:22 UTC 2017.
[  154s] 
[  154s] ### VM INTERACTION START ###
[  157s] [  149.701347] reboot: Power down
[  157s] ### VM INTERACTION END ###
[  157s] 
[  157s] lamb56 failed "build osmo-pcu_0.3.0.20171025.dsc" at Wed Oct 25 
19:57:25 UTC 2017.
[  157s] 

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


Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_17.04/x86_64

2017-10-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_17.04/x86_64

Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_17.04/x86_64

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

Last lines of build log:
[  143s]To: 
[  143s]Subject: [osmo-pcu 0.3.0.20171025] testsuite: 2 3 5 6 7 8 11 failed
[  143s] 
[  143s] You may investigate any problem if you feel able to do so, in which
[  143s] case the test suite provides a good starting point.  Its output may
[  143s] be found below `tests/testsuite.dir'.
[  143s] 
[  143s] Makefile:1221: recipe for target 'check-local' failed
[  143s] make[3]: *** [check-local] Error 1
[  143s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests'
[  143s] Makefile:1055: recipe for target 'check-am' failed
[  143s] make[2]: *** [check-am] Error 2
[  143s] make[2]: Leaving directory '/usr/src/packages/BUILD/tests'
[  143s] Makefile:460: recipe for target 'check-recursive' failed
[  143s] make[1]: *** [check-recursive] Error 1
[  143s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  143s] dh_auto_test: make -j1 check VERBOSE=1 returned exit code 2
[  143s] debian/rules:12: recipe for target 'build' failed
[  143s] make: *** [build] Error 2
[  143s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  143s] 
[  143s] lamb63 failed "build osmo-pcu_0.3.0.20171025.dsc" at Wed Oct 25 
19:56:37 UTC 2017.
[  143s] 
[  143s] ### VM INTERACTION START ###
[  146s] [  139.085405] reboot: Power down
[  146s] ### VM INTERACTION END ###
[  146s] 
[  146s] lamb63 failed "build osmo-pcu_0.3.0.20171025.dsc" at Wed Oct 25 
19:56:41 UTC 2017.
[  146s] 

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


libosmocore[master]: Expand bitvec_write_field()

2017-10-25 Thread Minh-Quang Nguyen

Patch Set 8:

> > I am applying new bitvec_write_field_ext function for encoding LH
 > bits of IA Rest OCtets of EDGE PKT DL IMM ASS in PCU.
 > 
 > Could you please share your patch for OsmoPCU? Let's see if we can
 > use L/H directly as a parameter in separate function instead of
 > extending this one. Or maybe get rid of the function altogether and
 > manually update wp.

Basically, I replaced encoding of "HH", "H" using bitvec_write_field by 
bitvec_write_field_ext (with use_lh = true) in   write_ia_rest_downlink and 
write_ia_rest_uplink in PCU project.

For sure, I will submit the patch to PCU project after finish my current task.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iee648d764de9f3e7ef850f40864ad701c83f61db
Gerrit-PatchSet: 8
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Minh-Quang Nguyen 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


openbsc[master]: libmsc: db_subscriber_alloc_exten() remove infinite loop

2017-10-25 Thread Keith Whyte

Patch Set 5:

> deferring to neels on this one.  as the patch has been sitting in
 > the queue for quite some time: Ping?

I've created https://osmocom.org/issues/2595
It's not a simple as it looks, so I 
suggest this patch be abandoned until the solution is decided upon.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icf0f1e5a7f360bc27592a55890f74a9a12bc9f42
Gerrit-PatchSet: 5
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Keith Whyte 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pablo Neira Ayuso 
Gerrit-HasComments: No


osmo-pcu[master]: Move all rate counter related code together

2017-10-25 Thread Harald Welte

Patch Set 8: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/4413/8/src/bts.cpp
File src/bts.cpp:

Line 165:   rlc_late_block(bts_data()->ctrs);
I'm sorry, I really think it's ugly to pass around a counter array to various 
functions that don't take any other argument.

Either the counters can be resolved from some larger struct/object of which the 
counters are a member, but which makes actual sense to the related function, or 
the respective function like rlc_late_block() would have to be a method of an 
object which has access to the counters?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I795631752af3b9077a846c3123217e1deda52e86
Gerrit-PatchSet: 8
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: Yes


osmo-pcu[master]: Initialize logging before initializing rate_ctr

2017-10-25 Thread Harald Welte

Patch Set 8:

(4 comments)

https://gerrit.osmocom.org/#/c/4411/8/src/bts.cpp
File src/bts.cpp:

Line 54
I'm not really sure what this is actually all about, but was the removal of the 
comment intentional?


https://gerrit.osmocom.org/#/c/4411/8/src/pcu_ctr.c
File src/pcu_ctr.c:

Line 22: #include "pcu_ctr.h"
why not have the static const array here?


https://gerrit.osmocom.org/#/c/4411/8/src/pcu_ctr.h
File src/pcu_ctr.h:

Line 32: static const struct rate_ctr_desc bts_ctr_description[] = {
why do we have a 'static const' array in a header file? any file including this 
header file would get another copy of that array, is that what you intend?


https://gerrit.osmocom.org/#/c/4411/8/src/pcu_main.cpp
File src/pcu_main.cpp:

Line 33: #include "pcu_ctr.h"
now we have the static const array also here in pcu_main.o, not just in 
pcu_ctr.o?  why would pcu_main.o need the array definition? all it needs is 
pcu_ctr_init(), rihgt?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf557d21552d9ff1d6b595b0594f2c7b18db4692
Gerrit-PatchSet: 8
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


osmo-hlr[master]: ctrl: completely replace all CTRL commands

2017-10-25 Thread Neels Hofmeyr

Patch Set 6:

see https://gerrit.osmocom.org/#/c/4415/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I98ee6a06b3aa6a67adb868e0b63b0e04eb42eb50
Gerrit-PatchSet: 6
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


[MERGED] osmo-hlr[master]: db api: fix/add API docs

2017-10-25 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged.

Change subject: db api: fix/add API docs
..


db api: fix/add API docs

Change-Id: I854fafd8e56bd0b8394f8ed79d023c11c2fdbdca
---
M src/db_hlr.c
1 file changed, 76 insertions(+), 13 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/db_hlr.c b/src/db_hlr.c
index e8db7d2..ef01428 100644
--- a/src/db_hlr.c
+++ b/src/db_hlr.c
@@ -43,6 +43,11 @@
x[sizeof(x)-1] = '\0';  \
} while (0)
 
+/*! Add new subscriber record to the HLR database.
+ * \param[in,out] dbc  database context.
+ * \param[in] imsi  ASCII string of IMSI digits, is validated.
+ * \returns 0 on success, -EINVAL on invalid IMSI, -EIO on database error.
+ */
 int db_subscr_create(struct db_context *dbc, const char *imsi)
 {
sqlite3_stmt *stmt;
@@ -71,6 +76,15 @@
return 0;
 }
 
+/*! Completely delete a subscriber record from the HLR database.
+ * Also remove authentication data.
+ * Future todo: also drop from all other database tables, which aren't used yet
+ * at the time of writing this.
+ * \param[in,out] dbc  database context.
+ * \param[in] subscr_id  ID of the subscriber in the HLR db.
+ * \returns if the subscriber was found and removed, -EIO on database error,
+ *  -ENOENT if no such subscriber data exists.
+ */
 int db_subscr_delete_by_id(struct db_context *dbc, int64_t subscr_id)
 {
int rc;
@@ -127,6 +141,13 @@
return ret;
 }
 
+/*! Set a subscriber's MSISDN in the HLR database.
+ * \param[in,out] dbc  database context.
+ * \param[in] imsi  ASCII string of IMSI digits.
+ * \param[in] msisdn  ASCII string of MSISDN digits.
+ * \returns 0 on success, -EINVAL in case of invalid MSISDN string, -EIO on
+ *  database failure, -ENOENT if no such subscriber exists.
+ */
 int db_subscr_update_msisdn_by_imsi(struct db_context *dbc, const char *imsi,
const char *msisdn)
 {
@@ -175,14 +196,17 @@
 
 }
 
-/* Insert or update 2G or 3G authentication tokens in the database.
+/*! Insert or update 2G or 3G authentication tokens in the database.
  * If aud->type is OSMO_AUTH_TYPE_GSM, the auc_2g table entry for the
  * subscriber will be added or modified; if aud->algo is OSMO_AUTH_ALG_NONE,
  * however, the auc_2g entry for the subscriber is deleted. If aud->type is
  * OSMO_AUTH_TYPE_UMTS, the auc_3g table is updated; again, if aud->algo is
  * OSMO_AUTH_ALG_NONE, the auc_3g entry is deleted.
- * Returns 0 if successful, -EINVAL for unknown aud->type, -ENOENT for unknown
- * subscr_id, -EIO for SQL errors.
+ * \param[in,out] dbc  database context.
+ * \param[in] subscr_id  DB ID of the subscriber.
+ * \param[in] aud  Pointer to new auth data (in ASCII string form).
+ * \returns 0 on success, -EINVAL for invalid aud, -ENOENT for unknown
+ *  subscr_id, -EIO for database errors.
  */
 int db_subscr_update_aud_by_id(struct db_context *dbc, int64_t subscr_id,
   const struct sub_auth_data_str *aud)
@@ -417,6 +441,13 @@
return ret;
 }
 
+/*! Retrieve subscriber data from the HLR database.
+ * \param[in,out] dbc  database context.
+ * \param[in] imsi  ASCII string of IMSI digits.
+ * \param[out] subscr  place retrieved data in this struct.
+ * \returns 0 on success, -ENOENT if no such subscriber was found, -EIO on
+ *  database error.
+ */
 int db_subscr_get_by_imsi(struct db_context *dbc, const char *imsi,
  struct hlr_subscriber *subscr)
 {
@@ -434,6 +465,13 @@
return rc;
 }
 
+/*! Retrieve subscriber data from the HLR database.
+ * \param[in,out] dbc  database context.
+ * \param[in] msisdn  ASCII string of MSISDN digits.
+ * \param[out] subscr  place retrieved data in this struct.
+ * \returns 0 on success, -ENOENT if no such subscriber was found, -EIO on
+ *  database error.
+ */
 int db_subscr_get_by_msisdn(struct db_context *dbc, const char *msisdn,
struct hlr_subscriber *subscr)
 {
@@ -451,6 +489,13 @@
return rc;
 }
 
+/*! Retrieve subscriber data from the HLR database.
+ * \param[in,out] dbc  database context.
+ * \param[in] id  ID of the subscriber in the HLR db.
+ * \param[out] subscr  place retrieved data in this struct.
+ * \returns 0 on success, -ENOENT if no such subscriber was found, -EIO on
+ *  database error.
+ */
 int db_subscr_get_by_id(struct db_context *dbc, int64_t id,
struct hlr_subscriber *subscr)
 {
@@ -468,12 +513,14 @@
return rc;
 }
 
-/* Enable or disable PS or CS for a subscriber.
- * For the subscriber with the given imsi, set nam_ps (when is_ps == true) or
- * nam_cs (when is_ps == false) to nam_val in the database.
- * Returns 0 on success, -ENOENT when the given IMSI does not exist, -EINVAL if
- * the SQL statement could not be composed, 

osmo-hlr[master]: db api: fix/add API docs

2017-10-25 Thread Neels Hofmeyr

Patch Set 2: Code-Review+2

let me just apply this without causing review cycles.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I854fafd8e56bd0b8394f8ed79d023c11c2fdbdca
Gerrit-PatchSet: 2
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


[PATCH] osmo-hlr[master]: db api: fix/add API docs

2017-10-25 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/4415

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

db api: fix/add API docs

Change-Id: I854fafd8e56bd0b8394f8ed79d023c11c2fdbdca
---
M src/db_hlr.c
1 file changed, 76 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/15/4415/2

diff --git a/src/db_hlr.c b/src/db_hlr.c
index e8db7d2..ef01428 100644
--- a/src/db_hlr.c
+++ b/src/db_hlr.c
@@ -43,6 +43,11 @@
x[sizeof(x)-1] = '\0';  \
} while (0)
 
+/*! Add new subscriber record to the HLR database.
+ * \param[in,out] dbc  database context.
+ * \param[in] imsi  ASCII string of IMSI digits, is validated.
+ * \returns 0 on success, -EINVAL on invalid IMSI, -EIO on database error.
+ */
 int db_subscr_create(struct db_context *dbc, const char *imsi)
 {
sqlite3_stmt *stmt;
@@ -71,6 +76,15 @@
return 0;
 }
 
+/*! Completely delete a subscriber record from the HLR database.
+ * Also remove authentication data.
+ * Future todo: also drop from all other database tables, which aren't used yet
+ * at the time of writing this.
+ * \param[in,out] dbc  database context.
+ * \param[in] subscr_id  ID of the subscriber in the HLR db.
+ * \returns if the subscriber was found and removed, -EIO on database error,
+ *  -ENOENT if no such subscriber data exists.
+ */
 int db_subscr_delete_by_id(struct db_context *dbc, int64_t subscr_id)
 {
int rc;
@@ -127,6 +141,13 @@
return ret;
 }
 
+/*! Set a subscriber's MSISDN in the HLR database.
+ * \param[in,out] dbc  database context.
+ * \param[in] imsi  ASCII string of IMSI digits.
+ * \param[in] msisdn  ASCII string of MSISDN digits.
+ * \returns 0 on success, -EINVAL in case of invalid MSISDN string, -EIO on
+ *  database failure, -ENOENT if no such subscriber exists.
+ */
 int db_subscr_update_msisdn_by_imsi(struct db_context *dbc, const char *imsi,
const char *msisdn)
 {
@@ -175,14 +196,17 @@
 
 }
 
-/* Insert or update 2G or 3G authentication tokens in the database.
+/*! Insert or update 2G or 3G authentication tokens in the database.
  * If aud->type is OSMO_AUTH_TYPE_GSM, the auc_2g table entry for the
  * subscriber will be added or modified; if aud->algo is OSMO_AUTH_ALG_NONE,
  * however, the auc_2g entry for the subscriber is deleted. If aud->type is
  * OSMO_AUTH_TYPE_UMTS, the auc_3g table is updated; again, if aud->algo is
  * OSMO_AUTH_ALG_NONE, the auc_3g entry is deleted.
- * Returns 0 if successful, -EINVAL for unknown aud->type, -ENOENT for unknown
- * subscr_id, -EIO for SQL errors.
+ * \param[in,out] dbc  database context.
+ * \param[in] subscr_id  DB ID of the subscriber.
+ * \param[in] aud  Pointer to new auth data (in ASCII string form).
+ * \returns 0 on success, -EINVAL for invalid aud, -ENOENT for unknown
+ *  subscr_id, -EIO for database errors.
  */
 int db_subscr_update_aud_by_id(struct db_context *dbc, int64_t subscr_id,
   const struct sub_auth_data_str *aud)
@@ -417,6 +441,13 @@
return ret;
 }
 
+/*! Retrieve subscriber data from the HLR database.
+ * \param[in,out] dbc  database context.
+ * \param[in] imsi  ASCII string of IMSI digits.
+ * \param[out] subscr  place retrieved data in this struct.
+ * \returns 0 on success, -ENOENT if no such subscriber was found, -EIO on
+ *  database error.
+ */
 int db_subscr_get_by_imsi(struct db_context *dbc, const char *imsi,
  struct hlr_subscriber *subscr)
 {
@@ -434,6 +465,13 @@
return rc;
 }
 
+/*! Retrieve subscriber data from the HLR database.
+ * \param[in,out] dbc  database context.
+ * \param[in] msisdn  ASCII string of MSISDN digits.
+ * \param[out] subscr  place retrieved data in this struct.
+ * \returns 0 on success, -ENOENT if no such subscriber was found, -EIO on
+ *  database error.
+ */
 int db_subscr_get_by_msisdn(struct db_context *dbc, const char *msisdn,
struct hlr_subscriber *subscr)
 {
@@ -451,6 +489,13 @@
return rc;
 }
 
+/*! Retrieve subscriber data from the HLR database.
+ * \param[in,out] dbc  database context.
+ * \param[in] id  ID of the subscriber in the HLR db.
+ * \param[out] subscr  place retrieved data in this struct.
+ * \returns 0 on success, -ENOENT if no such subscriber was found, -EIO on
+ *  database error.
+ */
 int db_subscr_get_by_id(struct db_context *dbc, int64_t id,
struct hlr_subscriber *subscr)
 {
@@ -468,12 +513,14 @@
return rc;
 }
 
-/* Enable or disable PS or CS for a subscriber.
- * For the subscriber with the given imsi, set nam_ps (when is_ps == true) or
- * nam_cs (when is_ps == false) to nam_val in the database.
- * Returns 0 on success, -ENOENT when the given IMSI does not exist, -EINVAL if
- * the SQL statement could not be composed, -ENOEXEC if running the SQL
- * statement 

[PATCH] osmo-hlr[master]: db api: fix/add API docs

2017-10-25 Thread Neels Hofmeyr

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

db api: fix/add API docs

Change-Id: I854fafd8e56bd0b8394f8ed79d023c11c2fdbdca
---
M src/db_hlr.c
1 file changed, 76 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/15/4415/1

diff --git a/src/db_hlr.c b/src/db_hlr.c
index e8db7d2..73ff1f8 100644
--- a/src/db_hlr.c
+++ b/src/db_hlr.c
@@ -43,6 +43,11 @@
x[sizeof(x)-1] = '\0';  \
} while (0)
 
+/*! Add new subscriber record to the HLR database.
+ * \param[in,out] dbc  database context.
+ * \param[in] imsi  ASCII string of IMSI digits, is validated.
+ * \returns 0 on success, -EINVAL on invalid IMSI, -EIO on database error.
+ */
 int db_subscr_create(struct db_context *dbc, const char *imsi)
 {
sqlite3_stmt *stmt;
@@ -71,6 +76,15 @@
return 0;
 }
 
+/*! Completely delete a subscriber record from the HLR database.
+ * Also removes authentication data.
+ * Future todo: also drop from all other database tables, which aren't used yet
+ * at the time of writing this.
+ * \param[in,out] dbc  database context.
+ * \param[in] subscr_id  ID of the subscriber in the HLR db.
+ * \returns if the subscriber was found and removed, -EIO on database error,
+ *  -ENOENT if no such subscriber data exists.
+ */
 int db_subscr_delete_by_id(struct db_context *dbc, int64_t subscr_id)
 {
int rc;
@@ -127,6 +141,13 @@
return ret;
 }
 
+/*! Set a subscriber's MSISDN in the HLR database.
+ * \param[in,out] dbc  database context.
+ * \param[in] imsi  ASCII string of IMSI digits.
+ * \param[in] msisdn  ASCII string of MSISDN digits.
+ * \returns 0 on success, -EINVAL in case of invalid MSISDN string, -EIO on
+ *  database failure, -ENOENT if no such subscriber exists.
+ */
 int db_subscr_update_msisdn_by_imsi(struct db_context *dbc, const char *imsi,
const char *msisdn)
 {
@@ -175,14 +196,17 @@
 
 }
 
-/* Insert or update 2G or 3G authentication tokens in the database.
+/** Insert or update 2G or 3G authentication tokens in the database.
  * If aud->type is OSMO_AUTH_TYPE_GSM, the auc_2g table entry for the
  * subscriber will be added or modified; if aud->algo is OSMO_AUTH_ALG_NONE,
  * however, the auc_2g entry for the subscriber is deleted. If aud->type is
  * OSMO_AUTH_TYPE_UMTS, the auc_3g table is updated; again, if aud->algo is
  * OSMO_AUTH_ALG_NONE, the auc_3g entry is deleted.
- * Returns 0 if successful, -EINVAL for unknown aud->type, -ENOENT for unknown
- * subscr_id, -EIO for SQL errors.
+ * \param[in,out] dbc  database context.
+ * \param[in] subscr_id  DB ID of the subscriber.
+ * \param[in] aud  Pointer to new auth data (in ASCII string form).
+ * \returns 0 on success, -EINVAL for invalid aud, -ENOENT for unknown
+ *  subscr_id, -EIO for database errors.
  */
 int db_subscr_update_aud_by_id(struct db_context *dbc, int64_t subscr_id,
   const struct sub_auth_data_str *aud)
@@ -417,6 +441,13 @@
return ret;
 }
 
+/*! Retrieve subscriber data from the HLR database.
+ * \param[in,out] dbc  database context.
+ * \param[in] imsi  ASCII string of IMSI digits.
+ * \param[out] subscr  place retrieved data in this struct.
+ * \returns 0 on success, -ENOENT if no such subscriber was found, -EIO on
+ *  database error.
+ */
 int db_subscr_get_by_imsi(struct db_context *dbc, const char *imsi,
  struct hlr_subscriber *subscr)
 {
@@ -434,6 +465,13 @@
return rc;
 }
 
+/*! Retrieve subscriber data from the HLR database.
+ * \param[in,out] dbc  database context.
+ * \param[in] msisdn  ASCII string of MSISDN digits.
+ * \param[out] subscr  place retrieved data in this struct.
+ * \returns 0 on success, -ENOENT if no such subscriber was found, -EIO on
+ *  database error.
+ */
 int db_subscr_get_by_msisdn(struct db_context *dbc, const char *msisdn,
struct hlr_subscriber *subscr)
 {
@@ -451,6 +489,13 @@
return rc;
 }
 
+/*! Retrieve subscriber data from the HLR database.
+ * \param[in,out] dbc  database context.
+ * \param[in] id  ID of the subscriber in the HLR db.
+ * \param[out] subscr  place retrieved data in this struct.
+ * \returns 0 on success, -ENOENT if no such subscriber was found, -EIO on
+ *  database error.
+ */
 int db_subscr_get_by_id(struct db_context *dbc, int64_t id,
struct hlr_subscriber *subscr)
 {
@@ -468,12 +513,14 @@
return rc;
 }
 
-/* Enable or disable PS or CS for a subscriber.
- * For the subscriber with the given imsi, set nam_ps (when is_ps == true) or
- * nam_cs (when is_ps == false) to nam_val in the database.
- * Returns 0 on success, -ENOENT when the given IMSI does not exist, -EINVAL if
- * the SQL statement could not be composed, -ENOEXEC if running the SQL
- * statement failed, -EIO if the amount of rows modified is unexpected.
+/*! You should use hlr_subscr_nam() 

[MERGED] osmo-gsm-manuals[master]: refactor Makefile build rules, don't use the FORCE

2017-10-25 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged.

Change subject: refactor Makefile build rules, don't use the FORCE
..


refactor Makefile build rules, don't use the FORCE

The initial goal was to make sure we don't have overall FORCE rules causing
unnecessary rebuilds -- annoying while writing documentation. As I looked
through possible dependencies, I finally understood what's going on here.

Remove code dup and nicely sort which belongs where in build/Makefile.*.inc. In
each, describe in a top comment how to use it, and also unify how they are
used:

- Rename Makefile.inc to Makefile.docbook.inc and refactor
- Add Makefile.vty-reference.inc
- Add Makefile.common.inc

Make sure that we accurately pick up all dependencies.

Drop use of the macro called 'command', that silenced the actual command lines
invoked and replaced them with short strings: it obscures what is actually
going on and makes the Makefiles hard to read and understand.

Each manual's makefile is greatly reduced to few definitions and a Makefile
include, e.g. one for asciidoc, one for VTY reference.

Move common/bsc_vty_additions.xml to OsmoBSC/vty/libbsc_vty_additions.xml, link
from OsmoNITB. It applies only to OsmoBSC and OsmoNITB.

Add a script that combines a VTY reference file with *all* additions files
found in a manual's vty/ dir. Call this from Makefile.vty-reference.inc.

Change-Id: I9758e04162a480e28c7dc83475b514cf7fd25ec0
---
M OsmoBSC/Makefile
R OsmoBSC/vty/libbsc_vty_additions.xml
M OsmoBTS/Makefile
M OsmoGGSN/Makefile
M OsmoGSMTester/Makefile
M OsmoHLR/Makefile
M OsmoMGCP/Makefile
M OsmoMSC/Makefile
M OsmoNAT/Makefile
M OsmoNITB/Makefile
A OsmoNITB/vty/bsc_vty_additions.xml
M OsmoPCU/Makefile
M OsmoSGSN/Makefile
M build/Makefile.asciidoc.inc
A build/Makefile.common.inc
A build/Makefile.docbook.inc
D build/Makefile.inc
A build/Makefile.vty-reference.inc
A build/vty_reference_combine.sh
19 files changed, 206 insertions(+), 443 deletions(-)

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



diff --git a/OsmoBSC/Makefile b/OsmoBSC/Makefile
index 35f50da..1533482 100644
--- a/OsmoBSC/Makefile
+++ b/OsmoBSC/Makefile
@@ -1,54 +1,11 @@
-# XSL stylesheets downloaded from 
http://docbook.sourceforge.net/release/xsl/current/html/
-# Makefile from BitBake/OpenEmbedded manuals
+TOPDIR = ..
 
-
-EXTRA_DEPS = gen-bsc-vty-docbook
-
-topdir = .
-bsc_reference = $(topdir)/osmobsc-vty-reference.xml
-manuals = $(bsc_reference)
-# types = pdf txt rtf ps xhtml html man tex texi dvi
-# types = pdf txt
-types = $(docbooktotypes)
-docbooktotypes = pdf
-# htmlcssfile =
-# htmlcss =
-
-TOPDIR := ..
-ASCIIDOCS := osmobsc-usermanual osmux-reference aoip-mgw-options
-
+ASCIIDOC = osmobsc-usermanual.adoc osmux-reference.adoc aoip-mgw-options.adoc
 include $(TOPDIR)/build/Makefile.asciidoc.inc
-include $(TOPDIR)/build/Makefile.inc
-
 osmobsc-usermanual.pdf: chapters/*.adoc
-osmux-reference.pdf: osmux-reference.adoc
-aoip-mgw-options.pdf: aoip-mgw-options.adoc
+aoip-mgw-options.pdf: aoip-mgw-options.adoc mgw/*.msc
 
-clean:
-   -rm -rf $(cleanfiles)
-   -rm osmobsc-usermanual__*.png
-   -rm osmobsc-usermanual__*.svg
-   -rm osmobsc-usermanual*.check
-   -rm osmux-reference*.check
-   -rm aoip-mgw-options*.png
-   -rm aoip-mgw-options*.svg
-   -rm aoip-mgw-options*.check
-   -rm osmux-reference__*.svg
-   -rm osmux-reference__*.png
-   -rm osmux-reference__*.check
+VTY_REFERENCE = osmobsc-vty-reference.xml
+include $(TOPDIR)/build/Makefile.vty-reference.inc
 
-gen-bsc-vty-docbook: FORCE
-   $(call command,xsltproc -o generated/combined1.xml \
-   --stringparam with $(PWD)/../common/vty_additions.xml \
-   $(MERGE_DOC) vty/bsc_vty_reference.xml, \
-   XSLTPROC,Merging Common VTY)
-   $(call command,xsltproc -o generated/combined2.xml \
-   --stringparam with $(PWD)/../common/bsc_vty_additions.xml \
-   $(MERGE_DOC) generated/combined1.xml, \
-   XSLTPROC,Merging Common BSC VTY)
-   $(call command,xsltproc -o generated/combined3.xml \
-   --stringparam with $(PWD)/vty/bsc_vty_additions.xml \
-   $(MERGE_DOC) generated/combined2.xml, \
-   XSLTPROC,Merging BSC VTY)
-   $(call command,xsltproc ../vty_reference.xsl generated/combined3.xml > 
generated/docbook_vty.xml, \
-   XSLTPROC,Converting BSC VTY to DocBook)
+include $(TOPDIR)/build/Makefile.common.inc
diff --git a/common/bsc_vty_additions.xml b/OsmoBSC/vty/libbsc_vty_additions.xml
similarity index 100%
rename from common/bsc_vty_additions.xml
rename to OsmoBSC/vty/libbsc_vty_additions.xml
diff --git a/OsmoBTS/Makefile b/OsmoBTS/Makefile
index 58df0e3..e1ff214 100644
--- a/OsmoBTS/Makefile
+++ b/OsmoBTS/Makefile
@@ -1,50 +1,12 @@
-# XSL stylesheets downloaded from 

osmo-mgw[master]: client: add unified function to generate MGCP messages

2017-10-25 Thread Harald Welte

Patch Set 13: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I29c5e2fb972896faeb771ba040f015592487fcbe
Gerrit-PatchSet: 13
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-mgw[master]: sdp: refactoring sdp parser/generator

2017-10-25 Thread Harald Welte

Patch Set 14: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f88c93872ff913bc211f560b26901267f577324
Gerrit-PatchSet: 14
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: dexter 
Gerrit-HasComments: No


[PATCH] osmo-pcu[master]: Initialize logging before initializing rate_ctr

2017-10-25 Thread Max
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/4411

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

Initialize logging before initializing rate_ctr

The library code for rate counter initialization might already want to
log something (particularly after
Ifc6ac824f5dae9a848bb4a5d067c64a69eb40b56 in libosmocore), so the
logging framework must be initialized before.

Before the rate counters were initialized implicitly in BTS
constructor which makes proper logging init impossible.

Fix this by using explicit init similar to the way we do it for vty.

Change-Id: Ibf557d21552d9ff1d6b595b0594f2c7b18db4692
---
M src/Makefile.am
M src/bts.cpp
M src/bts.h
A src/pcu_ctr.c
A src/pcu_ctr.h
M src/pcu_main.cpp
M src/pcu_vty.c
M tests/alloc/AllocTest.cpp
M tests/tbf/TbfTest.cpp
M tests/types/TypesTest.cpp
10 files changed, 194 insertions(+), 122 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/11/4411/8

diff --git a/src/Makefile.am b/src/Makefile.am
index 1543851..67291ae 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -47,6 +47,7 @@
gprs_ms_storage.cpp \
gsm_timer.cpp \
pcu_l1_if.cpp \
+   pcu_ctr.c \
pcu_vty.c \
pcu_vty_functions.cpp \
tbf.cpp \
@@ -79,6 +80,7 @@
gprs_ms_storage.h \
pcu_l1_if.h \
gsm_timer.h \
+   pcu_ctr.h \
pcu_vty.h \
pcu_vty_functions.h \
tbf.h \
diff --git a/src/bts.cpp b/src/bts.cpp
index b768569..0f7462a 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -50,107 +50,6 @@
 
 static BTS s_bts;
 
-/**
- * For gcc-4.4 compat do not use extended initializer list but keep the
- * order from the enum here. Once we support GCC4.7 and up we can change
- * the code below.
- */
-static const struct rate_ctr_desc bts_ctr_description[] = {
-   { "tbf.dl.alloc",   "TBF DL Allocated "},
-   { "tbf.dl.freed",   "TBF DL Freed "},
-   { "tbf.dl.aborted", "TBF DL Aborted   "},
-   { "tbf.ul.alloc",   "TBF UL Allocated "},
-   { "tbf.ul.freed",   "TBF UL Freed "},
-   { "tbf.ul.aborted", "TBF UL Aborted   "},
-   { "tbf.reused", "TBF Reused   "},
-   { "tbf.alloc.algo-a",   "TBF Alloc Algo A "},
-   { "tbf.alloc.algo-b",   "TBF Alloc Algo B "},
-   { "tbf.failed.egprs-only",  "TBF Failed EGPRS-only"},
-   { "rlc.sent",   "RLC Sent "},
-   { "rlc.resent", "RLC Resent   "},
-   { "rlc.restarted",  "RLC Restarted"},
-   { "rlc.stalled","RLC Stalled  "},
-   { "rlc.nacked", "RLC Nacked   "},
-   { "rlc.final_block_resent", "RLC Final Blk resent "},
-   { "rlc.ass.timedout",   "RLC Assign Timeout   "},
-   { "rlc.ass.failed", "RLC Assign Failed"},
-   { "rlc.ack.timedout",   "RLC Ack Timeout  "},
-   { "rlc.ack.failed", "RLC Ack Failed   "},
-   { "rlc.rel.timedout",   "RLC Release Timeout  "},
-   { "rlc.late-block", "RLC Late Block   "},
-   { "rlc.sent-dummy", "RLC Sent Dummy   "},
-   { "rlc.sent-control",   "RLC Sent Control "},
-   { "rlc.dl_bytes",   "RLC DL Bytes "},
-   { "rlc.dl_payload_bytes",   "RLC DL Payload Bytes "},
-   { "rlc.ul_bytes",   "RLC UL Bytes "},
-   { "rlc.ul_payload_bytes",   "RLC UL Payload Bytes "},
-   { "decode.errors",  "Decode Errors"},
-   { "sba.allocated",  "SBA Allocated"},
-   { "sba.freed",  "SBA Freed"},
-   { "sba.timedout",   "SBA Timeout  "},
-   { "llc.timeout","Timedout Frames  "},
-   { "llc.dropped","Dropped Frames   "},
-   { "llc.scheduled",  "Scheduled Frames "},
-   { "llc.dl_bytes",   "RLC encapsulated PDUs"},
-   { "llc.ul_bytes",   "full PDUs received   "},
-   { "rach.requests",  "RACH requests"},
-   { "11bit_rach.requests","11BIT_RACH requests  "},
-   { "spb.uplink_first_segment",   "First seg of UL SPB  "},
-   { "spb.uplink_second_segment",  "Second seg of UL SPB "},
-   { "spb.downlink_first_segment", "First seg of DL SPB  "},
-   { "spb.downlink_second_segment","Second seg of DL SPB "},
-   { "immediate.assignment_UL","Immediate Assign UL  "},
-   { "immediate.assignment_rej",   "Immediate Assign Rej "},
-   { "immediate.assignment_DL","Immediate Assign DL  "},
-   { "channel.request_description","Channel Request Desc "},
-   { "pkt.ul_assignment",   

[PATCH] osmo-pcu[master]: Initialize logging before initializing rate_ctr

2017-10-25 Thread Max
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/4411

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

Initialize logging before initializing rate_ctr

The library code for rate counter initialization might already want to
log something (particularly after
Ifc6ac824f5dae9a848bb4a5d067c64a69eb40b56 in libosmocore), so the
logging framework must be initialized before.

Before the rate counters were initialized implicitly in BTS
constructor which makes proper logging init impossible.

Fix this by using explicit init similar to the way we do it for vty.

Change-Id: Ibf557d21552d9ff1d6b595b0594f2c7b18db4692
---
M src/Makefile.am
M src/bts.cpp
M src/bts.h
A src/pcu_ctr.c
A src/pcu_ctr.h
M src/pcu_main.cpp
M src/pcu_vty.c
M tests/alloc/AllocTest.cpp
M tests/tbf/TbfTest.cpp
M tests/types/TypesTest.cpp
10 files changed, 194 insertions(+), 122 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/11/4411/7

diff --git a/src/Makefile.am b/src/Makefile.am
index 1543851..67291ae 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -47,6 +47,7 @@
gprs_ms_storage.cpp \
gsm_timer.cpp \
pcu_l1_if.cpp \
+   pcu_ctr.c \
pcu_vty.c \
pcu_vty_functions.cpp \
tbf.cpp \
@@ -79,6 +80,7 @@
gprs_ms_storage.h \
pcu_l1_if.h \
gsm_timer.h \
+   pcu_ctr.h \
pcu_vty.h \
pcu_vty_functions.h \
tbf.h \
diff --git a/src/bts.cpp b/src/bts.cpp
index b768569..0f7462a 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -50,107 +50,6 @@
 
 static BTS s_bts;
 
-/**
- * For gcc-4.4 compat do not use extended initializer list but keep the
- * order from the enum here. Once we support GCC4.7 and up we can change
- * the code below.
- */
-static const struct rate_ctr_desc bts_ctr_description[] = {
-   { "tbf.dl.alloc",   "TBF DL Allocated "},
-   { "tbf.dl.freed",   "TBF DL Freed "},
-   { "tbf.dl.aborted", "TBF DL Aborted   "},
-   { "tbf.ul.alloc",   "TBF UL Allocated "},
-   { "tbf.ul.freed",   "TBF UL Freed "},
-   { "tbf.ul.aborted", "TBF UL Aborted   "},
-   { "tbf.reused", "TBF Reused   "},
-   { "tbf.alloc.algo-a",   "TBF Alloc Algo A "},
-   { "tbf.alloc.algo-b",   "TBF Alloc Algo B "},
-   { "tbf.failed.egprs-only",  "TBF Failed EGPRS-only"},
-   { "rlc.sent",   "RLC Sent "},
-   { "rlc.resent", "RLC Resent   "},
-   { "rlc.restarted",  "RLC Restarted"},
-   { "rlc.stalled","RLC Stalled  "},
-   { "rlc.nacked", "RLC Nacked   "},
-   { "rlc.final_block_resent", "RLC Final Blk resent "},
-   { "rlc.ass.timedout",   "RLC Assign Timeout   "},
-   { "rlc.ass.failed", "RLC Assign Failed"},
-   { "rlc.ack.timedout",   "RLC Ack Timeout  "},
-   { "rlc.ack.failed", "RLC Ack Failed   "},
-   { "rlc.rel.timedout",   "RLC Release Timeout  "},
-   { "rlc.late-block", "RLC Late Block   "},
-   { "rlc.sent-dummy", "RLC Sent Dummy   "},
-   { "rlc.sent-control",   "RLC Sent Control "},
-   { "rlc.dl_bytes",   "RLC DL Bytes "},
-   { "rlc.dl_payload_bytes",   "RLC DL Payload Bytes "},
-   { "rlc.ul_bytes",   "RLC UL Bytes "},
-   { "rlc.ul_payload_bytes",   "RLC UL Payload Bytes "},
-   { "decode.errors",  "Decode Errors"},
-   { "sba.allocated",  "SBA Allocated"},
-   { "sba.freed",  "SBA Freed"},
-   { "sba.timedout",   "SBA Timeout  "},
-   { "llc.timeout","Timedout Frames  "},
-   { "llc.dropped","Dropped Frames   "},
-   { "llc.scheduled",  "Scheduled Frames "},
-   { "llc.dl_bytes",   "RLC encapsulated PDUs"},
-   { "llc.ul_bytes",   "full PDUs received   "},
-   { "rach.requests",  "RACH requests"},
-   { "11bit_rach.requests","11BIT_RACH requests  "},
-   { "spb.uplink_first_segment",   "First seg of UL SPB  "},
-   { "spb.uplink_second_segment",  "Second seg of UL SPB "},
-   { "spb.downlink_first_segment", "First seg of DL SPB  "},
-   { "spb.downlink_second_segment","Second seg of DL SPB "},
-   { "immediate.assignment_UL","Immediate Assign UL  "},
-   { "immediate.assignment_rej",   "Immediate Assign Rej "},
-   { "immediate.assignment_DL","Immediate Assign DL  "},
-   { "channel.request_description","Channel Request Desc "},
-   { "pkt.ul_assignment",   

[PATCH] osmo-pcu[master]: Move all rate counter related code together

2017-10-25 Thread Max
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/4413

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

Move all rate counter related code together

Change-Id: I795631752af3b9077a846c3123217e1deda52e86
Related: OS#1538
---
M src/bts.cpp
M src/bts.h
M src/gprs_rlcmac_sched.cpp
M src/gprs_rlcmac_ts_alloc.cpp
M src/llc.cpp
M src/pcu_ctr.h
M src/rlc.cpp
M src/sba.cpp
M src/tbf.cpp
M src/tbf_dl.cpp
M src/tbf_ul.cpp
11 files changed, 302 insertions(+), 376 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/13/4413/6

diff --git a/src/bts.cpp b/src/bts.cpp
index 0f7462a..16d9dba 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -30,6 +30,7 @@
 #include 
 
 extern "C" {
+   #include "pcu_ctr.h"
#include 
#include 
#include 
@@ -161,7 +162,7 @@
LOGP(DRLCMAC, LOGL_NOTICE,
"Late RLC block, FN delta: %d FN: %d curFN: %d\n",
delay, fn, current_frame_number());
-   rlc_late_block();
+   rlc_late_block(bts_data()->ctrs);
}
 
m_cur_blk_fn = fn;
@@ -506,10 +507,10 @@
uint16_t priority = 0;
bool failure = false;
 
-   rach_frame();
+   rach_frame(bts_data()->ctrs);
 
if (is_11bit)
-   rach_frame_11bit();
+   rach_frame_11bit(bts_data()->ctrs);
 
/* Determine full frame number */
Fn = rfn_to_fn(Fn);
@@ -590,7 +591,7 @@
plen = Encoding::write_immediate_assignment_reject(
immediate_assignment, ra, Fn,
burst_type);
-   immediate_assignment_reject();
+   immediate_assignment_reject(bts_data()->ctrs);
}
else {
LOGP(DRLCMAC, LOGL_DEBUG,
@@ -605,7 +606,7 @@
}
 
if (plen >= 0) {
-   immediate_assignment_ul_tbf();
+   immediate_assignment_ul_tbf(bts_data()->ctrs);
pcu_l1if_tx_agch(immediate_assignment, plen);
}
 
@@ -699,7 +700,7 @@
tbf->trx->arfcn, ts, tbf->tsc(), 7, poll,
tbf->poll_fn, m_bts.alpha, m_bts.gamma, -1);
if (plen >= 0) {
-   immediate_assignment_dl_tbf();
+   immediate_assignment_dl_tbf(bts_data()->ctrs);
pcu_l1if_tx_pch(immediate_assignment, plen, imsi);
}
 
@@ -1026,7 +1027,7 @@
 
 static inline void sched_ul_ass_or_rej(BTS *bts, gprs_rlcmac_bts *bts_data, 
struct gprs_rlcmac_dl_tbf *tbf)
 {
-   bts->channel_request_description();
+   channel_request_description(bts->bts_data()->ctrs);
 
/* This call will register the new TBF with the MS on success */
gprs_rlcmac_ul_tbf *ul_tbf = tbf_alloc_ul(bts_data, tbf->trx->trx_no, 
tbf->ms_class(),
@@ -1356,7 +1357,7 @@
else
bts()->send_gsmtap(PCU_GSMTAP_C_UL_CTRL, true, trx_no(), ts_no, 
GSMTAP_CHANNEL_PACCH, fn, data, data_len);
 
-   bts()->rlc_rcvd_control();
+   rlc_rcvd_control(bts_data()->ctrs);
switch (ul_control_block->u.MESSAGE_TYPE) {
case MT_PACKET_CONTROL_ACK:

rcv_control_ack(_control_block->u.Packet_Control_Acknowledgement, fn);
@@ -1377,7 +1378,7 @@
/* ignoring it. change the SI to not force sending these? */
break;
default:
-   bts()->decode_error();
+   decode_error(bts_data()->ctrs);
LOGP(DRLCMAC, LOGL_NOTICE,
"RX: [PCU <- BTS] unknown control block(%d) received\n",
ul_control_block->u.MESSAGE_TYPE);
@@ -1393,13 +1394,13 @@
 {
GprsCodingScheme cs = GprsCodingScheme::getBySizeUL(len);
if (!cs) {
-   bts()->decode_error();
+   decode_error(bts_data()->ctrs);
LOGP(DRLCMACUL, LOGL_ERROR, "Dropping data block with invalid"
"length: %d)\n", len);
return -EINVAL;
}
 
-   bts()->rlc_ul_bytes(len);
+   rlc_ul_bytes(bts_data()->ctrs, len);
 
LOGP(DRLCMACUL, LOGL_DEBUG, "Got RLC block, coding scheme: %s, "
"length: %d (%d))\n", cs.name(), len, cs.usedSizeUL());
@@ -1410,7 +1411,7 @@
if (cs.isEgprs())
return rcv_data_block(data, len, fn, meas, cs);
 
-   bts()->decode_error();
+   decode_error(bts_data()->ctrs);
LOGP(DRLCMACUL, LOGL_ERROR, "Unsupported coding scheme %s\n",
cs.name());
return -EINVAL;
@@ -1447,7 +1448,7 @@
LOGP(DRLCMACUL, LOGL_ERROR,
"Got %s RLC block but header parsing has failed\n",
cs.name());
-   bts()->decode_error();
+   decode_error(bts_data()->ctrs);
return rc;
}
 
diff --git a/src/bts.h b/src/bts.h
index 19d948a..128463e 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -253,94 +253,6 @@
 struct BTS {
 

[PATCH] osmo-pcu[master]: Move all rate counter related code together

2017-10-25 Thread Max
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/4413

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

Move all rate counter related code together

Change-Id: I795631752af3b9077a846c3123217e1deda52e86
Related: OS#1538
---
M src/bts.cpp
M src/bts.h
M src/gprs_rlcmac_sched.cpp
M src/gprs_rlcmac_ts_alloc.cpp
M src/llc.cpp
M src/pcu_ctr.h
M src/rlc.cpp
M src/sba.cpp
M src/tbf.cpp
M src/tbf_dl.cpp
M src/tbf_ul.cpp
11 files changed, 302 insertions(+), 288 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/13/4413/5

diff --git a/src/bts.cpp b/src/bts.cpp
index 0f7462a..16d9dba 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -30,6 +30,7 @@
 #include 
 
 extern "C" {
+   #include "pcu_ctr.h"
#include 
#include 
#include 
@@ -161,7 +162,7 @@
LOGP(DRLCMAC, LOGL_NOTICE,
"Late RLC block, FN delta: %d FN: %d curFN: %d\n",
delay, fn, current_frame_number());
-   rlc_late_block();
+   rlc_late_block(bts_data()->ctrs);
}
 
m_cur_blk_fn = fn;
@@ -506,10 +507,10 @@
uint16_t priority = 0;
bool failure = false;
 
-   rach_frame();
+   rach_frame(bts_data()->ctrs);
 
if (is_11bit)
-   rach_frame_11bit();
+   rach_frame_11bit(bts_data()->ctrs);
 
/* Determine full frame number */
Fn = rfn_to_fn(Fn);
@@ -590,7 +591,7 @@
plen = Encoding::write_immediate_assignment_reject(
immediate_assignment, ra, Fn,
burst_type);
-   immediate_assignment_reject();
+   immediate_assignment_reject(bts_data()->ctrs);
}
else {
LOGP(DRLCMAC, LOGL_DEBUG,
@@ -605,7 +606,7 @@
}
 
if (plen >= 0) {
-   immediate_assignment_ul_tbf();
+   immediate_assignment_ul_tbf(bts_data()->ctrs);
pcu_l1if_tx_agch(immediate_assignment, plen);
}
 
@@ -699,7 +700,7 @@
tbf->trx->arfcn, ts, tbf->tsc(), 7, poll,
tbf->poll_fn, m_bts.alpha, m_bts.gamma, -1);
if (plen >= 0) {
-   immediate_assignment_dl_tbf();
+   immediate_assignment_dl_tbf(bts_data()->ctrs);
pcu_l1if_tx_pch(immediate_assignment, plen, imsi);
}
 
@@ -1026,7 +1027,7 @@
 
 static inline void sched_ul_ass_or_rej(BTS *bts, gprs_rlcmac_bts *bts_data, 
struct gprs_rlcmac_dl_tbf *tbf)
 {
-   bts->channel_request_description();
+   channel_request_description(bts->bts_data()->ctrs);
 
/* This call will register the new TBF with the MS on success */
gprs_rlcmac_ul_tbf *ul_tbf = tbf_alloc_ul(bts_data, tbf->trx->trx_no, 
tbf->ms_class(),
@@ -1356,7 +1357,7 @@
else
bts()->send_gsmtap(PCU_GSMTAP_C_UL_CTRL, true, trx_no(), ts_no, 
GSMTAP_CHANNEL_PACCH, fn, data, data_len);
 
-   bts()->rlc_rcvd_control();
+   rlc_rcvd_control(bts_data()->ctrs);
switch (ul_control_block->u.MESSAGE_TYPE) {
case MT_PACKET_CONTROL_ACK:

rcv_control_ack(_control_block->u.Packet_Control_Acknowledgement, fn);
@@ -1377,7 +1378,7 @@
/* ignoring it. change the SI to not force sending these? */
break;
default:
-   bts()->decode_error();
+   decode_error(bts_data()->ctrs);
LOGP(DRLCMAC, LOGL_NOTICE,
"RX: [PCU <- BTS] unknown control block(%d) received\n",
ul_control_block->u.MESSAGE_TYPE);
@@ -1393,13 +1394,13 @@
 {
GprsCodingScheme cs = GprsCodingScheme::getBySizeUL(len);
if (!cs) {
-   bts()->decode_error();
+   decode_error(bts_data()->ctrs);
LOGP(DRLCMACUL, LOGL_ERROR, "Dropping data block with invalid"
"length: %d)\n", len);
return -EINVAL;
}
 
-   bts()->rlc_ul_bytes(len);
+   rlc_ul_bytes(bts_data()->ctrs, len);
 
LOGP(DRLCMACUL, LOGL_DEBUG, "Got RLC block, coding scheme: %s, "
"length: %d (%d))\n", cs.name(), len, cs.usedSizeUL());
@@ -1410,7 +1411,7 @@
if (cs.isEgprs())
return rcv_data_block(data, len, fn, meas, cs);
 
-   bts()->decode_error();
+   decode_error(bts_data()->ctrs);
LOGP(DRLCMACUL, LOGL_ERROR, "Unsupported coding scheme %s\n",
cs.name());
return -EINVAL;
@@ -1447,7 +1448,7 @@
LOGP(DRLCMACUL, LOGL_ERROR,
"Got %s RLC block but header parsing has failed\n",
cs.name());
-   bts()->decode_error();
+   decode_error(bts_data()->ctrs);
return rc;
}
 
diff --git a/src/bts.h b/src/bts.h
index 19d948a..d20f633 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -390,95 +390,6 @@

[PATCH] osmo-pcu[master]: Initialize logging before initializing rate_ctr

2017-10-25 Thread Max
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/4411

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

Initialize logging before initializing rate_ctr

The library code for rate counter initialization might already want to
log something (particularly after
Ifc6ac824f5dae9a848bb4a5d067c64a69eb40b56 in libosmocore), so the
logging framework must be initialized before.

Before the rate counters were initialized implicitly in BTS
constructor which makes proper logging init impossible.

Fix this by using explicit init similar to the way we do it for vty.

Change-Id: Ibf557d21552d9ff1d6b595b0594f2c7b18db4692
---
M src/Makefile.am
M src/bts.cpp
M src/bts.h
A src/pcu_ctr.c
A src/pcu_ctr.h
M src/pcu_main.cpp
M src/pcu_vty.c
M tests/alloc/AllocTest.cpp
M tests/tbf/TbfTest.cpp
M tests/types/TypesTest.cpp
10 files changed, 194 insertions(+), 121 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/11/4411/6

diff --git a/src/Makefile.am b/src/Makefile.am
index 1543851..67291ae 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -47,6 +47,7 @@
gprs_ms_storage.cpp \
gsm_timer.cpp \
pcu_l1_if.cpp \
+   pcu_ctr.c \
pcu_vty.c \
pcu_vty_functions.cpp \
tbf.cpp \
@@ -79,6 +80,7 @@
gprs_ms_storage.h \
pcu_l1_if.h \
gsm_timer.h \
+   pcu_ctr.h \
pcu_vty.h \
pcu_vty_functions.h \
tbf.h \
diff --git a/src/bts.cpp b/src/bts.cpp
index b768569..0f7462a 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -50,107 +50,6 @@
 
 static BTS s_bts;
 
-/**
- * For gcc-4.4 compat do not use extended initializer list but keep the
- * order from the enum here. Once we support GCC4.7 and up we can change
- * the code below.
- */
-static const struct rate_ctr_desc bts_ctr_description[] = {
-   { "tbf.dl.alloc",   "TBF DL Allocated "},
-   { "tbf.dl.freed",   "TBF DL Freed "},
-   { "tbf.dl.aborted", "TBF DL Aborted   "},
-   { "tbf.ul.alloc",   "TBF UL Allocated "},
-   { "tbf.ul.freed",   "TBF UL Freed "},
-   { "tbf.ul.aborted", "TBF UL Aborted   "},
-   { "tbf.reused", "TBF Reused   "},
-   { "tbf.alloc.algo-a",   "TBF Alloc Algo A "},
-   { "tbf.alloc.algo-b",   "TBF Alloc Algo B "},
-   { "tbf.failed.egprs-only",  "TBF Failed EGPRS-only"},
-   { "rlc.sent",   "RLC Sent "},
-   { "rlc.resent", "RLC Resent   "},
-   { "rlc.restarted",  "RLC Restarted"},
-   { "rlc.stalled","RLC Stalled  "},
-   { "rlc.nacked", "RLC Nacked   "},
-   { "rlc.final_block_resent", "RLC Final Blk resent "},
-   { "rlc.ass.timedout",   "RLC Assign Timeout   "},
-   { "rlc.ass.failed", "RLC Assign Failed"},
-   { "rlc.ack.timedout",   "RLC Ack Timeout  "},
-   { "rlc.ack.failed", "RLC Ack Failed   "},
-   { "rlc.rel.timedout",   "RLC Release Timeout  "},
-   { "rlc.late-block", "RLC Late Block   "},
-   { "rlc.sent-dummy", "RLC Sent Dummy   "},
-   { "rlc.sent-control",   "RLC Sent Control "},
-   { "rlc.dl_bytes",   "RLC DL Bytes "},
-   { "rlc.dl_payload_bytes",   "RLC DL Payload Bytes "},
-   { "rlc.ul_bytes",   "RLC UL Bytes "},
-   { "rlc.ul_payload_bytes",   "RLC UL Payload Bytes "},
-   { "decode.errors",  "Decode Errors"},
-   { "sba.allocated",  "SBA Allocated"},
-   { "sba.freed",  "SBA Freed"},
-   { "sba.timedout",   "SBA Timeout  "},
-   { "llc.timeout","Timedout Frames  "},
-   { "llc.dropped","Dropped Frames   "},
-   { "llc.scheduled",  "Scheduled Frames "},
-   { "llc.dl_bytes",   "RLC encapsulated PDUs"},
-   { "llc.ul_bytes",   "full PDUs received   "},
-   { "rach.requests",  "RACH requests"},
-   { "11bit_rach.requests","11BIT_RACH requests  "},
-   { "spb.uplink_first_segment",   "First seg of UL SPB  "},
-   { "spb.uplink_second_segment",  "Second seg of UL SPB "},
-   { "spb.downlink_first_segment", "First seg of DL SPB  "},
-   { "spb.downlink_second_segment","Second seg of DL SPB "},
-   { "immediate.assignment_UL","Immediate Assign UL  "},
-   { "immediate.assignment_rej",   "Immediate Assign Rej "},
-   { "immediate.assignment_DL","Immediate Assign DL  "},
-   { "channel.request_description","Channel Request Desc "},
-   { "pkt.ul_assignment",   

[PATCH] osmo-pcu[master]: Move all rate counter related code together

2017-10-25 Thread Max
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/4413

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

Move all rate counter related code together

Change-Id: I795631752af3b9077a846c3123217e1deda52e86
Related: OS#1538
---
M src/bts.cpp
M src/bts.h
M src/gprs_rlcmac_sched.cpp
M src/gprs_rlcmac_ts_alloc.cpp
M src/llc.cpp
M src/pcu_ctr.h
M src/rlc.cpp
M src/sba.cpp
M src/tbf.cpp
M src/tbf_dl.cpp
M src/tbf_ul.cpp
11 files changed, 300 insertions(+), 288 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/13/4413/4

diff --git a/src/bts.cpp b/src/bts.cpp
index 0f7462a..16d9dba 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -30,6 +30,7 @@
 #include 
 
 extern "C" {
+   #include "pcu_ctr.h"
#include 
#include 
#include 
@@ -161,7 +162,7 @@
LOGP(DRLCMAC, LOGL_NOTICE,
"Late RLC block, FN delta: %d FN: %d curFN: %d\n",
delay, fn, current_frame_number());
-   rlc_late_block();
+   rlc_late_block(bts_data()->ctrs);
}
 
m_cur_blk_fn = fn;
@@ -506,10 +507,10 @@
uint16_t priority = 0;
bool failure = false;
 
-   rach_frame();
+   rach_frame(bts_data()->ctrs);
 
if (is_11bit)
-   rach_frame_11bit();
+   rach_frame_11bit(bts_data()->ctrs);
 
/* Determine full frame number */
Fn = rfn_to_fn(Fn);
@@ -590,7 +591,7 @@
plen = Encoding::write_immediate_assignment_reject(
immediate_assignment, ra, Fn,
burst_type);
-   immediate_assignment_reject();
+   immediate_assignment_reject(bts_data()->ctrs);
}
else {
LOGP(DRLCMAC, LOGL_DEBUG,
@@ -605,7 +606,7 @@
}
 
if (plen >= 0) {
-   immediate_assignment_ul_tbf();
+   immediate_assignment_ul_tbf(bts_data()->ctrs);
pcu_l1if_tx_agch(immediate_assignment, plen);
}
 
@@ -699,7 +700,7 @@
tbf->trx->arfcn, ts, tbf->tsc(), 7, poll,
tbf->poll_fn, m_bts.alpha, m_bts.gamma, -1);
if (plen >= 0) {
-   immediate_assignment_dl_tbf();
+   immediate_assignment_dl_tbf(bts_data()->ctrs);
pcu_l1if_tx_pch(immediate_assignment, plen, imsi);
}
 
@@ -1026,7 +1027,7 @@
 
 static inline void sched_ul_ass_or_rej(BTS *bts, gprs_rlcmac_bts *bts_data, 
struct gprs_rlcmac_dl_tbf *tbf)
 {
-   bts->channel_request_description();
+   channel_request_description(bts->bts_data()->ctrs);
 
/* This call will register the new TBF with the MS on success */
gprs_rlcmac_ul_tbf *ul_tbf = tbf_alloc_ul(bts_data, tbf->trx->trx_no, 
tbf->ms_class(),
@@ -1356,7 +1357,7 @@
else
bts()->send_gsmtap(PCU_GSMTAP_C_UL_CTRL, true, trx_no(), ts_no, 
GSMTAP_CHANNEL_PACCH, fn, data, data_len);
 
-   bts()->rlc_rcvd_control();
+   rlc_rcvd_control(bts_data()->ctrs);
switch (ul_control_block->u.MESSAGE_TYPE) {
case MT_PACKET_CONTROL_ACK:

rcv_control_ack(_control_block->u.Packet_Control_Acknowledgement, fn);
@@ -1377,7 +1378,7 @@
/* ignoring it. change the SI to not force sending these? */
break;
default:
-   bts()->decode_error();
+   decode_error(bts_data()->ctrs);
LOGP(DRLCMAC, LOGL_NOTICE,
"RX: [PCU <- BTS] unknown control block(%d) received\n",
ul_control_block->u.MESSAGE_TYPE);
@@ -1393,13 +1394,13 @@
 {
GprsCodingScheme cs = GprsCodingScheme::getBySizeUL(len);
if (!cs) {
-   bts()->decode_error();
+   decode_error(bts_data()->ctrs);
LOGP(DRLCMACUL, LOGL_ERROR, "Dropping data block with invalid"
"length: %d)\n", len);
return -EINVAL;
}
 
-   bts()->rlc_ul_bytes(len);
+   rlc_ul_bytes(bts_data()->ctrs, len);
 
LOGP(DRLCMACUL, LOGL_DEBUG, "Got RLC block, coding scheme: %s, "
"length: %d (%d))\n", cs.name(), len, cs.usedSizeUL());
@@ -1410,7 +1411,7 @@
if (cs.isEgprs())
return rcv_data_block(data, len, fn, meas, cs);
 
-   bts()->decode_error();
+   decode_error(bts_data()->ctrs);
LOGP(DRLCMACUL, LOGL_ERROR, "Unsupported coding scheme %s\n",
cs.name());
return -EINVAL;
@@ -1447,7 +1448,7 @@
LOGP(DRLCMACUL, LOGL_ERROR,
"Got %s RLC block but header parsing has failed\n",
cs.name());
-   bts()->decode_error();
+   decode_error(bts_data()->ctrs);
return rc;
}
 
diff --git a/src/bts.h b/src/bts.h
index 19d948a..d20f633 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -390,95 +390,6 @@

[PATCH] osmo-pcu[master]: Move all rate counter related code together

2017-10-25 Thread Max
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/4413

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

Move all rate counter related code together

Change-Id: I795631752af3b9077a846c3123217e1deda52e86
Related: OS#1538
---
M src/bts.cpp
M src/bts.h
M src/gprs_rlcmac_sched.cpp
M src/gprs_rlcmac_ts_alloc.cpp
M src/llc.cpp
M src/pcu_ctr.h
M src/rlc.cpp
M src/sba.cpp
M src/tbf.cpp
M src/tbf_dl.cpp
M src/tbf_ul.cpp
11 files changed, 303 insertions(+), 288 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/13/4413/3

diff --git a/src/bts.cpp b/src/bts.cpp
index 0f7462a..16d9dba 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -30,6 +30,7 @@
 #include 
 
 extern "C" {
+   #include "pcu_ctr.h"
#include 
#include 
#include 
@@ -161,7 +162,7 @@
LOGP(DRLCMAC, LOGL_NOTICE,
"Late RLC block, FN delta: %d FN: %d curFN: %d\n",
delay, fn, current_frame_number());
-   rlc_late_block();
+   rlc_late_block(bts_data()->ctrs);
}
 
m_cur_blk_fn = fn;
@@ -506,10 +507,10 @@
uint16_t priority = 0;
bool failure = false;
 
-   rach_frame();
+   rach_frame(bts_data()->ctrs);
 
if (is_11bit)
-   rach_frame_11bit();
+   rach_frame_11bit(bts_data()->ctrs);
 
/* Determine full frame number */
Fn = rfn_to_fn(Fn);
@@ -590,7 +591,7 @@
plen = Encoding::write_immediate_assignment_reject(
immediate_assignment, ra, Fn,
burst_type);
-   immediate_assignment_reject();
+   immediate_assignment_reject(bts_data()->ctrs);
}
else {
LOGP(DRLCMAC, LOGL_DEBUG,
@@ -605,7 +606,7 @@
}
 
if (plen >= 0) {
-   immediate_assignment_ul_tbf();
+   immediate_assignment_ul_tbf(bts_data()->ctrs);
pcu_l1if_tx_agch(immediate_assignment, plen);
}
 
@@ -699,7 +700,7 @@
tbf->trx->arfcn, ts, tbf->tsc(), 7, poll,
tbf->poll_fn, m_bts.alpha, m_bts.gamma, -1);
if (plen >= 0) {
-   immediate_assignment_dl_tbf();
+   immediate_assignment_dl_tbf(bts_data()->ctrs);
pcu_l1if_tx_pch(immediate_assignment, plen, imsi);
}
 
@@ -1026,7 +1027,7 @@
 
 static inline void sched_ul_ass_or_rej(BTS *bts, gprs_rlcmac_bts *bts_data, 
struct gprs_rlcmac_dl_tbf *tbf)
 {
-   bts->channel_request_description();
+   channel_request_description(bts->bts_data()->ctrs);
 
/* This call will register the new TBF with the MS on success */
gprs_rlcmac_ul_tbf *ul_tbf = tbf_alloc_ul(bts_data, tbf->trx->trx_no, 
tbf->ms_class(),
@@ -1356,7 +1357,7 @@
else
bts()->send_gsmtap(PCU_GSMTAP_C_UL_CTRL, true, trx_no(), ts_no, 
GSMTAP_CHANNEL_PACCH, fn, data, data_len);
 
-   bts()->rlc_rcvd_control();
+   rlc_rcvd_control(bts_data()->ctrs);
switch (ul_control_block->u.MESSAGE_TYPE) {
case MT_PACKET_CONTROL_ACK:

rcv_control_ack(_control_block->u.Packet_Control_Acknowledgement, fn);
@@ -1377,7 +1378,7 @@
/* ignoring it. change the SI to not force sending these? */
break;
default:
-   bts()->decode_error();
+   decode_error(bts_data()->ctrs);
LOGP(DRLCMAC, LOGL_NOTICE,
"RX: [PCU <- BTS] unknown control block(%d) received\n",
ul_control_block->u.MESSAGE_TYPE);
@@ -1393,13 +1394,13 @@
 {
GprsCodingScheme cs = GprsCodingScheme::getBySizeUL(len);
if (!cs) {
-   bts()->decode_error();
+   decode_error(bts_data()->ctrs);
LOGP(DRLCMACUL, LOGL_ERROR, "Dropping data block with invalid"
"length: %d)\n", len);
return -EINVAL;
}
 
-   bts()->rlc_ul_bytes(len);
+   rlc_ul_bytes(bts_data()->ctrs, len);
 
LOGP(DRLCMACUL, LOGL_DEBUG, "Got RLC block, coding scheme: %s, "
"length: %d (%d))\n", cs.name(), len, cs.usedSizeUL());
@@ -1410,7 +1411,7 @@
if (cs.isEgprs())
return rcv_data_block(data, len, fn, meas, cs);
 
-   bts()->decode_error();
+   decode_error(bts_data()->ctrs);
LOGP(DRLCMACUL, LOGL_ERROR, "Unsupported coding scheme %s\n",
cs.name());
return -EINVAL;
@@ -1447,7 +1448,7 @@
LOGP(DRLCMACUL, LOGL_ERROR,
"Got %s RLC block but header parsing has failed\n",
cs.name());
-   bts()->decode_error();
+   decode_error(bts_data()->ctrs);
return rc;
}
 
diff --git a/src/bts.h b/src/bts.h
index 19d948a..d20f633 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -390,95 +390,6 @@

[PATCH] osmo-pcu[master]: Initialize logging before initializing rate_ctr

2017-10-25 Thread Max
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/4411

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

Initialize logging before initializing rate_ctr

The library code for rate counter initialization might already want to
log something (particularly after
Ifc6ac824f5dae9a848bb4a5d067c64a69eb40b56 in libosmocore), so the
logging framework must be initialized before.

Before the rate counters were initialized implicitly in BTS
constructor which makes proper logging init impossible.

Fix this by using explicit init similar to the way we do it for vty.

Change-Id: Ibf557d21552d9ff1d6b595b0594f2c7b18db4692
---
M src/Makefile.am
M src/bts.cpp
M src/bts.h
A src/pcu_ctr.c
A src/pcu_ctr.h
M src/pcu_main.cpp
M src/pcu_vty.c
M tests/alloc/AllocTest.cpp
M tests/tbf/TbfTest.cpp
M tests/types/TypesTest.cpp
10 files changed, 191 insertions(+), 121 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/11/4411/5

diff --git a/src/Makefile.am b/src/Makefile.am
index 1543851..67291ae 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -47,6 +47,7 @@
gprs_ms_storage.cpp \
gsm_timer.cpp \
pcu_l1_if.cpp \
+   pcu_ctr.c \
pcu_vty.c \
pcu_vty_functions.cpp \
tbf.cpp \
@@ -79,6 +80,7 @@
gprs_ms_storage.h \
pcu_l1_if.h \
gsm_timer.h \
+   pcu_ctr.h \
pcu_vty.h \
pcu_vty_functions.h \
tbf.h \
diff --git a/src/bts.cpp b/src/bts.cpp
index b768569..0f7462a 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -50,107 +50,6 @@
 
 static BTS s_bts;
 
-/**
- * For gcc-4.4 compat do not use extended initializer list but keep the
- * order from the enum here. Once we support GCC4.7 and up we can change
- * the code below.
- */
-static const struct rate_ctr_desc bts_ctr_description[] = {
-   { "tbf.dl.alloc",   "TBF DL Allocated "},
-   { "tbf.dl.freed",   "TBF DL Freed "},
-   { "tbf.dl.aborted", "TBF DL Aborted   "},
-   { "tbf.ul.alloc",   "TBF UL Allocated "},
-   { "tbf.ul.freed",   "TBF UL Freed "},
-   { "tbf.ul.aborted", "TBF UL Aborted   "},
-   { "tbf.reused", "TBF Reused   "},
-   { "tbf.alloc.algo-a",   "TBF Alloc Algo A "},
-   { "tbf.alloc.algo-b",   "TBF Alloc Algo B "},
-   { "tbf.failed.egprs-only",  "TBF Failed EGPRS-only"},
-   { "rlc.sent",   "RLC Sent "},
-   { "rlc.resent", "RLC Resent   "},
-   { "rlc.restarted",  "RLC Restarted"},
-   { "rlc.stalled","RLC Stalled  "},
-   { "rlc.nacked", "RLC Nacked   "},
-   { "rlc.final_block_resent", "RLC Final Blk resent "},
-   { "rlc.ass.timedout",   "RLC Assign Timeout   "},
-   { "rlc.ass.failed", "RLC Assign Failed"},
-   { "rlc.ack.timedout",   "RLC Ack Timeout  "},
-   { "rlc.ack.failed", "RLC Ack Failed   "},
-   { "rlc.rel.timedout",   "RLC Release Timeout  "},
-   { "rlc.late-block", "RLC Late Block   "},
-   { "rlc.sent-dummy", "RLC Sent Dummy   "},
-   { "rlc.sent-control",   "RLC Sent Control "},
-   { "rlc.dl_bytes",   "RLC DL Bytes "},
-   { "rlc.dl_payload_bytes",   "RLC DL Payload Bytes "},
-   { "rlc.ul_bytes",   "RLC UL Bytes "},
-   { "rlc.ul_payload_bytes",   "RLC UL Payload Bytes "},
-   { "decode.errors",  "Decode Errors"},
-   { "sba.allocated",  "SBA Allocated"},
-   { "sba.freed",  "SBA Freed"},
-   { "sba.timedout",   "SBA Timeout  "},
-   { "llc.timeout","Timedout Frames  "},
-   { "llc.dropped","Dropped Frames   "},
-   { "llc.scheduled",  "Scheduled Frames "},
-   { "llc.dl_bytes",   "RLC encapsulated PDUs"},
-   { "llc.ul_bytes",   "full PDUs received   "},
-   { "rach.requests",  "RACH requests"},
-   { "11bit_rach.requests","11BIT_RACH requests  "},
-   { "spb.uplink_first_segment",   "First seg of UL SPB  "},
-   { "spb.uplink_second_segment",  "Second seg of UL SPB "},
-   { "spb.downlink_first_segment", "First seg of DL SPB  "},
-   { "spb.downlink_second_segment","Second seg of DL SPB "},
-   { "immediate.assignment_UL","Immediate Assign UL  "},
-   { "immediate.assignment_rej",   "Immediate Assign Rej "},
-   { "immediate.assignment_DL","Immediate Assign DL  "},
-   { "channel.request_description","Channel Request Desc "},
-   { "pkt.ul_assignment",   

osmo-hlr[master]: ctrl: completely replace all CTRL commands

2017-10-25 Thread Neels Hofmeyr

Patch Set 6:

(3 comments)

all in all I think this patch can stay as it is, but I need to fix the db API 
docs:

https://gerrit.osmocom.org/#/c/4311/6/src/ctrl.c
File src/ctrl.c:

Line 233:   aud3g.algo = OSMO_AUTH_ALG_NONE;
> I'm confused by this part. In case of ENOENT error we will continue with pr
ah, I think that might have come from the VTY code where I used to print "2G 
auth data: none" in some earlier state of the patches, so that I wanted to 
output absence and still want to call the printing functions below; doesn't 
apply here, that's right. Returning immediately is however just a minor 
optimization, really.

In general, ENOENT indicates that no auth data is present, which is a valid 
situation.


Line 258:   rc = db_get_auth_data(hlr->dbc, subscr.imsi, , , 
NULL);
> If someone later have to change db-get_auth_data() they got to make sure no
ENOENT rc is a concept used throughout the db API of osmo-hlr, it is imperative 
to not break that in case of changes. It is documented for all the db functions.

...at least I thought so, I see now that db_get_auth_data() was changed to the 
ENOENT rc but I forgot to adjust the API comment. Other functions also need 
fixing of their API doc, it should all read something like db_subscr_nam()'s 
doc:

 * Returns 0 on success, -ENOENT when the given IMSI does not exist, -EINVAL if
 * the SQL statement could not be composed, -ENOEXEC if running the SQL
 * statement failed, -EIO if the amount of rows modified is unexpected.


Line 262:   aud3g.algo = OSMO_AUTH_ALG_NONE;
> Same here. Maybe move it to separate inline function?
here it makes sense to continue. We gather data, then print it below. Note the 
print_subscr_info() that we still want to call even if no auth data is present. 
So I would keep this as is, so that ENOENT makes sure to mark auth data as not 
present and then go on to print whatever we got.

I think the two instances of rc evaluation don't justify effort to undup the 
code yet... but it would make sense in principle, agreed.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I98ee6a06b3aa6a67adb868e0b63b0e04eb42eb50
Gerrit-PatchSet: 6
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


openbsc[master]: debian/rules: show testsuite.log when tests are failing

2017-10-25 Thread Neels Hofmeyr

Patch Set 1: Code-Review+2

we already have this in many other repositories and it works well

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I30151897d621a1428095006e1f0e8a47059de4cd
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


[PATCH] openbsc[master]: debian/rules: show testsuite.log when tests are failing

2017-10-25 Thread Neels Hofmeyr

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

debian/rules: show testsuite.log when tests are failing

Change-Id: I30151897d621a1428095006e1f0e8a47059de4cd
---
M debian/rules
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/14/4414/1

diff --git a/debian/rules b/debian/rules
index 4e187a6..2d1effe 100755
--- a/debian/rules
+++ b/debian/rules
@@ -30,3 +30,6 @@
echo $(VERSION) > openbsc/.tarball-version
dh_auto_configure --sourcedirectory=openbsc -- --enable-nat 
--enable-osmo-bsc --enable-smpp
 
+# Print test results in case of a failure
+override_dh_auto_test:
+   dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I30151897d621a1428095006e1f0e8a47059de4cd
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 


[PATCH] osmo-pcu[master]: Initialize logging before initializing rate_ctr

2017-10-25 Thread Max
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/4411

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

Initialize logging before initializing rate_ctr

The library code for rate counter initialization might already want to
log something (particularly after
Ifc6ac824f5dae9a848bb4a5d067c64a69eb40b56 in libosmocore), so the
logging framework must be initialized before.

Before the rate counters were initialized implicitly in BTS
constructor which makes proper logging init impossible.

Fix this by using explicit init similar to the way we do it for vty.

Change-Id: Ibf557d21552d9ff1d6b595b0594f2c7b18db4692
---
M src/Makefile.am
M src/bts.cpp
M src/bts.h
A src/pcu_ctr.c
A src/pcu_ctr.h
M src/pcu_main.cpp
M src/pcu_vty.c
M tests/alloc/AllocTest.cpp
M tests/tbf/TbfTest.cpp
M tests/types/TypesTest.cpp
10 files changed, 191 insertions(+), 121 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/11/4411/4

diff --git a/src/Makefile.am b/src/Makefile.am
index 1543851..67291ae 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -47,6 +47,7 @@
gprs_ms_storage.cpp \
gsm_timer.cpp \
pcu_l1_if.cpp \
+   pcu_ctr.c \
pcu_vty.c \
pcu_vty_functions.cpp \
tbf.cpp \
@@ -79,6 +80,7 @@
gprs_ms_storage.h \
pcu_l1_if.h \
gsm_timer.h \
+   pcu_ctr.h \
pcu_vty.h \
pcu_vty_functions.h \
tbf.h \
diff --git a/src/bts.cpp b/src/bts.cpp
index b768569..0f7462a 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -50,107 +50,6 @@
 
 static BTS s_bts;
 
-/**
- * For gcc-4.4 compat do not use extended initializer list but keep the
- * order from the enum here. Once we support GCC4.7 and up we can change
- * the code below.
- */
-static const struct rate_ctr_desc bts_ctr_description[] = {
-   { "tbf.dl.alloc",   "TBF DL Allocated "},
-   { "tbf.dl.freed",   "TBF DL Freed "},
-   { "tbf.dl.aborted", "TBF DL Aborted   "},
-   { "tbf.ul.alloc",   "TBF UL Allocated "},
-   { "tbf.ul.freed",   "TBF UL Freed "},
-   { "tbf.ul.aborted", "TBF UL Aborted   "},
-   { "tbf.reused", "TBF Reused   "},
-   { "tbf.alloc.algo-a",   "TBF Alloc Algo A "},
-   { "tbf.alloc.algo-b",   "TBF Alloc Algo B "},
-   { "tbf.failed.egprs-only",  "TBF Failed EGPRS-only"},
-   { "rlc.sent",   "RLC Sent "},
-   { "rlc.resent", "RLC Resent   "},
-   { "rlc.restarted",  "RLC Restarted"},
-   { "rlc.stalled","RLC Stalled  "},
-   { "rlc.nacked", "RLC Nacked   "},
-   { "rlc.final_block_resent", "RLC Final Blk resent "},
-   { "rlc.ass.timedout",   "RLC Assign Timeout   "},
-   { "rlc.ass.failed", "RLC Assign Failed"},
-   { "rlc.ack.timedout",   "RLC Ack Timeout  "},
-   { "rlc.ack.failed", "RLC Ack Failed   "},
-   { "rlc.rel.timedout",   "RLC Release Timeout  "},
-   { "rlc.late-block", "RLC Late Block   "},
-   { "rlc.sent-dummy", "RLC Sent Dummy   "},
-   { "rlc.sent-control",   "RLC Sent Control "},
-   { "rlc.dl_bytes",   "RLC DL Bytes "},
-   { "rlc.dl_payload_bytes",   "RLC DL Payload Bytes "},
-   { "rlc.ul_bytes",   "RLC UL Bytes "},
-   { "rlc.ul_payload_bytes",   "RLC UL Payload Bytes "},
-   { "decode.errors",  "Decode Errors"},
-   { "sba.allocated",  "SBA Allocated"},
-   { "sba.freed",  "SBA Freed"},
-   { "sba.timedout",   "SBA Timeout  "},
-   { "llc.timeout","Timedout Frames  "},
-   { "llc.dropped","Dropped Frames   "},
-   { "llc.scheduled",  "Scheduled Frames "},
-   { "llc.dl_bytes",   "RLC encapsulated PDUs"},
-   { "llc.ul_bytes",   "full PDUs received   "},
-   { "rach.requests",  "RACH requests"},
-   { "11bit_rach.requests","11BIT_RACH requests  "},
-   { "spb.uplink_first_segment",   "First seg of UL SPB  "},
-   { "spb.uplink_second_segment",  "Second seg of UL SPB "},
-   { "spb.downlink_first_segment", "First seg of DL SPB  "},
-   { "spb.downlink_second_segment","Second seg of DL SPB "},
-   { "immediate.assignment_UL","Immediate Assign UL  "},
-   { "immediate.assignment_rej",   "Immediate Assign Rej "},
-   { "immediate.assignment_DL","Immediate Assign DL  "},
-   { "channel.request_description","Channel Request Desc "},
-   { "pkt.ul_assignment",   

osmo-pcu[master]: Initialize logging before initializing rate_ctr

2017-10-25 Thread Max

Patch Set 3:

(1 comment)

> why the extensive move / separate files are needed

There's a ticket about getting rid of BTS singleton so this seems like a good 
opportunity to move it. Besides, once it does not operate on BTS members it has 
nothing to do with it so it's better to put this into separate file.

https://gerrit.osmocom.org/#/c/4411/3/src/bts.h
File src/bts.h:

Line 220:   struct rate_ctr_group *ctrs;
> curious, any reason to place it squarely in the middle between lots of unre
Where would you prefer to see it?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf557d21552d9ff1d6b595b0594f2c7b18db4692
Gerrit-PatchSet: 3
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


osmo-pcu[master]: Initialize logging before initializing rate_ctr

2017-10-25 Thread Neels Hofmeyr

Patch Set 3:

(3 comments)

There are numerous ways to solve chicken/eggs like this... ideas:

Wrap m_ratectrs in a getter function, which allocates the rate counters the 
first time the getter is called (only if m_ratectrs == NULL), instead of doing 
so directly in the constructor.

or

Make the global singleton BTS dynamically allocated (a pointer instead of an 
instance) and call the constructor after the logging init; also move the call 
to bts_main_data() further down in pcu_main.c.

In this patch, I wonder why the extensive move / separate files are needed. Is 
that a cosmetic choice or a compilation requirement?

https://gerrit.osmocom.org/#/c/4411/3/src/bts.h
File src/bts.h:

Line 220:   struct rate_ctr_group *ctrs;
curious, any reason to place it squarely in the middle between lots of 
unrelated uints?


https://gerrit.osmocom.org/#/c/4411/3/src/pcu_ctr.c
File src/pcu_ctr.c:

Line 5:  * Author: Max Suraev 
"sysmocom" not capitalized, also Harald says to add a dash, which I wasn't 
aware of until recently. I usually also add a mail address...

  by sysmocom - s.f.m.c. GmbH 


Line 32:const struct rate_ctr_desc bts_ctr_description[] = {
I assume these structs aren't copied by the rate_ctr_init(?), in which case 
they must be static.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf557d21552d9ff1d6b595b0594f2c7b18db4692
Gerrit-PatchSet: 3
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


[PATCH] osmo-pcu[master]: Move all rate counter related code together

2017-10-25 Thread Max

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

Move all rate counter related code together

Change-Id: I795631752af3b9077a846c3123217e1deda52e86
Related: OS#1541
---
M src/bts.cpp
M src/bts.h
M src/gprs_rlcmac_sched.cpp
M src/gprs_rlcmac_ts_alloc.cpp
M src/llc.cpp
M src/pcu_ctr.h
M src/rlc.cpp
M src/sba.cpp
M src/tbf.cpp
M src/tbf_dl.cpp
M src/tbf_ul.cpp
11 files changed, 303 insertions(+), 288 deletions(-)


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

diff --git a/src/bts.cpp b/src/bts.cpp
index 0f7462a..16d9dba 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -30,6 +30,7 @@
 #include 
 
 extern "C" {
+   #include "pcu_ctr.h"
#include 
#include 
#include 
@@ -161,7 +162,7 @@
LOGP(DRLCMAC, LOGL_NOTICE,
"Late RLC block, FN delta: %d FN: %d curFN: %d\n",
delay, fn, current_frame_number());
-   rlc_late_block();
+   rlc_late_block(bts_data()->ctrs);
}
 
m_cur_blk_fn = fn;
@@ -506,10 +507,10 @@
uint16_t priority = 0;
bool failure = false;
 
-   rach_frame();
+   rach_frame(bts_data()->ctrs);
 
if (is_11bit)
-   rach_frame_11bit();
+   rach_frame_11bit(bts_data()->ctrs);
 
/* Determine full frame number */
Fn = rfn_to_fn(Fn);
@@ -590,7 +591,7 @@
plen = Encoding::write_immediate_assignment_reject(
immediate_assignment, ra, Fn,
burst_type);
-   immediate_assignment_reject();
+   immediate_assignment_reject(bts_data()->ctrs);
}
else {
LOGP(DRLCMAC, LOGL_DEBUG,
@@ -605,7 +606,7 @@
}
 
if (plen >= 0) {
-   immediate_assignment_ul_tbf();
+   immediate_assignment_ul_tbf(bts_data()->ctrs);
pcu_l1if_tx_agch(immediate_assignment, plen);
}
 
@@ -699,7 +700,7 @@
tbf->trx->arfcn, ts, tbf->tsc(), 7, poll,
tbf->poll_fn, m_bts.alpha, m_bts.gamma, -1);
if (plen >= 0) {
-   immediate_assignment_dl_tbf();
+   immediate_assignment_dl_tbf(bts_data()->ctrs);
pcu_l1if_tx_pch(immediate_assignment, plen, imsi);
}
 
@@ -1026,7 +1027,7 @@
 
 static inline void sched_ul_ass_or_rej(BTS *bts, gprs_rlcmac_bts *bts_data, 
struct gprs_rlcmac_dl_tbf *tbf)
 {
-   bts->channel_request_description();
+   channel_request_description(bts->bts_data()->ctrs);
 
/* This call will register the new TBF with the MS on success */
gprs_rlcmac_ul_tbf *ul_tbf = tbf_alloc_ul(bts_data, tbf->trx->trx_no, 
tbf->ms_class(),
@@ -1356,7 +1357,7 @@
else
bts()->send_gsmtap(PCU_GSMTAP_C_UL_CTRL, true, trx_no(), ts_no, 
GSMTAP_CHANNEL_PACCH, fn, data, data_len);
 
-   bts()->rlc_rcvd_control();
+   rlc_rcvd_control(bts_data()->ctrs);
switch (ul_control_block->u.MESSAGE_TYPE) {
case MT_PACKET_CONTROL_ACK:

rcv_control_ack(_control_block->u.Packet_Control_Acknowledgement, fn);
@@ -1377,7 +1378,7 @@
/* ignoring it. change the SI to not force sending these? */
break;
default:
-   bts()->decode_error();
+   decode_error(bts_data()->ctrs);
LOGP(DRLCMAC, LOGL_NOTICE,
"RX: [PCU <- BTS] unknown control block(%d) received\n",
ul_control_block->u.MESSAGE_TYPE);
@@ -1393,13 +1394,13 @@
 {
GprsCodingScheme cs = GprsCodingScheme::getBySizeUL(len);
if (!cs) {
-   bts()->decode_error();
+   decode_error(bts_data()->ctrs);
LOGP(DRLCMACUL, LOGL_ERROR, "Dropping data block with invalid"
"length: %d)\n", len);
return -EINVAL;
}
 
-   bts()->rlc_ul_bytes(len);
+   rlc_ul_bytes(bts_data()->ctrs, len);
 
LOGP(DRLCMACUL, LOGL_DEBUG, "Got RLC block, coding scheme: %s, "
"length: %d (%d))\n", cs.name(), len, cs.usedSizeUL());
@@ -1410,7 +1411,7 @@
if (cs.isEgprs())
return rcv_data_block(data, len, fn, meas, cs);
 
-   bts()->decode_error();
+   decode_error(bts_data()->ctrs);
LOGP(DRLCMACUL, LOGL_ERROR, "Unsupported coding scheme %s\n",
cs.name());
return -EINVAL;
@@ -1447,7 +1448,7 @@
LOGP(DRLCMACUL, LOGL_ERROR,
"Got %s RLC block but header parsing has failed\n",
cs.name());
-   bts()->decode_error();
+   decode_error(bts_data()->ctrs);
return rc;
}
 
diff --git a/src/bts.h b/src/bts.h
index c2177ae..ec02b8c 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -387,95 +387,6 @@
  uint8_t ts_no, uint8_t channel, uint32_t fn,
  const uint8_t 

[MERGED] osmo-sgsn[master]: configure: fix libosmo-sigtran dependency

2017-10-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: configure: fix libosmo-sigtran dependency
..


configure: fix libosmo-sigtran dependency

the configure script requires libosmo-sigtran even when IU is not
enabled.

move the line that checks for libosmo-sigtran into the conditional
branch for IU

Change-Id: I72819462db0b4656fabaa80731342d06ae91fcdf
---
M configure.ac
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/configure.ac b/configure.ac
index c8e23e5..0daa5e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,13 +46,13 @@
 PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.2.0)
 PKG_CHECK_MODULES(LIBOSMOGB, libosmogb >= 0.6.4)
 PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.0.1)
-PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran) # TODO version?
 PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5)
 
 # Enable/disable 3G aka IuPS + IuCS support?
 AC_ARG_ENABLE([iu], [AS_HELP_STRING([--enable-iu], [Build 3G support, aka IuPS 
and IuCS interfaces])],
 [osmo_ac_iu="$enableval"],[osmo_ac_iu="no"])
 if test "x$osmo_ac_iu" = "xyes" ; then
+PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran) # TODO version?
 PKG_CHECK_MODULES(LIBASN1C, libasn1c) # TODO version?
 PKG_CHECK_MODULES(LIBOSMORANAP, libosmo-ranap) # TODO version?
 AC_DEFINE(BUILD_IU, 1, [Define if we want to build IuPS and IuCS 
interfaces support])

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I72819462db0b4656fabaa80731342d06ae91fcdf
Gerrit-PatchSet: 4
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[PATCH] osmo-pcu[master]: Initialize logging before initializing rate_ctr

2017-10-25 Thread Max
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/4411

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

Initialize logging before initializing rate_ctr

The library code for rate counter initialization might already want to
log something (particularly after
Ifc6ac824f5dae9a848bb4a5d067c64a69eb40b56 in libosmocore), so the
logging framework must be initialized before.

Before the rate counters were initialized implicitly in BTS
constructor which makes proper logging init impossible.

Fix this by using explicit init similar to the way we do it for vty.

Change-Id: Ibf557d21552d9ff1d6b595b0594f2c7b18db4692
---
M src/Makefile.am
M src/bts.cpp
M src/bts.h
A src/pcu_ctr.c
A src/pcu_ctr.h
M src/pcu_main.cpp
M src/pcu_vty.c
M tests/alloc/AllocTest.cpp
M tests/tbf/TbfTest.cpp
M tests/types/TypesTest.cpp
10 files changed, 189 insertions(+), 122 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/11/4411/3

diff --git a/src/Makefile.am b/src/Makefile.am
index 1543851..67291ae 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -47,6 +47,7 @@
gprs_ms_storage.cpp \
gsm_timer.cpp \
pcu_l1_if.cpp \
+   pcu_ctr.c \
pcu_vty.c \
pcu_vty_functions.cpp \
tbf.cpp \
@@ -79,6 +80,7 @@
gprs_ms_storage.h \
pcu_l1_if.h \
gsm_timer.h \
+   pcu_ctr.h \
pcu_vty.h \
pcu_vty_functions.h \
tbf.h \
diff --git a/src/bts.cpp b/src/bts.cpp
index b768569..0f7462a 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -50,107 +50,6 @@
 
 static BTS s_bts;
 
-/**
- * For gcc-4.4 compat do not use extended initializer list but keep the
- * order from the enum here. Once we support GCC4.7 and up we can change
- * the code below.
- */
-static const struct rate_ctr_desc bts_ctr_description[] = {
-   { "tbf.dl.alloc",   "TBF DL Allocated "},
-   { "tbf.dl.freed",   "TBF DL Freed "},
-   { "tbf.dl.aborted", "TBF DL Aborted   "},
-   { "tbf.ul.alloc",   "TBF UL Allocated "},
-   { "tbf.ul.freed",   "TBF UL Freed "},
-   { "tbf.ul.aborted", "TBF UL Aborted   "},
-   { "tbf.reused", "TBF Reused   "},
-   { "tbf.alloc.algo-a",   "TBF Alloc Algo A "},
-   { "tbf.alloc.algo-b",   "TBF Alloc Algo B "},
-   { "tbf.failed.egprs-only",  "TBF Failed EGPRS-only"},
-   { "rlc.sent",   "RLC Sent "},
-   { "rlc.resent", "RLC Resent   "},
-   { "rlc.restarted",  "RLC Restarted"},
-   { "rlc.stalled","RLC Stalled  "},
-   { "rlc.nacked", "RLC Nacked   "},
-   { "rlc.final_block_resent", "RLC Final Blk resent "},
-   { "rlc.ass.timedout",   "RLC Assign Timeout   "},
-   { "rlc.ass.failed", "RLC Assign Failed"},
-   { "rlc.ack.timedout",   "RLC Ack Timeout  "},
-   { "rlc.ack.failed", "RLC Ack Failed   "},
-   { "rlc.rel.timedout",   "RLC Release Timeout  "},
-   { "rlc.late-block", "RLC Late Block   "},
-   { "rlc.sent-dummy", "RLC Sent Dummy   "},
-   { "rlc.sent-control",   "RLC Sent Control "},
-   { "rlc.dl_bytes",   "RLC DL Bytes "},
-   { "rlc.dl_payload_bytes",   "RLC DL Payload Bytes "},
-   { "rlc.ul_bytes",   "RLC UL Bytes "},
-   { "rlc.ul_payload_bytes",   "RLC UL Payload Bytes "},
-   { "decode.errors",  "Decode Errors"},
-   { "sba.allocated",  "SBA Allocated"},
-   { "sba.freed",  "SBA Freed"},
-   { "sba.timedout",   "SBA Timeout  "},
-   { "llc.timeout","Timedout Frames  "},
-   { "llc.dropped","Dropped Frames   "},
-   { "llc.scheduled",  "Scheduled Frames "},
-   { "llc.dl_bytes",   "RLC encapsulated PDUs"},
-   { "llc.ul_bytes",   "full PDUs received   "},
-   { "rach.requests",  "RACH requests"},
-   { "11bit_rach.requests","11BIT_RACH requests  "},
-   { "spb.uplink_first_segment",   "First seg of UL SPB  "},
-   { "spb.uplink_second_segment",  "Second seg of UL SPB "},
-   { "spb.downlink_first_segment", "First seg of DL SPB  "},
-   { "spb.downlink_second_segment","Second seg of DL SPB "},
-   { "immediate.assignment_UL","Immediate Assign UL  "},
-   { "immediate.assignment_rej",   "Immediate Assign Rej "},
-   { "immediate.assignment_DL","Immediate Assign DL  "},
-   { "channel.request_description","Channel Request Desc "},
-   { "pkt.ul_assignment",   

[MERGED] osmo-sgsn[master]: non-iu-build: guard vty libosmo-sigtran function calls.

2017-10-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: non-iu-build: guard vty libosmo-sigtran function calls.
..


non-iu-build: guard vty libosmo-sigtran function calls.

The function calls osmo_ss7_vty_go_parent() and gtphub_vty_is_config_node()
are not guarded by an ifdef. The functions are only needed for IU
support where libosmo-sigtran is used.

Guard the function calls with a BUILD_IU

Change-Id: I1c609ef0c344ce825c313335c7e084bf97159262
---
M src/gprs/gtphub_main.c
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/gprs/gtphub_main.c b/src/gprs/gtphub_main.c
index 782afb3..c3e25d5 100644
--- a/src/gprs/gtphub_main.c
+++ b/src/gprs/gtphub_main.c
@@ -115,6 +115,7 @@
}
 }
 
+#if BUILD_IU
 int gtphub_vty_go_parent(struct vty *vty)
 {
switch (vty->node) {
@@ -124,13 +125,16 @@
 
return vty->node;
 }
+#endif
 
 int gtphub_vty_is_config_node(struct vty *vty, int node)
 {
/* Check if libosmo-sccp declares the node in
 * question as config node */
+#if BUILD_IU
if (osmo_ss7_is_config_node(vty, node))
return 1;
+#endif
 
switch (node) {
/* add items that are not config */
@@ -145,7 +149,9 @@
 static struct vty_app_info vty_info = {
.name   = "OsmoGTPhub",
.version= PACKAGE_VERSION,
+#if BUILD_IU
.go_parent_cb   = gtphub_vty_go_parent,
+#endif
.is_config_node = gtphub_vty_is_config_node,
 };
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1c609ef0c344ce825c313335c7e084bf97159262
Gerrit-PatchSet: 4
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: neels 


[MERGED] osmo-sgsn[master]: log: fix default loglevels

2017-10-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: log: fix default loglevels
..


log: fix default loglevels

for some log categories the default loglevel is far to verbose.

downgrade all loglevels to LOGL_NOTICE

Change-Id: I3a427ce201c96338a00a84d737d090ac1a77a29f
---
M src/gprs/sgsn_main.c
1 file changed, 9 insertions(+), 9 deletions(-)

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



diff --git a/src/gprs/sgsn_main.c b/src/gprs/sgsn_main.c
index 7036bf6..e48d8d1 100644
--- a/src/gprs/sgsn_main.c
+++ b/src/gprs/sgsn_main.c
@@ -302,47 +302,47 @@
[DGPRS] = {
.name = "DGPRS",
.description = "GPRS Packet Service",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
+   .enabled = 1, .loglevel = LOGL_NOTICE,
},
[DNS] = {
.name = "DNS",
.description = "GPRS Network Service (NS)",
-   .enabled = 1, .loglevel = LOGL_INFO,
+   .enabled = 1, .loglevel = LOGL_NOTICE,
},
[DBSSGP] = {
.name = "DBSSGP",
.description = "GPRS BSS Gateway Protocol (BSSGP)",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
+   .enabled = 1, .loglevel = LOGL_NOTICE,
},
[DLLC] = {
.name = "DLLC",
.description = "GPRS Logical Link Control Protocol (LLC)",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
+   .enabled = 1, .loglevel = LOGL_NOTICE,
},
[DSNDCP] = {
.name = "DSNDCP",
.description = "GPRS Sub-Network Dependent Control Protocol 
(SNDCP)",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
+   .enabled = 1, .loglevel = LOGL_NOTICE,
},
[DRANAP] = {
.name = "DRANAP",
.description = "RAN Application Part (RANAP)",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
+   .enabled = 1, .loglevel = LOGL_NOTICE,
},
[DSUA] = {
.name = "DSUA",
.description = "SCCP User Adaptation (SUA)",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
+   .enabled = 1, .loglevel = LOGL_NOTICE,
},
[DSLHC] = {
.name = "DSLHC",
.description = "RFC1144 TCP/IP Header compression (SLHC)",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
+   .enabled = 1, .loglevel = LOGL_NOTICE,
},
[DV42BIS] = {
.name = "DV42BIS",
.description = "V.42bis data compression (SNDCP)",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
+   .enabled = 1, .loglevel = LOGL_NOTICE,
}
 };
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3a427ce201c96338a00a84d737d090ac1a77a29f
Gerrit-PatchSet: 5
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 


[PATCH] osmo-pcu[master]: Initialize logging before initializing rate_ctr

2017-10-25 Thread Max
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/4411

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

Initialize logging before initializing rate_ctr

The library code for rate counter initialization might already want to
log something (particularly after
Ifc6ac824f5dae9a848bb4a5d067c64a69eb40b56 in libosmocore), so the
logging framework must be initialized before.

Before the rate counters were initialized implicitly in BTS
constructor which makes proper logging init impossible.

Fix this by using explicit init similar to the way we do it for vty.

Change-Id: Ibf557d21552d9ff1d6b595b0594f2c7b18db4692
---
M src/bts.cpp
M src/bts.h
M src/pcu_main.cpp
M src/pcu_vty.c
M src/pcu_vty.h
M tests/alloc/AllocTest.cpp
M tests/tbf/TbfTest.cpp
M tests/types/TypesTest.cpp
8 files changed, 129 insertions(+), 121 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/11/4411/2

diff --git a/src/bts.cpp b/src/bts.cpp
index b768569..0f7462a 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -50,107 +50,6 @@
 
 static BTS s_bts;
 
-/**
- * For gcc-4.4 compat do not use extended initializer list but keep the
- * order from the enum here. Once we support GCC4.7 and up we can change
- * the code below.
- */
-static const struct rate_ctr_desc bts_ctr_description[] = {
-   { "tbf.dl.alloc",   "TBF DL Allocated "},
-   { "tbf.dl.freed",   "TBF DL Freed "},
-   { "tbf.dl.aborted", "TBF DL Aborted   "},
-   { "tbf.ul.alloc",   "TBF UL Allocated "},
-   { "tbf.ul.freed",   "TBF UL Freed "},
-   { "tbf.ul.aborted", "TBF UL Aborted   "},
-   { "tbf.reused", "TBF Reused   "},
-   { "tbf.alloc.algo-a",   "TBF Alloc Algo A "},
-   { "tbf.alloc.algo-b",   "TBF Alloc Algo B "},
-   { "tbf.failed.egprs-only",  "TBF Failed EGPRS-only"},
-   { "rlc.sent",   "RLC Sent "},
-   { "rlc.resent", "RLC Resent   "},
-   { "rlc.restarted",  "RLC Restarted"},
-   { "rlc.stalled","RLC Stalled  "},
-   { "rlc.nacked", "RLC Nacked   "},
-   { "rlc.final_block_resent", "RLC Final Blk resent "},
-   { "rlc.ass.timedout",   "RLC Assign Timeout   "},
-   { "rlc.ass.failed", "RLC Assign Failed"},
-   { "rlc.ack.timedout",   "RLC Ack Timeout  "},
-   { "rlc.ack.failed", "RLC Ack Failed   "},
-   { "rlc.rel.timedout",   "RLC Release Timeout  "},
-   { "rlc.late-block", "RLC Late Block   "},
-   { "rlc.sent-dummy", "RLC Sent Dummy   "},
-   { "rlc.sent-control",   "RLC Sent Control "},
-   { "rlc.dl_bytes",   "RLC DL Bytes "},
-   { "rlc.dl_payload_bytes",   "RLC DL Payload Bytes "},
-   { "rlc.ul_bytes",   "RLC UL Bytes "},
-   { "rlc.ul_payload_bytes",   "RLC UL Payload Bytes "},
-   { "decode.errors",  "Decode Errors"},
-   { "sba.allocated",  "SBA Allocated"},
-   { "sba.freed",  "SBA Freed"},
-   { "sba.timedout",   "SBA Timeout  "},
-   { "llc.timeout","Timedout Frames  "},
-   { "llc.dropped","Dropped Frames   "},
-   { "llc.scheduled",  "Scheduled Frames "},
-   { "llc.dl_bytes",   "RLC encapsulated PDUs"},
-   { "llc.ul_bytes",   "full PDUs received   "},
-   { "rach.requests",  "RACH requests"},
-   { "11bit_rach.requests","11BIT_RACH requests  "},
-   { "spb.uplink_first_segment",   "First seg of UL SPB  "},
-   { "spb.uplink_second_segment",  "Second seg of UL SPB "},
-   { "spb.downlink_first_segment", "First seg of DL SPB  "},
-   { "spb.downlink_second_segment","Second seg of DL SPB "},
-   { "immediate.assignment_UL","Immediate Assign UL  "},
-   { "immediate.assignment_rej",   "Immediate Assign Rej "},
-   { "immediate.assignment_DL","Immediate Assign DL  "},
-   { "channel.request_description","Channel Request Desc "},
-   { "pkt.ul_assignment",  "Packet UL Assignment "},
-   { "pkt.access_reject",  "Packet Access Reject "},
-   { "pkt.dl_assignment",  "Packet DL Assignment "},
-   { "ul.control", "UL control Block "},
-   { "ul.assignment_poll_timeout", "UL Assign Timeout"},
-   { "ul.assignment_failed",   "UL Assign Failed "},
-   { "dl.assignment_timeout",  "DL Assign Timeout"},
-   { "dl.assignment_failed",   "DL Assign Failed "},
-   { 

osmo-bsc[master]: reset: fix illegal FSM name

2017-10-25 Thread Harald Welte

Patch Set 3:

> Mh, I did write the exact same change in Change-Id
 > I1b44d26cebc4a47094d7b8b3983e5737b88bf003

 > Mh, I did write the exact same change in Change-Id
 > I1b44d26cebc4a47094d7b8b3983e5737b88bf003

 > Mh, I did write the exact same change in Change-Id
 > I1b44d26cebc4a47094d7b8b3983e5737b88bf003

... which was merged master last night at 6pm. Please make sure to pull master 
before working on fixes.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I44b8e0935f9d249903a30852ca1cdcf335219ba6
Gerrit-PatchSet: 3
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


libosmocore[master]: utils: avoid segfault when calling osmo_strlcpy(src=NULL)

2017-10-25 Thread Harald Welte

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/4407/1/src/utils.c
File src/utils.c:

Line 375:   size_t ret = src ? strlen(src) : 0;
> Why not simply return here right away? I thought this is the preferred styl
I guess it's a good idea to still zero-terminate 'dst' even if 'src' is NULL.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ieba7ba262ace2e370a4b9a550b3131fb13f07413
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-HasComments: Yes


libosmocore[master]: utils: avoid segfault when calling osmo_strlcpy(src=NULL)

2017-10-25 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-mgw[master]: client: fix stderror logging in unit-test

2017-10-25 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


[PATCH] osmo-mgw[master]: client: fix stderror logging in unit-test

2017-10-25 Thread dexter

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

client: fix stderror logging in unit-test

When testing the file name and the line numbers are output to
stderr, this causes the test to fail when change moves the
lines.

Disable line numbers in the stderror log when testing, also
disable timestamps and colors. Make sure the log category
is print.

Change-Id: I7f1bd9454188f0ca869dada1fcc2877b789cc0ac
---
M tests/mgcp_client/mgcp_client_test.c
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/tests/mgcp_client/mgcp_client_test.c 
b/tests/mgcp_client/mgcp_client_test.c
index f2f0e0f..69e1810 100644
--- a/tests/mgcp_client/mgcp_client_test.c
+++ b/tests/mgcp_client/mgcp_client_test.c
@@ -163,6 +163,10 @@
ctx = talloc_named_const(NULL, 1, "mgcp_client_test");
msgb_talloc_ctx_init(ctx, 0);
osmo_init_logging(_info);
+   log_set_print_filename(osmo_stderr_target, 0);
+   log_set_print_timestamp(osmo_stderr_target, 0);
+   log_set_use_color(osmo_stderr_target, 0);
+   log_set_print_category(osmo_stderr_target, 1);
 
mgcp_client_conf_init();
 

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

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


[PATCH] osmo-mgw[master]: client: add unified function to generate MGCP messages

2017-10-25 Thread dexter
Hello Neels Hofmeyr, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/4146

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

client: add unified function to generate MGCP messages

currently the only way to generate MGCP messages is to use
mgcp_msg_crcx(), mgcp_msg_mdcx() and mgcp_msg_dlcx(). All
three function take a fixed set of parameters via their
parameter list. There is no way to add or leave away optional
parameters.

add function mgcp_msg_gen(), this function takes a unified
message struct. The struct features a presence bitmask which
allows to enable and disable parameters as needed. It is also
possible to add new parameters in the future without breaking
the API.

Depends: libosmocore I15e1af68616309555d0ed9ac5da027c9833d42e3

Change-Id: I29c5e2fb972896faeb771ba040f015592487fcbe
---
M include/osmocom/mgcp_client/mgcp_client.h
M src/libosmo-mgcp-client/mgcp_client.c
M tests/mgcp_client/mgcp_client_test.c
M tests/mgcp_client/mgcp_client_test.err
M tests/mgcp_client/mgcp_client_test.ok
5 files changed, 249 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/46/4146/13

diff --git a/include/osmocom/mgcp_client/mgcp_client.h 
b/include/osmocom/mgcp_client/mgcp_client.h
index efc1f76..21717e3 100644
--- a/include/osmocom/mgcp_client/mgcp_client.h
+++ b/include/osmocom/mgcp_client/mgcp_client.h
@@ -1,6 +1,7 @@
 #pragma once
 
 #include 
+#include 
 
 #include 
 
@@ -37,6 +38,36 @@
uint16_t audio_port;
 };
 
+enum mgcp_verb {
+   MGCP_VERB_CRCX,
+   MGCP_VERB_MDCX,
+   MGCP_VERB_DLCX,
+   MGCP_VERB_AUEP,
+   MGCP_VERB_RSIP,
+};
+
+#define MGCP_MSG_PRESENCE_ENDPOINT 0x0001
+#define MGCP_MSG_PRESENCE_CALL_ID  0x0002
+#define MGCP_MSG_PRESENCE_CONN_ID  0x0004
+#define MGCP_MSG_PRESENCE_AUDIO_IP 0x0008
+#define MGCP_MSG_PRESENCE_AUDIO_PORT   0x0010
+#define MGCP_MSG_PRESENCE_CONN_MODE0x0020
+
+/* See also RFC3435 section 3.2.1.3 */
+#define MGCP_ENDPOINT_MAXLEN (255*2+1+1)
+
+struct mgcp_msg {
+   enum mgcp_verb verb;
+   /* See MGCP_MSG_PRESENCE_* constants */
+   uint32_t presence;
+   char endpoint[MGCP_ENDPOINT_MAXLEN];
+   unsigned int call_id;
+   uint32_t conn_id;
+uint16_t audio_port;
+char *audio_ip;
+   enum mgcp_connection_mode conn_mode;
+};
+
 void mgcp_client_conf_init(struct mgcp_client_conf *conf);
 void mgcp_client_vty_init(void *talloc_ctx, int node, struct mgcp_client_conf 
*conf);
 int mgcp_client_config_write(struct vty *vty, const char *indent);
@@ -65,14 +96,19 @@
 
 struct msgb *mgcp_msg_crcx(struct mgcp_client *mgcp,
   uint16_t rtp_endpoint, unsigned int call_id,
-  enum mgcp_connection_mode mode);
+  enum mgcp_connection_mode mode)
+OSMO_DEPRECATED("Use mgcp_msg_gen() instead");
 
 struct msgb *mgcp_msg_mdcx(struct mgcp_client *mgcp,
   uint16_t rtp_endpoint, const char *rtp_conn_addr,
-  uint16_t rtp_port, enum mgcp_connection_mode mode);
+  uint16_t rtp_port, enum mgcp_connection_mode mode)
+OSMO_DEPRECATED("Use mgcp_msg_gen() instead");
 
 struct msgb *mgcp_msg_dlcx(struct mgcp_client *mgcp, uint16_t rtp_endpoint,
-  unsigned int call_id);
+  unsigned int call_id)
+OSMO_DEPRECATED("Use mgcp_msg_gen() instead");
+
+struct msgb *mgcp_msg_gen(struct mgcp_client *mgcp, struct mgcp_msg *mgcp_msg);
 
 extern const struct value_string mgcp_client_connection_mode_strs[];
 static inline const char *mgcp_client_cmode_name(enum mgcp_connection_mode 
mode)
diff --git a/src/libosmo-mgcp-client/mgcp_client.c 
b/src/libosmo-mgcp-client/mgcp_client.c
index 1cd37be..c7cc989 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -614,6 +615,109 @@
 "C: %x\r\n", trans_id, rtp_endpoint, call_id);
 }
 
+#define MGCP_CRCX_MANDATORY (MGCP_MSG_PRESENCE_ENDPOINT | \
+MGCP_MSG_PRESENCE_CALL_ID | \
+MGCP_MSG_PRESENCE_CONN_ID | \
+MGCP_MSG_PRESENCE_CONN_MODE)
+#define MGCP_MDCX_MANDATORY (MGCP_MSG_PRESENCE_ENDPOINT | \
+MGCP_MSG_PRESENCE_CONN_ID)
+#define MGCP_DLCX_MANDATORY (MGCP_MSG_PRESENCE_ENDPOINT)
+#define MGCP_AUEP_MANDATORY (MGCP_MSG_PRESENCE_ENDPOINT)
+#define MGCP_RSIP_MANDATORY 0  /* none */
+
+struct msgb *mgcp_msg_gen(struct mgcp_client *mgcp, struct mgcp_msg *mgcp_msg)
+{
+   mgcp_trans_id_t trans_id = mgcp_client_next_trans_id(mgcp);
+   uint32_t mandatory_mask;
+   struct msgb *msg = msgb_alloc_headroom(4096, 128, "MGCP tx");
+   int rc = 0;
+
+   msg->l2h = msg->data;
+   msg->cb[MSGB_CB_MGCP_TRANS_ID] = trans_id;
+
+   

osmo-pcu[master]: Initialize logging before initializing rate_ctr

2017-10-25 Thread Max

Patch Set 1:

> *why* the output was expanded

We init logging first in BTS singleton with some default log levels. Later on 
init is called again in individual tests but this setting is not taken into 
account for some reason. Not sure yet why.

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

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


[ABANDON] libosmo-netif[master]: osmux: Re-write osmux_snprintf

2017-10-25 Thread Pau Espin Pedrol
Pau Espin Pedrol has abandoned this change.

Change subject: osmux: Re-write osmux_snprintf
..


Abandoned

3 patches were merged fixing a few bits remaining to be improved after Pablos' 
patches. This patch can as a result be abandoned.

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: I695771d099833842db37a415b636035d17f1bba7
Gerrit-PatchSet: 3
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pablo Neira Ayuso 
Gerrit-Reviewer: Pau Espin Pedrol 


osmo-bsc[master]: Rename osmo_fsm to avoid illegal space in name + more meanin...

2017-10-25 Thread Pau Espin Pedrol

Patch Set 2:

Please, if it applies, remember to send the same patch against openbsc.git

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1b44d26cebc4a47094d7b8b3983e5737b88bf003
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


[MERGED] osmo-msc[master]: Rename osmo_fsm to avoid illegal space in name + more meanin...

2017-10-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: Rename osmo_fsm to avoid illegal space in name + more 
meaningful name
..


Rename osmo_fsm to avoid illegal space in name + more meaningful name

A FSM doesn't need "FSM" in its name, as it is obvious that it is a
FSM.  Also, having two that are called RESET is confusing, so let's
try to come up with better names.

Also, after Change-Id I9ef59432f43a3cdb94e4cbb0c44ac3f9b2aac0f2 in
libosmocore, we now enforce that no FSM identifiers contain spaces
or other illegal characters.

Closes: OS#2593
Change-Id: I858a81b8a4e01b2e802e3159f2835e5ca515953d
---
M src/libcommon-cs/a_reset.c
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/src/libcommon-cs/a_reset.c b/src/libcommon-cs/a_reset.c
index 9a226ac..7dbd014 100644
--- a/src/libcommon-cs/a_reset.c
+++ b/src/libcommon-cs/a_reset.c
@@ -124,7 +124,7 @@
 
 /* State machine definition */
 static struct osmo_fsm fsm = {
-   .name = "FSM RESET",
+   .name = "A-RESET",
.states = fsm_states,
.num_states = ARRAY_SIZE(fsm_states),
.log_subsys = DMSC,
@@ -149,7 +149,7 @@
reset->cb = cb;
strncpy(reset->name, name, sizeof(reset->name));
reset->conn_loss_counter = 0;
-   reset->fsm = osmo_fsm_inst_alloc(, NULL, NULL, LOGL_DEBUG, "FSM 
RESET INST");
+   reset->fsm = osmo_fsm_inst_alloc(, NULL, NULL, LOGL_DEBUG, NULL);
OSMO_ASSERT(reset->fsm);
reset->fsm->priv = reset;
LOGP(DMSC, LOGL_NOTICE, "(%s) reset handler fsm created.\n", 
reset->name);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I858a81b8a4e01b2e802e3159f2835e5ca515953d
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: dexter 


osmo-sgsn[master]: Fix build after recent rate_ctr patches

2017-10-25 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


[MERGED] osmo-sgsn[master]: Fix build after recent rate_ctr patches

2017-10-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: Fix build after recent rate_ctr patches
..


Fix build after recent rate_ctr patches

It seems like recent changes expanded output of
dump_rate_ctr_group(). Adjust output accordingly to fix the build.

Change-Id: Icc9a53d35be2b0793d7ed25e6fec5bf6c8f84d92
---
M tests/gbproxy/gbproxy_test.ok
1 file changed, 248 insertions(+), 0 deletions(-)

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



diff --git a/tests/gbproxy/gbproxy_test.ok b/tests/gbproxy/gbproxy_test.ok
index 737aec0..ff86b67 100644
--- a/tests/gbproxy/gbproxy_test.ok
+++ b/tests/gbproxy/gbproxy_test.ok
@@ -38,6 +38,10 @@
 
 Current NS-VCIs:
 VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000
+ Packets at NS Level  ( In): 4
+ Packets at NS Level  (Out): 4
+ Bytes at NS Level( In): 12
+ Bytes at NS Level(Out): 15
  NS-VC Block count : 1
 
 --- Initialise BSS 1 ---
@@ -96,7 +100,15 @@
 
 Current NS-VCIs:
 VCI 0x1001, NSEI 0x1000, peer 0x01020304:
+ Packets at NS Level  ( In): 5
+ Packets at NS Level  (Out): 4
+ Bytes at NS Level( In): 37
+ Bytes at NS Level(Out): 12
 VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000
+ Packets at NS Level  ( In): 4
+ Packets at NS Level  (Out): 5
+ Bytes at NS Level( In): 12
+ Bytes at NS Level(Out): 37
  NS-VC Block count : 1
 
 Peers:
@@ -170,8 +182,20 @@
 
 Current NS-VCIs:
 VCI 0x2001, NSEI 0x2000, peer 0x01020304:
+ Packets at NS Level  ( In): 5
+ Packets at NS Level  (Out): 4
+ Bytes at NS Level( In): 37
+ Bytes at NS Level(Out): 12
 VCI 0x1001, NSEI 0x1000, peer 0x01020304:
+ Packets at NS Level  ( In): 5
+ Packets at NS Level  (Out): 5
+ Bytes at NS Level( In): 37
+ Bytes at NS Level(Out): 21
 VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000
+ Packets at NS Level  ( In): 5
+ Packets at NS Level  (Out): 6
+ Bytes at NS Level( In): 21
+ Bytes at NS Level(Out): 59
  NS-VC Block count : 1
 
 Peers:
@@ -233,8 +257,20 @@
 
 Current NS-VCIs:
 VCI 0x2001, NSEI 0x2000, peer 0x01020304:
+ Packets at NS Level  ( In): 5
+ Packets at NS Level  (Out): 5
+ Bytes at NS Level( In): 37
+ Bytes at NS Level(Out): 21
 VCI 0x1001, NSEI 0x1000, peer 0x01020304:
+ Packets at NS Level  ( In): 9
+ Packets at NS Level  (Out): 9
+ Bytes at NS Level( In): 52
+ Bytes at NS Level(Out): 33
 VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000
+ Packets at NS Level  ( In): 6
+ Packets at NS Level  (Out): 6
+ Bytes at NS Level( In): 30
+ Bytes at NS Level(Out): 59
  NS-VC Block count : 1
 
 Peers:
@@ -284,8 +320,20 @@
 
 Current NS-VCIs:
 VCI 0x2001, NSEI 0x2000, peer 0x01020304:
+ Packets at NS Level  ( In): 9
+ Packets at NS Level  (Out): 9
+ Bytes at NS Level( In): 52
+ Bytes at NS Level(Out): 33
 VCI 0x1001, NSEI 0x1000, peer 0x01020304:
+ Packets at NS Level  ( In): 9
+ Packets at NS Level  (Out): 9
+ Bytes at NS Level( In): 52
+ Bytes at NS Level(Out): 33
 VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000
+ Packets at NS Level  ( In): 6
+ Packets at NS Level  (Out): 6
+ Bytes at NS Level( In): 30
+ Bytes at NS Level(Out): 59
  NS-VC Block count : 1
 
 Peers:
@@ -335,8 +383,20 @@
 
 Current NS-VCIs:
 VCI 0x2001, NSEI 0x2000, peer 0x01020304:
+ Packets at NS Level  ( In): 13
+ Packets at NS Level  (Out): 13
+ Bytes at NS Level( In): 67
+ Bytes at NS Level(Out): 45
 VCI 0x1001, NSEI 0x1000, peer 0x01020304:
+ Packets at NS Level  ( In): 9
+ Packets at NS Level  (Out): 9
+ Bytes at NS Level( In): 52
+ Bytes at NS Level(Out): 33
 VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000
+ Packets at NS Level  ( In): 6
+ Packets at NS Level  (Out): 6
+ Bytes at NS Level( In): 30
+ Bytes at NS Level(Out): 59
  NS-VC Block count : 1
 
 Peers:
@@ -386,8 +446,20 @@
 
 Current NS-VCIs:
 VCI 0x2001, NSEI 0x2000, peer 0x01020304:
+ Packets at NS Level  ( In): 17
+ Packets at NS Level  (Out): 17
+ Bytes at NS Level( In): 82
+ Bytes at NS Level(Out): 57
 VCI 0x1001, NSEI 0x1000, peer 0x01020304:
+ Packets at NS Level  ( In): 9
+ Packets at NS Level  (Out): 9
+ Bytes at NS Level( In): 52
+ Bytes at NS Level(Out): 33
 VCI 0x0101, 

osmo-msc[master]: Rename osmo_fsm to avoid illegal space in name + more meanin...

2017-10-25 Thread Harald Welte

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I858a81b8a4e01b2e802e3159f2835e5ca515953d
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: dexter 
Gerrit-HasComments: No


osmo-pcu[master]: Initialize logging before initializing rate_ctr

2017-10-25 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-bsc[master]: reset: fix illegal FSM name

2017-10-25 Thread Harald Welte

Patch Set 3:

Mh, I did write the exact same change in Change-Id 
I1b44d26cebc4a47094d7b8b3983e5737b88bf003

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I44b8e0935f9d249903a30852ca1cdcf335219ba6
Gerrit-PatchSet: 3
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-pcu[master]: Initialize logging before initializing rate_ctr

2017-10-25 Thread Harald Welte

Patch Set 1: Code-Review+1

I'm happy with those changes, but I would appreciate if you could figure out 
*why* the output was expanded.  This was not the intention of the patches, it 
was all just about renaming counter groups and counters.

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

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


osmo-sgsn[master]: Fix build after recent rate_ctr patches

2017-10-25 Thread Harald Welte

Patch Set 1: Code-Review+1

I'm happy with those changes, but I would appreciate if you could figure out 
*why* the output was expanded.  This was not the intention of the patches, it 
was all just about renaming counter groups and counters.

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

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


[PATCH] osmo-pcu[master]: Initialize logging before initializing rate_ctr

2017-10-25 Thread Max

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

Initialize logging before initializing rate_ctr

The library code for rate counter initialization, which is called from
the descendants of bsc_network_alloc() might already want to log
something (particularly after Ifc6ac824f5dae9a848bb4a5d067c64a69eb40b56
in libosmocore), so the logging framework must be initialized before.

Change-Id: Ibf557d21552d9ff1d6b595b0594f2c7b18db4692
---
M src/bts.cpp
1 file changed, 7 insertions(+), 0 deletions(-)


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

diff --git a/src/bts.cpp b/src/bts.cpp
index b768569..09a562a 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -33,6 +33,7 @@
#include 
#include 
#include 
+   #include 
#include 
#include 
#include 
@@ -49,6 +50,7 @@
 extern void *tall_pcu_ctx;
 
 static BTS s_bts;
+static bool log_not_initialized = true;
 
 /**
  * For gcc-4.4 compat do not use extended initializer list but keep the
@@ -207,6 +209,11 @@
}
}
 
+   if (log_not_initialized) {
+   log_not_initialized = false;
+   osmo_init_logging(_log_info);
+   }
+
m_ratectrs = rate_ctr_group_alloc(tall_pcu_ctx, _ctrg_desc, 0);
OSMO_ASSERT(m_ratectrs);
m_statg = osmo_stat_item_group_alloc(tall_pcu_ctx, _statg_desc, 0);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf557d21552d9ff1d6b595b0594f2c7b18db4692
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max 


[PATCH] osmo-bsc[master]: reset: fix illegal FSM name

2017-10-25 Thread dexter
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/4409

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

reset: fix illegal FSM name

The name of the state machine that controls the reset
contains a whitespace. This is not allowed.

Replace whitespace with an underscore and choose a more
meaningful name.

Change-Id: I44b8e0935f9d249903a30852ca1cdcf335219ba6
---
M src/libcommon-cs/a_reset.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/09/4409/3

diff --git a/src/libcommon-cs/a_reset.c b/src/libcommon-cs/a_reset.c
index c40bc41..d441ec0 100644
--- a/src/libcommon-cs/a_reset.c
+++ b/src/libcommon-cs/a_reset.c
@@ -124,7 +124,7 @@
 
 /* State machine definition */
 static struct osmo_fsm fsm = {
-   .name = "FSM RESET",
+   .name = "A-RESET",
.states = fsm_states,
.num_states = ARRAY_SIZE(fsm_states),
.log_subsys = DMSC,

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I44b8e0935f9d249903a30852ca1cdcf335219ba6
Gerrit-PatchSet: 3
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder


[PATCH] osmo-bsc[master]: reset: fix illegal FSM name

2017-10-25 Thread dexter
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/4409

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

reset: fix illegal FSM name

The name of the state machine that controls the reset
contains a whitespace. This is not allowed.

Replace whitespace with an underscore.

Change-Id: I44b8e0935f9d249903a30852ca1cdcf335219ba6
---
M src/libcommon-cs/a_reset.c
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/src/libcommon-cs/a_reset.c b/src/libcommon-cs/a_reset.c
index c40bc41..d441ec0 100644
--- a/src/libcommon-cs/a_reset.c
+++ b/src/libcommon-cs/a_reset.c
@@ -124,7 +124,7 @@
 
 /* State machine definition */
 static struct osmo_fsm fsm = {
-   .name = "FSM RESET",
+   .name = "A-RESET",
.states = fsm_states,
.num_states = ARRAY_SIZE(fsm_states),
.log_subsys = DMSC,

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I44b8e0935f9d249903a30852ca1cdcf335219ba6
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder


[ABANDON] osmo-msc[master]: reset: fix illegal FSM name

2017-10-25 Thread dexter
dexter has abandoned this change.

Change subject: reset: fix illegal FSM name
..


Abandoned

There is already a patch for that.

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: I1f19cef832308a6078c2c23a3a9b08fa3f0be0b9
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder


[PATCH] osmo-sgsn[master]: Fix build after recent rate_ctr patches

2017-10-25 Thread Max

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

Fix build after recent rate_ctr patches

It seems like recent changes expanded output of
dump_rate_ctr_group(). Adjust output accordingly to fix the build.

Change-Id: Icc9a53d35be2b0793d7ed25e6fec5bf6c8f84d92
---
M tests/gbproxy/gbproxy_test.ok
1 file changed, 248 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/10/4410/1

diff --git a/tests/gbproxy/gbproxy_test.ok b/tests/gbproxy/gbproxy_test.ok
index 737aec0..ff86b67 100644
--- a/tests/gbproxy/gbproxy_test.ok
+++ b/tests/gbproxy/gbproxy_test.ok
@@ -38,6 +38,10 @@
 
 Current NS-VCIs:
 VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000
+ Packets at NS Level  ( In): 4
+ Packets at NS Level  (Out): 4
+ Bytes at NS Level( In): 12
+ Bytes at NS Level(Out): 15
  NS-VC Block count : 1
 
 --- Initialise BSS 1 ---
@@ -96,7 +100,15 @@
 
 Current NS-VCIs:
 VCI 0x1001, NSEI 0x1000, peer 0x01020304:
+ Packets at NS Level  ( In): 5
+ Packets at NS Level  (Out): 4
+ Bytes at NS Level( In): 37
+ Bytes at NS Level(Out): 12
 VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000
+ Packets at NS Level  ( In): 4
+ Packets at NS Level  (Out): 5
+ Bytes at NS Level( In): 12
+ Bytes at NS Level(Out): 37
  NS-VC Block count : 1
 
 Peers:
@@ -170,8 +182,20 @@
 
 Current NS-VCIs:
 VCI 0x2001, NSEI 0x2000, peer 0x01020304:
+ Packets at NS Level  ( In): 5
+ Packets at NS Level  (Out): 4
+ Bytes at NS Level( In): 37
+ Bytes at NS Level(Out): 12
 VCI 0x1001, NSEI 0x1000, peer 0x01020304:
+ Packets at NS Level  ( In): 5
+ Packets at NS Level  (Out): 5
+ Bytes at NS Level( In): 37
+ Bytes at NS Level(Out): 21
 VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000
+ Packets at NS Level  ( In): 5
+ Packets at NS Level  (Out): 6
+ Bytes at NS Level( In): 21
+ Bytes at NS Level(Out): 59
  NS-VC Block count : 1
 
 Peers:
@@ -233,8 +257,20 @@
 
 Current NS-VCIs:
 VCI 0x2001, NSEI 0x2000, peer 0x01020304:
+ Packets at NS Level  ( In): 5
+ Packets at NS Level  (Out): 5
+ Bytes at NS Level( In): 37
+ Bytes at NS Level(Out): 21
 VCI 0x1001, NSEI 0x1000, peer 0x01020304:
+ Packets at NS Level  ( In): 9
+ Packets at NS Level  (Out): 9
+ Bytes at NS Level( In): 52
+ Bytes at NS Level(Out): 33
 VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000
+ Packets at NS Level  ( In): 6
+ Packets at NS Level  (Out): 6
+ Bytes at NS Level( In): 30
+ Bytes at NS Level(Out): 59
  NS-VC Block count : 1
 
 Peers:
@@ -284,8 +320,20 @@
 
 Current NS-VCIs:
 VCI 0x2001, NSEI 0x2000, peer 0x01020304:
+ Packets at NS Level  ( In): 9
+ Packets at NS Level  (Out): 9
+ Bytes at NS Level( In): 52
+ Bytes at NS Level(Out): 33
 VCI 0x1001, NSEI 0x1000, peer 0x01020304:
+ Packets at NS Level  ( In): 9
+ Packets at NS Level  (Out): 9
+ Bytes at NS Level( In): 52
+ Bytes at NS Level(Out): 33
 VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000
+ Packets at NS Level  ( In): 6
+ Packets at NS Level  (Out): 6
+ Bytes at NS Level( In): 30
+ Bytes at NS Level(Out): 59
  NS-VC Block count : 1
 
 Peers:
@@ -335,8 +383,20 @@
 
 Current NS-VCIs:
 VCI 0x2001, NSEI 0x2000, peer 0x01020304:
+ Packets at NS Level  ( In): 13
+ Packets at NS Level  (Out): 13
+ Bytes at NS Level( In): 67
+ Bytes at NS Level(Out): 45
 VCI 0x1001, NSEI 0x1000, peer 0x01020304:
+ Packets at NS Level  ( In): 9
+ Packets at NS Level  (Out): 9
+ Bytes at NS Level( In): 52
+ Bytes at NS Level(Out): 33
 VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000
+ Packets at NS Level  ( In): 6
+ Packets at NS Level  (Out): 6
+ Bytes at NS Level( In): 30
+ Bytes at NS Level(Out): 59
  NS-VC Block count : 1
 
 Peers:
@@ -386,8 +446,20 @@
 
 Current NS-VCIs:
 VCI 0x2001, NSEI 0x2000, peer 0x01020304:
+ Packets at NS Level  ( In): 17
+ Packets at NS Level  (Out): 17
+ Bytes at NS Level( In): 82
+ Bytes at NS Level(Out): 57
 VCI 0x1001, NSEI 0x1000, peer 0x01020304:
+ Packets at NS Level  ( In): 9
+ Packets at NS Level  (Out): 9
+ Bytes at NS Level( In): 52
+ Bytes at NS Level(Out): 33
 VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000
+ Packets at NS Level  ( In): 6
+ Packets at NS Level  (Out): 6
+ Bytes at NS Level( In): 

osmo-msc[master]: Rename osmo_fsm to avoid illegal space in name + more meanin...

2017-10-25 Thread dexter

Patch Set 1: Code-Review+1

> Patch Set 1: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I858a81b8a4e01b2e802e3159f2835e5ca515953d
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: dexter 
Gerrit-HasComments: No


[PATCH] osmo-bsc[master]: reset: fix illegal FSM name

2017-10-25 Thread dexter

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

reset: fix illegal FSM name

The name of the state machine that controls the reset
contains a whitespace. This is not allowed.

Replace whitespace with an underscore.

Change-Id: I44b8e0935f9d249903a30852ca1cdcf335219ba6
---
M src/libcommon-cs/a_reset.c
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/src/libcommon-cs/a_reset.c b/src/libcommon-cs/a_reset.c
index c40bc41..612a028 100644
--- a/src/libcommon-cs/a_reset.c
+++ b/src/libcommon-cs/a_reset.c
@@ -124,7 +124,7 @@
 
 /* State machine definition */
 static struct osmo_fsm fsm = {
-   .name = "FSM RESET",
+   .name = "FSM_RESET",
.states = fsm_states,
.num_states = ARRAY_SIZE(fsm_states),
.log_subsys = DMSC,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I44b8e0935f9d249903a30852ca1cdcf335219ba6
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 


[PATCH] osmo-msc[master]: reset: fix illegal FSM name

2017-10-25 Thread dexter

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

reset: fix illegal FSM name

The name of the state machine that controls the reset contains
a whitespace. This is not allowed.

Replace whitespace with an underscore.

Change-Id: I1f19cef832308a6078c2c23a3a9b08fa3f0be0b9
---
M src/libcommon-cs/a_reset.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/08/4408/1

diff --git a/src/libcommon-cs/a_reset.c b/src/libcommon-cs/a_reset.c
index 9a226ac..d1a6032 100644
--- a/src/libcommon-cs/a_reset.c
+++ b/src/libcommon-cs/a_reset.c
@@ -124,7 +124,7 @@
 
 /* State machine definition */
 static struct osmo_fsm fsm = {
-   .name = "FSM RESET",
+   .name = "FSM_RESET",
.states = fsm_states,
.num_states = ARRAY_SIZE(fsm_states),
.log_subsys = DMSC,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1f19cef832308a6078c2c23a3a9b08fa3f0be0b9
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: dexter 


osmo-msc[master]: Rename osmo_fsm to avoid illegal space in name + more meanin...

2017-10-25 Thread Max

Patch Set 1: Code-Review+1

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

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


libosmocore[master]: utils: avoid segfault when calling osmo_strlcpy(src=NULL)

2017-10-25 Thread Max

Patch Set 1: Code-Review-1

(1 comment)

I think test case is required which tried osmo_strlcpy(src=NULL), 
osmo_strlcpy(siz=0) etc. to ensure that fix actually works as expected.

https://gerrit.osmocom.org/#/c/4407/1/src/utils.c
File src/utils.c:

Line 375:   size_t ret = src ? strlen(src) : 0;
Why not simply return here right away? I thought this is the preferred style 
for error handling?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ieba7ba262ace2e370a4b9a550b3131fb13f07413
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-HasComments: Yes