[PATCH] libosmocore[master]: core/conv: add x86 SSE support for Viterbi decoder

2017-05-02 Thread Vadim Yanitskiy
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/2454

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

core/conv: add x86 SSE support for Viterbi decoder

Fast convolutional decoding is provided through x86 intrinsic based
SSE operations. SSE3, found on virtually all modern x86 processors,
is the minimal requirement. SSE4.1 and AVX2 are used if available.

Also, the original code was extended with runtime SIMD detection,
so only supported extensions will be used by target CPU. It makes
the library more partable, what is very important for binary
packages distribution. The SIMD detection is currently implemented
through the __builtin_cpu_supports(EXT), which is only supported
by GCC.

Change-Id: I1da6d71ed0564f1d684f3a836e998d09de5f0351
---
M src/Makefile.am
M src/viterbi.c
M src/viterbi_gen.c
A src/viterbi_sse.c
4 files changed, 747 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/54/2454/6

diff --git a/src/Makefile.am b/src/Makefile.am
index 6948e1a..2f19838 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -4,7 +4,7 @@
 LIBVERSION=8:0:0
 
 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
-AM_CFLAGS = -Wall $(TALLOC_CFLAGS)
+AM_CFLAGS = -Wall $(TALLOC_CFLAGS) $(SIMD_FLAGS)
 
 lib_LTLIBRARIES = libosmocore.la
 
@@ -19,6 +19,10 @@
 macaddr.c stat_item.c stats.c stats_statsd.c prim.c \
 viterbi.c viterbi_gen.c
 
+if HAVE_SSE3
+libosmocore_la_SOURCES += viterbi_sse.c
+endif
+
 BUILT_SOURCES = crc8gen.c crc16gen.c crc32gen.c crc64gen.c
 
 if ENABLE_PLUGIN
diff --git a/src/viterbi.c b/src/viterbi.c
index 21c6a57..d68db23 100644
--- a/src/viterbi.c
+++ b/src/viterbi.c
@@ -24,11 +24,34 @@
 #include 
 #include 
 
-#include 
 #include "config.h"
+
+#include 
 
 #define BIT2NRZ(REG,N) (((REG >> N) & 0x01) * 2 - 1) * -1
 #define NUM_STATES(K)  (K == 7 ? 64 : 16)
+
+static int init_complete = 0;
+
+__attribute__ ((visibility("hidden"))) int avx2_supported = 0;
+__attribute__ ((visibility("hidden"))) int sse3_supported = 0;
+__attribute__ ((visibility("hidden"))) int sse41_supported = 0;
+
+/**
+ * This pointers will be initialized by the osmo_conv_init()
+ * depending on supported SIMD extensions.
+ */
+static int16_t *(*vdec_malloc)(size_t n);
+static void (*vdec_free)(int16_t *ptr);
+
+/* Forward malloc wrappers */
+int16_t *osmo_conv_vdec_malloc(size_t n);
+void osmo_conv_vdec_free(int16_t *ptr);
+
+#ifdef HAVE_SSE3
+int16_t *osmo_conv_vdec_malloc_sse3(size_t n);
+void osmo_conv_vdec_free_sse3(int16_t *ptr);
+#endif
 
 /* Forward Metric Units */
 void osmo_conv_gen_metrics_k5_n2(const int8_t *seq, const int16_t *out,
@@ -43,6 +66,21 @@
int16_t *sums, int16_t *paths, int norm);
 void osmo_conv_gen_metrics_k7_n4(const int8_t *seq, const int16_t *out,
int16_t *sums, int16_t *paths, int norm);
+
+#ifdef HAVE_SSE3
+void osmo_conv_gen_metrics_k5_n2_sse(const int8_t *seq, const int16_t *out,
+   int16_t *sums, int16_t *paths, int norm);
+void osmo_conv_gen_metrics_k5_n3_sse(const int8_t *seq, const int16_t *out,
+   int16_t *sums, int16_t *paths, int norm);
+void osmo_conv_gen_metrics_k5_n4_sse(const int8_t *seq, const int16_t *out,
+   int16_t *sums, int16_t *paths, int norm);
+void osmo_conv_gen_metrics_k7_n2_sse(const int8_t *seq, const int16_t *out,
+   int16_t *sums, int16_t *paths, int norm);
+void osmo_conv_gen_metrics_k7_n3_sse(const int8_t *seq, const int16_t *out,
+   int16_t *sums, int16_t *paths, int norm);
+void osmo_conv_gen_metrics_k7_n4_sse(const int8_t *seq, const int16_t *out,
+   int16_t *sums, int16_t *paths, int norm);
+#endif
 
 /* Trellis State
  * state - Internal lshift register value
@@ -89,12 +127,6 @@
void (*metric_func)(const int8_t *, const int16_t *,
int16_t *, int16_t *, int);
 };
-
-/* Non-aligned Memory Allocator */
-static int16_t *vdec_malloc(size_t n)
-{
-   return (int16_t *) malloc(sizeof(int16_t) * n);
-}
 
 /* Accessor calls */
 static inline int conv_code_recursive(const struct osmo_conv_code *code)
@@ -294,9 +326,9 @@
if (!trellis)
return;
 
+   vdec_free(trellis->outputs);
+   vdec_free(trellis->sums);
free(trellis->vals);
-   free(trellis->outputs);
-   free(trellis->sums);
free(trellis);
 }
 
@@ -430,7 +462,7 @@
if (!dec)
return;
 
-   free(dec->paths[0]);
+   vdec_free(dec->paths[0]);
free(dec->paths);
free_trellis(dec->trellis);
free(dec);
@@ -456,13 +488,31 @@
if (dec->k == 5) {
switch (dec->n) {
case 2:
+   #ifdef HAVE_SSE3
+   dec->metric_func = !sse3_supported ?
+   osmo_conv_gen_metrics_k5_n2 :
+   osmo_conv_gen_metrics_k5_n2_sse;
+   #else
dec->metric_func 

[PATCH] libosmocore[master]: configure.ac: add SIMD detection capabilities

2017-05-02 Thread Vadim Yanitskiy
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/2453

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

configure.ac: add SIMD detection capabilities

This change adds a check whether compiler supports some SIMD
(Single Instruction, Multiple Data) instructions. It is enabled
by default, and can be disabled by configure option --disable-simd.
The check macro is based on the AX_EXT from autoconf-archive:

www.gnu.org/software/autoconf-archive/ax_ext.html

And depends on the ax_check_compile_flag macro:

www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html

Currently only the following SIMD extensions are being checked:
AVX2, SSE3, SSE4.1, but adding others is also possible. All found
extensions are being defined in the 'config.h' header.

Change-Id: Idf8fff984bd936a75c7c307338df88ba4b005817
---
M .gitignore
M configure.ac
A m4/ax_check_compile_flag.m4
A m4/ax_check_simd.m4
4 files changed, 173 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/53/2453/5

diff --git a/.gitignore b/.gitignore
index 5111b25..2b0ca64 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,7 @@
 acinclude.m4
 aminclude.am
 m4/*.m4
+!m4/ax_*.m4
 autom4te.cache
 config.cache
 config.h*
diff --git a/configure.ac b/configure.ac
index a18197d..672a6df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -226,6 +226,22 @@
CPPFLAGS+=" -fsanitize=address -fsanitize=undefined"
 fi
 
+AC_ARG_ENABLE(simd,
+   [AS_HELP_STRING(
+   [--disable-simd],
+   [Disable SIMD support]
+   )],
+   [simd=$enableval], [simd="yes"])
+if test x"$simd" = x"yes"
+then
+   # Find and define supported SIMD extensions
+   AX_CHECK_SIMD
+else
+   AM_CONDITIONAL(HAVE_AVX2, false)
+   AM_CONDITIONAL(HAVE_SSE3, false)
+   AM_CONDITIONAL(HAVE_SSE4_1, false)
+fi
+
 AC_OUTPUT(
libosmocore.pc
libosmocodec.pc
diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4
new file mode 100644
index 000..dcabb92
--- /dev/null
+++ b/m4/ax_check_compile_flag.m4
@@ -0,0 +1,74 @@
+# ===
+#  https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
+# ===
+#
+# SYNOPSIS
+#
+#   AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], 
[EXTRA-FLAGS], [INPUT])
+#
+# DESCRIPTION
+#
+#   Check whether the given FLAG works with the current language's compiler
+#   or gives an error.  (Warnings, however, are ignored)
+#
+#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+#   success/failure.
+#
+#   If EXTRA-FLAGS is defined, it is added to the current language's default
+#   flags (e.g. CFLAGS) when the check is done.  The check is thus made with
+#   the flags: "CFLAGS EXTRA-FLAGS FLAG".  This can for example be used to
+#   force the compiler to issue an error when a bad flag is given.
+#
+#   INPUT gives an alternative input source to AC_COMPILE_IFELSE.
+#
+#   NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
+#   macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Guido U. Draheim 
+#   Copyright (c) 2011 Maarten Bosmans 
+#
+#   This program is free software: you can redistribute it and/or modify it
+#   under the terms of the GNU General Public License as published by the
+#   Free Software Foundation, either version 3 of the License, or (at your
+#   option) any later version.
+#
+#   This program is distributed in the hope that it will be useful, but
+#   WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+#   Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License along
+#   with this program. If not, see .
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You
+#   need not follow the terms of the GNU General Public License when using
+#   or distributing such scripts, even though portions of the text of the
+#   Macro appear in them. The GNU General Public License (GPL) does govern
+#   all other use of the material that constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the Autoconf
+#   Macro released by the Autoconf Archive. When you make and distribute a
+#   modified version of the Autoconf Macro, you may extend this special
+#   exception to the GPL to apply to your modified version as well.
+
+#serial 5
+
+AC_DEFUN([AX_CHECK_COMPILE_FLAG],
+[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF

[PATCH] libosmocore[master]: configure.ac: add SIMD detection capabilities

2017-05-02 Thread Vadim Yanitskiy
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/2453

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

configure.ac: add SIMD detection capabilities

This change adds a check whether compiller supports some
SIMD (Single Instruction, Multipile Data) instructions. One is
enabled by default, and can be disabled by configure option
--disable-simd. The check macro is based on the AX_EXT
from autoconf-archive:

www.gnu.org/software/autoconf-archive/ax_ext.html

And depends on the ax_check_compile_flag macro:

www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html

Currently only the following SIMD extensions are being checked:
AVX2, SSE3, SSE4.1, but adding others is also possible. All found
extensions are being defined in the 'config.h' header.

Change-Id: Idf8fff984bd936a75c7c307338df88ba4b005817
---
M .gitignore
M configure.ac
A m4/ax_check_compile_flag.m4
A m4/ax_check_simd.m4
M src/Makefile.am
M src/codec/Makefile.am
M src/coding/Makefile.am
M src/ctrl/Makefile.am
M src/gb/Makefile.am
M src/gsm/Makefile.am
M src/sim/Makefile.am
M src/vty/Makefile.am
M tests/Makefile.am
M tests/oap/Makefile.am
M utils/Makefile.am
15 files changed, 184 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/53/2453/4

diff --git a/.gitignore b/.gitignore
index 5111b25..2b0ca64 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,7 @@
 acinclude.m4
 aminclude.am
 m4/*.m4
+!m4/ax_*.m4
 autom4te.cache
 config.cache
 config.h*
diff --git a/configure.ac b/configure.ac
index a18197d..672a6df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -226,6 +226,22 @@
CPPFLAGS+=" -fsanitize=address -fsanitize=undefined"
 fi
 
+AC_ARG_ENABLE(simd,
+   [AS_HELP_STRING(
+   [--disable-simd],
+   [Disable SIMD support]
+   )],
+   [simd=$enableval], [simd="yes"])
+if test x"$simd" = x"yes"
+then
+   # Find and define supported SIMD extensions
+   AX_CHECK_SIMD
+else
+   AM_CONDITIONAL(HAVE_AVX2, false)
+   AM_CONDITIONAL(HAVE_SSE3, false)
+   AM_CONDITIONAL(HAVE_SSE4_1, false)
+fi
+
 AC_OUTPUT(
libosmocore.pc
libosmocodec.pc
diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4
new file mode 100644
index 000..dcabb92
--- /dev/null
+++ b/m4/ax_check_compile_flag.m4
@@ -0,0 +1,74 @@
+# ===
+#  https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
+# ===
+#
+# SYNOPSIS
+#
+#   AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], 
[EXTRA-FLAGS], [INPUT])
+#
+# DESCRIPTION
+#
+#   Check whether the given FLAG works with the current language's compiler
+#   or gives an error.  (Warnings, however, are ignored)
+#
+#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+#   success/failure.
+#
+#   If EXTRA-FLAGS is defined, it is added to the current language's default
+#   flags (e.g. CFLAGS) when the check is done.  The check is thus made with
+#   the flags: "CFLAGS EXTRA-FLAGS FLAG".  This can for example be used to
+#   force the compiler to issue an error when a bad flag is given.
+#
+#   INPUT gives an alternative input source to AC_COMPILE_IFELSE.
+#
+#   NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
+#   macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Guido U. Draheim 
+#   Copyright (c) 2011 Maarten Bosmans 
+#
+#   This program is free software: you can redistribute it and/or modify it
+#   under the terms of the GNU General Public License as published by the
+#   Free Software Foundation, either version 3 of the License, or (at your
+#   option) any later version.
+#
+#   This program is distributed in the hope that it will be useful, but
+#   WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+#   Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License along
+#   with this program. If not, see .
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You
+#   need not follow the terms of the GNU General Public License when using
+#   or distributing such scripts, even though portions of the text of the
+#   Macro appear in them. The GNU General Public License (GPL) does govern
+#   all other use of the material that constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the Autoconf
+#   Macro released by the Autoconf Archive. When you make and distribute a
+#   modified 

[PATCH] osmo-ci[master]: Introduce artifacts holding dependencies to speed up builds.

2017-05-02 Thread blobb

Introduce artifacts holding dependencies to speed up builds.

Basically, osmo-build.sh holds logic to check whether the necessary
artifact is available. If so it fetches artifact, unpacks it and
triggers the actual build. In case the necessary artifact is not
available osmo-build.sh simply builds all dependencies from source
by using osmo-build-dep.sh and archives deps to the ARTIFACT_STORE
afterwards.

The necessary functions to determine the artifact name from remote and
local repositories as well as the handling of artifact files live in
osmo-artifacts.sh, which is sourced by osmo-build.sh.

osmo-build.sh will be sourced by the contrib/jenkins.sh build script
inside each git repository and invoked via 'build'.
See jenkins-openBsc.sh [1] for more details.

Artifacts will be stored as follows:

$ARTIFACT_STORE/$JOB_NAME/.._...
..._...tar.gz

Furthermore, ARTIFACT_STORE environment variable has to be set on all
jenkins slaves. The JOB_NAME variables is injected to each jenkins job
by jenkins.

[1] https://github.com/blobbsen/diy-artifacts/blob/master/jenkins-openBSC.sh

Change-Id: Ifee0a2f837d23b19aa5326f810234d5452e47484
---
A scripts/osmo-artifacts.sh
A scripts/osmo-build.sh
2 files changed, 134 insertions(+), 0 deletions(-)


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

diff --git a/scripts/osmo-artifacts.sh b/scripts/osmo-artifacts.sh
new file mode 100755
index 000..ceea623
--- /dev/null
+++ b/scripts/osmo-artifacts.sh
@@ -0,0 +1,71 @@
+#!/bin/bash
+
+# determining artifact name (local & remote)
+getArtifactNameByLocalRepos(){
+   genericDeps "getBranchAndRevByLocalRepo"
+   cd "$base"
+}
+
+getArtifactNameByRemoteRepos() {
+   genericDeps "getBranchAndRevByRemoteRepo"
+}
+
+getBranchAndRevByLocalRepo() {
+   cd "$deps/$1"
+   rev=$(git rev-parse --short HEAD)
+   branch=$(git rev-parse --abbrev-ref HEAD)
+   echo "$1.${branch//\//#}.${rev}"
+}
+
+getBranchAndRevByRemoteRepo() {
+   if [ -z "${2+x}" ]; then branch="master"; else branch="$2"; fi
+   rev=$(git ls-remote "https://git.osmocom.org/$1; "refs/heads/$branch")
+   echo "$1.${branch//\//#}.${rev:0:7}"
+}
+
+# file handling
+archiveArtifact() {
+   set +x
+   echo
+   echo "[INFO] Archiving artifact to artifactStore."
+   echo
+   set -x
+
+   cd "$base"
+   artifact="$(getArtifactNameByLocalRepos)"
+   tempJobStore="$ARTIFACT_STORE/tmp/$jobName/"
+   jobStore="$ARTIFACT_STORE/$jobName/"
+
+   if [ ! -f "$tempJobStore/$artifact" ]; then
+   mkdir -p "$jobStore" "$tempJobStore"
+   rm -f "$jobStore/*"
+   tar czf "$tempJobStore/$artifact" "deps"
+   mv -n "$tempJobStore/$artifact" "$jobStore/$artifact"
+   rm -f "$tempJobStore"
+
+   generateArtifactHashes "$jobStore/$artifact"
+   fi
+}
+
+fetchArtifact() {
+   set +x
+   echo
+   echo "[INFO] Fetching artifact from artifactStore."
+   echo
+   set -x
+
+   generateArtifactHashes "$1"
+   tar xzf "$1"
+}
+
+generateArtifactHashes() {
+   set +x
+   echo
+   echo "[INFO] name: $1"
+   echo "[INFO] md5: $(md5sum "$1" | cut -d ' ' -f1)"
+   echo "[INFO] sha1: $(sha1sum "$1" | cut -d ' ' -f1)"
+   echo "[INFO] sha256: $(sha256sum "$1" | cut -d ' ' -f1)"
+   echo
+   set -x
+   sleep 1
+}
diff --git a/scripts/osmo-build.sh b/scripts/osmo-build.sh
new file mode 100644
index 000..a3c1e74
--- /dev/null
+++ b/scripts/osmo-build.sh
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+source osmo-artifacts.sh
+
+initBuild() {
+
+   if [ -z "$JOB_NAME" ]; then
+   set +x
+   echo
+   echo "[ERROR] JOB_NAME variable is not set, running in Jenkins?"
+   echo
+   set -x
+   exit 1
+   fi
+
+   base="$(pwd)"
+   deps="$base/deps"
+   inst="$deps/install"
+
+   project=$(git config --get --local remote.origin.url \
+   | cut -d '/' -f4 | cut -d '.' -f1)
+
+   jobName="${JOB_NAME//\//#}"
+
+   export base deps inst project jobName
+   export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
+   export LD_LIBRARY_PATH="$inst/lib"
+}
+
+buildDeps() {
+   set +x
+   echo
+   echo "[INFO] Compile $project dependencies from source."
+   echo
+   set -x
+
+   mkdir -p "$deps"
+   rm -rf "$inst"
+   genericDeps "osmo-build-dep.sh"
+}
+
+build() {
+
+   initBuild
+
+   neededArtifact="$(getArtifactNameByRemoteRepos)"
+   pathOfNeededArtifact="$ARTIFACT_STORE/$jobName/$neededArtifact"
+
+   if [ -f "$pathOfNeededArtifact" ]; then
+   fetchArtifact "$pathOfNeededArtifact"
+   else
+   buildDeps
+   archiveArtifact
+   fi
+
+   set +x
+   echo
+   echo " = $project 
=="
+   echo
+

[PATCH] osmo-ci[master]: Introduce artifacts holding dependencies to speed up builds.

2017-05-02 Thread blobb

Introduce artifacts holding dependencies to speed up builds.

Basically, osmo-build.sh holds logic to check whether the necessary 
artifact is available. If so it fetches artifact, unpacks it and 
triggers the actual build. In case the necessary artifact is not 
available osmo-build.sh simply builds all dependencies from source 
by using osmo-build-dep.sh and archives deps to the ARTIFACT_STORE 
afterwards.

The necessary functions to determine the artifact name from remote and 
local repositories as well as the handling of artifact files live in 
osmo-artifacts.sh, which is sourced by osmo-build.sh.

osmo-build.sh will be sourced by the contrib/jenkins.sh build script 
inside each git repository and invoked via 'build'. 
See jenkins-openBsc.sh [1] for more details.

Artifacts will be stored as follows:

$ARTIFACT_STORE/$JOB_NAME/.._...
..._...tar.gz

Furthermore, ARTIFACT_STORE environment variable has to be set on all 
jenkins slaves. The JOB_NAME variables is injected to each jenkins job 
by jenkins.

[1] https://github.com/blobbsen/diy-artifacts/blob/master/jenkins-openBSC.sh

Change-Id: Ifee0a2f837d23b19aa5326f810234d5452e47484
---
A scripts/osmo-artifacts.sh
A scripts/osmo-build.sh
2 files changed, 134 insertions(+), 0 deletions(-)


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

diff --git a/scripts/osmo-artifacts.sh b/scripts/osmo-artifacts.sh
new file mode 100755
index 000..ceea623
--- /dev/null
+++ b/scripts/osmo-artifacts.sh
@@ -0,0 +1,71 @@
+#!/bin/bash
+
+# determining artifact name (local & remote)
+getArtifactNameByLocalRepos(){
+   genericDeps "getBranchAndRevByLocalRepo"
+   cd "$base"
+}
+
+getArtifactNameByRemoteRepos() {
+   genericDeps "getBranchAndRevByRemoteRepo"
+}
+
+getBranchAndRevByLocalRepo() {
+   cd "$deps/$1"
+   rev=$(git rev-parse --short HEAD)
+   branch=$(git rev-parse --abbrev-ref HEAD)
+   echo "$1.${branch//\//#}.${rev}"
+}
+
+getBranchAndRevByRemoteRepo() {
+   if [ -z "${2+x}" ]; then branch="master"; else branch="$2"; fi
+   rev=$(git ls-remote "https://git.osmocom.org/$1; "refs/heads/$branch")
+   echo "$1.${branch//\//#}.${rev:0:7}"
+}
+
+# file handling
+archiveArtifact() {
+   set +x
+   echo
+   echo "[INFO] Archiving artifact to artifactStore."
+   echo
+   set -x
+
+   cd "$base"
+   artifact="$(getArtifactNameByLocalRepos)"
+   tempJobStore="$ARTIFACT_STORE/tmp/$jobName/"
+   jobStore="$ARTIFACT_STORE/$jobName/"
+
+   if [ ! -f "$tempJobStore/$artifact" ]; then
+   mkdir -p "$jobStore" "$tempJobStore"
+   rm -f "$jobStore/*"
+   tar czf "$tempJobStore/$artifact" "deps"
+   mv -n "$tempJobStore/$artifact" "$jobStore/$artifact"
+   rm -f "$tempJobStore"
+
+   generateArtifactHashes "$jobStore/$artifact"
+   fi
+}
+
+fetchArtifact() {
+   set +x
+   echo
+   echo "[INFO] Fetching artifact from artifactStore."
+   echo
+   set -x
+
+   generateArtifactHashes "$1"
+   tar xzf "$1"
+}
+
+generateArtifactHashes() {
+   set +x
+   echo
+   echo "[INFO] name: $1"
+   echo "[INFO] md5: $(md5sum "$1" | cut -d ' ' -f1)"
+   echo "[INFO] sha1: $(sha1sum "$1" | cut -d ' ' -f1)"
+   echo "[INFO] sha256: $(sha256sum "$1" | cut -d ' ' -f1)"
+   echo
+   set -x
+   sleep 1
+}
diff --git a/scripts/osmo-build.sh b/scripts/osmo-build.sh
new file mode 100644
index 000..a3c1e74
--- /dev/null
+++ b/scripts/osmo-build.sh
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+source osmo-artifacts.sh
+
+initBuild() {
+
+   if [ -z "$JOB_NAME" ]; then
+   set +x
+   echo
+   echo "[ERROR] JOB_NAME variable is not set, running in Jenkins?"
+   echo
+   set -x
+   exit 1
+   fi
+
+   base="$(pwd)"
+   deps="$base/deps"
+   inst="$deps/install"
+
+   project=$(git config --get --local remote.origin.url \
+   | cut -d '/' -f4 | cut -d '.' -f1)
+
+   jobName="${JOB_NAME//\//#}"
+
+   export base deps inst project jobName
+   export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
+   export LD_LIBRARY_PATH="$inst/lib"
+}
+
+buildDeps() {
+   set +x
+   echo
+   echo "[INFO] Compile $project dependencies from source."
+   echo
+   set -x
+
+   mkdir -p "$deps"
+   rm -rf "$inst"
+   genericDeps "osmo-build-dep.sh"
+}
+
+build() {
+
+   initBuild
+
+   neededArtifact="$(getArtifactNameByRemoteRepos)"
+   pathOfNeededArtifact="$ARTIFACT_STORE/$jobName/$neededArtifact"
+
+   if [ -f "$pathOfNeededArtifact" ]; then
+   fetchArtifact "$pathOfNeededArtifact"
+   else
+   buildDeps
+   archiveArtifact
+   fi
+
+   set +x
+   echo
+   echo " = $project 
=="
+  

[PATCH] osmo-ci[master]: Introduce artifacts holding dependencies to speed up builds.

2017-05-02 Thread blobb

Introduce artifacts holding dependencies to speed up builds.

Basically, osmo-build.sh holds logic to check whether the necessary artifact
is available. If so it fetches artifact, unpacks it and triggers the actual 
build.
In case the necessary artifact is not available osmo-build.sh simply builds all
dependencies from source by using osmo-build-dep.sh and archives deps to the
ARTIFACT_STORE afterwards.

The necessary functions to determine the artifact name from remote and local
repositories as well as the handling of artifact files live in 
osmo-artifacts.sh,
which is sourced by osmo-build.sh.

osmo-build.sh will be sourced by the contrib/jenkins.sh build script inside
each git repository and invoked via 'build'. See jenkins-openBsc [1] for
more details.

Artifacts will be stored as follows:

$ARTIFACT_STORE/$JOB_NAME/.._...
..._...tar.gz

Furthermore, ARTIFACT_STORE environment variable has to be set on all jenkins
slaves. The JOB_NAME variables is injected to each jenkins job by jenkins.

[1] https://github.com/blobbsen/diy-artifacts/blob/master/jenkins-openBSC.sh

Change-Id: Ifee0a2f837d23b19aa5326f810234d5452e47484
---
A scripts/osmo-artifacts.sh
A scripts/osmo-build.sh
2 files changed, 134 insertions(+), 0 deletions(-)


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

diff --git a/scripts/osmo-artifacts.sh b/scripts/osmo-artifacts.sh
new file mode 100755
index 000..ceea623
--- /dev/null
+++ b/scripts/osmo-artifacts.sh
@@ -0,0 +1,71 @@
+#!/bin/bash
+
+# determining artifact name (local & remote)
+getArtifactNameByLocalRepos(){
+   genericDeps "getBranchAndRevByLocalRepo"
+   cd "$base"
+}
+
+getArtifactNameByRemoteRepos() {
+   genericDeps "getBranchAndRevByRemoteRepo"
+}
+
+getBranchAndRevByLocalRepo() {
+   cd "$deps/$1"
+   rev=$(git rev-parse --short HEAD)
+   branch=$(git rev-parse --abbrev-ref HEAD)
+   echo "$1.${branch//\//#}.${rev}"
+}
+
+getBranchAndRevByRemoteRepo() {
+   if [ -z "${2+x}" ]; then branch="master"; else branch="$2"; fi
+   rev=$(git ls-remote "https://git.osmocom.org/$1; "refs/heads/$branch")
+   echo "$1.${branch//\//#}.${rev:0:7}"
+}
+
+# file handling
+archiveArtifact() {
+   set +x
+   echo
+   echo "[INFO] Archiving artifact to artifactStore."
+   echo
+   set -x
+
+   cd "$base"
+   artifact="$(getArtifactNameByLocalRepos)"
+   tempJobStore="$ARTIFACT_STORE/tmp/$jobName/"
+   jobStore="$ARTIFACT_STORE/$jobName/"
+
+   if [ ! -f "$tempJobStore/$artifact" ]; then
+   mkdir -p "$jobStore" "$tempJobStore"
+   rm -f "$jobStore/*"
+   tar czf "$tempJobStore/$artifact" "deps"
+   mv -n "$tempJobStore/$artifact" "$jobStore/$artifact"
+   rm -f "$tempJobStore"
+
+   generateArtifactHashes "$jobStore/$artifact"
+   fi
+}
+
+fetchArtifact() {
+   set +x
+   echo
+   echo "[INFO] Fetching artifact from artifactStore."
+   echo
+   set -x
+
+   generateArtifactHashes "$1"
+   tar xzf "$1"
+}
+
+generateArtifactHashes() {
+   set +x
+   echo
+   echo "[INFO] name: $1"
+   echo "[INFO] md5: $(md5sum "$1" | cut -d ' ' -f1)"
+   echo "[INFO] sha1: $(sha1sum "$1" | cut -d ' ' -f1)"
+   echo "[INFO] sha256: $(sha256sum "$1" | cut -d ' ' -f1)"
+   echo
+   set -x
+   sleep 1
+}
diff --git a/scripts/osmo-build.sh b/scripts/osmo-build.sh
new file mode 100644
index 000..a3c1e74
--- /dev/null
+++ b/scripts/osmo-build.sh
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+source osmo-artifacts.sh
+
+initBuild() {
+
+   if [ -z "$JOB_NAME" ]; then
+   set +x
+   echo
+   echo "[ERROR] JOB_NAME variable is not set, running in Jenkins?"
+   echo
+   set -x
+   exit 1
+   fi
+
+   base="$(pwd)"
+   deps="$base/deps"
+   inst="$deps/install"
+
+   project=$(git config --get --local remote.origin.url \
+   | cut -d '/' -f4 | cut -d '.' -f1)
+
+   jobName="${JOB_NAME//\//#}"
+
+   export base deps inst project jobName
+   export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
+   export LD_LIBRARY_PATH="$inst/lib"
+}
+
+buildDeps() {
+   set +x
+   echo
+   echo "[INFO] Compile $project dependencies from source."
+   echo
+   set -x
+
+   mkdir -p "$deps"
+   rm -rf "$inst"
+   genericDeps "osmo-build-dep.sh"
+}
+
+build() {
+
+   initBuild
+
+   neededArtifact="$(getArtifactNameByRemoteRepos)"
+   pathOfNeededArtifact="$ARTIFACT_STORE/$jobName/$neededArtifact"
+
+   if [ -f "$pathOfNeededArtifact" ]; then
+   fetchArtifact "$pathOfNeededArtifact"
+   else
+   buildDeps
+   archiveArtifact
+   fi
+
+   set +x
+   echo
+   echo " = $project 
=="
+   echo
+ 

[PATCH] osmo-ci[master]: Introduce artifacts holding dependencies to speed up builds.

2017-05-02 Thread blobb

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

Introduce artifacts holding dependencies to speed up builds.

Basically, osmo-build.sh holds logic to check whether the necessary artifact
is available. If so it fetches artifact, unpacks it and triggers the actual 
build.
In case the necessary artifact is not available osmo-build.sh simply builds all
dependencies from source by using osmo-build-dep.sh and archives deps to the
ARTIFACT_STORE afterwards.

The necessary functions to determine the artifact name from remote and local
repositories as well as the handling of artifact files live in 
osmo-artifacts.sh,
which is sourced by osmo-build.sh.

osmo-build.sh will be sourced by the contrib/jenkins.sh build script inside
each git repository and invoked via 'build'. See jenkins-openBsc [1] for
more details.

Artifacts will be stored as follows:

$ARTIFACT_STORE/$JOB_NAME/.._...
..._...tar.gz

Furthermore, ARTIFACT_STORE environment variable has to be set on all jenkins
slaves. The JOB_NAME variables is injected to each jenkins job by jenkins.

[1] https://github.com/blobbsen/diy-artifacts/blob/master/jenkins-openBSC.sh

Change-Id: Ifee0a2f837d23b19aa5326f810234d5452e47484
---
A scripts/osmo-artifacts.sh
A scripts/osmo-build.sh
2 files changed, 134 insertions(+), 0 deletions(-)


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

diff --git a/scripts/osmo-artifacts.sh b/scripts/osmo-artifacts.sh
new file mode 100755
index 000..ceea623
--- /dev/null
+++ b/scripts/osmo-artifacts.sh
@@ -0,0 +1,71 @@
+#!/bin/bash
+
+# determining artifact name (local & remote)
+getArtifactNameByLocalRepos(){
+   genericDeps "getBranchAndRevByLocalRepo"
+   cd "$base"
+}
+
+getArtifactNameByRemoteRepos() {
+   genericDeps "getBranchAndRevByRemoteRepo"
+}
+
+getBranchAndRevByLocalRepo() {
+   cd "$deps/$1"
+   rev=$(git rev-parse --short HEAD)
+   branch=$(git rev-parse --abbrev-ref HEAD)
+   echo "$1.${branch//\//#}.${rev}"
+}
+
+getBranchAndRevByRemoteRepo() {
+   if [ -z "${2+x}" ]; then branch="master"; else branch="$2"; fi
+   rev=$(git ls-remote "https://git.osmocom.org/$1; "refs/heads/$branch")
+   echo "$1.${branch//\//#}.${rev:0:7}"
+}
+
+# file handling
+archiveArtifact() {
+   set +x
+   echo
+   echo "[INFO] Archiving artifact to artifactStore."
+   echo
+   set -x
+
+   cd "$base"
+   artifact="$(getArtifactNameByLocalRepos)"
+   tempJobStore="$ARTIFACT_STORE/tmp/$jobName/"
+   jobStore="$ARTIFACT_STORE/$jobName/"
+
+   if [ ! -f "$tempJobStore/$artifact" ]; then
+   mkdir -p "$jobStore" "$tempJobStore"
+   rm -f "$jobStore/*"
+   tar czf "$tempJobStore/$artifact" "deps"
+   mv -n "$tempJobStore/$artifact" "$jobStore/$artifact"
+   rm -f "$tempJobStore"
+
+   generateArtifactHashes "$jobStore/$artifact"
+   fi
+}
+
+fetchArtifact() {
+   set +x
+   echo
+   echo "[INFO] Fetching artifact from artifactStore."
+   echo
+   set -x
+
+   generateArtifactHashes "$1"
+   tar xzf "$1"
+}
+
+generateArtifactHashes() {
+   set +x
+   echo
+   echo "[INFO] name: $1"
+   echo "[INFO] md5: $(md5sum "$1" | cut -d ' ' -f1)"
+   echo "[INFO] sha1: $(sha1sum "$1" | cut -d ' ' -f1)"
+   echo "[INFO] sha256: $(sha256sum "$1" | cut -d ' ' -f1)"
+   echo
+   set -x
+   sleep 1
+}
diff --git a/scripts/osmo-build.sh b/scripts/osmo-build.sh
new file mode 100644
index 000..c882c2f
--- /dev/null
+++ b/scripts/osmo-build.sh
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+source osmo-artifacts.sh
+
+initBuild() {
+
+   if [ -z "$JOB_NAME" ]; then
+   set +x
+   echo
+   echo "[ERROR] JOB_NAME variable is not set, running in Jenkins?"
+   echo
+   set -x
+   exit 1
+   fi
+
+   base="$(pwd)"
+   deps="$base/deps"
+   inst="$deps/install"
+
+   project=$(git config --get --local remote.origin.url \
+   | cut -d '/' -f4 | cut -d '.' -f1)
+
+   jobName="${JOB_NAME//\//#}"
+
+   export base deps inst project jobName
+   export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
+   export LD_LIBRARY_PATH="$inst/lib"
+}
+
+buildDeps() {
+   set +x
+   echo
+   echo "[INFO] Compile $project dependencies from source."
+   echo
+   set -x
+
+   mkdir -p "$deps"
+   rm -rf "$inst"
+   genericDeps "osmo-build-dep.sh"
+}
+
+build() {
+
+   initBuild
+
+   neededArtifact="$(getArtifactNameByRemoteRepos)"
+   pathOfNeededArtifact="$ARTIFACT_STORE/$jobName/$neededArtifact"
+
+   if [ -f "$pathOfNeededArtifact" ]; then
+   fetchArtifact "$pathOfNeededArtifact"
+   else
+   buildDeps
+   archiveArtifact
+   fi
+
+   set +x
+   echo
+   echo " = $project 

libosmocore[master]: Fix broken ctrl commands without lookups

2017-05-02 Thread Harald Welte

Patch Set 2: Code-Review-2

(1 comment)

https://gerrit.osmocom.org/#/c/2461/2/src/ctrl/control_if.c
File src/ctrl/control_if.c:

Line 240:   rc = ctrl->lookup(data, vline, , 
>node, );
this is obviously wrong.  The mere fact that the main program has registered a 
lookup function does not imply that this lookup function knows about the nodes 
that some libraries have registered as ctrl_lookup_helpers.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iddd20602047ebd9be1b668593f5dfa6f1d3e8369
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-HasComments: Yes


[PATCH] osmo-hlr[master]: Add systemd service file

2017-05-02 Thread daniel

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

Add systemd service file

Change-Id: I7fe9d4e0a8520c6394156bc2871777c6c38b0600
---
A contrib/systemd/osmo-hlr.service
1 file changed, 11 insertions(+), 0 deletions(-)


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

diff --git a/contrib/systemd/osmo-hlr.service b/contrib/systemd/osmo-hlr.service
new file mode 100644
index 000..6b0d7ba
--- /dev/null
+++ b/contrib/systemd/osmo-hlr.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=OpenBSC Home Location Register (OsmoHLR)
+
+[Service]
+Type=simple
+Restart=always
+ExecStart=/usr/bin/osmo-hlr -c /etc/osmocom/osmo-hlr.cfg -l 
/var/lib/osmocom/hlr.db
+RestartSec=2
+
+[Install]
+WantedBy=multi-user.target

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7fe9d4e0a8520c6394156bc2871777c6c38b0600
Gerrit-PatchSet: 1
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: daniel 


[MERGED] osmo-trx[master]: cosmetic: Make parameter lists uniform

2017-05-02 Thread Tom Tsou
Tom Tsou has submitted this change and it was merged.

Change subject: cosmetic: Make parameter lists uniform
..


cosmetic: Make parameter lists uniform

The non-sse implementation and the sse implementation of the convert
and convolve functions have different parameter lists. This makes it
difficult to use function pointers in order to select the right
function depending on the SSE-Level and CPU.

This commit uniformizes the parameter lists in preparation for
planned runtime cpu detection support

Change-Id: Ice063b89791537c4b591751f12f5ef5c413a2d27
---
M Transceiver52M/x86/convert.c
M Transceiver52M/x86/convolve.c
2 files changed, 143 insertions(+), 110 deletions(-)

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



diff --git a/Transceiver52M/x86/convert.c b/Transceiver52M/x86/convert.c
index eafe7b2..862a2e7 100644
--- a/Transceiver52M/x86/convert.c
+++ b/Transceiver52M/x86/convert.c
@@ -176,26 +176,34 @@
 
 void convert_float_short(short *out, const float *in, float scale, int len)
 {
+   void (*conv_func)(short *, const float *, float, int);
+
 #ifdef HAVE_SSE3
if (!(len % 16))
-   _sse_convert_scale_ps_si16_16n(out, in, scale, len);
+   conv_func = _sse_convert_scale_ps_si16_16n;
else if (!(len % 8))
-   _sse_convert_scale_ps_si16_8n(out, in, scale, len);
+   conv_func = _sse_convert_scale_ps_si16_8n;
else
-   _sse_convert_scale_ps_si16(out, in, scale, len);
+   conv_func = _sse_convert_scale_ps_si16;
 #else
-   convert_scale_ps_si16(out, in, scale, len);
+   conv_func = convert_scale_ps_si16;
 #endif
+
+   conv_func(out, in, scale, len);
 }
 
 void convert_short_float(float *out, const short *in, int len)
 {
+   void (*conv_func) (float *, const short *, int);
+
 #ifdef HAVE_SSE4_1
if (!(len % 16))
-   _sse_convert_si16_ps_16n(out, in, len);
+   conv_func = _sse_convert_si16_ps_16n;
else
-   _sse_convert_si16_ps(out, in, len);
+   conv_func = _sse_convert_si16_ps;
 #else
-   convert_si16_ps(out, in, len);
+   conv_func = convert_si16_ps;
 #endif
+
+   conv_func(out, in, len);
 }
diff --git a/Transceiver52M/x86/convolve.c b/Transceiver52M/x86/convolve.c
index 04923bc..e2a1dea 100644
--- a/Transceiver52M/x86/convolve.c
+++ b/Transceiver52M/x86/convolve.c
@@ -47,12 +47,20 @@
 #include 
 
 /* 4-tap SSE complex-real convolution */
-static void sse_conv_real4(const float *restrict x,
-  const float *restrict h,
-  float *restrict y,
-  int len)
+static void sse_conv_real4(const float *x, int x_len,
+  const float *h, int h_len,
+  float *y, int y_len,
+  int start, int len,
+  int step, int offset)
 {
+   /* NOTE: The parameter list of this function has to match the parameter
+* list of _base_convolve_real() in convolve_base.c. This specific
+* implementation, ignores some of the parameters of
+* _base_convolve_complex(), which are: x_len, y_len, offset, step */
+
__m128 m0, m1, m2, m3, m4, m5, m6, m7;
+
+   const float *_x = [2 * (-(h_len - 1) + start)];
 
/* Load (aligned) filter taps */
m0 = _mm_load_ps([0]);
@@ -61,8 +69,8 @@
 
for (int i = 0; i < len; i++) {
/* Load (unaligned) input data */
-   m0 = _mm_loadu_ps([2 * i + 0]);
-   m1 = _mm_loadu_ps([2 * i + 4]);
+   m0 = _mm_loadu_ps(&_x[2 * i + 0]);
+   m1 = _mm_loadu_ps(&_x[2 * i + 4]);
m2 = _mm_shuffle_ps(m0, m1, _MM_SHUFFLE(0, 2, 0, 2));
m3 = _mm_shuffle_ps(m0, m1, _MM_SHUFFLE(1, 3, 1, 3));
 
@@ -81,12 +89,17 @@
 }
 
 /* 8-tap SSE complex-real convolution */
-static void sse_conv_real8(const float *restrict x,
-  const float *restrict h,
-  float *restrict y,
-  int len)
+static void sse_conv_real8(const float *x, int x_len,
+  const float *h, int h_len,
+  float *y, int y_len,
+  int start, int len,
+  int step, int offset)
 {
+   /* See NOTE in sse_conv_real4() */
+
__m128 m0, m1, m2, m3, m4, m5, m6, m7, m8, m9;
+
+   const float *_x = [2 * (-(h_len - 1) + start)];
 
/* Load (aligned) filter taps */
m0 = _mm_load_ps([0]);
@@ -99,10 +112,10 @@
 
for (int i = 0; i < len; i++) {
/* Load (unaligned) input data */
-   m0 = _mm_loadu_ps([2 * i + 0]);
-   m1 = _mm_loadu_ps([2 * i + 4]);
-   m2 = _mm_loadu_ps([2 * i + 8]);
- 

[MERGED] osmo-trx[master]: buildenv: Turn off native architecture builds

2017-05-02 Thread Tom Tsou
Tom Tsou has submitted this change and it was merged.

Change subject: buildenv: Turn off native architecture builds
..


buildenv: Turn off native architecture builds

The compiler option -march=native instructs the compiler to auto-optimize
the code for the current build architecture. This is fine for building
and using locally, but contraproductive when generating binary packages.

This commit replaces -march=native with $(SIMD_FLAGS), which contains a
collection of supported SIMD options, so we won't loose the SSE support.

Change-Id: I3df4b8db9692016115edbe2247beeec090715687
---
M Transceiver52M/x86/Makefile.am
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/Transceiver52M/x86/Makefile.am b/Transceiver52M/x86/Makefile.am
index eda1a17..699faad 100644
--- a/Transceiver52M/x86/Makefile.am
+++ b/Transceiver52M/x86/Makefile.am
@@ -1,5 +1,5 @@
 if !ARCH_ARM
-AM_CFLAGS = -Wall -std=gnu99 -march=native -I${srcdir}/../common
+AM_CFLAGS = -Wall -std=gnu99 $(SIMD_FLAGS) -I${srcdir}/../common
 
 noinst_LTLIBRARIES = libarch.la
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3df4b8db9692016115edbe2247beeec090715687
Gerrit-PatchSet: 4
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Tom Tsou 
Gerrit-Reviewer: Vadim Yanitskiy 


osmo-trx[master]: buildenv: Turn off native architecture builds

2017-05-02 Thread Tom Tsou

Patch Set 4: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3df4b8db9692016115edbe2247beeec090715687
Gerrit-PatchSet: 4
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Tom Tsou 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-HasComments: No


osmo-trx[master]: buildenv: Make build CPU invariant

2017-05-02 Thread Tom Tsou

Patch Set 4: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic913aa13c23c348ae62e78c9dfd6ed8b0a62798c
Gerrit-PatchSet: 4
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Tom Tsou 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-HasComments: No


osmo-trx[master]: cosmetic: Add info about SSE support

2017-05-02 Thread Tom Tsou

Patch Set 3: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iacc83fd668c31644e0efb3e18962cf2870ed1daf
Gerrit-PatchSet: 3
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Tom Tsou 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-HasComments: No


osmo-trx[master]: ssedetect: Add runtime CPU detection

2017-05-02 Thread Tom Tsou

Patch Set 3: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iba74f8a6e4e921ff31e4bd9f0c7c881fe547423a
Gerrit-PatchSet: 3
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Alexander Chemeris 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Tom Tsou 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: dexter 
Gerrit-HasComments: No


osmo-trx[master]: buildenv: Split up SSE3 and SSE4.1 code

2017-05-02 Thread Tom Tsou

Patch Set 4: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I846e190e92f1258cd412d1b2d79b539e204e04b3
Gerrit-PatchSet: 4
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Tom Tsou 
Gerrit-HasComments: No


osmo-trx[master]: cosmetic: Make parameter lists uniform

2017-05-02 Thread Tom Tsou

Patch Set 3: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ice063b89791537c4b591751f12f5ef5c413a2d27
Gerrit-PatchSet: 3
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Tom Tsou 
Gerrit-HasComments: No


[PATCH] libosmocore[master]: Simplify ctrl cmd lookup

2017-05-02 Thread Max
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/2462

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

Simplify ctrl cmd lookup

Replace if-else ladder & gotos with single switch statement & explicit
return to make reading code easier.

Change-Id: Ida1b389b571c60c26813cd29e61b3e4423c5df0f
---
M src/ctrl/control_if.c
M src/ctrl/fsm_ctrl_commands.c
2 files changed, 25 insertions(+), 32 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/2462/2

diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c
index 14739f9..1a7c65b 100644
--- a/src/ctrl/control_if.c
+++ b/src/ctrl/control_if.c
@@ -192,7 +192,7 @@
 {
char *request;
int i, j, ret, node;
-
+   bool break_cycle = false;
vector vline, cmdvec, cmds_vec;
 
if (cmd->type == CTRL_TYPE_SET_REPLY ||
@@ -247,14 +247,20 @@
}
}
 
-   if (rc == 1) {
-   /* do nothing */
-   } else if (rc == -ENODEV)
-   goto err_missing;
-   else if (rc == -ERANGE)
-   goto err_index;
-   else {
-   /* If we're here the rest must be the command */
+   switch (rc) {
+   case 1: /* do nothing */
+   break;
+   case -ENODEV:
+   cmd_free_strvec(vline);
+   cmd->type = CTRL_TYPE_ERROR;
+   cmd->reply = "Error while resolving object";
+   return ret;
+   case -ERANGE:
+   cmd_free_strvec(vline);
+   cmd->type = CTRL_TYPE_ERROR;
+   cmd->reply = "Error while parsing the index.";
+   return ret;
+   default: /* If we're here the rest must be the command */
cmdvec = vector_init(vector_active(vline)-i);
for (j=i; jreply = "Command not present.";
@@ -300,17 +309,6 @@
 
if (ret == CTRL_CMD_ERROR)
cmd->type = CTRL_TYPE_ERROR;
-   return ret;
-
-err_missing:
-   cmd_free_strvec(vline);
-   cmd->type = CTRL_TYPE_ERROR;
-   cmd->reply = "Error while resolving object";
-   return ret;
-err_index:
-   cmd_free_strvec(vline);
-   cmd->type = CTRL_TYPE_ERROR;
-   cmd->reply = "Error while parsing the index.";
return ret;
 }
 
diff --git a/src/ctrl/fsm_ctrl_commands.c b/src/ctrl/fsm_ctrl_commands.c
index 64324f2..95d5fca 100644
--- a/src/ctrl/fsm_ctrl_commands.c
+++ b/src/ctrl/fsm_ctrl_commands.c
@@ -27,10 +27,10 @@
(*i)++;
fsm_name = vector_lookup(vline, *i);
if (!fsm_name)
-   goto err_index;
+   return -ERANGE;
fsm = osmo_fsm_find_by_name(fsm_name);
if (!fsm)
-   goto err_missing;
+   return -ENODEV;
*node_data = fsm;
*node_type = CTRL_NODE_FSM;
} else
@@ -43,10 +43,10 @@
(*i)++;
inst_name = vector_lookup(vline, *i);
if (!inst_name)
-   goto err_index;
+   return -ERANGE;
fi = osmo_fsm_inst_find_by_name(fsm, inst_name);
if (!fi)
-   goto err_missing;
+   return -ENODEV;
*node_data = fi;
*node_type = CTRL_NODE_FSM_INST;
} else if (!strcmp(token, "id")) {
@@ -54,10 +54,10 @@
(*i)++;
inst_id = vector_lookup(vline, *i);
if (!inst_id)
-   goto err_index;
+   return -ERANGE;
fi = osmo_fsm_inst_find_by_id(fsm, inst_id);
if (!fi)
-   goto err_missing;
+   return -ENODEV;
*node_data = fi;
*node_type = CTRL_NODE_FSM_INST;
}
@@ -67,11 +67,6 @@
}
 
return 1;
-
-err_index:
-   return 

[PATCH] libosmocore[master]: Fix broken ctrl commands without lookups

2017-05-02 Thread Max
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/2461

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

Fix broken ctrl commands without lookups

Recent changes to libosmoctrl resulted in ctrl comands without lookup
function being broken. Fix this by making local lookup helpers mutually
exclusive with cmd's lookup helpers (lookup helper from cmd will have
higher priority), init rc to 0 by default and return 0 for unmatched
root node lookups for fsm.

Change-Id: Iddd20602047ebd9be1b668593f5dfa6f1d3e8369
---
M src/ctrl/control_if.c
M src/ctrl/fsm_ctrl_commands.c
2 files changed, 5 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/61/2461/2

diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c
index c4b6f91..14739f9 100644
--- a/src/ctrl/control_if.c
+++ b/src/ctrl/control_if.c
@@ -234,15 +234,12 @@
}
 
for (i=0;ilookup)
rc = ctrl->lookup(data, vline, , >node, );
-   else
-   rc = 0;
-
-   if (!rc) {
+   else {
+   struct lookup_helper *lh;
llist_for_each_entry(lh, _lookup_helpers, list) {
rc = lh->lookup(data, vline, , >node, 
);
if (rc)
diff --git a/src/ctrl/fsm_ctrl_commands.c b/src/ctrl/fsm_ctrl_commands.c
index 0dfc396..64324f2 100644
--- a/src/ctrl/fsm_ctrl_commands.c
+++ b/src/ctrl/fsm_ctrl_commands.c
@@ -33,7 +33,8 @@
goto err_missing;
*node_data = fsm;
*node_type = CTRL_NODE_FSM;
-   }
+   } else
+   return 0;
break;
case CTRL_NODE_FSM:
fsm = *node_data;

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iddd20602047ebd9be1b668593f5dfa6f1d3e8369
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 


[PATCH] openbsc[master]: ctrl: remove boilerplate code

2017-05-02 Thread Max

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

ctrl: remove boilerplate code

Define subscriber-list-active-v1 ctrl command as RO and remove
unnecessary functions.

Change-Id: I88fe905c22cf7563415d470b88cb43fca0d52a7f
---
M openbsc/src/gprs/sgsn_ctrl.c
M openbsc/src/libmsc/ctrl_commands.c
2 files changed, 2 insertions(+), 24 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/63/2463/1

diff --git a/openbsc/src/gprs/sgsn_ctrl.c b/openbsc/src/gprs/sgsn_ctrl.c
index ccf5076..31ac74f 100644
--- a/openbsc/src/gprs/sgsn_ctrl.c
+++ b/openbsc/src/gprs/sgsn_ctrl.c
@@ -30,17 +30,6 @@
 
 extern vector ctrl_node_vec;
 
-static int verify_subscriber_list(struct ctrl_cmd *cmd, const char *v, void *d)
-{
-   return 1;
-}
-
-static int set_subscriber_list(struct ctrl_cmd *cmd, void *d)
-{
-   cmd->reply = "Get only attribute";
-   return CTRL_CMD_ERROR;
-}
-
 static int get_subscriber_list(struct ctrl_cmd *cmd, void *d)
 {
struct sgsn_mm_ctx *mm;
@@ -64,7 +53,7 @@
 
return CTRL_CMD_REPLY;
 }
-CTRL_CMD_DEFINE(subscriber_list, "subscriber-list-active-v1");
+CTRL_CMD_DEFINE_RO(subscriber_list, "subscriber-list-active-v1");
 
 int sgsn_ctrl_cmds_install(void)
 {
diff --git a/openbsc/src/libmsc/ctrl_commands.c 
b/openbsc/src/libmsc/ctrl_commands.c
index a56d122..c99dde4 100644
--- a/openbsc/src/libmsc/ctrl_commands.c
+++ b/openbsc/src/libmsc/ctrl_commands.c
@@ -184,17 +184,6 @@
 }
 CTRL_CMD_DEFINE_WO_NOVRF(subscriber_delete, "subscriber-delete-v1");
 
-static int verify_subscriber_list(struct ctrl_cmd *cmd, const char *value, 
void *d)
-{
-   return 1;
-}
-
-static int set_subscriber_list(struct ctrl_cmd *cmd, void *d)
-{
-   cmd->reply = "Get only attribute";
-   return CTRL_CMD_ERROR;
-}
-
 static void list_cb(struct gsm_subscriber *subscr, void *d)
 {
char **data = (char **) d;
@@ -210,7 +199,7 @@
printf("%s\n", cmd->reply);
return CTRL_CMD_REPLY;
 }
-CTRL_CMD_DEFINE(subscriber_list, "subscriber-list-active-v1");
+CTRL_CMD_DEFINE_RO(subscriber_list, "subscriber-list-active-v1");
 
 int msc_ctrl_cmds_install(void)
 {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I88fe905c22cf7563415d470b88cb43fca0d52a7f
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Max 


libosmocore[master]: Fix broken ctrl commands without lookups

2017-05-02 Thread Max

Patch Set 1:

Note: this is WIP - it does reduce number of errors from 20+ to 1. Still 
looking into remaining piece.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iddd20602047ebd9be1b668593f5dfa6f1d3e8369
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-HasComments: No


[PATCH] libosmocore[master]: Fix broken ctrl commands without lookups

2017-05-02 Thread Max

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

Fix broken ctrl commands without lookups

Recent changes to libosmoctrl resulted in ctrl comands without lookup
function being broken. Fix this by making local lookup helpers mutually
exclusive with cmd's lookup helpers (lookup helper from cmd will have
higher priority).

Change-Id: Iddd20602047ebd9be1b668593f5dfa6f1d3e8369
---
M src/ctrl/control_if.c
1 file changed, 2 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/61/2461/1

diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c
index c4b6f91..7d3edd2 100644
--- a/src/ctrl/control_if.c
+++ b/src/ctrl/control_if.c
@@ -234,15 +234,12 @@
}
 
for (i=0;ilookup)
rc = ctrl->lookup(data, vline, , >node, );
-   else
-   rc = 0;
-
-   if (!rc) {
+   else {
+   struct lookup_helper *lh;
llist_for_each_entry(lh, _lookup_helpers, list) {
rc = lh->lookup(data, vline, , >node, 
);
if (rc)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iddd20602047ebd9be1b668593f5dfa6f1d3e8369
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 


[PATCH] libosmocore[master]: Simplify ctrl cmd lookup

2017-05-02 Thread Max

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

Simplify ctrl cmd lookup

Replace if-else ladder & gotos with single switch statement to make
reading code easier.

Change-Id: Ida1b389b571c60c26813cd29e61b3e4423c5df0f
---
M src/ctrl/control_if.c
1 file changed, 19 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/2462/1

diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c
index 7d3edd2..cd7 100644
--- a/src/ctrl/control_if.c
+++ b/src/ctrl/control_if.c
@@ -192,7 +192,7 @@
 {
char *request;
int i, j, ret, node;
-
+   bool break_cycle = false;
vector vline, cmdvec, cmds_vec;
 
if (cmd->type == CTRL_TYPE_SET_REPLY ||
@@ -247,14 +247,20 @@
}
}
 
-   if (rc == 1) {
-   /* do nothing */
-   } else if (rc == -ENODEV)
-   goto err_missing;
-   else if (rc == -ERANGE)
-   goto err_index;
-   else {
-   /* If we're here the rest must be the command */
+   switch (rc) {
+   case 1: /* do nothing */
+   break;
+   case -ENODEV:
+   cmd_free_strvec(vline);
+   cmd->type = CTRL_TYPE_ERROR;
+   cmd->reply = "Error while resolving object";
+   return ret;
+   case -ERANGE:
+   cmd_free_strvec(vline);
+   cmd->type = CTRL_TYPE_ERROR;
+   cmd->reply = "Error while parsing the index.";
+   return ret;
+   default: /* If we're here the rest must be the command */
cmdvec = vector_init(vector_active(vline)-i);
for (j=i; jreply = "Command not present.";
@@ -300,17 +309,6 @@
 
if (ret == CTRL_CMD_ERROR)
cmd->type = CTRL_TYPE_ERROR;
-   return ret;
-
-err_missing:
-   cmd_free_strvec(vline);
-   cmd->type = CTRL_TYPE_ERROR;
-   cmd->reply = "Error while resolving object";
-   return ret;
-err_index:
-   cmd_free_strvec(vline);
-   cmd->type = CTRL_TYPE_ERROR;
-   cmd->reply = "Error while parsing the index.";
return ret;
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida1b389b571c60c26813cd29e61b3e4423c5df0f
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 


[MERGED] osmo-gsm-tester[master]: ofono_client: Set modem online before connecting to the network

2017-05-02 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged.

Change subject: ofono_client: Set modem online before connecting to the network
..


ofono_client: Set modem online before connecting to the network

Change-Id: I62ba1bfbdee64b18a443e8ad3974bb035b0be344
---
M src/osmo_gsm_tester/ofono_client.py
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/src/osmo_gsm_tester/ofono_client.py 
b/src/osmo_gsm_tester/ofono_client.py
index a10784f..4476fdb 100644
--- a/src/osmo_gsm_tester/ofono_client.py
+++ b/src/osmo_gsm_tester/ofono_client.py
@@ -76,6 +76,11 @@
 self.dbus_obj().SetProperty('Powered', Variant('b', on))
 test.poll()
 
+def set_online(self, on=True):
+test.poll()
+self.dbus_obj().SetProperty('Online', Variant('b', on))
+test.poll()
+
 def dbus_obj(self):
 if self._dbus_obj is not None:
 return self._dbus_obj
@@ -124,6 +129,7 @@
 'set the modem up to connect to MCC+MNC from NITB config'
 self.log('connect to', nitb)
 self.set_powered()
+self.set_online()
 if not self.has_interface(I_NETREG):
 self.log('No %r interface, hoping that the modem connects by 
itself' % I_NETREG)
 else:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I62ba1bfbdee64b18a443e8ad3974bb035b0be344
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: neels 


osmo-gsm-tester[master]: ofono_client: Set modem online before connecting to the network

2017-05-02 Thread Neels Hofmeyr

Patch Set 2: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I62ba1bfbdee64b18a443e8ad3974bb035b0be344
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: neels 
Gerrit-HasComments: No


[PATCH] osmo-gsm-manuals[master]: OsmoBTS/chapters/configuration.adoc: Add bts index in example

2017-05-02 Thread Pau Espin Pedrol

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

OsmoBTS/chapters/configuration.adoc: Add bts index in example

Change-Id: If13643cdfa59c50b6af8ab0657635fed2ca219f0
---
M OsmoBTS/chapters/configuration.adoc
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/60/2460/1

diff --git a/OsmoBTS/chapters/configuration.adoc 
b/OsmoBTS/chapters/configuration.adoc
index 980f835..dbc7a29 100644
--- a/OsmoBTS/chapters/configuration.adoc
+++ b/OsmoBTS/chapters/configuration.adoc
@@ -136,7 +136,7 @@
 
 OsmoBTS> enable
 OsmoBTS# configure terminal
-OsmoBTS(config)# bts
+OsmoBTS(config)# bts 0
 OsmoBTS(bts)# trx 0
 OsmoBTS(trx)# gsmtap-sapi sdcch
 OsmoBTS(trx)# write <1>
@@ -167,7 +167,7 @@
 
 OsmoBTS> enable
 OsmoBTS# configure terminal
-OsmoBTS(config)# bts
+OsmoBTS(config)# bts 0
 OsmoBTS(bts)# trx 0
 OsmoBTS(trx)# power-ramp max-initial 5 dBm
 OsmoBTS(trx)# power-ramp step-size 1 dB

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If13643cdfa59c50b6af8ab0657635fed2ca219f0
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 


osmo-gsm-tester[master]: ofono_client: Implement network registration during connect()

2017-05-02 Thread Neels Hofmeyr

Patch Set 1:

(7 comments)

looks good in principle, please don't be discouraged from the number of 
comments :)

https://gerrit.osmocom.org/#/c/2449/1/src/osmo_gsm_tester/ofono_client.py
File src/osmo_gsm_tester/ofono_client.py:

Line 116: if interface_name == I_NETREG:
elif?


Line 129: nr = self.dbus_obj()[I_NETREG]
this being called from is_connected() would raise a KeyError if the I_NETREG 
was not in the list. Instead, is_connected() should probably return False?

So maybe return None in case there is no I_NETREG. Maybe this works:

  nr = self.dbus_obj().get(I_NETREG)
  if nr is None:
return None

What do you think?


Line 138: return status == 'registered' or status == 'roaming'
are 'registered' and 'roaming' fixed definitions from ofono? I hope so. 
Especially when we're using the same one several times ('roaming'), I would 
prefer using constants defined above, sort of like the I_NETREG.


Line 140: def connect(self, nitb):
hmm, I see a name duality arising: register and connect. Maybe we should rename 
all of them to 'register'?


Line 148: self.log('Already registered with the network')
what if the nitb arg reflects another network than the one we're connected to? 
I assume we usually want to disconnect and re-connect.


Line 154: self.dbg('Registered with network successfully: 
current status is %s', self.get_netreg_status())
could call get_netreg_status() less often...


Line 156: raise Exception('Failed to register with the network, 
current status is %s' % self.get_netreg_status())
so far I've been using RuntimeError (but we should also probably use more fine 
grained exceptions, like introduce an OfonoExn or ModemExn...)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1db8c7cba8a83746c16e1ca45f4b8aa0d595caf8
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: neels 
Gerrit-HasComments: Yes


[PATCH] openbsc[master]: Make pcap dependency optional

2017-05-02 Thread Max

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

Make pcap dependency optional

Previously we required pcap.h unconditionally which causes embedded
build failure because it's not included in current version of out poky
toolchain. We can add it to toolchain but it's only necessary for
utils/osmo-meas-pcap2db which is not built for sysmobts anyway so it's
easier to just make this dependency optional and build osmo-meas-pcap2db
only if it's available - similar to the way we build osmo-meas-udp2db.

Related: SYS#3610
Change-Id: I77a5f7eafe0282abedacffad6a9bcb0a8f2b5caa
---
M openbsc/configure.ac
M openbsc/src/utils/Makefile.am
2 files changed, 9 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/58/2458/1

diff --git a/openbsc/configure.ac b/openbsc/configure.ac
index 7e244bc..c6ae159 100644
--- a/openbsc/configure.ac
+++ b/openbsc/configure.ac
@@ -120,7 +120,10 @@
 dnl checks for header files
 AC_HEADER_STDC
 AC_CHECK_HEADERS(dbi/dbd.h,,AC_MSG_ERROR(DBI library is not installed))
-AC_CHECK_HEADERS(pcap/pcap.h,,AC_MSG_ERROR(PCAP library is not installed))
+
+found_pcap=yes
+AC_CHECK_HEADERS(pcap/pcap.h,,found_pcap=no)
+AM_CONDITIONAL(HAVE_PCAP, test "$found_pcap" = yes)
 
 found_cdk=yes
 AC_CHECK_HEADERS(cdk/cdk.h,,found_cdk=no)
diff --git a/openbsc/src/utils/Makefile.am b/openbsc/src/utils/Makefile.am
index ab4f3ce..9c3837a 100644
--- a/openbsc/src/utils/Makefile.am
+++ b/openbsc/src/utils/Makefile.am
@@ -29,9 +29,13 @@
$(NULL)
 if HAVE_SQLITE3
 bin_PROGRAMS += \
-   osmo-meas-pcap2db \
osmo-meas-udp2db \
$(NULL)
+if HAVE_PCAP
+bin_PROGRAMS += \
+   osmo-meas-pcap2db \
+   $(NULL)
+endif
 endif
 if HAVE_LIBCDK
 bin_PROGRAMS += \

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I77a5f7eafe0282abedacffad6a9bcb0a8f2b5caa
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Max 


[PATCH] openbsc[master]: Fix vty warnings for GEA0

2017-05-02 Thread Max

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

Fix vty warnings for GEA0

Previously vty always used additional checks even for GEA0 (no
encryption) which resulted in misleading warnings. Fix this by
adding explicit check for GEA0.

Related: SYS#3610
Change-Id: I1ee468ab3298076d4cb5c7b1f6293c07e272417b
---
M openbsc/src/gprs/sgsn_vty.c
1 file changed, 11 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/59/2459/1

diff --git a/openbsc/src/gprs/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c
index d42a165..e09a029 100644
--- a/openbsc/src/gprs/sgsn_vty.c
+++ b/openbsc/src/gprs/sgsn_vty.c
@@ -619,17 +619,18 @@
   "Use GEA0 (no encryption)\n"
   "Use GEA1\nUse GEA2\nUse GEA3\nUse GEA4\n")
 {
-   if (!g_cfg->require_authentication) {
-   vty_out(vty, "%% unable to use encryption without "
-   "authentication: adjust auth-policy%s", VTY_NEWLINE);
-   return CMD_WARNING;
-   }
-
enum gprs_ciph_algo c = get_string_value(gprs_cipher_names, argv[0]);
-   if (!gprs_cipher_supported(c)) {
-   vty_out(vty, "%% cipher %s is unsupported in current version%s",
-   argv[0], VTY_NEWLINE);
-   return CMD_WARNING;
+   if (c != GPRS_ALGO_GEA0) {
+   if (!gprs_cipher_supported(c)) {
+   vty_out(vty, "%% cipher %s is unsupported in current 
version%s", argv[0], VTY_NEWLINE);
+   return CMD_WARNING;
+   }
+
+   if (!g_cfg->require_authentication) {
+   vty_out(vty, "%% unable to use encryption %s without 
authentication: please adjust auth-policy%s",
+   argv[0], VTY_NEWLINE);
+   return CMD_WARNING;
+   }
}
 
g_cfg->cipher = c;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ee468ab3298076d4cb5c7b1f6293c07e272417b
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Max 


[PATCH] openggsn[master]: Move ligtp.pc into library dir

2017-05-02 Thread Max

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

Move ligtp.pc into library dir

libgtp.pc and related stuff belongs to libgtp which is in gtp dir. Move
it there in attempt to fix missing libgtp.pc in our embedded toolchain.

Related: SYS#3610
Change-Id: Ic26148f307ea399c9ffd30b337605ee8c153aff7
---
M .gitignore
M Makefile.am
M configure.ac
M gtp/Makefile.am
R gtp/libgtp.pc.in
5 files changed, 4 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openggsn refs/changes/57/2457/1

diff --git a/.gitignore b/.gitignore
index 111fa98..90dee29 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,7 +32,7 @@
 sgsnemu/sgsnemu
 debian/files
 debian/libgtp-dev/
-libgtp.pc
+gtp/libgtp.pc
 ggsn/ggsn
 m4/
 *.swp
diff --git a/Makefile.am b/Makefile.am
index 8232770..c074083 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,4 @@
 ## Process this file with automake to produce Makefile.in
 SUBDIRS = lib gtp ggsn sgsnemu doc
 
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = libgtp.pc
-
 EXTRA_DIST = README.md README.FreeBSD README.MacOSX README.Solaris
diff --git a/configure.ac b/configure.ac
index 45ab22b..29e71e4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -138,7 +138,7 @@
  po/Makefile
  sgsnemu/Makefile
  tests/Makefile
- libgtp.pc
+ gtp/libgtp.pc
  openggsn.spec])
 AC_OUTPUT
 
diff --git a/gtp/Makefile.am b/gtp/Makefile.am
index 32025d6..14e0081 100644
--- a/gtp/Makefile.am
+++ b/gtp/Makefile.am
@@ -12,6 +12,5 @@
 libgtp_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined
 libgtp_la_LIBADD = $(LIBOSMOCORE_LIBS)
 
-
-
-
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libgtp.pc
diff --git a/libgtp.pc.in b/gtp/libgtp.pc.in
similarity index 100%
rename from libgtp.pc.in
rename to gtp/libgtp.pc.in

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic26148f307ea399c9ffd30b337605ee8c153aff7
Gerrit-PatchSet: 1
Gerrit-Project: openggsn
Gerrit-Branch: master
Gerrit-Owner: Max 


openbsc[master]: libmsc: make pitfall in gsm0408_dispatch() more obvious

2017-05-02 Thread Neels Hofmeyr

Patch Set 1:

erm ... maybe this patch doesn't make sense on the master branch? (I rebased it 
from the 3G branch)

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

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


libosmocore[master]: gsm0808: fix control flow issue

2017-05-02 Thread Neels Hofmeyr

Patch Set 2:

dexter is on vacation ... is there any reason to not submit this?

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I89751fc0d598734c64ef1fdced75b7c4fa77c616
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-gsm-tester[master]: jenkins-run: Provide a link to the latest trial archived

2017-05-02 Thread Neels Hofmeyr

Patch Set 2:

> - Be able to run the latest trial manually.

it's a bit cumersome to 'ls -1t | head -n 1' but we could also add a command 
line option to osmo-gsm-tester.py to do this automatically.

 > - If the list of trials is accessible via ssh, ftp or http, give
 > users who want to get the latest trial a unique reference/link.

The problem is that with concurrent runs, there isn't really a concept of a 
latest trial. I would discourage scripts from launching a trial and then 
assuming that the latest trial dir is the one they should look at. Instead, 
there should be a safe way to know which trial run was launched... What other 
use case is there than wanting to run a fairly recent set of binaries manually?

I get the intention and I would love to be able to just accept this, but the 
more I think about it the more I don't like the side effects it's introducing...

For example, what if a manual run tries to point the latest symlink back at 
itself? and so on... we need to safeguard and work around it. If we just have 
no such symlink, all problems disappear, and we still have other easy ways to 
implement the use case for a 'latest' link, right?

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I26ddf55110738bd1944ccbfe72e8410ff9811392
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: neels 
Gerrit-HasComments: No


osmo-pcu[master]: fix PACCH paging: don't return early in case of NULL TBF

2017-05-02 Thread Neels Hofmeyr

Patch Set 2:

So, da7250ad2c1cd5ddc7d3c6e10435a00b357ef8f7 introduced a segfault, and 
b78a4a6dfef217c538d45949a6ae725e22a36b05 as well as this patch fix the 
segfault, while still having problems. To cut this short, we could also revert 
all of the patches. Opinions/better patches welcome.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib79f4a945e211a13ac7d1e511cc37b0940ac6202
Gerrit-PatchSet: 2
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-pcu[master]: fix PACCH paging: don't return early in case of NULL TBF

2017-05-02 Thread Neels Hofmeyr

Patch Set 2:

(2 comments)

Thanks for the review; the thing is, I don't really know what this code is 
doing and why, this issue jumped at my knees and now I'm trying to throw stones 
at it to not be broken. I would very much welcome a more qualified person to 
take this patch over from me; might be easier than telling me what exactly 
should happen here, probably in numerous iterations of patch review too.

Re how was this found: a live installation of a GSM network saw 80% drop in CS 
service reliability, hunted down to missing pagings for phones that were using 
GPRS. In a pcap, before the mentioned patch you see a lot of PACCH pagings, 
with it you see none. The point being that CS hands down pagings to the PCU in 
case of GPRS being active, and the regression is that we skip all of those 
pagings.

https://gerrit.osmocom.org/#/c/2420/2/src/gprs_rlcmac_sched.cpp
File src/gprs_rlcmac_sched.cpp:

Line 186:   return NULL;
> msg is leaked now?
right...


Line 202:   return msg;
> okay but we might still have a tbf here?
I kind of assumed that we'd either have a TBF and a message or neither... 
right, the code is not checking that...


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

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


[PATCH] osmo-gsm-tester[master]: ofono_client: Set modem online before connecting to the network

2017-05-02 Thread Pau Espin Pedrol

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

ofono_client: Set modem online before connecting to the network

Change-Id: I62ba1bfbdee64b18a443e8ad3974bb035b0be344
---
M src/osmo_gsm_tester/ofono_client.py
1 file changed, 6 insertions(+), 0 deletions(-)


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

diff --git a/src/osmo_gsm_tester/ofono_client.py 
b/src/osmo_gsm_tester/ofono_client.py
index 974746c..44f959a 100644
--- a/src/osmo_gsm_tester/ofono_client.py
+++ b/src/osmo_gsm_tester/ofono_client.py
@@ -76,6 +76,11 @@
 self.dbus_obj().SetProperty('Powered', Variant('b', on))
 test.poll()
 
+def set_online(self, on=True):
+test.poll()
+self.dbus_obj().SetProperty('Online', Variant('b', on))
+test.poll()
+
 def dbus_obj(self):
 if self._dbus_obj is not None:
 return self._dbus_obj
@@ -141,6 +146,7 @@
 'set the modem up to connect to MCC+MNC from NITB config'
 self.log('connect to', nitb)
 self.set_powered()
+self.set_online()
 if not self.has_interface(I_NETREG):
 self.log('No %r interface, hoping that the modem connects by 
itself' % I_NETREG)
 else:

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

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


[PATCH] osmo-trx[master]: debian: remove obsolete dependency

2017-05-02 Thread Max
Hello Harald Welte, Jenkins Builder, Holger Freyther,

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

https://gerrit.osmocom.org/2400

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

debian: remove obsolete dependency

This should fix package build for Ubuntu 17.04: obsolete package
hardening-wrapper was removed which cause .deb build failure.
The dependency on it is incorrect to begin with because we use
DEB_BUILD_MAINT_OPTIONS instead.

Change-Id: I3ea72b4123a280a846086d083c4f3189d611f8cf
---
M debian/control
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/00/2400/3

diff --git a/debian/control b/debian/control
index 151aa92..0e3b714 100644
--- a/debian/control
+++ b/debian/control
@@ -12,7 +12,6 @@
libuhd-dev,
libusb-1.0-0-dev,
libboost-all-dev,
-   hardening-wrapper,
libfftw3-dev
 Standards-Version: 3.9.6
 Vcs-Browser: http://cgit.osmocom.org/osmo-trx

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3ea72b4123a280a846086d083c4f3189d611f8cf
Gerrit-PatchSet: 3
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Alexander Chemeris 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Tom Tsou 
Gerrit-Reviewer: neels 


[MERGED] osmo-gsm-tester[master]: gitignore: Add *.pyc

2017-05-02 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged.

Change subject: gitignore: Add *.pyc
..


gitignore: Add *.pyc

Change-Id: I987df905c5d64294488b5a6cdcf4306307616fc6
---
M .gitignore
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index b968e92..4119e7f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@
 set_pythonpath
 test_work
 state
+*.pyc

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I987df905c5d64294488b5a6cdcf4306307616fc6
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 


[MERGED] libosmo-netif[master]: stream.h: Add missing stdint.h include

2017-05-02 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged.

Change subject: stream.h: Add missing stdint.h include
..


stream.h: Add missing stdint.h include

This header uses uint16_t, which is provided by stdint.h.

Change-Id: I399e2986c9d8cb5b3dd31673a6b4bf63070a4770
---
M include/osmocom/netif/stream.h
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/include/osmocom/netif/stream.h b/include/osmocom/netif/stream.h
index 08af3fd..4e1beb6 100644
--- a/include/osmocom/netif/stream.h
+++ b/include/osmocom/netif/stream.h
@@ -2,6 +2,7 @@
 #define _OSMO_STREAM_H_
 
 #include 
+#include 
 
 /*! \addtogroup stream
  *  @{

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I399e2986c9d8cb5b3dd31673a6b4bf63070a4770
Gerrit-PatchSet: 3
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol