Change in openbsc[master]: Replace broken ipa_ccm_idtag APIs with new ipa_ccm_id ones

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

Change subject: Replace broken ipa_ccm_idtag APIs with new ipa_ccm_id ones
..


Set Ready For Review


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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3b995f8ef0b48c0a5b3375e42926641934359cd2
Gerrit-Change-Number: 13433
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Wed, 27 Mar 2019 21:22:35 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in openbsc[master]: vty_test_runner: Handle MGCP message recv len dynamically

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


Change subject: vty_test_runner: Handle MGCP message recv len dynamically
..

vty_test_runner: Handle MGCP message recv len dynamically

Change-Id: I536d78a2a1962240e5e369cda9927d8c9955ab86
---
M openbsc/tests/vty_test_runner.py
1 file changed, 12 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/35/13435/1

diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py
index ca0b879..44ccdd8 100644
--- a/openbsc/tests/vty_test_runner.py
+++ b/openbsc/tests/vty_test_runner.py
@@ -20,6 +20,7 @@
 import unittest
 import socket
 import subprocess
+import struct

 import osmopy.obscvty as obscvty
 import osmopy.osmoutil as osmoutil
@@ -1089,6 +1090,16 @@
 if (verbose):
 print "\tBSC <- NAT: ", s

+def ipa_handle_mgcp(x, verbose = False):
+data = x.recv(3)
+s = data2str(data)
+if s[4:] != "fc":
+print "expected IPA(MGCP) but received %r instead" % (s[4:])
+ipa_len, = struct.unpack('>H', data[:2])
+mgcp_msg = x.recv(ipa_len) # MGCP msg
+if (verbose):
+print "\tBSC <- NAT (MGCP[%d]): %s" % (ipa_len, mgcp_msg)
+
 def nat_bsc_num_con(x):
 return len(x.vty.command("show bsc connections").split('\n'))

@@ -1106,7 +1117,7 @@
 ipa_handle_resp(bsc, tk, verbose, proc=proc)
 if proc:
   print "\tproc.poll() = %r" % proc.poll()
-bsc.recv(27) # MGCP msg
+ipa_handle_mgcp(bsc, verbose)
 if proc:
   print "\tproc.poll() = %r" % proc.poll()
 ipa_handle_small(bsc, verbose)

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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I536d78a2a1962240e5e369cda9927d8c9955ab86
Gerrit-Change-Number: 13435
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-msc[master]: Add vty option to globally enable LCLS

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

Change subject: Add vty option to globally enable LCLS
..


Patch Set 5:

(2 comments)

https://gerrit.osmocom.org/#/c/13421/5/include/osmocom/msc/vlr.h
File include/osmocom/msc/vlr.h:

https://gerrit.osmocom.org/#/c/13421/5/include/osmocom/msc/vlr.h@277
PS5, Line 277: lcls_enabled
Cosmetic: other symbols here are using imperative style, so "enable_lcls" would 
be better.


https://gerrit.osmocom.org/#/c/13421/5/src/libmsc/msc_vty.c
File src/libmsc/msc_vty.c:

https://gerrit.osmocom.org/#/c/13421/5/src/libmsc/msc_vty.c@408
PS5, Line 408: lcls-enable
Are you (you anyone else) going to add more LCLS related parameters? If yes, it 
would make sense to have group called 'lcls', so the command would look this 
way: "lcls enable 1" or similar.



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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibb587e6ae47cff71f5bf2e2d22c1da86cd7e1762
Gerrit-Change-Number: 13421
Gerrit-PatchSet: 5
Gerrit-Owner: Max 
Gerrit-Assignee: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: osmith 
Gerrit-CC: Vadim Yanitskiy 
Gerrit-Comment-Date: Wed, 27 Mar 2019 20:27:37 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-ci[master]: Avoid '/' in jenkins matrix labels

2019-03-27 Thread Daniel Willmann
Daniel Willmann has posted comments on this change. ( 
https://gerrit.osmocom.org/13434 )

Change subject: Avoid '/' in jenkins matrix labels
..


Patch Set 1: Verified+1

https://jenkins.osmocom.org/jenkins/job/gerrit-osmo-pcu/698


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3102fc607718ca42634273e24e6ff303dc28483f
Gerrit-Change-Number: 13434
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 27 Mar 2019 17:42:15 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: Also build oc2g support for osmo-pcu

2019-03-27 Thread Daniel Willmann
Daniel Willmann has posted comments on this change. ( 
https://gerrit.osmocom.org/13368 )

Change subject: Also build oc2g support for osmo-pcu
..


Patch Set 2: Verified+1

Tested in https://jenkins.osmocom.org/jenkins/job/gerrit-osmo-pcu/698/


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iebddf8d41538fe1e69435cda7f77bd49c4c14477
Gerrit-Change-Number: 13368
Gerrit-PatchSet: 2
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Max 
Gerrit-CC: André Boddenberg 
Gerrit-Comment-Date: Wed, 27 Mar 2019 17:38:29 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: Also build oc2g support for osmo-pcu

2019-03-27 Thread Daniel Willmann
Hello Max, Harald Welte,

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

https://gerrit.osmocom.org/13368

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

Change subject: Also build oc2g support for osmo-pcu
..

Also build oc2g support for osmo-pcu

Needs gerrit change I7cd89a549c9463e81893ca7dd925299f728e4453 in
osmo-pcu

Fixes: SYS#4524
Change-Id: Iebddf8d41538fe1e69435cda7f77bd49c4c14477
---
M jobs/gerrit-verifications.yml
1 file changed, 3 insertions(+), 2 deletions(-)


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iebddf8d41538fe1e69435cda7f77bd49c4c14477
Gerrit-Change-Number: 13368
Gerrit-PatchSet: 2
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Max 
Gerrit-CC: André Boddenberg 


Change in osmo-ci[master]: Avoid '/' in jenkins matrix labels

2019-03-27 Thread Daniel Willmann
Daniel Willmann has uploaded this change for review. ( 
https://gerrit.osmocom.org/13434


Change subject: Avoid '/' in jenkins matrix labels
..

Avoid '/' in jenkins matrix labels

The script already deals with this for osmo-bts by using the
version_prefix variable

Change-Id: I3102fc607718ca42634273e24e6ff303dc28483f
---
M jobs/gerrit-verifications.yml
1 file changed, 2 insertions(+), 2 deletions(-)



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

diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml
index c28a2fa..6128dc5 100644
--- a/jobs/gerrit-verifications.yml
+++ b/jobs/gerrit-verifications.yml
@@ -192,7 +192,7 @@

   - osmo-pcu:
   a1_name: FIRMWARE_VERSION
-  a1: !!python/tuple [master, v2017.01, origin/nrw/litecell15, oc2g]
+  a1: !!python/tuple [master, v2017.01, litecell15, oc2g]
   a2_name: with_vty
   a2: !!python/tuple [True, False]
   a3_name: with_dsp
@@ -204,7 +204,7 @@
 (with_vty == "True" && with_dsp == "sysmo" && 
FIRMWARE_VERSION=="master" && WITH_MANUALS == "0") ||
 (with_vty == "True" && with_dsp == "lc15" && 
FIRMWARE_VERSION=="master" && WITH_MANUALS == "0") ||
 (with_vty == "True" && with_dsp == "lc15" && 
FIRMWARE_VERSION=="v2017.01" && WITH_MANUALS == "0") ||
-(with_vty == "True" && with_dsp == "lc15" && 
FIRMWARE_VERSION=="origin/nrw/litecell15" && WITH_MANUALS == "0") ||
+(with_vty == "True" && with_dsp == "lc15" && 
FIRMWARE_VERSION=="litecell15" && WITH_MANUALS == "0") ||
 (with_vty == "True" && with_dsp == "oc2g" && 
FIRMWARE_VERSION=="oc2g" && WITH_MANUALS == "0") ||
 (with_vty == "False" && with_dsp == "none" && 
FIRMWARE_VERSION=="master" && WITH_MANUALS == "1")


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3102fc607718ca42634273e24e6ff303dc28483f
Gerrit-Change-Number: 13434
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 


Change in osmo-pcu[master]: oc2g: Remove custom alarms

2019-03-27 Thread Daniel Willmann
Daniel Willmann has posted comments on this change. ( 
https://gerrit.osmocom.org/13360 )

Change subject: oc2g: Remove custom alarms
..


Patch Set 2:

> Patch Set 2:
>
> Build Started https://jenkins.osmocom.org/jenkins/job/gerrit-osmo-pcu/697/

That's me mucking about with the osmo-ci job changes for osmo-pcu, please ignore


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I51de826aa732a3875d75396b46b7d2821ef7417c
Gerrit-Change-Number: 13360
Gerrit-PatchSet: 2
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 27 Mar 2019 17:32:05 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-pcu[master]: oc2g: Remove custom alarms

2019-03-27 Thread Daniel Willmann
Daniel Willmann has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13360 )

Change subject: oc2g: Remove custom alarms
..

oc2g: Remove custom alarms

Don't try to send custom alarms that weren't included in upstream.

Change-Id: I51de826aa732a3875d75396b46b7d2821ef7417c
---
M src/osmo-bts-oc2g/oc2g_l1_if.c
1 file changed, 0 insertions(+), 7 deletions(-)

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



diff --git a/src/osmo-bts-oc2g/oc2g_l1_if.c b/src/osmo-bts-oc2g/oc2g_l1_if.c
index 80b9dbc..f9768ae 100644
--- a/src/osmo-bts-oc2g/oc2g_l1_if.c
+++ b/src/osmo-bts-oc2g/oc2g_l1_if.c
@@ -232,9 +232,6 @@
default:
LOGP(DL1IF, LOGL_NOTICE, "Rx PH-DATA.ind for unknown L1 SAPI 
%s\n",
get_value_string(oc2gbts_l1sapi_names, data_ind->sapi));
-   memcpy(alarm_sig_data.spare, _ind->sapi, sizeof(unsigned 
int));
-   osmo_signal_dispatch(SS_L_GLOBAL, 
S_PCU_NM_RX_UNKN_L1_SAP_ALARM, _sig_data);
-
break;
}

@@ -286,7 +283,6 @@
rc = handle_ph_ra_ind(fl1h, >u.phRaInd);
break;
default:
-   osmo_signal_dispatch(SS_L_GLOBAL, 
S_PCU_NM_RX_UNKN_L1_PRIM_ALARM, _sig_data);
break;
}

@@ -340,7 +336,6 @@
/* transmit */
if (osmo_wqueue_enqueue(>write_q[MQ_PDTCH_WRITE], msg) != 0) {
LOGP(DL1IF, LOGL_ERROR, "PDTCH queue full. dropping 
message.\n");
-   osmo_signal_dispatch(SS_L_GLOBAL, 
S_PCU_NM_PDTCH_QUEUE_FULL_ALARM, _sig_data);
msgb_free(msg);
}

@@ -365,8 +360,6 @@

rc = l1if_transport_open(MQ_PDTCH_WRITE, fl1h);
if (rc < 0) {
-   alarm_sig_data.spare[0] = trx_no;
-   osmo_signal_dispatch(SS_L_GLOBAL, S_PCU_NM_FAIL_OPEN_L1_ALARM, 
_sig_data);
talloc_free(fl1h);
return NULL;
}

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I51de826aa732a3875d75396b46b7d2821ef7417c
Gerrit-Change-Number: 13360
Gerrit-PatchSet: 2
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Pau Espin Pedrol 


Change in osmo-pcu[master]: jenkins.sh: Add oc2g build support

2019-03-27 Thread Daniel Willmann
Daniel Willmann has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13428 )

Change subject: jenkins.sh: Add oc2g build support
..

jenkins.sh: Add oc2g build support

Related: OS#3749, SYS#4524
Change-Id: I014e5e59bc5e904a616ddf50ebfb8247f0d428cf
---
M contrib/jenkins.sh
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index 7af7309..e805080 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -48,6 +48,12 @@
   osmo-layer1-headers.sh lc15 "$FIRMWARE_VERSION"
   cd "$base"

+elif [ "$with_dsp" = oc2g ]; then
+  PCU_CONFIG="$PCU_CONFIG --enable-oc2gbts-phy 
--with-oc2g=$deps/layer1-headers/inc"
+  cd "$deps"
+  osmo-layer1-headers.sh oc2g "$FIRMWARE_VERSION"
+  cd "$base"
+
 elif [ -z "$with_dsp" -o "$with_dsp" = none ]; then
   echo "Direct DSP access disabled, sanitizer enabled"
   PCU_CONFIG="$PCU_CONFIG --enable-werror --enable-sanitize"

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I014e5e59bc5e904a616ddf50ebfb8247f0d428cf
Gerrit-Change-Number: 13428
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-pcu[master]: OC-2G: Fix missing header

2019-03-27 Thread Daniel Willmann
Daniel Willmann has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13357 )

Change subject: OC-2G: Fix missing header
..

OC-2G: Fix missing header

From-Commit: a9eefb54c62a
From-Remote: https://gitlab.com/nrw_noa/osmo-pcu
Change-Id: Ida0592c9da74588a57d9d2d5be40fcf79edcb596
---
M src/osmo-bts-oc2g/oc2g_l1_if.c
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/src/osmo-bts-oc2g/oc2g_l1_if.c b/src/osmo-bts-oc2g/oc2g_l1_if.c
index 23661cb..3855da1 100644
--- a/src/osmo-bts-oc2g/oc2g_l1_if.c
+++ b/src/osmo-bts-oc2g/oc2g_l1_if.c
@@ -31,6 +31,8 @@
 #include 
 #include 
 #include 
+#include 
+
 #include 
 #include 
 #include 

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ida0592c9da74588a57d9d2d5be40fcf79edcb596
Gerrit-Change-Number: 13357
Gerrit-PatchSet: 2
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Minh-Quang Nguyen 
Gerrit-CC: Pau Espin Pedrol 


Change in osmo-pcu[master]: oc2g: Change log type (Litecell15->Oc2g)

2019-03-27 Thread Daniel Willmann
Daniel Willmann has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13362 )

Change subject: oc2g: Change log type (Litecell15->Oc2g)
..

oc2g: Change log type (Litecell15->Oc2g)

Change-Id: I95ced5da1c89dae5a16963b10b005747277f320b
---
M src/osmo-bts-oc2g/oc2g_l1_hw.c
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/osmo-bts-oc2g/oc2g_l1_hw.c b/src/osmo-bts-oc2g/oc2g_l1_hw.c
index aaa543f..e96df89 100644
--- a/src/osmo-bts-oc2g/oc2g_l1_hw.c
+++ b/src/osmo-bts-oc2g/oc2g_l1_hw.c
@@ -97,7 +97,7 @@
case MQ_SYS_WRITE:
if (rc != sizeof(Oc2g_Prim_t))
LOGP(DL1IF, LOGL_NOTICE, "%u != "
-"sizeof(Litecell15_Prim_t)\n", rc);
+"sizeof(Oc2g_Prim_t)\n", rc);
return l1if_handle_sysprim(fl1h, msg);
case MQ_L1_WRITE:
case MQ_TCH_WRITE:

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I95ced5da1c89dae5a16963b10b005747277f320b
Gerrit-Change-Number: 13362
Gerrit-PatchSet: 3
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-CC: Max 


Change in osmo-pcu[master]: OC-2G: Fix TA adjustment

2019-03-27 Thread Daniel Willmann
Daniel Willmann has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13358 )

Change subject: OC-2G: Fix TA adjustment
..

OC-2G: Fix TA adjustment

Problem:
 TA provided from L1 PH-DATA-IND is a relative amount of TA adjustment to 
actual TA
 being used for given TBF. The current TA update algorithm in PCU simply 
applies the relative
 amount of TA to given TBF but does not take into account of current TA.
 As a result, the PCU will request wrong TA jump for given TBF if the MS is 
moving away from
 BTS more than 2 km.

 Related issue: http://osmocom.org/issues/2611

Fixes:
- The PCU needs increase or decrease current TA of given TBF on receiving of 
relative
  amount of TA adjustment provided by PH-DATA-IND from L1.
- The PCU needs to set absolute TA of given TBF on receiving absolute TA 
provided by
  PH-RA-IND from L1.

From-Commit: 139ad3f42193
From-Remote: https://gitlab.com/nrw_noa/osmo-pcu
Change-Id: I7665586dd5722bbe04632ee5673d3033bc082324
---
M src/osmo-bts-oc2g/oc2g_l1_if.c
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/src/osmo-bts-oc2g/oc2g_l1_if.c b/src/osmo-bts-oc2g/oc2g_l1_if.c
index 3855da1..ccf7431 100644
--- a/src/osmo-bts-oc2g/oc2g_l1_if.c
+++ b/src/osmo-bts-oc2g/oc2g_l1_if.c
@@ -210,7 +210,7 @@

get_meas(, _ind->measParam);
bts_update_tbf_ta("PH-DATA", data_ind->u32Fn, fl1h->trx_no,
- data_ind->u8Tn, qta2ta(meas.bto));
+ data_ind->u8Tn, sign_qta2ta(meas.bto), false);

switch (data_ind->sapi) {
case GsmL1_Sapi_Pdtch:
@@ -250,7 +250,7 @@

DEBUGP(DL1IF, "Rx PH-RA.ind");
bts_update_tbf_ta("PH-RA", ra_ind->u32Fn, fl1h->trx_no, ra_ind->u8Tn,
- qta2ta(ra_ind->measParam.i16BurstTiming));
+   sign_qta2ta(ra_ind->measParam.i16BurstTiming), true);

return 0;
 }

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I7665586dd5722bbe04632ee5673d3033bc082324
Gerrit-Change-Number: 13358
Gerrit-PatchSet: 2
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Minh-Quang Nguyen 


Change in osmo-pcu[master]: OC-2G: Always use positive TA information provided in PH-RA-IND

2019-03-27 Thread Daniel Willmann
Daniel Willmann has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13359 )

Change subject: OC-2G: Always use positive TA information provided in PH-RA-IND
..

OC-2G: Always use positive TA information provided in PH-RA-IND

From-Commit: 960aa3d1b0b1
From-Remote: https://gitlab.com/nrw_noa/osmo-pcu
Change-Id: Ia526f712b95eb7bba99252f2a348d9fb5d2f3838
---
M src/osmo-bts-oc2g/oc2g_l1_if.c
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/src/osmo-bts-oc2g/oc2g_l1_if.c b/src/osmo-bts-oc2g/oc2g_l1_if.c
index ccf7431..80b9dbc 100644
--- a/src/osmo-bts-oc2g/oc2g_l1_if.c
+++ b/src/osmo-bts-oc2g/oc2g_l1_if.c
@@ -248,9 +248,10 @@
if (ra_ind->measParam.fLinkQuality < MIN_QUAL_RACH)
return 0;
 
-   DEBUGP(DL1IF, "Rx PH-RA.ind");
+   LOGP(DL1IF, LOGL_DEBUG, "PH-RA-IND L1 qta=%d\n", 
ra_ind->measParam.i16BurstTiming);
+
bts_update_tbf_ta("PH-RA", ra_ind->u32Fn, fl1h->trx_no, ra_ind->u8Tn,
-   sign_qta2ta(ra_ind->measParam.i16BurstTiming), true);
+   qta2ta(ra_ind->measParam.i16BurstTiming), true);

return 0;
 }

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia526f712b95eb7bba99252f2a348d9fb5d2f3838
Gerrit-Change-Number: 13359
Gerrit-PatchSet: 2
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Minh-Quang Nguyen 


Change in libosmocore[master]: ipa: Fix ipa_ccm_id_resp_parse on big endian systems

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


Change subject: ipa: Fix ipa_ccm_id_resp_parse on big endian systems
..

ipa: Fix ipa_ccm_id_resp_parse on big endian systems

Change-Id: Iedc46ab53a4f76bbd98741c065fad3d9042a34a4
---
M src/gsm/ipa.c
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/32/13432/1

diff --git a/src/gsm/ipa.c b/src/gsm/ipa.c
index 8e64a1e..1563d0a 100644
--- a/src/gsm/ipa.c
+++ b/src/gsm/ipa.c
@@ -204,8 +204,8 @@

while (len >= 3) {
len -= 3;
-   t_len = *cur++ << 8;
-   t_len += *cur++;
+   t_len = osmo_load16be(cur);
+   cur += 2;
t_tag = *cur++;

if (t_len > len + 1) {

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iedc46ab53a4f76bbd98741c065fad3d9042a34a4
Gerrit-Change-Number: 13432
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in libosmocore[master]: ipa: Document ipa_ccm_idtag_parse_off and fix ipa_ccm_idtag_parse

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


Change subject: ipa: Document ipa_ccm_idtag_parse_off and fix 
ipa_ccm_idtag_parse
..

ipa: Document ipa_ccm_idtag_parse_off and fix ipa_ccm_idtag_parse

ipa_ccm_idtag_parse_off is broken, and can only be used with
len_offset=1 on ID Request messages, otherwise won't work correctly.
Modify ipa_ccm_idtag_parse to at least parse those correctly, and
document the limitations.

Those two functions are already deprecated and only used in openbsc by 3
callers:
* ipa_ccm_idtag_parse in ussd_read_cb(): Broken, that function can only
work for Requests and it's used to parse a Response.
* ipa_ccm_idtag_parse_off in forward_sccp_to_msc (NAT): Broken, it can
only be used to parse Requests and it's used to parse a Response.
Furthermore, len_offset=2 is passed which makes no sense and most
probably it fails always, or can even make the program crash.
* ipa_ccm_idtag_parse_off in (answer_challenge): This one is fine and
could actually be replaced with ipa_ccm_id_get_parse after this commit
is merged.

Change-Id: I6efc852dfc041192f554e41a58290a0f63298021
---
M src/gsm/ipa.c
1 file changed, 11 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/31/13431/1

diff --git a/src/gsm/ipa.c b/src/gsm/ipa.c
index d423c26..8e64a1e 100644
--- a/src/gsm/ipa.c
+++ b/src/gsm/ipa.c
@@ -98,11 +98,21 @@
return idtag_names[tag];
 }

+/*! Parse the payload part of an IPA CCM ID GET, return \ref tlv_parsed 
format. */
 int ipa_ccm_idtag_parse(struct tlv_parsed *dec, unsigned char *buf, int len)
 {
-   return ipa_ccm_idtag_parse_off(dec, buf, len, 0);
+   return ipa_ccm_idtag_parse_off(dec, buf, len, 1);
 }

+/*! Parse the payload part of an IPA CCM ID GET, return \ref tlv_parsed format.
+ * WARNING: This function can only parse correctly IPA CCM ID GET/REQUEST
+ * messages, and only when len_offset is passed value of 1.
+ *  \param[out] dec Caller-provided/allocated output structure for parsed 
payload
+ *  \param[in] buf Buffer containing the payload (excluding 1 byte msg_type) 
of the message
+ *  \param[in] len Length of \a buf in octets
+ *  \param[in] len_offset Offset from end of len field to start of value 
(ommiting tag). Must be 1!
+ *  \returns 0 on success; negative on error
+ */
 int ipa_ccm_idtag_parse_off(struct tlv_parsed *dec, unsigned char *buf, int 
len, const int len_offset)
 {
uint8_t t_len;

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6efc852dfc041192f554e41a58290a0f63298021
Gerrit-Change-Number: 13431
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-gsm-tester[master]: default-suites.conf: Add tests for OC2G

2019-03-27 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13427 )

Change subject: default-suites.conf: Add tests for OC2G
..

default-suites.conf: Add tests for OC2G

Change-Id: I5599c86565ebb6d7d6931d36fd49e57fe2020d1f
---
M example/default-suites.conf
1 file changed, 18 insertions(+), 0 deletions(-)

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



diff --git a/example/default-suites.conf b/example/default-suites.conf
index 5ba36e1..f93c933 100644
--- a/example/default-suites.conf
+++ b/example/default-suites.conf
@@ -16,6 +16,24 @@
 - dynts:sysmo+mod-bts0-dynts67-ipa+cfg-codec-fr-any
 - dynts:sysmo+mod-bts0-dynts67-osmo

+- nitb_sms:oc2g
+- sms:oc2g
+- nitb_ussd:oc2g
+- ussd:oc2g
+- voice:oc2g+mod-bts0-ts-tchf+cfg-codec-fr1
+- voice:oc2g+mod-bts0-ts-tchf+cfg-codec-fr2
+- voice:oc2g+mod-bts0-ts-tchf+cfg-codec-fr3
+- voice:oc2g+mod-bts0-ts-tchh+cfg-codec-hr1
+- voice:oc2g+mod-bts0-ts-tchh+cfg-codec-hr3
+- voice:oc2g+mod-bts0-dynts-ipa+cfg-codec-fr-any
+- voice:oc2g+mod-bts0-dynts-osmo
+- gprs:oc2g
+- gprs:oc2g+mod-bts0-egprs
+- gprs:oc2g+mod-bts0-dynts-ipa
+- gprs:oc2g+mod-bts0-dynts-osmo
+- dynts:oc2g+mod-bts0-dynts67-ipa+cfg-codec-fr-any
+- dynts:oc2g+mod-bts0-dynts67-osmo
+
 - nitb_sms:trx-b200
 - sms:trx-b200
 - nitb_ussd:trx-b200

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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I5599c86565ebb6d7d6931d36fd49e57fe2020d1f
Gerrit-Change-Number: 13427
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-gsm-tester[master]: Integrate osmo-{bts,pcu}-oc2g

2019-03-27 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13113 )

Change subject: Integrate osmo-{bts,pcu}-oc2g
..

Integrate osmo-{bts,pcu}-oc2g

Change-Id: I446e27039f75e63c2870d751c190a4fd76947000
---
M example/defaults.conf
M example/resources.conf.prod
A example/scenarios/oc2g.conf
A src/osmo_gsm_tester/bts_oc2g.py
A src/osmo_gsm_tester/pcu_oc2g.py
M src/osmo_gsm_tester/resource.py
A src/osmo_gsm_tester/templates/osmo-bts-oc2g.cfg.tmpl
A src/osmo_gsm_tester/templates/osmo-pcu-oc2g.cfg.tmpl
8 files changed, 334 insertions(+), 1 deletion(-)

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



diff --git a/example/defaults.conf b/example/defaults.conf
index 3de5e29..353cf9b 100644
--- a/example/defaults.conf
+++ b/example/defaults.conf
@@ -87,3 +87,8 @@

 osmo_bts_virtual:
   max_trx: 1
+
+osmo_bts_oc2g:
+  max_trx: 1
+  trx_list:
+  - nominal_power: 25
diff --git a/example/resources.conf.prod b/example/resources.conf.prod
index dc7e337..a65add0 100644
--- a/example/resources.conf.prod
+++ b/example/resources.conf.prod
@@ -117,6 +117,14 @@
   addr: 10.42.42.55
   band: GSM-1800

+- label: OC-2G
+  type: osmo-bts-oc2g
+  ipa_unit_id: 14
+  addr: 10.42.42.100
+  band: GSM-900
+  direct_pcu: true
+  ciphers: [a5_0, a5_1, a5_3]
+
 arfcn:
   - arfcn: 512
 band: GSM-1800
diff --git a/example/scenarios/oc2g.conf b/example/scenarios/oc2g.conf
new file mode 100644
index 000..884e46b
--- /dev/null
+++ b/example/scenarios/oc2g.conf
@@ -0,0 +1,3 @@
+resources:
+  bts:
+  - type: osmo-bts-oc2g
diff --git a/src/osmo_gsm_tester/bts_oc2g.py b/src/osmo_gsm_tester/bts_oc2g.py
new file mode 100644
index 000..ec4ed3d
--- /dev/null
+++ b/src/osmo_gsm_tester/bts_oc2g.py
@@ -0,0 +1,137 @@
+# osmo_gsm_tester: specifics for running a osmo-bts-oc2g
+#
+# Copyright (C) 2019 by sysmocom - s.f.m.c. GmbH
+#
+# Author: Pau Espin Pedrol 
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see .
+
+import os
+import pprint
+from . import log, config, util, template, process, pcu_oc2g, bts_osmo
+
+class OsmoBtsOC2G(bts_osmo.OsmoBts):
+##
+# PROTECTED
+##
+
+REMOTE_DIR = '/osmo-gsm-tester-bts'
+BTS_OC2G_BIN = 'osmo-bts-oc2g'
+BTS_OC2G_CFG = 'osmo-bts-oc2g.cfg'
+
+def __init__(self, suite_run, conf):
+super().__init__(suite_run, conf, OsmoBtsOC2G.BTS_OC2G_BIN, 
'osmo_bts_oc2g')
+self.run_dir = None
+self.inst = None
+self.remote_inst = None
+self.remote_dir = None
+self.remote_user = 'root'
+
+def _direct_pcu_enabled(self):
+return util.str2bool(self.conf.get('direct_pcu'))
+
+def launch_remote(self, name, popen_args, remote_cwd=None, 
keepalive=False):
+run_dir = self.run_dir.new_dir(name)
+proc = process.RemoteProcess(name, run_dir, self.remote_user, 
self.remote_addr(), remote_cwd,
+ popen_args)
+self.suite_run.remember_to_stop(proc, keepalive)
+proc.launch()
+return proc
+
+def create_pcu(self):
+return pcu_oc2g.OsmoPcuOC2G(self.suite_run, self, self.conf)
+
+def configure(self):
+if self.bsc is None:
+raise RuntimeError('BTS needs to be added to a BSC or NITB before 
it can be configured')
+
+self.config_file = self.run_dir.new_file(OsmoBtsOC2G.BTS_OC2G_CFG)
+self.dbg(config_file=self.config_file)
+
+values = { 'osmo_bts_oc2g': config.get_defaults('osmo_bts_oc2g') }
+config.overlay(values, self.suite_run.config())
+config.overlay(values, {
+'osmo_bts_oc2g': {
+'oml_remote_ip': self.bsc.addr(),
+'pcu_socket_path': self.pcu_socket_path(),
+}
+})
+config.overlay(values, { 'osmo_bts_oc2g': self.conf })
+
+self.dbg('OSMO-BTS-OC2G CONFIG:\n' + pprint.pformat(values))
+
+with open(self.config_file, 'w') as f:
+r = template.render(OsmoBtsOC2G.BTS_OC2G_CFG, values)
+self.dbg(r)
+f.write(r)
+
+
+# PUBLIC - INTERNAL API
+
+def pcu_socket_path(self):
+return os.path.join(OsmoBtsOC2G.REMOTE_DIR, 'pcu_bts')
+
+def conf_for_bsc(self):
+  

Change in osmo-gsm-tester[master]: ttcn3: Enable tests against O2CG

2019-03-27 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13426 )

Change subject: ttcn3: Enable tests against O2CG
..

ttcn3: Enable tests against O2CG

Change-Id: Ie42f9144c6fa5cbee71e3f0b97d60c295f5f531e
---
M ttcn3/default-suites.conf
A ttcn3/scenarios/oc2g.conf
2 files changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/ttcn3/default-suites.conf b/ttcn3/default-suites.conf
index cfa46b4..14d2b35 100644
--- a/ttcn3/default-suites.conf
+++ b/ttcn3/default-suites.conf
@@ -1,2 +1,3 @@
 - ttcn3_bts_tests:trx
 - ttcn3_bts_tests:sysmo
+- ttcn3_bts_tests:oc2g
diff --git a/ttcn3/scenarios/oc2g.conf b/ttcn3/scenarios/oc2g.conf
new file mode 12
index 000..c85edf2
--- /dev/null
+++ b/ttcn3/scenarios/oc2g.conf
@@ -0,0 +1 @@
+../../example/scenarios/oc2g.conf
\ No newline at end of file

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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie42f9144c6fa5cbee71e3f0b97d60c295f5f531e
Gerrit-Change-Number: 13426
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 


Change in libosmocore[master]: BSSGP: use variable for NSEI

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

Change subject: BSSGP: use variable for NSEI
..


Patch Set 4: Code-Review+1

> Agreeing with osmith here. As Max is leaving sysmocom, assignign this to 
> osmith so he can remove the hunks related to the two "single use" instances. 
> Thanks!

Done.


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I919a717ca22646849d6ec7f62c677c536db0ed31
Gerrit-Change-Number: 13204
Gerrit-PatchSet: 4
Gerrit-Owner: Max 
Gerrit-Assignee: osmith 
Gerrit-Reviewer: André Boddenberg 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: osmith 
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Wed, 27 Mar 2019 14:49:19 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmocore[master]: BSSGP: use variable for NSEI

2019-03-27 Thread osmith
osmith has uploaded a new patch set (#4) to the change originally created by 
Max. ( https://gerrit.osmocom.org/13204 )

Change subject: BSSGP: use variable for NSEI
..

BSSGP: use variable for NSEI

Handle NSEI the same way as BVCI is handled: assign it to variable
instead of repetitive calls to msgb_nsei() - this simplifies log update
in follow-up patches and makes code slightly easier to read.

Change-Id: I919a717ca22646849d6ec7f62c677c536db0ed31
---
M src/gb/gprs_bssgp.c
1 file changed, 27 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/04/13204/4
--
To view, visit https://gerrit.osmocom.org/13204
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I919a717ca22646849d6ec7f62c677c536db0ed31
Gerrit-Change-Number: 13204
Gerrit-PatchSet: 4
Gerrit-Owner: Max 
Gerrit-Assignee: osmith 
Gerrit-Reviewer: André Boddenberg 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: osmith 
Gerrit-CC: Harald Welte 


Change in osmo-msc[master]: Log protocol for which transaction is allocated

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

Change subject: Log protocol for which transaction is allocated
..


Patch Set 2: Code-Review+1

(commit message: would be nice to start it with "transaction.c:" or similar)


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If4a5f3ecaec568b3f8d5a57d864184d7af2b95cc
Gerrit-Change-Number: 13420
Gerrit-PatchSet: 2
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 27 Mar 2019 14:35:13 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-pcu[master]: TS alloc: expand tests log

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

Change subject: TS alloc: expand tests log
..


Patch Set 28: Code-Review+1


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4b78951a79ddbc0745b39d091080a4e0e247d3c5
Gerrit-Change-Number: 3895
Gerrit-PatchSet: 28
Gerrit-Owner: Max 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 27 Mar 2019 14:31:20 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: build-old-tags: known error: osmo-bts-1.0.0

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

Change subject: build-old-tags: known error: osmo-bts-1.0.0
..


Patch Set 1:

This marks osmo-bts 1.0.0 as known error, so the new jenkins job passes again: 
https://jenkins.osmocom.org/jenkins/job/Osmocom-build-tags-against-master/13/console


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifa9953161ad4dbead09675f367baeffe19c788b7
Gerrit-Change-Number: 13430
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 27 Mar 2019 14:11:51 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-ci[master]: build-old-tags: known error: osmo-bts-1.0.0

2019-03-27 Thread osmith
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/13430


Change subject: build-old-tags: known error: osmo-bts-1.0.0
..

build-old-tags: known error: osmo-bts-1.0.0

Change-Id: Ifa9953161ad4dbead09675f367baeffe19c788b7
---
M scripts/osmocom-build-old-tags-against-master.sh
1 file changed, 3 insertions(+), 0 deletions(-)



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

diff --git a/scripts/osmocom-build-old-tags-against-master.sh 
b/scripts/osmocom-build-old-tags-against-master.sh
index 542785d..548ac3d 100755
--- a/scripts/osmocom-build-old-tags-against-master.sh
+++ b/scripts/osmocom-build-old-tags-against-master.sh
@@ -56,6 +56,9 @@
echo "1.2.1" # depends on libosmo-legacy-mgcp
echo "1.4.0" # testsuite
;;
+   osmo-bts)
+   echo "1.0.0" # missing gsm0808.h include, fixed in 1.0.1
+   ;;
osmo-mgw)
echo "1.3.0" # testsuite
echo "1.4.0" # testsuite

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifa9953161ad4dbead09675f367baeffe19c788b7
Gerrit-Change-Number: 13430
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 


Change in docker-playground[master]: Switch all osmo-*-master and ttcn3-*-test from jessie to stretch

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

Change subject: Switch all osmo-*-master and ttcn3-*-test from jessie to stretch
..


Patch Set 1:

I tested that all *-master and *test containers still build as expected. I 
didn't test if they produce identical results in executing the tests.

However, at least for the *-latest containers we were already using stretch, so 
*-master should work equally fine.  The only risk is in the ttcn3-*-test 
containers.


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I37a534d07081f3d321869c86d49d03171c8da0c6
Gerrit-Change-Number: 13429
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Comment-Date: Wed, 27 Mar 2019 13:53:34 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-pcu[master]: oc2g: Change log type (Litecell15->Oc2g)

2019-03-27 Thread Daniel Willmann
Daniel Willmann has posted comments on this change. ( 
https://gerrit.osmocom.org/13362 )

Change subject: oc2g: Change log type (Litecell15->Oc2g)
..


Patch Set 3:

> Patch Set 2:
>
> > I want to keep the commit from others unchanged as much as a can - even if 
> > this is really trivial.
>
> Than it probably make sense to keep commit meta-info as well: author, date, 
> original repo/branch etc. It's kinda confusing that for some commits in this 
> series it's preserved and for other it isn't.

I didn't change the author - this commit was actually a fixup from myself and 
thus doesn't have another author, date or original repo/branch.


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I95ced5da1c89dae5a16963b10b005747277f320b
Gerrit-Change-Number: 13362
Gerrit-PatchSet: 3
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-CC: Max 
Gerrit-Comment-Date: Wed, 27 Mar 2019 13:43:47 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in docker-playground[master]: Switch all osmo-*-master and ttcn3-*-test from jessie to stretch

2019-03-27 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/13429


Change subject: Switch all osmo-*-master and ttcn3-*-test from jessie to stretch
..

Switch all osmo-*-master and ttcn3-*-test from jessie to stretch

Jessie will be EOL in June 2019, let's make the switch to stretch
before that.

Change-Id: I37a534d07081f3d321869c86d49d03171c8da0c6
---
M README.md
M jenkins-common.sh
M nplab-m3ua-test/jenkins.sh
M nplab-sua-test/jenkins.sh
M osmo-bsc-master/Dockerfile
M osmo-bts-master/Dockerfile
M osmo-ggsn-master/Dockerfile
M osmo-hlr-master/Dockerfile
M osmo-hnbgw-master/Dockerfile
M osmo-mgw-master/Dockerfile
M osmo-msc-master/Dockerfile
M osmo-nitb-master/Dockerfile
M osmo-pcu-master/Dockerfile
M osmo-sgsn-master/Dockerfile
M osmo-sip-master/Dockerfile
M osmo-stp-master/Dockerfile
M osmocom-bb-host-master/Dockerfile
M sctp-test/Dockerfile
M sigtran-tests/Dockerfile
M ttcn3-bsc-test/jenkins-sccplite.sh
M ttcn3-bsc-test/jenkins.sh
M ttcn3-bscnat-test/jenkins.sh
M ttcn3-bts-test/jenkins.sh
M ttcn3-ggsn-test/jenkins.sh
M ttcn3-hlr-test/jenkins.sh
M ttcn3-mgw-test/jenkins.sh
M ttcn3-msc-test/jenkins.sh
M ttcn3-pcu-test/jenkins-sns.sh
M ttcn3-pcu-test/jenkins.sh
M ttcn3-sgsn-test/jenkins.sh
M ttcn3-sip-test/jenkins.sh
31 files changed, 46 insertions(+), 46 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/29/13429/1

diff --git a/README.md b/README.md
index 4977256..05ee31f 100644
--- a/README.md
+++ b/README.md
@@ -29,7 +29,7 @@
 container with the same name as the folder like this:

 ```
-$ cd debian-jessie-build
+$ cd debian-stretch-build
 $ make
 ```

@@ -50,7 +50,7 @@
 . ../jenkins-common.sh
 IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}"
 docker_images_require \
-   "debian-jessie-build" \
+   "debian-stretch-build" \
"osmo-stp-$IMAGE_SUFFIX" \
"osmo-bsc-$IMAGE_SUFFIX" \
"osmo-bts-$IMAGE_SUFFIX" \
diff --git a/jenkins-common.sh b/jenkins-common.sh
index 7c8e231..2c4288e 100644
--- a/jenkins-common.sh
+++ b/jenkins-common.sh
@@ -30,12 +30,12 @@
 }

 fix_perms() {
-   docker_images_require debian-jessie-build
+   docker_images_require debian-stretch-build
echo Fixing permissions
docker run  --rm \
-v $VOL_BASE_DIR:/data \
--name ${BUILD_TAG}-cleaner \
-   $REPO_USER/debian-jessie-build \
+   $REPO_USER/debian-stretch-build \
chmod -R a+rX /data/
 }

diff --git a/nplab-m3ua-test/jenkins.sh b/nplab-m3ua-test/jenkins.sh
index 800c5b2..103ea13 100755
--- a/nplab-m3ua-test/jenkins.sh
+++ b/nplab-m3ua-test/jenkins.sh
@@ -3,7 +3,7 @@
 . ../jenkins-common.sh
 IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}"
 docker_images_require \
-   "debian-jessie-build" \
+   "debian-stretch-build" \
"osmo-stp-$IMAGE_SUFFIX" \
"debian-stretch-titan" \
"nplab-m3ua-test"
diff --git a/nplab-sua-test/jenkins.sh b/nplab-sua-test/jenkins.sh
index fea5cf0..56a323d 100755
--- a/nplab-sua-test/jenkins.sh
+++ b/nplab-sua-test/jenkins.sh
@@ -3,7 +3,7 @@
 . ../jenkins-common.sh
 IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}"
 docker_images_require \
-   "debian-jessie-build" \
+   "debian-stretch-build" \
"osmo-stp-$IMAGE_SUFFIX" \
"debian-stretch-titan" \
"sigtran-tests" \
diff --git a/osmo-bsc-master/Dockerfile b/osmo-bsc-master/Dockerfile
index 5c76688..e39b324 100644
--- a/osmo-bsc-master/Dockerfile
+++ b/osmo-bsc-master/Dockerfile
@@ -1,9 +1,9 @@
 ARGUSER
-FROM   $USER/debian-jessie-build
+FROM   $USER/debian-stretch-build

 MAINTAINER Harald Welte 

-ARG
OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_8.0/;
+ARG
OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_9.0/;

 COPY   Release.key /tmp/Release.key

diff --git a/osmo-bts-master/Dockerfile b/osmo-bts-master/Dockerfile
index 69a8d4c..eae67e5 100644
--- a/osmo-bts-master/Dockerfile
+++ b/osmo-bts-master/Dockerfile
@@ -1,9 +1,9 @@
 ARGUSER
-FROM   $USER/debian-jessie-build
+FROM   $USER/debian-stretch-build

 MAINTAINER Harald Welte 

-ARG
OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_8.0/;
+ARG
OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_9.0/;

 COPY   Release.key /tmp/Release.key

diff --git a/osmo-ggsn-master/Dockerfile b/osmo-ggsn-master/Dockerfile
index 5acdf98..0cedb16 100644
--- a/osmo-ggsn-master/Dockerfile
+++ b/osmo-ggsn-master/Dockerfile
@@ -1,9 +1,9 @@
 ARGUSER
-FROM   $USER/debian-jessie-build
+FROM   $USER/debian-stretch-build

 MAINTAINER Harald Welte 

-ARG
OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_8.0/;
+ARG

Change in osmo-gsm-tester[master]: Integrate osmo-{bts,pcu}-oc2g

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

Change subject: Integrate osmo-{bts,pcu}-oc2g
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I446e27039f75e63c2870d751c190a4fd76947000
Gerrit-Change-Number: 13113
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Omar Ramadan 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 27 Mar 2019 13:37:34 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-gsm-tester[master]: default-suites.conf: Add tests for OC2G

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

Change subject: default-suites.conf: Add tests for OC2G
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5599c86565ebb6d7d6931d36fd49e57fe2020d1f
Gerrit-Change-Number: 13427
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Wed, 27 Mar 2019 13:37:54 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-gsm-tester[master]: ttcn3: Enable tests against O2CG

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

Change subject: ttcn3: Enable tests against O2CG
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie42f9144c6fa5cbee71e3f0b97d60c295f5f531e
Gerrit-Change-Number: 13426
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Wed, 27 Mar 2019 13:37:48 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-pcu[master]: Add ARQ type helpers

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

Change subject: Add ARQ type helpers
..


Patch Set 5: Code-Review+2


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I844aca7dcd9d7f41e5975c1edd1905951f271998
Gerrit-Change-Number: 13406
Gerrit-PatchSet: 5
Gerrit-Owner: Max 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 27 Mar 2019 13:37:01 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-pcu[master]: Use boolean for DL resegmentation parameter

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

Change subject: Use boolean for DL resegmentation parameter
..


Patch Set 10: Code-Review+2


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4d4fe5fe12068a4532cb3b61d4eeb229a77c1476
Gerrit-Change-Number: 13057
Gerrit-PatchSet: 10
Gerrit-Owner: Max 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 27 Mar 2019 13:36:22 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-pcu[master]: jenkins.sh: Add oc2g build support

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

Change subject: jenkins.sh: Add oc2g build support
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I014e5e59bc5e904a616ddf50ebfb8247f0d428cf
Gerrit-Change-Number: 13428
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Comment-Date: Wed, 27 Mar 2019 13:35:05 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-pcu[master]: OC-2G: Always use positive TA information provided in PH-RA-IND

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

Change subject: OC-2G: Always use positive TA information provided in PH-RA-IND
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia526f712b95eb7bba99252f2a348d9fb5d2f3838
Gerrit-Change-Number: 13359
Gerrit-PatchSet: 2
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Minh-Quang Nguyen 
Gerrit-Comment-Date: Wed, 27 Mar 2019 13:34:40 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-pcu[master]: oc2g: Remove custom alarms

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

Change subject: oc2g: Remove custom alarms
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I51de826aa732a3875d75396b46b7d2821ef7417c
Gerrit-Change-Number: 13360
Gerrit-PatchSet: 2
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 27 Mar 2019 13:34:51 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-pcu[master]: OC-2G: Fix TA adjustment

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

Change subject: OC-2G: Fix TA adjustment
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7665586dd5722bbe04632ee5673d3033bc082324
Gerrit-Change-Number: 13358
Gerrit-PatchSet: 2
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Minh-Quang Nguyen 
Gerrit-Comment-Date: Wed, 27 Mar 2019 13:34:32 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-pcu[master]: Initial commit for OC-2G support.

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

Change subject: Initial commit for OC-2G support.
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7cd89a549c9463e81893ca7dd925299f728e4453
Gerrit-Change-Number: 13356
Gerrit-PatchSet: 2
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 27 Mar 2019 13:34:06 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-pcu[master]: OC-2G: Fix missing header

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

Change subject: OC-2G: Fix missing header
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ida0592c9da74588a57d9d2d5be40fcf79edcb596
Gerrit-Change-Number: 13357
Gerrit-PatchSet: 2
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Minh-Quang Nguyen 
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 27 Mar 2019 13:34:14 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-pcu[master]: OC-2G: Fix TA adjustment

2019-03-27 Thread Daniel Willmann
Hello Harald Welte, Minh-Quang Nguyen, Jenkins Builder,

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

https://gerrit.osmocom.org/13358

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

Change subject: OC-2G: Fix TA adjustment
..

OC-2G: Fix TA adjustment

Problem:
 TA provided from L1 PH-DATA-IND is a relative amount of TA adjustment to 
actual TA
 being used for given TBF. The current TA update algorithm in PCU simply 
applies the relative
 amount of TA to given TBF but does not take into account of current TA.
 As a result, the PCU will request wrong TA jump for given TBF if the MS is 
moving away from
 BTS more than 2 km.

 Related issue: http://osmocom.org/issues/2611

Fixes:
- The PCU needs increase or decrease current TA of given TBF on receiving of 
relative
  amount of TA adjustment provided by PH-DATA-IND from L1.
- The PCU needs to set absolute TA of given TBF on receiving absolute TA 
provided by
  PH-RA-IND from L1.

From-Commit: 139ad3f42193
From-Remote: https://gitlab.com/nrw_noa/osmo-pcu
Change-Id: I7665586dd5722bbe04632ee5673d3033bc082324
---
M src/osmo-bts-oc2g/oc2g_l1_if.c
1 file changed, 2 insertions(+), 2 deletions(-)


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I7665586dd5722bbe04632ee5673d3033bc082324
Gerrit-Change-Number: 13358
Gerrit-PatchSet: 2
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Minh-Quang Nguyen 


Change in osmo-pcu[master]: jenkins.sh: Add oc2g build support

2019-03-27 Thread Daniel Willmann
Daniel Willmann has uploaded this change for review. ( 
https://gerrit.osmocom.org/13428


Change subject: jenkins.sh: Add oc2g build support
..

jenkins.sh: Add oc2g build support

Related: OS#3749, SYS#4524
Change-Id: I014e5e59bc5e904a616ddf50ebfb8247f0d428cf
---
M contrib/jenkins.sh
1 file changed, 6 insertions(+), 0 deletions(-)



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

diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index 7af7309..e805080 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -48,6 +48,12 @@
   osmo-layer1-headers.sh lc15 "$FIRMWARE_VERSION"
   cd "$base"

+elif [ "$with_dsp" = oc2g ]; then
+  PCU_CONFIG="$PCU_CONFIG --enable-oc2gbts-phy 
--with-oc2g=$deps/layer1-headers/inc"
+  cd "$deps"
+  osmo-layer1-headers.sh oc2g "$FIRMWARE_VERSION"
+  cd "$base"
+
 elif [ -z "$with_dsp" -o "$with_dsp" = none ]; then
   echo "Direct DSP access disabled, sanitizer enabled"
   PCU_CONFIG="$PCU_CONFIG --enable-werror --enable-sanitize"

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I014e5e59bc5e904a616ddf50ebfb8247f0d428cf
Gerrit-Change-Number: 13428
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 


Change in osmo-pcu[master]: oc2g: Remove custom alarms

2019-03-27 Thread Daniel Willmann
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/13360

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

Change subject: oc2g: Remove custom alarms
..

oc2g: Remove custom alarms

Don't try to send custom alarms that weren't included in upstream.

Change-Id: I51de826aa732a3875d75396b46b7d2821ef7417c
---
M src/osmo-bts-oc2g/oc2g_l1_if.c
1 file changed, 0 insertions(+), 7 deletions(-)


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I51de826aa732a3875d75396b46b7d2821ef7417c
Gerrit-Change-Number: 13360
Gerrit-PatchSet: 2
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Pau Espin Pedrol 


Change in osmo-pcu[master]: OC-2G: Always use positive TA information provided in PH-RA-IND

2019-03-27 Thread Daniel Willmann
Hello Harald Welte, Minh-Quang Nguyen, Jenkins Builder,

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

https://gerrit.osmocom.org/13359

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

Change subject: OC-2G: Always use positive TA information provided in PH-RA-IND
..

OC-2G: Always use positive TA information provided in PH-RA-IND

From-Commit: 960aa3d1b0b1
From-Remote: https://gitlab.com/nrw_noa/osmo-pcu
Change-Id: Ia526f712b95eb7bba99252f2a348d9fb5d2f3838
---
M src/osmo-bts-oc2g/oc2g_l1_if.c
1 file changed, 3 insertions(+), 2 deletions(-)


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia526f712b95eb7bba99252f2a348d9fb5d2f3838
Gerrit-Change-Number: 13359
Gerrit-PatchSet: 2
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Minh-Quang Nguyen 


Change in osmo-pcu[master]: OC-2G: Fix missing header

2019-03-27 Thread Daniel Willmann
Hello Minh-Quang Nguyen, Jenkins Builder,

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

https://gerrit.osmocom.org/13357

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

Change subject: OC-2G: Fix missing header
..

OC-2G: Fix missing header

From-Commit: a9eefb54c62a
From-Remote: https://gitlab.com/nrw_noa/osmo-pcu
Change-Id: Ida0592c9da74588a57d9d2d5be40fcf79edcb596
---
M src/osmo-bts-oc2g/oc2g_l1_if.c
1 file changed, 2 insertions(+), 0 deletions(-)


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ida0592c9da74588a57d9d2d5be40fcf79edcb596
Gerrit-Change-Number: 13357
Gerrit-PatchSet: 2
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Minh-Quang Nguyen 
Gerrit-CC: Harald Welte 
Gerrit-CC: Pau Espin Pedrol 


Change in osmo-pcu[master]: Initial commit for OC-2G support.

2019-03-27 Thread Daniel Willmann
Hello Pau Espin Pedrol, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/13356

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

Change subject: Initial commit for OC-2G support.
..

Initial commit for OC-2G support.

From-Commit: b77fd00608dd
From-Remote: https://gitlab.com/nrw_noa/osmo-pcu
Change-Id: I7cd89a549c9463e81893ca7dd925299f728e4453
---
M configure.ac
M src/Makefile.am
A src/osmo-bts-oc2g/oc2g_l1_hw.c
A src/osmo-bts-oc2g/oc2g_l1_if.c
A src/osmo-bts-oc2g/oc2g_l1_if.h
A src/osmo-bts-oc2g/oc2gbts.c
A src/osmo-bts-oc2g/oc2gbts.h
7 files changed, 1,145 insertions(+), 0 deletions(-)


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I7cd89a549c9463e81893ca7dd925299f728e4453
Gerrit-Change-Number: 13356
Gerrit-PatchSet: 2
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-pcu[master]: Update MCS selection for retransmission

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

Change subject: Update MCS selection for retransmission
..


Patch Set 4:

(1 comment)

https://gerrit.osmocom.org/#/c/13402/1/src/coding_scheme.c
File src/coding_scheme.c:

https://gerrit.osmocom.org/#/c/13402/1/src/coding_scheme.c@131
PS1, Line 131: /* FIXME: take into account padding and special cases of 
commanded MCS (MCS-6-9 and MCS-5-7) */
> commanded MCS? do you mean demanded_mcs?
Done



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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia73baeefee7a58834f0fc50e3b8bf8d5e3eb7815
Gerrit-Change-Number: 13402
Gerrit-PatchSet: 4
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 27 Mar 2019 13:03:32 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-pcu[master]: Update MCS selection for retransmission

2019-03-27 Thread Max
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/13402

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

Change subject: Update MCS selection for retransmission
..

Update MCS selection for retransmission

In 3GPP TS 44.060 the selection of MCS for retransmissions is defined as
separate tables (8.1.1.1 and 8.1.1.2) depending on the value of
resegmentation bit (which is opposite to the way EGPRS_ARQ are defined
in the source code). Let's follow the same idea and explicitly check for
resegmentation bit value and use separate tables. This also makes it
easier to add proper support for special cases (MCS-6-9 and MCS-5-7) and
padding in future independently for different ARQ types. The code is
also moved to c to avoid unnecessary conversions to and from cpp class.

Change-Id: Ia73baeefee7a58834f0fc50e3b8bf8d5e3eb7815
---
M src/coding_scheme.c
M src/coding_scheme.h
M src/gprs_coding_scheme.cpp
M src/gprs_coding_scheme.h
M src/tbf_dl.cpp
5 files changed, 40 insertions(+), 50 deletions(-)


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia73baeefee7a58834f0fc50e3b8bf8d5e3eb7815
Gerrit-Change-Number: 13402
Gerrit-PatchSet: 4
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-CC: Pau Espin Pedrol 


Change in osmo-gsm-tester[master]: default-suites.conf: Add tests for OC2G

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


Change subject: default-suites.conf: Add tests for OC2G
..

default-suites.conf: Add tests for OC2G

Change-Id: I5599c86565ebb6d7d6931d36fd49e57fe2020d1f
---
M example/default-suites.conf
1 file changed, 18 insertions(+), 0 deletions(-)



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

diff --git a/example/default-suites.conf b/example/default-suites.conf
index 5ba36e1..f93c933 100644
--- a/example/default-suites.conf
+++ b/example/default-suites.conf
@@ -16,6 +16,24 @@
 - dynts:sysmo+mod-bts0-dynts67-ipa+cfg-codec-fr-any
 - dynts:sysmo+mod-bts0-dynts67-osmo

+- nitb_sms:oc2g
+- sms:oc2g
+- nitb_ussd:oc2g
+- ussd:oc2g
+- voice:oc2g+mod-bts0-ts-tchf+cfg-codec-fr1
+- voice:oc2g+mod-bts0-ts-tchf+cfg-codec-fr2
+- voice:oc2g+mod-bts0-ts-tchf+cfg-codec-fr3
+- voice:oc2g+mod-bts0-ts-tchh+cfg-codec-hr1
+- voice:oc2g+mod-bts0-ts-tchh+cfg-codec-hr3
+- voice:oc2g+mod-bts0-dynts-ipa+cfg-codec-fr-any
+- voice:oc2g+mod-bts0-dynts-osmo
+- gprs:oc2g
+- gprs:oc2g+mod-bts0-egprs
+- gprs:oc2g+mod-bts0-dynts-ipa
+- gprs:oc2g+mod-bts0-dynts-osmo
+- dynts:oc2g+mod-bts0-dynts67-ipa+cfg-codec-fr-any
+- dynts:oc2g+mod-bts0-dynts67-osmo
+
 - nitb_sms:trx-b200
 - sms:trx-b200
 - nitb_ussd:trx-b200

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

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


Change in osmo-gsm-tester[master]: ttcn3: Enable tests against O2CG

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


Change subject: ttcn3: Enable tests against O2CG
..

ttcn3: Enable tests against O2CG

Change-Id: Ie42f9144c6fa5cbee71e3f0b97d60c295f5f531e
---
M ttcn3/default-suites.conf
A ttcn3/scenarios/oc2g.conf
2 files changed, 2 insertions(+), 0 deletions(-)



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

diff --git a/ttcn3/default-suites.conf b/ttcn3/default-suites.conf
index cfa46b4..14d2b35 100644
--- a/ttcn3/default-suites.conf
+++ b/ttcn3/default-suites.conf
@@ -1,2 +1,3 @@
 - ttcn3_bts_tests:trx
 - ttcn3_bts_tests:sysmo
+- ttcn3_bts_tests:oc2g
diff --git a/ttcn3/scenarios/oc2g.conf b/ttcn3/scenarios/oc2g.conf
new file mode 12
index 000..c85edf2
--- /dev/null
+++ b/ttcn3/scenarios/oc2g.conf
@@ -0,0 +1 @@
+../../example/scenarios/oc2g.conf
\ No newline at end of file

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

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


Change in osmo-gsm-tester[master]: Integrate osmo-{bts,pcu}-oc2g

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

Change subject: Integrate osmo-{bts,pcu}-oc2g
..


Set Ready For Review


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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I446e27039f75e63c2870d751c190a4fd76947000
Gerrit-Change-Number: 13113
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Omar Ramadan 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 27 Mar 2019 12:58:17 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-pcu[master]: Update MCS selection for retransmission

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

Change subject: Update MCS selection for retransmission
..


Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/#/c/13402/1/src/coding_scheme.c
File src/coding_scheme.c:

https://gerrit.osmocom.org/#/c/13402/1/src/coding_scheme.c@136
PS1, Line 136:  OSMO_ASSERT(NUM_SCHEMES - MCS1 == 9);
> May be worth adding an OSMO_STATIC_ASSERT() macro in libosmocore

Excellent idea! Please update this code once the macro is available in 
libosmocore.



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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia73baeefee7a58834f0fc50e3b8bf8d5e3eb7815
Gerrit-Change-Number: 13402
Gerrit-PatchSet: 3
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 27 Mar 2019 12:48:42 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-pcu[master]: Use boolean for DL resegmentation parameter

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

Change subject: Use boolean for DL resegmentation parameter
..


Patch Set 9:

(1 comment)

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

https://gerrit.osmocom.org/#/c/13057/8/src/pcu_main.cpp@264
PS8, Line 264:   * can also be configured through VTY (egprs dl arq-type ...)
> consider mentioning the VTY option here, since it isn't obvious from the 
> variable name anymore.
Done



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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4d4fe5fe12068a4532cb3b61d4eeb229a77c1476
Gerrit-Change-Number: 13057
Gerrit-PatchSet: 9
Gerrit-Owner: Max 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 27 Mar 2019 12:46:11 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-pcu[master]: Add ARQ type helpers

2019-03-27 Thread Max
Hello Daniel Willmann, Harald Welte, osmith, Jenkins Builder,

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

https://gerrit.osmocom.org/13406

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

Change subject: Add ARQ type helpers
..

Add ARQ type helpers

Add functions to check/log EGPRS ARQ type (as described in 3GPP TS
44.060 §8.1.1). Note - this requires updating previously incorrect TBF
test output.

Depends on: I85b7dc8e8786671a054af2f1e7d836b863a25e60 and
Ib39e4424f73c677b34f921917440f211e400e14f in OsmoPCU.

Change-Id: I844aca7dcd9d7f41e5975c1edd1905951f271998
---
M src/coding_scheme.c
M src/coding_scheme.h
M src/gprs_coding_scheme.h
M src/pcu_vty.c
M src/tbf_dl.cpp
M tests/tbf/TbfTest.err
6 files changed, 51 insertions(+), 30 deletions(-)


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I844aca7dcd9d7f41e5975c1edd1905951f271998
Gerrit-Change-Number: 13406
Gerrit-PatchSet: 4
Gerrit-Owner: Max 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: osmith 


Change in osmo-pcu[master]: Use boolean for DL resegmentation parameter

2019-03-27 Thread Max
Hello Pau Espin Pedrol, Daniel Willmann, Harald Welte, osmith, Jenkins Builder,

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

https://gerrit.osmocom.org/13057

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

Change subject: Use boolean for DL resegmentation parameter
..

Use boolean for DL resegmentation parameter

In some places #define was used for DL resegmentation parameter, in
other int, in some other bool. Let's clarify this and always use boolean
value of resegment bit directly as it's described in 3GPP TS
44.060 - appropriate clarification added as comment to bts.h.

Change-Id: I4d4fe5fe12068a4532cb3b61d4eeb229a77c1476
---
M src/bts.h
M src/coding_scheme.c
M src/coding_scheme.h
M src/pcu_main.cpp
M src/pcu_vty.c
M src/tbf_dl.cpp
M tests/tbf/TbfTest.cpp
7 files changed, 17 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/57/13057/9
--
To view, visit https://gerrit.osmocom.org/13057
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I4d4fe5fe12068a4532cb3b61d4eeb229a77c1476
Gerrit-Change-Number: 13057
Gerrit-PatchSet: 9
Gerrit-Owner: Max 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 


Change in osmo-pcu[master]: Add ARQ type helpers

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

Change subject: Add ARQ type helpers
..


Patch Set 3:

(2 comments)

https://gerrit.osmocom.org/#/c/13406/3/src/coding_scheme.c
File src/coding_scheme.c:

https://gerrit.osmocom.org/#/c/13406/3/src/coding_scheme.c@177
PS3, Line 177: char *egprs_arq_type_name(const struct gprs_rlcmac_bts *bts)
> "const char *"?
Ack


https://gerrit.osmocom.org/#/c/13406/3/src/pcu_vty.c
File src/pcu_vty.c:

https://gerrit.osmocom.org/#/c/13406/3/src/pcu_vty.c@222
PS3, Line 222:  if (egprs_arq_type_2(bts))
> Just being curious: what's the advantage of using a function here? The 
> previous statement is shorter […]
It makes it easier to modify - see follow-up patch.



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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I844aca7dcd9d7f41e5975c1edd1905951f271998
Gerrit-Change-Number: 13406
Gerrit-PatchSet: 3
Gerrit-Owner: Max 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 27 Mar 2019 12:43:01 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-pcu[master]: Rewrite Packet Uplink IA Rest Octets for MBA

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

Change subject: Rewrite Packet Uplink IA Rest Octets for MBA
..

Rewrite Packet Uplink IA Rest Octets for MBA

Use bitvec_set_*() directly without external write pointer tracking to
simplify the code. This is part of IA Rest Octets (3GPP TS 44.018
§10.5.2.16) which is the last part of the message so it should not
interfere with the rest of encoding functions.

That's partially based on reverted commit 
93d947f5e8a30acc9250c124bf9d5bb6a8863526.

Change-Id: Ibe294b26ac374b9264a734db9663cacc105a4474
Related: OS#3014
---
M src/encoding.cpp
1 file changed, 21 insertions(+), 20 deletions(-)

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



diff --git a/src/encoding.cpp b/src/encoding.cpp
index b0d0467..769e049 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -257,30 +257,30 @@
 }

 static int write_ia_rest_uplink_mba(const gprs_rlcmac_ul_tbf *tbf, bitvec 
*dest, uint8_t usf,
-   uint8_t alpha, uint8_t gamma, unsigned& wp)
+   uint8_t alpha, uint8_t gamma)
 {
int rc = 0;

-   bitvec_write_field(dest, , 1, 1);// Block Allocation: Not Single 
Block Allocation
-   bitvec_write_field(dest, , tbf->tfi(), 5);  // TFI_ASSIGNMENT 
Temporary Flow Identity
-   bitvec_write_field(dest, , 0, 1);// POLLING
-   bitvec_write_field(dest, , 0, 1);// ALLOCATION_TYPE: dynamic
-   bitvec_write_field(dest, , usf, 3);// USF
-   bitvec_write_field(dest, , 0, 1);// USF_GRANULARITY
-   bitvec_write_field(dest, , 0, 1);   // "0" power control: Not Present
-   bitvec_write_field(dest, , mcs_chan_code(tbf->current_cs()), 2);
// CHANNEL_CODING_COMMAND
-   bitvec_write_field(dest, , 1, 1);// TLLI_BLOCK_CHANNEL_CODING
-   if (alpha) {
-   bitvec_write_field(dest, , 0x1, 1);   // ALPHA = present
-   bitvec_write_field(dest, , alpha, 4);   // ALPHA
-   } else
-   bitvec_write_field(dest, , 0x0, 1);   // ALPHA = not present
+   SET_1(dest); /* Multi Block Allocation */

-   bitvec_write_field(dest, , gamma, 5);   // GAMMA power control 
parameter
+   rc = write_tfi_usf(dest, tbf, usf);
+   CHECK(rc);

-   /* note: there is no choise for TAI and no starting time */
-   bitvec_write_field(dest, , 0, 1);   // switch TIMING_ADVANCE_INDEX = 
off
-   bitvec_write_field(dest, , 0, 1);// TBF_STARTING_TIME_FLAG
+   /* 3GPP TS 44.060 Table 11.2.28.2 Channel Coding Indicator */
+   rc = bitvec_set_u64(dest, mcs_chan_code(tbf->current_cs()), 2, false); 
/* CHANNEL_CODING_COMMAND */
+   CHECK(rc);
+
+   /* TLLI_BLOCK_CHANNEL_CODING */
+   SET_1(dest); /* use coding scheme as specified by the corresponding 
CHANNEL CODING COMMAND */
+
+   rc = write_alpha_gamma(dest, alpha, gamma);
+   CHECK(rc);
+
+   /* No TIMING_ADVANCE_INDEX */
+   SET_0(dest);
+
+   /* No TBF_STARTING_TIME */
+   SET_0(dest);

return rc;
 }
@@ -520,7 +520,8 @@
bitvec_write_field(dest, , 0, 2);// "0" Packet Uplink 
Assignment

if (as_ul_tbf(tbf) != NULL) {
-   rc = write_ia_rest_uplink_mba(as_ul_tbf(tbf), dest, 
usf, alpha, gamma, wp);
+   dest->cur_bit = wp;
+   rc = write_ia_rest_uplink_mba(as_ul_tbf(tbf), dest, 
usf, alpha, gamma);
} else {
rc = write_ia_rest_uplink_sba(dest, fn, alpha, gamma, 
ta_idx, wp);
}

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ibe294b26ac374b9264a734db9663cacc105a4474
Gerrit-Change-Number: 12961
Gerrit-PatchSet: 11
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 


Change in osmo-pcu[master]: TBF-DL: cosmetic update for helper routines

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

Change subject: TBF-DL: cosmetic update for helper routines
..

TBF-DL: cosmetic update for helper routines

* use enum values where appropriate
* reformat to proper code style to improve readability

Change-Id: If1d2bc69b0d43fc520e579457007704b7975117e
---
M src/tbf_dl.cpp
1 file changed, 32 insertions(+), 38 deletions(-)

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



diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 04c6499..08df05a 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -688,7 +688,7 @@
 * the current limit.
 */
cs = m_rlc.block(index)->cs_current_trans;
-   GprsCodingScheme _init = m_rlc.block(index)->cs_init;
+   enum CodingScheme cs_init = m_rlc.block(index)->cs_init;
bsns[0] = index;
num_bsns = 1;

@@ -702,11 +702,10 @@
 * if the intial mcs is 8 and retransmission mcs is either 6 or 3
 * we have to include the padding of 6 octets in first segment
 */
-   if ((CodingScheme(cs_init) == MCS8) &&
-   (CodingScheme(cs) == MCS6 ||
-   CodingScheme(cs) == MCS3)) {
+   if ((cs_init == MCS8) &&
+   (cs == MCS6 || cs == MCS3)) {
if (spb_status == EGPRS_RESEG_DL_DEFAULT ||
-   spb_status == EGPRS_RESEG_SECOND_SEG_SENT)
+   spb_status == EGPRS_RESEG_SECOND_SEG_SENT)
need_padding  = true;
} else if (num_bsns == 1) {
/* TODO: remove the conditional when MCS-6 padding isn't
@@ -1248,8 +1247,12 @@
egprs_rlc_dl_reseg_bsn_state *block_status_dl =
_data->spb_status.block_status_dl;

-   GprsCodingScheme _current_trans = m_rlc.block(bsn)->cs_current_trans;
-   GprsCodingScheme _init = m_rlc.block(bsn)->cs_init;
+   enum CodingScheme cs_init = CodingScheme(rlc_data->cs_init);
+   enum CodingScheme cs_current_trans = 
CodingScheme(rlc_data->cs_current_trans);
+
+   enum HeaderType ht_cs_init = rlc_data->cs_init.headerTypeData();
+   enum HeaderType ht_cs_current_trans = 
rlc_data->cs_current_trans.headerTypeData();
+
*block_data = _data->block[0];

/*
@@ -1259,10 +1262,9 @@
 * MCS8: second segment starts at 31
 * MCS4: second segment starts at 44/2 = 22
 */
-   if (cs_current_trans.headerTypeData() ==
-   HEADER_EGPRS_DATA_TYPE_3) {
+   if (ht_cs_current_trans == HEADER_EGPRS_DATA_TYPE_3) {
if (*block_status_dl == EGPRS_RESEG_FIRST_SEG_SENT) {
-   switch (CodingScheme(cs_init)) {
+   switch (cs_init) {
case MCS6 :
case MCS9 :
*block_data = _data->block[37];
@@ -1281,21 +1283,17 @@
LOGPTBFDL(this, LOGL_ERROR,
  "FIXME: Software error: hit invalid 
condition. "
  "headerType(%d) blockstatus(%d) 
cs(%s) PLEASE FIX!\n",
- cs_current_trans.headerTypeData(),
+ ht_cs_current_trans,
  *block_status_dl, mcs_name(cs_init));
break;

}
return EGPRS_RESEG_SECOND_SEG_SENT;
-   } else if ((cs_init.headerTypeData() ==
-   HEADER_EGPRS_DATA_TYPE_1) ||
-   (cs_init.headerTypeData() ==
-   HEADER_EGPRS_DATA_TYPE_2)) {
+   } else if ((ht_cs_init == HEADER_EGPRS_DATA_TYPE_1) ||
+  (ht_cs_init == HEADER_EGPRS_DATA_TYPE_2)) {
return EGPRS_RESEG_FIRST_SEG_SENT;
-   } else if ((CodingScheme(cs_init) ==
-   MCS4) &&
-   (CodingScheme(cs_current_trans) ==
-   MCS1)) {
+   } else if ((cs_init == MCS4) &&
+  (cs_current_trans == MCS1)) {
return EGPRS_RESEG_FIRST_SEG_SENT;
}
}
@@ -1320,34 +1318,30 @@
 enum egprs_rlcmac_dl_spb gprs_rlcmac_dl_tbf::get_egprs_dl_spb(const int bsn)
 {
struct gprs_rlc_data *rlc_data = m_rlc.block(bsn);
-   egprs_rlc_dl_reseg_bsn_state block_status_dl =
-   rlc_data->spb_status.block_status_dl;
+   egprs_rlc_dl_reseg_bsn_state block_status_dl = 
rlc_data->spb_status.block_status_dl;

-   GprsCodingScheme _current_trans = m_rlc.block(bsn)->cs_current_trans;
-   GprsCodingScheme _init = m_rlc.block(bsn)->cs_init;
+   enum CodingScheme cs_init = 

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

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

Change subject: Fix Channel Coding Command for MCS
..

Fix Channel Coding Command for MCS

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

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

Change-Id: I868062a81fffe6714a811c032215f25a79259905
---
M src/encoding.cpp
M tests/tbf/TbfTest.cpp
M tests/types/TypesTest.cpp
M tests/types/TypesTest.ok
4 files changed, 12 insertions(+), 12 deletions(-)

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



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

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

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

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

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

bitvec_write_field(dest, , 1, 1); // 1: have 
CONTENTION_RESOLUTION_TLLI
@@ -991,7 +991,7 @@
bitvec_write_field(dest, , 0, 2); // fixed 00
/* CHANNEL_CODING_COMMAND */
bitvec_write_field(dest, ,
-   tbf->current_cs().to_num() - 1, 4);
+   mcs_chan_code(tbf->current_cs()), 4);
/* 0: no RESEGMENT, 1: Segmentation*/
bitvec_write_field(dest, , 1, 1);
bitvec_write_field(dest, , 1, 1); // PRE_EMPTIVE_TRANSMISSION, TODO: 
This resembles GPRS, change it?
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index 6dc802c..151e7fa 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -739,7 +739,7 @@

struct msgb *msg1 = ul_tbf->create_ul_ack(*fn, ts_no);

-   static uint8_t exp1[] = { 0x40, 0x24, 0x01, 0x3f, 0x3e, 0x24, 0x46, 
0x68, 0x90, 0x87, 0xb0, 0x06,
+   static uint8_t exp1[] = { 0x40, 0x24, 0x01, 0x03, 0x3e, 0x24, 0x46, 
0x68, 0x90, 0x87, 0xb0, 0x06,
  0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 
0x2b, 0x2b, 0x2b, 0x2b
};

@@ -766,7 +766,7 @@

msg1 = ul_tbf->create_ul_ack(*fn, ts_no);

-   static uint8_t exp2[] = { 0x40, 0x24, 0x01, 0x3f, 0x3e, 0x24, 0x46, 
0x68, 0x90, 0x88, 0xb0, 0x06, 0x8b,
+   static uint8_t exp2[] = { 0x40, 0x24, 0x01, 0x03, 0x3e, 0x24, 0x46, 
0x68, 0x90, 0x88, 0xb0, 0x06, 0x8b,
  

Change in osmo-pcu[master]: Update IA Rest Octets encoding

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

Change subject: Update IA Rest Octets encoding
..

Update IA Rest Octets encoding

Write initial bits of 3GPP TS 44.018 §10.5.2.16 IA Rest Octets the same
way as  write_ia_rest_*() routines do.

This should also fix the issue addressed in
I75dd5bebc74eea85edf9582607c774d0bba0d2a6 initially by properly encoding
L/H bits.

Change-Id: I7ed5270bf95c3f6e9e026ff447eef8539f6f0314
---
M src/encoding.cpp
1 file changed, 13 insertions(+), 17 deletions(-)

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



diff --git a/src/encoding.cpp b/src/encoding.cpp
index b460d41..1b325b4 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -497,41 +497,37 @@
plen = wp / 8;

/* 3GPP TS 44.018 §10.5.2.16 IA Rest Octets */
+   dest->cur_bit = wp;
if (downlink) {
if (!as_dl_tbf(tbf)) {
LOGP(DRLCMACDL, LOGL_ERROR, "Cannot encode DL IMMEDIATE 
ASSIGNMENT without TBF\n");
return -EINVAL;
}

-   dest->cur_bit = wp;
rc = write_ia_rest_downlink(as_dl_tbf(tbf), dest, polling, 
gsm48_ta_is_valid(ta), fn, alpha, gamma,
ta_idx);
} else if (((burst_type == GSM_L1_BURST_TYPE_ACCESS_1) || (burst_type 
== GSM_L1_BURST_TYPE_ACCESS_2))) {
-   bitvec_write_field(dest, , 1, 2);/* LH */
-   bitvec_write_field(dest, , 0, 2);/* 0 EGPRS Uplink 
Assignment */
-   bitvec_write_field(dest, , ra & 0x1F, 5);/* Extended RA 
*/
-   bitvec_write_field(dest, , 0, 1);/* Access technology 
Request */
+   SET_L(dest); SET_H(dest); // "LH"
+   SET_0(dest); SET_0(dest); // "00" < EGPRS Packet Uplink 
Assignment >
+   rc = bitvec_set_u64(dest, ra & 0x1F, 5, false); // < Extended 
RA >
+   CHECK(rc);

-   if (as_ul_tbf(tbf) != NULL) {
-   dest->cur_bit = wp;
+   SET_0(dest); // No < Access Technologies Request struct >
+
+   if (as_ul_tbf(tbf) != NULL)
rc = write_ia_rest_egprs_uplink_sba(as_ul_tbf(tbf), 
dest, usf, alpha, gamma, ta_idx);
-   } else {
-   dest->cur_bit = wp;
+   else
rc = write_ia_rest_egprs_uplink_mba(dest, fn, alpha, 
gamma);
-   }
} else {
OSMO_ASSERT(!tbf || !tbf->is_egprs_enabled());

-   bitvec_write_field(dest, , 3, 2);// "HH"
-   bitvec_write_field(dest, , 0, 2);// "0" Packet Uplink 
Assignment
+   SET_H(dest); SET_H(dest); // "HH"
+   SET_0(dest); SET_0(dest); // "00" < Packet Uplink Assignment >

-   if (as_ul_tbf(tbf) != NULL) {
-   dest->cur_bit = wp;
+   if (as_ul_tbf(tbf) != NULL)
rc = write_ia_rest_uplink_mba(as_ul_tbf(tbf), dest, 
usf, alpha, gamma, ta_idx);
-   } else {
-   dest->cur_bit = wp;
+   else
rc = write_ia_rest_uplink_sba(dest, fn, alpha, gamma);
-   }
}

if (rc < 0) {

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I7ed5270bf95c3f6e9e026ff447eef8539f6f0314
Gerrit-Change-Number: 13245
Gerrit-PatchSet: 5
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 


Change in osmo-pcu[master]: TBF: update MCS counters

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

Change subject: TBF: update MCS counters
..

TBF: update MCS counters

* use enum CodingScheme directly instead of converting it to class and
  back
* drop useless mode check
* log errorneous update attempt

Change-Id: I763136c2f356d63aa3d28d09c57fd5faf5336258
---
M src/tbf.h
M src/tbf_dl.cpp
M src/tbf_ul.cpp
3 files changed, 116 insertions(+), 126 deletions(-)

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



diff --git a/src/tbf.h b/src/tbf.h
index dc0b050..0a58862 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -648,7 +648,7 @@
int abort();
uint16_t window_size() const;
void set_window_size();
-   void update_coding_scheme_counter_dl(const GprsCodingScheme cs);
+   void update_coding_scheme_counter_dl(enum CodingScheme cs);

/* TODO: add the gettimeofday as parameter */
struct msgb *llc_dequeue(bssgp_bvc_ctx *bctx);
@@ -751,7 +751,7 @@

uint16_t window_size() const;
void set_window_size();
-   void update_coding_scheme_counter_ul(const GprsCodingScheme cs);
+   void update_coding_scheme_counter_ul(enum CodingScheme cs);

/* Please note that all variables here will be reset when changing
 * from WAIT RELEASE back to FLOW state (re-use of TBF).
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 13ef143..04c6499 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -1364,68 +1364,63 @@
m_window.set_ws(ws);
 }

-void gprs_rlcmac_dl_tbf::update_coding_scheme_counter_dl(const 
GprsCodingScheme cs)
+void gprs_rlcmac_dl_tbf::update_coding_scheme_counter_dl(enum CodingScheme cs)
 {
-   uint8_t coding_scheme = 0;
-
-   coding_scheme = CodingScheme(cs);
-   if (mcs_is_gprs(cs)) {
-   switch (coding_scheme) {
-   case CS1 :
-   bts->gprs_dl_cs1();
-   rate_ctr_inc(_dl_gprs_ctrs->ctr[TBF_CTR_GPRS_DL_CS1]);
-   break;
-   case CS2 :
-   bts->gprs_dl_cs2();
-   rate_ctr_inc(_dl_gprs_ctrs->ctr[TBF_CTR_GPRS_DL_CS2]);
-   break;
-   case CS3 :
-   bts->gprs_dl_cs3();
-   rate_ctr_inc(_dl_gprs_ctrs->ctr[TBF_CTR_GPRS_DL_CS3]);
-   break;
-   case CS4 :
-   bts->gprs_dl_cs4();
-   rate_ctr_inc(_dl_gprs_ctrs->ctr[TBF_CTR_GPRS_DL_CS4]);
-   break;
-   }
-   } else {
-   switch (coding_scheme) {
-   case MCS1 :
-   bts->egprs_dl_mcs1();
-   
rate_ctr_inc(_dl_egprs_ctrs->ctr[TBF_CTR_EGPRS_DL_MCS1]);
-   break;
-   case MCS2 :
-   bts->egprs_dl_mcs2();
-   
rate_ctr_inc(_dl_egprs_ctrs->ctr[TBF_CTR_EGPRS_DL_MCS2]);
-   break;
-   case MCS3 :
-   bts->egprs_dl_mcs3();
-   
rate_ctr_inc(_dl_egprs_ctrs->ctr[TBF_CTR_EGPRS_DL_MCS3]);
-   break;
-   case MCS4 :
-   bts->egprs_dl_mcs4();
-   
rate_ctr_inc(_dl_egprs_ctrs->ctr[TBF_CTR_EGPRS_DL_MCS4]);
-   break;
-   case MCS5 :
-   bts->egprs_dl_mcs5();
-   
rate_ctr_inc(_dl_egprs_ctrs->ctr[TBF_CTR_EGPRS_DL_MCS5]);
-   break;
-   case MCS6 :
-   bts->egprs_dl_mcs6();
-   
rate_ctr_inc(_dl_egprs_ctrs->ctr[TBF_CTR_EGPRS_DL_MCS6]);
-   break;
-   case MCS7 :
-   bts->egprs_dl_mcs7();
-   
rate_ctr_inc(_dl_egprs_ctrs->ctr[TBF_CTR_EGPRS_DL_MCS7]);
-   break;
-   case MCS8 :
-   bts->egprs_dl_mcs8();
-   
rate_ctr_inc(_dl_egprs_ctrs->ctr[TBF_CTR_EGPRS_DL_MCS8]);
-   break;
-   case MCS9 :
-   bts->egprs_dl_mcs9();
-   
rate_ctr_inc(_dl_egprs_ctrs->ctr[TBF_CTR_EGPRS_DL_MCS9]);
-   break;
-   }
+   switch (cs) {
+   case CS1:
+   bts->gprs_dl_cs1();
+   rate_ctr_inc(_dl_gprs_ctrs->ctr[TBF_CTR_GPRS_DL_CS1]);
+   break;
+   case CS2:
+   bts->gprs_dl_cs2();
+   rate_ctr_inc(_dl_gprs_ctrs->ctr[TBF_CTR_GPRS_DL_CS2]);
+   break;
+   case CS3:
+   bts->gprs_dl_cs3();
+   rate_ctr_inc(_dl_gprs_ctrs->ctr[TBF_CTR_GPRS_DL_CS3]);
+   break;
+   case CS4:
+

Change in osmo-pcu[master]: Rewrite Packet Uplink IA Rest Octets for SBA

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

Change subject: Rewrite Packet Uplink IA Rest Octets for SBA
..

Rewrite Packet Uplink IA Rest Octets for SBA

Use bitvec_set_*() directly without external write pointer tracking to
simplify the code. This is part of IA Rest Octets (3GPP TS 44.018
§10.5.2.16) which is the last part of the message so it should not
interfere with the rest of encoding functions.

The difference in the expected test output is due to proper handling of
TAI which should not be transmitted for SBA according to the Note in
Table 10.5.2.16.1 in 3GPP TS 44.018.

The change was manually tested against real mobile phone using options
'gprs mode gprs' in osmo-bsc.cfg and 'two-phase-access' in osmo-pcu.cfg
to make sure appropriate code path is actually triggered.

That's partially based on reverted commit 
93d947f5e8a30acc9250c124bf9d5bb6a8863526.

Change-Id: I97d53c27c1ca9e032d431b3aa7f915027d63ddc0
Related: OS#3014
---
M src/encoding.cpp
M tests/types/TypesTest.cpp
M tests/types/TypesTest.ok
3 files changed, 24 insertions(+), 17 deletions(-)

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



diff --git a/src/encoding.cpp b/src/encoding.cpp
index 769e049..55838fb 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -233,25 +233,31 @@
return rc;
 }

-static int write_ia_rest_uplink_sba(bitvec *dest, uint32_t fn, uint8_t alpha, 
uint8_t gamma, int8_t ta_idx,
-   unsigned& wp)
+/* 3GPP TS 44.018 Table 10.5.2.16.1 < Packet Uplink Assignment > -- Single 
Block Allocation */
+static int write_ia_rest_uplink_sba(bitvec *dest, uint32_t fn, uint8_t alpha, 
uint8_t gamma)
 {
int rc = 0;

-   bitvec_write_field(dest, , 0, 1); // Block Allocation: Single Block 
Allocation
+   SET_0(dest); /* Single Block Allocation */
+   rc = write_alpha_gamma(dest, alpha, gamma);
+   CHECK(rc);

-   if (alpha) {
-   bitvec_write_field(dest, , 0x1, 1);   // ALPHA = present
-   bitvec_write_field(dest, , alpha, 4);
-   } else
-   bitvec_write_field(dest, , 0x0, 1);   // ALPHA = not present
+   /* A 'Timing Advance index' shall not be allocated at a Single Block 
allocation.
+  A 'TBF Starting Time' shall be allocated at a Single Block 
allocation. */
+   SET_0(dest);
+   SET_1(dest);

-   bitvec_write_field(dest, , gamma, 5);   // GAMMA power control 
parameter
-   write_tai(dest, wp, ta_idx);
-   bitvec_write_field(dest, , 1, 1); // TBF_STARTING_TIME_FLAG
-   bitvec_write_field(dest, , (fn / (26 * 51)) % 32, 5); // T1'
-   bitvec_write_field(dest, , fn % 51, 6);   // T3
-   bitvec_write_field(dest, , fn % 26, 5);   // T2
+   rc = write_tbf_start_time(dest, fn);
+   CHECK(rc);
+
+/* No P0 nor PR_MODE */
+   SET_L(dest);
+
+   /* No Additions for R99 */
+   SET_L(dest);
+
+/* No Additions for Rel-6 */
+   SET_L(dest);

return rc;
 }
@@ -523,7 +529,8 @@
dest->cur_bit = wp;
rc = write_ia_rest_uplink_mba(as_ul_tbf(tbf), dest, 
usf, alpha, gamma);
} else {
-   rc = write_ia_rest_uplink_sba(dest, fn, alpha, gamma, 
ta_idx, wp);
+   dest->cur_bit = wp;
+   rc = write_ia_rest_uplink_sba(dest, fn, alpha, gamma);
}
}

diff --git a/tests/types/TypesTest.cpp b/tests/types/TypesTest.cpp
index 4879424..822bd51 100644
--- a/tests/types/TypesTest.cpp
+++ b/tests/types/TypesTest.cpp
@@ -514,7 +514,7 @@
 0x23, /* TA */
 0x00, /* 0-length §10.5.2.21 Mobile Allocation 
*/
 /* ETSI TS 44.018 §10.5.2.16 IA Rest Octets */
-0xc5, 0xd1, 0x08, 0x0b, 0x5b, 0x2b, 0x2b, 
0x2b, 0x2b, 0x2b, 0x2b, 0x2b, };
+0xc5, 0xd0, 0x80, 0xb5, 0xab, 0x2b, 0x2b, 
0x2b, 0x2b, 0x2b, 0x2b, 0x2b, };

check_imm_ass(NULL, false, GSM_L1_BURST_TYPE_ACCESS_0, res, 
sizeof(res), "ia_rest_uplink(SBA)");
 }
diff --git a/tests/types/TypesTest.ok b/tests/types/TypesTest.ok
index dd7dc4c..c6974d5 100644
--- a/tests/types/TypesTest.ok
+++ b/tests/types/TypesTest.ok
@@ -11,7 +11,7 @@
 [11] UL Immediate Assignment :
06 3f 10 0d 23 6d 0d 03 18 23 00 c8 02 1b a0 2b 2b 2b 2b 2b 2b 2b 2b
 [11] UL Immediate Assignment :
-   06 3f 10 0d 23 6d 0d 03 18 23 00 c5 d1 08 0b 5b 2b 2b 2b 2b 2b 2b 2b
+   06 3f 10 0d 23 6d 0d 03 18 23 00 c5 d0 80 b5 ab 2b 2b 2b 2b 2b 2b 2b
 [11] UL Immediate Assignment :
06 3f 10 0d 23 6d 7f 03 18 23 00 46 97 40 0b 58 2b 2b 2b 2b 2b 2b 2b
 [11] UL Immediate Assignment :

-- 
To view, visit https://gerrit.osmocom.org/12955
To unsubscribe, or for help 

Change in osmo-pcu[master]: Use Timing Advance Index in UL assignments

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

Change subject: Use Timing Advance Index in UL assignments
..

Use Timing Advance Index in UL assignments

Write TAI (if available) when generating Rest Octets for UL
Assignment. This should not affect actual PCU behavior because TAI is
not yet supported by upper layers but we have to adjust corresponding
tests anyway.

That's updated version of reverted commit.

Change-Id: I69407793bdb863be5fc42adadf75842d22f27335
Related: OS#3014
---
M src/encoding.cpp
M tests/types/TypesTest.cpp
M tests/types/TypesTest.ok
3 files changed, 12 insertions(+), 12 deletions(-)

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



diff --git a/src/encoding.cpp b/src/encoding.cpp
index 55838fb..b460d41 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -263,7 +263,7 @@
 }

 static int write_ia_rest_uplink_mba(const gprs_rlcmac_ul_tbf *tbf, bitvec 
*dest, uint8_t usf,
-   uint8_t alpha, uint8_t gamma)
+   uint8_t alpha, uint8_t gamma, int8_t ta_idx)
 {
int rc = 0;

@@ -282,8 +282,8 @@
rc = write_alpha_gamma(dest, alpha, gamma);
CHECK(rc);

-   /* No TIMING_ADVANCE_INDEX */
-   SET_0(dest);
+   rc = write_ta_index(dest, ta_idx);
+   CHECK(rc);

/* No TBF_STARTING_TIME */
SET_0(dest);
@@ -311,7 +311,7 @@
 }

 static int write_ia_rest_egprs_uplink_sba(const gprs_rlcmac_ul_tbf *tbf, 
bitvec * dest, uint8_t usf,
- uint8_t alpha, uint8_t gamma)
+ uint8_t alpha, uint8_t gamma, int8_t 
ta_idx)
 {
int rc = 0;

@@ -339,8 +339,8 @@
rc = write_alpha_gamma(dest, alpha, gamma);
CHECK(rc);

-   /* No TIMING_ADVANCE_INDEX */
-   SET_0(dest);
+   rc = write_ta_index(dest, ta_idx);
+   CHECK(rc);

/* No TBF_STARTING_TIME */
SET_0(dest);
@@ -514,7 +514,7 @@

if (as_ul_tbf(tbf) != NULL) {
dest->cur_bit = wp;
-   rc = write_ia_rest_egprs_uplink_sba(as_ul_tbf(tbf), 
dest, usf, alpha, gamma);
+   rc = write_ia_rest_egprs_uplink_sba(as_ul_tbf(tbf), 
dest, usf, alpha, gamma, ta_idx);
} else {
dest->cur_bit = wp;
rc = write_ia_rest_egprs_uplink_mba(dest, fn, alpha, 
gamma);
@@ -527,7 +527,7 @@

if (as_ul_tbf(tbf) != NULL) {
dest->cur_bit = wp;
-   rc = write_ia_rest_uplink_mba(as_ul_tbf(tbf), dest, 
usf, alpha, gamma);
+   rc = write_ia_rest_uplink_mba(as_ul_tbf(tbf), dest, 
usf, alpha, gamma, ta_idx);
} else {
dest->cur_bit = wp;
rc = write_ia_rest_uplink_sba(dest, fn, alpha, gamma);
diff --git a/tests/types/TypesTest.cpp b/tests/types/TypesTest.cpp
index 822bd51..589f156 100644
--- a/tests/types/TypesTest.cpp
+++ b/tests/types/TypesTest.cpp
@@ -497,7 +497,7 @@
 0x23, /* TA */
 0x00, /* 0-length §10.5.2.21 Mobile Allocation 
*/
 /* ETSI TS 44.018 §10.5.2.16 IA Rest Octets */
-0xc8, 0x02, 0x1b, 0xa0, 0x2b, 0x2b, 0x2b, 
0x2b, 0x2b, 0x2b, 0x2b, 0x2b, };
+0xc8, 0x02, 0x1b, 0xa2, 0x0b, 0x2b, 0x2b, 
0x2b, 0x2b, 0x2b, 0x2b, 0x2b, };

check_imm_ass(tbf, false, GSM_L1_BURST_TYPE_ACCESS_0, res, sizeof(res), 
"ia_rest_uplink(MBA)");
 }
@@ -537,7 +537,7 @@
 0x23, /* TA */
 0x00, /* 0-length §10.5.2.21 Mobile Allocation 
*/
 /* ETSI TS 44.018 §10.5.2.16 IA Rest Octets */
-0x46, 0xa0, 0x08, 0x00, 0x17, 0x40, 0x2b, 
0x2b, 0x2b, 0x2b, 0x2b, 0x2b, };
+0x46, 0xa0, 0x08, 0x00, 0x17, 0x44, 0x0b, 
0x2b, 0x2b, 0x2b, 0x2b, 0x2b, };

check_imm_ass(tbf, false, GSM_L1_BURST_TYPE_ACCESS_1, res, sizeof(res), 
"ia_rest_egprs_uplink(SBA)");
 }
diff --git a/tests/types/TypesTest.ok b/tests/types/TypesTest.ok
index c6974d5..a5c58b8 100644
--- a/tests/types/TypesTest.ok
+++ b/tests/types/TypesTest.ok
@@ -9,13 +9,13 @@
 [11] DL Immediate Assignment :
06 3f 30 0d 23 6d 7f 03 18 23 00 d0 00 00 00 08 17 47 08 0b 5b 2b 2b
 [11] UL Immediate Assignment :
-   06 3f 10 0d 23 6d 0d 03 18 23 00 c8 02 1b a0 2b 2b 2b 2b 2b 2b 2b 2b
+   06 3f 10 0d 23 6d 0d 03 18 23 00 c8 02 1b a2 0b 2b 2b 2b 2b 2b 2b 2b
 [11] UL Immediate Assignment :
06 3f 10 0d 23 6d 0d 03 18 23 00 c5 d0 80 b5 ab 2b 2b 2b 2b 2b 2b 2b
 [11] UL Immediate Assignment :
06 3f 10 0d 23 6d 7f 03 18 23 00 46 97 40 0b 58 2b 2b 2b 2b 2b 2b 2b
 [11] UL 

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

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

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


Patch Set 6:

(1 comment)

Let's do it in a separate patch though to avoid going through weel-long review 
cycle again over essentially cosmetic change.

https://gerrit.osmocom.org/#/c/13215/6/tests/tbf/TbfTest.cpp
File tests/tbf/TbfTest.cpp:

https://gerrit.osmocom.org/#/c/13215/6/tests/tbf/TbfTest.cpp@2740
PS6, Line 2740: 
OSMO_ASSERT(mcs_chan_code(tbf->m_rlc.block(bsn)->cs_current_trans) == cs - 1); \
> This new check looks really cryptic, at least it deserves come comment.
I don't think it looks any more cryptic than before but adding comment won't 
hurt.



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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I127fb29f5aaf77a7f6c4c565dfeb3b711af9845d
Gerrit-Change-Number: 13215
Gerrit-PatchSet: 6
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 27 Mar 2019 12:32:00 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


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

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

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

MCS: add Channel Coding Command encoder

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

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

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

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



diff --git a/src/coding_scheme.c b/src/coding_scheme.c
index 4a5d0d4..a4ae882 100644
--- a/src/coding_scheme.c
+++ b/src/coding_scheme.c
@@ -64,6 +64,19 @@
return false;
 }

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

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

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

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

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

bts_data = m_bts->bts_data();

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

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

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

Change in osmo-bsc[master]: nanobts: use libosmocore's osmo_store*() for OML attr. patching

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

Change subject: nanobts: use libosmocore's osmo_store*() for OML attr. patching
..


Patch Set 1:

(1 comment)

Not sure this will have a chance to significantly improve until we have some 
actual users running Osmocom stack on Power processors (or alike).

https://gerrit.osmocom.org/#/c/13418/1/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
File src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c:

https://gerrit.osmocom.org/#/c/13418/1/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c@202
PS1, Line 202:  buf[0] = bts->gprs.nsvc[0].nsvci >> 8;
> your assessment appears correct.  This should be fixed in an independent 
> patch/fix.
I agree. Ideally we should also try to build and use it on some BE CPU (Power 
9?) - I'm pretty sure this will reveal more issues where code compiles fine but 
does not do what's expected. For example in OsmoBTS pcu_sock.c (and it's copy 
in OsmoBSC) there're warnings about *l_tbf_ext endianness which seems to be due 
to the way PCU in nanobts expects that data.



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I28cfb09f224072db9889a89923a3da15a6070e2a
Gerrit-Change-Number: 13418
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: dexter 
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 27 Mar 2019 12:26:28 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-bsc[master]: nanobts: use libosmocore's osmo_store*() for OML attr. patching

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

Change subject: nanobts: use libosmocore's osmo_store*() for OML attr. patching
..

nanobts: use libosmocore's osmo_store*() for OML attr. patching

This slightly simplifies things by making endianness more obvious and
removing abstraction.

Change-Id: I28cfb09f224072db9889a89923a3da15a6070e2a
---
M src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
1 file changed, 3 insertions(+), 12 deletions(-)

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



diff --git a/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c 
b/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
index d674c18..be40410 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
@@ -25,15 +25,6 @@
 #include 
 #include 

-static void patch_16(uint8_t *data, const uint16_t val)
-{
-   memcpy(data, , sizeof(val));
-}
-
-static void patch_32(uint8_t *data, const uint32_t val)
-{
-   memcpy(data, , sizeof(val));
-}

 struct msgb *nanobts_attr_bts_get(struct gsm_bts *bts)
 {
@@ -213,11 +204,11 @@
msgb_tl16v_put(msgb, NM_ATT_IPACC_NSVCI, 2, buf);

/* remote udp port */
-   patch_16([0], htons(bts->gprs.nsvc[0].remote_port));
+   osmo_store16be(bts->gprs.nsvc[0].remote_port, [0]);
/* remote ip address */
-   patch_32([2], htonl(bts->gprs.nsvc[0].remote_ip));
+   osmo_store32be(bts->gprs.nsvc[0].remote_ip, [2]);
/* local udp port */
-   patch_16([6], htons(bts->gprs.nsvc[0].local_port));
+   osmo_store16be(bts->gprs.nsvc[0].local_port, [6]);
msgb_tl16v_put(msgb, NM_ATT_IPACC_NS_LINK_CFG, 8, buf);

return msgb;

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I28cfb09f224072db9889a89923a3da15a6070e2a
Gerrit-Change-Number: 13418
Gerrit-PatchSet: 2
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: dexter 
Gerrit-CC: Pau Espin Pedrol 


Change in openbsc[master]: Drop Iu*S support and related dependencies

2019-03-27 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13417 )

Change subject: Drop Iu*S support and related dependencies
..

Drop Iu*S support and related dependencies

There's optional libiu for Iu*S support but it's just a leftover from
pre repo-split times:
* it's not used by any code
* it's not checked by gerrit verification in osmo-ci
* it's disabled by default
* it's not supported in .deb packages

Instead of dragging old code in unknown stage of bit-rotting, let's just
drop it completely.

Change-Id: Id5678a74504b4456aba0438ccc34731770801128
---
M contrib/jenkins.sh
M openbsc/configure.ac
M openbsc/include/openbsc/Makefile.am
D openbsc/include/openbsc/iu.h
M openbsc/src/Makefile.am
D openbsc/src/libiu/Makefile.am
D openbsc/src/libiu/iu.c
D openbsc/src/libiu/iu_vty.c
8 files changed, 1 insertion(+), 935 deletions(-)

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



diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index f8ae49c..277fece 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -2,7 +2,6 @@
 # jenkins build helper script for openbsc.  This is how we build on 
jenkins.osmocom.org
 #
 # environment variables:
-# * IU: configure 3G support (values: "--enable-iu", "--disable-iu")
 # * MGCP: configure transcoding for MGCP (values: "--enable-mgcp-transcoding", 
"--disable-mgcp-transcoding")
 # * SMPP: configure the SMPP interface (values: "--enable-smpp", 
"--disable-smpp")
 # * WITH_MANUALS: build manual PDFs if set to "1"
@@ -19,11 +18,6 @@
x="${x}_$($1 libosmo-sccp "$sccp_branch")"
x="${x}_$($1 libsmpp34)"

-   if [ "x$IU" = "x--enable-iu" ]; then
-   x="${x}_$($1 libasn1c)"
-   x="${x}_$($1 osmo-iuh "$osmo_iuh_branch")"
-   fi
-
echo "${x}.tar.gz"
 }

@@ -35,11 +29,6 @@
osmo-build-dep.sh libosmo-netif
osmo-build-dep.sh libosmo-sccp "$sccp_branch"
PARALLEL_MAKE=-j1 osmo-build-dep.sh libsmpp34
-
-   if [ "x$IU" = "x--enable-iu" ]; then
-   osmo-build-dep.sh libasn1c
-   osmo-build-dep.sh osmo-iuh "$osmo_iuh_branch"
-   fi
 }

 build_project() {
@@ -48,7 +37,7 @@

autoreconf --install --force

-   ./configure "$SMPP" "$MGCP" "$IU" \
+   ./configure "$SMPP" "$MGCP" \
--enable-osmo-bsc \
--enable-nat  \
--enable-vty-tests \
@@ -59,11 +48,6 @@
"$MAKE" distcheck || cat-testlogs.sh
 }

-if [ "x$IU" = "x--enable-iu" ]; then
-sccp_branch="old_sua"
-osmo_iuh_branch="old_sua"
-fi
-
 . osmo-build.sh

 # Build and publish manuals
diff --git a/openbsc/configure.ac b/openbsc/configure.ac
index 4b432b1..704c7d7 100644
--- a/openbsc/configure.ac
+++ b/openbsc/configure.ac
@@ -98,18 +98,6 @@
 AM_CONDITIONAL(BUILD_MGCP_TRANSCODING, test "x$osmo_ac_mgcp_transcoding" = 
"xyes")
 AC_SUBST(osmo_ac_mgcp_transcoding)

-# Enable/disable 3G aka IuPS + IuCS support?
-AC_ARG_ENABLE([iu], [AS_HELP_STRING([--enable-iu], [Build 3G support, aka IuPS 
and IuCS interfaces])],
-[osmo_ac_iu="$enableval"],[osmo_ac_iu="no"])
-if test "x$osmo_ac_iu" = "xyes" ; then
-PKG_CHECK_MODULES(LIBASN1C, libasn1c >= 0.9.31)
-PKG_CHECK_MODULES(LIBOSMORANAP, libosmo-ranap >= 0.3.0)
-PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 0.9.0)
-AC_DEFINE(BUILD_IU, 1, [Define if we want to build IuPS and IuCS 
interfaces support])
-fi
-AM_CONDITIONAL(BUILD_IU, test "x$osmo_ac_iu" = "xyes")
-AC_SUBST(osmo_ac_iu)
-

 dnl checks for header files
 AC_HEADER_STDC
@@ -252,7 +240,6 @@
 src/libmgcp/Makefile
 src/libcommon/Makefile
 src/libfilter/Makefile
-src/libiu/Makefile
 src/libcommon-cs/Makefile
 src/osmo-nitb/Makefile
 src/osmo-bsc/Makefile
diff --git a/openbsc/include/openbsc/Makefile.am 
b/openbsc/include/openbsc/Makefile.am
index 1fa30d5..59b2231 100644
--- a/openbsc/include/openbsc/Makefile.am
+++ b/openbsc/include/openbsc/Makefile.am
@@ -32,7 +32,6 @@
handover.h \
handover_decision.h \
ipaccess.h \
-   iu.h \
meas_feed.h \
meas_rep.h \
mgcp.h \
diff --git a/openbsc/include/openbsc/iu.h b/openbsc/include/openbsc/iu.h
deleted file mode 100644
index f973ac1..000
--- a/openbsc/include/openbsc/iu.h
+++ /dev/null
@@ -1,62 +0,0 @@
-#pragma once
-
-#include 
-
-struct sgsn_pdp_ctx;
-struct msgb;
-struct gprs_ra_id;
-
-struct RANAP_RAB_SetupOrModifiedItemIEs_s;
-struct RANAP_GlobalRNC_ID;
-
-struct ue_conn_ctx {
-   struct llist_head list;
-   struct osmo_sccp_link *link;
-   uint32_t conn_id;
-   int integrity_active;
-   struct gprs_ra_id ra_id;
-};
-
-enum iu_event_type {
-   IU_EVENT_RAB_ASSIGN,
-   IU_EVENT_SECURITY_MODE_COMPLETE,
-   

Change in python/osmo-python-tests[master]: deb: fix wrong changelog date

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

Change subject: deb: fix wrong changelog date
..


Patch Set 3: Code-Review+2


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

Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie73b1f29bd13e68e9b5e05896f1f048bc8108d17
Gerrit-Change-Number: 12487
Gerrit-PatchSet: 3
Gerrit-Owner: Max 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 27 Mar 2019 11:43:32 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in python/osmo-python-tests[master]: deb: fix wrong changelog date

2019-03-27 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12487 )

Change subject: deb: fix wrong changelog date
..

deb: fix wrong changelog date

Issue was discovered with lintian - likely a copy-paste error.

Change-Id: Ie73b1f29bd13e68e9b5e05896f1f048bc8108d17
---
M debian/changelog
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/debian/changelog b/debian/changelog
index 3bee65a..d0b6136 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,4 +2,4 @@

   * Initial package

- -- Harald Welte   Thu, 31 May 2019 10:33:31 +0100
+ -- Harald Welte   Thu, 31 May 2018 10:33:31 +0100

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

Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie73b1f29bd13e68e9b5e05896f1f048bc8108d17
Gerrit-Change-Number: 12487
Gerrit-PatchSet: 3
Gerrit-Owner: Max 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: osmith 


Change in openbsc[master]: Drop Iu*S support and related dependencies

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

Change subject: Drop Iu*S support and related dependencies
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id5678a74504b4456aba0438ccc34731770801128
Gerrit-Change-Number: 13417
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 27 Mar 2019 11:43:49 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: debian/control: Fix typo

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

Change subject: debian/control: Fix typo
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3392d8e184413203d27fc3d75371de4d66f205b9
Gerrit-Change-Number: 13325
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Comment-Date: Wed, 27 Mar 2019 11:42:28 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: debian/control: Fix typo

2019-03-27 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13325 )

Change subject: debian/control: Fix typo
..

debian/control: Fix typo

Change-Id: I3392d8e184413203d27fc3d75371de4d66f205b9
---
M debian/control
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/debian/control b/debian/control
index f4cd95e..54a3546 100644
--- a/debian/control
+++ b/debian/control
@@ -60,5 +60,5 @@
   towards a HLR, but the much simpler Osmocom GSUP protocol, which can
   be translated to MAP if needed.
   .
-  This package contains the debug symbols for osmo-mgw in order to
+  This package contains the debug symbols for osmo-msc in order to
   generate meaningful backtraces in bug-reports.

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I3392d8e184413203d27fc3d75371de4d66f205b9
Gerrit-Change-Number: 13325
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: lynxis lazus 


Change in osmo-gsm-tester[master]: contrib: jenkins-build-osmo-pcu-oc2g: Enable oc2gbts-phy

2019-03-27 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13363 )

Change subject: contrib: jenkins-build-osmo-pcu-oc2g: Enable oc2gbts-phy
..

contrib: jenkins-build-osmo-pcu-oc2g: Enable oc2gbts-phy

Depends on osmo-pcu Change-Id I7cd89a549c9463e81893ca7dd925299f728e4453.

Change-Id: I1384f4adeca7583e48dd94fcb09a1b58d108f1de
---
M contrib/jenkins-build-osmo-pcu-oc2g.sh
1 file changed, 7 insertions(+), 1 deletion(-)

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



diff --git a/contrib/jenkins-build-osmo-pcu-oc2g.sh 
b/contrib/jenkins-build-osmo-pcu-oc2g.sh
index c10b14e..b113f21 100755
--- a/contrib/jenkins-build-osmo-pcu-oc2g.sh
+++ b/contrib/jenkins-build-osmo-pcu-oc2g.sh
@@ -18,7 +18,13 @@
 prefix_real="$DESTDIR$prefix"
 . "$(dirname "$0")/jenkins-build-common.sh"

+prev_git_url="${git_url}"
+git_url="https://gitlab.com/nrw_oc2g/;
+have_repo "oc2g-fw" "nrw/oc2g"
+git_url="${prev_git_url}"
+L1_OC2G_HEADERS="$PWD/oc2g-fw/inc"
+
 build_repo libosmocore --disable-pcsc --disable-doxygen --disable-gnutls
-build_repo osmo-pcu --disable-sysmocom-dsp
+build_repo osmo-pcu --disable-sysmocom-dsp -enable-oc2gbts-phy 
--with-oc2g="$L1_OC2G_HEADERS"

 create_bin_tgz osmo-pcu

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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I1384f4adeca7583e48dd94fcb09a1b58d108f1de
Gerrit-Change-Number: 13363
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Assignee: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-bsc[master]: nanobts: use libosmocore's osmo_store*() for OML attr. patching

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

Change subject: nanobts: use libosmocore's osmo_store*() for OML attr. patching
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/13418/1/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
File src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c:

https://gerrit.osmocom.org/#/c/13418/1/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c@207
PS1, Line 207:  osmo_store16be(bts->gprs.nsvc[0].remote_port, [0]);
> but the previous patch_16/32() always had a htons/htonl inside, so I think 
> for this line and the two […]
Ah indeed, I didn't see the htnol and htons.



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I28cfb09f224072db9889a89923a3da15a6070e2a
Gerrit-Change-Number: 13418
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: dexter 
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Wed, 27 Mar 2019 11:29:19 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in python/osmo-python-tests[master]: deb: fix wrong changelog date

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

Change subject: deb: fix wrong changelog date
..


Patch Set 3: Code-Review+2


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

Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie73b1f29bd13e68e9b5e05896f1f048bc8108d17
Gerrit-Change-Number: 12487
Gerrit-PatchSet: 3
Gerrit-Owner: Max 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 27 Mar 2019 11:27:03 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in openbsc[master]: Drop Iu*S support and related dependencies

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

Change subject: Drop Iu*S support and related dependencies
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id5678a74504b4456aba0438ccc34731770801128
Gerrit-Change-Number: 13417
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Wed, 27 Mar 2019 11:25:50 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bts[master]: Forward GPRS SUSPEND REQ from DCCH to PCU socket

2019-03-27 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13347 )

Change subject: Forward GPRS SUSPEND REQ from DCCH to PCU socket
..

Forward GPRS SUSPEND REQ from DCCH to PCU socket

As specified in 3GPP TS 03.60 Section 16.2.1 and 44.018 Section 3.4.15,
a Class B MS is sending a "RR GPRS SUSPEND REQ" via a DCCH to the BTS if
it wants to suspend GPRS services.  The BSS is now responsible to
somehow forward this to the SGSN.  As the Gs interface between BSC and
SGSN is both optional and doesn't have any provision to forward this
message, we have to send it over to the PCU so it can use regular BSSGP
signaling to inform the SGSN of the SUSPEND REQUEST.

This patch requires libosmocore Change-Id
I90113044460a6c511ced14f588876c4280d1cac7 for the related definition of
struct gsm48_gprs_susp_req.

Change-Id: I3c1af662c8f0d3d22da200638480f6ef05c3ed1f
Closes: OS#2249
---
M include/osmo-bts/pcu_if.h
M include/osmo-bts/pcuif_proto.h
M src/common/pcu_sock.c
M src/common/rsl.c
4 files changed, 73 insertions(+), 9 deletions(-)

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



diff --git a/include/osmo-bts/pcu_if.h b/include/osmo-bts/pcu_if.h
index 98efb57..6253c84 100644
--- a/include/osmo-bts/pcu_if.h
+++ b/include/osmo-bts/pcu_if.h
@@ -15,6 +15,7 @@
 int pcu_tx_time_ind(uint32_t fn);
 int pcu_tx_pag_req(const uint8_t *identity_lv, uint8_t chan_needed);
 int pcu_tx_pch_data_cnf(uint32_t fn, uint8_t *data, uint8_t len);
+int pcu_tx_susp_req(struct gsm_lchan *lchan, uint32_t tlli, const uint8_t 
*ra_id, uint8_t cause);

 int pcu_sock_init(const char *path);
 void pcu_sock_exit(void);
diff --git a/include/osmo-bts/pcuif_proto.h b/include/osmo-bts/pcuif_proto.h
index b06077c..144fba6 100644
--- a/include/osmo-bts/pcuif_proto.h
+++ b/include/osmo-bts/pcuif_proto.h
@@ -12,6 +12,7 @@
 #define PCU_IF_MSG_DATA_REQ0x00/* send data to given channel */
 #define PCU_IF_MSG_DATA_CNF0x01/* confirm (e.g. transmission on PCH) */
 #define PCU_IF_MSG_DATA_IND0x02/* receive data from given channel */
+#define PCU_IF_MSG_SUSP_REQ0x03/* BTS forwards GPRS SUSP REQ to PCU */
 #define PCU_IF_MSG_RTS_REQ 0x10/* ready to send request */
 #define PCU_IF_MSG_DATA_CNF_DT 0x11/* confirm (with direct tlli) */
 #define PCU_IF_MSG_RACH_IND0x22/* receive RACH */
@@ -171,6 +172,13 @@
uint8_t identity_lv[9];
 } __attribute__ ((packed));

+/* BTS tells PCU about a GPRS SUSPENSION REQUEST received on DCCH */
+struct gsm_pcu_if_susp_req {
+   uint32_ttlli;
+   uint8_t ra_id[6];
+   uint8_t cause;
+} __attribute__ ((packed));
+
 struct gsm_pcu_if {
/* context based information */
uint8_t msg_type;   /* message type */
@@ -182,6 +190,7 @@
struct gsm_pcu_if_data  data_cnf;
struct gsm_pcu_if_data_cnf_dt   data_cnf_dt;
struct gsm_pcu_if_data  data_ind;
+   struct gsm_pcu_if_susp_req  susp_req;
struct gsm_pcu_if_rts_req   rts_req;
struct gsm_pcu_if_rach_ind  rach_ind;
struct gsm_pcu_if_txt_ind   txt_ind;
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index 440f561..d694602 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -466,6 +466,23 @@
return pcu_sock_send(_gsmnet, msg);
 }

+/* forward data from a RR GPRS SUSPEND REQ towards PCU */
+int pcu_tx_susp_req(struct gsm_lchan *lchan, uint32_t tlli, const uint8_t 
*ra_id, uint8_t cause)
+{
+   struct msgb *msg;
+   struct gsm_pcu_if *pcu_prim;
+
+   msg = pcu_msgb_alloc(PCU_IF_MSG_SUSP_REQ, lchan->ts->trx->bts->nr);
+   if (!msg)
+   return -ENOMEM;
+   pcu_prim = (struct gsm_pcu_if *) msg->data;
+   pcu_prim->u.susp_req.tlli = tlli;
+   memcpy(pcu_prim->u.susp_req.ra_id, ra_id, 
sizeof(pcu_prim->u.susp_req.ra_id));
+   pcu_prim->u.susp_req.cause = cause;
+
+   return pcu_sock_send(_gsmnet, msg);
+}
+
 static int pcu_rx_data_req(struct gsm_bts *bts, uint8_t msg_type,
const struct gsm_pcu_if_data *data_req)
 {
diff --git a/src/common/rsl.c b/src/common/rsl.c
index f93ca50..5287201 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -29,6 +29,7 @@
 #include 
 #include 

+#include 
 #include 
 #include 
 #include 
@@ -36,6 +37,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 

@@ -2557,32 +2559,35 @@
return 0;
 }

-static int rslms_is_meas_rep(struct msgb *msg)
+static int rslms_get_meas_msg_type(struct msgb *msg, bool 
rllh_link_id_is_sacch)
 {
struct abis_rsl_common_hdr *rh = msgb_l2(msg);
struct abis_rsl_rll_hdr *rllh;
struct gsm48_hdr *gh;

if ((rh->msg_discr & 0xfe) != 

Change in osmo-bts[master]: Forward GPRS SUSPEND REQ from DCCH to PCU socket

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

Change subject: Forward GPRS SUSPEND REQ from DCCH to PCU socket
..


Patch Set 2: Code-Review+2

We now have a test for this in PCU_Tests.ttcn, see 
https://gerrit.osmocom.org/#/c/osmo-ttcn3-hacks/+/13383/


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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3c1af662c8f0d3d22da200638480f6ef05c3ed1f
Gerrit-Change-Number: 13347
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-CC: Max 
Gerrit-Comment-Date: Wed, 27 Mar 2019 11:19:10 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: GSM_RR_Types: Add enc_RoutingAreaIdentification()

2019-03-27 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13378 )

Change subject: GSM_RR_Types: Add enc_RoutingAreaIdentification()
..

GSM_RR_Types: Add enc_RoutingAreaIdentification()

This allows us to encode a stand-alone RAID as needed in some places.

Change-Id: I28222304b2bac893b216c47e6dc002886fab6406
---
M library/GSM_RR_Types.ttcn
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/library/GSM_RR_Types.ttcn b/library/GSM_RR_Types.ttcn
index 26783f9..5958569 100644
--- a/library/GSM_RR_Types.ttcn
+++ b/library/GSM_RR_Types.ttcn
@@ -421,6 +421,9 @@
uint8_t rac
} with { variant "" };

+   external function 
enc_RoutingAreaIdentification(RoutingAreaIdentification rai) return octetstring
+   with { extension "prototype(convert)" extension "encode(RAW)" }
+
/* 44.018 10.5.2.16 */
type record IaRestOctHL {
uint6_t freq_par_len,

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I28222304b2bac893b216c47e6dc002886fab6406
Gerrit-Change-Number: 13378
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-ttcn3-hacks[master]: pcu: Ensure we're always using the same defaults for the CGI

2019-03-27 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13375 )

Change subject: pcu: Ensure we're always using the same defaults for the CGI
..

pcu: Ensure we're always using the same defaults for the CGI

Not all parts of the code explicitly specify each and every parameter
of the Cell Gobal Identifier (particularly we don't do that for the PCU
INFO IND), and hence multiple parts only interoperate if the same
defaults are used in all locations.

Change-Id: Iac9be9a8d4ccb4d01cc343d763d2e35873e3844f
---
M library/PCUIF_Types.ttcn
M pcu/PCU_Tests.default
2 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn
index 5644431..0c3f000 100644
--- a/library/PCUIF_Types.ttcn
+++ b/library/PCUIF_Types.ttcn
@@ -657,9 +657,9 @@
 template (value) PCUIF_Flags 
flags := c_PCUIF_Flags_default,
 template (value) uint16_t mcc 
:= 262,
 template (value) uint16_t mnc 
:= 42,
-template (value) uint16_t lac 
:= 2342,
+template (value) uint16_t lac 
:= 13135,
 template (value) uint8_t rac 
:= 0,
-template (value) uint16_t 
cell_id := 1,
+template (value) uint16_t 
cell_id := 20960,
 template (value) uint8_t bsic 
:= 7,
 template (value) 
PCUIF_InfoTrxs trx := ts_PCUIF_InfoTrxs_def,
 template (value) uint32_t 
version := PCU_IF_VERSION) := {
diff --git a/pcu/PCU_Tests.default b/pcu/PCU_Tests.default
index a877045..67c05f8 100644
--- a/pcu/PCU_Tests.default
+++ b/pcu/PCU_Tests.default
@@ -13,11 +13,11 @@
cell_id := {
ra_id := {
lai := {
-   mcc_mnc := '00101F'H, lac := 1
+   mcc_mnc := '26242F'H, lac := 13135
},
rac := 0
},
-   cell_id := 0
+   cell_id := 20960
},
sgsn_role := true
 }

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Iac9be9a8d4ccb4d01cc343d763d2e35873e3844f
Gerrit-Change-Number: 13375
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-ttcn3-hacks[master]: PCUIF: Add templates for PCU_IF_MSG_SUSP_REQ

2019-03-27 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13381 )

Change subject: PCUIF: Add templates for PCU_IF_MSG_SUSP_REQ
..

PCUIF: Add templates for PCU_IF_MSG_SUSP_REQ

Change-Id: Ib7661790b9531be829ee550ce889151ebe1885ac
---
M library/PCUIF_Types.ttcn
1 file changed, 32 insertions(+), 0 deletions(-)

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



diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn
index 0c3f000..17adbd1 100644
--- a/library/PCUIF_Types.ttcn
+++ b/library/PCUIF_Types.ttcn
@@ -772,4 +772,36 @@
}
 }

+template (value) PCUIF_Message ts_PCUIF_SUSP_REQ(template (value) uint8_t 
bts_nr,
+template (value) OCT4 tlli,
+template (value) OCT6 ra_id,
+template (value) uint8_t 
cause) := {
+   msg_type := PCU_IF_MSG_SUSP_REQ,
+   bts_nr := bts_nr,
+   spare := ''O,
+   u := {
+   susp_req := {
+   tlli := tlli,
+   ra_id := ra_id,
+   cause := cause
+   }
+   }
+}
+template PCUIF_Message tr_PCUIF_SUSP_REQ(template uint8_t bts_nr,
+template OCT4 tlli,
+template OCT6 ra_id,
+template uint8_t cause) := {
+   msg_type := PCU_IF_MSG_SUSP_REQ,
+   bts_nr := bts_nr,
+   spare := ''O,
+   u := {
+   susp_req := {
+   tlli := tlli,
+   ra_id := ra_id,
+   cause := cause
+   }
+   }
+}
+
+
 } with { encode "RAW" variant "BYTEORDER(first)" };

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib7661790b9531be829ee550ce889151ebe1885ac
Gerrit-Change-Number: 13381
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-ttcn3-hacks[master]: PCU: make f_bssgp_establish() run on BSSGP_Client_CT

2019-03-27 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13382 )

Change subject: PCU: make f_bssgp_establish() run on BSSGP_Client_CT
..

PCU: make f_bssgp_establish() run on BSSGP_Client_CT

This means it can be used in different/other scenarios, e.g.
with tests that use PCUIF directly.

Change-Id: I1aa5dc090aac78a85a85ac190343befb0199a093
---
M pcu/PCU_Tests.ttcn
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index b18b999..80a1bd1 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -195,10 +195,9 @@
 }

 /* Establish BSSGP connection to PCU */
-function f_bssgp_establish() runs on dummy_CT {
+function f_bssgp_establish() runs on BSSGP_Client_CT {
timer T:= 10.0;

-   f_init();
T.start
alt {
[] BSSGP[0].receive(t_BssgpStsInd(?, ?, BVC_S_UNBLOCKED)) { }
@@ -386,6 +385,7 @@

 testcase TC_nsem() runs on dummy_CT {

+   f_init();
f_bssgp_establish();

while (true) {

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I1aa5dc090aac78a85a85ac190343befb0199a093
Gerrit-Change-Number: 13382
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-ttcn3-hacks[master]: pcu: Add TC_pcuif_suspend() to test PCU->BSSGP SUSPEND processing

2019-03-27 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13383 )

Change subject: pcu: Add TC_pcuif_suspend() to test PCU->BSSGP SUSPEND 
processing
..

pcu: Add TC_pcuif_suspend() to test PCU->BSSGP SUSPEND processing

The PCU is supposed to forward any RR SUSPEND received by the BTS
on dedicated channels and pass it to the SGSN via BSSGP.  This provides
knowledge to the SGSN that the MS is not reachable via PS/TBF anymore
until it completes its CC dedicated mode transaction and RESUMEs.

Change-Id: Iaf35e0c1087413db1dc7d169fa716df14c78f5db
---
M pcu/PCU_Tests.ttcn
M pcu/PCU_Tests_RAW.ttcn
2 files changed, 66 insertions(+), 0 deletions(-)

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



diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 80a1bd1..4dce7dd 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -663,6 +663,46 @@
f_sleep(10.0);
 }

+/* FIXME: merge this into BSSGP_Client_CT ? */
+type component bssgp_CT extends BSSGP_Client_CT {
+   var NS_CT ns_component;
+   var BSSGP_CT bssgp_component;
+   var boolean g_initialized := false;
+}
+
+/* FIXME: merge this into BSSGP_Client_CT ? */
+function f_init_bssgp() runs on bssgp_CT {
+   var MmContext mmctx := {
+   imsi := '2624201'H,
+   tlli := ''O,
+   n_u := 0
+   };
+
+
+   if (g_initialized == true) {
+   return;
+   }
+   g_initialized := true;
+
+   /* create a new NS component */
+   ns_component := NS_CT.create;
+   bssgp_component := BSSGP_CT.create;
+   /* connect our BSSGP port to the BSSGP Emulation */
+   connect(self:BSSGP[0], bssgp_component:BSSGP_SP);
+   connect(self:BSSGP_SIG[0], bssgp_component:BSSGP_SP_SIG);
+   connect(self:BSSGP_PROC[0], bssgp_component:BSSGP_PROC);
+   /* connect lower-end of BSSGP with BSSGP_CODEC_PORT (maps to NS_PT*/
+   connect(bssgp_component:BSCP, ns_component:NS_SP);
+   /* connect lower-end of NS emulation to NS_CODEC_PORT (on top of IPl4) 
*/
+   map(ns_component:NSCP, system:NS_CODEC_PORT);
+   ns_component.start(NSStart(mp_nsconfig));
+   bssgp_component.start(BssgpStart(mp_gb_cfg));
+
+   f_bssgp_client_register(mmctx.imsi, mmctx.tlli, mp_gb_cfg.cell_id);
+   f_bssgp_establish();
+}
+
+

 control {
execute(TC_selftest_ns());
diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn
index 3e38fa8..96a3f86 100644
--- a/pcu/PCU_Tests_RAW.ttcn
+++ b/pcu/PCU_Tests_RAW.ttcn
@@ -8,6 +8,9 @@

 import from General_Types all;
 import from Osmocom_Types all;
+import from GSM_Types all;
+import from GSM_RR_Types all;
+
 import from NS_Types all;
 import from BSSGP_Types all;
 import from Osmocom_Gb_Types all;
@@ -405,6 +408,27 @@
setverdict(pass);
 }

+/* Test component with PCUIF + BSSGP/NS Emulation (no L1CTL) */
+type component bssgp_pcuif_CT extends bssgp_CT, RAW_PCU_CT {
+}
+
+testcase TC_pcuif_suspend() runs on bssgp_pcuif_CT {
+   var OCT6 ra_id := 
enc_RoutingAreaIdentification(mp_gb_cfg.cell_id.ra_id);
+   var GprsTlli tlli := ''O;
+
+   /* Initialize PCU interface side */
+   f_init_pcuif();
+
+   /* Initialize NS/BSSGP side */
+   f_init_bssgp();
+
+   f_sleep(1.0);
+   f_pcuif_tx(ts_PCUIF_SUSP_REQ(0, tlli, ra_id, 0));
+   BSSGP_SIG[0].receive(tr_BD_BSSGP(tr_BSSGP_SUSPEND(tlli, 
mp_gb_cfg.cell_id.ra_id)));
+
+   setverdict(pass);
+}
+

 control {
execute( TC_ns_reset() );
@@ -415,6 +439,8 @@
execute( TC_ns_unblock_retrans() );
execute( TC_ns_full_bringup() );
execute( TC_ns_so_block() );
+
+   execute( TC_pcuif_suspend() );
 }

 

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Iaf35e0c1087413db1dc7d169fa716df14c78f5db
Gerrit-Change-Number: 13383
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-ttcn3-hacks[master]: Osmocom_Gb_Types: Add more templates for BSSGP SUSPEND/RESUME

2019-03-27 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13379 )

Change subject: Osmocom_Gb_Types: Add more templates for BSSGP SUSPEND/RESUME
..

Osmocom_Gb_Types: Add more templates for BSSGP SUSPEND/RESUME

Change-Id: Ife25401043d565e52a73206c562bbb68bcfdbafa
---
M library/Osmocom_Gb_Types.ttcn
1 file changed, 176 insertions(+), 1 deletion(-)

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



diff --git a/library/Osmocom_Gb_Types.ttcn b/library/Osmocom_Gb_Types.ttcn
index 780c768..623be33 100644
--- a/library/Osmocom_Gb_Types.ttcn
+++ b/library/Osmocom_Gb_Types.ttcn
@@ -732,6 +732,40 @@
unstructured_value := f_oct_or_wc(bvci, 2)
}

+   template (value) TLLI_BSSGP ts_BSSGP_TLLI(template (value) GprsTlli 
tlli) := {
+   iEI := '1F'O,
+   ext := '1'B,
+   lengthIndicator := {
+   length1 := 4
+   },
+   tLLI_Value := tlli
+   }
+   template TLLI_BSSGP tr_BSSGP_TLLI(template GprsTlli tlli) := {
+   iEI := '1F'O,
+   ext := '1'B,
+   lengthIndicator := {
+   length1 := 4
+   },
+   tLLI_Value := tlli
+   }
+
+   template (value) Suspend_Reference_Number ts_BSSGP_SUSP_REF(template 
(value) OCT1 susp_ref) := {
+   iEI := '1D'O,
+   ext := '1'B,
+   lengthIndicator := {
+   length1 := 1
+   },
+   suspend_Reference_Number_value := susp_ref
+   }
+   template Suspend_Reference_Number tr_BSSGP_SUSP_REF(template OCT1 
susp_ref) := {
+   iEI := '1D'O,
+   ext := '1'B,
+   lengthIndicator := {
+   length1 := 1
+   },
+   suspend_Reference_Number_value := susp_ref
+   }
+
template IMSI_BSSGP tr_BSSGP_IMSI(template hexstring imsi) := {
iEI := '0D'O,
ext := '1'B,
@@ -781,6 +815,18 @@
lLC_PDU := pdu
}
 
+   function ts_BSSGP_CAUSE(template (omit) BssgpCause cause) return 
template (omit) Cause_BSSGP {
+   var template (omit) Cause_BSSGP ret;
+   if (istemplatekind(cause, "omit")) {
+   ret := omit;
+   } else {
+   ret.iEI := '07'O;
+   ret.ext := '1'B;
+   ret.lengthIndicator := { length1 := 1 };
+   ret.cause_Value := int2oct(enum2int(valueof(cause)), 1);
+   }
+   return ret;
+   }
function t_BSSGP_CAUSE(template BssgpCause cause) return template 
Cause_BSSGP {
var template Cause_BSSGP ret;
ret.iEI := '07'O;
@@ -843,7 +889,7 @@
pDU_BSSGP_BVC_RESET := {
bssgpPduType := '22'O,
bVCI := t_BSSGP_BVCI(bvci),
-   cause := t_BSSGP_CAUSE(cause),
+   cause := ts_BSSGP_CAUSE(cause),
cell_Identifier := t_BSSGP_IE_CellId(cell_id),
feature_bitmap := omit,
extended_Feature_Bitmap := omit
@@ -1222,5 +1268,134 @@
}
}

+   template (value) Routeing_Area ts_BSSGP_RA_ID(RoutingAreaIdentification 
input) := {
+   iEI := '1B'O,
+   ext := '1'B,
+   lengthIndicator := {
+   length1 := 6
+   },
+   mccDigit1 := input.lai.mcc_mnc[0],
+   mccDigit2 := input.lai.mcc_mnc[1],
+   mccDigit3 := input.lai.mcc_mnc[2],
+   mncDigit3 := input.lai.mcc_mnc[3],
+   mncDigit1 := input.lai.mcc_mnc[4],
+   mncDigit2 := input.lai.mcc_mnc[5],
+   lac := int2oct(input.lai.lac, 2),
+   rac := int2oct(input.rac, 1)
+   }
+
+   template (value) PDU_BSSGP ts_BSSGP_SUSPEND(GprsTlli tlli, 
RoutingAreaIdentification ra_id) := {
+   pDU_BSSGP_SUSPEND := {
+   bssgpPduType := '0B'O,
+   tLLI := ts_BSSGP_TLLI(tlli),
+   routeing_Area := ts_BSSGP_RA_ID(ra_id)
+   }
+   }
+   template PDU_BSSGP tr_BSSGP_SUSPEND(template GprsTlli tlli, 
RoutingAreaIdentification ra_id) := {
+   pDU_BSSGP_SUSPEND := {
+   bssgpPduType := '0B'O,
+   tLLI := tr_BSSGP_TLLI(tlli),
+   routeing_Area := ts_BSSGP_RA_ID(ra_id)
+   }
+   }
+
+   template (value) PDU_BSSGP ts_BSSGP_SUSPEND_ACK(GprsTlli tlli, 
RoutingAreaIdentification ra_id,
+   template (value) OCT1 
susp_ref) := {
+   pDU_BSSGP_SUSPEND_ACK := {
+  

Change in osmo-ttcn3-hacks[master]: pcu: Fix MCC/MNC handling: use 'F' between MCC and MNC in 2-digit case

2019-03-27 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13380 )

Change subject: pcu: Fix MCC/MNC handling: use 'F' between MCC and MNC in 
2-digit case
..

pcu: Fix MCC/MNC handling: use 'F' between MCC and MNC in 2-digit case

Change-Id: Ifdb64c501095839e86894716769adb53e3c17382
---
M library/Osmocom_Gb_Types.ttcn
M pcu/PCU_Tests.default
M pcu/PCU_Tests.ttcn
3 files changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/library/Osmocom_Gb_Types.ttcn b/library/Osmocom_Gb_Types.ttcn
index 623be33..95d3028 100644
--- a/library/Osmocom_Gb_Types.ttcn
+++ b/library/Osmocom_Gb_Types.ttcn
@@ -867,9 +867,9 @@
ret.mccDigit1 := cid.ra_id.lai.mcc_mnc[0];
ret.mccDigit2 := cid.ra_id.lai.mcc_mnc[1];
ret.mccDigit3 := cid.ra_id.lai.mcc_mnc[2];
-   ret.mncDigit3 := cid.ra_id.lai.mcc_mnc[5];
-   ret.mncDigit2 := cid.ra_id.lai.mcc_mnc[4];
-   ret.mncDigit1 := cid.ra_id.lai.mcc_mnc[3];
+   ret.mncDigit3 := cid.ra_id.lai.mcc_mnc[3];
+   ret.mncDigit2 := cid.ra_id.lai.mcc_mnc[5];
+   ret.mncDigit1 := cid.ra_id.lai.mcc_mnc[4];
}
if (isvalue(cid.ra_id.lai.lac)) {
ret.lac := f_oct_or_wc(cid.ra_id.lai.lac, 2);
diff --git a/pcu/PCU_Tests.default b/pcu/PCU_Tests.default
index 67c05f8..2a87345 100644
--- a/pcu/PCU_Tests.default
+++ b/pcu/PCU_Tests.default
@@ -13,7 +13,7 @@
cell_id := {
ra_id := {
lai := {
-   mcc_mnc := '26242F'H, lac := 13135
+   mcc_mnc := '262F42'H, lac := 13135
},
rac := 0
},
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 09885bd..b18b999 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -28,7 +28,7 @@
cell_id := {
ra_id := {
lai := {
-   mcc_mnc := '26242F'H, lac := 13135
+   mcc_mnc := '262F42'H, lac := 13135
},
rac := 0
},

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifdb64c501095839e86894716769adb53e3c17382
Gerrit-Change-Number: 13380
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-ttcn3-hacks[master]: pcu: move f_pcuif_tx() to PCU_Tests_RAW as it runs on RAW_PCU_CT

2019-03-27 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13376 )

Change subject: pcu: move f_pcuif_tx() to PCU_Tests_RAW as it runs on RAW_PCU_CT
..

pcu: move f_pcuif_tx() to PCU_Tests_RAW as it runs on RAW_PCU_CT

Change-Id: Ic60a7fc657df17ff2d3a889501f0576b98f1f4ad
---
M pcu/PCU_Tests_RAW.ttcn
M pcu/PCU_Tests_RAW_SNS.ttcn
2 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn
index 6022d36..3e38fa8 100644
--- a/pcu/PCU_Tests_RAW.ttcn
+++ b/pcu/PCU_Tests_RAW.ttcn
@@ -73,6 +73,10 @@
PCU.send(t_SD_PCUIF(g_pcu_conn_id, info_ind));
 }

+function f_pcuif_tx(template (value) PCUIF_Message msg) runs on RAW_PCU_CT {
+   PCU.send(t_SD_PCUIF(g_pcu_conn_id, msg));
+}
+
 function f_init_ns_codec(integer idx := 0, float guard_secs := 60.0) runs on 
RAW_NS_CT {
var Result res;

diff --git a/pcu/PCU_Tests_RAW_SNS.ttcn b/pcu/PCU_Tests_RAW_SNS.ttcn
index 7513196..9bedff9 100644
--- a/pcu/PCU_Tests_RAW_SNS.ttcn
+++ b/pcu/PCU_Tests_RAW_SNS.ttcn
@@ -354,10 +354,6 @@
 import from PCUIF_Types all;
 import from PCUIF_CodecPort all;

-private function f_pcuif_tx(template (value) PCUIF_Message msg) runs on 
RAW_PCU_CT {
-   PCU.send(t_SD_PCUIF(g_pcu_conn_id, msg));
-}
-
 altstep as_pcu_activate() runs on RAW_PCU_CT {
var PCUIF_send_data sd;
[] PCU.receive(t_SD_PCUIF(g_pcu_conn_id,  tr_PCUIF_ACT_REQ(?, ?, ?))) 
-> value sd { repeat; }

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic60a7fc657df17ff2d3a889501f0576b98f1f4ad
Gerrit-Change-Number: 13376
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-ttcn3-hacks[master]: BSSGP_Emulation: Handle incoming BVCI=0 messages

2019-03-27 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13377 )

Change subject: BSSGP_Emulation: Handle incoming BVCI=0 messages
..

BSSGP_Emulation: Handle incoming BVCI=0 messages

Like BVCI=PTP, the BVCI=0 messages must be dispatched by their
TLLI, but using the BSSGP_SP_SIG port instead of BSSGP_SP.

Change-Id: Ic456d43ec07600162991698ec3d75d36785b2fb8
---
M library/BSSGP_Emulation.ttcn
1 file changed, 21 insertions(+), 1 deletion(-)

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



diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn
index fa33f51..8988926 100644
--- a/library/BSSGP_Emulation.ttcn
+++ b/library/BSSGP_Emulation.ttcn
@@ -532,7 +532,7 @@
BSSGP_SP.send(f_dec_bssgp(udi.bssgp)) to vc_conn;
}

-   /* Any other BSSGP message: If it has TLLi, route to component; 
otherwise broadcast */
+   /* Any other PTP BSSGP message: If it has TLLi, route to component; 
otherwise broadcast */
[] BSCP.receive(f_BnsUdInd(?, g_cfg.bvci)) -> value udi {
var BssgpDecoded dec := f_dec_bssgp(udi.bssgp);
var template OCT4 tlli := f_bssgp_get_tlli(udi.bssgp);
@@ -551,6 +551,26 @@
}
}

+   /* Any other SIG BSSGP message: If it has TLLi, route to component; 
otherwise broadcast */
+   [] BSCP.receive(f_BnsUdInd(?, 0)) -> value udi {
+   var BssgpDecoded dec := f_dec_bssgp(udi.bssgp);
+   var template OCT4 tlli := f_bssgp_get_tlli(udi.bssgp);
+   if (isvalue(tlli)) {
+   vc_conn := f_tbl_comp_by_tlli(valueof(tlli));
+   BSSGP_SP_SIG.send(dec) to vc_conn;
+   } else {
+   log("No TLLI: Broadcasting ", dec);
+   /* broadcast this message to all components */
+   // TITAN DOESN'T DO THIS, *SIGH*: "BSSGP_SP.send(dec) 
to all component;"
+   for (var integer i := 0; i < sizeof(ClientTable); i := 
i+1) {
+   if (isbound(ClientTable[i].comp_ref)) {
+   BSSGP_SP_SIG.send(dec) to 
ClientTable[i].comp_ref;
+   }
+   }
+   }
+   }
+
+
[] BSSGP_SP_SIG.receive(PDU_BSSGP:?)-> value bs_pdu sender vc_conn {
BSCP.send(f_BnsUdReq(bs_pdu, 0));
}

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic456d43ec07600162991698ec3d75d36785b2fb8
Gerrit-Change-Number: 13377
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-ttcn3-hacks[master]: PCU_Tests.ttcn: Use "normal" Osmocom TTCN-3 coding style

2019-03-27 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13374 )

Change subject: PCU_Tests.ttcn: Use "normal" Osmocom TTCN-3 coding style
..

PCU_Tests.ttcn: Use "normal" Osmocom TTCN-3 coding style

Change-Id: I6eaca0ec7fb9c2dc5d59e385bc3a3a8bb85fe23a
---
M pcu/PCU_Tests.ttcn
1 file changed, 534 insertions(+), 534 deletions(-)

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



diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index f63c4ad..09885bd 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -1,318 +1,318 @@
 module PCU_Tests {

-   import from General_Types all;
-   import from Osmocom_Types all;
-   import from GSM_Types all;
-   import from GSM_RR_Types all;
-   import from Osmocom_Gb_Types all;
-   import from BSSGP_Types all;
-   import from BSSGP_Emulation all;
-   import from NS_Types all;
-   import from NS_Emulation all;
-   import from LLC_Types all;
-   import from LLC_Templates all;
-   import from RLCMAC_Types all;
-   import from RLCMAC_CSN1_Types all;
-   import from LAPDm_RAW_PT all;
-   import from GPRS_Context all;
-   import from GPRS_TBF all;
-   import from L1CTL_PortType all;
-   import from MobileL3_Types all;
-   import from MobileL3_CommonIE_Types all;
-   import from L3_Templates all;
+import from General_Types all;
+import from Osmocom_Types all;
+import from GSM_Types all;
+import from GSM_RR_Types all;
+import from Osmocom_Gb_Types all;
+import from BSSGP_Types all;
+import from BSSGP_Emulation all;
+import from NS_Types all;
+import from NS_Emulation all;
+import from LLC_Types all;
+import from LLC_Templates all;
+import from RLCMAC_Types all;
+import from RLCMAC_CSN1_Types all;
+import from LAPDm_RAW_PT all;
+import from GPRS_Context all;
+import from GPRS_TBF all;
+import from L1CTL_PortType all;
+import from MobileL3_Types all;
+import from MobileL3_CommonIE_Types all;
+import from L3_Templates all;

-   modulepar {
-   BssgpConfig mp_gb_cfg := {
-   nsei := 1234,
-   bvci := 1234,
-   cell_id := {
-   ra_id := {
-   lai := {
-   mcc_mnc := '26242F'H, lac := 
13135
-   },
-   rac := 0
+modulepar {
+   BssgpConfig mp_gb_cfg := {
+   nsei := 1234,
+   bvci := 1234,
+   cell_id := {
+   ra_id := {
+   lai := {
+   mcc_mnc := '26242F'H, lac := 13135
},
-   cell_id := 20960
+   rac := 0
},
-   sgsn_role := true
-   };
+   cell_id := 20960
+   },
+   sgsn_role := true
+   };

-   NSConfiguration mp_nsconfig := {
-   local_udp_port := 23000,
-   local_ip := "127.0.0.1",
-   remote_udp_port := 21000,
-   remote_ip := "127.0.0.1",
-   nsvci := 0,
-   nsei := 2342,
-   role_sgsn := true,
-   handle_sns := true
-   };
+   NSConfiguration mp_nsconfig := {
+   local_udp_port := 23000,
+   local_ip := "127.0.0.1",
+   remote_udp_port := 21000,
+   remote_ip := "127.0.0.1",
+   nsvci := 0,
+   nsei := 2342,
+   role_sgsn := true,
+   handle_sns := true
+   };
+}
+
+type component dummy_CT extends BSSGP_Client_CT {
+   var lapdm_CT lapdm_component;
+   port LAPDm_PT L1;
+
+   var NS_CT ns_component;
+   var BSSGP_CT bssgp_component;
+
+   var MmContext g_mmctx := {
+   tlli := ''O,
+   n_u := 0
+   };
+
+   var boolean g_initialized := false;
+}
+
+function f_init() runs on dummy_CT {
+   if (g_initialized == true) {
+   return;
}
+   g_initialized := true;
+   /* create a new NS component */
+   ns_component := NS_CT.create;
+   bssgp_component := BSSGP_CT.create;
+   /* connect our BSSGP port to the BSSGP Emulation */
+   connect(self:BSSGP[0], bssgp_component:BSSGP_SP);
+   connect(self:BSSGP_SIG[0], bssgp_component:BSSGP_SP_SIG);
+   connect(self:BSSGP_PROC[0], bssgp_component:BSSGP_PROC);
+   /* connect lower-end of BSSGP with BSSGP_CODEC_PORT (maps to NS_PT*/
+   connect(bssgp_component:BSCP, ns_component:NS_SP);
+   /* connect lower-end of NS emulation to NS_CODEC_PORT (on top of 

Change in osmo-ttcn3-hacks[master]: NS_Emulation: Disable sending NS-RESET from SGSN to BSS

2019-03-27 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13047 )

Change subject: NS_Emulation: Disable sending NS-RESET from SGSN to BSS
..

NS_Emulation: Disable sending NS-RESET from SGSN to BSS

Change-Id: I2a5775fcaf63ac008adecaf2c602c82e9e4ccb5a
---
M library/NS_Emulation.ttcn
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/library/NS_Emulation.ttcn b/library/NS_Emulation.ttcn
index 9ad89cb..89e25ea 100644
--- a/library/NS_Emulation.ttcn
+++ b/library/NS_Emulation.ttcn
@@ -91,7 +91,9 @@
g_conn_id := res.connId;
f_change_state(NSE_S_DEAD_BLOCKED);
/* Send the first NS-ALIVE to test the connection */
-   f_sendReset();
+   if (not config.role_sgsn) {
+   f_sendReset();
+   }
}

type component NS_CT {

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I2a5775fcaf63ac008adecaf2c602c82e9e4ccb5a
Gerrit-Change-Number: 13047
Gerrit-PatchSet: 3
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-ttcn3-hacks[master]: NS_Emulation: Add minimal support for SGSN-side SNS handling

2019-03-27 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13046 )

Change subject: NS_Emulation: Add minimal support for SGSN-side SNS handling
..

NS_Emulation: Add minimal support for SGSN-side SNS handling

Change-Id: I1edf739d6fd39478f662a28a7d9334ca51c270a3
---
M library/NS_Emulation.ttcn
M pcu/PCU_Tests.ttcn
M sgsn/SGSN_Tests.ttcn
3 files changed, 57 insertions(+), 5 deletions(-)

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



diff --git a/library/NS_Emulation.ttcn b/library/NS_Emulation.ttcn
index 6915993..9ad89cb 100644
--- a/library/NS_Emulation.ttcn
+++ b/library/NS_Emulation.ttcn
@@ -116,7 +116,9 @@
PortNumber remote_udp_port,
charstring remote_ip,
Nsvci nsvci,
-   Nsvci nsei
+   Nsvci nsei,
+   boolean role_sgsn,
+   boolean handle_sns
}

private function f_change_state(NseState new_state) runs on NS_CT {
@@ -192,6 +194,8 @@
/* FIXME */
}

+   [config.role_sgsn and config.handle_sns] as_sns_sgsn();
+
/* default case of handling unknown PDUs */
[] NSCP.receive(t_NS_RecvFrom(?)) -> value rf {
log("Rx Unexpected NS PDU ", rf.msg," in state ", 
g_state);
@@ -201,6 +205,46 @@
[] NSCP.receive(ASP_Event:?) -> value evt { NS_SP.send(evt); }
}

+   /* simple IP Sub-Network Service responder for the SGSN side. This is 
not a full implementation
+* of the protocol, merely sufficient to make the PCU/BSS side happy to 
proceed */
+   altstep as_sns_sgsn() runs on NS_CT {
+   var NS_RecvFrom rf;
+   [] NSCP.receive(t_NS_RecvFrom(tr_SNS_SIZE(config.nsei))) -> 
value rf {
+   /* blindly acknowledge whatever the PCU sends */
+   NSCP.send(t_NS_Send(g_conn_id, 
ts_SNS_SIZE_ACK(config.nsei, omit)));
+   }
+   [] NSCP.receive(t_NS_RecvFrom(tr_SNS_SIZE(?))) {
+   setverdict(fail, "SNS-SIZE from unexpected NSEI");
+   self.stop;
+   }
+   [] NSCP.receive(t_NS_RecvFrom(tr_SNS_CONFIG(config.nsei, true,
+   {tr_SNS_IPv4(config.remote_ip, 
config.remote_udp_port)}))) -> value rf {
+   /* blindly acknowledge whatever the PCU sends */
+   NSCP.send(t_NS_Send(g_conn_id, 
ts_SNS_CONFIG_ACK(config.nsei, omit)));
+   /* send a SNS-CONFIG in response and expect a 
SNS-CONFIG-ACK */
+   var IP4_Elements v4 := { 
valueof(ts_SNS_IPv4(config.local_ip, config.local_udp_port)) };
+   NSCP.send(t_NS_Send(g_conn_id, 
ts_SNS_CONFIG(config.nsei, true, v4)));
+   alt {
+   [] 
NSCP.receive(t_NS_RecvFrom(tr_SNS_CONFIG_ACK(config.nsei, omit))) {
+   /* success */
+   }
+   [] 
NSCP.receive(t_NS_RecvFrom(tr_SNS_CONFIG_ACK(config.nsei, ?))) {
+   setverdict(fail, "Unexpected SNS-CONFIG-NACK");
+   self.stop;
+   }
+   }
+   }
+   [] NSCP.receive(t_NS_RecvFrom(tr_SNS_CONFIG(config.nsei, false, 
?))) { /* ignore */}
+   [] NSCP.receive(t_NS_RecvFrom(tr_SNS_CONFIG(config.nsei, true, 
?))) {
+   setverdict(fail, "Unexpected SNS-CONFIG content");
+   self.stop;
+   }
+   [] NSCP.receive(t_NS_RecvFrom(tr_SNS_CONFIG(?, ?, ?))) {
+   setverdict(fail, "SNS-CONFIG from unexpected NSEI");
+   self.stop;
+   }
+   }
+
private function f_ScanEvents() runs on NS_CT {
var NsUnitdataRequest ud_req;
var NS_RecvFrom rf;
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 6e8185d..f63c4ad 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -43,7 +43,9 @@
remote_udp_port := 21000,
remote_ip := "127.0.0.1",
nsvci := 0,
-   nsei := 2342
+   nsei := 2342,
+   role_sgsn := true,
+   handle_sns := true
};
}

diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index a2e93c0..8b639e6 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -51,7 +51,9 @@
remote_udp_port := 23000,
remote_ip := "127.0.0.1",
nsvci := 97,
-   nsei := 96
+   nsei := 96,
+   role_sgsn 

Change in osmo-ttcn3-hacks[master]: pcu: Add TC_pcuif_suspend() to test PCU->BSSGP SUSPEND processing

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

Change subject: pcu: Add TC_pcuif_suspend() to test PCU->BSSGP SUSPEND 
processing
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iaf35e0c1087413db1dc7d169fa716df14c78f5db
Gerrit-Change-Number: 13383
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Wed, 27 Mar 2019 11:16:19 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: PCUIF: Add templates for PCU_IF_MSG_SUSP_REQ

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

Change subject: PCUIF: Add templates for PCU_IF_MSG_SUSP_REQ
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib7661790b9531be829ee550ce889151ebe1885ac
Gerrit-Change-Number: 13381
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Wed, 27 Mar 2019 11:16:14 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: pcu: Ensure we're always using the same defaults for the CGI

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

Change subject: pcu: Ensure we're always using the same defaults for the CGI
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iac9be9a8d4ccb4d01cc343d763d2e35873e3844f
Gerrit-Change-Number: 13375
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Wed, 27 Mar 2019 11:16:03 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: GSM_RR_Types: Add enc_RoutingAreaIdentification()

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

Change subject: GSM_RR_Types: Add enc_RoutingAreaIdentification()
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I28222304b2bac893b216c47e6dc002886fab6406
Gerrit-Change-Number: 13378
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Wed, 27 Mar 2019 11:16:08 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: PCU_Tests.ttcn: Use "normal" Osmocom TTCN-3 coding style

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

Change subject: PCU_Tests.ttcn: Use "normal" Osmocom TTCN-3 coding style
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6eaca0ec7fb9c2dc5d59e385bc3a3a8bb85fe23a
Gerrit-Change-Number: 13374
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Wed, 27 Mar 2019 11:16:01 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: PCU: make f_bssgp_establish() run on BSSGP_Client_CT

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

Change subject: PCU: make f_bssgp_establish() run on BSSGP_Client_CT
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I1aa5dc090aac78a85a85ac190343befb0199a093
Gerrit-Change-Number: 13382
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Wed, 27 Mar 2019 11:16:16 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: BSSGP_Emulation: Handle incoming BVCI=0 messages

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

Change subject: BSSGP_Emulation: Handle incoming BVCI=0 messages
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic456d43ec07600162991698ec3d75d36785b2fb8
Gerrit-Change-Number: 13377
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Wed, 27 Mar 2019 11:16:07 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: NS_Emulation: Disable sending NS-RESET from SGSN to BSS

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

Change subject: NS_Emulation: Disable sending NS-RESET from SGSN to BSS
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2a5775fcaf63ac008adecaf2c602c82e9e4ccb5a
Gerrit-Change-Number: 13047
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Wed, 27 Mar 2019 11:15:59 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: pcu: move f_pcuif_tx() to PCU_Tests_RAW as it runs on RAW_PCU_CT

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

Change subject: pcu: move f_pcuif_tx() to PCU_Tests_RAW as it runs on RAW_PCU_CT
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic60a7fc657df17ff2d3a889501f0576b98f1f4ad
Gerrit-Change-Number: 13376
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Wed, 27 Mar 2019 11:16:05 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: pcu: Fix MCC/MNC handling: use 'F' between MCC and MNC in 2-digit case

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

Change subject: pcu: Fix MCC/MNC handling: use 'F' between MCC and MNC in 
2-digit case
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifdb64c501095839e86894716769adb53e3c17382
Gerrit-Change-Number: 13380
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Wed, 27 Mar 2019 11:16:12 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


  1   2   >