Build failure of network:osmocom:nightly/osmo-trx in Debian_Testing/x86_64

2019-10-08 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/Debian_Testing/x86_64

Package network:osmocom:nightly/osmo-trx failed to build in 
Debian_Testing/x86_64

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

Last lines of build log:
[  423s] ar: `u' modifier ignored since `D' is the default (see `U')
[  423s] libtool: link: ranlib .libs/libtransceiver_common.a
[  423s] libtool: link: ( cd ".libs" && rm -f "libtransceiver_common.la" && ln 
-s "../libtransceiver_common.la" "libtransceiver_common.la" )
[  423s] /bin/bash ../libtool  --tag=CXX   --mode=link g++ -lpthread 
-I/usr/include/ -I/usr/include/ -I/usr/include/ -g -O2 
-fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat 
-Werror=format-security  -Wl,-z,relro -Wl,-z,now -o osmo-trx-uhd 
osmo_trx_uhd-osmo-trx.o ./device/uhd/libdevice.la libtransceiver_common.la 
../Transceiver52M/arch/x86/libarch.la ../GSM/libGSM.la 
../CommonLibs/libcommon.la -lfftw3f -ltalloc -losmocore -ltalloc -losmoctrl 
-losmogsm -losmocore -ltalloc -losmovty -losmocore -luhd 
[  423s] libtool: link: g++ -I/usr/include/ -I/usr/include/ -I/usr/include/ -g 
-O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong 
-Wformat -Werror=format-security -Wl,-z -Wl,relro -Wl,-z -Wl,now -o 
osmo-trx-uhd osmo_trx_uhd-osmo-trx.o  ./device/uhd/.libs/libdevice.a 
./.libs/libtransceiver_common.a ../Transceiver52M/arch/x86/.libs/libarch.a 
../GSM/.libs/libGSM.a ../CommonLibs/.libs/libcommon.a -lpthread -lfftw3f 
/usr/lib/x86_64-linux-gnu/libosmoctrl.so 
/usr/lib/x86_64-linux-gnu/libosmogsm.so -ltalloc 
/usr/lib/x86_64-linux-gnu/libosmovty.so 
/usr/lib/x86_64-linux-gnu/libosmocore.so -luhd
[  423s] /usr/bin/ld: ./device/uhd/.libs/libdevice.a(UHDDevice.o): undefined 
reference to symbol '_ZN5boost6system16generic_categoryEv'
[  423s] /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libboost_system.so.1.67.0: 
error adding symbols: DSO missing from command line
[  423s] collect2: error: ld returned 1 exit status
[  423s] make[4]: *** [Makefile:681: osmo-trx-uhd] Error 1
[  424s] make[4]: Leaving directory '/usr/src/packages/BUILD/Transceiver52M'
[  424s] make[3]: *** [Makefile:820: all-recursive] Error 1
[  424s] make[3]: Leaving directory '/usr/src/packages/BUILD/Transceiver52M'
[  424s] make[2]: *** [Makefile:513: all-recursive] Error 1
[  424s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  424s] make[1]: *** [Makefile:444: all] Error 2
[  424s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  424s] dh_auto_build: make -j1 returned exit code 2
[  424s] make: *** [debian/rules:6: build] Error 255
[  424s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[  424s] 
[  424s] lamb09 failed "build osmo-trx_1.1.1.30.92814.dsc" at Wed Oct  9 
04:06:22 UTC 2019.
[  424s] 
[  424s] ### VM INTERACTION START ###
[  427s] [  407.892969] sysrq: SysRq : Power Off
[  427s] [  407.897515] reboot: Power down
[  427s] ### VM INTERACTION END ###
[  427s] 
[  427s] lamb09 failed "build osmo-trx_1.1.1.30.92814.dsc" at Wed Oct  9 
04:06:26 UTC 2019.
[  427s] 

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


Change in ...osmo-pcu[master]: encoding: fix space, tabs

2019-10-08 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/15717


Change subject: encoding: fix space, tabs
..

encoding: fix space, tabs

Change-Id: I80ac88f50bfedfd2b86d548883313b5a187b1e8f
---
M src/encoding.cpp
1 file changed, 30 insertions(+), 30 deletions(-)



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

diff --git a/src/encoding.cpp b/src/encoding.cpp
index 8270354..b46f568 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -96,21 +96,21 @@
 */
 static int write_tfi_usf(bitvec *dest, const gprs_rlcmac_ul_tbf *tbf, uint8_t 
usf)
 {
-   int rc = bitvec_set_u64(dest, tbf->tfi(), 5, false); /* TFI_ASSIGNMENT 
*/
-   CHECK(rc);
+   int rc = bitvec_set_u64(dest, tbf->tfi(), 5, false); /* TFI_ASSIGNMENT 
*/
+   CHECK(rc);

-   SET_0(dest); /* POLLING -- no action is required from MS */
+   SET_0(dest); /* POLLING -- no action is required from MS */

-   SET_0(dest);
+   SET_0(dest);

-   rc = bitvec_set_u64(dest, usf, 3, false); /* USF */
-   CHECK(rc);
+   rc = bitvec_set_u64(dest, usf, 3, false); /* USF */
+   CHECK(rc);

-   SET_0(dest); /* USF_GRANULARITY -- the mobile station shall transmit 
one RLC/MAC block */
+   SET_0(dest); /* USF_GRANULARITY -- the mobile station shall transmit 
one RLC/MAC block */

-   SET_0(dest); /* No P0 nor PR_MODE */
+   SET_0(dest); /* No P0 nor PR_MODE */

-   return 0;
+   return 0;
 }

 /* { 0 | 1 < TIMING_ADVANCE_INDEX : bit (4) > } */
@@ -201,11 +201,11 @@
rc = write_alpha_gamma(dest, alpha, gamma);
CHECK(rc);

-   rc = bitvec_set_bit(dest, (bit_value)polling); /* POLLING */
+   rc = bitvec_set_bit(dest, (bit_value) polling); /* POLLING */
CHECK(rc);

/* N. B: NOT related to TAI! */
-   rc = bitvec_set_bit(dest, (bit_value)ta_valid); /* TA_VALID */
+   rc = bitvec_set_bit(dest, (bit_value) ta_valid); /* TA_VALID */
CHECK(rc);

rc = write_ta_index(dest, ta_idx);
@@ -215,7 +215,7 @@
SET_1(dest);
rc = write_tbf_start_time(dest, fn);
CHECK(rc);
-   } else
+   } else
SET_0(dest);

SET_0(dest); /* No P0 nor PR_MODE */
@@ -225,7 +225,7 @@
rc = bitvec_set_u64(dest, enc_ws(tbf->window_size()), 5, 
false); /* EGPRS Window Size */
CHECK(rc);

-   /* The mobile station shall not report measurements: (see 3GPP 
TS 44.060 Table 11.2.7.1) */
+   /* The mobile station shall not report measurements: (see 3GPP 
TS 44.060 Table 11.2.7.1) */
SET_0(dest); SET_0(dest); /* LINK_QUALITY_MEASUREMENT_MODE */
SET_1(dest);  /* No BEP_PERIOD2 */
} else
@@ -867,16 +867,16 @@
/* static size of 16 bits
 ..1.  = ACKNACK:  (Union)
0  000 Length
-Desc
-
-...0  = FINAL_ACK_INDICATION: False
-
- 1... = BEGINNING_OF_WINDOW: 1
-
- .1.. = END_OF_WINDOW: 1
-
- ..10  0101 0001  1...  = STARTING_SEQUENCE_NUMBER: 1187
-
+   Desc
+
+   ...0  = FINAL_ACK_INDICATION: False
+
+    1... = BEGINNING_OF_WINDOW: 1
+
+    .1.. = END_OF_WINDOW: 1
+
+    ..10  0101 0001  1...  = STARTING_SEQUENCE_NUMBER: 1187
+
.0..  = CRBB Exist: 0
minimal size is 24 rest_bits */
rest_bits -= 24;
@@ -1051,15 +1051,15 @@
 {
unsigned wp = 0;

-   bitvec_write_field(dest, ,0x1,2);  // Payload Type
-   bitvec_write_field(dest, ,0x0,3);  // No polling
-   bitvec_write_field(dest, ,0x0,3);  // Uplink state flag
-   bitvec_write_field(dest, ,0x22,6);  // MESSAGE TYPE
+   bitvec_write_field(dest, , 0x1, 2);  // Payload Type
+   bitvec_write_field(dest, , 0x0, 3);  // No polling
+   bitvec_write_field(dest, , 0x0, 3);  // Uplink state flag
+   bitvec_write_field(dest, , 0x22, 6);  // MESSAGE TYPE

-   bitvec_write_field(dest, ,0x0,2);  // Page Mode
+   bitvec_write_field(dest, , 0x0, 2);  // Page Mode

-   bitvec_write_field(dest, ,0x0,1);  // No PERSISTENCE_LEVEL
-   bitvec_write_field(dest, ,0x0,1);  // No NLN
+   bitvec_write_field(dest, , 0x0, 1);  // No PERSISTENCE_LEVEL
+   bitvec_write_field(dest, , 0x0, 1);  // No NLN

return wp;
 }

--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/15717
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I80ac88f50bfedfd2b86d548883313b5a187b1e8f
Gerrit-Change-Number: 15717
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-MessageType: newchange


Change in ...osmo-sgsn[master]: sgsn_mm_ctx_alloc(): check for unallocated fsms

2019-10-08 Thread lynxis lazus
lynxis lazus has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15704 )

Change subject: sgsn_mm_ctx_alloc(): check for unallocated fsms
..

sgsn_mm_ctx_alloc(): check for unallocated fsms

Change-Id: I867612a60236eaf7009400c92f5d871006aaf008
---
M src/sgsn/gprs_sgsn.c
1 file changed, 25 insertions(+), 0 deletions(-)

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



diff --git a/src/sgsn/gprs_sgsn.c b/src/sgsn/gprs_sgsn.c
index 474f8f9..cb2c0fc 100644
--- a/src/sgsn/gprs_sgsn.c
+++ b/src/sgsn/gprs_sgsn.c
@@ -243,17 +243,42 @@
talloc_free(ctx);
return NULL;
}
+
ctx->gmm_fsm = osmo_fsm_inst_alloc(_fsm, ctx, ctx, LOGL_DEBUG, 
"gmm_fsm");
+   if (!ctx->gmm_fsm)
+   goto out;
ctx->gmm_att_req.fsm = osmo_fsm_inst_alloc(_attach_req_fsm, ctx, 
ctx, LOGL_DEBUG, "gb_gmm_req");
+   if (!ctx->gmm_att_req.fsm)
+   goto out;
ctx->gb.mm_state_fsm = osmo_fsm_inst_alloc(_state_gb_fsm, ctx, ctx, 
LOGL_DEBUG, NULL);
+   if (!ctx->gb.mm_state_fsm)
+   goto out;
 #ifdef BUILD_IU
ctx->iu.mm_state_fsm = osmo_fsm_inst_alloc(_state_iu_fsm, ctx, ctx, 
LOGL_DEBUG, NULL);
+   if (!ctx->iu.mm_state_fsm)
+   goto out;
 #endif
+
INIT_LLIST_HEAD(>pdp_list);

llist_add(>list, _mm_ctxts);

return ctx;
+
+out:
+   if (ctx->iu.mm_state_fsm)
+   osmo_fsm_inst_free(ctx->iu.mm_state_fsm);
+   if (ctx->gb.mm_state_fsm)
+   osmo_fsm_inst_free(ctx->gb.mm_state_fsm);
+   if (ctx->gmm_att_req.fsm)
+   osmo_fsm_inst_free(ctx->gmm_att_req.fsm);
+   if (ctx->gmm_fsm)
+   osmo_fsm_inst_free(ctx->gmm_fsm);
+
+   rate_ctr_group_free(ctx->ctrg);
+   talloc_free(ctx);
+
+   return NULL;
 }
 /* Allocate a new SGSN MM context for GERAN_Gb */
 struct sgsn_mm_ctx *sgsn_mm_ctx_alloc_gb(uint32_t tlli,

--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15704
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I867612a60236eaf7009400c92f5d871006aaf008
Gerrit-Change-Number: 15704
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in ...osmo-ttcn3-hacks[master]: sgsn: delay f_gmm_attach() by 50ms

2019-10-08 Thread lynxis lazus
lynxis lazus has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15703 )

Change subject: sgsn: delay f_gmm_attach() by 50ms
..

sgsn: delay f_gmm_attach() by 50ms

Packets sent by f_gmm_attach() might take too long via layers to reach
the SGSN. The GMM_ATTACH_COMPL in f_gmm_attach() took soo long,
that it arrived after packets, which has been sent after calling f_gmm_attach().
This behaviour was found in TC hlr_location_cancel_request_update().

Change-Id: I0209c86e16fe616284d753e9e003f2e4d9ec9ea5
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 281dcc9..a89a949 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -784,6 +784,14 @@
if (is_iu(ran_index)) {
as_iu_release_compl_disc();
}
+
+   /* Race condition
+* It has shown, that GMM_ATTACH_COMPL might take some time to arrive 
at the SGSN through the layers.
+* In TC hlr_location_cancel_request_update, the GMM_ATTACH_COMPL came 
2ms too late, so that the Location Cancel Request
+* arrived before it. This results in a test case failure.
+* Delay execution by 50 ms
+*/
+   f_sleep(0.05);
 }

 private function f_TC_attach(charstring id) runs on BSSGP_ConnHdlr {

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15703
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I0209c86e16fe616284d753e9e003f2e4d9ec9ea5
Gerrit-Change-Number: 15703
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in ...osmo-sgsn[master]: sgsn_libgtp: refactor ps paging into gprs_gb

2019-10-08 Thread lynxis lazus
Hello fixeria, pespin, laforge, Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-sgsn/+/15547

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

Change subject: sgsn_libgtp: refactor ps paging into gprs_gb
..

sgsn_libgtp: refactor ps paging into gprs_gb

Paging should be done in gprs_gb
Change-Id: I3020020f52005aa460ca6b245ee2297aec9821b3
---
M include/osmocom/sgsn/gprs_gb.h
M src/sgsn/gprs_gb.c
M src/sgsn/sgsn_libgtp.c
3 files changed, 28 insertions(+), 11 deletions(-)


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I3020020f52005aa460ca6b245ee2297aec9821b3
Gerrit-Change-Number: 15547
Gerrit-PatchSet: 4
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: newpatchset


Change in ...osmo-trx[master]: Initial XTRX support

2019-10-08 Thread ipse
ipse has uploaded a new patch set (#2) to the change originally created by 
rauf.gyulal...@fairwaves.co. ( https://gerrit.osmocom.org/c/osmo-trx/+/15685 )

Change subject: Initial XTRX support
..

Initial XTRX support

Change-Id: I1067dfef53aa2669cc7c189cccae10074c674390
---
M Transceiver52M/Makefile.am
M Transceiver52M/device/Makefile.am
A Transceiver52M/device/xtrx/Makefile.am
A Transceiver52M/device/xtrx/XTRXDevice.cpp
A Transceiver52M/device/xtrx/XTRXDevice.h
M configure.ac
M contrib/systemd/Makefile.am
A contrib/systemd/osmo-trx-xtrx.service
M debian/control
A debian/osmo-trx-xtrx.install
M doc/examples/Makefile.am
A doc/examples/osmo-trx-xtrx/osmo-trx-xtrx.cfg
12 files changed, 733 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/85/15685/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/15685
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I1067dfef53aa2669cc7c189cccae10074c674390
Gerrit-Change-Number: 15685
Gerrit-PatchSet: 2
Gerrit-Owner: rauf.gyulal...@fairwaves.co
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: ipse 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: newpatchset


Change in ...osmo-trx[master]: add XTRX support

2019-10-08 Thread ipse
ipse has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/15685 )

Change subject: add XTRX support
..


Patch Set 1:

(19 comments)

https://gerrit.osmocom.org/#/c/15685/1/Transceiver52M/device/xtrx/XTRXDevice.cpp
File Transceiver52M/device/xtrx/XTRXDevice.cpp:

https://gerrit.osmocom.org/#/c/15685/1/Transceiver52M/device/xtrx/XTRXDevice.cpp@37
PS1, Line 37: static int time_tx_corr = 60; //20+20+20+20+20;
> 20+20+20+20+20 is not 60 lol
Good point.


https://gerrit.osmocom.org/#/c/15685/1/Transceiver52M/device/xtrx/XTRXDevice.cpp@49
PS1, Line 49: << " rx_path(0): " << (rx_paths.size() ? 
rx_paths[0] : "<>")
> I don't remember now how tx_paths/rx_pathsa re generated, but I bet it's 
> always populated to be size […]
Looks like it can be 0 if we don't specify rx/tx-path in the config file.

Plus, does it really hurt to have here? Esp if no one remembers is it can be 
zero or not?


https://gerrit.osmocom.org/#/c/15685/1/Transceiver52M/device/xtrx/XTRXDevice.cpp@52
PS1, Line 52:   txsps = tx_sps;
> You can probably set those around line 42 out of the body of the function 
> (constructor initializers) […]
Yes, but it looks cleaner here and doesn't affect performance.


https://gerrit.osmocom.org/#/c/15685/1/Transceiver52M/device/xtrx/XTRXDevice.cpp@173
PS1, Line 173: bool XTRXDevice::start()
> trailing whitespace
Ack


https://gerrit.osmocom.org/#/c/15685/1/Transceiver52M/device/xtrx/XTRXDevice.cpp@177
PS1, Line 177:  return false;
> would be great checking other devices to see if we actually return true here.
What do you mean by "other devices" here?


https://gerrit.osmocom.org/#/c/15685/1/Transceiver52M/device/xtrx/XTRXDevice.cpp@194
PS1, Line 194:  xtrx_set_antenna(device, XTRX_TX_AUTO);
> so rx_path/tx_path VTY params are not really used yet?
Ack


https://gerrit.osmocom.org/#/c/15685/1/Transceiver52M/device/xtrx/XTRXDevice.cpp@230
PS1, Line 230: bool XTRXDevice::stop()
> trailing whitespace
Ack


https://gerrit.osmocom.org/#/c/15685/1/Transceiver52M/device/xtrx/XTRXDevice.cpp@265
PS1, Line 265: }
> trailing whitespace
Ack


https://gerrit.osmocom.org/#/c/15685/1/Transceiver52M/device/xtrx/XTRXDevice.cpp@280
PS1, Line 280:  int res = xtrx_set_gain(device, XTRX_CH_AB, XTRX_TX_PAD_GAIN, 
dB - 30, );
> db - 30 ?
I'll ask Sergey why is it done this way but I'm sure there is a reason for that.


https://gerrit.osmocom.org/#/c/15685/1/Transceiver52M/device/xtrx/XTRXDevice.cpp@311
PS1, Line 311:  TIMESTAMP 
timestamp, bool *underrun, unsigned *RSSI)
> Please fix indenting for params, they should be under the "(" character. ( in 
> all functions!).
Ack


https://gerrit.osmocom.org/#/c/15685/1/Transceiver52M/device/xtrx/XTRXDevice.cpp@322
PS1, Line 322:  int res = xtrx_recv_sync_ex(device, );
> You probably need to add code to use smpl_buf in here later on, not needed 
> for now though.
Ack


https://gerrit.osmocom.org/#/c/15685/1/Transceiver52M/device/xtrx/XTRXDevice.cpp@345
PS1, Line 345:  if (!started)
> I think this should never happen, because Transceiver stops threads calling 
> this function on those c […]
Does it hurt to check, just to be sure?


https://gerrit.osmocom.org/#/c/15685/1/Transceiver52M/device/xtrx/XTRXDevice.cpp@361
PS1, Line 361:  if (*underrun) {
> No need for brackets here.
Ack


https://gerrit.osmocom.org/#/c/15685/1/Transceiver52M/device/xtrx/XTRXDevice.cpp@370
PS1, Line 370:  LOG(ALERT) << "CH" << chan << ": RX ANTENNA: " << ant.c_str();
> probably want to add "(Not implemented)" here.
Ack


https://gerrit.osmocom.org/#/c/15685/1/Transceiver52M/device/xtrx/XTRXDevice.cpp@401
PS1, Line 401: bool XTRXDevice::updateAlignment(TIMESTAMP timestamp)
> trailing whitespace
Ack


https://gerrit.osmocom.org/#/c/15685/1/Transceiver52M/device/xtrx/XTRXDevice.cpp@403
PS1, Line 403:  LOG(ALERT) << "Update Aligment " << timestamp;
> Since requiresRadioAlign() returns false, this should never be called, right?
Correct. But it's an abstract virtual function and thus must be implemented.


https://gerrit.osmocom.org/#/c/15685/1/Transceiver52M/device/xtrx/XTRXDevice.cpp@419
PS1, Line 419:<< "actual freq: " << actual << 
std::endl;
> Fix indent.
Ack


https://gerrit.osmocom.org/#/c/15685/1/contrib/systemd/Makefile.am
File contrib/systemd/Makefile.am:

https://gerrit.osmocom.org/#/c/15685/1/contrib/systemd/Makefile.am@25
PS1, Line 25: EXTRA_DIST = $(SYSTEMD_SERVICES)
> That's wrong I'd say. […]
Ack


https://gerrit.osmocom.org/#/c/15685/1/doc/examples/osmo-trx-xtrx/osmo-trx-xtrx.cfg
File doc/examples/osmo-trx-xtrx/osmo-trx-xtrx.cfg:

https://gerrit.osmocom.org/#/c/15685/1/doc/examples/osmo-trx-xtrx/osmo-trx-xtrx.cfg@21
PS1, Line 21:   tx-path BAND1
> Do you use same names for tx/rx paths as LimeSUite? Otherwise this is wrong.
Ok, I think we should remove these since we're ignoring them anyway. We're not 

Build failure of network:osmocom:latest/osmo-trx in Debian_Testing/x86_64

2019-10-08 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-trx/Debian_Testing/x86_64

Package network:osmocom:latest/osmo-trx failed to build in Debian_Testing/x86_64

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

Last lines of build log:
[  408s] ar: `u' modifier ignored since `D' is the default (see `U')
[  408s] libtool: link: ranlib .libs/libtransceiver_common.a
[  408s] libtool: link: ( cd ".libs" && rm -f "libtransceiver_common.la" && ln 
-s "../libtransceiver_common.la" "libtransceiver_common.la" )
[  408s] /bin/bash ../libtool  --tag=CXX   --mode=link g++ -lpthread 
-I/usr/include/ -I/usr/include/ -I/usr/include/ -g -O2 
-fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat 
-Werror=format-security  -Wl,-z,relro -Wl,-z,now -o osmo-trx-uhd 
osmo_trx_uhd-osmo-trx.o ./device/uhd/libdevice.la libtransceiver_common.la 
../Transceiver52M/arch/x86/libarch.la ../GSM/libGSM.la 
../CommonLibs/libcommon.la -lfftw3f -ltalloc -losmocore -ltalloc -losmoctrl 
-losmogsm -losmocore -ltalloc -losmovty -losmocore -luhd 
[  409s] libtool: link: g++ -I/usr/include/ -I/usr/include/ -I/usr/include/ -g 
-O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong 
-Wformat -Werror=format-security -Wl,-z -Wl,relro -Wl,-z -Wl,now -o 
osmo-trx-uhd osmo_trx_uhd-osmo-trx.o  ./device/uhd/.libs/libdevice.a 
./.libs/libtransceiver_common.a ../Transceiver52M/arch/x86/.libs/libarch.a 
../GSM/.libs/libGSM.a ../CommonLibs/.libs/libcommon.a -lpthread -lfftw3f 
/usr/lib/x86_64-linux-gnu/libosmoctrl.so 
/usr/lib/x86_64-linux-gnu/libosmogsm.so -ltalloc 
/usr/lib/x86_64-linux-gnu/libosmovty.so 
/usr/lib/x86_64-linux-gnu/libosmocore.so -luhd
[  409s] /usr/bin/ld: ./device/uhd/.libs/libdevice.a(UHDDevice.o): undefined 
reference to symbol '_ZN5boost6system16generic_categoryEv'
[  409s] /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libboost_system.so.1.67.0: 
error adding symbols: DSO missing from command line
[  409s] collect2: error: ld returned 1 exit status
[  409s] make[4]: *** [Makefile:681: osmo-trx-uhd] Error 1
[  409s] make[4]: Leaving directory '/usr/src/packages/BUILD/Transceiver52M'
[  409s] make[3]: *** [Makefile:820: all-recursive] Error 1
[  409s] make[3]: Leaving directory '/usr/src/packages/BUILD/Transceiver52M'
[  409s] make[2]: *** [Makefile:513: all-recursive] Error 1
[  409s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  409s] make[1]: *** [Makefile:444: all] Error 2
[  409s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  409s] dh_auto_build: make -j1 returned exit code 2
[  409s] make: *** [debian/rules:6: build] Error 255
[  409s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[  409s] 
[  409s] morla5 failed "build osmo-trx_1.1.1.dsc" at Tue Oct  8 22:17:02 UTC 
2019.
[  409s] 
[  409s] ### VM INTERACTION START ###
[  412s] [  393.133229] sysrq: SysRq : Power Off
[  412s] [  393.146884] reboot: Power down
[  412s] ### VM INTERACTION END ###
[  412s] 
[  412s] morla5 failed "build osmo-trx_1.1.1.dsc" at Tue Oct  8 22:17:06 UTC 
2019.
[  412s] 

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


Change in ...osmo-sgsn[master]: sgsn_libgtp: refactor ps paging into gprs_gb

2019-10-08 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15547 )

Change subject: sgsn_libgtp: refactor ps paging into gprs_gb
..


Patch Set 3: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/#/c/15547/3/include/osmocom/sgsn/gprs_gb.h
File include/osmocom/sgsn/gprs_gb.h:

https://gerrit.osmocom.org/#/c/15547/3/include/osmocom/sgsn/gprs_gb.h@13
PS3, Line 13: /* page a MS in it routing area */
> Done
nope



--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15547
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I3020020f52005aa460ca6b245ee2297aec9821b3
Gerrit-Change-Number: 15547
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 21:51:20 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: lynxis lazus 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in ...osmo-bts[master]: L1SAP: use GSMTAP_CHANNEL_PDTCH for PDTCH blocks by default

2019-10-08 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/15715


Change subject: L1SAP: use GSMTAP_CHANNEL_PDTCH for PDTCH blocks by default
..

L1SAP: use GSMTAP_CHANNEL_PDTCH for PDTCH blocks by default

We don't know whether a data block on PDCH belongs to PDTCH or PACCH
without parsing it, because the latter one is being allocated on
demand. Let's use GSMTAP_CHANNEL_PDTCH by default, rather than
GSMTAP_CHANNEL_PACCH.

Change-Id: I7639215ef936a8ac05ca417a91f4e12755f318d4
---
M src/common/l1sap.c
1 file changed, 4 insertions(+), 2 deletions(-)



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

diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 7d403f0..87ef01b 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -333,8 +333,10 @@
if (L1SAP_IS_PTCCH(fn)) {
*chan_type = GSMTAP_CHANNEL_PTCCH;
*ss = L1SAP_FN2PTCCHBLOCK(fn);
-   } else
-   *chan_type = GSMTAP_CHANNEL_PACCH;
+   } else {
+   /* TODO: distinguish PACCH */
+   *chan_type = GSMTAP_CHANNEL_PDTCH;
+   }

return 0;
 }

--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15715
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I7639215ef936a8ac05ca417a91f4e12755f318d4
Gerrit-Change-Number: 15715
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


Change in ...osmo-bts[master]: L1SAP: fix gsmtap_pdch(): there can be no DATA.ind on PTCCH/U

2019-10-08 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/15714


Change subject: L1SAP: fix gsmtap_pdch(): there can be no DATA.ind on PTCCH/U
..

L1SAP: fix gsmtap_pdch(): there can be no DATA.ind on PTCCH/U

Change-Id: Id69010ffa8c697e8c01bbb21509253c330f95343
---
M src/common/l1sap.c
1 file changed, 0 insertions(+), 7 deletions(-)



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

diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 0696fab..7d403f0 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -333,13 +333,6 @@
if (L1SAP_IS_PTCCH(fn)) {
*chan_type = GSMTAP_CHANNEL_PTCCH;
*ss = L1SAP_FN2PTCCHBLOCK(fn);
-   if (l1sap->oph.primitive == PRIM_OP_INDICATION) {
-   OSMO_ASSERT(len > 0);
-   if ((*data[0]) == 7)
-   return -EINVAL;
-   (*data)++;
-   (*len)--;
-   }
} else
*chan_type = GSMTAP_CHANNEL_PACCH;


--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15714
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Id69010ffa8c697e8c01bbb21509253c330f95343
Gerrit-Change-Number: 15714
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


Change in ...osmo-bts[master]: L1SAP: use the actual ARFCN for outgoing PCUIF messages

2019-10-08 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/15713


Change subject: L1SAP: use the actual ARFCN for outgoing PCUIF messages
..

L1SAP: use the actual ARFCN for outgoing PCUIF messages

Change-Id: I07b3aac97603d85fb6cf077d3a342b12b0643171
---
M src/common/l1sap.c
1 file changed, 4 insertions(+), 4 deletions(-)



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

diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 67d569b..0696fab 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -802,10 +802,10 @@
} else {
/* forward RTS.ind to PCU */
if (L1SAP_IS_PTCCH(rts_ind->fn)) {
-   pcu_tx_rts_req(>ts[tn], 1, fn, 1 /* ARFCN 
*/,
+   pcu_tx_rts_req(>ts[tn], 1, fn, trx->arfcn,
L1SAP_FN2PTCCHBLOCK(fn));
} else {
-   pcu_tx_rts_req(>ts[tn], 0, fn, 0 /* ARFCN 
*/,
+   pcu_tx_rts_req(>ts[tn], 0, fn, trx->arfcn,
L1SAP_FN2MACBLOCK(fn));
}
/* return early, PCU takes care of rest */
@@ -1135,7 +1135,7 @@
return -EINVAL;
if (L1SAP_IS_PTCCH(fn)) {
pcu_tx_data_ind(>ts[tn], PCU_IF_SAPI_PTCCH, fn,
-   0 /* ARFCN */, L1SAP_FN2PTCCHBLOCK(fn),
+   trx->arfcn, L1SAP_FN2PTCCHBLOCK(fn),
data, len, rssi, data_ind->ber10k,
data_ind->ta_offs_256bits/64,
data_ind->lqual_cb);
@@ -1144,7 +1144,7 @@
if (pr_info != PRES_INFO_BOTH)
return 0;
/* PDTCH / PACCH frame handling */
-   pcu_tx_data_ind(>ts[tn], PCU_IF_SAPI_PDTCH, fn, 0 
/* ARFCN */,
+   pcu_tx_data_ind(>ts[tn], PCU_IF_SAPI_PDTCH, fn, 
trx->arfcn,
L1SAP_FN2MACBLOCK(fn), data, len, rssi, 
data_ind->ber10k,
data_ind->ta_offs_256bits/64, 
data_ind->lqual_cb);
}

--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15713
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I07b3aac97603d85fb6cf077d3a342b12b0643171
Gerrit-Change-Number: 15713
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


Change in ...osmo-bts[master]: L1SAP: there can be no DATA.ind primitives on PTCCH/U, reject them

2019-10-08 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/15716


Change subject: L1SAP: there can be no DATA.ind primitives on PTCCH/U, reject 
them
..

L1SAP: there can be no DATA.ind primitives on PTCCH/U, reject them

Change-Id: Ib846a9b8e619c7da56b5f0a54d16f629913af80d
---
M src/common/l1sap.c
1 file changed, 19 insertions(+), 16 deletions(-)



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

diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 87ef01b..ffb638e 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1109,11 +1109,21 @@
DEBUGPGT(DL1P, _time, "Rx PH-DATA.ind chan_nr=%s link_id=0x%02x 
len=%d\n",
 rsl_chan_nr_str(chan_nr), link_id, len);

+   /* Actually, there can be no DATA.ind on PTCCH/U (rather RACH.ind 
instead),
+* but some BTS models with buggy implementation may still be sending 
them
+* to us. Let's keep this for backwards compatibility. */
+   if (L1SAP_IS_CHAN_PDCH(chan_nr) && L1SAP_IS_PTCCH(fn)) {
+   LOGPGT(DL1P, LOGL_NOTICE, _time, "There can be no DATA.ind on 
PTCCH/U. "
+  "This is probably a bug of the BTS model you're using, 
please fix!\n");
+   return -EINVAL;
+
+   }
+
if (ts_is_pdch(>ts[tn])) {
lchan = get_lchan_by_chan_nr(trx, chan_nr);
if (!lchan)
LOGPGT(DL1P, LOGL_ERROR, _time, "No lchan for 
chan_nr=%s\n", rsl_chan_nr_str(chan_nr));
-   if (lchan && lchan->loopback && !L1SAP_IS_PTCCH(fn)) {
+   if (lchan && lchan->loopback) {
/* we are in loopback mode (for BER testing)
 * mode and need to enqeue the frame to be
 * returned in downlink */
@@ -1128,21 +1138,14 @@
/* don't send bad frames to PCU */
if (len == 0)
return -EINVAL;
-   if (L1SAP_IS_PTCCH(fn)) {
-   pcu_tx_data_ind(>ts[tn], PCU_IF_SAPI_PTCCH, fn,
-   trx->arfcn, L1SAP_FN2PTCCHBLOCK(fn),
-   data, len, rssi, data_ind->ber10k,
-   data_ind->ta_offs_256bits/64,
-   data_ind->lqual_cb);
-   } else {
-   /* drop incomplete UL block */
-   if (pr_info != PRES_INFO_BOTH)
-   return 0;
-   /* PDTCH / PACCH frame handling */
-   pcu_tx_data_ind(>ts[tn], PCU_IF_SAPI_PDTCH, fn, 
trx->arfcn,
-   L1SAP_FN2MACBLOCK(fn), data, len, rssi, 
data_ind->ber10k,
-   data_ind->ta_offs_256bits/64, 
data_ind->lqual_cb);
-   }
+   /* drop incomplete UL block */
+   if (pr_info != PRES_INFO_BOTH)
+   return 0;
+
+   /* PDTCH / PACCH frame handling */
+   pcu_tx_data_ind(>ts[tn], PCU_IF_SAPI_PDTCH, fn, trx->arfcn,
+   L1SAP_FN2MACBLOCK(fn), data, len, rssi, 
data_ind->ber10k,
+   data_ind->ta_offs_256bits/64, 
data_ind->lqual_cb);
return 0;
}


--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15716
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ib846a9b8e619c7da56b5f0a54d16f629913af80d
Gerrit-Change-Number: 15716
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


Change in ...osmo-bts[master]: bts-trx: Time out if no clock ind recvd after RSP POWERON

2019-10-08 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/15706 )

Change subject: bts-trx: Time out if no clock ind recvd after RSP POWERON
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15706
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Iba5dbe867aff10e70ec73dbf1f7aeeecb15c0a4d
Gerrit-Change-Number: 15706
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 08 Oct 2019 20:44:03 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: sgsn: Gb: implementing PS Paging when MS is MM_STANDBY

2019-10-08 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15705 )

Change subject: sgsn: Gb: implementing PS Paging when MS is MM_STANDBY
..


Patch Set 5: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15705
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Icc2c6ba70f8f74054546a1e31741fc90b232a23c
Gerrit-Change-Number: 15705
Gerrit-PatchSet: 5
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 20:43:23 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: sgsn_mm_ctx_alloc(): check for unallocated fsms

2019-10-08 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15704 )

Change subject: sgsn_mm_ctx_alloc(): check for unallocated fsms
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15704
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I867612a60236eaf7009400c92f5d871006aaf008
Gerrit-Change-Number: 15704
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 20:38:32 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: sgsn_mm_ctx_alloc(): check for unallocated fsms

2019-10-08 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15704 )

Change subject: sgsn_mm_ctx_alloc(): check for unallocated fsms
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/15704/1/src/sgsn/gprs_sgsn.c
File src/sgsn/gprs_sgsn.c:

https://gerrit.osmocom.org/#/c/15704/1/src/sgsn/gprs_sgsn.c@270
PS1, Line 270:  osmo_fsm_inst_free(ctx->iu.mm_state_fsm);
> it does not guard against it.
it would be worth a separate change to libosmocore to fix that.  However, 
applications still must have their own null-checks for the time being, as long 
as they still work with older released libosmocore versions :/



--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15704
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I867612a60236eaf7009400c92f5d871006aaf008
Gerrit-Change-Number: 15704
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Comment-Date: Tue, 08 Oct 2019 20:38:19 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: lynxis lazus 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: sgsn_libgtp: refactor ps paging into gprs_gb

2019-10-08 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15547 )

Change subject: sgsn_libgtp: refactor ps paging into gprs_gb
..


Patch Set 3: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15547
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I3020020f52005aa460ca6b245ee2297aec9821b3
Gerrit-Change-Number: 15547
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 20:37:23 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: sgsn_libgtp: refactor ps paging into gprs_gb

2019-10-08 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15547 )

Change subject: sgsn_libgtp: refactor ps paging into gprs_gb
..


Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/#/c/15547/2/src/sgsn/gprs_gb.c
File src/sgsn/gprs_gb.c:

https://gerrit.osmocom.org/#/c/15547/2/src/sgsn/gprs_gb.c@90
PS2, Line 90:   /* FIXME: page whole routing area, not only the last known cell 
*/
> I'm not sure if paging should be done at all for MS in SUSPEND. […]
I also would assume that packet paging while in SUSPEND is actually a 
contradiction in itself.  IF the MS sends us a GMM SUSPEND, then it's to tell 
us that it's entering dedicated mode on circuit-switched services (and is not 
DTM capable), and hence not reachable for GPRS.

But this can be adressed in a separate follow-up patch.



--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15547
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I3020020f52005aa460ca6b245ee2297aec9821b3
Gerrit-Change-Number: 15547
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Comment-Date: Tue, 08 Oct 2019 20:37:17 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: lynxis lazus 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: sgsn: delay f_gmm_attach() by 50ms

2019-10-08 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15703 )

Change subject: sgsn: delay f_gmm_attach() by 50ms
..


Patch Set 2: Code-Review+2

i woner if 50ms is sufficient, but lets give it a try :)


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15703
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I0209c86e16fe616284d753e9e003f2e4d9ec9ea5
Gerrit-Change-Number: 15703
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 20:34:57 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-bts[master]: bts-trx: Log TRXC and TRXD socket recv()/send() failures

2019-10-08 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/15702 )

Change subject: bts-trx: Log TRXC and TRXD socket recv()/send() failures
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15702
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ic3e41d82b43459495d45873d612a3bd349ac174a
Gerrit-Change-Number: 15702
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 20:33:39 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: gprs_gmm: release Iu connection on RAU failures

2019-10-08 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15551 )

Change subject: gprs_gmm: release Iu connection on RAU failures
..

gprs_gmm: release Iu connection on RAU failures

When a RAU fails without an a GMM context, release the Iu
connection after sending a response.

Change-Id: I05a9200f55d608ccfb3f86184c324a2b428da76b
---
M src/sgsn/gprs_gmm.c
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c
index afae369..b6b1685 100644
--- a/src/sgsn/gprs_gmm.c
+++ b/src/sgsn/gprs_gmm.c
@@ -1699,6 +1699,12 @@
mm_ctx_cleanup_free(mmctx, "GPRS RA UPDATE REJ");
else if (llme)
gprs_llgmm_unassign(llme);
+#ifdef BUILD_IU
+   else if (MSG_IU_UE_CTX(msg)) {
+   unsigned long X1001 = osmo_tdef_get(sgsn->cfg.T_defs, -1001, 
OSMO_TDEF_S, -1);
+   ranap_iu_tx_release_free(MSG_IU_UE_CTX(msg), NULL, (int) X1001);
+   }
+#endif

return rc;
 }

--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15551
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I05a9200f55d608ccfb3f86184c324a2b428da76b
Gerrit-Change-Number: 15551
Gerrit-PatchSet: 13
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in ...osmo-sgsn[master]: gprs_gmm: release Iu connection on RAU failures

2019-10-08 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15551 )

Change subject: gprs_gmm: release Iu connection on RAU failures
..


Patch Set 12: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15551
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I05a9200f55d608ccfb3f86184c324a2b428da76b
Gerrit-Change-Number: 15551
Gerrit-PatchSet: 12
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 20:31:54 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: ranap: add non-spec X1001

2019-10-08 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15701 )

Change subject: ranap: add non-spec X1001
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15701
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I39a0169c22a4ac430b3d6f3c281d1f381eaa4756
Gerrit-Change-Number: 15701
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 20:31:24 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: ranap: add non-spec X1001

2019-10-08 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15701 )

Change subject: ranap: add non-spec X1001
..

ranap: add non-spec X1001

When the SGSN releases a RANAP connection, it sends a Release Command
and waits for a Release Complete. Use X1001 to release the Iu connection
when the Release Complete is lost/never received.

Change-Id: I39a0169c22a4ac430b3d6f3c281d1f381eaa4756
---
M src/sgsn/gprs_ranap.c
M src/sgsn/sgsn_vty.c
M tests/test_nodes.vty
3 files changed, 12 insertions(+), 3 deletions(-)

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



diff --git a/src/sgsn/gprs_ranap.c b/src/sgsn/gprs_ranap.c
index 9c7a5db..7a33491 100644
--- a/src/sgsn/gprs_ranap.c
+++ b/src/sgsn/gprs_ranap.c
@@ -25,6 +25,7 @@
 #include 

 #include 
+#include 

 #include 

@@ -162,8 +163,6 @@
return rc;
 }

-/* TODO: use timers */
-#define TIMEOUT_RANAP_RELEASE_SEC 5
 void sgsn_ranap_iu_free(struct sgsn_mm_ctx *ctx)
 {
if (!ctx)
@@ -179,15 +178,19 @@
 void sgsn_ranap_iu_release_free(struct sgsn_mm_ctx *ctx,
const struct RANAP_Cause *cause)
 {
+   unsigned long X1001;
+
if (!ctx)
return;

if (!ctx->iu.ue_ctx)
return;

+   X1001 = osmo_tdef_get(sgsn->cfg.T_defs, -1001, OSMO_TDEF_S, -1);
+
ranap_iu_tx_release_free(ctx->iu.ue_ctx,
 cause,
-TIMEOUT_RANAP_RELEASE_SEC);
+(int) X1001);
ctx->iu.ue_ctx = NULL;
 }

diff --git a/src/sgsn/sgsn_vty.c b/src/sgsn/sgsn_vty.c
index 17b64c8..14248d1 100644
--- a/src/sgsn/sgsn_vty.c
+++ b/src/sgsn/sgsn_vty.c
@@ -90,6 +90,9 @@
 #define GSM0408_T3395_SECS 8   /* wait for DEACT PDP CTX ACK */
 #define GSM0408_T3397_SECS 8   /* wait for DEACT AA PDP CTX ACK */

+/* Non spec timer */
+#define NONSPEC_X1001_SECS 5   /* wait for a RANAP Release Complete */
+

 static struct osmo_tdef sgsn_T_defs[] = {
{ .T=3312, .default_val=GSM0408_T3312_SECS, .desc="Periodic RA Update 
timer (s)" },
@@ -105,6 +108,8 @@
{ .T=3395, .default_val=GSM0408_T3395_SECS, .desc="Wait for DEACT PDP 
CTX ACK timer (s)" },
{ .T=3397, .default_val=GSM0408_T3397_SECS, .desc="Wait for DEACT AA 
PDP CTX ACK timer (s)" },
/* non spec timers */
+   { .T=-1001, .default_val=NONSPEC_X1001_SECS, .desc="RANAP Release 
timeout. Wait for RANAP Release Complete."
+  "On expiry release 
Iu connection (s)" },
{ .T=-3314, .default_val=GSM0408_T3314_SECS, .desc="Iu User inactivity 
timer. On expiry release Iu connection (s)" },
{}
 };
diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty
index b9cf91e..18bccc8 100644
--- a/tests/test_nodes.vty
+++ b/tests/test_nodes.vty
@@ -12,6 +12,7 @@
 T3386 = 8 sWait for MODIFY PDP CTX ACK timer (s) (default: 8 s)
 T3395 = 8 sWait for DEACT PDP CTX ACK timer (s) (default: 8 s)
 T3397 = 8 sWait for DEACT AA PDP CTX ACK timer (s) (default: 8 s)
+X1001 = 5 sRANAP Release timeout. Wait for RANAP Release Complete.On 
expiry release Iu connection (s) (default: 5 s)
 X3314 = 44 s   Iu User inactivity timer. On expiry release Iu connection (s) 
(default: 44 s)
 OsmoSGSN# configure terminal
 OsmoSGSN(config)# list

--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15701
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I39a0169c22a4ac430b3d6f3c281d1f381eaa4756
Gerrit-Change-Number: 15701
Gerrit-PatchSet: 4
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in ...osmo-ttcn3-hacks[master]: bts: Fix race condition in f_dyn_ipa_pdch_(de)act

2019-10-08 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15700 )

Change subject: bts: Fix race condition in f_dyn_ipa_pdch_(de)act
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15700
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I323852632341c19837bebfcf2f00d404151367a7
Gerrit-Change-Number: 15700
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 08 Oct 2019 20:29:21 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: bts: Fix race condition in f_dyn_ipa_pdch_(de)act

2019-10-08 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15700 )

Change subject: bts: Fix race condition in f_dyn_ipa_pdch_(de)act
..

bts: Fix race condition in f_dyn_ipa_pdch_(de)act

Test BTS_Tests.TC_dyn_osmo_pdch_act_deact was sporadically failing due
to receiving IND_INFO on the PCU port with pdch_mask related TS bit set
to 0 after sending a PDCH ACT. That happened due to a race condition
because PCU send IND_INFO periodically. As a result, it can happen that
BTS sends an IND_INFO after PCU.clear was called and before the PDCH ACT
is handled.

Commit 446e07bc77ba2a1d08673cfeda6d4b6a72f49a77 already did same fix for
f_dyn_ipa_pdch_(de)act() family, but didn't change this one.

Change-Id: I323852632341c19837bebfcf2f00d404151367a7
---
M bts/BTS_Tests.ttcn
1 file changed, 18 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 2c11ca2..f2861d1 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -4899,13 +4899,21 @@
PCU.clear;
f_rsl_chan_act(g_pars.chan_mode);
/* expect INFO_IND on PCU interface listing TS as PDCH */
+   timer T_wait := 2.0;
+   T_wait.start;
alt {
[] PCU.receive(t_SD_PCUIF(pcu_conn_id, tr_PCUIF_INFO_IND(bts_nr, ?))) 
-> value sd {
if (substr(sd.data.u.info_ind.trx[trx_nr].pdch_mask, 
g_chan_nr.tn, 1) != '1'B) {
-   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, 
"PCUIF_INFO_IND PDCH_MASK not '1' after PDCH ACT");
+   log("PCUIF_INFO_IND PDCH_MASK not yet '1' after PDCH 
ACT on TS", g_chan_nr.tn,
+   " mask:", sd.data.u.info_ind.trx[trx_nr].pdch_mask);
+   repeat;
}
}
[] PCU.receive { repeat; }
+   [] T_wait.timeout {
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+   log2str("Timeout waiting for PCUIF_INFO_IND PDCH_MASK 
to be '1' on TS", g_chan_nr.tn));
+   }
}
/* try to activate this PDCH from the PCU point of view */
PCU.send(t_SD_PCUIF(pcu_conn_id, ts_PCUIF_ACT_REQ(bts_nr, trx_nr, 
g_chan_nr.tn)));
@@ -4919,13 +4927,21 @@
PCU.clear;
RSL.send(ts_RSL_RF_CHAN_REL(g_chan_nr));
/* expect BTS to ask PCU to deactivate the channel */
+   timer T_wait := 2.0;
+   T_wait.start;
alt {
[] PCU.receive(t_SD_PCUIF(pcu_conn_id, tr_PCUIF_INFO_IND(bts_nr, ?))) 
-> value sd {
if (substr(sd.data.u.info_ind.trx[trx_nr].pdch_mask, 
g_chan_nr.tn, 1) != '0'B) {
-   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, 
"PCUIF_INFO_IND PDCH_MASK not '0' after PDCH DEACT");
+   log("PCUIF_INFO_IND PDCH_MASK not yet '0' after PDCH 
DEACT on TS", g_chan_nr.tn,
+   " mask:", sd.data.u.info_ind.trx[trx_nr].pdch_mask);
+   repeat;
}
}
[] PCU.receive { repeat; }
+   [] T_wait.timeout {
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+   log2str("Timeout waiting for PCUIF_INFO_IND PDCH_MASK 
to be '0' on TS", g_chan_nr.tn));
+   }
}
/* Emulate PCU asking BTS to deactivate PDCH */
PCU.send(t_SD_PCUIF(pcu_conn_id, ts_PCUIF_DEACT_REQ(bts_nr, trx_nr, 
g_chan_nr.tn)));

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15700
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I323852632341c19837bebfcf2f00d404151367a7
Gerrit-Change-Number: 15700
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in ...osmo-hlr[master]: tests/test_nodes.vty: check less libosmocore cmds

2019-10-08 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-hlr/+/15698 )

Change subject: tests/test_nodes.vty: check less libosmocore cmds
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15698
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I4a964b86195141e5a50705425206f3602f908999
Gerrit-Change-Number: 15698
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 20:28:36 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-hlr[master]: tests/test_nodes.vty: check less libosmocore cmds

2019-10-08 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-hlr/+/15698 )

Change subject: tests/test_nodes.vty: check less libosmocore cmds
..

tests/test_nodes.vty: check less libosmocore cmds

Use three dots to avoid checking for exact commands between help and
exit, which originate from libosmocore. This avoids test failues when
we slightly change the commands, like the change from "write file" to
"write file [PATH]" in [1] that is currently causing the vty tests to
fail.

[1] libosmocore I38edcf902a08b6bd0ebb9aa6fc1a7041421af525
Change-Id: I4a964b86195141e5a50705425206f3602f908999
---
M tests/test_nodes.vty
1 file changed, 4 insertions(+), 24 deletions(-)

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



diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty
index bf2afaf..2be9617 100644
--- a/tests/test_nodes.vty
+++ b/tests/test_nodes.vty
@@ -27,12 +27,7 @@
 OsmoHLR> enable
 OsmoHLR# list
   help
-  list
-  write terminal
-  write file
-  write memory
-  write
-  show running-config
+...
   exit
   disable
   configure terminal
@@ -52,12 +47,7 @@
 OsmoHLR# configure terminal
 OsmoHLR(config)# list
   help
-  list
-  write terminal
-  write file
-  write memory
-  write
-  show running-config
+...
   exit
   end
 ...
@@ -66,12 +56,7 @@
 OsmoHLR(config)# hlr
 OsmoHLR(config-hlr)# list
   help
-  list
-  write terminal
-  write file
-  write memory
-  write
-  show running-config
+...
   exit
   end
   gsup
@@ -92,12 +77,7 @@
 OsmoHLR(config-hlr)# gsup
 OsmoHLR(config-hlr-gsup)# list
   help
-  list
-  write terminal
-  write file
-  write memory
-  write
-  show running-config
+...
   exit
   end
   bind ip A.B.C.D

--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15698
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I4a964b86195141e5a50705425206f3602f908999
Gerrit-Change-Number: 15698
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in ...osmo-bts[master]: L1SAP: refactor handling of Access Bursts on PDCH

2019-10-08 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/15711 )

Change subject: L1SAP: refactor handling of Access Bursts on PDCH
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15711
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I461fde9f4543c45c42b591cd3fd0ff3d98673cec
Gerrit-Change-Number: 15711
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 20:27:33 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-bts[master]: L1SAP: properly handle 11-bit encoded RACH.ind in gsmtap_ph_rach()

2019-10-08 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/15712 )

Change subject: L1SAP: properly handle 11-bit encoded RACH.ind in 
gsmtap_ph_rach()
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15712
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Id263c2b716fd282d37d705a1c5f430ce7c0edaf0
Gerrit-Change-Number: 15712
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 08 Oct 2019 20:27:51 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-bts[master]: L1SAP: do not pass unused parameter to l1sap_handover_rach()

2019-10-08 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/15710 )

Change subject: L1SAP: do not pass unused parameter to l1sap_handover_rach()
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15710
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I7f2d909f1bde09cbec106240df290381b3418e46
Gerrit-Change-Number: 15710
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 08 Oct 2019 20:27:06 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-bts[master]: L1SAP: clarify debug messages in rach_pass_filter()

2019-10-08 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/15709 )

Change subject: L1SAP: clarify debug messages in rach_pass_filter()
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15709
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I1e5ca9930ab491a6916c972865154d54530cbf51
Gerrit-Change-Number: 15709
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 08 Oct 2019 20:26:52 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-bts[master]: L1SAP: also consider RSL_CHAN_OSMO_CBCH8 as CBCH

2019-10-08 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/15708 )

Change subject: L1SAP: also consider RSL_CHAN_OSMO_CBCH8 as CBCH
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15708
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I2f6d501a29edaf89dfb17d5d64f930cdb1943630
Gerrit-Change-Number: 15708
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 08 Oct 2019 20:26:34 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-bts[master]: L1SAP: use RSL_CHAN_* definitions from libosmogsm

2019-10-08 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/15707 )

Change subject: L1SAP: use RSL_CHAN_* definitions from libosmogsm
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15707
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I2708b5d5bb6b92f90766ac752bafd28cff2549b0
Gerrit-Change-Number: 15707
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Tue, 08 Oct 2019 20:26:10 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-bts[master]: L1SAP: refactor handling of Access Bursts on PDCH

2019-10-08 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/15711 )

Change subject: L1SAP: refactor handling of Access Bursts on PDCH
..


Patch Set 1:

looks good to me, but I think we still need to also have a similar filter on 
the PCU side as osmo-bts-{sysmo,lc15,oc2g} feed all L1 primitives on P* SAPIs 
directly to the PCU, bypassing the BTS for efficiency reasons.


--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15711
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I461fde9f4543c45c42b591cd3fd0ff3d98673cec
Gerrit-Change-Number: 15711
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Comment-Date: Tue, 08 Oct 2019 20:25:44 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in ...osmo-bts[master]: L1SAP: clarify debug messages in rach_pass_filter()

2019-10-08 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/15709


Change subject: L1SAP: clarify debug messages in rach_pass_filter()
..

L1SAP: clarify debug messages in rach_pass_filter()

RACH stands for Random Access CHannel, while in rach_pass_filter()
we're dealing with Access Bursts, that may be received on other
logical channels too (e.g. PTCCH, PDTCH or any other).

Change-Id: I1e5ca9930ab491a6916c972865154d54530cbf51
---
M src/common/l1sap.c
1 file changed, 3 insertions(+), 3 deletions(-)



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

diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index ac1c99d..54953b0 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1258,7 +1258,7 @@

/* Check for RACH exceeding BER threshold (ghost RACH) */
if (rach_ind->ber10k > bts->max_ber10k_rach) {
-   LOGPFN(DL1C, LOGL_INFO, rach_ind->fn, "Ignoring RACH request: "
+   LOGPFN(DL1C, LOGL_INFO, rach_ind->fn, "Ignoring an Access 
Burst: "
"BER10k(%u) > BER10k_MAX(%u)\n",
rach_ind->ber10k, bts->max_ber10k_rach);
return false;
@@ -1270,7 +1270,7 @@
 * according to maximal allowed Timing Advance value.
 */
if (toa256 < RACH_MIN_TOA256 || toa256 > bts->max_ta * 256) {
-   LOGPFN(DL1C, LOGL_INFO, rach_ind->fn, "Ignoring RACH request: "
+   LOGPFN(DL1C, LOGL_INFO, rach_ind->fn, "Ignoring an Access 
Burst: "
"ToA(%d) exceeds the allowed range (%d..%d)\n",
toa256, RACH_MIN_TOA256, bts->max_ta * 256);
return false;
@@ -1278,7 +1278,7 @@

/* Link quality defined by C/I (Carrier-to-Interference ratio) */
if (rach_ind->lqual_cb < bts->min_qual_rach) {
-   LOGPFN(DL1C, LOGL_INFO, rach_ind->fn, "Ignoring RACH request: "
+   LOGPFN(DL1C, LOGL_INFO, rach_ind->fn, "Ignoring an Access 
Burst: "
"link quality (%d) below the minimum (%d)\n",
rach_ind->lqual_cb, bts->min_qual_rach);
return false;

--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15709
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I1e5ca9930ab491a6916c972865154d54530cbf51
Gerrit-Change-Number: 15709
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


Change in ...osmo-bts[master]: L1SAP: also consider RSL_CHAN_OSMO_CBCH8 as CBCH

2019-10-08 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/15708


Change subject: L1SAP: also consider RSL_CHAN_OSMO_CBCH8 as CBCH
..

L1SAP: also consider RSL_CHAN_OSMO_CBCH8 as CBCH

Currently we don't distinguish between CBCH on BCCH+SDCCH/4 and
CBCH on SDCCH/8, but in libosmogsm we have two independent
(non-standard) RSL channel number values for them. Maybe some day
we will, so let's extend the definition of L1SAP_IS_CHAN_CBCH.

Change-Id: I2f6d501a29edaf89dfb17d5d64f930cdb1943630
---
M include/osmo-bts/l1sap.h
1 file changed, 2 insertions(+), 1 deletion(-)



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

diff --git a/include/osmo-bts/l1sap.h b/include/osmo-bts/l1sap.h
index ccfcacc..7ae5d38 100644
--- a/include/osmo-bts/l1sap.h
+++ b/include/osmo-bts/l1sap.h
@@ -35,7 +35,8 @@
 #define L1SAP_IS_CHAN_PDCH(chan_nr) \
((chan_nr & 0xf8) == RSL_CHAN_OSMO_PDCH)
 #define L1SAP_IS_CHAN_CBCH(chan_nr) \
-   ((chan_nr & 0xf8) == RSL_CHAN_OSMO_CBCH4)
+   ((chan_nr & 0xf8) == RSL_CHAN_OSMO_CBCH4) \
+   || ((chan_nr & 0xf8) == RSL_CHAN_OSMO_CBCH8)

 /* rach type from ra */
 #define L1SAP_IS_PACKET_RACH(ra) ((ra & 0xf0) == 0x70 && (ra & 0x0f) != 0x0f)

--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15708
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I2f6d501a29edaf89dfb17d5d64f930cdb1943630
Gerrit-Change-Number: 15708
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


Change in ...osmo-bts[master]: L1SAP: refactor handling of Access Bursts on PDCH

2019-10-08 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/15711


Change subject: L1SAP: refactor handling of Access Bursts on PDCH
..

L1SAP: refactor handling of Access Bursts on PDCH

First of all, we also need to apply the same filtering to Access
Bursts on PDCH as for the normal ones on RACH, i.e. filter them
by ToA (Timing of Arrival) and BER (Bit Error Rate).

Secondly, we shall not interpret Access Bursts on PDTCH/U as
handover related ones. Instead, let's print a warning and
ignore them since they are not (yet) supported by OsmoBTS.

Finally, in gsmtap_pdch() we need to set a proper channel type
for Access Bursts received on PDCH (PDTCH/U or PTCCH/U).

Change-Id: I461fde9f4543c45c42b591cd3fd0ff3d98673cec
---
M src/common/l1sap.c
1 file changed, 47 insertions(+), 19 deletions(-)



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

diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 93a70cd..06de8a3 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -349,18 +349,27 @@
 static int gsmtap_ph_rach(struct osmo_phsap_prim *l1sap, uint8_t *chan_type,
uint8_t *tn, uint8_t *ss, uint32_t *fn, uint8_t **data, unsigned int 
*len)
 {
-   uint8_t chan_nr;
+   uint8_t chan_nr = l1sap->u.rach_ind.chan_nr;

*chan_type = GSMTAP_CHANNEL_RACH;
*fn = l1sap->u.rach_ind.fn;
-   *tn = L1SAP_CHAN2TS(l1sap->u.rach_ind.chan_nr);
-   chan_nr = l1sap->u.rach_ind.chan_nr;
+   *tn = L1SAP_CHAN2TS(chan_nr);
+
if (L1SAP_IS_CHAN_TCHH(chan_nr))
*ss = L1SAP_CHAN2SS_TCHH(chan_nr);
else if (L1SAP_IS_CHAN_SDCCH4(chan_nr))
*ss = L1SAP_CHAN2SS_SDCCH4(chan_nr);
else if (L1SAP_IS_CHAN_SDCCH8(chan_nr))
*ss = L1SAP_CHAN2SS_SDCCH8(chan_nr);
+   else if (L1SAP_IS_CHAN_PDCH(chan_nr)) {
+   if (L1SAP_IS_PTCCH(*fn)) {
+   /* TODO: calculate sub-slot from frame-number */
+   *chan_type = GSMTAP_CHANNEL_PTCCH;
+   } else {
+   *chan_type = GSMTAP_CHANNEL_PDTCH;
+   }
+   }
+
*data = (uint8_t *)>u.rach_ind.ra;
*len = 1;

@@ -1303,6 +1312,32 @@
return 0;
 }

+/* Special case for Access Bursts on PDTCH/U or PTCCH/U */
+static int l1sap_pdch_rach(struct gsm_bts_trx *trx, struct ph_rach_ind_param 
*rach_ind)
+{
+   /* Filter out noise / interference / ghosts */
+   if (!rach_pass_filter(rach_ind, trx->bts))
+   return -EAGAIN;
+
+   /* PTCCH/U (Packet Timing Advance Control Channel) */
+   if (L1SAP_IS_PTCCH(rach_ind->fn)) {
+   LOGPFN(DL1P, LOGL_DEBUG, rach_ind->fn,
+  /* TODO: calculate and print Timing Advance Index */
+  "Access Burst for continuous Timing Advance control 
(toa256=%d)\n",
+  rach_ind->acc_delay_256bits);
+
+   /* QTA: Timing Advance in units of 1/4 of a symbol */
+   pcu_tx_rach_ind(trx->bts, rach_ind->acc_delay_256bits >> 6,
+   rach_ind->ra, rach_ind->fn, rach_ind->is_11bit,
+   rach_ind->burst_type, PCU_IF_SAPI_PTCCH);
+   return 0;
+   } else { /* The MS may acknowledge DL data by 4 consequent Access 
Bursts */
+   LOGPFN(DL1P, LOGL_NOTICE, rach_ind->fn,
+  "Access Bursts on PDTCH/U are not (yet) supported\n");
+   return -ENOTSUP;
+   }
+}
+
 /* RACH received from bts model */
 static int l1sap_ph_rach_ind(struct gsm_bts_trx *trx,
 struct osmo_phsap_prim *l1sap, struct ph_rach_ind_param *rach_ind)
@@ -1312,22 +1347,15 @@

DEBUGPFN(DL1P, rach_ind->fn, "Rx PH-RA.ind\n");

-   /* PTCCH/UL (Packet Timing Advance Control Channel) */
-   if (L1SAP_IS_CHAN_PDCH(rach_ind->chan_nr) && 
L1SAP_IS_PTCCH(rach_ind->fn)) {
-   LOGPFN(DL1P, LOGL_DEBUG, rach_ind->fn,
-  /* TODO: calculate and print Timing Advance Index */
-  "Access Burst for continuous Timing Advance control 
(toa256=%d)\n",
-  rach_ind->acc_delay_256bits);
-
-   /* QTA: Timing Advance in units of 1/4 of a symbol */
-   pcu_tx_rach_ind(bts, rach_ind->acc_delay_256bits >> 6,
-   rach_ind->ra, rach_ind->fn, rach_ind->is_11bit,
-   rach_ind->burst_type, PCU_IF_SAPI_PTCCH);
-   return 0;
-   }
-
-   /* check for handover access burst on dedicated channels */
-   if (!L1SAP_IS_CHAN_RACH(rach_ind->chan_nr)) {
+   /* Check the origin of an Access Burst */
+   switch (rach_ind->chan_nr & 0xf8) {
+   case RSL_CHAN_RACH:
+   /* CS or PS RACH, to be handled in this function */
+   break;
+   case RSL_CHAN_OSMO_PDCH:
+   /* 

Change in ...osmo-bts[master]: L1SAP: do not pass unused parameter to l1sap_handover_rach()

2019-10-08 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/15710


Change subject: L1SAP: do not pass unused parameter to l1sap_handover_rach()
..

L1SAP: do not pass unused parameter to l1sap_handover_rach()

Change-Id: I7f2d909f1bde09cbec106240df290381b3418e46
---
M src/common/l1sap.c
1 file changed, 2 insertions(+), 3 deletions(-)



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

diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 54953b0..93a70cd 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1288,8 +1288,7 @@
 }

 /* Special case where handover RACH is detected */
-static int l1sap_handover_rach(struct gsm_bts_trx *trx,
-   struct osmo_phsap_prim *l1sap, struct ph_rach_ind_param *rach_ind)
+static int l1sap_handover_rach(struct gsm_bts_trx *trx, struct 
ph_rach_ind_param *rach_ind)
 {
/* Filter out noise / interference / ghosts */
if (!rach_pass_filter(rach_ind, trx->bts)) {
@@ -1330,7 +1329,7 @@
/* check for handover access burst on dedicated channels */
if (!L1SAP_IS_CHAN_RACH(rach_ind->chan_nr)) {
rate_ctr_inc2(trx->bts->ctrs, BTS_CTR_RACH_HO);
-   return l1sap_handover_rach(trx, l1sap, rach_ind);
+   return l1sap_handover_rach(trx, rach_ind);
}

rate_ctr_inc2(trx->bts->ctrs, BTS_CTR_RACH_RCVD);

--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15710
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I7f2d909f1bde09cbec106240df290381b3418e46
Gerrit-Change-Number: 15710
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


Change in ...osmo-bts[master]: L1SAP: properly handle 11-bit encoded RACH.ind in gsmtap_ph_rach()

2019-10-08 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/15712


Change subject: L1SAP: properly handle 11-bit encoded RACH.ind in 
gsmtap_ph_rach()
..

L1SAP: properly handle 11-bit encoded RACH.ind in gsmtap_ph_rach()

Change-Id: Id263c2b716fd282d37d705a1c5f430ce7c0edaf0
---
M src/common/l1sap.c
1 file changed, 1 insertion(+), 1 deletion(-)



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

diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 06de8a3..67d569b 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -371,7 +371,7 @@
}

*data = (uint8_t *)>u.rach_ind.ra;
-   *len = 1;
+   *len = (l1sap->u.rach_ind.is_11bit) ? 2 : 1;

return 0;
 }

--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15712
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Id263c2b716fd282d37d705a1c5f430ce7c0edaf0
Gerrit-Change-Number: 15712
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


Change in ...osmo-bts[master]: L1SAP: use RSL_CHAN_* definitions from libosmogsm

2019-10-08 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/15707


Change subject: L1SAP: use RSL_CHAN_* definitions from libosmogsm
..

L1SAP: use RSL_CHAN_* definitions from libosmogsm

Change-Id: I2708b5d5bb6b92f90766ac752bafd28cff2549b0
---
M include/osmo-bts/l1sap.h
1 file changed, 21 insertions(+), 10 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/07/15707/1

diff --git a/include/osmo-bts/l1sap.h b/include/osmo-bts/l1sap.h
index 70b4564..ccfcacc 100644
--- a/include/osmo-bts/l1sap.h
+++ b/include/osmo-bts/l1sap.h
@@ -2,6 +2,7 @@
 #define L1SAP_H

 #include 
+#include 

 /* lchan link ID */
 #define LID_SACCH 0x40
@@ -15,16 +16,26 @@
 #define L1SAP_CHAN2SS_BCCH(chan_nr) (CCCH_LCHAN)

 /* logical channel from chan_nr + link_id */
-#define L1SAP_IS_LINK_SACCH(link_id) ((link_id & 0xC0) == LID_SACCH)
-#define L1SAP_IS_CHAN_TCHF(chan_nr) ((chan_nr & 0xf8) == 0x08)
-#define L1SAP_IS_CHAN_TCHH(chan_nr) ((chan_nr & 0xf0) == 0x10)
-#define L1SAP_IS_CHAN_SDCCH4(chan_nr) ((chan_nr & 0xe0) == 0x20)
-#define L1SAP_IS_CHAN_SDCCH8(chan_nr) ((chan_nr & 0xc0) == 0x40)
-#define L1SAP_IS_CHAN_BCCH(chan_nr) ((chan_nr & 0xf8) == 0x80)
-#define L1SAP_IS_CHAN_RACH(chan_nr) ((chan_nr & 0xf8) == 0x88)
-#define L1SAP_IS_CHAN_AGCH_PCH(chan_nr) ((chan_nr & 0xf8) == 0x90)
-#define L1SAP_IS_CHAN_PDCH(chan_nr) ((chan_nr & 0xf8) == 0xc0)
-#define L1SAP_IS_CHAN_CBCH(chan_nr) ((chan_nr & 0xf8) == 0xc8)
+#define L1SAP_IS_LINK_SACCH(link_id) \
+   ((link_id & 0xC0) == LID_SACCH)
+#define L1SAP_IS_CHAN_TCHF(chan_nr) \
+   ((chan_nr & 0xf8) == RSL_CHAN_Bm_ACCHs)
+#define L1SAP_IS_CHAN_TCHH(chan_nr) \
+   ((chan_nr & 0xf0) == RSL_CHAN_Lm_ACCHs)
+#define L1SAP_IS_CHAN_SDCCH4(chan_nr) \
+   ((chan_nr & 0xe0) == RSL_CHAN_SDCCH4_ACCH)
+#define L1SAP_IS_CHAN_SDCCH8(chan_nr) \
+   ((chan_nr & 0xc0) == RSL_CHAN_SDCCH8_ACCH)
+#define L1SAP_IS_CHAN_BCCH(chan_nr) \
+   ((chan_nr & 0xf8) == RSL_CHAN_BCCH)
+#define L1SAP_IS_CHAN_RACH(chan_nr) \
+   ((chan_nr & 0xf8) == RSL_CHAN_RACH)
+#define L1SAP_IS_CHAN_AGCH_PCH(chan_nr) \
+   ((chan_nr & 0xf8) == RSL_CHAN_PCH_AGCH)
+#define L1SAP_IS_CHAN_PDCH(chan_nr) \
+   ((chan_nr & 0xf8) == RSL_CHAN_OSMO_PDCH)
+#define L1SAP_IS_CHAN_CBCH(chan_nr) \
+   ((chan_nr & 0xf8) == RSL_CHAN_OSMO_CBCH4)

 /* rach type from ra */
 #define L1SAP_IS_PACKET_RACH(ra) ((ra & 0xf0) == 0x70 && (ra & 0x0f) != 0x0f)

--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15707
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I2708b5d5bb6b92f90766ac752bafd28cff2549b0
Gerrit-Change-Number: 15707
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


Change in ...osmo-bts[master]: bts-trx: Time out if no clock ind recvd after RSP POWERON

2019-10-08 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/15706 )

Change subject: bts-trx: Time out if no clock ind recvd after RSP POWERON
..


Patch Set 1: Code-Review+1

(2 comments)

https://gerrit.osmocom.org/#/c/15706/1/src/osmo-bts-trx/scheduler_trx.c
File src/osmo-bts-trx/scheduler_trx.c:

https://gerrit.osmocom.org/#/c/15706/1/src/osmo-bts-trx/scheduler_trx.c@1703
PS1, Line 1703: timespec
const?


https://gerrit.osmocom.org/#/c/15706/1/src/osmo-bts-trx/scheduler_trx.c@1704
PS1, Line 1704: timespec
const?



--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15706
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Iba5dbe867aff10e70ec73dbf1f7aeeecb15c0a4d
Gerrit-Change-Number: 15706
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Comment-Date: Tue, 08 Oct 2019 18:23:49 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: sgsn: Gb: implementing PS Paging when MS is MM_STANDBY

2019-10-08 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15705 )

Change subject: sgsn: Gb: implementing PS Paging when MS is MM_STANDBY
..


Patch Set 5: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15705
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Icc2c6ba70f8f74054546a1e31741fc90b232a23c
Gerrit-Change-Number: 15705
Gerrit-PatchSet: 5
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 17:12:48 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: sgsn: Gb: implementing PS Paging when MS is MM_STANDBY

2019-10-08 Thread lynxis lazus
lynxis lazus has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15705 )

Change subject: sgsn: Gb: implementing PS Paging when MS is MM_STANDBY
..


Patch Set 5:

(1 comment)

mind the !

https://gerrit.osmocom.org/#/c/15705/5/src/sgsn/sgsn_libgtp.c
File src/sgsn/sgsn_libgtp.c:

https://gerrit.osmocom.org/#/c/15705/5/src/sgsn/sgsn_libgtp.c@668
PS5, Line 668:  !=
this gremlin here is well known.
it looked to me quite ugly to have
if (state == ..) {}
else { OSMO_ASSERT() }

ST_MM_IDLE should never get through this.



--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15705
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Icc2c6ba70f8f74054546a1e31741fc90b232a23c
Gerrit-Change-Number: 15705
Gerrit-PatchSet: 5
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 17:04:53 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: sgsn_mm_ctx_alloc(): check for unallocated fsms

2019-10-08 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15704 )

Change subject: sgsn_mm_ctx_alloc(): check for unallocated fsms
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15704
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I867612a60236eaf7009400c92f5d871006aaf008
Gerrit-Change-Number: 15704
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 16:59:24 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: sgsn: Gb: implementing PS Paging when MS is MM_STANDBY

2019-10-08 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15705 )

Change subject: sgsn: Gb: implementing PS Paging when MS is MM_STANDBY
..


Patch Set 5: Code-Review-2

Again that OSMO_ASSERT. One day I'll figure out which kind of gremlin you have 
in your computer running git push.


--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15705
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Icc2c6ba70f8f74054546a1e31741fc90b232a23c
Gerrit-Change-Number: 15705
Gerrit-PatchSet: 5
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 16:58:55 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: sgsn: Gb: implementing PS Paging when MS is MM_STANDBY

2019-10-08 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15705 )

Change subject: sgsn: Gb: implementing PS Paging when MS is MM_STANDBY
..


Patch Set 5: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15705
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Icc2c6ba70f8f74054546a1e31741fc90b232a23c
Gerrit-Change-Number: 15705
Gerrit-PatchSet: 5
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 16:58:03 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: sgsn_libgtp: refactor ps paging into gprs_gb

2019-10-08 Thread lynxis lazus
lynxis lazus has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15547 )

Change subject: sgsn_libgtp: refactor ps paging into gprs_gb
..


Patch Set 3:

(3 comments)

https://gerrit.osmocom.org/#/c/15547/3/include/osmocom/sgsn/gprs_gb.h
File include/osmocom/sgsn/gprs_gb.h:

https://gerrit.osmocom.org/#/c/15547/3/include/osmocom/sgsn/gprs_gb.h@13
PS3, Line 13: /* page a MS in it routing area */
> its
Done


https://gerrit.osmocom.org/#/c/15547/2/include/osmocom/sgsn/gprs_gb.h
File include/osmocom/sgsn/gprs_gb.h:

https://gerrit.osmocom.org/#/c/15547/2/include/osmocom/sgsn/gprs_gb.h@13
PS2, Line 13: /* page a MS in it's specific cell */
> its
Done


https://gerrit.osmocom.org/#/c/15547/2/src/sgsn/gprs_gb.c
File src/sgsn/gprs_gb.c:

https://gerrit.osmocom.org/#/c/15547/2/src/sgsn/gprs_gb.c@90
PS2, Line 90:   /* FIXME: page whole routing area, not only the last known cell 
*/
> good point. I don't know if SUSPENDed MS can move within the routing area, 
> but I would expect this.
I'm not sure if paging should be done at all for MS in SUSPEND. I've changed 
function name and commit message.



--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15547
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I3020020f52005aa460ca6b245ee2297aec9821b3
Gerrit-Change-Number: 15547
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 16:54:24 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: lynxis lazus 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: sgsn_mm_ctx_alloc(): check for unallocated fsms

2019-10-08 Thread lynxis lazus
lynxis lazus has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15704 )

Change subject: sgsn_mm_ctx_alloc(): check for unallocated fsms
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/15704/1/src/sgsn/gprs_sgsn.c
File src/sgsn/gprs_sgsn.c:

https://gerrit.osmocom.org/#/c/15704/1/src/sgsn/gprs_sgsn.c@270
PS1, Line 270:  osmo_fsm_inst_free(ctx->iu.mm_state_fsm);
> I'd expect osmo_fsm_inst_free() to guard against NULL pointers (free 
> functions usually do). […]
it does not guard against it.



--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15704
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I867612a60236eaf7009400c92f5d871006aaf008
Gerrit-Change-Number: 15704
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 16:53:24 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in ...osmo-bts[master]: bts-trx: Time out if no clock ind recvd after RSP POWERON

2019-10-08 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/15706


Change subject: bts-trx: Time out if no clock ind recvd after RSP POWERON
..

bts-trx: Time out if no clock ind recvd after RSP POWERON

Before this patch, if due to whatever reason the TRX started fine (RSP
POWERON 0) and sockets were created but no CLOCK IND was ever received
by the BTS, it wouldn't notice since the timerfd timeouts
(bts_shutdown("no clock")) are only checked after the first CLOCK IND is
sent by the TRX.
As a result, the BTS would be kept on forever saying everything is fine
but it would be sending no DL burst at all to the TRX (tested with a
modfied osmo-trx dropping clock indication).
With this patch, new APIs are added to indicate the scheduler_trx code
the timeframes where clock ind are expected (between RSP POWERON 0 and
RSP POWEROFF 0); if TRX sends clock indications out of that timeframe,
BTs lower layers will drop them (controlled by "powered" bool).
Hence, the scheduler_trx can now place a timeout (reusing same timerfd
because its new use is exclusive in time with its other previous use)
when it is told that CLOCK IND should start appearing, and if none
arrives in considerable time, then the BTS can be shut down to notify
the rest of the network.

Related: OS#4215
Change-Id: Iba5dbe867aff10e70ec73dbf1f7aeeecb15c0a4d
---
M include/osmo-bts/scheduler.h
M src/osmo-bts-trx/l1_if.c
M src/osmo-bts-trx/scheduler_trx.c
3 files changed, 57 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/06/15706/1

diff --git a/include/osmo-bts/scheduler.h b/include/osmo-bts/scheduler.h
index e693e3e..3100a1d 100644
--- a/include/osmo-bts/scheduler.h
+++ b/include/osmo-bts/scheduler.h
@@ -175,6 +175,12 @@
 /*! \brief PHY informs us of new (current) GSM frame number */
 int trx_sched_clock(struct gsm_bts *bts, uint32_t fn);

+/*! \brief PHY informs us clock indications should start to be received */
+int trx_sched_clock_started(struct gsm_bts *bts);
+
+/*! \brief PHY informs us no more clock indications should be received anymore 
*/
+int trx_sched_clock_stopped(struct gsm_bts *bts);
+
 /*! \brief set multiframe scheduler to given physical channel config */
 int trx_sched_set_pchan(struct l1sched_trx *l1t, uint8_t tn,
 enum gsm_phys_chan_config pchan);
diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c
index 1079128..38b43b9 100644
--- a/src/osmo-bts-trx/l1_if.c
+++ b/src/osmo-bts-trx/l1_if.c
@@ -176,10 +176,13 @@
plink->u.osmotrx.poweronoff_sent = false;

if (poweronoff) {
-   if (rc == 0 && pinst->phy_link->state != PHY_LINK_CONNECTED)
+   if (rc == 0 && pinst->phy_link->state != PHY_LINK_CONNECTED) {
+   trx_sched_clock_started(pinst->trx->bts);
phy_link_state_set(pinst->phy_link, PHY_LINK_CONNECTED);
-   else if (rc != 0 && pinst->phy_link->state != PHY_LINK_SHUTDOWN)
+   } else if (rc != 0 && pinst->phy_link->state != 
PHY_LINK_SHUTDOWN) {
+   trx_sched_clock_stopped(pinst->trx->bts);
phy_link_state_set(pinst->phy_link, PHY_LINK_SHUTDOWN);
+   }
}
 }

diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c
index af639e2..c967db8 100644
--- a/src/osmo-bts-trx/scheduler_trx.c
+++ b/src/osmo-bts-trx/scheduler_trx.c
@@ -1682,6 +1682,52 @@
return -1;
 }

+/*! \brief This is the cb of the initial timer set upon start. On timeout, it
+ *  means it wasn't replaced and hence no CLOCK IND was received. */
+static int trx_start_noclockind_to_cb(struct osmo_fd *ofd, unsigned int what)
+{
+   struct gsm_bts *bts = ofd->data;
+   struct bts_trx_priv *bts_trx = (struct bts_trx_priv *)bts->model_priv;
+   struct osmo_trx_clock_state *tcs = _trx->clk_s;
+
+   osmo_fd_close(>fn_timer_ofd); /* Avoid being called again */
+   bts_shutdown(bts, "No clock since TRX was started");
+   return -1;
+}
+
+/*! \brief PHY informs us clock indications should start to be received */
+int trx_sched_clock_started(struct gsm_bts *bts)
+{
+   struct bts_trx_priv *bts_trx = (struct bts_trx_priv *)bts->model_priv;
+   struct osmo_trx_clock_state *tcs = _trx->clk_s;
+   struct timespec it_val = {10, 0};
+   struct timespec it_intval = {0, 0};
+
+   LOGP(DL1C, LOGL_NOTICE, "GSM clock started, waiting for clock 
indications\n");
+   osmo_fd_close(>fn_timer_ofd);
+   memset(tcs, 0, sizeof(*tcs));
+   tcs->fn_timer_ofd.fd = -1;
+   /* Set up timeout to shutdown BTS if no clock ind is received in 10
+* seconds. Upon clock ind receival, fn_timer_ofd will be reused and
+* timeout won't trigger.
+*/
+   osmo_timerfd_setup(>fn_timer_ofd, trx_start_noclockind_to_cb, bts);
+   osmo_timerfd_schedule(>fn_timer_ofd, _val, 

Change in ...osmo-sgsn[master]: sgsn: Gb: implementing PS Paging when MS is MM_STANDBY

2019-10-08 Thread lynxis lazus
lynxis lazus has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15705 )

Change subject: sgsn: Gb: implementing PS Paging when MS is MM_STANDBY
..


Patch Set 5:

(1 comment)

https://gerrit.osmocom.org/#/c/15705/3/src/sgsn/sgsn_libgtp.c
File src/sgsn/sgsn_libgtp.c:

https://gerrit.osmocom.org/#/c/15705/3/src/sgsn/sgsn_libgtp.c@670
PS3, Line 670:
> You are missing here the following: " FIXME: queue the packet we received 
> from GTP */"
Done



--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15705
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Icc2c6ba70f8f74054546a1e31741fc90b232a23c
Gerrit-Change-Number: 15705
Gerrit-PatchSet: 5
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 16:15:24 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: sgsn: Gb: implementing PS Paging when MS is MM_STANDBY

2019-10-08 Thread lynxis lazus
Hello pespin, Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-sgsn/+/15705

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

Change subject: sgsn: Gb: implementing PS Paging when MS is MM_STANDBY
..

sgsn: Gb: implementing PS Paging when MS is MM_STANDBY

When the MS is in MM_STANDBY, the Routing Area is known,
but not the exact cell.
Start the paging procedure. (Even this is only supported
for the last known cell, not the Routing Area. Routing Area
paging is not yet supported.)

Change-Id: Icc2c6ba70f8f74054546a1e31741fc90b232a23c
---
M src/sgsn/sgsn_libgtp.c
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/05/15705/5
-- 
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15705
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Icc2c6ba70f8f74054546a1e31741fc90b232a23c
Gerrit-Change-Number: 15705
Gerrit-PatchSet: 5
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-MessageType: newpatchset


Change in ...osmo-sgsn[master]: sgsn: Gb: implementing PS Paging when MS is MM_IDLE

2019-10-08 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15705 )

Change subject: sgsn: Gb: implementing PS Paging when MS is MM_IDLE
..


Patch Set 3: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/#/c/15705/3/src/sgsn/sgsn_libgtp.c
File src/sgsn/sgsn_libgtp.c:

https://gerrit.osmocom.org/#/c/15705/3/src/sgsn/sgsn_libgtp.c@670
PS3, Line 670:
You are missing here the following: " FIXME: queue the packet we received from 
GTP */"



--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15705
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Icc2c6ba70f8f74054546a1e31741fc90b232a23c
Gerrit-Change-Number: 15705
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 16:13:49 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: sgsn: Gb: implementing PS Paging when MS is MM_STANDBY

2019-10-08 Thread lynxis lazus
Hello pespin, Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-sgsn/+/15705

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

Change subject: sgsn: Gb: implementing PS Paging when MS is MM_STANDBY
..

sgsn: Gb: implementing PS Paging when MS is MM_STANDBY

When the MS is in MM_STANDBY, the Routing Area is known,
but not the exact cell.
Start the paging procedure. (Even this is only supported
for the last known cell, not the Routing Area. Routing Area
paging is not yet supported.)

Change-Id: Icc2c6ba70f8f74054546a1e31741fc90b232a23c
---
M src/sgsn/sgsn_libgtp.c
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/05/15705/4
-- 
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15705
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Icc2c6ba70f8f74054546a1e31741fc90b232a23c
Gerrit-Change-Number: 15705
Gerrit-PatchSet: 4
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-MessageType: newpatchset


Change in ...osmo-sgsn[master]: sgsn_libgtp: refactor ps paging into gprs_gb

2019-10-08 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15547 )

Change subject: sgsn_libgtp: refactor ps paging into gprs_gb
..


Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/#/c/15547/3/include/osmocom/sgsn/gprs_gb.h
File include/osmocom/sgsn/gprs_gb.h:

https://gerrit.osmocom.org/#/c/15547/3/include/osmocom/sgsn/gprs_gb.h@13
PS3, Line 13: /* page a MS in it routing area */
its



--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15547
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I3020020f52005aa460ca6b245ee2297aec9821b3
Gerrit-Change-Number: 15547
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 16:12:22 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: sgsn_libgtp: refactor ps paging into gprs_gb

2019-10-08 Thread lynxis lazus
Hello pespin, Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-sgsn/+/15547

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

Change subject: sgsn_libgtp: refactor ps paging into gprs_gb
..

sgsn_libgtp: refactor ps paging into gprs_gb

Paging should be done in gprs_gb
Change-Id: I3020020f52005aa460ca6b245ee2297aec9821b3
---
M include/osmocom/sgsn/gprs_gb.h
M src/sgsn/gprs_gb.c
M src/sgsn/sgsn_libgtp.c
3 files changed, 28 insertions(+), 11 deletions(-)


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I3020020f52005aa460ca6b245ee2297aec9821b3
Gerrit-Change-Number: 15547
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: newpatchset


Change in ...osmo-sgsn[master]: sgsn: Gb: implementing PS Paging when MS is MM_IDLE

2019-10-08 Thread lynxis lazus
Hello pespin, Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-sgsn/+/15705

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

Change subject: sgsn: Gb: implementing PS Paging when MS is MM_IDLE
..

sgsn: Gb: implementing PS Paging when MS is MM_IDLE

When the MS is in MM_IDLE, the Routing Area is known,
but not the exact cell.
Start the paging procedure. (Even this is only supported
for the last known cell, not the Routing Area. Routing Area
paging is not yet supported.)

Change-Id: Icc2c6ba70f8f74054546a1e31741fc90b232a23c
---
M src/sgsn/sgsn_libgtp.c
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/05/15705/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15705
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Icc2c6ba70f8f74054546a1e31741fc90b232a23c
Gerrit-Change-Number: 15705
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-MessageType: newpatchset


Change in ...osmo-sgsn[master]: sgsn_libgtp: refactor ps cell paging into gprs_gb

2019-10-08 Thread lynxis lazus
lynxis lazus has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15547 )

Change subject: sgsn_libgtp: refactor ps cell paging into gprs_gb
..


Patch Set 2:

(2 comments)

https://gerrit.osmocom.org/#/c/15547/2/src/sgsn/gprs_gb.c
File src/sgsn/gprs_gb.c:

https://gerrit.osmocom.org/#/c/15547/2/src/sgsn/gprs_gb.c@90
PS2, Line 90:   /* FIXME: page whole routing area, not only the last known cell 
*/
> This FIXME doesn't belong here right? because the function is called 
> "gprs_gb_page_ps_cell".
good point. I don't know if SUSPENDed MS can move within the routing area, but 
I would expect this.


https://gerrit.osmocom.org/#/c/15547/1/src/sgsn/sgsn_libgtp.c
File src/sgsn/sgsn_libgtp.c:

https://gerrit.osmocom.org/#/c/15547/1/src/sgsn/sgsn_libgtp.c@663
PS1, Line 663:  gprs_gb_page_ps_cell(mm);
> Good idea! That's a new patch :) Do you want to create a ticket for it?
Actual no, it's not needed to check here for different RAN, as Iu is filtered 
out earlier.



--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15547
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I3020020f52005aa460ca6b245ee2297aec9821b3
Gerrit-Change-Number: 15547
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 15:59:14 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: lynxis lazus 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: sgsn: Gb: implementing PS Paging when MS is MM_STANDBY

2019-10-08 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15705 )

Change subject: sgsn: Gb: implementing PS Paging when MS is MM_STANDBY
..


Patch Set 2: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/15705/2/src/sgsn/sgsn_libgtp.c
File src/sgsn/sgsn_libgtp.c:

https://gerrit.osmocom.org/#/c/15705/2/src/sgsn/sgsn_libgtp.c@668
PS2, Line 668:  OSMO_ASSERT(mm->gb.mm_state_fsm->state == ST_MM_IDLE);
so first you assert on state, then you check in a condition for another? that's 
wrong.



--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15705
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Icc2c6ba70f8f74054546a1e31741fc90b232a23c
Gerrit-Change-Number: 15705
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 15:50:44 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: sgsn_libgtp: refactor ps cell paging into gprs_gb

2019-10-08 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15547 )

Change subject: sgsn_libgtp: refactor ps cell paging into gprs_gb
..


Patch Set 2:

(2 comments)

https://gerrit.osmocom.org/#/c/15547/2/include/osmocom/sgsn/gprs_gb.h
File include/osmocom/sgsn/gprs_gb.h:

https://gerrit.osmocom.org/#/c/15547/2/include/osmocom/sgsn/gprs_gb.h@13
PS2, Line 13: /* page a MS in it's specific cell */
its


https://gerrit.osmocom.org/#/c/15547/2/src/sgsn/gprs_gb.c
File src/sgsn/gprs_gb.c:

https://gerrit.osmocom.org/#/c/15547/2/src/sgsn/gprs_gb.c@90
PS2, Line 90:   /* FIXME: page whole routing area, not only the last known cell 
*/
This FIXME doesn't belong here right? because the function is called 
"gprs_gb_page_ps_cell".



--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15547
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I3020020f52005aa460ca6b245ee2297aec9821b3
Gerrit-Change-Number: 15547
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 15:47:58 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: sgsn: Gb: implementing PS Paging when MS is MM_STANDBY

2019-10-08 Thread lynxis lazus
lynxis lazus has uploaded a new patch set (#2). ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15705 )

Change subject: sgsn: Gb: implementing PS Paging when MS is MM_STANDBY
..

sgsn: Gb: implementing PS Paging when MS is MM_STANDBY

When the MS is in MM_STANDBY, the Routing Area is known,
but not the exact cell.
Start the paging procedure. (Even this is only supported
for the last known cell, not the Routing Area. Routing Area
paging is not yet supported.)

Change-Id: Icc2c6ba70f8f74054546a1e31741fc90b232a23c
---
M src/sgsn/sgsn_libgtp.c
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/05/15705/2
-- 
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15705
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Icc2c6ba70f8f74054546a1e31741fc90b232a23c
Gerrit-Change-Number: 15705
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-CC: Jenkins Builder
Gerrit-MessageType: newpatchset


Change in ...osmo-sgsn[master]: sgsn: Gb: implementing PS Paging when MS is MM_IDLE

2019-10-08 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15705


Change subject: sgsn: Gb: implementing PS Paging when MS is MM_IDLE
..

sgsn: Gb: implementing PS Paging when MS is MM_IDLE

When the MS is in MM_IDLE, the Routing Area is known,
but not the exact cell.
Start the paging procedure. (Even this is only supported
for the last known cell, not the Routing Area. Routing Area
paging is not yet supported.)

Change-Id: Icc2c6ba70f8f74054546a1e31741fc90b232a23c
---
M src/sgsn/sgsn_libgtp.c
1 file changed, 4 insertions(+), 0 deletions(-)



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

diff --git a/src/sgsn/sgsn_libgtp.c b/src/sgsn/sgsn_libgtp.c
index 496079a..73b71c3 100644
--- a/src/sgsn/sgsn_libgtp.c
+++ b/src/sgsn/sgsn_libgtp.c
@@ -54,6 +54,7 @@
 #include 
 #include 
 #include 
+#include 

 #include 
 #include 
@@ -664,6 +665,9 @@
/* FIXME: queue the packet we received from GTP */
break;
case ST_GMM_REGISTERED_NORMAL:
+   if (mm->gb.mm_state_fsm->state == ST_MM_IDLE)
+   gprs_gb_page_ps_cell(mm);
+
break;
default:
LOGP(DGPRS, LOGL_ERROR, "GTP DATA IND for TLLI %08X in state "

--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15705
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Icc2c6ba70f8f74054546a1e31741fc90b232a23c
Gerrit-Change-Number: 15705
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-MessageType: newchange


Change in ...osmo-sgsn[master]: sgsn_libgtp: refactor ps cell paging into gprs_gb

2019-10-08 Thread lynxis lazus
Hello pespin, Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-sgsn/+/15547

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

Change subject: sgsn_libgtp: refactor ps cell paging into gprs_gb
..

sgsn_libgtp: refactor ps cell paging into gprs_gb

Paging should be done in gprs_gb
Change-Id: I3020020f52005aa460ca6b245ee2297aec9821b3
---
M include/osmocom/sgsn/gprs_gb.h
M src/sgsn/gprs_gb.c
M src/sgsn/sgsn_libgtp.c
3 files changed, 28 insertions(+), 11 deletions(-)


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I3020020f52005aa460ca6b245ee2297aec9821b3
Gerrit-Change-Number: 15547
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: newpatchset


Change in ...osmo-sgsn[master]: sgsn_mm_ctx_alloc(): check for unallocated fsms

2019-10-08 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15704 )

Change subject: sgsn_mm_ctx_alloc(): check for unallocated fsms
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/15704/1/src/sgsn/gprs_sgsn.c
File src/sgsn/gprs_sgsn.c:

https://gerrit.osmocom.org/#/c/15704/1/src/sgsn/gprs_sgsn.c@270
PS1, Line 270:  osmo_fsm_inst_free(ctx->iu.mm_state_fsm);
I'd expect osmo_fsm_inst_free() to guard against NULL pointers (free functions 
usually do). Can you check it?



--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15704
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I867612a60236eaf7009400c92f5d871006aaf008
Gerrit-Change-Number: 15704
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 15:34:18 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: sgsn_mm_ctx_alloc(): check for unallocated fsms

2019-10-08 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15704


Change subject: sgsn_mm_ctx_alloc(): check for unallocated fsms
..

sgsn_mm_ctx_alloc(): check for unallocated fsms

Change-Id: I867612a60236eaf7009400c92f5d871006aaf008
---
M src/sgsn/gprs_sgsn.c
1 file changed, 25 insertions(+), 0 deletions(-)



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

diff --git a/src/sgsn/gprs_sgsn.c b/src/sgsn/gprs_sgsn.c
index 474f8f9..cb2c0fc 100644
--- a/src/sgsn/gprs_sgsn.c
+++ b/src/sgsn/gprs_sgsn.c
@@ -243,17 +243,42 @@
talloc_free(ctx);
return NULL;
}
+
ctx->gmm_fsm = osmo_fsm_inst_alloc(_fsm, ctx, ctx, LOGL_DEBUG, 
"gmm_fsm");
+   if (!ctx->gmm_fsm)
+   goto out;
ctx->gmm_att_req.fsm = osmo_fsm_inst_alloc(_attach_req_fsm, ctx, 
ctx, LOGL_DEBUG, "gb_gmm_req");
+   if (!ctx->gmm_att_req.fsm)
+   goto out;
ctx->gb.mm_state_fsm = osmo_fsm_inst_alloc(_state_gb_fsm, ctx, ctx, 
LOGL_DEBUG, NULL);
+   if (!ctx->gb.mm_state_fsm)
+   goto out;
 #ifdef BUILD_IU
ctx->iu.mm_state_fsm = osmo_fsm_inst_alloc(_state_iu_fsm, ctx, ctx, 
LOGL_DEBUG, NULL);
+   if (!ctx->iu.mm_state_fsm)
+   goto out;
 #endif
+
INIT_LLIST_HEAD(>pdp_list);

llist_add(>list, _mm_ctxts);

return ctx;
+
+out:
+   if (ctx->iu.mm_state_fsm)
+   osmo_fsm_inst_free(ctx->iu.mm_state_fsm);
+   if (ctx->gb.mm_state_fsm)
+   osmo_fsm_inst_free(ctx->gb.mm_state_fsm);
+   if (ctx->gmm_att_req.fsm)
+   osmo_fsm_inst_free(ctx->gmm_att_req.fsm);
+   if (ctx->gmm_fsm)
+   osmo_fsm_inst_free(ctx->gmm_fsm);
+
+   rate_ctr_group_free(ctx->ctrg);
+   talloc_free(ctx);
+
+   return NULL;
 }
 /* Allocate a new SGSN MM context for GERAN_Gb */
 struct sgsn_mm_ctx *sgsn_mm_ctx_alloc_gb(uint32_t tlli,

--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15704
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I867612a60236eaf7009400c92f5d871006aaf008
Gerrit-Change-Number: 15704
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-MessageType: newchange


Change in ...osmo-ttcn3-hacks[master]: sgsn: delay f_gmm_attach() by 50ms

2019-10-08 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15703 )

Change subject: sgsn: delay f_gmm_attach() by 50ms
..


Patch Set 2: Code-Review+1

That'd be the proper fix most probably, but fine with this one for now.


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15703
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I0209c86e16fe616284d753e9e003f2e4d9ec9ea5
Gerrit-Change-Number: 15703
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 15:00:16 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: sgsn: delay f_gmm_attach() by 50ms

2019-10-08 Thread lynxis lazus
lynxis lazus has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15703 )

Change subject: sgsn: delay f_gmm_attach() by 50ms
..


Patch Set 2:

> Patch Set 2:
>
> > Patch Set 1: Code-Review+1
> >
> > (1 comment)
> >
> > We could maybe use some CTRL command to wait until the ctx is attached?
>
> Do you think it's reasonable?

I meant, I'm not sure which way is better :)


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15703
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I0209c86e16fe616284d753e9e003f2e4d9ec9ea5
Gerrit-Change-Number: 15703
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 14:46:52 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: sgsn: delay f_gmm_attach() by 50ms

2019-10-08 Thread lynxis lazus
lynxis lazus has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15703 )

Change subject: sgsn: delay f_gmm_attach() by 50ms
..


Patch Set 2:

> Patch Set 1: Code-Review+1
>
> (1 comment)
>
> We could maybe use some CTRL command to wait until the ctx is attached?

Do you think it's reasonable?


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15703
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I0209c86e16fe616284d753e9e003f2e4d9ec9ea5
Gerrit-Change-Number: 15703
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 14:45:27 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: sgsn: delay f_gmm_attach() by 50ms

2019-10-08 Thread lynxis lazus
lynxis lazus has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15703 )

Change subject: sgsn: delay f_gmm_attach() by 50ms
..


Patch Set 2:

(1 comment)

This change is ready for review.

https://gerrit.osmocom.org/#/c/15703/1/sgsn/SGSN_Tests.ttcn
File sgsn/SGSN_Tests.ttcn:

https://gerrit.osmocom.org/#/c/15703/1/sgsn/SGSN_Tests.ttcn@790
PS1, Line 790:   * In TC hlr_location_cancel_request_update, the 
GMM_ATTACH_COMPL came 2ms to late, so that the Location Cancel Request
> "too" late.
Done



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15703
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I0209c86e16fe616284d753e9e003f2e4d9ec9ea5
Gerrit-Change-Number: 15703
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 14:44:58 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: sgsn: delay f_gmm_attach() by 50ms

2019-10-08 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15703


Change subject: sgsn: delay f_gmm_attach() by 50ms
..

sgsn: delay f_gmm_attach() by 50ms

Packets sent by f_gmm_attach() might take too long via layers to reach
the SGSN. The GMM_ATTACH_COMPL in f_gmm_attach() took soo long,
that it arrived after packets, which has been sent after calling f_gmm_attach().
This behaviour was found in TC hlr_location_cancel_request_update().

Change-Id: I0209c86e16fe616284d753e9e003f2e4d9ec9ea5
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 8 insertions(+), 0 deletions(-)



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

diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 281dcc9..b734133 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -784,6 +784,14 @@
if (is_iu(ran_index)) {
as_iu_release_compl_disc();
}
+
+   /* Race condition
+* It has shown, that GMM_ATTACH_COMPL might take some time to arrive 
at the SGSN through the layers.
+* In TC hlr_location_cancel_request_update, the GMM_ATTACH_COMPL came 
2ms to late, so that the Location Cancel Request
+* arrived before it. This results in a test case failure.
+* Delay execution by 50 ms
+*/
+   f_sleep(0.05);
 }

 private function f_TC_attach(charstring id) runs on BSSGP_ConnHdlr {

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15703
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I0209c86e16fe616284d753e9e003f2e4d9ec9ea5
Gerrit-Change-Number: 15703
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-MessageType: newchange


Change in ...osmo-bts[master]: bts-trx: Log TRXC and TRXD socket recv()/send() failures

2019-10-08 Thread pespin
Hello fixeria, Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-bts/+/15702

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

Change subject: bts-trx: Log TRXC and TRXD socket recv()/send() failures
..

bts-trx: Log TRXC and TRXD socket recv()/send() failures

Related: OS#4215
Change-Id: Ic3e41d82b43459495d45873d612a3bd349ac174a
---
M src/osmo-bts-trx/trx_if.c
1 file changed, 23 insertions(+), 5 deletions(-)


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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ic3e41d82b43459495d45873d612a3bd349ac174a
Gerrit-Change-Number: 15702
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: newpatchset


Change in ...osmo-bts[master]: bts-trx: Log TRXC and TRXD socket recv()/send() failures

2019-10-08 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/15702 )

Change subject: bts-trx: Log TRXC and TRXD socket recv()/send() failures
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/15702/1/src/osmo-bts-trx/trx_if.c
File src/osmo-bts-trx/trx_if.c:

https://gerrit.osmocom.org/#/c/15702/1/src/osmo-bts-trx/trx_if.c@104
PS1, Line 104: strerror_r
> I prefer using stack-buffer functions, it's less prone to errors in the 
> future.
For instance, I bet strerror is not signal-safe :)



--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15702
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ic3e41d82b43459495d45873d612a3bd349ac174a
Gerrit-Change-Number: 15702
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 13:53:33 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


Change in ...osmo-bts[master]: bts-trx: Log TRXC and TRXD socket recv()/send() failures

2019-10-08 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/15702 )

Change subject: bts-trx: Log TRXC and TRXD socket recv()/send() failures
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/15702/1/src/osmo-bts-trx/trx_if.c
File src/osmo-bts-trx/trx_if.c:

https://gerrit.osmocom.org/#/c/15702/1/src/osmo-bts-trx/trx_if.c@104
PS1, Line 104: strerror_r
> This is a single thread application, so calling strerror() would be enough.
I prefer using stack-buffer functions, it's less prone to errors in the future.



--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15702
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ic3e41d82b43459495d45873d612a3bd349ac174a
Gerrit-Change-Number: 15702
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 13:52:27 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


Change in ...osmo-bts[master]: bts-trx: Log TRXC and TRXD socket recv()/send() failures

2019-10-08 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/15702 )

Change subject: bts-trx: Log TRXC and TRXD socket recv()/send() failures
..


Patch Set 1: Code-Review+1

(5 comments)

Checking rc of send() - cool! Coverity was complaining about that for a long 
time. I don't like using goto without the real need for that, otherwise I would 
CR+2. Also, I would prefer strerror().

https://gerrit.osmocom.org/#/c/15702/1/src/osmo-bts-trx/trx_if.c
File src/osmo-bts-trx/trx_if.c:

https://gerrit.osmocom.org/#/c/15702/1/src/osmo-bts-trx/trx_if.c@104
PS1, Line 104: strerror_r
This is a single thread application, so calling strerror() would be enough.


https://gerrit.osmocom.org/#/c/15702/1/src/osmo-bts-trx/trx_if.c@165
PS1, Line 165: strerror_r
Same.


https://gerrit.osmocom.org/#/c/15702/1/src/osmo-bts-trx/trx_if.c@992
PS1, Line 992: strerror_r
Same.


https://gerrit.osmocom.org/#/c/15702/1/src/osmo-bts-trx/trx_if.c@
PS1, Line : goto
Any reason to use goto here? This is the only failure branch right now, and I 
don't think there will be more calls to send() in this function.


https://gerrit.osmocom.org/#/c/15702/1/src/osmo-bts-trx/trx_if.c@1118
PS1, Line 1118: strerror_r
Same.



--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15702
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ic3e41d82b43459495d45873d612a3bd349ac174a
Gerrit-Change-Number: 15702
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Comment-Date: Tue, 08 Oct 2019 13:49:24 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: gprs_gmm: release Iu connection on RAU failures

2019-10-08 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15551 )

Change subject: gprs_gmm: release Iu connection on RAU failures
..


Patch Set 12: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15551
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I05a9200f55d608ccfb3f86184c324a2b428da76b
Gerrit-Change-Number: 15551
Gerrit-PatchSet: 12
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Comment-Date: Tue, 08 Oct 2019 13:48:33 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: gprs_gmm: release Iu connection on RAU failures

2019-10-08 Thread lynxis lazus
Hello pespin, Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-sgsn/+/15551

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

Change subject: gprs_gmm: release Iu connection on RAU failures
..

gprs_gmm: release Iu connection on RAU failures

When a RAU fails without an a GMM context, release the Iu
connection after sending a response.

Change-Id: I05a9200f55d608ccfb3f86184c324a2b428da76b
---
M src/sgsn/gprs_gmm.c
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/51/15551/12
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15551
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I05a9200f55d608ccfb3f86184c324a2b428da76b
Gerrit-Change-Number: 15551
Gerrit-PatchSet: 12
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-MessageType: newpatchset


Change in ...osmo-sgsn[master]: gprs_gmm: release Iu connection on RAU failures

2019-10-08 Thread lynxis lazus
lynxis lazus has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15551 )

Change subject: gprs_gmm: release Iu connection on RAU failures
..


Patch Set 11:

(1 comment)

https://gerrit.osmocom.org/#/c/15551/11/src/sgsn/gprs_gmm.c
File src/sgsn/gprs_gmm.c:

https://gerrit.osmocom.org/#/c/15551/11/src/sgsn/gprs_gmm.c@1704
PS11, Line 1704:int X1001 = osmo_tdef_get(sgsn->cfg.T_defs, 
-1001, OSMO_TDEF_S, -1);
> unsigned int here.
changed to unsigned long



--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15551
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I05a9200f55d608ccfb3f86184c324a2b428da76b
Gerrit-Change-Number: 15551
Gerrit-PatchSet: 11
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Comment-Date: Tue, 08 Oct 2019 13:45:58 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: sgsn: MM Gb Fsm: fix event handling for implicit detach

2019-10-08 Thread lynxis lazus
lynxis lazus has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15553 )

Change subject: sgsn: MM Gb Fsm: fix event handling for implicit detach
..

sgsn: MM Gb Fsm: fix event handling for implicit detach

Implicit detach means there won't be any Gb state afterwards.

Change-Id: Iececb730e7135e14ebd94f82edb79b03ced1f9e3
---
M src/sgsn/gprs_mm_state_gb_fsm.c
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved
  pespin: Looks good to me, approved



diff --git a/src/sgsn/gprs_mm_state_gb_fsm.c b/src/sgsn/gprs_mm_state_gb_fsm.c
index 02f6747..f6d680c 100644
--- a/src/sgsn/gprs_mm_state_gb_fsm.c
+++ b/src/sgsn/gprs_mm_state_gb_fsm.c
@@ -47,9 +47,11 @@

switch(event) {
case E_MM_READY_TIMER_EXPIRY:
-   case E_MM_IMPLICIT_DETACH:
mm_state_gb_fsm_state_chg(fi, ST_MM_STANDBY);
break;
+   case E_MM_IMPLICIT_DETACH:
+   mm_state_gb_fsm_state_chg(fi, ST_MM_IDLE);
+   break;
case E_MM_PDU_RECEPTION:
/* RE-arm the READY timer upon receival of Gb PDUs */
t_secs = osmo_tdef_get(sgsn->cfg.T_defs, 3314, OSMO_TDEF_S, -1);

--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15553
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Iececb730e7135e14ebd94f82edb79b03ced1f9e3
Gerrit-Change-Number: 15553
Gerrit-PatchSet: 7
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in ...osmo-sgsn[master]: gprs_sgsn: always allocate Gb/Iu mm fsm

2019-10-08 Thread lynxis lazus
lynxis lazus has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15552 )

Change subject: gprs_sgsn: always allocate Gb/Iu mm fsm
..


Patch Set 7:

(1 comment)

https://gerrit.osmocom.org/#/c/15552/4/src/sgsn/gprs_sgsn.c
File src/sgsn/gprs_sgsn.c:

https://gerrit.osmocom.org/#/c/15552/4/src/sgsn/gprs_sgsn.c@250
PS4, Line 250:  INIT_LLIST_HEAD(>pdp_list);
> maybe OSMO_ASSERT onboth, or gracefully cleanup if fsm_installoc fails?
I'll create a seperate patchset to check all osmo_fsm_inst_alloc()



--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15552
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I1724790335b0820f153a0cbdb5cfd1cfea36d1e9
Gerrit-Change-Number: 15552
Gerrit-PatchSet: 7
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 13:42:53 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: gprs_sgsn: always allocate Gb/Iu mm fsm

2019-10-08 Thread lynxis lazus
lynxis lazus has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15552 )

Change subject: gprs_sgsn: always allocate Gb/Iu mm fsm
..

gprs_sgsn: always allocate Gb/Iu mm fsm

When moving between RANs we need them at a later point.
Allocate them always to not make the code (more) complex.

Change-Id: I1724790335b0820f153a0cbdb5cfd1cfea36d1e9
---
M src/sgsn/gprs_sgsn.c
1 file changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/src/sgsn/gprs_sgsn.c b/src/sgsn/gprs_sgsn.c
index 465a5fa..474f8f9 100644
--- a/src/sgsn/gprs_sgsn.c
+++ b/src/sgsn/gprs_sgsn.c
@@ -245,6 +245,10 @@
}
ctx->gmm_fsm = osmo_fsm_inst_alloc(_fsm, ctx, ctx, LOGL_DEBUG, 
"gmm_fsm");
ctx->gmm_att_req.fsm = osmo_fsm_inst_alloc(_attach_req_fsm, ctx, 
ctx, LOGL_DEBUG, "gb_gmm_req");
+   ctx->gb.mm_state_fsm = osmo_fsm_inst_alloc(_state_gb_fsm, ctx, ctx, 
LOGL_DEBUG, NULL);
+#ifdef BUILD_IU
+   ctx->iu.mm_state_fsm = osmo_fsm_inst_alloc(_state_iu_fsm, ctx, ctx, 
LOGL_DEBUG, NULL);
+#endif
INIT_LLIST_HEAD(>pdp_list);

llist_add(>list, _mm_ctxts);
@@ -256,7 +260,6 @@
 const struct gprs_ra_id *raid)
 {
struct sgsn_mm_ctx *ctx;
-   char buf[32];

ctx = sgsn_mm_ctx_alloc(tlli);
if (!ctx)
@@ -266,8 +269,7 @@
ctx->ran_type = MM_CTX_T_GERAN_Gb;
ctx->gb.tlli = tlli;
ctx->ciph_algo = sgsn->cfg.cipher;
-   snprintf(buf, sizeof(buf), "%" PRIu32, tlli);
-   ctx->gb.mm_state_fsm = osmo_fsm_inst_alloc(_state_gb_fsm, ctx, ctx, 
LOGL_DEBUG, buf);
+   osmo_fsm_inst_update_id_f(ctx->gb.mm_state_fsm, "%" PRIu32, tlli);

LOGMMCTXP(LOGL_DEBUG, ctx, "Allocated with %s cipher.\n",
  get_value_string(gprs_cipher_names, ctx->ciph_algo));
@@ -278,7 +280,6 @@
 struct sgsn_mm_ctx *sgsn_mm_ctx_alloc_iu(void *uectx)
 {
 #if BUILD_IU
-   char buf[32];
struct sgsn_mm_ctx *ctx;
struct ranap_ue_conn_ctx *ue_ctx = uectx;

@@ -292,8 +293,7 @@
ctx->iu.ue_ctx = ue_ctx;
ctx->iu.ue_ctx->rab_assign_addr_enc = sgsn->cfg.iu.rab_assign_addr_enc;
ctx->iu.new_key = 1;
-   snprintf(buf, sizeof(buf), "%" PRIu32, ue_ctx->conn_id);
-   ctx->iu.mm_state_fsm = osmo_fsm_inst_alloc(_state_iu_fsm, ctx, ctx, 
LOGL_DEBUG, buf);
+   osmo_fsm_inst_update_id_f(ctx->iu.mm_state_fsm, "%" PRIu32, 
ue_ctx->conn_id);


return ctx;

--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15552
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I1724790335b0820f153a0cbdb5cfd1cfea36d1e9
Gerrit-Change-Number: 15552
Gerrit-PatchSet: 7
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in ...osmo-sgsn[master]: gprs_gmm: release Iu connection on RAU failures

2019-10-08 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15551 )

Change subject: gprs_gmm: release Iu connection on RAU failures
..


Patch Set 11: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/15551/11/src/sgsn/gprs_gmm.c
File src/sgsn/gprs_gmm.c:

https://gerrit.osmocom.org/#/c/15551/11/src/sgsn/gprs_gmm.c@1704
PS11, Line 1704:int X1001 = osmo_tdef_get(sgsn->cfg.T_defs, 
-1001, OSMO_TDEF_S, -1);
unsigned int here.



--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15551
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I05a9200f55d608ccfb3f86184c324a2b428da76b
Gerrit-Change-Number: 15551
Gerrit-PatchSet: 11
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Comment-Date: Tue, 08 Oct 2019 13:40:24 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: ranap: add non-spec X1001

2019-10-08 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15701 )

Change subject: ranap: add non-spec X1001
..


Patch Set 3: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15701
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I39a0169c22a4ac430b3d6f3c281d1f381eaa4756
Gerrit-Change-Number: 15701
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 13:39:38 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: ranap: add non-spec X1001

2019-10-08 Thread lynxis lazus
Hello pespin, Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-sgsn/+/15701

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

Change subject: ranap: add non-spec X1001
..

ranap: add non-spec X1001

When the SGSN releases a RANAP connection, it sends a Release Command
and waits for a Release Complete. Use X1001 to release the Iu connection
when the Release Complete is lost/never received.

Change-Id: I39a0169c22a4ac430b3d6f3c281d1f381eaa4756
---
M src/sgsn/gprs_ranap.c
M src/sgsn/sgsn_vty.c
M tests/test_nodes.vty
3 files changed, 12 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/01/15701/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15701
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I39a0169c22a4ac430b3d6f3c281d1f381eaa4756
Gerrit-Change-Number: 15701
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-MessageType: newpatchset


Change in ...osmo-sgsn[master]: gprs_gmm: release Iu connection on RAU failures

2019-10-08 Thread lynxis lazus
Hello pespin, Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-sgsn/+/15551

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

Change subject: gprs_gmm: release Iu connection on RAU failures
..

gprs_gmm: release Iu connection on RAU failures

When a RAU fails without an a GMM context, release the Iu
connection after sending a response.

Change-Id: I05a9200f55d608ccfb3f86184c324a2b428da76b
---
M src/sgsn/gprs_gmm.c
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/51/15551/11
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15551
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I05a9200f55d608ccfb3f86184c324a2b428da76b
Gerrit-Change-Number: 15551
Gerrit-PatchSet: 11
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-MessageType: newpatchset


Change in ...osmo-sgsn[master]: ranap: add non-spec T1001

2019-10-08 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15701 )

Change subject: ranap: add non-spec T1001
..


Patch Set 2: Code-Review-1

(4 comments)

https://gerrit.osmocom.org/#/c/15701/2//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/#/c/15701/2//COMMIT_MSG@10
PS2, Line 10: and waits for a Release Complete. Use T1001 to release the Iu 
connection
If it's non-spec, then we name them X1001, and values are negative.


https://gerrit.osmocom.org/#/c/15701/2/src/sgsn/gprs_ranap.c
File src/sgsn/gprs_ranap.c:

https://gerrit.osmocom.org/#/c/15701/2/src/sgsn/gprs_ranap.c@180
PS2, Line 180:  unsigned long T1001;
X1001


https://gerrit.osmocom.org/#/c/15701/2/src/sgsn/gprs_ranap.c@188
PS2, Line 188:  T1001 = osmo_tdef_get(sgsn->cfg.T_defs, 1001, OSMO_TDEF_S, -1);
-1001


https://gerrit.osmocom.org/#/c/15701/2/src/sgsn/sgsn_vty.c
File src/sgsn/sgsn_vty.c:

https://gerrit.osmocom.org/#/c/15701/2/src/sgsn/sgsn_vty.c@112
PS2, Line 112:  { .T=-1001, .default_val=NONSPEC_T1001_SECS, .desc="RANAP 
Release timeout. Wait for RANAP Release Complete."
Please put it before -3314, we usually order them this way afaik.



--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15701
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I39a0169c22a4ac430b3d6f3c281d1f381eaa4756
Gerrit-Change-Number: 15701
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 12:58:03 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: gprs_gmm: release Iu connection on RAU failures

2019-10-08 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15551 )

Change subject: gprs_gmm: release Iu connection on RAU failures
..


Patch Set 10: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/15551/10/src/sgsn/gprs_gmm.c
File src/sgsn/gprs_gmm.c:

https://gerrit.osmocom.org/#/c/15551/10/src/sgsn/gprs_gmm.c@1704
PS10, Line 1704:int T1001 = osmo_tdef_get(sgsn->cfg.T_defs, 
1001, OSMO_TDEF_S, -1);
-1001



--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15551
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I05a9200f55d608ccfb3f86184c324a2b428da76b
Gerrit-Change-Number: 15551
Gerrit-PatchSet: 10
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Comment-Date: Tue, 08 Oct 2019 12:58:25 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-bts[master]: bts-trx: Log TRXC and TRXD socket recv()/send() failures

2019-10-08 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/15702


Change subject: bts-trx: Log TRXC and TRXD socket recv()/send() failures
..

bts-trx: Log TRXC and TRXD socket recv()/send() failures

Related: OS#4215
Change-Id: Ic3e41d82b43459495d45873d612a3bd349ac174a
---
M src/osmo-bts-trx/trx_if.c
1 file changed, 25 insertions(+), 5 deletions(-)



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

diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c
index 9933109..af64ed6 100644
--- a/src/osmo-bts-trx/trx_if.c
+++ b/src/osmo-bts-trx/trx_if.c
@@ -94,14 +94,18 @@
struct phy_link *plink = ofd->data;
struct phy_instance *pinst = phy_instance_by_num(plink, 0);
char buf[1500];
-   int len;
+   ssize_t len;
uint32_t fn;

OSMO_ASSERT(pinst);

len = recv(ofd->fd, buf, sizeof(buf) - 1, 0);
-   if (len <= 0)
+   if (len <= 0) {
+   strerror_r(errno, (char *)buf, sizeof(buf));
+   LOGPPHI(pinst, DTRX, LOGL_ERROR,
+   "recv() failed on TRXD with rc=%zd (%s)\n", len, buf);
return len;
+   }
buf[len] = '\0';

if (!!strncmp(buf, "IND CLOCK ", 10)) {
@@ -144,6 +148,7 @@
struct trx_ctrl_msg *tcm;
char buf[1500];
int len;
+   ssize_t snd_len;

/* get first command */
if (llist_empty(>trx_ctrl_list))
@@ -155,7 +160,12 @@

LOGPPHI(l1h->phy_inst, DTRX, LOGL_DEBUG, "Sending control '%s'\n", buf);
/* send command */
-   send(l1h->trx_ofd_ctrl.fd, buf, len+1, 0);
+   snd_len = send(l1h->trx_ofd_ctrl.fd, buf, len+1, 0);
+   if (snd_len <= 0) {
+   strerror_r(errno, (char *)buf, sizeof(buf));
+   LOGPPHI(l1h->phy_inst, DTRX, LOGL_ERROR,
+   "send() failed on TRXC with rc=%zd (%s)\n", snd_len, 
buf);
+   }

/* start timer */
osmo_timer_schedule(>trx_ctrl_timer, 2, 0);
@@ -979,8 +989,9 @@

buf_len = recv(ofd->fd, buf, sizeof(buf), 0);
if (buf_len <= 0) {
+   strerror_r(errno, (char *)buf, sizeof(buf));
LOGPPHI(l1h->phy_inst, DTRX, LOGL_ERROR,
-   "recv() failed on TRXD with rc=%zd\n", buf_len);
+   "recv() failed on TRXD with rc=%zd (%s)\n", buf_len, 
buf);
return buf_len;
}

@@ -1058,6 +1069,7 @@
 int trx_if_send_burst(struct trx_l1h *l1h, uint8_t tn, uint32_t fn, uint8_t 
pwr,
const ubit_t *bits, uint16_t nbits)
 {
+   ssize_t snd_len;
uint8_t hdr_ver = l1h->config.trxd_hdr_ver_use;
uint8_t buf[TRX_DATA_MSG_MAX_LEN];

@@ -1094,11 +1106,19 @@

/* we must be sure that TRX is on */
if (trx_if_powered(l1h)) {
-   send(l1h->trx_ofd_data.fd, buf, nbits + 6, 0);
+   snd_len = send(l1h->trx_ofd_data.fd, buf, nbits + 6, 0);
+   if (snd_len <= 0)
+   goto snd_err;
} else
LOGPPHI(l1h->phy_inst, DTRX, LOGL_ERROR, "Ignoring TX data, 
transceiver powered off.\n");

return 0;
+
+snd_err:
+   strerror_r(errno, (char *)buf, sizeof(buf));
+   LOGPPHI(l1h->phy_inst, DTRX, LOGL_ERROR,
+   "send() failed on TRXD with rc=%zd (%s)\n", snd_len, buf);
+   return -2;
 }



--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15702
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ic3e41d82b43459495d45873d612a3bd349ac174a
Gerrit-Change-Number: 15702
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


Change in ...osmo-sgsn[master]: ranap: add non-spec T1001

2019-10-08 Thread lynxis lazus
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-sgsn/+/15701

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

Change subject: ranap: add non-spec T1001
..

ranap: add non-spec T1001

When the SGSN releases a RANAP connection, it sends a Release Command
and waits for a Release Complete. Use T1001 to release the Iu connection
when the Release Complete is lost/never received.

Change-Id: I39a0169c22a4ac430b3d6f3c281d1f381eaa4756
---
M src/sgsn/gprs_ranap.c
M src/sgsn/sgsn_vty.c
M tests/test_nodes.vty
3 files changed, 12 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/01/15701/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15701
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I39a0169c22a4ac430b3d6f3c281d1f381eaa4756
Gerrit-Change-Number: 15701
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset


Change in ...osmo-sgsn[master]: gprs_gmm: release Iu connection on RAU failures

2019-10-08 Thread lynxis lazus
lynxis lazus has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15551 )

Change subject: gprs_gmm: release Iu connection on RAU failures
..


Patch Set 9:

(1 comment)

https://gerrit.osmocom.org/#/c/15551/8/src/sgsn/gprs_gmm.c
File src/sgsn/gprs_gmm.c:

https://gerrit.osmocom.org/#/c/15551/8/src/sgsn/gprs_gmm.c@1704
PS8, Line 1704: ranap_iu_tx_release_free(MSG_IU_UE_CTX(msg), 
NULL, 5);
> The cause code is set to NULL, which means, it should use the default cause 
> code. […]
Done



--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15551
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I05a9200f55d608ccfb3f86184c324a2b428da76b
Gerrit-Change-Number: 15551
Gerrit-PatchSet: 9
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 12:36:47 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: lynxis lazus 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: ranap: add non-spec T1001

2019-10-08 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15701


Change subject: ranap: add non-spec T1001
..

ranap: add non-spec T1001

When the SGSN releases a RANAP connection, it sends a Release Command
and waits for a Release Complete. Use T1001 to release the Iu connection
when the Release Complete is lost/never received.

Change-Id: I39a0169c22a4ac430b3d6f3c281d1f381eaa4756
---
M src/sgsn/gprs_ranap.c
M src/sgsn/sgsn_vty.c
2 files changed, 11 insertions(+), 3 deletions(-)



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

diff --git a/src/sgsn/gprs_ranap.c b/src/sgsn/gprs_ranap.c
index 6ebbd69..d2841df 100644
--- a/src/sgsn/gprs_ranap.c
+++ b/src/sgsn/gprs_ranap.c
@@ -25,6 +25,7 @@
 #include 

 #include 
+#include 

 #include 

@@ -161,8 +162,6 @@
return rc;
 }

-/* TODO: use timers */
-#define TIMEOUT_RANAP_RELEASE_SEC 5
 void sgsn_ranap_iu_free(struct sgsn_mm_ctx *ctx)
 {
if (!ctx)
@@ -178,15 +177,19 @@
 void sgsn_ranap_iu_release_free(struct sgsn_mm_ctx *ctx,
const struct RANAP_Cause *cause)
 {
+   unsigned long T1001;
+
if (!ctx)
return;

if (!ctx->iu.ue_ctx)
return;

+   T1001 = osmo_tdef_get(sgsn->cfg.T_defs, 1001, OSMO_TDEF_S, -1);
+
ranap_iu_tx_release_free(ctx->iu.ue_ctx,
 cause,
-TIMEOUT_RANAP_RELEASE_SEC);
+(int) T1001);
ctx->iu.ue_ctx = NULL;
 }

diff --git a/src/sgsn/sgsn_vty.c b/src/sgsn/sgsn_vty.c
index 17b64c8..855598c 100644
--- a/src/sgsn/sgsn_vty.c
+++ b/src/sgsn/sgsn_vty.c
@@ -90,6 +90,9 @@
 #define GSM0408_T3395_SECS 8   /* wait for DEACT PDP CTX ACK */
 #define GSM0408_T3397_SECS 8   /* wait for DEACT AA PDP CTX ACK */

+/* Non spec timer */
+#define NONSPEC_T1001_SECS 5   /* wait for a RANAP Release Complete */
+

 static struct osmo_tdef sgsn_T_defs[] = {
{ .T=3312, .default_val=GSM0408_T3312_SECS, .desc="Periodic RA Update 
timer (s)" },
@@ -106,6 +109,8 @@
{ .T=3397, .default_val=GSM0408_T3397_SECS, .desc="Wait for DEACT AA 
PDP CTX ACK timer (s)" },
/* non spec timers */
{ .T=-3314, .default_val=GSM0408_T3314_SECS, .desc="Iu User inactivity 
timer. On expiry release Iu connection (s)" },
+   { .T=-1001, .default_val=NONSPEC_T1001_SECS, .desc="RANAP Release 
timeout. Wait for RANAP Release Complete."
+  "On expiry release 
Iu connection (s)" },
{}
 };


--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15701
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I39a0169c22a4ac430b3d6f3c281d1f381eaa4756
Gerrit-Change-Number: 15701
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-MessageType: newchange


Change in ...osmo-sgsn[master]: gprs_gmm: release Iu connection on RAU failures

2019-10-08 Thread lynxis lazus
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-sgsn/+/15551

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

Change subject: gprs_gmm: release Iu connection on RAU failures
..

gprs_gmm: release Iu connection on RAU failures

When a RAU fails without an a GMM context, release the Iu
connection after sending a response.

Change-Id: I05a9200f55d608ccfb3f86184c324a2b428da76b
---
M src/sgsn/gprs_gmm.c
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/51/15551/9
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15551
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I05a9200f55d608ccfb3f86184c324a2b428da76b
Gerrit-Change-Number: 15551
Gerrit-PatchSet: 9
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-MessageType: newpatchset


Change in ...osmo-iuh[master]: iu_client: ranap_iu_tx_release() change default cause code to Success

2019-10-08 Thread lynxis lazus
lynxis lazus has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/15666 )

Change subject: iu_client: ranap_iu_tx_release() change default cause code to 
Success
..

iu_client: ranap_iu_tx_release() change default cause code to Success

The cause code no remaining rab should be only used when closing the
Iu connection on this specific reason. Change default to NAS Success
Release which is a usual release.

Change-Id: Icf3f06b0de7dcda9f967ae29863054ef813c75e5
---
M src/iu_client.c
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  pespin: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/iu_client.c b/src/iu_client.c
index f4a9cd3..4b0acb0 100644
--- a/src/iu_client.c
+++ b/src/iu_client.c
@@ -468,15 +468,15 @@
 }

 /* Send Iu Release for the given UE connection.
- * If cause is NULL, the standard "No remaining RAB" cause is sent, otherwise
+ * If cause is NULL, Normal Release cause is sent, otherwise
  * the provided cause. */
 int ranap_iu_tx_release(struct ranap_ue_conn_ctx *ctx, const struct 
RANAP_Cause *cause)
 {
struct msgb *msg;
struct osmo_scu_prim *prim;
static const struct RANAP_Cause default_cause = {
-   .present = RANAP_Cause_PR_radioNetwork,
-   .choice.radioNetwork = RANAP_CauseRadioNetwork_no_remaining_rab,
+   .present = RANAP_Cause_PR_nAS,
+   .choice.radioNetwork = RANAP_CauseNAS_normal_release,
};

if (!cause)

--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/15666
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: Icf3f06b0de7dcda9f967ae29863054ef813c75e5
Gerrit-Change-Number: 15666
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in ...osmo-sgsn[master]: gprs_ranap: add missing rc = 0

2019-10-08 Thread lynxis lazus
lynxis lazus has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15699 )

Change subject: gprs_ranap: add missing rc = 0
..

gprs_ranap: add missing rc = 0

After processing the event, set the return code to success.
Thanks to manatails (redmine).

Change-Id: I73b3b3c3dd330bc953835737758854cf68539495
Fixes: #3969
---
M src/sgsn/gprs_ranap.c
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  pespin: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/sgsn/gprs_ranap.c b/src/sgsn/gprs_ranap.c
index 6ebbd69..9c7a5db 100644
--- a/src/sgsn/gprs_ranap.c
+++ b/src/sgsn/gprs_ranap.c
@@ -152,6 +152,7 @@
gsm48_gmm_authorize(mm);
else
osmo_fsm_inst_dispatch(mm->gmm_att_req.fsm, 
E_IU_SECURITY_CMD_COMPLETE, NULL);
+   rc = 0;
break;
default:
LOGMMCTXP(LOGL_NOTICE, mm, "Unknown event received: %i\n", 
type);

--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15699
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I73b3b3c3dd330bc953835737758854cf68539495
Gerrit-Change-Number: 15699
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in ...osmo-ttcn3-hacks[master]: pcu: Introduce test TC_mo_ping_pong

2019-10-08 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15681 )

Change subject: pcu: Introduce test TC_mo_ping_pong
..


Patch Set 4:

(3 comments)

https://gerrit.osmocom.org/#/c/15681/4/pcu/PCU_Tests_RAW.ttcn
File pcu/PCU_Tests_RAW.ttcn:

https://gerrit.osmocom.org/#/c/15681/4/pcu/PCU_Tests_RAW.ttcn@577
PS4, Line 577: an
s/an/a/


https://gerrit.osmocom.org/#/c/15681/4/pcu/PCU_Tests_RAW.ttcn@619
PS4, Line 619: Paging Request
After all, what is the message we expect? Paging Request or Immediate 
Assignment?


https://gerrit.osmocom.org/#/c/15681/4/pcu/PCU_Tests_RAW.ttcn@
PS4, Line : f_sleep(int2float(info_ind.t3169) + 1.0);
Most likely, you don't need this because OsmoPCU is restarted across the test 
case executions.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15681
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I3be5123ff5294e5851652ec14d54589442082b28
Gerrit-Change-Number: 15681
Gerrit-PatchSet: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-CC: fixeria 
Gerrit-Comment-Date: Tue, 08 Oct 2019 11:57:02 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: gprs_gmm: release Iu connection on RAU failures

2019-10-08 Thread lynxis lazus
lynxis lazus has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15551 )

Change subject: gprs_gmm: release Iu connection on RAU failures
..


Patch Set 8:

(1 comment)

> Patch Set 6:
>
> In here the code comment was removed but the code was not changed as asked in 
> the gerrit comment?

I've removed the comment in the code. The correct cause code should be fixed via

https://gerrit.osmocom.org/#/c/15551/8/src/sgsn/gprs_gmm.c
File src/sgsn/gprs_gmm.c:

https://gerrit.osmocom.org/#/c/15551/8/src/sgsn/gprs_gmm.c@1704
PS8, Line 1704: ranap_iu_tx_release_free(MSG_IU_UE_CTX(msg), 
NULL, 5);
> So is 5 the correct cause code? What is 5? use some define?
The cause code is set to NULL, which means, it should use the default cause 
code.
5 is a timeout for closing the connection. I'll use a define for it.



--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15551
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I05a9200f55d608ccfb3f86184c324a2b428da76b
Gerrit-Change-Number: 15551
Gerrit-PatchSet: 8
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 11:54:01 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: gprs_gmm: release Iu connection on RAU failures

2019-10-08 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15551 )

Change subject: gprs_gmm: release Iu connection on RAU failures
..


Patch Set 8:

(1 comment)

https://gerrit.osmocom.org/#/c/15551/8/src/sgsn/gprs_gmm.c
File src/sgsn/gprs_gmm.c:

https://gerrit.osmocom.org/#/c/15551/8/src/sgsn/gprs_gmm.c@1704
PS8, Line 1704: ranap_iu_tx_release_free(MSG_IU_UE_CTX(msg), 
NULL, 5);
So is 5 the correct cause code? What is 5? use some define?



--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15551
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I05a9200f55d608ccfb3f86184c324a2b428da76b
Gerrit-Change-Number: 15551
Gerrit-PatchSet: 8
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 11:37:15 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in ...osmo-iuh[master]: iu_client: ranap_iu_tx_release() change default cause code to Success

2019-10-08 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/15666 )

Change subject: iu_client: ranap_iu_tx_release() change default cause code to 
Success
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/15666
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: Icf3f06b0de7dcda9f967ae29863054ef813c75e5
Gerrit-Change-Number: 15666
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 11:34:52 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: gprs_ranap: add missing rc = 0

2019-10-08 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15699 )

Change subject: gprs_ranap: add missing rc = 0
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15699
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I73b3b3c3dd330bc953835737758854cf68539495
Gerrit-Change-Number: 15699
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 11:33:38 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: bts: Fix race condition in f_dyn_ipa_pdch_(de)act

2019-10-08 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15700


Change subject: bts: Fix race condition in f_dyn_ipa_pdch_(de)act
..

bts: Fix race condition in f_dyn_ipa_pdch_(de)act

Test BTS_Tests.TC_dyn_osmo_pdch_act_deact was sporadically failing due
to receiving IND_INFO on the PCU port with pdch_mask related TS bit set
to 0 after sending a PDCH ACT. That happened due to a race condition
because PCU send IND_INFO periodically. As a result, it can happen that
BTS sends an IND_INFO after PCU.clear was called and before the PDCH ACT
is handled.

Commit 446e07bc77ba2a1d08673cfeda6d4b6a72f49a77 already did same fix for
f_dyn_ipa_pdch_(de)act() family, but didn't change this one.

Change-Id: I323852632341c19837bebfcf2f00d404151367a7
---
M bts/BTS_Tests.ttcn
1 file changed, 18 insertions(+), 2 deletions(-)



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

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 2c11ca2..f2861d1 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -4899,13 +4899,21 @@
PCU.clear;
f_rsl_chan_act(g_pars.chan_mode);
/* expect INFO_IND on PCU interface listing TS as PDCH */
+   timer T_wait := 2.0;
+   T_wait.start;
alt {
[] PCU.receive(t_SD_PCUIF(pcu_conn_id, tr_PCUIF_INFO_IND(bts_nr, ?))) 
-> value sd {
if (substr(sd.data.u.info_ind.trx[trx_nr].pdch_mask, 
g_chan_nr.tn, 1) != '1'B) {
-   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, 
"PCUIF_INFO_IND PDCH_MASK not '1' after PDCH ACT");
+   log("PCUIF_INFO_IND PDCH_MASK not yet '1' after PDCH 
ACT on TS", g_chan_nr.tn,
+   " mask:", sd.data.u.info_ind.trx[trx_nr].pdch_mask);
+   repeat;
}
}
[] PCU.receive { repeat; }
+   [] T_wait.timeout {
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+   log2str("Timeout waiting for PCUIF_INFO_IND PDCH_MASK 
to be '1' on TS", g_chan_nr.tn));
+   }
}
/* try to activate this PDCH from the PCU point of view */
PCU.send(t_SD_PCUIF(pcu_conn_id, ts_PCUIF_ACT_REQ(bts_nr, trx_nr, 
g_chan_nr.tn)));
@@ -4919,13 +4927,21 @@
PCU.clear;
RSL.send(ts_RSL_RF_CHAN_REL(g_chan_nr));
/* expect BTS to ask PCU to deactivate the channel */
+   timer T_wait := 2.0;
+   T_wait.start;
alt {
[] PCU.receive(t_SD_PCUIF(pcu_conn_id, tr_PCUIF_INFO_IND(bts_nr, ?))) 
-> value sd {
if (substr(sd.data.u.info_ind.trx[trx_nr].pdch_mask, 
g_chan_nr.tn, 1) != '0'B) {
-   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, 
"PCUIF_INFO_IND PDCH_MASK not '0' after PDCH DEACT");
+   log("PCUIF_INFO_IND PDCH_MASK not yet '0' after PDCH 
DEACT on TS", g_chan_nr.tn,
+   " mask:", sd.data.u.info_ind.trx[trx_nr].pdch_mask);
+   repeat;
}
}
[] PCU.receive { repeat; }
+   [] T_wait.timeout {
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+   log2str("Timeout waiting for PCUIF_INFO_IND PDCH_MASK 
to be '0' on TS", g_chan_nr.tn));
+   }
}
/* Emulate PCU asking BTS to deactivate PDCH */
PCU.send(t_SD_PCUIF(pcu_conn_id, ts_PCUIF_DEACT_REQ(bts_nr, trx_nr, 
g_chan_nr.tn)));

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15700
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I323852632341c19837bebfcf2f00d404151367a7
Gerrit-Change-Number: 15700
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


  1   2   >