Change in libosmo-sccp[master]: improve logging for rejected AS in xua_rkm.c

2019-03-12 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/13229


Change subject: improve logging for rejected AS in xua_rkm.c
..

improve logging for rejected AS in xua_rkm.c

Change a loglevel from NOTICE to ERROR, for when a routing key gets
re-purposed.

Add another error log for insufficient resources case.

Change-Id: Id22e3c6bab5f7b597df3514eedb162277ce0ef7d
---
M src/xua_rkm.c
1 file changed, 3 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/29/13229/1

diff --git a/src/xua_rkm.c b/src/xua_rkm.c
index a77460d..4b760ee 100644
--- a/src/xua_rkm.c
+++ b/src/xua_rkm.c
@@ -214,7 +214,7 @@
if (as) {
LOGPASP(asp, DLSS7, LOGL_NOTICE, "RKM: Found existing AS for 
RCTX %u\n", rctx);
if (as->cfg.routing_key.pc != dpc) {
-   LOGPASP(asp, DLSS7, LOGL_NOTICE, "RKM: DPC doesn't 
match (%u != %u)\n",
+   LOGPASP(asp, DLSS7, LOGL_ERROR, "RKM: DPC doesn't 
match, rejecting AS (%u != %u)\n",
as->cfg.routing_key.pc, dpc);
msgb_append_reg_res(resp, rk_id, 
M3UA_RKM_REG_ERR_INVAL_RKEY, 0);
return -1;
@@ -250,6 +250,8 @@
if (*nas_idx >= max_nas_idx) {
osmo_ss7_route_destroy(rt);
osmo_ss7_as_destroy(as);
+   LOGPASP(asp, DLSS7, LOGL_ERROR, "RKM: not enough room 
for newly assigned AS (max %u AS)\n",
+   max_nas_idx+1);
msgb_append_reg_res(resp, rk_id, 
M3UA_RKM_REG_ERR_INSUFF_RESRC, 0);
return -1;
}

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

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id22e3c6bab5f7b597df3514eedb162277ce0ef7d
Gerrit-Change-Number: 13229
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-bsc[master]: incoming connect: don't crash if calling addr is missing

2019-03-12 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/13227


Change subject: incoming connect: don't crash if calling addr is missing
..

incoming connect: don't crash if calling addr is missing

The idea was to guard the logging, though actually that can handle a NULL ss7
quite well.

Change-Id: Ib028432b37a5c48b677bb21b869cc722575dce92
---
M src/osmo-bsc/osmo_bsc_sigtran.c
1 file changed, 0 insertions(+), 1 deletion(-)



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

diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c
index 4b2c4ae..2ff5d80 100644
--- a/src/osmo-bsc/osmo_bsc_sigtran.c
+++ b/src/osmo-bsc/osmo_bsc_sigtran.c
@@ -122,7 +122,6 @@
}

ss7 = osmo_ss7_instance_find(msc->a.cs7_instance);
-   OSMO_ASSERT(ss7);
LOGP(DMSC, LOGL_ERROR, "Unable to find MSC data under address: %s\n", 
osmo_sccp_addr_name(ss7, msc_addr));
return NULL;
 }

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

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


Change in osmo-bsc[master]: log N-CONNECT from MSC

2019-03-12 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/13228


Change subject: log N-CONNECT from MSC
..

log N-CONNECT from MSC

Change-Id: I83f15c7231b2b766aba4d25339d08acbbca3a47e
---
M src/osmo-bsc/osmo_bsc_sigtran.c
1 file changed, 4 insertions(+), 0 deletions(-)



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

diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c
index 2ff5d80..f2a6d08 100644
--- a/src/osmo-bsc/osmo_bsc_sigtran.c
+++ b/src/osmo-bsc/osmo_bsc_sigtran.c
@@ -179,6 +179,10 @@
goto refuse;
}

+   LOGP(DMSC, LOGL_DEBUG, "(calling_addr=%s conn_id=%u) N-CONNECT.ind from 
MSC %d\n",
+osmo_sccp_addr_dump(&scu_prim->u.connect.calling_addr),
+scu_prim->u.connect.conn_id, msc->nr);
+
conn = bsc_subscr_con_allocate(bsc_gsmnet);
if (!conn)
return -ENOMEM;

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

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


Build failure of network:osmocom:nightly/libosmo-netif in Debian_8.0/x86_64

2019-03-12 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmo-netif/Debian_8.0/x86_64

Package network:osmocom:nightly/libosmo-netif failed to build in 
Debian_8.0/x86_64

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

Last lines of build log:
[   56s] [204/217] installing dpkg-dev-1.17.25
[   57s] Processing triggers for man-db (2.7.0.2-5) ...
[   58s] [205/217] installing build-essential-11.7
[   58s] [206/217] installing initscripts-2.88dsf-59
[   58s] /usr/sbin/invoke-rc.d: 1: /usr/sbin/invoke-rc.d: /sbin/runlevel: not 
found
[   58s] invoke-rc.d: policy-rc.d denied execution of start.
[   58s] Processing triggers for man-db (2.7.0.2-5) ...
[   59s] [207/217] installing debhelper-9.20150101
[   59s] Processing triggers for man-db (2.7.0.2-5) ...
[   60s] [208/217] installing dh-autoreconf-10
[   60s] Processing triggers for man-db (2.7.0.2-5) ...
[   60s] [209/217] installing procps-2:3.3.9-9
[   61s] update-alternatives: using /usr/bin/w.procps to provide /usr/bin/w (w) 
in auto mode
[   61s] /usr/sbin/invoke-rc.d: 1: /usr/sbin/invoke-rc.d: /sbin/runlevel: not 
found
[   61s] invoke-rc.d: policy-rc.d denied execution of start.
[   61s] Processing triggers for man-db (2.7.0.2-5) ...
[   61s] dpkg: ../../../lib/dpkg/dump.c:299: varbufdependency: Assertion 
`dop->up == dep' failed.
[   61s] /.build/build-pkg-deb: line 31: 15450 Aborted (core 
dumped) DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical 
DEBCONF_NONINTERACTIVE_SEEN=true LC_ALL=C LANGUAGE=C LANG=C chroot $*
[   61s] exit ...
[   61s] 
[   61s] lamb72 failed "build libosmo-netif_0.4.0.19.fa7d.dsc" at Wed Mar 13 
02:45:24 UTC 2019.
[   61s] 
[   61s] ### VM INTERACTION START ###
[   64s] [   53.105590] sysrq: SysRq : Power Off
[   64s] [   53.111849] reboot: Power down
[   64s] ### VM INTERACTION END ###
[   64s] 
[   64s] lamb72 failed "build libosmo-netif_0.4.0.19.fa7d.dsc" at Wed Mar 13 
02:45:27 UTC 2019.
[   64s] 

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


Change in osmo-bsc[master]: Add configure flag to disable build of osmo-bsc

2019-03-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13226 )

Change subject: Add configure flag to disable build of osmo-bsc
..


Patch Set 1: Code-Review-1

I'm really not even inclined to review this entire patch series, sorry.  Why is 
it such a problem to have all build-time dependencies, even if at runtime you 
don't want to run osmo-bsc, fine.  But why worry about build dependencies?


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I39783245a11aacaecf0873b3b74b60b559256f79
Gerrit-Change-Number: 13226
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Tue, 12 Mar 2019 21:31:31 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: Move LCLS references from gsm_data to osmo_bsc_lcls

2019-03-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13220 )

Change subject: Move LCLS references from gsm_data to osmo_bsc_lcls
..


Patch Set 1:

(1 comment)

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

https://gerrit.osmocom.org/#/c/13220/1//COMMIT_MSG@10
PS1, Line 10: This way we can avoid requiring
: libosmo-sigtran when building ipaccess utils
why is that worthwhile?  Why do we care what kind of build requirements we 
have?  Why not build all of osmo-bsc.git, as long as the ipacess utils don't 
have any unwanted runtime dependency?



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8941f059d6e4eb21a971d48d2b66c29ec3355a6d
Gerrit-Change-Number: 13220
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Tue, 12 Mar 2019 21:30:37 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-bsc[master]: ipaccess/Makefile.am: Remove unneeded libmgcp-client dep

2019-03-12 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13218 )

Change subject: ipaccess/Makefile.am: Remove unneeded libmgcp-client dep
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3c926b088fe1b25b0f65d673465c3fa0c1d0b86f
Gerrit-Change-Number: 13218
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Tue, 12 Mar 2019 21:29:17 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: Build BTS related code in a library

2019-03-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/13225 )

Change subject: Build BTS related code in a library
..


Patch Set 1:

This commit and next one work fine, but it's more like an RFC whether it's 
desirable to have or not.


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I30bf10660f4710523ca7bdde1b392a8c2b334b23
Gerrit-Change-Number: 13225
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-CC: Jenkins Builder (102)
Gerrit-Comment-Date: Tue, 12 Mar 2019 20:39:52 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-bsc[master]: Build BTS related code in a library

2019-03-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/13225


Change subject: Build BTS related code in a library
..

Build BTS related code in a library

It will allow build ipaccess util tools and so without building whole
osmo-bsc (and requiring its extra deps).

Change-Id: I30bf10660f4710523ca7bdde1b392a8c2b334b23
---
M src/ipaccess/Makefile.am
M src/osmo-bsc/Makefile.am
M src/utils/Makefile.am
M tests/abis/Makefile.am
M tests/bsc/Makefile.am
M tests/codec_pref/Makefile.am
M tests/gsm0408/Makefile.am
M tests/handover/Makefile.am
M tests/nanobts_omlattr/Makefile.am
M tests/subscr/Makefile.am
10 files changed, 94 insertions(+), 93 deletions(-)



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

diff --git a/src/ipaccess/Makefile.am b/src/ipaccess/Makefile.am
index 3578a40..3964e00 100644
--- a/src/ipaccess/Makefile.am
+++ b/src/ipaccess/Makefile.am
@@ -44,14 +44,8 @@
stubs.c \
$(NULL)

-# FIXME: resolve the bogus dependencies patched around here:
 ipaccess_config_LDADD = \
-   $(top_builddir)/src/osmo-bsc/abis_nm.o \
-   $(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts.o \
-   $(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.o \
-   $(top_builddir)/src/osmo-bsc/gsm_data.o \
-   $(top_builddir)/src/osmo-bsc/gsm_timers.o \
-   $(top_builddir)/src/osmo-bsc/net_init.o \
+   $(top_builddir)/src/osmo-bsc/libbscbts.la \
$(OSMO_LIBS) \
$(NULL)

@@ -62,6 +56,6 @@
$(NULL)

 ipaccess_proxy_LDADD = \
-   $(top_builddir)/src/osmo-bsc/gsm_timers.o \
+   $(top_builddir)/src/osmo-bsc/libbscbts.la \
$(OSMO_LIBS) \
$(NULL)
diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am
index 364228d..0fabe51 100644
--- a/src/osmo-bsc/Makefile.am
+++ b/src/osmo-bsc/Makefile.am
@@ -13,18 +13,53 @@
$(LIBOSMONETIF_CFLAGS) \
$(COVERAGE_CFLAGS) \
$(LIBOSMOABIS_CFLAGS) \
-   $(LIBOSMOSIGTRAN_CFLAGS) \
-   $(LIBOSMOMGCPCLIENT_CFLAGS) \
$(NULL)

 AM_LDFLAGS = \
$(COVERAGE_LDFLAGS) \
$(NULL)

+noinst_LTLIBRARIES = \
+libbscbts.la \
+$(NULL)
+
+libbscbts_la_SOURCES = \
+   abis_nm.c \
+   bts_ipaccess_nanobts.c \
+   bts_ipaccess_nanobts_omlattr.c \
+   bts_siemens_bs11.c \
+   e1_config.c \
+   gsm_data.c \
+   gsm_timers.c \
+   net_init.c \
+   $(NULL)
+
+libbscbts_la_LIBADD = \
+   $(LIBOSMOCORE_LIBS) \
+   $(LIBOSMOGSM_LIBS) \
+   $(LIBOSMOVTY_LIBS) \
+   $(LIBOSMOCTRL_LIBS) \
+   $(COVERAGE_LDFLAGS) \
+   $(LIBOSMOABIS_LIBS) \
+   $(NULL)
+
 bin_PROGRAMS = \
osmo-bsc \
$(NULL)

+osmo_bsc_CFLAGS = \
+   -Wall \
+   $(LIBOSMOCORE_CFLAGS) \
+   $(LIBOSMOGSM_CFLAGS) \
+   $(LIBOSMOVTY_CFLAGS) \
+   $(LIBOSMOCTRL_CFLAGS) \
+   $(LIBOSMONETIF_CFLAGS) \
+   $(COVERAGE_CFLAGS) \
+   $(LIBOSMOABIS_CFLAGS) \
+   $(LIBOSMOSIGTRAN_CFLAGS) \
+   $(LIBOSMOMGCPCLIENT_CFLAGS) \
+   $(NULL)
+
 osmo_bsc_SOURCES = \
a_reset.c \
abis_nm.c \
@@ -45,19 +80,13 @@
bsc_vty.c \
bts_ericsson_rbs2000.c \
bts_init.c \
-   bts_ipaccess_nanobts.c \
-   bts_ipaccess_nanobts_omlattr.c \
bts_nokia_site.c \
-   bts_siemens_bs11.c \
bts_sysmobts.c \
bts_unknown.c \
chan_alloc.c \
codec_pref.c \
-   e1_config.c \
gsm_04_08_rr.c \
gsm_04_80_utils.c \
-   gsm_data.c \
-   gsm_timers.c \
gsm_timers_vty.c \
handover_cfg.c \
handover_decision.c \
@@ -73,7 +102,6 @@
mgw_endpoint_fsm.c \
neighbor_ident.c \
neighbor_ident_vty.c \
-   net_init.c \
gsm_08_08.c \
osmo_bsc_bssap.c \
osmo_bsc_ctrl.c \
@@ -93,7 +121,8 @@
$(NULL)

 osmo_bsc_LDADD = \
-   $(top_builddir)/src/libfilter/libfilter.a \
+   libbscbts.la \
+   $(abs_top_builddir)/src/libfilter/libfilter.a \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \
$(LIBOSMOVTY_LIBS) \
diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am
index 24cd230..445cc2e 100644
--- a/src/utils/Makefile.am
+++ b/src/utils/Makefile.am
@@ -47,12 +47,7 @@
$(NULL)

 bs11_config_LDADD = \
-   $(top_builddir)/src/osmo-bsc/abis_nm.o \
-   $(top_builddir)/src/osmo-bsc/bts_siemens_bs11.o \
-   $(top_builddir)/src/osmo-bsc/e1_config.o \
-   $(top_builddir)/src/osmo-bsc/gsm_data.o \
-   $(top_builddir)/src/osmo-bsc/gsm_timers.o \
-   $(top_builddir)/src/osmo-bsc/net_init.o \
+   $(top_builddir)/src/osmo-bsc/libbscbts.la \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \
$(LIBOSMOABIS_LIBS) \
@@ -118,8 +113,7 @@
$(NULL)

 meas_json_LDADD = \
-   $(top_builddir)/src/osmo-bsc/gsm_data.o \
-   $(top_builddir)/src/osmo-bsc/gsm_timers.o

Change in osmo-bsc[master]: Add configure flag to disable build of osmo-bsc

2019-03-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/13226


Change subject: Add configure flag to disable build of osmo-bsc
..

Add configure flag to disable build of osmo-bsc

This way only ipaccess utils can be built without requiring osmo-bsc
specific dependencies.

Change-Id: I39783245a11aacaecf0873b3b74b60b559256f79
---
M configure.ac
M contrib/jenkins.sh
M src/osmo-bsc/Makefile.am
M tests/Makefile.am
M tests/atlocal.in
M tests/testsuite.at
6 files changed, 91 insertions(+), 25 deletions(-)



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

diff --git a/configure.ac b/configure.ac
index cdee90c..539d64d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,15 +44,25 @@
 AM_CONDITIONAL(BUILD_IPA_UTILS, test "x$osmo_ac_ipa_utils" = "xyes")
 AC_SUBST(osmo_ac_ipa_utils)

+# Enable/disable osmo-bsc build?
+AC_ARG_ENABLE([osmo-bsc], [AS_HELP_STRING([--enable-osmo-bsc], [Build 
osmo-bsc])],
+[build_osmo_bsc="$enableval"],[build_osmo_bsc="yes"])
+AM_CONDITIONAL(BUILD_OSMO_BSC, test "x$build_osmo_bsc" = "xyes")
+AC_SUBST(build_osmo_bsc)
+
 PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.12.0)
 PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.12.0)
 PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 0.12.0)
 PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.12.0)
 PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.5.1)
-PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.3.0)
-PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 0.10.0)
-PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 0.10.0)
-PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.4.0)
+
+
+if test "x$build_osmo_bsc" = "xyes" ; then
+   PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.3.0)
+   PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 0.10.0)
+   PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 0.10.0)
+   PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.4.0)
+fi

 dnl checks for header files
 AC_HEADER_STDC
diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index a47935f..e288820 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -31,7 +31,36 @@
 export LD_LIBRARY_PATH="$inst/lib"
 export PATH="$inst/bin:$PATH"

+do_build() {
+   configure_flags="$1"
+   distcheck_flags="$2"
+   set +x
+   echo
+   echo
+   echo
+   echo " === osmo-bsc 
==="
+   echo
+   set -x
+
+   cd "$base"
+   autoreconf --install --force
+   ./configure $configure_flags
+   $MAKE $PARALLEL_MAKE
+   LD_LIBRARY_PATH="$inst/lib" $MAKE check \
+ || cat-testlogs.sh
+   LD_LIBRARY_PATH="$inst/lib" \
+ DISTCHECK_CONFIGURE_FLAGS="$distcheck_flags" \
+ $MAKE distcheck \
+ || cat-testlogs.sh
+   $MAKE maintainer-clean
+}
+
 osmo-build-dep.sh libosmo-abis
+
+# To build ipaccess-utils we just need libosmocore and libosmo-abis:
+ipacess_utils_flags="--enable-sanitize --disable-external-tests 
--disable-vty-tests --disable-osmo-bsc --enable-ipaccess-utils --enable-werror 
$CONFIG"
+do_build "$ipacess_utils_flags" "$ipacess_utils_flags"
+
 osmo-build-dep.sh libosmo-netif
 osmo-build-dep.sh libosmo-sccp
 osmo-build-dep.sh osmo-mgw
@@ -43,27 +72,10 @@
CONFIG="--enable-manuals"
 fi
 
-set +x
-echo
-echo
-echo
-echo " === osmo-bsc 
==="
-echo
-set -x
-
-cd "$base"
-autoreconf --install --force
-./configure --enable-sanitize --enable-external-tests --enable-werror $CONFIG
-$MAKE $PARALLEL_MAKE
-LD_LIBRARY_PATH="$inst/lib" $MAKE check \
-  || cat-testlogs.sh
-LD_LIBRARY_PATH="$inst/lib" \
-  DISTCHECK_CONFIGURE_FLAGS="--enable-vty-tests --enable-external-tests 
--enable-werror $CONFIG" \
-  $MAKE distcheck \
-  || cat-testlogs.sh
-
 if [ "$WITH_MANUALS" = "1" ] && [ "$PUBLISH" = "1" ]; then
make -C "$base/doc/manuals" publish
 fi

+do_build "--enable-sanitize --enable-external-tests --enable-werror $CONFIG" 
"--enable-vty-tests --enable-external-tests --enable-werror $CONFIG"
+
 osmo-clean-workspace.sh
diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am
index 0fabe51..eff8a67 100644
--- a/src/osmo-bsc/Makefile.am
+++ b/src/osmo-bsc/Makefile.am
@@ -43,6 +43,8 @@
$(LIBOSMOABIS_LIBS) \
$(NULL)

+if BUILD_OSMO_BSC
+
 bin_PROGRAMS = \
osmo-bsc \
$(NULL)
@@ -132,3 +134,5 @@
$(LIBOSMOSIGTRAN_LIBS) \
$(LIBOSMOMGCPCLIENT_LIBS) \
$(NULL)
+
+endif # BUILD_OSMO_BSC
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 446276b..4efdafa 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,12 +1,17 @@
 SUBDIRS = \
+   abis \
+   nanobts_omlattr \
+   $(NULL)
+
+if BUILD_OSMO_BSC
+SUBDIRS += \
bsc \
codec_pref \
gsm0408 \
-   abis \
subscr \
-   nanobts_omlattr \
handover \

Change in osmo-bsc[master]: net_init.c: remove unneeded header

2019-03-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/13224


Change subject: net_init.c: remove unneeded header
..

net_init.c: remove unneeded header

Change-Id: I9c2d07914bb19429bfc1f2c5a38a513749068304
---
M src/osmo-bsc/net_init.c
1 file changed, 0 insertions(+), 1 deletion(-)



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

diff --git a/src/osmo-bsc/net_init.c b/src/osmo-bsc/net_init.c
index 5ea564d..b4ff489 100644
--- a/src/osmo-bsc/net_init.c
+++ b/src/osmo-bsc/net_init.c
@@ -18,7 +18,6 @@
  */

 #include 
-#include 
 #include 
 #include 
 #include 

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9c2d07914bb19429bfc1f2c5a38a513749068304
Gerrit-Change-Number: 13224
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-bsc[master]: src/utils/Makefile.am: Drop unneeded sigtran and mgcp-client deps

2019-03-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/13223


Change subject: src/utils/Makefile.am: Drop unneeded sigtran and mgcp-client 
deps
..

src/utils/Makefile.am: Drop unneeded sigtran and mgcp-client deps

Change-Id: I1a91d673e08c161dd6110bd16e8f52cb17be398c
---
M src/utils/Makefile.am
1 file changed, 0 insertions(+), 3 deletions(-)



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

diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am
index 914a604..24cd230 100644
--- a/src/utils/Makefile.am
+++ b/src/utils/Makefile.am
@@ -11,8 +11,6 @@
$(LIBOSMOABIS_CFLAGS) \
$(COVERAGE_CFLAGS) \
$(SQLITE3_CFLAGS) \
-   $(LIBOSMOSIGTRAN_CFLAGS) \
-   $(LIBOSMOMGCPCLIENT_CFLAGS) \
$(NULL)

 AM_LDFLAGS = \
@@ -132,4 +130,3 @@
$(LIBOSMOGSM_CFLAGS) \
$(LIBOSMOABIS_CFLAGS) \
$(NULL)
-

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1a91d673e08c161dd6110bd16e8f52cb17be398c
Gerrit-Change-Number: 13223
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-bsc[master]: Move msc related code from gsm_data to bsc_msc

2019-03-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/13221


Change subject: Move msc related code from gsm_data to bsc_msc
..

Move msc related code from gsm_data to bsc_msc

This way ipaccess utils can be built without requiring libosmo-sigtran.

Change-Id: I508188896be58ddc3bd4e9c3c661c258c06866f4
---
M include/osmocom/bsc/bsc_msc_data.h
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/gsm_data.c
M src/osmo-bsc/osmo_bsc_msc.c
M tests/handover/Makefile.am
5 files changed, 19 insertions(+), 19 deletions(-)



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

diff --git a/include/osmocom/bsc/bsc_msc_data.h 
b/include/osmocom/bsc/bsc_msc_data.h
index 9f2d7d8..5202174 100644
--- a/include/osmocom/bsc/bsc_msc_data.h
+++ b/include/osmocom/bsc/bsc_msc_data.h
@@ -161,6 +161,9 @@
 struct bsc_msc_data *osmo_msc_data_find(struct gsm_network *, int);
 struct bsc_msc_data *osmo_msc_data_alloc(struct gsm_network *, int);

+
+struct osmo_cell_global_id *cgi_for_msc(struct bsc_msc_data *msc, struct 
gsm_bts *bts);
+
 /* Helper function to calculate the port number for a given
  * timeslot/multiplex. This functionality is needed to support
  * the sccp-lite scenario where the MGW is handled externally */
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index c4315c0..47ca5e8 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -1687,6 +1687,4 @@

 int bts_count_free_ts(struct gsm_bts *bts, enum gsm_phys_chan_config pchan);

-struct osmo_cell_global_id *cgi_for_msc(struct bsc_msc_data *msc, struct 
gsm_bts *bts);
-
 #endif /* _GSM_DATA_H */
diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c
index 0198fcf..a128216 100644
--- a/src/osmo-bsc/gsm_data.c
+++ b/src/osmo-bsc/gsm_data.c
@@ -38,7 +38,6 @@

 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -1694,19 +1693,3 @@
OSMO_VALUE_STRING(FOR_VTY),
{}
 };
-
-struct osmo_cell_global_id *cgi_for_msc(struct bsc_msc_data *msc, struct 
gsm_bts *bts)
-{
-   static struct osmo_cell_global_id cgi;
-   cgi.lai.plmn = msc->network->plmn;
-   if (msc->core_plmn.mcc != GSM_MCC_MNC_INVALID)
-   cgi.lai.plmn.mcc = msc->core_plmn.mcc;
-   if (msc->core_plmn.mnc != GSM_MCC_MNC_INVALID) {
-   cgi.lai.plmn.mnc = msc->core_plmn.mnc;
-   cgi.lai.plmn.mnc_3_digits = msc->core_plmn.mnc_3_digits;
-   }
-   cgi.lai.lac = (msc->core_lac != -1) ? msc->core_lac : 
bts->location_area_code;
-   cgi.cell_identity = (msc->core_ci != -1) ? msc->core_ci : 
bts->cell_identity;
-
-   return &cgi;
-}
diff --git a/src/osmo-bsc/osmo_bsc_msc.c b/src/osmo-bsc/osmo_bsc_msc.c
index 71931e6..4df1ce4 100644
--- a/src/osmo-bsc/osmo_bsc_msc.c
+++ b/src/osmo-bsc/osmo_bsc_msc.c
@@ -119,3 +119,18 @@
return msc_data;
 }

+struct osmo_cell_global_id *cgi_for_msc(struct bsc_msc_data *msc, struct 
gsm_bts *bts)
+{
+   static struct osmo_cell_global_id cgi;
+   cgi.lai.plmn = msc->network->plmn;
+   if (msc->core_plmn.mcc != GSM_MCC_MNC_INVALID)
+   cgi.lai.plmn.mcc = msc->core_plmn.mcc;
+   if (msc->core_plmn.mnc != GSM_MCC_MNC_INVALID) {
+   cgi.lai.plmn.mnc = msc->core_plmn.mnc;
+   cgi.lai.plmn.mnc_3_digits = msc->core_plmn.mnc_3_digits;
+   }
+   cgi.lai.lac = (msc->core_lac != -1) ? msc->core_lac : 
bts->location_area_code;
+   cgi.cell_identity = (msc->core_ci != -1) ? msc->core_ci : 
bts->cell_identity;
+
+   return &cgi;
+}
diff --git a/tests/handover/Makefile.am b/tests/handover/Makefile.am
index 5e9af04..5e4440c 100644
--- a/tests/handover/Makefile.am
+++ b/tests/handover/Makefile.am
@@ -69,6 +69,7 @@
$(top_builddir)/src/osmo-bsc/neighbor_ident.o \
$(top_builddir)/src/osmo-bsc/net_init.o \
$(top_builddir)/src/osmo-bsc/osmo_bsc_lcls.o \
+   $(top_builddir)/src/osmo-bsc/osmo_bsc_msc.o \
$(top_builddir)/src/osmo-bsc/paging.o \
$(top_builddir)/src/osmo-bsc/pcu_sock.o \
$(top_builddir)/src/osmo-bsc/penalty_timers.o \

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I508188896be58ddc3bd4e9c3c661c258c06866f4
Gerrit-Change-Number: 13221
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-bsc[master]: configure.ac: Add flag to enable/disable build of ipaccess related utils

2019-03-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/13222


Change subject: configure.ac: Add flag to enable/disable build of ipaccess 
related utils
..

configure.ac: Add flag to enable/disable build of ipaccess related utils

Change-Id: Iff70dc46c77b2ac58351ad9a91caf3f524c6fd89
---
M configure.ac
M src/Makefile.am
2 files changed, 9 insertions(+), 1 deletion(-)



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

diff --git a/configure.ac b/configure.ac
index eafe4d6..cdee90c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,6 +38,11 @@
 AC_SEARCH_LIBS([dlopen], [dl dld], [LIBRARY_DL="$LIBS";LIBS=""])
 AC_SUBST(LIBRARY_DL)

+# Enable/disable ipaccess-utils (src/ipacces/)?
+AC_ARG_ENABLE([ipaccess-utils], [AS_HELP_STRING([--enable-ipaccess-utils], 
[Build ipaccess utils: abisip-find, ipaccess-config, ...])],
+[osmo_ac_ipa_utils="$enableval"],[osmo_ac_ipa_utils="yes"])
+AM_CONDITIONAL(BUILD_IPA_UTILS, test "x$osmo_ac_ipa_utils" = "xyes")
+AC_SUBST(osmo_ac_ipa_utils)

 PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.12.0)
 PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.12.0)
diff --git a/src/Makefile.am b/src/Makefile.am
index 6c63eea..62ae4dd 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -23,5 +23,8 @@
libfilter \
osmo-bsc \
utils \
-   ipaccess \
$(NULL)
+
+if BUILD_IPA_UTILS
+SUBDIRS += ipaccess
+endif

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iff70dc46c77b2ac58351ad9a91caf3f524c6fd89
Gerrit-Change-Number: 13222
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-bsc[master]: Move LCLS references from gsm_data to osmo_bsc_lcls

2019-03-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/13220


Change subject: Move LCLS references from gsm_data to osmo_bsc_lcls
..

Move LCLS references from gsm_data to osmo_bsc_lcls

This commit aims at better ordering of content in order to get rid of
sigtran stuff in gsm_data. This way we can avoid requiring
libosmo-sigtran when building ipaccess utils.

Change-Id: I8941f059d6e4eb21a971d48d2b66c29ec3355a6d
---
M include/osmocom/bsc/bsc_msc_data.h
M include/osmocom/bsc/osmo_bsc_lcls.h
M src/osmo-bsc/gsm_data.c
M src/osmo-bsc/osmo_bsc_lcls.c
4 files changed, 24 insertions(+), 20 deletions(-)



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

diff --git a/include/osmocom/bsc/bsc_msc_data.h 
b/include/osmocom/bsc/bsc_msc_data.h
index 0c2094e..9f2d7d8 100644
--- a/include/osmocom/bsc/bsc_msc_data.h
+++ b/include/osmocom/bsc/bsc_msc_data.h
@@ -29,6 +29,7 @@
 #define _OSMO_MSC_DATA_H

 #include "debug.h"
+#include "osmo_bsc_lcls.h"

 #include 
 #include 
@@ -53,19 +54,6 @@
MSC_CON_TYPE_LOCAL,
 };

-enum bsc_lcls_mode {
-   BSC_LCLS_MODE_DISABLED,
-   BSC_LCLS_MODE_MGW_LOOP,
-   BSC_LCLS_MODE_BTS_LOOP,
-};
-
-extern const struct value_string bsc_lcls_mode_names[];
-
-static inline const char *bsc_lcls_mode_name(enum bsc_lcls_mode m)
-{
-   return get_value_string(bsc_lcls_mode_names, m);
-}
-
 /*! /brief Information on a remote MSC for libbsc.
  */
 struct bsc_msc_data {
diff --git a/include/osmocom/bsc/osmo_bsc_lcls.h 
b/include/osmocom/bsc/osmo_bsc_lcls.h
index d98fe98..8bbd552 100644
--- a/include/osmocom/bsc/osmo_bsc_lcls.h
+++ b/include/osmocom/bsc/osmo_bsc_lcls.h
@@ -1,4 +1,7 @@
 #pragma once
+
+#include "gsm_data.h"
+
 #include 

 enum lcls_fsm_state {
@@ -29,6 +32,19 @@
LCLS_EV_OTHER_DEAD,
 };

+enum bsc_lcls_mode {
+   BSC_LCLS_MODE_DISABLED,
+   BSC_LCLS_MODE_MGW_LOOP,
+   BSC_LCLS_MODE_BTS_LOOP,
+};
+
+extern const struct value_string bsc_lcls_mode_names[];
+
+static inline const char *bsc_lcls_mode_name(enum bsc_lcls_mode m)
+{
+   return get_value_string(bsc_lcls_mode_names, m);
+}
+
 enum gsm0808_lcls_status lcls_get_status(const struct 
gsm_subscriber_connection *conn);

 void lcls_update_config(struct gsm_subscriber_connection *conn,
diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c
index 0492571..0198fcf 100644
--- a/src/osmo-bsc/gsm_data.c
+++ b/src/osmo-bsc/gsm_data.c
@@ -37,6 +37,7 @@
 #include 

 #include 
+#include 
 #include 
 #include 
 #include 
@@ -46,13 +47,6 @@

 void *tall_bsc_ctx = NULL;

-const struct value_string bsc_lcls_mode_names[] = {
-   { BSC_LCLS_MODE_DISABLED,   "disabled" },
-   { BSC_LCLS_MODE_MGW_LOOP,   "mgw-loop" },
-   { BSC_LCLS_MODE_BTS_LOOP,   "bts-loop" },
-   { 0, NULL }
-};
-
 static LLIST_HEAD(bts_models);

 void set_ts_e1link(struct gsm_bts_trx_ts *ts, uint8_t e1_nr,
diff --git a/src/osmo-bsc/osmo_bsc_lcls.c b/src/osmo-bsc/osmo_bsc_lcls.c
index f7b84e1..c1f62dc 100644
--- a/src/osmo-bsc/osmo_bsc_lcls.c
+++ b/src/osmo-bsc/osmo_bsc_lcls.c
@@ -42,6 +42,12 @@
{ 0, NULL }
 };

+const struct value_string bsc_lcls_mode_names[] = {
+   { BSC_LCLS_MODE_DISABLED,   "disabled" },
+   { BSC_LCLS_MODE_MGW_LOOP,   "mgw-loop" },
+   { BSC_LCLS_MODE_BTS_LOOP,   "bts-loop" },
+   { 0, NULL }
+};

 /***
  * Utility functions

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8941f059d6e4eb21a971d48d2b66c29ec3355a6d
Gerrit-Change-Number: 13220
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-bsc[master]: ipaccess/Makefile.am: Remove unneeded libmgcp-client dep

2019-03-12 Thread Pau Espin Pedrol
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/13218

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

Change subject: ipaccess/Makefile.am: Remove unneeded libmgcp-client dep
..

ipaccess/Makefile.am: Remove unneeded libmgcp-client dep

Change-Id: I3c926b088fe1b25b0f65d673465c3fa0c1d0b86f
---
M src/ipaccess/Makefile.am
M src/osmo-bsc/gsm_data.c
2 files changed, 0 insertions(+), 3 deletions(-)


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3c926b088fe1b25b0f65d673465c3fa0c1d0b86f
Gerrit-Change-Number: 13218
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-bsc[master]: ipaccess/Makefile.am: Remove unneeded libmgcp-client dep

2019-03-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/13218


Change subject: ipaccess/Makefile.am: Remove unneeded libmgcp-client dep
..

ipaccess/Makefile.am: Remove unneeded libmgcp-client dep

Change-Id: I3c926b088fe1b25b0f65d673465c3fa0c1d0b86f
---
M src/ipaccess/Makefile.am
1 file changed, 0 insertions(+), 2 deletions(-)



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

diff --git a/src/ipaccess/Makefile.am b/src/ipaccess/Makefile.am
index d73aa4d..c504234 100644
--- a/src/ipaccess/Makefile.am
+++ b/src/ipaccess/Makefile.am
@@ -10,7 +10,6 @@
$(LIBOSMOGSM_CFLAGS) \
$(LIBOSMOABIS_CFLAGS) \
$(COVERAGE_CFLAGS) \
-   $(LIBOSMOMGCPCLIENT_CFLAGS) \
$(LIBOSMOSIGTRAN_CFLAGS) \
$(NULL)

@@ -22,7 +21,6 @@
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \
$(LIBOSMOABIS_LIBS) \
-   $(LIBOSMOMGCPCLIENT_LIBS) \
$(LIBOSMOSIGTRAN_LIBS) \
$(NULL)


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c926b088fe1b25b0f65d673465c3fa0c1d0b86f
Gerrit-Change-Number: 13218
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-bsc[master]: ipaccess/Makefile.am: Remove unneeded libosmo-sigtran dep

2019-03-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/13219


Change subject: ipaccess/Makefile.am: Remove unneeded libosmo-sigtran dep
..

ipaccess/Makefile.am: Remove unneeded libosmo-sigtran dep

Change-Id: Idc26f178fa8942fe407ca01e23b0a21955727dca
---
M src/ipaccess/Makefile.am
1 file changed, 0 insertions(+), 2 deletions(-)



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

diff --git a/src/ipaccess/Makefile.am b/src/ipaccess/Makefile.am
index c504234..3578a40 100644
--- a/src/ipaccess/Makefile.am
+++ b/src/ipaccess/Makefile.am
@@ -10,7 +10,6 @@
$(LIBOSMOGSM_CFLAGS) \
$(LIBOSMOABIS_CFLAGS) \
$(COVERAGE_CFLAGS) \
-   $(LIBOSMOSIGTRAN_CFLAGS) \
$(NULL)

 AM_LDFLAGS = \
@@ -21,7 +20,6 @@
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \
$(LIBOSMOABIS_LIBS) \
-   $(LIBOSMOSIGTRAN_LIBS) \
$(NULL)

 bin_PROGRAMS = \

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc26f178fa8942fe407ca01e23b0a21955727dca
Gerrit-Change-Number: 13219
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in mncc-python[master]: Add git-review config

2019-03-12 Thread Max
Max has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13217 )

Change subject: Add git-review config
..

Add git-review config

Change-Id: I80c69ce43b6c0ad36f709340c8184620caf1cbf0
---
A .gitreview
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..c302438
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,3 @@
+[gerrit]
+host=gerrit.osmocom.org
+project=mncc-python

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

Gerrit-Project: mncc-python
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I80c69ce43b6c0ad36f709340c8184620caf1cbf0
Gerrit-Change-Number: 13217
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: fixeria 


Change in mncc-python[master]: Add git-review config

2019-03-12 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/13217 )

Change subject: Add git-review config
..


Patch Set 1: Verified+1


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

Gerrit-Project: mncc-python
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I80c69ce43b6c0ad36f709340c8184620caf1cbf0
Gerrit-Change-Number: 13217
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: fixeria 
Gerrit-Comment-Date: Tue, 12 Mar 2019 16:38:30 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in mncc-python[master]: Add git-review config

2019-03-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/13217 )

Change subject: Add git-review config
..


Patch Set 1:

@max, looks like you need to verify it yourself?


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

Gerrit-Project: mncc-python
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I80c69ce43b6c0ad36f709340c8184620caf1cbf0
Gerrit-Change-Number: 13217
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: fixeria 
Gerrit-Comment-Date: Tue, 12 Mar 2019 16:34:57 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in mncc-python[master]: Add git-review config

2019-03-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/13217 )

Change subject: Add git-review config
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: mncc-python
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I80c69ce43b6c0ad36f709340c8184620caf1cbf0
Gerrit-Change-Number: 13217
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: fixeria 
Gerrit-Comment-Date: Tue, 12 Mar 2019 16:34:32 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in mncc-python[master]: Add git-review config

2019-03-12 Thread Max
Max has uploaded this change for review. ( https://gerrit.osmocom.org/13217


Change subject: Add git-review config
..

Add git-review config

Change-Id: I80c69ce43b6c0ad36f709340c8184620caf1cbf0
---
A .gitreview
1 file changed, 3 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/mncc-python refs/changes/17/13217/1

diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..c302438
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,3 @@
+[gerrit]
+host=gerrit.osmocom.org
+project=mncc-python

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

Gerrit-Project: mncc-python
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I80c69ce43b6c0ad36f709340c8184620caf1cbf0
Gerrit-Change-Number: 13217
Gerrit-PatchSet: 1
Gerrit-Owner: Max 


Change in osmo-ci[master]: TTCN-3: add PCU tests

2019-03-12 Thread Max
Max has abandoned this change. ( https://gerrit.osmocom.org/11603 )

Change subject: TTCN-3: add PCU tests
..


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: Ifee0373cd920e80486cb40cb872f2be1e736ef06
Gerrit-Change-Number: 11603
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: osmith 


Change in osmo-msc[master]: vlr_subscr: use osmo_use_count

2019-03-12 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/13136 )

Change subject: vlr_subscr: use osmo_use_count
..


Patch Set 2:

(1 comment)

Not sure what's the status of libosmocore patch, but you can split this one 
into 2 patches: 1) update #define of macro wrappers with extra parameters 2) 
actually adding use_count bits and using extra parameters.

That way patch will become significantly smaller (and hence easier to review) 
and the 1st part can be merged right away without waiting for libosmocore part.

https://gerrit.osmocom.org/#/c/13136/2/include/osmocom/msc/vlr.h
File include/osmocom/msc/vlr.h:

https://gerrit.osmocom.org/#/c/13136/2/include/osmocom/msc/vlr.h@361
PS2, Line 361: #define vlr_subscr_find_by_tmsi(vlr, tmsi, USE) \
This change is pretty-much independent from use_count API?



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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib06d030e8464abe415ff597d462ed40eeddef475
Gerrit-Change-Number: 13136
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Max 
Gerrit-Comment-Date: Tue, 12 Mar 2019 15:04:13 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in libosmocore[master]: Fix build on non-glibc systems

2019-03-12 Thread Max
Max has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13209 )

Change subject: Fix build on non-glibc systems
..

Fix build on non-glibc systems

Change-Id: Id5d577522a4889e152158f7e93ee1c99d3a21003
---
M src/gsm/gsm_utils.c
1 file changed, 8 insertions(+), 3 deletions(-)

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



diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c
index 02cb3d5..c9c15d5 100644
--- a/src/gsm/gsm_utils.c
+++ b/src/gsm/gsm_utils.c
@@ -100,7 +100,12 @@

 #if (!EMBEDDED)
 /* FIXME: this can be removed once we bump glibc requirements to 2.25: */
-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2,25)
+#ifdef __GLIBC_PREREQ
+#if __GLIBC_PREREQ(2,25)
+#define HAVE_GLIBC_GETRANDOM
+#endif /* if __GLIBC_PREREQ(2,25) */
+#endif /* ifdef __GLIBC_PREREQ */
+#ifdef HAVE_GLIBC_GETRANDOM
 #pragma message ("glibc " OSMO_STRINGIFY_VAL(__GLIBC__) "." 
OSMO_STRINGIFY_VAL(__GLIBC_MINOR__) " random detected")
 #include 
 #undef USE_GNUTLS
@@ -109,7 +114,7 @@
 #ifndef GRND_NONBLOCK
 #define GRND_NONBLOCK 0x0001
 #endif /* ifndef GRND_NONBLOCK */
-#endif /* if __GLIBC_PREREQ */
+#endif /* ifdef HAVE_GLIBC_GETRANDOM */
 #endif /* !EMBEDDED */

 #if (USE_GNUTLS)
@@ -447,7 +452,7 @@
if (len > OSMO_MAX_RAND_ID_LEN)
return -E2BIG;
 #if (!EMBEDDED)
-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2,25)
+#ifdef HAVE_GLIBC_GETRANDOM
rc = getrandom(out, len, GRND_NONBLOCK);
 #elif HAVE_DECL_SYS_GETRANDOM
 #pragma message ("Using direct syscall access for getrandom(): consider 
upgrading to glibc >= 2.25")

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Id5d577522a4889e152158f7e93ee1c99d3a21003
Gerrit-Change-Number: 13209
Gerrit-PatchSet: 1
Gerrit-Owner: supersat 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: tnt 


Change in libosmocore[master]: Fix build on non-glibc systems

2019-03-12 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/13209 )

Change subject: Fix build on non-glibc systems
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id5d577522a4889e152158f7e93ee1c99d3a21003
Gerrit-Change-Number: 13209
Gerrit-PatchSet: 1
Gerrit-Owner: supersat 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: tnt 
Gerrit-Comment-Date: Tue, 12 Mar 2019 14:56:26 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-pcu[master]: Fix Channel Coding Command for MCS

2019-03-12 Thread Max
Max has uploaded this change for review. ( https://gerrit.osmocom.org/13216


Change subject: Fix Channel Coding Command for MCS
..

Fix Channel Coding Command for MCS

Previously result of ".to_num() - 1" was used without any checks which
means that in case of to_num() returning zero we would effectively try
to encode (uint8_t)(-1).

Let's fix this by using proper mcs_chan_code() function which returns
Channel Coding Command for MCS without the need to further correct it
and adjust expected tests output accordingly.

Change-Id: I868062a81fffe6714a811c032215f25a79259905
---
M src/encoding.cpp
M tests/types/TypesTest.cpp
M tests/types/TypesTest.ok
3 files changed, 10 insertions(+), 10 deletions(-)



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

diff --git a/src/encoding.cpp b/src/encoding.cpp
index c2502b6..b7bc3cb 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -268,7 +268,7 @@
bitvec_write_field(dest, &wp, usf, 3);// USF
bitvec_write_field(dest, &wp, 0, 1);// USF_GRANULARITY
bitvec_write_field(dest, &wp, 0, 1);   // "0" power control: Not Present
-   bitvec_write_field(dest, &wp, tbf->current_cs().to_num() - 1, 2);// 
CHANNEL_CODING_COMMAND
+   bitvec_write_field(dest, &wp, mcs_chan_code(tbf->current_cs()), 2);
// CHANNEL_CODING_COMMAND
bitvec_write_field(dest, &wp, 1, 1);// TLLI_BLOCK_CHANNEL_CODING
if (alpha) {
bitvec_write_field(dest, &wp, 0x1, 1);   // ALPHA = present
@@ -315,7 +315,7 @@
CHECK(rc);

/* 3GPP TS 44.060 §12.10d EGPRS Modulation and coding Scheme 
description: */
-   rc = bitvec_set_u64(dest, tbf->current_cs().to_num() - 1, 4, false); /* 
EGPRS CHANNEL_CODING_COMMAND */
+   rc = bitvec_set_u64(dest, mcs_chan_code(tbf->current_cs()), 4, false); 
/* EGPRS CHANNEL_CODING_COMMAND */
CHECK(rc);

/* TLLI_BLOCK_CHANNEL_CODING */
@@ -571,7 +571,7 @@

if (!use_egprs) {
bitvec_write_field(dest, &wp,0x0,1); // Message escape
-   bitvec_write_field(dest, &wp,tbf->current_cs().to_num()-1, 2); 
// CHANNEL_CODING_COMMAND
+   bitvec_write_field(dest, &wp, mcs_chan_code(tbf->current_cs()), 
2); // CHANNEL_CODING_COMMAND
bitvec_write_field(dest, &wp,0x1,1); // 
TLLI_BLOCK_CHANNEL_CODING
write_ta_ie(dest, wp,tbf->ta(), ta_idx, ta_ts);
} else { /* EPGRS */
@@ -579,7 +579,7 @@
bitvec_write_field(dest, &wp,0x0,2); // EGPRS message contents
bitvec_write_field(dest, &wp,0x0,1); // No 
CONTENTION_RESOLUTION_TLLI
bitvec_write_field(dest, &wp,0x0,1); // No COMPACT reduced MA
-   bitvec_write_field(dest, &wp,tbf->current_cs().to_num()-1, 4); 
// EGPRS Modulation and Coding IE
+   bitvec_write_field(dest, &wp, mcs_chan_code(tbf->current_cs()), 
4); // EGPRS Modulation and Coding IE
/* 0: no RESEGMENT, 1: Segmentation*/
bitvec_write_field(dest, &wp, 0x1, 1);
write_ws(dest, &wp, tbf->window_size()); // EGPRS Window Size
@@ -809,7 +809,7 @@
struct gprs_rlcmac_ul_tbf *tbf, bool is_final)
 {

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

bitvec_write_field(dest, &wp, 1, 1); // 1: have 
CONTENTION_RESOLUTION_TLLI
@@ -991,7 +991,7 @@
bitvec_write_field(dest, &wp, 0, 2); // fixed 00
/* CHANNEL_CODING_COMMAND */
bitvec_write_field(dest, &wp,
-   tbf->current_cs().to_num() - 1, 4);
+   mcs_chan_code(tbf->current_cs()), 4);
/* 0: no RESEGMENT, 1: Segmentation*/
bitvec_write_field(dest, &wp, 1, 1);
bitvec_write_field(dest, &wp, 1, 1); // PRE_EMPTIVE_TRANSMISSION, TODO: 
This resembles GPRS, change it?
diff --git a/tests/types/TypesTest.cpp b/tests/types/TypesTest.cpp
index 9c24ffe..4879424 100644
--- a/tests/types/TypesTest.cpp
+++ b/tests/types/TypesTest.cpp
@@ -497,7 +497,7 @@
 0x23, /* TA */
 0x00, /* 0-length §10.5.2.21 Mobile Allocation 
*/
 /* ETSI TS 44.018 §10.5.2.16 IA Rest Octets */
-0xc8, 0x02, 0x7b, 0xa0, 0x2b, 0x2b, 0x2b, 
0x2b, 0x2b, 0x2b, 0x2b, 0x2b, };
+0xc8, 0x02, 0x1b, 0xa0, 0x2b, 0x2b, 0x2b, 
0x2b, 0x2b, 0x2b, 0x2b, 0x2b, };

check_imm_ass(tbf, false, GSM_L1_BURST_TYPE_ACCESS_0, res, sizeof(res), 
"ia_rest_uplink(MBA)");
 }
@@ -537,7 +537,7 @@
 0x23, /* TA */
 0x00, /* 0-length §10.5.2.21 Mobile Allocation 
*/

Change in osmo-pcu[master]: MCS: add mcs_is_*() helpers

2019-03-12 Thread Max
Max has uploaded this change for review. ( https://gerrit.osmocom.org/13214


Change subject: MCS: add mcs_is_*() helpers
..

MCS: add mcs_is_*() helpers

In preparation for Channel Coding Command encoder in follow-up patches
let's add necessary helpers. Those are similar to previously used
helpers from GprsCodingScheme class but without CamelCase and with less
typo chances between Gprs and Egprs cases.

Change-Id: I6699cbc8d7ae766fa4d2b3d37e5f9ff1cf158b7e
---
M src/coding_scheme.c
M src/coding_scheme.h
M src/decoding.cpp
M src/encoding.cpp
M src/gprs_coding_scheme.cpp
M src/gprs_coding_scheme.h
M src/gprs_ms.cpp
M src/pdch.cpp
M src/tbf.cpp
M src/tbf_dl.cpp
M src/tbf_ul.cpp
M tests/edge/EdgeTest.cpp
12 files changed, 65 insertions(+), 45 deletions(-)



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

diff --git a/src/coding_scheme.c b/src/coding_scheme.c
index 9e9df6f..28bd4fb 100644
--- a/src/coding_scheme.c
+++ b/src/coding_scheme.c
@@ -46,6 +46,24 @@
return get_value_string(mcs_names, val);
 }

+bool mcs_is_gprs(enum CodingScheme cs)
+{
+   return CS1 <= cs && cs <= CS4;
+}
+
+bool mcs_is_edge(enum CodingScheme cs)
+{
+   return MCS1 <= cs && cs <= MCS9;
+}
+
+bool mcs_is_edge_gmsk(enum CodingScheme cs)
+{
+   if (mcs_is_edge(cs))
+   return cs <= MCS4;
+
+   return false;
+}
+
 static struct {
struct {
uint8_t data_header_bits;
diff --git a/src/coding_scheme.h b/src/coding_scheme.h
index 2f56aec..561e2a4 100644
--- a/src/coding_scheme.h
+++ b/src/coding_scheme.h
@@ -33,6 +33,10 @@
 extern const struct value_string mcs_names[];
 const char *mcs_name(enum CodingScheme val);

+bool mcs_is_gprs(enum CodingScheme cs);
+bool mcs_is_edge(enum CodingScheme cs);
+bool mcs_is_edge_gmsk(enum CodingScheme cs);
+
 enum HeaderType {
HEADER_INVALID,
HEADER_GPRS_CONTROL,
diff --git a/src/decoding.cpp b/src/decoding.cpp
index 1473ff7..d439e30 100644
--- a/src/decoding.cpp
+++ b/src/decoding.cpp
@@ -215,7 +215,7 @@
"but no more chunks possible\n");
return -ENOSPC;
}
-   } else if (cs.isEgprs()) {
+   } else if (mcs_is_edge(cs)) {
/* if E is not set (LI follows), EGPRS */
num_chunks = parse_extensions_egprs(data, data_len, &offs,
is_last_block,
@@ -240,7 +240,7 @@
}

memcpy(&tlli_enc, data + offs, sizeof(tlli_enc));
-   if (cs.isGprs())
+   if (mcs_is_gprs(cs))
/* The TLLI is encoded in big endian for GPRS (see
 * TS 44.060, figure 10.2.2.1, note) */
*tlli = be32toh(tlli_enc);
diff --git a/src/encoding.cpp b/src/encoding.cpp
index ad53b0b..c2502b6 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -1605,12 +1605,12 @@
gprs_llc *llc, int *offset, int *num_chunks,
uint8_t *data_block, bool is_final, int *count_payload)
 {
-   if (cs.isGprs())
+   if (mcs_is_gprs(cs))
return rlc_data_to_dl_append_gprs(rdbi,
llc, offset, num_chunks, data_block, is_final,
count_payload);

-   if (cs.isEgprs())
+   if (mcs_is_edge(cs))
return rlc_data_to_dl_append_egprs(rdbi,
llc, offset, num_chunks, data_block, is_final,
count_payload);
diff --git a/src/gprs_coding_scheme.cpp b/src/gprs_coding_scheme.cpp
index e94b4d8..e316097 100644
--- a/src/gprs_coding_scheme.cpp
+++ b/src/gprs_coding_scheme.cpp
@@ -228,10 +228,10 @@

 void GprsCodingScheme::inc()
 {
-   if (isGprs() && m_scheme == CS4)
+   if (mcs_is_gprs(m_scheme) && m_scheme == CS4)
return;

-   if (isEgprs() && m_scheme == MCS9)
+   if (mcs_is_edge(m_scheme) && m_scheme == MCS9)
return;

if (!isValid())
@@ -242,10 +242,10 @@

 void GprsCodingScheme::dec()
 {
-   if (isGprs() && m_scheme == CS1)
+   if (mcs_is_gprs(m_scheme) && m_scheme == CS1)
return;

-   if (isEgprs() && m_scheme == MCS1)
+   if (mcs_is_edge(m_scheme) && m_scheme == MCS1)
return;

if (!isValid())
diff --git a/src/gprs_coding_scheme.h b/src/gprs_coding_scheme.h
index b65bf01..d6c0045 100644
--- a/src/gprs_coding_scheme.h
+++ b/src/gprs_coding_scheme.h
@@ -45,9 +45,7 @@
GprsCodingScheme& operator =(GprsCodingScheme o);

bool isValid()   const {return UNKNOWN <= m_scheme && m_scheme <= MCS9;}
-   bool isGprs()   const {return CS1 <= m_scheme && m_scheme <= CS4;}
-   bool isEgprs()  const {return m_scheme >= MCS1;}
-   bool isEgprsGmsk()  const {return isEgprs() && m_scheme <= MCS4;}
+
bool isCompatible(enum Mode mode) const;
bool isCompatible(GprsCodingScheme o) const;
   

Change in osmo-pcu[master]: MCS: add Channel Coding Command encoder

2019-03-12 Thread Max
Max has uploaded this change for review. ( https://gerrit.osmocom.org/13215


Change subject: MCS: add Channel Coding Command encoder
..

MCS: add Channel Coding Command encoder

Add function to encode MCS value as proper EDGE or GPRS Channel Coding
value according to 3GPP TS 44.060 and corresponding helpers.

Use it for everything except IA Rest Octet encoding which is done in a
follow-up patches to make sure that we distinguish between
encoding-related changes to test output and unrelated changes.

Change-Id: I127fb29f5aaf77a7f6c4c565dfeb3b711af9845d
---
M src/coding_scheme.c
M src/coding_scheme.h
M src/gprs_coding_scheme.cpp
M src/gprs_coding_scheme.h
M src/gprs_ms.cpp
M tests/ms/MsTest.cpp
M tests/tbf/TbfTest.cpp
7 files changed, 31 insertions(+), 20 deletions(-)



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

diff --git a/src/coding_scheme.c b/src/coding_scheme.c
index 28bd4fb..372da66 100644
--- a/src/coding_scheme.c
+++ b/src/coding_scheme.c
@@ -64,6 +64,19 @@
return false;
 }

+/* Return 3GPP TS 44.060 §12.10d (EDGE) or Table 11.2.28.2 (GPRS) Channel 
Coding Command value */
+uint8_t mcs_chan_code(enum CodingScheme cs)
+{
+   if (mcs_is_gprs(cs))
+   return cs - CS1;
+
+   if (mcs_is_edge(cs))
+   return cs - MCS1;
+
+   /* Defaults to (M)CS1 */
+   return 0;
+}
+
 static struct {
struct {
uint8_t data_header_bits;
diff --git a/src/coding_scheme.h b/src/coding_scheme.h
index 561e2a4..2befa84 100644
--- a/src/coding_scheme.h
+++ b/src/coding_scheme.h
@@ -37,6 +37,8 @@
 bool mcs_is_edge(enum CodingScheme cs);
 bool mcs_is_edge_gmsk(enum CodingScheme cs);

+uint8_t mcs_chan_code(enum CodingScheme cs);
+
 enum HeaderType {
HEADER_INVALID,
HEADER_GPRS_CONTROL,
diff --git a/src/gprs_coding_scheme.cpp b/src/gprs_coding_scheme.cpp
index e316097..23e4196 100644
--- a/src/gprs_coding_scheme.cpp
+++ b/src/gprs_coding_scheme.cpp
@@ -67,10 +67,7 @@
const GprsCodingScheme 
demanded_mcs,
const unsigned arq_type)
 {
-   OSMO_ASSERT(mcs.to_num() > 0);
-   OSMO_ASSERT(demanded_mcs.to_num() > 0);
-
-   return egprs_mcs_retx_tbl[arq_type][mcs.to_num() - 
1][demanded_mcs.to_num() - 1];
+   return 
egprs_mcs_retx_tbl[arq_type][mcs_chan_code(mcs)][mcs_chan_code(demanded_mcs)];
 }

 static struct {
diff --git a/src/gprs_coding_scheme.h b/src/gprs_coding_scheme.h
index d6c0045..99a1d86 100644
--- a/src/gprs_coding_scheme.h
+++ b/src/gprs_coding_scheme.h
@@ -82,6 +82,7 @@
enum CodingScheme m_scheme;
 };

+// FIXME: remove once < comparison operator below is no longer necessary
 inline uint8_t GprsCodingScheme::to_num() const
 {
if (mcs_is_gprs(m_scheme))
diff --git a/src/gprs_ms.cpp b/src/gprs_ms.cpp
index 08b94be..fdcfc3c 100644
--- a/src/gprs_ms.cpp
+++ b/src/gprs_ms.cpp
@@ -523,7 +523,7 @@
m_nack_rate_dl = error_rate;

if (error_rate > bts_data->cs_adj_upper_limit) {
-   if (m_current_cs_dl.to_num() > 1) {
+   if (mcs_chan_code(m_current_cs_dl) > 0) {
m_current_cs_dl.dec(mode());
LOGP(DRLCMACDL, LOGL_INFO,
"MS (IMSI %s): High error rate %d%%, "
@@ -621,7 +621,7 @@
int low;
int high;
GprsCodingScheme new_cs_ul = m_current_cs_ul;
-   uint8_t current_cs_num = m_current_cs_ul.to_num();
+   uint8_t current_cs = mcs_chan_code(m_current_cs_ul);

bts_data = m_bts->bts_data();

@@ -632,8 +632,6 @@
return;
}

-   OSMO_ASSERT(current_cs_num > 0);
-
if (!m_current_cs_ul) {
LOGP(DRLCMACMEAS, LOGL_ERROR,
 "Unable to update UL (M)CS because it's not set: %s\n",
@@ -651,15 +649,15 @@
old_link_qual = meas->link_qual;

if (mcs_is_gprs(m_current_cs_ul)) {
-   if (current_cs_num > MAX_GPRS_CS)
-   current_cs_num = MAX_GPRS_CS;
-   low  = bts_data->cs_lqual_ranges[current_cs_num-1].low;
-   high = bts_data->cs_lqual_ranges[current_cs_num-1].high;
+   if (current_cs >= MAX_GPRS_CS)
+   current_cs = MAX_GPRS_CS - 1;
+   low  = bts_data->cs_lqual_ranges[current_cs].low;
+   high = bts_data->cs_lqual_ranges[current_cs].high;
} else if (mcs_is_edge(m_current_cs_ul)) {
-   if (current_cs_num > MAX_EDGE_MCS)
-   current_cs_num = MAX_EDGE_MCS;
-   low  = bts_data->mcs_lqual_ranges[current_cs_num-1].low;
-   high = bts_data->mcs_lqual_ranges[current_cs_num-1].high;
+   if (current_cs >= MAX_EDGE_MCS)
+   current_cs = MAX_EDGE_MCS - 1;
+   low  = bts_data->mcs_lqual_r

Change in osmocom-bb[master]: trxcon/scheduler: clarify decoding of incomplete xCCH blocks

2019-03-12 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/13197 )

Change subject: trxcon/scheduler: clarify decoding of incomplete xCCH blocks
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3f499837413e1dbd0ca62229dc9cb6f0f7475a42
Gerrit-Change-Number: 13197
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: tnt 
Gerrit-Comment-Date: Tue, 12 Mar 2019 13:16:17 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmocom-bb[master]: trxcon/scheduler: clarify decoding of incomplete xCCH blocks

2019-03-12 Thread Vadim Yanitskiy
Vadim Yanitskiy has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13197 )

Change subject: trxcon/scheduler: clarify decoding of incomplete xCCH blocks
..

trxcon/scheduler: clarify decoding of incomplete xCCH blocks

Inspired by Sylvain's message at #osmocom.
Change-Id: I3f499837413e1dbd0ca62229dc9cb6f0f7475a42
---
M src/host/trxcon/sched_lchan_xcch.c
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/src/host/trxcon/sched_lchan_xcch.c 
b/src/host/trxcon/sched_lchan_xcch.c
index 71eb38d..2d2b1d9 100644
--- a/src/host/trxcon/sched_lchan_xcch.c
+++ b/src/host/trxcon/sched_lchan_xcch.c
@@ -92,6 +92,10 @@
(*first_fn) % ts->mf_layout->period,
ts->mf_layout->period,
lchan_desc->name);
+   /* NOTE: xCCH has an insane amount of redundancy for error
+* correction, so even just 2 valid bursts might be enough
+* to reconstruct some L2 frames. This is why we do not
+* abort here. */
}

/* Attempt to decode */

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I3f499837413e1dbd0ca62229dc9cb6f0f7475a42
Gerrit-Change-Number: 13197
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: tnt 


Change in osmo-ttcn3-hacks[master]: IPA: log host:port on listen errors

2019-03-12 Thread Max
Max has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13202 )

Change subject: IPA: log host:port on listen errors
..

IPA: log host:port on listen errors

Change-Id: I0e25961698ab70a2822e2b2be5b514c3603981ca
---
M library/IPA_Emulation.ttcnpp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/library/IPA_Emulation.ttcnpp b/library/IPA_Emulation.ttcnpp
index f556327..a2066ee 100644
--- a/library/IPA_Emulation.ttcnpp
+++ b/library/IPA_Emulation.ttcnpp
@@ -258,7 +258,7 @@
res := IPA_CodecPort_CtrlFunct.f_IPL4_listen(IPA_PORT,
local_host, local_port, { 
tcp:={} });
if (not ispresent(res.connId)) {
-   setverdict(fail, "Could not listen IPA socket, check your 
configuration");
+   setverdict(fail, "Could not listen IPA socket ", local_host, 
":", local_port, ", check your configuration");
mtc.stop;
}
g_ipa_conn_id := res.connId;

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I0e25961698ab70a2822e2b2be5b514c3603981ca
Gerrit-Change-Number: 13202
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 


Change in osmo-ttcn3-hacks[master]: IPA: log host:port on listen errors

2019-03-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/13202 )

Change subject: IPA: log host:port on listen errors
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0e25961698ab70a2822e2b2be5b514c3603981ca
Gerrit-Change-Number: 13202
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Tue, 12 Mar 2019 12:16:27 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmo-netif[master]: amr: cosmetic: correct sourcecode formatting

2019-03-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/13210 )

Change subject: amr: cosmetic: correct sourcecode formatting
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie4ad6b1a2382da4dc21e66a45c2a96224cab5752
Gerrit-Change-Number: 13210
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Tue, 12 Mar 2019 12:14:48 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmo-netif[master]: amr: be sure result of osmo_amr_bwe_to_oa() fits into int buf

2019-03-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/13211 )

Change subject: amr: be sure result of osmo_amr_bwe_to_oa() fits into int buf
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4d7ac570a0b48368a82183673c46bca5f235f228
Gerrit-Change-Number: 13211
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Tue, 12 Mar 2019 12:14:32 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmo-netif[master]: amr: make buffer in osmo_amr_bwe_to_oa() static

2019-03-12 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/13212 )

Change subject: amr: make buffer in osmo_amr_bwe_to_oa() static
..


Patch Set 1: Code-Review-1

I see no overhead in allocating that buffer in the stack, since anyway it has 
to modify the stack to allocate other local variables. Furthermore, making it 
static means that memory is in use all the time even if AMR is not being used.


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

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8ffbf3a4515e1c2385a0b6b2d5fe8e756056fb0d
Gerrit-Change-Number: 13212
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Tue, 12 Mar 2019 12:11:43 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: IPA: log host:port on listen errors

2019-03-12 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/13202 )

Change subject: IPA: log host:port on listen errors
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0e25961698ab70a2822e2b2be5b514c3603981ca
Gerrit-Change-Number: 13202
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Tue, 12 Mar 2019 12:08:26 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-pcu[master]: MS store: move test helper to unit test

2019-03-12 Thread Max
Max has uploaded this change for review. ( https://gerrit.osmocom.org/13213


Change subject: MS store: move test helper to unit test
..

MS store: move test helper to unit test

It's confusing to have test-specific helper with the same name as tested
function directly inside the GprsMsStorage class. Let's convert it into
static function and move to the unit test.

Change-Id: Ia2a5b90779051af894fe15d957c1d26f0a142f33
---
M src/gprs_ms_storage.cpp
M src/gprs_ms_storage.h
M tests/ms/MsTest.cpp
3 files changed, 18 insertions(+), 20 deletions(-)



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

diff --git a/src/gprs_ms_storage.cpp b/src/gprs_ms_storage.cpp
index c7de6d3..04518c5 100644
--- a/src/gprs_ms_storage.cpp
+++ b/src/gprs_ms_storage.cpp
@@ -106,20 +106,3 @@

return ms;
 }
-
-GprsMs *GprsMsStorage::create_ms(uint32_t tlli, enum gprs_rlcmac_tbf_direction 
dir)
-{
-   GprsMs *ms = get_ms(tlli);
-
-   if (ms)
-   return ms;
-
-   ms = create_ms();
-
-   if (dir == GPRS_RLCMAC_UL_TBF)
-   ms->set_tlli(tlli);
-   else
-   ms->confirm_tlli(tlli);
-
-   return ms;
-}
diff --git a/src/gprs_ms_storage.h b/src/gprs_ms_storage.h
index 44ad0ed..14707f5 100644
--- a/src/gprs_ms_storage.h
+++ b/src/gprs_ms_storage.h
@@ -39,7 +39,6 @@
virtual void ms_active(class GprsMs *);

GprsMs *get_ms(uint32_t tlli, uint32_t old_tlli = 0, const char *imsi = 
0) const;
-   GprsMs *create_ms(uint32_t tlli, enum gprs_rlcmac_tbf_direction dir);
GprsMs *create_ms();

const LListHead& ms_list() const {return m_list;}
diff --git a/tests/ms/MsTest.cpp b/tests/ms/MsTest.cpp
index 728daf6..2b0bc0f 100644
--- a/tests/ms/MsTest.cpp
+++ b/tests/ms/MsTest.cpp
@@ -337,6 +337,22 @@
printf("=== end %s ===\n", __func__);
 }

+static GprsMs *prepare_ms(GprsMsStorage *st, uint32_t tlli, enum 
gprs_rlcmac_tbf_direction dir)
+{
+   GprsMs *ms = st->get_ms(tlli);
+   if (ms)
+   return ms;
+
+   ms = st->create_ms();
+
+   if (dir == GPRS_RLCMAC_UL_TBF)
+   ms->set_tlli(tlli);
+   else
+   ms->confirm_tlli(tlli);
+
+   return ms;
+}
+
 static void test_ms_storage()
 {
uint32_t tlli = 0xffeeddbb;
@@ -355,7 +371,7 @@
ms = store.get_ms(tlli + 0);
OSMO_ASSERT(ms == NULL);

-   ms = store.create_ms(tlli + 0, GPRS_RLCMAC_UL_TBF);
+   ms = prepare_ms(&store, tlli + 0, GPRS_RLCMAC_UL_TBF);
OSMO_ASSERT(ms != NULL);
OSMO_ASSERT(ms->tlli() == tlli + 0);
ms->set_imsi(imsi1);
@@ -371,7 +387,7 @@
ms_tmp = store.get_ms(0, 0, imsi2);
OSMO_ASSERT(ms_tmp == NULL);

-   ms = store.create_ms(tlli + 1, GPRS_RLCMAC_UL_TBF);
+   ms = prepare_ms(&store, tlli + 1, GPRS_RLCMAC_UL_TBF);
OSMO_ASSERT(ms != NULL);
OSMO_ASSERT(ms->tlli() == tlli + 1);
ms->set_imsi(imsi2);

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

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


Change in libosmocore[master]: Fix build on non-glibc systems

2019-03-12 Thread tnt
tnt has posted comments on this change. ( https://gerrit.osmocom.org/13209 )

Change subject: Fix build on non-glibc systems
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id5d577522a4889e152158f7e93ee1c99d3a21003
Gerrit-Change-Number: 13209
Gerrit-PatchSet: 1
Gerrit-Owner: supersat 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: tnt 
Gerrit-Comment-Date: Tue, 12 Mar 2019 11:44:12 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmocom-bb[master]: trxcon/scheduler: clarify decoding of incomplete xCCH blocks

2019-03-12 Thread tnt
tnt has posted comments on this change. ( https://gerrit.osmocom.org/13197 )

Change subject: trxcon/scheduler: clarify decoding of incomplete xCCH blocks
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3f499837413e1dbd0ca62229dc9cb6f0f7475a42
Gerrit-Change-Number: 13197
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: tnt 
Gerrit-Comment-Date: Tue, 12 Mar 2019 11:42:18 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmo-netif[master]: amr: be sure result of osmo_amr_bwe_to_oa() fits into int buf

2019-03-12 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/13211 )

Change subject: amr: be sure result of osmo_amr_bwe_to_oa() fits into int buf
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4d7ac570a0b48368a82183673c46bca5f235f228
Gerrit-Change-Number: 13211
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Comment-Date: Tue, 12 Mar 2019 11:29:43 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmo-netif[master]: amr: cosmetic: correct sourcecode formatting

2019-03-12 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/13210 )

Change subject: amr: cosmetic: correct sourcecode formatting
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie4ad6b1a2382da4dc21e66a45c2a96224cab5752
Gerrit-Change-Number: 13210
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Comment-Date: Tue, 12 Mar 2019 11:29:58 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-mgw[master]: AMR: Add function to convert between bw-effient and octet aligned mode

2019-03-12 Thread dexter
dexter has posted comments on this change. ( https://gerrit.osmocom.org/13159 )

Change subject: AMR: Add function to convert between bw-effient and octet 
aligned mode
..


Set Ready For Review


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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I622c01874b25f5049d4f59eb8157e0ea3cbe16ba
Gerrit-Change-Number: 13159
Gerrit-PatchSet: 3
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Tue, 12 Mar 2019 09:56:44 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-bts[master]: oc2g: l1if: delay trx initialization to avoid race condition

2019-03-12 Thread dexter
dexter has posted comments on this change. ( https://gerrit.osmocom.org/13208 )

Change subject: oc2g: l1if: delay trx initialization to avoid race condition
..


Patch Set 2:

> I think this commit is good as a proof of concept, but it's a hack
 > rather than a fix, so I'd prefer having a better fix for this issue
 > (like storing some state and delaying the opstat to a later point
 > in time after receiving some event which triggers sending it).

We are aware of that, thats why we first decided not to put it into review at 
all. We then decided to submit it anyway because for now it is better than 
nothing and it does not affect other BTS implementations. See also the fixme 
note int the code.


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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id3bdc88d28417e422d2c0c33b03be06f1a4706c2
Gerrit-Change-Number: 13208
Gerrit-PatchSet: 2
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: dexter 
Gerrit-Comment-Date: Tue, 12 Mar 2019 08:38:34 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in libosmo-netif[master]: amr: cosmetic: correct sourcecode formatting

2019-03-12 Thread dexter
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/13210


Change subject: amr: cosmetic: correct sourcecode formatting
..

amr: cosmetic: correct sourcecode formatting

Change-Id: Ie4ad6b1a2382da4dc21e66a45c2a96224cab5752
---
M src/amr.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/10/13210/1

diff --git a/src/amr.c b/src/amr.c
index d3f7b38..9b423e8 100644
--- a/src/amr.c
+++ b/src/amr.c
@@ -165,7 +165,7 @@
buf[1] = payload[0] << 4;
buf[1] |= (payload[1] >> 4) & 0x0c;

-   for (i = 0; i < frame_len -1; i++) {
+   for (i = 0; i < frame_len - 1; i++) {
buf[i + 2] = payload[i + 1] << 2;
buf[i + 2] |= payload[i + 2] >> 6;
}

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

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie4ad6b1a2382da4dc21e66a45c2a96224cab5752
Gerrit-Change-Number: 13210
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 


Change in libosmo-netif[master]: amr: make buffer in osmo_amr_bwe_to_oa() static

2019-03-12 Thread dexter
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/13212


Change subject: amr: make buffer in osmo_amr_bwe_to_oa() static
..

amr: make buffer in osmo_amr_bwe_to_oa() static

The function osmo_amr_bwe_to_oa() uses an internal buffer to store
intermediate results. Since osmo_amr_bwe_to_oa() is called for every AMR
packet that is processed, lets have the buffer static to save some
overhead.

Change-Id: I8ffbf3a4515e1c2385a0b6b2d5fe8e756056fb0d
---
M src/amr.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/12/13212/1

diff --git a/src/amr.c b/src/amr.c
index 9c63f60..24e0ecb 100644
--- a/src/amr.c
+++ b/src/amr.c
@@ -149,7 +149,7 @@
 int osmo_amr_bwe_to_oa(uint8_t *payload, unsigned int payload_len,
   unsigned int payload_maxlen)
 {
-   uint8_t buf[256];
+   static uint8_t buf[256];
unsigned int frame_len = payload_len - 1;
unsigned int i;


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

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ffbf3a4515e1c2385a0b6b2d5fe8e756056fb0d
Gerrit-Change-Number: 13212
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 


Change in libosmo-netif[master]: amr: be sure result of osmo_amr_bwe_to_oa() fits into int buf

2019-03-12 Thread dexter
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/13211


Change subject: amr: be sure result of osmo_amr_bwe_to_oa() fits into int buf
..

amr: be sure result of osmo_amr_bwe_to_oa() fits into int buf

osmo_amr_bwe_to_oa() uses an internal buffer with static size to store
intermediate results. The buffer is large enough for any real world
situation, but the check that tests if the result would fit into the
internal buffer is incorrect. It checks if there is enough room for the
existing payload, but does not include the expected growth of the
payload. Eventually the buffer could be overrun by one byte if one would
put a 256 byte long AMR payload.

Fixes: CID#195926
Change-Id: I4d7ac570a0b48368a82183673c46bca5f235f228
---
M src/amr.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/11/13211/1

diff --git a/src/amr.c b/src/amr.c
index 9b423e8..9c63f60 100644
--- a/src/amr.c
+++ b/src/amr.c
@@ -158,7 +158,7 @@
if (payload_len + 1 > payload_maxlen)
return -1;

-   if (payload_len > sizeof(buf))
+   if (payload_len + 1 > sizeof(buf))
return -1;

buf[0] = payload[0] & 0xf0;

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

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4d7ac570a0b48368a82183673c46bca5f235f228
Gerrit-Change-Number: 13211
Gerrit-PatchSet: 1
Gerrit-Owner: dexter