Change in osmo-bsc[master]: Add VTY option to avoid sending empty Full BCCH Info for disabled SI

2018-12-14 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/12133 )

Change subject: Add VTY option to avoid sending empty Full BCCH Info for 
disabled SI
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/12133
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: Idec1daabc21de4eea5c55edd1dbb0e0775720fc7
Gerrit-Change-Number: 12133
Gerrit-PatchSet: 3
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 14 Dec 2018 20:06:35 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: Add VTY option to avoid sending empty Full BCCH Info for disabled SI

2018-12-14 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12133 )

Change subject: Add VTY option to avoid sending empty Full BCCH Info for 
disabled SI
..

Add VTY option to avoid sending empty Full BCCH Info for disabled SI

According to 3GPP TS 08.58 §8.5.1 BCCH INFORMATION:
"If the Full BCCH information element is not included this indicates that
transmission of the indicated SYSTEM INFORMATION message shall be stopped."

However, some ipaccess nanoBTS firmware versions are known to not support
some SI elements and also to dislike receiving BCCH Information for those SI,
even if received with empty BCCH Information meaning they should not be used.

Upon receival of this kind of message, nanoBTS sends a Failure Report
with following text:
Type=processing failure, Severity=critical failure, Probable cause=Manufacturer 
specific values: Fatal software error, Additional Text=l2_bch.c:1149

** l2_bch.c#1149:BCHbcchSItypeValid( prim_p->infoType )
** IPA_SW_FATAL_ERROR
** In task "TRX Proc:L2_BCH" @ (325).


This kind of issue only appears with some fw versions, since it's known
to work fine in other ones, so let's not disable this kind of mesage by
default on all BTs of type "nanobts".

Instead, add a VTY command that allows disabling this kind of message in
order to be able to operate those nanoBTS units.

Fixes: OS#3707
Change-Id: Idec1daabc21de4eea5c55edd1dbb0e0775720fc7
---
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/bsc_init.c
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/gsm_data.c
4 files changed, 50 insertions(+), 6 deletions(-)

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



diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index e57da55..738bad3 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -981,6 +981,9 @@
/* offsets used while generating SI2quater */
size_t e_offset;
size_t u_offset;
+   /* 3GPP TS 08.58 §8.5.1 BCCH INFORMATION. Some nanoBTS fail upon
+* receival of empty SI disabling unsupported SI. see OS#3707. */
+   bool si_unused_send_empty;

/* ip.accesss Unit ID's have Site/BTS/TRX layout */
union {
diff --git a/src/osmo-bsc/bsc_init.c b/src/osmo-bsc/bsc_init.c
index 2f44b20..7d29d4f 100644
--- a/src/osmo-bsc/bsc_init.c
+++ b/src/osmo-bsc/bsc_init.c
@@ -173,12 +173,16 @@

for (n = 0; n < n_si; n++) {
i = gen_si[n];
-   /* if we don't currently have this SI, we send a zero-length
-* RSL BCCH FILLING / SACCH FILLING * in order to deactivate
-* the SI, in case it might have previously been active */
-   if (!GSM_BTS_HAS_SI(bts, i))
-   rc = rsl_si(trx, i, 0);
-   else
+   /* 3GPP TS 08.58 §8.5.1 BCCH INFORMATION. If we don't currently
+* have this SI, we send a zero-length RSL BCCH FILLING /
+* SACCH FILLING in order to deactivate the SI, in case it
+* might have previously been active */
+   if (!GSM_BTS_HAS_SI(bts, i)) {
+   if (bts->si_unused_send_empty)
+   rc = rsl_si(trx, i, 0);
+   else
+   rc = 0; /* some nanoBTS fw don't like receiving 
empty unsupported SI */
+   } else
rc = rsl_si(trx, i, si_len[i]);
if (rc < 0)
return rc;
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index 8c7d8e1..032305e 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -874,6 +874,8 @@
}
vty_out(vty, "  access-control-class-ramping-step-size %u%s", 
acc_ramp_get_step_size(>acc_ramp),
VTY_NEWLINE);
+   if (!bts->si_unused_send_empty)
+   vty_out(vty, "  no system-information unused-send-empty%s", 
VTY_NEWLINE);
for (i = SYSINFO_TYPE_1; i < _MAX_SYSINFO_TYPE; i++) {
if (bts->si_mode_static & (1 << i)) {
vty_out(vty, "  system-information %s mode static%s",
@@ -3087,6 +3089,38 @@
return CMD_SUCCESS;
 }

+DEFUN(cfg_bts_si_unused_send_empty, cfg_bts_si_unused_send_empty_cmd,
+   "system-information unused-send-empty",
+   SI_TEXT
+   "Send BCCH Info with empty 'Full BCCH Info' TLV to notify disabled SI. "
+   "Some nanoBTS fw versions are known to fail upon receival of these 
messages.\n")
+{
+   struct gsm_bts *bts = vty->index;
+
+   bts->si_unused_send_empty = true;
+
+   return CMD_SUCCESS;
+}
+
+DEFUN(cfg_bts_no_si_unused_send_empty, cfg_bts_no_si_unused_send_empty_cmd,
+   "no system-information unused-send-empty",
+   NO_STR SI_TEXT
+   "Avoid sending BCCH Info 

Change in osmo-trx[master]: configure.ac: check boost only if USRP1 support is enabled

2018-12-14 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12088 )

Change subject: configure.ac: check boost only if USRP1 support is enabled
..

configure.ac: check boost only if USRP1 support is enabled

boost is only used in USRPDevice class.

It looks like it can be removed entirely quite easily, since only
boost::shared_ptr is used for 2 variables. That's left for somebody with
the device and willingness to test the changes.

Change-Id: I4c3fa3ff58fd552d0cb4c4cf2033615d84c07c96
---
M configure.ac
1 file changed, 2 insertions(+), 3 deletions(-)

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



diff --git a/configure.ac b/configure.ac
index 37b70fa..2ce4462 100644
--- a/configure.ac
+++ b/configure.ac
@@ -155,6 +155,8 @@
 ])

 AS_IF([test "x$with_usrp1" = "xyes"], [
+AC_CHECK_HEADER([boost/config.hpp],[],
+[AC_MSG_ERROR([boost/config.hpp not found, install e.g. 
libboost-dev])])
 PKG_CHECK_MODULES(USRP, usrp >= 3.3)
 ])

@@ -234,9 +236,6 @@
 PKG_CHECK_MODULES(LIBUSB, libusb-1.0)
 PKG_CHECK_MODULES(FFTWF, fftw3f)

-AC_CHECK_HEADER([boost/config.hpp],[],
-[AC_MSG_ERROR([boost/config.hpp not found, install e.g. libboost-dev])])
-
 # Generate manuals
 AC_ARG_ENABLE(manuals,
[AS_HELP_STRING(

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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I4c3fa3ff58fd552d0cb4c4cf2033615d84c07c96
Gerrit-Change-Number: 12088
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-CC: Neels Hofmeyr 


Change in osmo-trx[master]: configure.ac: check boost only if USRP1 support is enabled

2018-12-14 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/12088 )

Change subject: configure.ac: check boost only if USRP1 support is enabled
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4c3fa3ff58fd552d0cb4c4cf2033615d84c07c96
Gerrit-Change-Number: 12088
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-CC: Neels Hofmeyr 
Gerrit-Comment-Date: Fri, 14 Dec 2018 20:05:31 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


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

2018-12-14 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/xUbuntu_16.04/x86_64

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

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

Last lines of build log:
[  162s] /usr/src/packages/BUILD/Transceiver52M/device/lms/LMSDevice.cpp:259: 
undefined reference to `LMS_Calibrate'
[  162s] /usr/src/packages/BUILD/Transceiver52M/device/lms/LMSDevice.cpp:252: 
undefined reference to `LMS_SetLPFBW'
[  162s] collect2: error: ld returned 1 exit status
[  162s] Makefile:461: recipe for target 'LMSDeviceTest' failed
[  162s] make[4]: *** [LMSDeviceTest] Error 1
[  162s] make[4]: Leaving directory 
'/usr/src/packages/BUILD/tests/Transceiver52M'
[  162s] Makefile:401: recipe for target 'all-recursive' failed
[  162s] make[3]: *** [all-recursive] Error 1
[  162s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests'
[  162s] Makefile:516: recipe for target 'all-recursive' failed
[  162s] make[2]: *** [all-recursive] Error 1
[  162s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  162s] Makefile:447: recipe for target 'all' failed
[  162s] make[1]: *** [all] Error 2
[  162s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  162s] dh_auto_build: make -j1 returned exit code 2
[  162s] debian/rules:6: recipe for target 'build' failed
[  162s] make: *** [build] Error 2
[  162s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  162s] 
[  162s] lamb67 failed "build osmo-trx_0.4.0.122.03b1.dsc" at Fri Dec 14 
20:04:30 UTC 2018.
[  162s] 
[  162s] ### VM INTERACTION START ###
[  165s] [  155.193635] sysrq: SysRq : Power Off
[  165s] [  155.200338] reboot: Power down
[  165s] ### VM INTERACTION END ###
[  165s] 
[  165s] lamb67 failed "build osmo-trx_0.4.0.122.03b1.dsc" at Fri Dec 14 
20:04:34 UTC 2018.
[  165s] 

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


Build failure of network:osmocom:nightly/osmo-trx in xUbuntu_17.10/i586

2018-12-14 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/xUbuntu_17.10/i586

Package network:osmocom:nightly/osmo-trx failed to build in xUbuntu_17.10/i586

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

Last lines of build log:
[  255s] ../../Transceiver52M/device/lms/.libs/libdevice.a(LMSDevice.o): In 
function `compat_LMS_VCTCXOWrite':
[  255s] ./Transceiver52M/device/lms/LMSDevice.cpp:58: undefined reference to 
`LMS_VCTCXOWrite'
[  255s] collect2: error: ld returned 1 exit status
[  255s] Makefile:461: recipe for target 'LMSDeviceTest' failed
[  255s] make[4]: *** [LMSDeviceTest] Error 1
[  255s] make[4]: Leaving directory 
'/usr/src/packages/BUILD/tests/Transceiver52M'
[  255s] Makefile:401: recipe for target 'all-recursive' failed
[  255s] make[3]: *** [all-recursive] Error 1
[  255s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests'
[  255s] Makefile:516: recipe for target 'all-recursive' failed
[  255s] make[2]: *** [all-recursive] Error 1
[  255s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  255s] Makefile:447: recipe for target 'all' failed
[  255s] make[1]: *** [all] Error 2
[  255s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  255s] dh_auto_build: make -j1 returned exit code 2
[  255s] debian/rules:6: recipe for target 'build' failed
[  255s] make: *** [build] Error 2
[  255s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  255s] 
[  255s] morla3 failed "build osmo-trx_0.4.0.122.03b1.dsc" at Fri Dec 14 
20:02:48 UTC 2018.
[  255s] 
[  255s] ### VM INTERACTION START ###
[  258s] [  244.166402] sysrq: SysRq : Power Off
[  258s] [  244.219516] reboot: Power down
[  258s] ### VM INTERACTION END ###
[  259s] 
[  259s] morla3 failed "build osmo-trx_0.4.0.122.03b1.dsc" at Fri Dec 14 
20:02:53 UTC 2018.
[  259s] 

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


Build failure of network:osmocom:nightly/osmo-trx in xUbuntu_18.04/i586

2018-12-14 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/xUbuntu_18.04/i586

Package network:osmocom:nightly/osmo-trx failed to build in xUbuntu_18.04/i586

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

Last lines of build log:
[  283s] ../../Transceiver52M/device/lms/.libs/libdevice.a(LMSDevice.o): In 
function `compat_LMS_VCTCXOWrite':
[  283s] ./Transceiver52M/device/lms/LMSDevice.cpp:58: undefined reference to 
`LMS_VCTCXOWrite'
[  283s] collect2: error: ld returned 1 exit status
[  283s] Makefile:461: recipe for target 'LMSDeviceTest' failed
[  283s] make[4]: *** [LMSDeviceTest] Error 1
[  283s] make[4]: Leaving directory 
'/usr/src/packages/BUILD/tests/Transceiver52M'
[  283s] Makefile:401: recipe for target 'all-recursive' failed
[  283s] make[3]: *** [all-recursive] Error 1
[  283s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests'
[  283s] Makefile:516: recipe for target 'all-recursive' failed
[  283s] make[2]: *** [all-recursive] Error 1
[  283s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  283s] Makefile:447: recipe for target 'all' failed
[  283s] make[1]: *** [all] Error 2
[  283s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  283s] dh_auto_build: make -j1 returned exit code 2
[  283s] debian/rules:6: recipe for target 'build' failed
[  283s] make: *** [build] Error 2
[  283s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[  283s] 
[  283s] cloud108 failed "build osmo-trx_0.4.0.122.03b1.dsc" at Fri Dec 14 
20:02:03 UTC 2018.
[  283s] 
[  283s] ### VM INTERACTION START ###
[  286s] [  263.267717] sysrq: SysRq : Power Off
[  286s] [  263.284803] reboot: Power down
[  288s] ### VM INTERACTION END ###
[  289s] 
[  289s] cloud108 failed "build osmo-trx_0.4.0.122.03b1.dsc" at Fri Dec 14 
20:02:09 UTC 2018.
[  289s] 

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


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

2018-12-14 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/xUbuntu_16.04/i586

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

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

Last lines of build log:
[  188s] /usr/src/packages/BUILD/Transceiver52M/device/lms/LMSDevice.cpp:259: 
undefined reference to `LMS_Calibrate'
[  188s] /usr/src/packages/BUILD/Transceiver52M/device/lms/LMSDevice.cpp:252: 
undefined reference to `LMS_SetLPFBW'
[  188s] collect2: error: ld returned 1 exit status
[  188s] Makefile:461: recipe for target 'LMSDeviceTest' failed
[  188s] make[4]: *** [LMSDeviceTest] Error 1
[  188s] make[4]: Leaving directory 
'/usr/src/packages/BUILD/tests/Transceiver52M'
[  188s] Makefile:401: recipe for target 'all-recursive' failed
[  188s] make[3]: *** [all-recursive] Error 1
[  188s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests'
[  188s] Makefile:516: recipe for target 'all-recursive' failed
[  188s] make[2]: *** [all-recursive] Error 1
[  188s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  188s] Makefile:447: recipe for target 'all' failed
[  188s] make[1]: *** [all] Error 2
[  188s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  188s] dh_auto_build: make -j1 returned exit code 2
[  188s] debian/rules:6: recipe for target 'build' failed
[  188s] make: *** [build] Error 2
[  188s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  188s] 
[  188s] lamb12 failed "build osmo-trx_0.4.0.122.03b1.dsc" at Fri Dec 14 
20:00:22 UTC 2018.
[  188s] 
[  188s] ### VM INTERACTION START ###
[  191s] [  179.137670] sysrq: SysRq : Power Off
[  191s] [  179.158000] reboot: Power down
[  191s] ### VM INTERACTION END ###
[  191s] 
[  191s] lamb12 failed "build osmo-trx_0.4.0.122.03b1.dsc" at Fri Dec 14 
20:00:26 UTC 2018.
[  191s] 

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


Build failure of network:osmocom:nightly/osmo-trx in xUbuntu_18.04/x86_64

2018-12-14 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/xUbuntu_18.04/x86_64

Package network:osmocom:nightly/osmo-trx failed to build in xUbuntu_18.04/x86_64

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

Last lines of build log:
[  223s] ../../Transceiver52M/device/lms/.libs/libdevice.a(LMSDevice.o): In 
function `compat_LMS_VCTCXOWrite':
[  223s] ./Transceiver52M/device/lms/LMSDevice.cpp:58: undefined reference to 
`LMS_VCTCXOWrite'
[  223s] collect2: error: ld returned 1 exit status
[  223s] Makefile:461: recipe for target 'LMSDeviceTest' failed
[  223s] make[4]: *** [LMSDeviceTest] Error 1
[  223s] make[4]: Leaving directory 
'/usr/src/packages/BUILD/tests/Transceiver52M'
[  223s] Makefile:401: recipe for target 'all-recursive' failed
[  223s] make[3]: *** [all-recursive] Error 1
[  223s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests'
[  223s] Makefile:516: recipe for target 'all-recursive' failed
[  223s] make[2]: *** [all-recursive] Error 1
[  223s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  223s] Makefile:447: recipe for target 'all' failed
[  223s] make[1]: *** [all] Error 2
[  223s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  223s] dh_auto_build: make -j1 returned exit code 2
[  223s] debian/rules:6: recipe for target 'build' failed
[  223s] make: *** [build] Error 2
[  223s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[  223s] 
[  223s] lamb26 failed "build osmo-trx_0.4.0.122.03b1.dsc" at Fri Dec 14 
19:59:48 UTC 2018.
[  223s] 
[  223s] ### VM INTERACTION START ###
[  226s] [  213.190271] sysrq: SysRq : Power Off
[  226s] [  213.206949] reboot: Power down
[  227s] ### VM INTERACTION END ###
[  227s] 
[  227s] lamb26 failed "build osmo-trx_0.4.0.122.03b1.dsc" at Fri Dec 14 
19:59:52 UTC 2018.
[  227s] 

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


Change in osmo-bts[master]: rsl: Send PDCH ACT NACK if TCH chan is still active

2018-12-14 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12180 )

Change subject: rsl: Send PDCH ACT NACK if TCH chan is still active
..


Patch Set 1:

ping for +2


--
To view, visit https://gerrit.osmocom.org/12180
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: I6d6d12aec10c801fe55012ca6e58d0bc8755b15d
Gerrit-Change-Number: 12180
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Fri, 14 Dec 2018 16:38:31 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-bsc[master]: Add VTY option to avoid sending empty Full BCCH Info for disabled SI

2018-12-14 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12133 )

Change subject: Add VTY option to avoid sending empty Full BCCH Info for 
disabled SI
..


Patch Set 3:

ping for +2


--
To view, visit https://gerrit.osmocom.org/12133
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: Idec1daabc21de4eea5c55edd1dbb0e0775720fc7
Gerrit-Change-Number: 12133
Gerrit-PatchSet: 3
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 14 Dec 2018 16:38:21 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-trx[master]: configure.ac: check boost only if USRP1 support is enabled

2018-12-14 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12088 )

Change subject: configure.ac: check boost only if USRP1 support is enabled
..


Patch Set 1:

ping for +2


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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4c3fa3ff58fd552d0cb4c4cf2033615d84c07c96
Gerrit-Change-Number: 12088
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-CC: Neels Hofmeyr 
Gerrit-Comment-Date: Fri, 14 Dec 2018 16:38:13 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-sysmon[master]: Use absolute path for default config

2018-12-14 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12319 )

Change subject: Use absolute path for default config
..


Patch Set 1:

> > Patch Set 1: Code-Review-1
 > >
 > > As far as I can tell, in all repos we have default cfg_file as
 > $CWD/*.cfg, so I'd rather keep same behavior for all osmocom
 > projects.
 > >
 > > Another discussion is whether we want to move all osmocom
 > projects to have /etc/osmocom/*.cfg by default. It'd then make
 > sense to by default check first $CWD and if not found look for
 > /etc/osmocom, to maintain it backwards-compatible.
 > 
 > The plan is to use this as login shell and I'm not sure what's $CWD
 > in this case so it's better to use absolute path.

Login shell has already been added through a script, so no issue with that. 
Let's keep the default file like in all other osmocom projects.


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

Gerrit-Project: osmo-sysmon
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I37c559af99872de9290335699e2118924ae2156a
Gerrit-Change-Number: 12319
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Fri, 14 Dec 2018 16:00:41 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-sysmon[master]: Use absolute path for default config

2018-12-14 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/12319 )

Change subject: Use absolute path for default config
..


Patch Set 1:

> Patch Set 1: Code-Review-1
>
> As far as I can tell, in all repos we have default cfg_file as $CWD/*.cfg, so 
> I'd rather keep same behavior for all osmocom projects.
>
> Another discussion is whether we want to move all osmocom projects to have 
> /etc/osmocom/*.cfg by default. It'd then make sense to by default check first 
> $CWD and if not found look for /etc/osmocom, to maintain it 
> backwards-compatible.

The plan is to use this as login shell and I'm not sure what's $CWD in this 
case so it's better to use absolute path.


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

Gerrit-Project: osmo-sysmon
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I37c559af99872de9290335699e2118924ae2156a
Gerrit-Change-Number: 12319
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Fri, 14 Dec 2018 15:58:42 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-sysmon[master]: Use absolute path for default config

2018-12-14 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12319 )

Change subject: Use absolute path for default config
..


Patch Set 1: Code-Review-1

As far as I can tell, in all repos we have default cfg_file as $CWD/*.cfg, so 
I'd rather keep same behavior for all osmocom projects.

Another discussion is whether we want to move all osmocom projects to have 
/etc/osmocom/*.cfg by default. It'd then make sense to by default check first 
$CWD and if not found look for /etc/osmocom, to maintain it 
backwards-compatible.


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

Gerrit-Project: osmo-sysmon
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I37c559af99872de9290335699e2118924ae2156a
Gerrit-Change-Number: 12319
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Fri, 14 Dec 2018 15:55:43 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-sysmon[master]: Use absolute path for default config

2018-12-14 Thread Max
Max has uploaded this change for review. ( https://gerrit.osmocom.org/12319


Change subject: Use absolute path for default config
..

Use absolute path for default config

Change-Id: I37c559af99872de9290335699e2118924ae2156a
Related: SYS#2655
---
M src/osysmon_main.c
1 file changed, 1 insertion(+), 1 deletion(-)



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

diff --git a/src/osysmon_main.c b/src/osysmon_main.c
index 486ee8f..caa25d8 100644
--- a/src/osysmon_main.c
+++ b/src/osysmon_main.c
@@ -130,7 +130,7 @@
const char *config_file;
bool daemonize;
 } cmdline_opts = {
-   .config_file = "osmo-sysmon.cfg",
+   .config_file = "/etc/osmocom/osmo-sysmon.cfg",
.daemonize = false,
 };


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

Gerrit-Project: osmo-sysmon
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I37c559af99872de9290335699e2118924ae2156a
Gerrit-Change-Number: 12319
Gerrit-PatchSet: 1
Gerrit-Owner: Max 


Change in osmo-sysmon[master]: ctrl: log host/port on errors

2018-12-14 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/12318 )

Change subject: ctrl: log host/port on errors
..


Patch Set 1:

> Patch Set 1: Code-Review-1
>
> I feel this entire patchset breaks layering.  The simple_ctrl_client doesnt 
> have a configuration. the configuration is part of the main program. but now 
> you're passing the configuration around everywhere, adding additional 
> arguments to the functions, making them introspect somethin that's not theirs.

What would be the right approach to make host:port available for logging than?


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

Gerrit-Project: osmo-sysmon
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I788d51359965a66c54075a3971aa7824c3bfb0bf
Gerrit-Change-Number: 12318
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Comment-Date: Fri, 14 Dec 2018 15:20:39 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-ttcn3-hacks[master]: library/GSUP_Types.ttcn: actualize both GSUP_SM_RP_{DA|OA}

2018-12-14 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/12304 )

Change subject: library/GSUP_Types.ttcn: actualize both GSUP_SM_RP_{DA|OA}
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/12304
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: I001cec53a80028ff153db3d8b0318b298f2bd8c2
Gerrit-Change-Number: 12304
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Comment-Date: Fri, 14 Dec 2018 15:18:41 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-sysmon[master]: ctrl: log host/port on errors

2018-12-14 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/12318 )

Change subject: ctrl: log host/port on errors
..


Patch Set 1: Code-Review-1

I feel this entire patchset breaks layering.  The simple_ctrl_client doesnt 
have a configuration. the configuration is part of the main program. but now 
you're passing the configuration around everywhere, adding additional arguments 
to the functions, making them introspect somethin that's not theirs.


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

Gerrit-Project: osmo-sysmon
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I788d51359965a66c54075a3971aa7824c3bfb0bf
Gerrit-Change-Number: 12318
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 14 Dec 2018 15:17:16 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-sysmon[master]: ctrl: pass config struct to all simple_ctrl_*()

2018-12-14 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/12317 )

Change subject: ctrl: pass config struct to all simple_ctrl_*()
..


Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/12317/1/src/simple_ctrl.c
File src/simple_ctrl.c:

https://gerrit.osmocom.org/#/c/12317/1/src/simple_ctrl.c@243
PS1, Line 243: const struct ctrl_cfg *cfg, struct simple_ctrl_handle *sch
I'm sorry, but this is absolutely not an improvement to me.  If you need the 
config from the handle, make the handle point to the config.  Adding one extra 
argument to almost each function in the entire module is not an improvement.



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

Gerrit-Project: osmo-sysmon
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I783dda27dfc5fd57401d971b2e970ede0efc7b2c
Gerrit-Change-Number: 12317
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 14 Dec 2018 15:15:15 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-trx[master]: lms: Fix build against LimeSuite > 18.10

2018-12-14 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12303 )

Change subject: lms: Fix build against LimeSuite > 18.10
..

lms: Fix build against LimeSuite > 18.10

LimeSuite dc124e4e2ed9b549b142410af172f0592f9f0c23 > 18.10 broke API
compatibility.

OS#3729
Change-Id: Idf500a5b39a857233f728c6a4316c00a99374556
---
M Transceiver52M/device/lms/LMSDevice.cpp
M configure.ac
2 files changed, 34 insertions(+), 2 deletions(-)

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



diff --git a/Transceiver52M/device/lms/LMSDevice.cpp 
b/Transceiver52M/device/lms/LMSDevice.cpp
index 270bd4a..b004308 100644
--- a/Transceiver52M/device/lms/LMSDevice.cpp
+++ b/Transceiver52M/device/lms/LMSDevice.cpp
@@ -41,6 +41,24 @@
 #define LMS_MIN_BW_SUPPORTED 2.5e6 /* 2.5mHz, minimum supported by LMS */
 #define LMS_CALIBRATE_BW_HZ OSMO_MAX(GSM_CARRIER_BW, LMS_MIN_BW_SUPPORTED)

+static int compat_LMS_VCTCXORead(lms_device_t *dev, uint16_t *val, bool memory)
+{
+#if HAVE_LMS_VCTCXO_EEPROM_SAVING
+   return LMS_VCTCXORead(dev, val, memory);
+#else
+   return LMS_VCTCXORead(dev, val);
+#endif
+}
+
+static int compat_LMS_VCTCXOWrite(lms_device_t *dev, uint16_t val, bool memory)
+{
+#if HAVE_LMS_VCTCXO_EEPROM_SAVING
+   return LMS_VCTCXOWrite(dev, val, memory);
+#else
+   return LMS_VCTCXOWrite(dev, val);
+#endif
+}
+
 LMSDevice::LMSDevice(size_t tx_sps, size_t rx_sps, InterfaceType iface, size_t 
chans, double lo_offset,
 const std::vector& tx_paths,
 const std::vector& rx_paths):
@@ -195,10 +213,10 @@
case REF_INTERNAL:
LOGC(DDEV, INFO) << "Setting Internal clock reference";
/* Ugly API: Selecting clock source implicit by writing to 
VCTCXO DAC ?!? */
-   if (LMS_VCTCXORead(m_lms_dev, _val) < 0)
+   if (compat_LMS_VCTCXORead(m_lms_dev, _val, false) < 0)
goto out_close;
LOGC(DDEV, INFO) << "Setting VCTCXO to " << dac_val;
-   if (LMS_VCTCXOWrite(m_lms_dev, dac_val) < 0)
+   if (compat_LMS_VCTCXOWrite(m_lms_dev, dac_val, false) < 0)
goto out_close;
break;
case REF_EXTERNAL:
diff --git a/configure.ac b/configure.ac
index 2e036ba..37b70fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -160,6 +160,20 @@

 AS_IF([test "x$with_lms" = "xyes"], [
 PKG_CHECK_MODULES(LMS, LimeSuite)
+
+# LimeSuite dc124e4e2ed9b549b142410af172f0592f9f0c23 > 18.10 broke API 
compatibility:
+_cflags_save=$CFLAGS
+CFLAGS="$CFLAGS $LMS_CFLAGS"
+AC_COMPILE_IFELSE(
+[AC_LANG_PROGRAM(
+[[#include ]],
+[[LMS_VCTCXOWrite(NULL, 0, false); LMS_VCTCXORead(NULL, 0, 
false);]]
+)],
+[AC_DEFINE([HAVE_LMS_VCTCXO_EEPROM_SAVING], [1],
+[LMS_VCTCXO* requires memory parameter])],
+[AC_DEFINE([HAVE_LMS_VCTCXO_EEPROM_SAVING], [0],
+[LMS_VCTCXO* has no memory parameter])])
+CFLAGS=$_cflags_save
 ])

 AS_IF([test "x$with_uhd" != "xno"],[

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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Idf500a5b39a857233f728c6a4316c00a99374556
Gerrit-Change-Number: 12303
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: osmith 


Change in osmo-sysmon[master]: ctrl: make config structure public

2018-12-14 Thread Max
Max has uploaded this change for review. ( https://gerrit.osmocom.org/12316


Change subject: ctrl: make config structure public
..

ctrl: make config structure public

Moving configuration data from anonymous struct into shared header as a
preparation for ctrl logging improvements in follow-up patches.

Change-Id: I3520e14ca6e1b8e270dbd4b1bf2378fe486991ce
Related: SYS#2655
---
M src/osysmon_ctrl.c
M src/simple_ctrl.h
2 files changed, 26 insertions(+), 19 deletions(-)



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

diff --git a/src/osysmon_ctrl.c b/src/osysmon_ctrl.c
index 25c2b4c..097e24c 100644
--- a/src/osysmon_ctrl.c
+++ b/src/osysmon_ctrl.c
@@ -38,14 +38,7 @@
 struct ctrl_client {
/* links to osysmon.ctrl_clients */
struct llist_head list;
-   struct {
-   /* name of this CTRL client */
-   const char *name;
-   /* remote host/IP */
-   const char *remote_host;
-   /* remote CTRL port */
-   uint16_t remote_port;
-   } cfg;
+   struct ctrl_cfg *cfg;
struct simple_ctrl_handle *sch;
/* list of ctrl_client_get_var objects */
struct llist_head get_vars;
@@ -69,7 +62,7 @@
 {
struct ctrl_client *cc;
llist_for_each_entry(cc, >ctrl_clients, list) {
-   if (!strcmp(name, cc->cfg.name))
+   if (!strcmp(name, cc->cfg->name))
return cc;
}
return NULL;
@@ -86,9 +79,14 @@
cc = talloc_zero(os, struct ctrl_client);
if (!cc)
return NULL;
-   cc->cfg.name = talloc_strdup(cc, name);
-   cc->cfg.remote_host = talloc_strdup(cc, host);
-   cc->cfg.remote_port = port;
+
+   cc->cfg = talloc_zero(cc, struct ctrl_cfg);
+   if (!cc->cfg)
+   return NULL;
+
+   cc->cfg->name = talloc_strdup(cc, name);
+   cc->cfg->remote_host = talloc_strdup(cc, host);
+   cc->cfg->remote_port = port;
INIT_LLIST_HEAD(>get_vars);
llist_add_tail(>list, >ctrl_clients);
/* FIXME */
@@ -163,10 +161,10 @@
struct ctrl_client *cc;
cc = ctrl_client_find(g_oss, argv[0]);
if (cc) {
-   if ((strcmp(cc->cfg.remote_host, argv[1])) ||
-   (cc->cfg.remote_port != atoi(argv[2]))) {
+   if ((strcmp(cc->cfg->remote_host, argv[1])) ||
+   (cc->cfg->remote_port != atoi(argv[2]))) {
vty_out(vty, "Client %s has different IP/port, please 
remove it first%s",
-   cc->cfg.name, VTY_NEWLINE);
+   cc->cfg->name, VTY_NEWLINE);
return CMD_WARNING;
}
} else
@@ -222,8 +220,8 @@
 static void write_one_ctrl_client(struct vty *vty, struct ctrl_client *cc)
 {
struct ctrl_client_get_var *ccgv;
-   vty_out(vty, "ctrl-client %s %s %u%s", cc->cfg.name,
-   cc->cfg.remote_host, cc->cfg.remote_port, VTY_NEWLINE);
+   vty_out(vty, "ctrl-client %s %s %u%s", cc->cfg->name,
+   cc->cfg->remote_host, cc->cfg->remote_port, VTY_NEWLINE);
llist_for_each_entry(ccgv, >get_vars, list) {
vty_out(vty, " get-variable %s%s", ccgv->cfg.name, VTY_NEWLINE);
if (ccgv->cfg.display_name)
@@ -266,11 +264,11 @@
 static int ctrl_client_poll(struct ctrl_client *cc, struct value_node *parent)
 {
struct ctrl_client_get_var *ccgv;
-   struct value_node *vn_clnt = value_node_add(parent, parent, 
cc->cfg.name, NULL);
+   struct value_node *vn_clnt = value_node_add(parent, parent, 
cc->cfg->name, NULL);

/* attempt to re-connect */
if (!cc->sch)
-   cc->sch = simple_ctrl_open(cc, cc->cfg.remote_host, 
cc->cfg.remote_port, 1000);
+   cc->sch = simple_ctrl_open(cc, cc->cfg->remote_host, 
cc->cfg->remote_port, 1000);
/* abort, if that failed */
if (!cc->sch) {
return -1;
diff --git a/src/simple_ctrl.h b/src/simple_ctrl.h
index 81a759d..f5aa770 100644
--- a/src/simple_ctrl.h
+++ b/src/simple_ctrl.h
@@ -2,6 +2,15 @@

 #include 

+struct ctrl_cfg {
+   /* name of this CTRL client */
+   const char *name;
+   /* remote host/IP */
+   const char *remote_host;
+   /* remote CTRL port */
+   uint16_t remote_port;
+};
+
 struct simple_ctrl_handle;

 struct simple_ctrl_handle *simple_ctrl_open(void *ctx, const char *host, 
uint16_t dport,

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

Gerrit-Project: osmo-sysmon
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3520e14ca6e1b8e270dbd4b1bf2378fe486991ce
Gerrit-Change-Number: 12316
Gerrit-PatchSet: 1
Gerrit-Owner: Max 


Change in osmo-sysmon[master]: ctrl: log host/port on errors

2018-12-14 Thread Max
Max has uploaded this change for review. ( https://gerrit.osmocom.org/12318


Change subject: ctrl: log host/port on errors
..

ctrl: log host/port on errors

In case of multiple ctrl-client entries in .cfg file it's impossible to
see which one is causing particular ctrl error. Fix this by introducing
macro wrapper for stderr logging which always show host:port relevant to
the error.

Change-Id: I788d51359965a66c54075a3971aa7824c3bfb0bf
Related: SYS#2655
---
M src/simple_ctrl.c
1 file changed, 18 insertions(+), 16 deletions(-)



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

diff --git a/src/simple_ctrl.c b/src/simple_ctrl.c
index 24d92b9..433f3bf 100644
--- a/src/simple_ctrl.c
+++ b/src/simple_ctrl.c
@@ -37,6 +37,8 @@

 #include "simple_ctrl.h"

+#define CTRL_ERR(c, fmt, args...) fprintf(stderr, "CTRL %s:%u error: " fmt 
"\n", c->remote_host, c->remote_port, ##args)
+
 /***
  * blocking I/O with timeout helpers
  ***/
@@ -110,7 +112,7 @@
fd = osmo_sock_init(AF_INET, SOCK_STREAM, IPPROTO_TCP, 
cfg->remote_host, cfg->remote_port,
OSMO_SOCK_F_CONNECT | OSMO_SOCK_F_NONBLOCK);
if (fd < 0) {
-   fprintf(stderr, "CTRL: error connecting socket: %s\n", 
strerror(errno));
+   CTRL_ERR(cfg, "connecting socket: %s", strerror(errno));
return NULL;
}

@@ -119,17 +121,17 @@
FD_SET(fd, );
rc = select(fd+1, NULL, , NULL, timeval_from_msec(tout_msec));
if (rc == 0) {
-   fprintf(stderr, "CTRL: timeout during connect\n");
+   CTRL_ERR(cfg, "timeout during connect");
goto out_close;
}
if (rc < 0) {
-   fprintf(stderr, "CTRL: error connecting socket: %s\n", 
strerror(errno));
+   CTRL_ERR(cfg, "error connecting socket: %s", strerror(errno));
goto out_close;
}

/* set FD blocking again */
if (ioctl(fd, FIONBIO, (unsigned char *)) < 0) {
-   fprintf(stderr, "CTRL: cannot set socket blocking: %s\n", 
strerror(errno));
+   CTRL_ERR(cfg, "cannot set socket blocking: %s", 
strerror(errno));
goto out_close;
}

@@ -156,7 +158,7 @@
talloc_free(sch);
 }

-static struct msgb *simple_ipa_receive(struct simple_ctrl_handle *sch)
+static struct msgb *simple_ipa_receive(const struct ctrl_cfg *cfg, struct 
simple_ctrl_handle *sch)
 {
struct ipaccess_head hh;
struct msgb *resp;
@@ -164,10 +166,10 @@

rc = read_timeout(sch->fd, (uint8_t *) , sizeof(hh), sch->tout_msec);
if (rc < 0) {
-   fprintf(stderr, "CTRL: Error during read: %d\n", rc);
+   CTRL_ERR(cfg, "read(): %d", rc);
return NULL;
} else if (rc < sizeof(hh)) {
-   fprintf(stderr, "CTRL: ERROR: short read (header)\n");
+   CTRL_ERR(cfg, "short read (header)");
return NULL;
}
len = ntohs(hh.len);
@@ -181,7 +183,7 @@
resp->l2h = resp->tail;
rc = read(sch->fd, resp->l2h, len);
if (rc < len) {
-   fprintf(stderr, "CTRL: ERROR: short read (payload)\n");
+   CTRL_ERR(cfg, "short read (payload)");
msgb_free(resp);
return NULL;
}
@@ -199,7 +201,7 @@

/* loop until we've received a CTRL message */
while (true) {
-   resp = simple_ipa_receive(sch);
+   resp = simple_ipa_receive(cfg, sch);
if (!resp)
return NULL;

@@ -213,13 +215,13 @@
*tmp = '\0';
return resp;
} else {
-   fprintf(stderr, "unknown IPA message %s\n", 
msgb_hexdump(resp));
+   CTRL_ERR(cfg, "unknown IPA message %s", 
msgb_hexdump(resp));
msgb_free(resp);
}
}
 }

-static int simple_ctrl_send(struct simple_ctrl_handle *sch, struct msgb *msg)
+static int simple_ctrl_send(const struct ctrl_cfg *cfg, struct 
simple_ctrl_handle *sch, struct msgb *msg)
 {
int rc;

@@ -228,10 +230,10 @@

rc = write_timeout(sch->fd, msg->data, msg->len, sch->tout_msec);
if (rc < 0) {
-   fprintf(stderr, "CTRL: Error during write: %d\n", rc);
+   CTRL_ERR(cfg, "write(): %d", rc);
return rc;
} else if (rc < msg->len) {
-   fprintf(stderr, "CTRL: ERROR: short write\n");
+   CTRL_ERR(cfg, "short write");
msgb_free(msg);
return -1;
} else {
@@ -244,7 +246,7 @@
 {
int rc;

-   rc = simple_ctrl_send(sch, msg);
+   rc = simple_ctrl_send(cfg, sch, 

Change in osmo-trx[master]: lms: Fix build against LimeSuite > 18.10

2018-12-14 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/12303 )

Change subject: lms: Fix build against LimeSuite > 18.10
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf500a5b39a857233f728c6a4316c00a99374556
Gerrit-Change-Number: 12303
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Fri, 14 Dec 2018 15:12:54 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-sysmon[master]: ctrl: pass config struct to all simple_ctrl_*()

2018-12-14 Thread Max
Max has uploaded this change for review. ( https://gerrit.osmocom.org/12317


Change subject: ctrl: pass config struct to all simple_ctrl_*()
..

ctrl: pass config struct to all simple_ctrl_*()

Make basic logging-related information available to simple_ctrl_*()
functions.

Change-Id: I783dda27dfc5fd57401d971b2e970ede0efc7b2c
Related: SYS#2655
---
M src/osmo-ctrl-client.c
M src/osysmon_ctrl.c
M src/simple_ctrl.c
M src/simple_ctrl.h
4 files changed, 22 insertions(+), 25 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sysmon refs/changes/17/12317/1

diff --git a/src/osmo-ctrl-client.c b/src/osmo-ctrl-client.c
index 83e9b7b..6a196eb 100644
--- a/src/osmo-ctrl-client.c
+++ b/src/osmo-ctrl-client.c
@@ -45,19 +45,18 @@
 int main(int argc, char **argv)
 {
struct simple_ctrl_handle *sch;
-   const char *host;
-   uint16_t port;
+   struct ctrl_cfg cfg = { .name = "osmo-ctrl-client" };
int rc;

if (argc < 4)
exit_help();

-   host = argv[1];
-   port = atoi(argv[2]);
+   cfg.remote_host = argv[1];
+   cfg.remote_port = atoi(argv[2]);

osmo_init_logging2(NULL, _info);

-   sch = simple_ctrl_open(NULL, host, port, 1000);
+   sch = simple_ctrl_open(NULL, , 1000);
if (!sch)
exit(1);

@@ -65,20 +64,20 @@
char *val;
if (argc < 5)
exit_help();
-   val = simple_ctrl_get(sch, argv[4]);
+   val = simple_ctrl_get(, sch, argv[4]);
if (!val)
exit(2);
printf("%s\n", val);
} else if (!strcmp(argv[3], "set")) {
if (argc < 6)
exit_help();
-   rc = simple_ctrl_set(sch, argv[4], argv[5]);
+   rc = simple_ctrl_set(, sch, argv[4], argv[5]);
if (rc < 0)
exit(1);
} else if (!strcmp(argv[3], "monitor")) {
simple_ctrl_set_timeout(sch, 0);
while (true) {
-   struct msgb *msg = simple_ctrl_receive(sch);
+   struct msgb *msg = simple_ctrl_receive(, sch);
if (!msg)
exit(1);
printf("%s", (char *) msgb_l2(msg));
diff --git a/src/osysmon_ctrl.c b/src/osysmon_ctrl.c
index 097e24c..bcab94c 100644
--- a/src/osysmon_ctrl.c
+++ b/src/osysmon_ctrl.c
@@ -268,14 +268,14 @@

/* attempt to re-connect */
if (!cc->sch)
-   cc->sch = simple_ctrl_open(cc, cc->cfg->remote_host, 
cc->cfg->remote_port, 1000);
+   cc->sch = simple_ctrl_open(cc, cc->cfg, 1000);
/* abort, if that failed */
if (!cc->sch) {
return -1;
}

llist_for_each_entry(ccgv, >get_vars, list) {
-   char *value = simple_ctrl_get(cc->sch, ccgv->cfg.name);
+   char *value = simple_ctrl_get(cc->cfg, cc->sch, ccgv->cfg.name);

/* FIXME: Distinguish between ERROR reply and
 * connection issues */
diff --git a/src/simple_ctrl.c b/src/simple_ctrl.c
index 2261323..24d92b9 100644
--- a/src/simple_ctrl.c
+++ b/src/simple_ctrl.c
@@ -100,15 +100,14 @@
uint32_t tout_msec;
 };

-struct simple_ctrl_handle *simple_ctrl_open(void *ctx, const char *host, 
uint16_t dport,
-   uint32_t tout_msec)
+struct simple_ctrl_handle *simple_ctrl_open(void *ctx, const struct ctrl_cfg 
*cfg, uint32_t tout_msec)
 {
struct simple_ctrl_handle *sch;
fd_set writeset;
int off = 0;
int rc, fd;

-   fd = osmo_sock_init(AF_INET, SOCK_STREAM, IPPROTO_TCP, host, dport,
+   fd = osmo_sock_init(AF_INET, SOCK_STREAM, IPPROTO_TCP, 
cfg->remote_host, cfg->remote_port,
OSMO_SOCK_F_CONNECT | OSMO_SOCK_F_NONBLOCK);
if (fd < 0) {
fprintf(stderr, "CTRL: error connecting socket: %s\n", 
strerror(errno));
@@ -191,7 +190,7 @@
return resp;
 }

-struct msgb *simple_ctrl_receive(struct simple_ctrl_handle *sch)
+struct msgb *simple_ctrl_receive(const struct ctrl_cfg *cfg, struct 
simple_ctrl_handle *sch)
 {
struct msgb *resp;
struct ipaccess_head *ih;
@@ -241,7 +240,7 @@
}
 }

-static struct msgb *simple_ctrl_xceive(struct simple_ctrl_handle *sch, struct 
msgb *msg)
+static struct msgb *simple_ctrl_xceive(const struct ctrl_cfg *cfg, struct 
simple_ctrl_handle *sch, struct msgb *msg)
 {
int rc;

@@ -250,10 +249,10 @@
return NULL;

/* FIXME: ignore any TRAP */
-   return simple_ctrl_receive(sch);
+   return simple_ctrl_receive(cfg, sch);
 }

-char *simple_ctrl_get(struct simple_ctrl_handle *sch, const char *var)
+char *simple_ctrl_get(const struct ctrl_cfg *cfg, struct simple_ctrl_handle 
*sch, const char *var)
 {
   

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

2018-12-14 Thread jenkins
See 


--
[...truncated 2.10 KB...]

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

Change in osmo-trx[master]: lms: Fix build against LimeSuite > 18.10

2018-12-14 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/12303 )

Change subject: lms: Fix build against LimeSuite > 18.10
..


Patch Set 1: Verified+1


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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf500a5b39a857233f728c6a4316c00a99374556
Gerrit-Change-Number: 12303
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Fri, 14 Dec 2018 14:35:28 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: libmsc/gsm_09_11.c: implement guard timer for NCSS sessions

2018-12-14 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/11992 )

Change subject: libmsc/gsm_09_11.c: implement guard timer for NCSS sessions
..


Patch Set 7:

(1 comment)

https://gerrit.osmocom.org/#/c/11992/7/include/osmocom/msc/gsm_data.h
File include/osmocom/msc/gsm_data.h:

https://gerrit.osmocom.org/#/c/11992/7/include/osmocom/msc/gsm_data.h@188
PS7, Line 188:  int ncss_guard_timeout;
> Same as mncc_guard_timeout. Integer is expected by libosmocore: […]
If that's the only reason than it's better to use uint8_t (which can be casted 
to int without any issues) to keep it consistent with vty code.



--
To view, visit https://gerrit.osmocom.org/11992
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: Icf4d87c45e90324764073e8230e0fb9cb96dd9cb
Gerrit-Change-Number: 11992
Gerrit-PatchSet: 7
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 14 Dec 2018 14:29:43 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-ttcn3-hacks[master]: MSC_Tests.ttcn: introduce TC_gsup_mt_sms_{ack|err}

2018-12-14 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/11924 )

Change subject: MSC_Tests.ttcn: introduce TC_gsup_mt_sms_{ack|err}
..


Patch Set 4:

(1 comment)

https://gerrit.osmocom.org/#/c/11924/4/msc/MSC_Tests.ttcn
File msc/MSC_Tests.ttcn:

https://gerrit.osmocom.org/#/c/11924/4/msc/MSC_Tests.ttcn@2158
PS4, Line 2158: sm_rp_da := 
valueof(ts_GSUP_SM_RP_DA_MSISDN(g_pars.msisdn)),
> I still had reservations about OA,DA encoding in that libosmocore patch...
Done, see https://gerrit.osmocom.org/#/c/osmo-ttcn3-hacks/+/12304/.



--
To view, visit https://gerrit.osmocom.org/11924
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: I63a25c8366cce0852df6b628365151661a22a25f
Gerrit-Change-Number: 11924
Gerrit-PatchSet: 4
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Holger Freyther 
Gerrit-Comment-Date: Fri, 14 Dec 2018 14:23:28 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-ttcn3-hacks[master]: library/GSUP_Types.ttcn: actualize both GSUP_SM_RP_{DA|OA}

2018-12-14 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/12304


Change subject: library/GSUP_Types.ttcn: actualize both GSUP_SM_RP_{DA|OA}
..

library/GSUP_Types.ttcn: actualize both GSUP_SM_RP_{DA|OA}

Both GSUP_SM_RP_{DA|OA} IE definitions have been merged before
the reference implementation in libosmocore. Recently it was
decided to use the following structure:

  IEI | IE length | ID type | ID encoded data (optional)

instead of:

  IEI | IE length | ID type | ID length | ID encoded data (optional)

so, let's remove ID length from both definitions.

Change-Id: I001cec53a80028ff153db3d8b0318b298f2bd8c2
---
M library/GSUP_Types.ttcn
1 file changed, 2 insertions(+), 20 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/04/12304/1

diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn
index d16b4a5..6cc6dde 100644
--- a/library/GSUP_Types.ttcn
+++ b/library/GSUP_Types.ttcn
@@ -701,10 +701,8 @@

 type record GSUP_SM_RP_DA {
GSUP_SM_RP_ODA_IdType   id_type,
-   uint8_t id_len,
GSUP_SM_RP_DA_IDid_enc optional
-} with { variant (id_len) "LENGTHTO(id_enc)"
-variant (id_enc) "CROSSTAG(
+} with { variant (id_enc) "CROSSTAG(
imsi, id_type = OSMO_GSUP_SM_RP_ODA_ID_IMSI;
msisdn, id_type = OSMO_GSUP_SM_RP_ODA_ID_MSISDN;
smsc_addr, id_type = OSMO_GSUP_SM_RP_ODA_ID_SMSC_ADDR;
@@ -714,45 +712,37 @@

 template (value) GSUP_SM_RP_DA ts_GSUP_SM_RP_DA_IMSI(hexstring imsi) := {
id_type := OSMO_GSUP_SM_RP_ODA_ID_IMSI,
-   id_len := 0, /* overwritten */
id_enc := { imsi := imsi }
 }
 template GSUP_SM_RP_DA tr_GSUP_SM_RP_DA_IMSI(template hexstring imsi) := {
id_type := OSMO_GSUP_SM_RP_ODA_ID_IMSI,
-   id_len := ?,
id_enc := { imsi := imsi }
 }

 template (value) GSUP_SM_RP_DA ts_GSUP_SM_RP_DA_MSISDN(hexstring msisdn) := {
id_type := OSMO_GSUP_SM_RP_ODA_ID_MSISDN,
-   id_len := 0, /* overwritten */
id_enc := { msisdn := msisdn }
 }
 template GSUP_SM_RP_DA tr_GSUP_SM_RP_DA_MSISDN(template hexstring msisdn) := {
id_type := OSMO_GSUP_SM_RP_ODA_ID_MSISDN,
-   id_len := ?,
id_enc := { msisdn := msisdn }
 }

 template (value) GSUP_SM_RP_DA ts_GSUP_SM_RP_DA_SMSC_ADDR(hexstring smsc_addr) 
:= {
id_type := OSMO_GSUP_SM_RP_ODA_ID_SMSC_ADDR,
-   id_len := 0, /* overwritten */
id_enc := { smsc_addr := smsc_addr }
 }
 template GSUP_SM_RP_DA tr_GSUP_SM_RP_DA_SMSC_ADDR(template hexstring 
smsc_addr) := {
id_type := OSMO_GSUP_SM_RP_ODA_ID_SMSC_ADDR,
-   id_len := ?,
id_enc := { smsc_addr := smsc_addr }
 }

 template (value) GSUP_SM_RP_DA ts_GSUP_SM_RP_DA_NULL := {
id_type := OSMO_GSUP_SM_RP_ODA_ID_NULL,
-   id_len := 0, /* overwritten */
id_enc := omit
 }
 template GSUP_SM_RP_DA tr_GSUP_SM_RP_DA_NULL := {
id_type := OSMO_GSUP_SM_RP_ODA_ID_NULL,
-   id_len := ?,
id_enc := omit
 }

@@ -784,10 +774,8 @@

 type record GSUP_SM_RP_OA {
GSUP_SM_RP_ODA_IdType   id_type,
-   uint8_t id_len,
GSUP_SM_RP_OA_IDid_enc optional
-} with { variant (id_len) "LENGTHTO(id_enc)"
-variant (id_enc) "CROSSTAG(
+} with { variant (id_enc) "CROSSTAG(
msisdn, id_type = OSMO_GSUP_SM_RP_ODA_ID_MSISDN;
smsc_addr, id_type = OSMO_GSUP_SM_RP_ODA_ID_SMSC_ADDR;
/* FIXME: how to handle noSM-RP-OA? */
@@ -796,34 +784,28 @@

 template (value) GSUP_SM_RP_OA ts_GSUP_SM_RP_OA_MSISDN(hexstring msisdn) := {
id_type := OSMO_GSUP_SM_RP_ODA_ID_MSISDN,
-   id_len := 0, /* overwritten */
id_enc := { msisdn := msisdn }
 }
 template GSUP_SM_RP_OA tr_GSUP_SM_RP_OA_MSISDN(template hexstring msisdn) := {
id_type := OSMO_GSUP_SM_RP_ODA_ID_MSISDN,
-   id_len := ?,
id_enc := { msisdn := msisdn }
 }

 template (value) GSUP_SM_RP_OA ts_GSUP_SM_RP_OA_SMSC_ADDR(hexstring smsc_addr) 
:= {
id_type := OSMO_GSUP_SM_RP_ODA_ID_SMSC_ADDR,
-   id_len := 0, /* overwritten */
id_enc := { smsc_addr := smsc_addr }
 }
 template GSUP_SM_RP_OA tr_GSUP_SM_RP_OA_SMSC_ADDR(template hexstring 
smsc_addr) := {
id_type := OSMO_GSUP_SM_RP_ODA_ID_SMSC_ADDR,
-   id_len := ?,
id_enc := { smsc_addr := smsc_addr }
 }

 template (value) GSUP_SM_RP_OA ts_GSUP_SM_RP_OA_NULL := {
id_type := OSMO_GSUP_SM_RP_ODA_ID_NULL,
-   id_len := 0, /* overwritten */
id_enc := omit
 }
 template GSUP_SM_RP_OA tr_GSUP_SM_RP_OA_NULL := {
id_type := OSMO_GSUP_SM_RP_ODA_ID_NULL,
-   id_len := ?,
id_enc := omit
 }


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange

Change in osmo-trx[master]: lms: Fix build against LimeSuite > 18.10

2018-12-14 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/12303 )

Change subject: lms: Fix build against LimeSuite > 18.10
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf500a5b39a857233f728c6a4316c00a99374556
Gerrit-Change-Number: 12303
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 14 Dec 2018 14:01:12 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: libmsc/gsm_04_80.c: HACK: reimplement GSM 04.08 RELEASE COMPLETE

2018-12-14 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/11991 )

Change subject: libmsc/gsm_04_80.c: HACK: reimplement GSM 04.08 RELEASE COMPLETE
..


Patch Set 4:

> yeah, rather add an updated libosmocore api as in earlier comment

Ideally, the new API should allow to specify optional Cause IE...
I have no time to fight with libosmocore's GSM 04.80 API anymore.

I was working on SS/USSD timeout feature just for fun. If anyone
really needs this feature to be merged soon, feel free to dive
into the freakish libosmocore's GSM 04.80 API.


--
To view, visit https://gerrit.osmocom.org/11991
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: I89727354385b40e18732e8fd1d6c93f4463ade37
Gerrit-Change-Number: 11991
Gerrit-PatchSet: 4
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 14 Dec 2018 13:47:10 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-msc[master]: libmsc/gsm_09_11.c: implement guard timer for NCSS sessions

2018-12-14 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/11992 )

Change subject: libmsc/gsm_09_11.c: implement guard timer for NCSS sessions
..


Patch Set 7:

(3 comments)

https://gerrit.osmocom.org/#/c/11992/7/include/osmocom/msc/gsm_data.h
File include/osmocom/msc/gsm_data.h:

https://gerrit.osmocom.org/#/c/11992/7/include/osmocom/msc/gsm_data.h@188
PS7, Line 188:  int ncss_guard_timeout;
> Why do you use int in here?
Same as mncc_guard_timeout. Integer is expected by libosmocore:

  void osmo_timer_schedule(struct osmo_timer_list *timer, int seconds, int 
microseconds);

We can change it in a separate change. Not critical.


https://gerrit.osmocom.org/#/c/11992/7/src/libmsc/gsm_09_11.c
File src/libmsc/gsm_09_11.c:

https://gerrit.osmocom.org/#/c/11992/7/src/libmsc/gsm_09_11.c@477
PS7, Line 477:  if (net->ncss_guard_timeout > 0) {
> Seems like we always check ncss_guard_timeout > 0
Because it's optional. What's wrong with that?


https://gerrit.osmocom.org/#/c/11992/7/src/libmsc/msc_vty.c
File src/libmsc/msc_vty.c:

https://gerrit.osmocom.org/#/c/11992/7/src/libmsc/msc_vty.c@382
PS7, Line 382:   "guard timer value (sec.), or 0 to disable\n")
> So ncss_guard_timeout is always positive and fit into uint8_t.
Please see my comment above.



--
To view, visit https://gerrit.osmocom.org/11992
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: Icf4d87c45e90324764073e8230e0fb9cb96dd9cb
Gerrit-Change-Number: 11992
Gerrit-PatchSet: 7
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 14 Dec 2018 13:34:46 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-hlr[master]: gsupclient: add osmo_gsup_msg_enc_send()

2018-12-14 Thread Vadim Yanitskiy
Hello Stefan Sperling, Max, Neels Hofmeyr, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/11989

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

Change subject: gsupclient: add osmo_gsup_msg_enc_send()
..

gsupclient: add osmo_gsup_msg_enc_send()

Several parts of OsmoMSC (e.g. GSM 04.11, 09.11, etc.) are dealing
with GSUP message encoding and sending towards OsmoHLR. In order
to avoid code duplication, let's have a shared function here.

Change-Id: I0589ff27933e9bca2bcf93b8259004935778db8f
---
M include/osmocom/gsupclient/gsup_client.h
M src/gsupclient/gsup_client.c
2 files changed, 39 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/89/11989/5
--
To view, visit https://gerrit.osmocom.org/11989
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0589ff27933e9bca2bcf93b8259004935778db8f
Gerrit-Change-Number: 11989
Gerrit-PatchSet: 5
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-hlr[master]: gsupclient: add osmo_gsup_msg_enc_send()

2018-12-14 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/11989 )

Change subject: gsupclient: add osmo_gsup_msg_enc_send()
..


Patch Set 4:

(3 comments)

https://gerrit.osmocom.org/#/c/11989/4/src/gsupclient/gsup_client.c
File src/gsupclient/gsup_client.c:

https://gerrit.osmocom.org/#/c/11989/4/src/gsupclient/gsup_client.c@366
PS4, Line 366:  *  \returns 0 in case of success, otherwise errno
> Errno is positive and we return negative I believe - better state that 
> explicitly.
Ok.


https://gerrit.osmocom.org/#/c/11989/4/src/gsupclient/gsup_client.c@381
PS4, Line 381:  if (rc) {
> to make reading code easier.

Easier? I don't think the current version is complicated.


https://gerrit.osmocom.org/#/c/11989/4/src/gsupclient/gsup_client.c@387
PS4, Line 387:  if (rc) {
> And here too.
And here too. It's a common practice to expect 0 and nothing else.



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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0589ff27933e9bca2bcf93b8259004935778db8f
Gerrit-Change-Number: 11989
Gerrit-PatchSet: 4
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 14 Dec 2018 13:21:10 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-gsm-manuals[master]: chapters/gsup.adoc: document MO-/MT-forwardSM messages

2018-12-14 Thread Vadim Yanitskiy
Hello Neels Hofmeyr, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/11836

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

Change subject: chapters/gsup.adoc: document MO-/MT-forwardSM messages
..

chapters/gsup.adoc: document MO-/MT-forwardSM messages

Change-Id: Ie0150756c33c1352bc4eb49421824542c711175c
Related Change-Id: (core) Ibe325c64ae2d6c626b232533bb4cbc65fc2b5d71
Related Change-Id: (TTCN) Ibf49474a81235096c032ea21f217170f523bd94e
Related: OS#3587
---
M common/chapters/gsup.adoc
1 file changed, 214 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/36/11836/6
--
To view, visit https://gerrit.osmocom.org/11836
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie0150756c33c1352bc4eb49421824542c711175c
Gerrit-Change-Number: 11836
Gerrit-PatchSet: 6
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Stefan Sperling 


Change in osmo-gsm-manuals[master]: chapters/gsup.adoc: document READY-FOR-SM message

2018-12-14 Thread Vadim Yanitskiy
Hello Stefan Sperling, Neels Hofmeyr, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/11837

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

Change subject: chapters/gsup.adoc: document READY-FOR-SM message
..

chapters/gsup.adoc: document READY-FOR-SM message

Change-Id: I549b6c8840a1e86caac09e77fb8bc5042d939e62
Related Change-Id: (core) Ic37f3b2114b8095cfce22977e67133b9103942e3
Related Change-Id: (TTCN) If2256607527ecfcb10285583332fb8b0515d7c78
Related: OS#3587
---
M common/chapters/gsup.adoc
1 file changed, 74 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/37/11837/7
--
To view, visit https://gerrit.osmocom.org/11837
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I549b6c8840a1e86caac09e77fb8bc5042d939e62
Gerrit-Change-Number: 11837
Gerrit-PatchSet: 7
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in libosmocore[master]: LCLS: add gsm0808_create_ass2()

2018-12-14 Thread Max
Max has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11826 )

Change subject: LCLS: add gsm0808_create_ass2()
..

LCLS: add gsm0808_create_ass2()

It allows setting additional assignment parameters explicitly.

Change-Id: Id89765df3f8c12f55f73f1d7a9d90c8883eb3bba
Related: OS#2487
---
M include/osmocom/gsm/gsm0808.h
M src/gsm/gsm0808.c
M src/gsm/libosmogsm.map
M tests/gsm0808/gsm0808_test.c
M tests/gsm0808/gsm0808_test.ok
5 files changed, 133 insertions(+), 6 deletions(-)

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



diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h
index e3fb6ad..79d89e5 100644
--- a/include/osmocom/gsm/gsm0808.h
+++ b/include/osmocom/gsm/gsm0808.h
@@ -64,6 +64,12 @@
const struct sockaddr_storage *ss,
const struct gsm0808_speech_codec_list *scl,
const uint32_t *ci);
+struct msgb *gsm0808_create_ass2(const struct gsm0808_channel_type *ct,
+const uint16_t *cic,
+const struct sockaddr_storage *ss,
+const struct gsm0808_speech_codec_list *scl,
+const uint32_t *ci,
+const uint8_t *kc, const struct osmo_lcls 
*lcls);
 struct msgb *gsm0808_create_ass_compl(uint8_t rr_cause, uint8_t chosen_channel,
  uint8_t encr_alg_id, uint8_t speech_mode,
  const struct sockaddr_storage *ss,
diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c
index e951ab1..69da57d 100644
--- a/src/gsm/gsm0808.c
+++ b/src/gsm/gsm0808.c
@@ -425,18 +425,22 @@
return msg;
 }

-/*! Create BSSMAP Assignment Request message, 3GPP TS 48.008 §3.2.1.1
+/*! Create BSSMAP Assignment Request message, 3GPP TS 48.008 §3.2.1.1.
+ *  This is identical to gsm0808_create_ass(), but adds KC and LCLS IEs.
  *  \param[in] ct Channel Type
  *  \param[in] cic Circuit Identity Code (Classic A only)
  *  \param[in] ss Socket Address of MSC-side RTP socket (AoIP only)
  *  \param[in] scl Speech Codec List (AoIP only)
  *  \param[in] ci Call Identifier (Optional), §3.2.2.105
+ *  \param[in] kc Kc128 ciphering key (Optional, A5/4), §3.2.2.109
+ *  \param[in] lcls Optional LCLS parameters
  *  \returns callee-allocated msgb with BSSMAP Assignment Request message */
-struct msgb *gsm0808_create_ass(const struct gsm0808_channel_type *ct,
-   const uint16_t *cic,
-   const struct sockaddr_storage *ss,
-   const struct gsm0808_speech_codec_list *scl,
-   const uint32_t *ci)
+struct msgb *gsm0808_create_ass2(const struct gsm0808_channel_type *ct,
+const uint16_t *cic,
+const struct sockaddr_storage *ss,
+const struct gsm0808_speech_codec_list *scl,
+const uint32_t *ci,
+const uint8_t *kc, const struct osmo_lcls 
*lcls)
 {
/* See also: 3GPP TS 48.008 3.2.1.1 ASSIGNMENT REQUEST */
struct msgb *msg;
@@ -481,6 +485,27 @@
  (uint8_t *) & ci_sw);
}

+   if (kc)
+   msgb_tv_fixed_put(msg, GSM0808_IE_KC_128, 16, kc);
+
+   if (lcls) {
+   /* LCLS: §3.2.2.115 Global Call Reference */
+   if (lcls->gcr)
+   gsm0808_enc_gcr(msg, lcls->gcr);
+
+   /* LCLS: §3.2.2.116 Configuration */
+   if (lcls->config != GSM0808_LCLS_CFG_NA)
+   msgb_tv_put(msg, GSM0808_IE_LCLS_CONFIG, lcls->config);
+
+   /* LCLS: §3.2.2.117 Connection Status Control */
+   if (lcls->control != GSM0808_LCLS_CSC_NA)
+   msgb_tv_put(msg, GSM0808_IE_LCLS_CONN_STATUS_CTRL, 
lcls->control);
+
+   /* LCLS: §3.2.2.118 Correlation-Not-Needed */
+   if (!lcls->corr_needed)
+   msgb_v_put(msg, GSM0808_IE_LCLS_CORR_NOT_NEEDED);
+   }
+
/* push the bssmap header */
msg->l3h =
msgb_tv_push(msg, BSSAP_MSG_BSS_MANAGEMENT, msgb_length(msg));
@@ -488,6 +513,22 @@
return msg;
 }

+/*! Create BSSMAP Assignment Request message, 3GPP TS 48.008 §3.2.1.1.
+ *  \param[in] ct Channel Type
+ *  \param[in] cic Circuit Identity Code (Classic A only)
+ *  \param[in] ss Socket Address of MSC-side RTP socket (AoIP only)
+ *  \param[in] scl Speech Codec List (AoIP only)
+ *  \param[in] ci Call Identifier (Optional), §3.2.2.105
+ *  \returns callee-allocated msgb with BSSMAP Assignment Request message */
+struct msgb 

Change in libosmocore[master]: LCLS, TS 48.008: add GCR IE encoding/decoding

2018-12-14 Thread Max
Max has removed a vote on this change.

Change subject: LCLS, TS 48.008: add GCR IE encoding/decoding
..


Removed Code-Review+2 by Max 
--
To view, visit https://gerrit.osmocom.org/12020
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: I82ce0207dc8de50689a8806c6471ad7fbae6219d
Gerrit-Change-Number: 12020
Gerrit-PatchSet: 18
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-CC: Stefan Sperling 


Change in libosmocore[master]: LCLS, TS 29.205: add GCR routines

2018-12-14 Thread Max
Max has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11827 )

Change subject: LCLS, TS 29.205: add GCR routines
..

LCLS, TS 29.205: add GCR routines

Add functions to encode and decode Global Call Reference as per
3GPP TS 29.205 Table B 2.1.9.1 add corresponding tests.

Change-Id: Iee95aa4e5c056645b6cb5667e4a067097d52dfbf
Related: OS#2487
---
M include/Makefile.am
M include/osmocom/gsm/gsm0808_utils.h
A include/osmocom/gsm/gsm29205.h
M src/gsm/Makefile.am
A src/gsm/gsm29205.c
M src/gsm/libosmogsm.map
M tests/Makefile.am
A tests/gsm29205/gsm29205_test.c
A tests/gsm29205/gsm29205_test.ok
M tests/testsuite.at
10 files changed, 263 insertions(+), 4 deletions(-)

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



diff --git a/include/Makefile.am b/include/Makefile.am
index 366fd70..ccf9e10 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -86,6 +86,7 @@
osmocom/coding/gsm0503_interleaving.h \
osmocom/coding/gsm0503_coding.h \
osmocom/gsm/gsm0808.h \
+   osmocom/gsm/gsm29205.h \
osmocom/gsm/gsm0808_utils.h \
osmocom/gsm/gsm23003.h \
osmocom/gsm/gsm29118.h \
diff --git a/include/osmocom/gsm/gsm0808_utils.h 
b/include/osmocom/gsm/gsm0808_utils.h
index 90ff677..5d5803b 100644
--- a/include/osmocom/gsm/gsm0808_utils.h
+++ b/include/osmocom/gsm/gsm0808_utils.h
@@ -62,7 +62,7 @@
 struct osmo_lcls {
enum gsm0808_lcls_config config;   /**< §3.2.2.116 Configuration */
enum gsm0808_lcls_control control; /**< §3.2.2.117 Connection Status 
Control */
-   struct gsm29205_gcr *gcr;  /**< §3.2.2.115 Global Call 
Reference */
+   struct osmo_gcr_parsed *gcr;   /**< §3.2.2.115 Global Call 
Reference */
bool corr_needed;  /**< §3.2.2.118 
Correlation-Not-Needed */
 };

diff --git a/include/osmocom/gsm/gsm29205.h b/include/osmocom/gsm/gsm29205.h
new file mode 100644
index 000..0c3c153
--- /dev/null
+++ b/include/osmocom/gsm/gsm29205.h
@@ -0,0 +1,41 @@
+/*! \defgroup gsm29205 3GPP TS 29.205
+ *  @{
+ *  \file gsm29205.h */
+/*
+ * (C) 2018 by sysmocom - s.f.m.c. GmbH
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#pragma once
+
+#include 
+
+#include 
+
+#define OSMO_GCR_MIN_LEN 13
+
+/*! Parsed representation of Global Call Reference, 3GPP TS 29.205 Table B 
2.1.9.1. */
+struct osmo_gcr_parsed {
+   uint8_t net[5];  /** Network ID, ITU-T Q.1902.3 */
+   uint8_t net_len; /** length (3-5 octets) of gsm29205_gcr#net */
+   uint16_t node;   /** Node ID */
+   uint8_t cr[5];   /** Call Reference ID */
+};
+
+uint8_t osmo_enc_gcr(struct msgb *msg, const struct osmo_gcr_parsed *g);
+int osmo_dec_gcr(struct osmo_gcr_parsed *gcr, const uint8_t *elem, uint8_t 
len);
diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am
index e28ea33..ccb38ad 100644
--- a/src/gsm/Makefile.am
+++ b/src/gsm/Makefile.am
@@ -24,7 +24,7 @@
gsm_utils.c rsl.c gsm48.c gsm48_ie.c gsm0808.c 
sysinfo.c \
gprs_cipher_core.c gprs_rlc.c gsm0480.c abis_nm.c 
gsm0502.c \
gsm0411_utils.c gsm0411_smc.c gsm0411_smr.c gsm0414.c \
-   lapd_core.c lapdm.c kasumi.c gsm_04_08_gprs.c \
+   lapd_core.c lapdm.c kasumi.c gsm29205.c 
gsm_04_08_gprs.c \
auth_core.c auth_comp128v1.c auth_comp128v23.c \
auth_milenage.c milenage/aes-encblock.c gea.c \
milenage/aes-internal.c milenage/aes-internal-enc.c \
diff --git a/src/gsm/gsm29205.c b/src/gsm/gsm29205.c
new file mode 100644
index 000..0ef29b7
--- /dev/null
+++ b/src/gsm/gsm29205.c
@@ -0,0 +1,93 @@
+/*
+ * (C) 2018 by sysmocom - s.f.m.c. GmbH
+ * All Rights Reserved
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ *
+ * 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 

Change in osmo-gsm-manuals[master]: chapters/gsup.adoc: document MO-/MT-forwardSM messages

2018-12-14 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/11836 )

Change subject: chapters/gsup.adoc: document MO-/MT-forwardSM messages
..


Patch Set 5:

(9 comments)

https://gerrit.osmocom.org/#/c/11836/4/common/chapters/gsup.adoc
File common/chapters/gsup.adoc:

https://gerrit.osmocom.org/#/c/11836/4/common/chapters/gsup.adoc@509
PS4, Line 509: Direction: MSC / SGSN => SMSC (via HLR)
> (a nicer term is "via", not "through" ... […]
Done


https://gerrit.osmocom.org/#/c/11836/4/common/chapters/gsup.adoc@541
PS4, Line 541: MO short message delivery. The corresponding MAP service is
> I still think it is really irritating to explain the same abbreviations over 
> and over. […]
Done


https://gerrit.osmocom.org/#/c/11836/4/common/chapters/gsup.adoc@578
PS4, Line 578: see 3GPP TS 29.002, section 12.9.
> MT from glossary
Done


https://gerrit.osmocom.org/#/c/11836/4/common/chapters/gsup.adoc@579
PS4, Line 579:
> and I still don't like this. […]
Done


https://gerrit.osmocom.org/#/c/11836/4/common/chapters/gsup.adoc@1122
PS4, Line 1122: |===
> I don't like the "nested" in here. See https://gerrit.osmocom. […]
Done


https://gerrit.osmocom.org/#/c/11836/4/common/chapters/gsup.adoc@1139
PS4, Line 1139: |===
> "Special"? What does it mean? If it has no meaning, does it even need 
> encoding? Keep apart the inner […]
Done


https://gerrit.osmocom.org/#/c/11836/4/common/chapters/gsup.adoc@1143
PS4, Line 1143:
> This is also "Special"? Rather just say what it means, or that it is reserved 
> for purpose X = must n […]
Done


https://gerrit.osmocom.org/#/c/11836/5/common/chapters/gsup.adoc
File common/chapters/gsup.adoc:

https://gerrit.osmocom.org/#/c/11836/5/common/chapters/gsup.adoc@1093
PS5, Line 1093: relay sub-layer protocol. It can be either of the following:
> "Either" implies that there are only two options.

"Either" is used in the specs., see 7.6.8.1. I'll change anyway.


https://gerrit.osmocom.org/#/c/11836/5/common/chapters/gsup.adoc@1168
PS5, Line 1168: should keep RAN the connection open. See 3GPP TS 29.002, 
section 7.6.8.7.
> I'm having trouble understanding this part: […]
You're right. Thanks.



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

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie0150756c33c1352bc4eb49421824542c711175c
Gerrit-Change-Number: 11836
Gerrit-PatchSet: 5
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Stefan Sperling 
Gerrit-Comment-Date: Fri, 14 Dec 2018 13:15:44 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in libosmocore[master]: LCLS, TS 48.008: add GCR IE encoding/decoding

2018-12-14 Thread Max
Max has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12020 )

Change subject: LCLS, TS 48.008: add GCR IE encoding/decoding
..

LCLS, TS 48.008: add GCR IE encoding/decoding

* add functions to encode Global Call. Ref. from TS 29.205 as 3GPP TS
  48.008 §3.2.2.115 information element
* add corresponding tests

Change-Id: I82ce0207dc8de50689a8806c6471ad7fbae6219d
---
M include/osmocom/gsm/gsm0808_utils.h
M src/gsm/gsm0808_utils.c
M src/gsm/libosmogsm.map
M tests/gsm0808/gsm0808_test.c
M tests/gsm0808/gsm0808_test.ok
5 files changed, 123 insertions(+), 0 deletions(-)

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



diff --git a/include/osmocom/gsm/gsm0808_utils.h 
b/include/osmocom/gsm/gsm0808_utils.h
index 5d5803b..22050b5 100644
--- a/include/osmocom/gsm/gsm0808_utils.h
+++ b/include/osmocom/gsm/gsm0808_utils.h
@@ -27,6 +27,7 @@

 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -82,6 +83,10 @@
const struct sockaddr_storage *ss);
 int gsm0808_dec_aoip_trasp_addr(struct sockaddr_storage *ss,
const uint8_t *elem, uint8_t len);
+
+uint8_t gsm0808_enc_gcr(struct msgb *msg, const struct osmo_gcr_parsed *g);
+int gsm0808_dec_gcr(struct osmo_gcr_parsed *g, const struct tlv_parsed *tp);
+
 uint8_t gsm0808_enc_speech_codec(struct msgb *msg,
 const struct gsm0808_speech_codec *sc);
 int gsm0808_dec_speech_codec(struct gsm0808_speech_codec *sc,
diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c
index 38a8664..a04adde 100644
--- a/src/gsm/gsm0808_utils.c
+++ b/src/gsm/gsm0808_utils.c
@@ -508,6 +508,41 @@
return (int)(elem - old_elem);
 }

+/*! Create BSSMAP Global Call Reference, 3GPP TS 48.008 §3.2.2.115.
+ *  \param[out] msg Message Buffer for appending IE
+ *  \param[in] g Global Call Reference, 3GPP TS 29.205 Table B 2.1.9.1
+ *  \returns number of bytes added to \a msg or 0 on error */
+uint8_t gsm0808_enc_gcr(struct msgb *msg, const struct osmo_gcr_parsed *g)
+{
+   uint8_t enc, *len = msgb_tl_put(msg, GSM0808_IE_GLOBAL_CALL_REF);
+
+   enc = osmo_enc_gcr(msg, g);
+   if (!enc)
+   return 0;
+
+   *len = enc;
+   return enc + 2; /* type (1 byte) + length (1 byte) */
+}
+
+/*! Decode BSSMAP Global Call Reference, 3GPP TS 29.205 Table B 2.1.9.1.
+ *  \param[out] gcr Caller-provided memory to store Global Call Reference
+ *  \param[in] elem IE value to be decoded
+ *  \param[in] len Length of \a elem in bytes
+ *  \returns number of bytes parsed; negative on error */
+int gsm0808_dec_gcr(struct osmo_gcr_parsed *gcr, const struct tlv_parsed *tp)
+{
+   int ret;
+   const uint8_t *buf = TLVP_VAL_MINLEN(tp, GSM0808_IE_GLOBAL_CALL_REF, 
OSMO_GCR_MIN_LEN);
+   if (!buf)
+   return -EINVAL;
+
+   ret = osmo_dec_gcr(gcr, buf, TLVP_LEN(tp, GSM0808_IE_GLOBAL_CALL_REF));
+   if (ret < 0)
+   return -ENOENT;
+
+   return 2 + ret;
+}
+
 /*! Encode TS 08.08 Encryption Information IE
  *  \param[out] msg Message Buffer to which IE is to be appended
  *  \param[in] ei Encryption Information to be encoded
diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map
index e85ed6d..94ae76a 100644
--- a/src/gsm/libosmogsm.map
+++ b/src/gsm/libosmogsm.map
@@ -219,6 +219,8 @@
 gsm0808_lcls_config_names;
 gsm0808_lcls_control_names;
 gsm0808_lcls_status_names;
+gsm0808_enc_gcr;
+gsm0808_dec_gcr;

 gsm29118_msgb_alloc;
 gsm29118_create_alert_req;
diff --git a/tests/gsm0808/gsm0808_test.c b/tests/gsm0808/gsm0808_test.c
index 63b8720..f0f3165 100644
--- a/tests/gsm0808/gsm0808_test.c
+++ b/tests/gsm0808/gsm0808_test.c
@@ -22,6 +22,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 

 #include 
 #include 
@@ -597,6 +599,75 @@
msgb_free(in_msg);
 }

+static void test_enc_dec_gcr()
+{
+   static const uint8_t res[] = {
+   GSM0808_IE_GLOBAL_CALL_REF,
+   0x0d, /* GCR length */
+   0x03, /* .net_len */
+   0xf1, 0xf2, 0xf3, /* .net */
+   0x02, /* .node length */
+   0xde, 0xad, /* .node */
+   0x05, /* length of Call. Ref. */
+   0x41, 0x42, 0x43, 0x44, 0x45 /* .cr - Call. Ref. */
+   };
+   uint8_t len;
+   struct msgb *msg;
+   struct osmo_gcr_parsed p = { 0 }, g = {
+   .net_len = 3,
+   .net = { 0xf1, 0xf2, 0xf3 },
+   .node = 0xDEAD,
+   .cr = { 0x41, 0x42, 0x43, 0x44, 0x45 },
+   };
+   int rc;
+   struct tlv_parsed tp;
+   msg = msgb_alloc_headroom(BSSMAP_MSG_SIZE, BSSMAP_MSG_HEADROOM, "global 
call reference");
+   if (!msg)
+   return;
+
+   len = gsm0808_enc_gcr(msg, );
+   printf("Testing Global Call Reference IE encoder...\n\t%d bytes added: 
%s\n",
+  

Change in libosmocore[master]: LCLS, TS 29.205: add GCR routines

2018-12-14 Thread Max
Max has removed a vote on this change.

Change subject: LCLS, TS 29.205: add GCR routines
..


Removed Code-Review+2 by Max 
--
To view, visit https://gerrit.osmocom.org/11827
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: Iee95aa4e5c056645b6cb5667e4a067097d52dfbf
Gerrit-Change-Number: 11827
Gerrit-PatchSet: 24
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 


Change in osmo-msc[master]: libmsc/gsm_09_11.c: implement guard timer for NCSS sessions

2018-12-14 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/11992 )

Change subject: libmsc/gsm_09_11.c: implement guard timer for NCSS sessions
..


Patch Set 7: Code-Review-1

(4 comments)

https://gerrit.osmocom.org/#/c/11992/7/include/osmocom/msc/gsm_data.h
File include/osmocom/msc/gsm_data.h:

https://gerrit.osmocom.org/#/c/11992/7/include/osmocom/msc/gsm_data.h@188
PS7, Line 188:  int ncss_guard_timeout;
Why do you use int in here?


https://gerrit.osmocom.org/#/c/11992/7/src/libmsc/gsm_09_11.c
File src/libmsc/gsm_09_11.c:

https://gerrit.osmocom.org/#/c/11992/7/src/libmsc/gsm_09_11.c@141
PS7, Line 141:  /* Init self-destruction timer */
That sounds ominous - I like it :)


https://gerrit.osmocom.org/#/c/11992/7/src/libmsc/gsm_09_11.c@477
PS7, Line 477:  if (net->ncss_guard_timeout > 0) {
Seems like we always check ncss_guard_timeout > 0


https://gerrit.osmocom.org/#/c/11992/7/src/libmsc/msc_vty.c
File src/libmsc/msc_vty.c:

https://gerrit.osmocom.org/#/c/11992/7/src/libmsc/msc_vty.c@382
PS7, Line 382:   "guard timer value (sec.), or 0 to disable\n")
So ncss_guard_timeout is always positive and fit into uint8_t.



-- 
To view, visit https://gerrit.osmocom.org/11992
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: Icf4d87c45e90324764073e8230e0fb9cb96dd9cb
Gerrit-Change-Number: 11992
Gerrit-PatchSet: 7
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 14 Dec 2018 13:14:49 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-hlr[master]: gsupclient: add osmo_gsup_msg_enc_send()

2018-12-14 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/11989 )

Change subject: gsupclient: add osmo_gsup_msg_enc_send()
..


Patch Set 4: Code-Review-1

(3 comments)

Sorry, haven't noticed those earlier.

https://gerrit.osmocom.org/#/c/11989/4/src/gsupclient/gsup_client.c
File src/gsupclient/gsup_client.c:

https://gerrit.osmocom.org/#/c/11989/4/src/gsupclient/gsup_client.c@366
PS4, Line 366:  *  \returns 0 in case of success, otherwise errno
Errno is positive and we return negative I believe - better state that 
explicitly.


https://gerrit.osmocom.org/#/c/11989/4/src/gsupclient/gsup_client.c@381
PS4, Line 381:  if (rc) {
I think it's better to explicitly check rc < 0 in here to make reading code 
easier.


https://gerrit.osmocom.org/#/c/11989/4/src/gsupclient/gsup_client.c@387
PS4, Line 387:  if (rc) {
And here too.



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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0589ff27933e9bca2bcf93b8259004935778db8f
Gerrit-Change-Number: 11989
Gerrit-PatchSet: 4
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Fri, 14 Dec 2018 13:07:38 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: libmsc/gsm_09_11.c: implement guard timer for NCSS sessions

2018-12-14 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/11992 )

Change subject: libmsc/gsm_09_11.c: implement guard timer for NCSS sessions
..


Patch Set 7:

> Is this some named timer from the spec or it's just smth which
 > makes sense in practice?

Second. No such timer in the specs.


--
To view, visit https://gerrit.osmocom.org/11992
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: Icf4d87c45e90324764073e8230e0fb9cb96dd9cb
Gerrit-Change-Number: 11992
Gerrit-PatchSet: 7
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Max 
Gerrit-Comment-Date: Fri, 14 Dec 2018 13:05:29 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in libosmocore[master]: add/clean big-endian packed structs (struct_endianess.py)

2018-12-14 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/11787 )

Change subject: add/clean big-endian packed structs (struct_endianess.py)
..


Patch Set 3: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/11787/3//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/#/c/11787/3//COMMIT_MSG@7
PS3, Line 7: add/clean big-endian packed structs (struct_endianess.py)
Please add exact call to struct_endianess.py you've used to make this change to 
make this reproducible. Also, please clarify if any manual editing was 
necessary or it's purely automated code change.



--
To view, visit https://gerrit.osmocom.org/11787
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: Ia0b99d76932aeb03e93bd0c62d3bf025dec5f9d2
Gerrit-Change-Number: 11787
Gerrit-PatchSet: 3
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Assignee: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Fri, 14 Dec 2018 13:02:08 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-hlr[master]: gsupclient: add osmo_gsup_msg_enc_send()

2018-12-14 Thread Vadim Yanitskiy
Hello Stefan Sperling, Max, Neels Hofmeyr, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/11989

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

Change subject: gsupclient: add osmo_gsup_msg_enc_send()
..

gsupclient: add osmo_gsup_msg_enc_send()

Several parts of OsmoMSC (e.g. GSM 04.11, 09.11, etc.) are dealing
with GSUP message encoding and sending towards OsmoHLR. In order
to avoid code duplication, let's have a shared function here.

Change-Id: I0589ff27933e9bca2bcf93b8259004935778db8f
---
M include/osmocom/gsupclient/gsup_client.h
M src/gsupclient/gsup_client.c
2 files changed, 39 insertions(+), 0 deletions(-)


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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0589ff27933e9bca2bcf93b8259004935778db8f
Gerrit-Change-Number: 11989
Gerrit-PatchSet: 4
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 


Change in osmo-msc[master]: libmsc/gsm_09_11.c: implement guard timer for NCSS sessions

2018-12-14 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/11992 )

Change subject: libmsc/gsm_09_11.c: implement guard timer for NCSS sessions
..


Patch Set 7:

Is this some named timer from the spec or it's just smth which makes sense in 
practice?


--
To view, visit https://gerrit.osmocom.org/11992
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: Icf4d87c45e90324764073e8230e0fb9cb96dd9cb
Gerrit-Change-Number: 11992
Gerrit-PatchSet: 7
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Max 
Gerrit-Comment-Date: Fri, 14 Dec 2018 12:59:55 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-msc[master]: tweak comment to indicate sub_pres_vlr fsm as dead code

2018-12-14 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/12234 )

Change subject: tweak comment to indicate sub_pres_vlr fsm as dead code
..


Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/#/c/12234/3//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/#/c/12234/3//COMMIT_MSG@18
PS3, Line 18: this models some FSM definition from 3GPP specs, and we have a 
couple other
It would be better to add actual spec reference here as well as in the comment.



--
To view, visit https://gerrit.osmocom.org/12234
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: I198d442e9ed288f37c7d4e5ec87b82dc53114e99
Gerrit-Change-Number: 12234
Gerrit-PatchSet: 3
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Stefan Sperling 
Gerrit-CC: Max 
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Fri, 14 Dec 2018 12:57:24 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-msc[master]: vlr_lu_fsm: drop unused out_state INIT -> WAIT_IMEI

2018-12-14 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/12236 )

Change subject: vlr_lu_fsm: drop unused out_state INIT -> WAIT_IMEI
..


Patch Set 2:

Do you need to update some .adoc or .msc as well or this isn't documented?


--
To view, visit https://gerrit.osmocom.org/12236
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: I18ef9e8c96b52401d98f49dc410f13681231b533
Gerrit-Change-Number: 12236
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-CC: Max 
Gerrit-Comment-Date: Fri, 14 Dec 2018 12:54:55 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in libosmocore[master]: GSUP/SMS: introduce MO-/MT-FORWARD-SM messages

2018-12-14 Thread Stefan Sperling
Stefan Sperling has posted comments on this change. ( 
https://gerrit.osmocom.org/11069 )

Change subject: GSUP/SMS: introduce MO-/MT-FORWARD-SM messages
..


Patch Set 11: Code-Review+1

(3 comments)

https://gerrit.osmocom.org/#/c/11069/11/src/gsm/gsup.c
File src/gsm/gsup.c:

https://gerrit.osmocom.org/#/c/11069/11/src/gsm/gsup.c@668
PS11, Line 668: sizeof(u8), gsup_msg->sm_rp_mr);
Use sizeof(*gsup_msg->sm_rp_mr) here?


https://gerrit.osmocom.org/#/c/11069/11/src/gsm/gsup.c@694
PS11, Line 694: sizeof(u8), 
gsup_msg->sm_rp_mms);
Use sizeof(*gsup_msg->sm_rp_mms)?


https://gerrit.osmocom.org/#/c/11069/11/src/gsm/gsup.c@699
PS11, Line 699: sizeof(u8), 
gsup_msg->sm_rp_cause);
Use sizeof(*gsup_msg->sm_rp_cause)?



--
To view, visit https://gerrit.osmocom.org/11069
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: Ibe325c64ae2d6c626b232533bb4cbc65fc2b5d71
Gerrit-Change-Number: 11069
Gerrit-PatchSet: 11
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 14 Dec 2018 12:54:57 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmocom-bb[master]: trx_toolkit/ctrl_if_trx.py: drop meaningless warnings

2018-12-14 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/12291 )

Change subject: trx_toolkit/ctrl_if_trx.py: drop meaningless warnings
..


Patch Set 2:

(1 comment)

Could you clarify in commit message if RESET was introduced or why removing 
this TODO is the right thing.

https://gerrit.osmocom.org/#/c/12291/2/src/target/trx_toolkit/ctrl_if_trx.py
File src/target/trx_toolkit/ctrl_if_trx.py:

https://gerrit.osmocom.org/#/c/12291/2/src/target/trx_toolkit/ctrl_if_trx.py@a126
PS2, Line 126:
That's rather puzzling TODO in here.



--
To view, visit https://gerrit.osmocom.org/12291
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: I0a69ebceed5aa724093e6d1b23faad8c16705055
Gerrit-Change-Number: 12291
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Max 
Gerrit-Comment-Date: Fri, 14 Dec 2018 12:52:57 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-hlr[master]: gsupclient: add osmo_gsup_msg_enc_send()

2018-12-14 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/11989 )

Change subject: gsupclient: add osmo_gsup_msg_enc_send()
..


Patch Set 3: Code-Review-1

(2 comments)

Please double check.

https://gerrit.osmocom.org/#/c/11989/3/src/gsupclient/gsup_client.c
File src/gsupclient/gsup_client.c:

https://gerrit.osmocom.org/#/c/11989/3/src/gsupclient/gsup_client.c@369
PS3, Line 369: struct osmo_gsup_message *gsup_msg)
Why this isn't const? What modifies it?


https://gerrit.osmocom.org/#/c/11989/3/src/gsupclient/gsup_client.c@380
PS3, Line 380:  rc = osmo_gsup_encode(gsup_msgb, gsup_msg);
gsup_msg is const in here according to osmo_gsup_encode() type signature.



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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0589ff27933e9bca2bcf93b8259004935778db8f
Gerrit-Change-Number: 11989
Gerrit-PatchSet: 3
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Fri, 14 Dec 2018 12:51:12 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in libosmocore[master]: GSUP/SMS: introduce READY-FOR-SM message

2018-12-14 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/11751 )

Change subject: GSUP/SMS: introduce READY-FOR-SM message
..


Patch Set 6:

(2 comments)

https://gerrit.osmocom.org/#/c/11751/6/src/gsm/gsup.c
File src/gsm/gsup.c:

https://gerrit.osmocom.org/#/c/11751/6/src/gsm/gsup.c@710
PS6, Line 710:  if ((u8 = gsup_msg->sm_alert_rsn)) {
> A follow-up suggestion: […]
Well, this approach is quite common, look at:

  - gsup_msg->cause,
  - gsup_msg->cancel_type,

where this check is also done implicitly.

Any benefits of checking this explicitly?


https://gerrit.osmocom.org/#/c/11751/6/src/gsm/gsup.c@710
PS6, Line 710:  if ((u8 = gsup_msg->sm_alert_rsn)) {
> This check for non-zero means OSMO_GSUP_SMS_SM_ALERT_RSN_NONE won't ever be 
> sent. […]
Yes, correct. The current GSUP API in libosmocore is ugly, because
we have a single structure for all kinds of messages. This is why
we have to introduce such special values.



--
To view, visit https://gerrit.osmocom.org/11751
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: Ic37f3b2114b8095cfce22977e67133b9103942e3
Gerrit-Change-Number: 11751
Gerrit-PatchSet: 6
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 14 Dec 2018 12:51:07 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in libosmocore[master]: LCLS, TS 29.205: add GCR routines

2018-12-14 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/11827 )

Change subject: LCLS, TS 29.205: add GCR routines
..


Patch Set 24: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11827
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: Iee95aa4e5c056645b6cb5667e4a067097d52dfbf
Gerrit-Change-Number: 11827
Gerrit-PatchSet: 24
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Fri, 14 Dec 2018 12:40:09 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmocore[master]: GSUP/SMS: introduce READY-FOR-SM message

2018-12-14 Thread Stefan Sperling
Stefan Sperling has posted comments on this change. ( 
https://gerrit.osmocom.org/11751 )

Change subject: GSUP/SMS: introduce READY-FOR-SM message
..


Patch Set 6:

(1 comment)

https://gerrit.osmocom.org/#/c/11751/6/src/gsm/gsup.c
File src/gsm/gsup.c:

https://gerrit.osmocom.org/#/c/11751/6/src/gsm/gsup.c@710
PS6, Line 710:  if ((u8 = gsup_msg->sm_alert_rsn)) {
> This check for non-zero means OSMO_GSUP_SMS_SM_ALERT_RSN_NONE won't ever be 
> sent. […]
A follow-up suggestion:

If, as I expect, this is intended, then we could explicitly write this check 
like this:

 if ((u8 = gsup_msg->sm_alert_rsn) != OSMO_GSUP_SMS_SM_ALERT_RSN_NONE) {



--
To view, visit https://gerrit.osmocom.org/11751
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: Ic37f3b2114b8095cfce22977e67133b9103942e3
Gerrit-Change-Number: 11751
Gerrit-PatchSet: 6
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 14 Dec 2018 12:36:44 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in libosmocore[master]: LCLS, TS 48.008: add GCR IE encoding/decoding

2018-12-14 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/12020 )

Change subject: LCLS, TS 48.008: add GCR IE encoding/decoding
..


Patch Set 18: Code-Review+2

Will merge at the end of the day unless some objections will be raised.


--
To view, visit https://gerrit.osmocom.org/12020
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: I82ce0207dc8de50689a8806c6471ad7fbae6219d
Gerrit-Change-Number: 12020
Gerrit-PatchSet: 18
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-CC: Stefan Sperling 
Gerrit-Comment-Date: Fri, 14 Dec 2018 12:33:55 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmocore[master]: GSUP/SMS: introduce READY-FOR-SM message

2018-12-14 Thread Stefan Sperling
Stefan Sperling has posted comments on this change. ( 
https://gerrit.osmocom.org/11751 )

Change subject: GSUP/SMS: introduce READY-FOR-SM message
..


Patch Set 6: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/#/c/11751/6/src/gsm/gsup.c
File src/gsm/gsup.c:

https://gerrit.osmocom.org/#/c/11751/6/src/gsm/gsup.c@710
PS6, Line 710:  if ((u8 = gsup_msg->sm_alert_rsn)) {
This check for non-zero means OSMO_GSUP_SMS_SM_ALERT_RSN_NONE won't ever be 
sent.
I assume this is intended, and ALERT_RSN_NONE is never part of a valid 
wire-protocol message?



--
To view, visit https://gerrit.osmocom.org/11751
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: Ic37f3b2114b8095cfce22977e67133b9103942e3
Gerrit-Change-Number: 11751
Gerrit-PatchSet: 6
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 14 Dec 2018 12:32:51 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in libosmocore[master]: LCLS, TS 29.205: add GCR routines

2018-12-14 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/11827 )

Change subject: LCLS, TS 29.205: add GCR routines
..


Patch Set 24: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11827
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: Iee95aa4e5c056645b6cb5667e4a067097d52dfbf
Gerrit-Change-Number: 11827
Gerrit-PatchSet: 24
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Fri, 14 Dec 2018 12:32:54 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-gsm-manuals[master]: chapters/gsup.adoc: document MO-/MT-forwardSM messages

2018-12-14 Thread Stefan Sperling
Stefan Sperling has posted comments on this change. ( 
https://gerrit.osmocom.org/11836 )

Change subject: chapters/gsup.adoc: document MO-/MT-forwardSM messages
..


Patch Set 5:

(3 comments)

https://gerrit.osmocom.org/#/c/11836/5/common/chapters/gsup.adoc
File common/chapters/gsup.adoc:

https://gerrit.osmocom.org/#/c/11836/5/common/chapters/gsup.adoc@1093
PS5, Line 1093: relay sub-layer protocol. It can be either of the following:
"Either" implies that there are only two options.
Since there are three options listed below, this should say "any of the 
following" instead of "either of the following".


https://gerrit.osmocom.org/#/c/11836/5/common/chapters/gsup.adoc@1106
PS5, Line 1106: relay sub-layer protocol. It can be either of the following:
Here, "either" is fine :)


https://gerrit.osmocom.org/#/c/11836/5/common/chapters/gsup.adoc@1168
PS5, Line 1168: should keep RAN the connection open. See 3GPP TS 29.002, 
section 7.6.8.7.
I'm having trouble understanding this part:
"the network should keep RAN the connection open"

Did you mean to write "the network should keep the RAN connection open" 
instead? Or something else?



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

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie0150756c33c1352bc4eb49421824542c711175c
Gerrit-Change-Number: 11836
Gerrit-PatchSet: 5
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Stefan Sperling 
Gerrit-Comment-Date: Fri, 14 Dec 2018 12:27:38 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-gsm-manuals[master]: chapters/gsup.adoc: document READY-FOR-SM message

2018-12-14 Thread Vadim Yanitskiy
Hello Stefan Sperling, Neels Hofmeyr, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/11837

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

Change subject: chapters/gsup.adoc: document READY-FOR-SM message
..

chapters/gsup.adoc: document READY-FOR-SM message

Change-Id: I549b6c8840a1e86caac09e77fb8bc5042d939e62
Related Change-Id: (core) Ic37f3b2114b8095cfce22977e67133b9103942e3
Related Change-Id: (TTCN) If2256607527ecfcb10285583332fb8b0515d7c78
Related: OS#3587
---
M common/chapters/gsup.adoc
1 file changed, 74 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/37/11837/6
--
To view, visit https://gerrit.osmocom.org/11837
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I549b6c8840a1e86caac09e77fb8bc5042d939e62
Gerrit-Change-Number: 11837
Gerrit-PatchSet: 6
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-gsm-manuals[master]: chapters/gsup.adoc: document READY-FOR-SM message

2018-12-14 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/11837 )

Change subject: chapters/gsup.adoc: document READY-FOR-SM message
..


Patch Set 5:

(1 comment)

https://gerrit.osmocom.org/#/c/11837/5/common/chapters/gsup.adoc
File common/chapters/gsup.adoc:

https://gerrit.osmocom.org/#/c/11837/5/common/chapters/gsup.adoc@664
PS5, Line 664: corresponding MAP service is *MAP-READY-FOR-SM*. See 3GPP TS 
29.002,
> In this section, *MAP-READY-FOR-SM* is highlighted (surrounded by asterisks), 
> but in the other secti […]
Oh, nice catch! Thanks!



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

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I549b6c8840a1e86caac09e77fb8bc5042d939e62
Gerrit-Change-Number: 11837
Gerrit-PatchSet: 5
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 14 Dec 2018 12:22:23 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-gsm-manuals[master]: chapters/gsup.adoc: document READY-FOR-SM message

2018-12-14 Thread Stefan Sperling
Stefan Sperling has posted comments on this change. ( 
https://gerrit.osmocom.org/11837 )

Change subject: chapters/gsup.adoc: document READY-FOR-SM message
..


Patch Set 5: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/#/c/11837/5/common/chapters/gsup.adoc
File common/chapters/gsup.adoc:

https://gerrit.osmocom.org/#/c/11837/5/common/chapters/gsup.adoc@664
PS5, Line 664: corresponding MAP service is *MAP-READY-FOR-SM*. See 3GPP TS 
29.002,
In this section, *MAP-READY-FOR-SM* is highlighted (surrounded by asterisks), 
but in the other sections above it is written as just MAP-READY-FOR-SM without 
asterisks.

Should this be made consistent?



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

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I549b6c8840a1e86caac09e77fb8bc5042d939e62
Gerrit-Change-Number: 11837
Gerrit-PatchSet: 5
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Fri, 14 Dec 2018 12:20:24 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: msc_vty.c: configurable retrieval of IMEI, IMEISV

2018-12-14 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/12302 )

Change subject: msc_vty.c: configurable retrieval of IMEI, IMEISV
..


Patch Set 1:

Thanks Stefan!

Okay, then the failure is expected, as the documentation strings still need to 
be filled out (see earlier comments here).


--
To view, visit https://gerrit.osmocom.org/12302
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: Iee516b9cd7877b21207ce9a6d954109f19558163
Gerrit-Change-Number: 12302
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 
Gerrit-CC: Stefan Sperling 
Gerrit-Comment-Date: Fri, 14 Dec 2018 12:18:54 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-hlr[master]: gsupclient: add osmo_gsup_msg_enc_send()

2018-12-14 Thread Stefan Sperling
Stefan Sperling has posted comments on this change. ( 
https://gerrit.osmocom.org/11989 )

Change subject: gsupclient: add osmo_gsup_msg_enc_send()
..


Patch Set 3: Code-Review+1


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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0589ff27933e9bca2bcf93b8259004935778db8f
Gerrit-Change-Number: 11989
Gerrit-PatchSet: 3
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Fri, 14 Dec 2018 12:16:28 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: msc_vty.c: configurable retrieval of IMEI, IMEISV

2018-12-14 Thread Stefan Sperling
Stefan Sperling has posted comments on this change. ( 
https://gerrit.osmocom.org/12302 )

Change subject: msc_vty.c: configurable retrieval of IMEI, IMEISV
..


Patch Set 1:

> Patch Set 1:
>
> (osmotestvty.py runs through locally for me)

With --enable-external-tests, 'make check' fails locally for me with your patch 
applied.

I suspect the reason is this:

Documentation error (missing docs):




  
Documentation error (missing docs):






--
To view, visit https://gerrit.osmocom.org/12302
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: Iee516b9cd7877b21207ce9a6d954109f19558163
Gerrit-Change-Number: 12302
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 
Gerrit-CC: Stefan Sperling 
Gerrit-Comment-Date: Fri, 14 Dec 2018 12:09:58 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-sgsn[master]: make gsup ipa name configurable in osmo-sgsn.cfg

2018-12-14 Thread Stefan Sperling
Stefan Sperling has posted comments on this change. ( 
https://gerrit.osmocom.org/12243 )

Change subject: make gsup ipa name configurable in osmo-sgsn.cfg
..


Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/#/c/12243/3/src/gprs/sgsn_vty.c
File src/gprs/sgsn_vty.c:

https://gerrit.osmocom.org/#/c/12243/3/src/gprs/sgsn_vty.c@1454
PS3, Line 1454: parsing_config_file = true;
> Why initializing it here instead of where it's declared?
At present what you suggest would of course be equivalent, but code evolves 
over time. If we set the flag to true during program init already, then the 
flag's effect might change if calls into the VTY code made during program 
startup are ever changed in the future.
This flag should only be set while vty_read_ocnfig_file is running, so setting 
it before and after calling this function makes that very explicit. Should I 
add a comment which mentions this?



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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Fri, 14 Dec 2018 11:46:41 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-msc[master]: msc_vty.c: configurable retrieval of IMEI, IMEISV

2018-12-14 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/12302 )

Change subject: msc_vty.c: configurable retrieval of IMEI, IMEISV
..


Patch Set 1:

(osmotestvty.py runs through locally for me)


--
To view, visit https://gerrit.osmocom.org/12302
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: Iee516b9cd7877b21207ce9a6d954109f19558163
Gerrit-Change-Number: 12302
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Fri, 14 Dec 2018 11:25:57 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-msc[master]: msc_vty.c: configurable retrieval of IMEI, IMEISV

2018-12-14 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/12302 )

Change subject: msc_vty.c: configurable retrieval of IMEI, IMEISV
..


Patch Set 1:

(2 comments)

https://gerrit.osmocom.org/#/c/12302/1/src/libmsc/msc_vty.c
File src/libmsc/msc_vty.c:

https://gerrit.osmocom.org/#/c/12302/1/src/libmsc/msc_vty.c@448
PS1, Line 448: ""
Can somebody suggest a good description here?

I could not find the part that describes retrieving the IMEISV early in the MAP 
spec 29.002.


https://gerrit.osmocom.org/#/c/12302/1/src/libmsc/msc_vty.c@455
PS1, Line 455: ""
same here



--
To view, visit https://gerrit.osmocom.org/12302
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: Iee516b9cd7877b21207ce9a6d954109f19558163
Gerrit-Change-Number: 12302
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: osmith 
Gerrit-CC: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 14 Dec 2018 10:59:20 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-msc[master]: msc_vty.c: configurable retrieval of IMEI, IMEISV

2018-12-14 Thread osmith
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/12302


Change subject: msc_vty.c: configurable retrieval of IMEI, IMEISV
..

msc_vty.c: configurable retrieval of IMEI, IMEISV

Make these options configurable:
* check-imei-rqd
* retrieve-imeisv-early
* retrieve-imeisv-ciphered

Related: OS#3189
Change-Id: Iee516b9cd7877b21207ce9a6d954109f19558163
---
M src/libmsc/msc_vty.c
1 file changed, 38 insertions(+), 0 deletions(-)



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

diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index 87adc82..9973412 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -432,6 +432,32 @@
return CMD_SUCCESS;
 }

+DEFUN(cfg_msc_check_imei_rqd, cfg_msc_check_imei_rqd_cmd,
+  "check-imei-rqd (0|1)",
+  "Send each IMEI to the EIR to ask if it is permitted or not. The EIR is 
implemented as part of osmo-hlr, "
+  "and can optionally save the IMEI in the HLR.\n"
+  "0 = do not send IMEIs to the EIR\n"
+  "1 = send each IMEI to the EIR\n")
+{
+   gsmnet->vlr->cfg.check_imei_rqd = atoi(argv[0]) ? true : false;
+   return CMD_SUCCESS;
+}
+
+DEFUN(cfg_msc_retrieve_imeisv_early, cfg_msc_retrieve_imeisv_early_cmd,
+  "retrieve-imeisv-early (0|1)",
+  "") // FIXME
+{
+   gsmnet->vlr->cfg.retrieve_imeisv_early = atoi(argv[0]) ? true : false;
+   return CMD_SUCCESS;
+}
+DEFUN(cfg_msc_retrieve_imeisv_ciphered, cfg_msc_retrieve_imeisv_ciphered_cmd,
+  "retrieve-imeisv-ciphered (0|1)",
+  "") // FIXME
+{
+   gsmnet->vlr->cfg.retrieve_imeisv_ciphered = atoi(argv[0]) ? true : 
false;
+   return CMD_SUCCESS;
+}
+
 DEFUN(cfg_msc_paging_response_timer, cfg_msc_paging_response_timer_cmd,
   "paging response-timer (default|<1-65535>)",
   "Configure Paging\n"
@@ -500,6 +526,15 @@
if (gsmnet->vlr->cfg.auth_reuse_old_sets_on_error)
vty_out(vty, " auth-tuple-reuse-on-error 1%s",
VTY_NEWLINE);
+   if (gsmnet->vlr->cfg.check_imei_rqd)
+   vty_out(vty, " check-imei-rqd 1 %s",
+   VTY_NEWLINE);
+   if (gsmnet->vlr->cfg.retrieve_imeisv_early)
+   vty_out(vty, " retrieve-imeisv-early 1%s",
+   VTY_NEWLINE);
+   if (gsmnet->vlr->cfg.retrieve_imeisv_ciphered)
+   vty_out(vty, " retrieve-imeisv-ciphered 1%s",
+   VTY_NEWLINE);

if (gsmnet->paging_response_timer != MSC_PAGING_RESPONSE_TIMER_DEFAULT)
vty_out(vty, " paging response-timer %u%s", 
gsmnet->paging_response_timer, VTY_NEWLINE);
@@ -1500,6 +1535,9 @@
install_element(MSC_NODE, _msc_no_assign_tmsi_cmd);
install_element(MSC_NODE, _msc_auth_tuple_max_reuse_count_cmd);
install_element(MSC_NODE, _msc_auth_tuple_reuse_on_error_cmd);
+   install_element(MSC_NODE, _msc_check_imei_rqd_cmd);
+   install_element(MSC_NODE, _msc_retrieve_imeisv_early_cmd);
+   install_element(MSC_NODE, _msc_retrieve_imeisv_ciphered_cmd);
install_element(MSC_NODE, _msc_cs7_instance_a_cmd);
install_element(MSC_NODE, _msc_cs7_instance_iu_cmd);
install_element(MSC_NODE, _msc_paging_response_timer_cmd);

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iee516b9cd7877b21207ce9a6d954109f19558163
Gerrit-Change-Number: 12302
Gerrit-PatchSet: 1
Gerrit-Owner: osmith