Change in osmo-bsc[master]: Fix some typos

2019-11-13 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/16066 )

Change subject: Fix some typos
..


Patch Set 1: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/c/osmo-bsc/+/16066/1/src/osmo-bsc/abis_om2000.c
File src/osmo-bsc/abis_om2000.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/16066/1/src/osmo-bsc/abis_om2000.c@1581
PS1, Line 1581: directory
directly



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I46fc9d424620c77ae9ccf78b58081bd303386d7c
Gerrit-Change-Number: 16066
Gerrit-PatchSet: 1
Gerrit-Owner: roox 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Thu, 14 Nov 2019 05:53:02 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: Fix some typos

2019-11-13 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/16066 )

Change subject: Fix some typos
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I46fc9d424620c77ae9ccf78b58081bd303386d7c
Gerrit-Change-Number: 16066
Gerrit-PatchSet: 1
Gerrit-Owner: roox 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 13 Nov 2019 21:45:18 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: Fix some typos

2019-11-13 Thread roox
roox has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/16066 )


Change subject: Fix some typos
..

Fix some typos

Fix typos and common misspellings in code comments and in the manual.

Change-Id: I46fc9d424620c77ae9ccf78b58081bd303386d7c
---
M doc/e1-data-model.txt
M doc/handover.txt
M doc/manuals/aoip-mgw-options.adoc
M doc/manuals/chapters/counters_generated.adoc
M doc/manuals/chapters/handover.adoc
M doc/manuals/chapters/osmux_bsc.adoc
M doc/manuals/message-sequences/mo_call-abis_a.msc
M doc/manuals/mgw/classic-bsc.msc
M doc/manuals/osmux-reference.adoc
M doc/manuals/vty/bsc_vty_reference.xml
M doc/manuals/vty/libbsc_vty_additions.xml
M include/mISDNif.h
M include/osmocom/bsc/a_reset.h
M include/osmocom/bsc/abis_rsl.h
M include/osmocom/bsc/acc_ramp.h
M include/osmocom/bsc/gsm_data.h
M include/osmocom/bsc/meas_feed.h
M include/osmocom/bsc/osmo_bsc_reset.h
M include/osmocom/bsc/osmo_bsc_sigtran.h
M include/osmocom/bsc/penalty_timers.h
M src/ipaccess/ipaccess-config.c
M src/ipaccess/ipaccess-proxy.c
M src/osmo-bsc/a_reset.c
M src/osmo-bsc/abis_nm.c
M src/osmo-bsc/abis_nm_vty.c
M src/osmo-bsc/abis_om2000.c
M src/osmo-bsc/abis_rsl.c
M src/osmo-bsc/assignment_fsm.c
M src/osmo-bsc/bsc_subscr_conn_fsm.c
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/bts_siemens_bs11.c
M src/osmo-bsc/codec_pref.c
M src/osmo-bsc/gsm_04_08_rr.c
M src/osmo-bsc/gsm_data.c
M src/osmo-bsc/handover_decision.c
M src/osmo-bsc/handover_decision_2.c
M src/osmo-bsc/handover_fsm.c
M src/osmo-bsc/lchan_rtp_fsm.c
M src/osmo-bsc/neighbor_ident_vty.c
M src/osmo-bsc/osmo_bsc_bssap.c
M src/osmo-bsc/osmo_bsc_lcls.c
M src/osmo-bsc/osmo_bsc_main.c
M src/osmo-bsc/osmo_bsc_sigtran.c
M src/osmo-bsc/paging.c
M src/osmo-bsc/pcu_sock.c
M src/osmo-bsc/system_information.c
M tests/codec_pref/codec_pref_test.c
M tests/handover/handover_test.c
48 files changed, 88 insertions(+), 88 deletions(-)



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

diff --git a/doc/e1-data-model.txt b/doc/e1-data-model.txt
index 509004f..06f9f30 100644
--- a/doc/e1-data-model.txt
+++ b/doc/e1-data-model.txt
@@ -8,7 +8,7 @@
 E1 link, but it could also be abis-over-IP with a mixture of TCP and RTP/UDP.
 
 To further complicate the fact, multiple BTS can share one such pysical
-link.  On a single E1 line, we can easily accomodate up to three BTS with
+link.  On a single E1 line, we can easily accommodate up to three BTS with
 two TRX each.

 Thus, it is best for OpenBSC to have some kind of abstraction layer.  The BSC's
diff --git a/doc/handover.txt b/doc/handover.txt
index ac19e87..c5fc331 100644
--- a/doc/handover.txt
+++ b/doc/handover.txt
@@ -38,7 +38,7 @@

 Window RXLEV averaging:10 SACCH frames (no weighting)
 Window RXQUAL averaging:   1 SACCH frame (no averaging)
-Level Threashold:  1 of the last 1 AV-RXLEV values < -110dBm
+Level Threshold:   1 of the last 1 AV-RXLEV values < -110dBm
 Quality Threshold: 3 of the last 4 AV-RXQUAL values >= 5
 Interference Threshold:1 of the last AV-RXLEV > -85 dBm &
3 of the last 4 AV-RXQUAL values >= 5
diff --git a/doc/manuals/aoip-mgw-options.adoc 
b/doc/manuals/aoip-mgw-options.adoc
index f693093..124c03f 100644
--- a/doc/manuals/aoip-mgw-options.adoc
+++ b/doc/manuals/aoip-mgw-options.adoc
@@ -54,7 +54,7 @@

 As more modern MSCs at operators tend to favor implementing 3GPP AoIP
 rather than the proprietary SCCPlite based A interface, it becomes
-neccessary for OsmoBSC to support this.
+necessary for OsmoBSC to support this.

 At the same time, for compatibility reasons, the classic SCCPlite
 support shall be kept, if possible with reasonable effort.
diff --git a/doc/manuals/chapters/counters_generated.adoc 
b/doc/manuals/chapters/counters_generated.adoc
index 65f4ca4..f668865 100644
--- a/doc/manuals/chapters/counters_generated.adoc
+++ b/doc/manuals/chapters/counters_generated.adoc
@@ -22,7 +22,7 @@
 | codec:fr | <> | Count the usage of FR codec by channel mode 
requested.
 | codec:hr | <> | Count the usage of HR codec by channel mode 
requested.
 | paging:attempted | <> | Paging attempts for a 
subscriber.
-| paging:already | <> | Paging attempts ignored as 
subsciber was already being paged.
+| paging:already | <> | Paging attempts ignored as 
subscriber was already being paged.
 | paging:responded | <> | Paging attempts with 
successful paging response.
 | paging:expired | <> | Paging Request expired because of 
timeout T3113.
 | chan_act:total | <> | Total number of Channel 
Activations.
@@ -48,7 +48,7 @@
 | codec:fr | <> | Count the usage of FR codec by channel mode 
requested.
 | codec:hr | <> | Count the usage of HR codec by channel mode 
requested.
 | paging:attempted | <> | Paging attempts for a 
subscriber.
-| paging:already | <> | Paging attempts ignored as 
subsciber was already being paged.
+| 

Change in osmo-ttcn3-hacks[master]: msc: overhaul voice call testing

2019-11-13 Thread neels
Hello pespin, Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938

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

Change subject: msc: overhaul voice call testing
..

msc: overhaul voice call testing

* Semantic:

We don't really know which side the MSC first creates a CRCX for. Instead of
assuming that the RAN side is always CRCX'd first, simply handle a "first" and
a "second" CRCX, not making any assumptions which is for which side.
Notably, there still are quite a few places assuming which CRCX corresponds to
the RAN/CN side, but the changes are sufficient to still pass the tests when
osmo-msc swaps the CRCX order; sometimes for slightly obscure reasons, for
example because it doesn't matter that the wrong port number is returned during
a subsequent MDCX... Cleaning up the rest is still todo for later.

Remove code dup from call establishing code, particularly for MGCP.

Use f_mo_call_establish() and f_mt_call() where ever possible, to make all of
the call establishing tests handle upcoming changes in osmo-msc's order of
messages, without re-implementing the changes for each test individually.

The X-Osmux parameter was so far expected to appear in the first CRCX received,
assuming that this first CRCX is for the RAN.  Instead, detect whether X-Osmux
is contained in a CRCX, and reply with an Osmux CID if so, regardless of it
being the first or second CRCX.  Count the number of X-Osmux parameters
received in CRCX messages, and compare after call setup to verify X-Osmux
presence.

Since f_mo_call_establish() can't handle RANAP assignment, a few Iu tests that
worked with the older code dup will break by this patch. This is fixed by a
subsequent patch, see I0ead36333ab665147b8d222070ea5cf8afc555ec.

* Details, per patch chunk:

Change ts_BSSMAP_IE_AoIP_TLA4 to a non-value template, so that we can use a
wildcard for the assigned port number from MGCP (depending on RAN or CN CRCX
first, the RAN port number can be one or the other).

In CallParameters, move MGCP handling instructions into a separate record
"CrcxResponse", and have two of them for handling the first and the second
CRCX, replacing mgw_rtp_{ip,port}_{bss,mss} and mgcp_connection_id_{bss,mss}.

In CallParameters, add some flags for early-exiting call establishment with a
particular desired behavior, for specialized tests.

In CallParameters, use common default values and don't repeat them in each and
every call establishing test.

Set cpars.mo_call := {true,false} implicitly when f_{mo,mt}_call_establish()
are invoked.

Remove CRCX comments implying RAN or CN side, instead just talk of the "first"
and the "second" CRCX.

Implement one common f_handle_crcx() function, which is used by
f_mo_call_establish(), f_mt_call_complete(), as_optional_mgcp_crcx(), and
implicitly uses the first/second CRCX handling.

For Assigment, use a wildcard RTP port so that we don't have to assume which
CRCX was for the RAN side.

In f_mo_call_establish(), insert special case conditions to make it enact
errors at specific times, for individual tests. That saves re-implementing the
entire call establishment (code dup).

For error cases, add expectation of a CC Release message in the call
establishment. This should not apply for normal successful operation, but
because interleave does not support conditionals, add flags
got_mncc_setup_compl_ind and got_cc_connect to break the interleave when
establishing is complete, so that the CC Release is skipped.
A CC Release always breaks the interleave, at whatever time it arrives.

Tests adopting f_{mo,mt}_call instead of code dup:
  f_tc_mo_setup_and_nothing()
  f_tc_mo_crcx_ran_timeout()
  f_tc_mo_crcx_ran_reject()
  f_tc_mo_release_timeout()
  f_tc_mo_cc_bssmap_clear()

Change-Id: I8b82476f55a98f7a94d5c4f1cd80eac427b2d20f
---
M library/BSSMAP_Templates.ttcn
M msc/BSC_ConnectionHandler.ttcn
M msc/MSC_Tests.ttcn
3 files changed, 292 insertions(+), 335 deletions(-)


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I8b82476f55a98f7a94d5c4f1cd80eac427b2d20f
Gerrit-Change-Number: 15938
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-MessageType: newpatchset


Change in docker-playground[master]: ttcn3-stp-tests: laforge/stp has been merged master; use master

2019-11-13 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/16065 )

Change subject: ttcn3-stp-tests: laforge/stp has been merged master; use master
..


Patch Set 1:

Thanks, good catch!


--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16065
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I0ec887f40d00f7c24b67a4525b363abb869ad18b
Gerrit-Change-Number: 16065
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 13 Nov 2019 16:48:12 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in docker-playground[master]: ttcn3-stp-tests: laforge/stp has been merged master; use master

2019-11-13 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/16065 )

Change subject: ttcn3-stp-tests: laforge/stp has been merged master; use master
..

ttcn3-stp-tests: laforge/stp has been merged master; use master

Change-Id: I0ec887f40d00f7c24b67a4525b363abb869ad18b
---
M ttcn3-stp-test/Dockerfile
1 file changed, 0 insertions(+), 3 deletions(-)

Approvals:
  laforge: Looks good to me, approved; Verified



diff --git a/ttcn3-stp-test/Dockerfile b/ttcn3-stp-test/Dockerfile
index 7e671b3..a755c94 100644
--- a/ttcn3-stp-test/Dockerfile
+++ b/ttcn3-stp-test/Dockerfile
@@ -4,11 +4,8 @@
 RUNmkdir /root/projects && (cd /root/projects && ln -sf / git)
 RUNgit clone git://git.osmocom.org/osmo-ttcn3-hacks.git

-# FIXME: Once M3UA dep update patches in laforge/stp is merged into master, the
-# line checking it out can be removed.
 RUNcd osmo-ttcn3-hacks && \
git checkout -f -B master origin/master && \
-   git fetch && git checkout -f -B laforge/stp origin/laforge/stp && \
make deps

 RUNgit config --global user.email doc...@dock.er && \

--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16065
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I0ec887f40d00f7c24b67a4525b363abb869ad18b
Gerrit-Change-Number: 16065
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in docker-playground[master]: ttcn3-stp-tests: laforge/stp has been merged master; use master

2019-11-13 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/16065 )

Change subject: ttcn3-stp-tests: laforge/stp has been merged master; use master
..


Patch Set 1: Verified+1 Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16065
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I0ec887f40d00f7c24b67a4525b363abb869ad18b
Gerrit-Change-Number: 16065
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 13 Nov 2019 16:45:40 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in docker-playground[master]: ttcn3-stp-tests: laforge/stp has been merged master; use master

2019-11-13 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/docker-playground/+/16065 )


Change subject: ttcn3-stp-tests: laforge/stp has been merged master; use master
..

ttcn3-stp-tests: laforge/stp has been merged master; use master

Change-Id: I0ec887f40d00f7c24b67a4525b363abb869ad18b
---
M ttcn3-stp-test/Dockerfile
1 file changed, 0 insertions(+), 3 deletions(-)



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

diff --git a/ttcn3-stp-test/Dockerfile b/ttcn3-stp-test/Dockerfile
index 7e671b3..a755c94 100644
--- a/ttcn3-stp-test/Dockerfile
+++ b/ttcn3-stp-test/Dockerfile
@@ -4,11 +4,8 @@
 RUNmkdir /root/projects && (cd /root/projects && ln -sf / git)
 RUNgit clone git://git.osmocom.org/osmo-ttcn3-hacks.git

-# FIXME: Once M3UA dep update patches in laforge/stp is merged into master, the
-# line checking it out can be removed.
 RUNcd osmo-ttcn3-hacks && \
git checkout -f -B master origin/master && \
-   git fetch && git checkout -f -B laforge/stp origin/laforge/stp && \
make deps

 RUNgit config --global user.email doc...@dock.er && \

--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16065
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I0ec887f40d00f7c24b67a4525b363abb869ad18b
Gerrit-Change-Number: 16065
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in docker-playground[master]: ttcn3-stp/Makefile: Drop defaulting to branch laforge/stp

2019-11-13 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/16046 )

Change subject: ttcn3-stp/Makefile: Drop defaulting to branch laforge/stp
..

ttcn3-stp/Makefile: Drop defaulting to branch laforge/stp

Once osmo-ttcn3-hacks.git branch laforge/stp has been merged (where
STP_Tests devel was done), we can use master like we do for other
suites.

Change-Id: I844ecf8a636ead55b7b406cb97424a4a35a6b674
---
M ttcn3-stp-test/Makefile
1 file changed, 0 insertions(+), 1 deletion(-)

Approvals:
  laforge: Looks good to me, approved; Verified



diff --git a/ttcn3-stp-test/Makefile b/ttcn3-stp-test/Makefile
index 4bf2fff..cbcd544 100644
--- a/ttcn3-stp-test/Makefile
+++ b/ttcn3-stp-test/Makefile
@@ -1,4 +1,3 @@
 RUN_ARGS?=--sysctl net.ipv6.conf.all.disable_ipv6=0 --rm --network sigtran 
--ip 172.18.2.202 -v ggsn-test-vol:/data
-OSMO_TTCN3_BRANCH?="laforge/stp"

 include ../make/Makefile

--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16046
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I844ecf8a636ead55b7b406cb97424a4a35a6b674
Gerrit-Change-Number: 16046
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in docker-playground[master]: ttcn3-stp/Makefile: Drop defaulting to branch laforge/stp

2019-11-13 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/16046 )

Change subject: ttcn3-stp/Makefile: Drop defaulting to branch laforge/stp
..


Patch Set 1: Verified+1 Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16046
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I844ecf8a636ead55b7b406cb97424a4a35a6b674
Gerrit-Change-Number: 16046
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 13 Nov 2019 16:39:34 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: stp: Introduce TC_tmt_override

2019-11-13 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16043 )

Change subject: stp: Introduce TC_tmt_override
..

stp: Introduce TC_tmt_override

Change-Id: Id99ec3eaa431512114817d2a2af77013762ab2b9
---
M stp/STP_Tests_IPA.ttcn
M stp/osmo-stp.cfg
2 files changed, 49 insertions(+), 4 deletions(-)

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



diff --git a/stp/STP_Tests_IPA.ttcn b/stp/STP_Tests_IPA.ttcn
index f7273dc..946a950 100644
--- a/stp/STP_Tests_IPA.ttcn
+++ b/stp/STP_Tests_IPA.ttcn
@@ -33,7 +33,7 @@

 import from STP_Tests_Common all;

-private const integer NR_IPA := 4;
+private const integer NR_IPA := 7;

 type record of charstring AspNameArray;

@@ -43,7 +43,10 @@
AspNameArray mp_ipa_as_names := {"ipa-as-loadshare-sender",
 "ipa-as-loadshare-receiver",
 "ipa-as-loadshare-receiver",
-"ipa-as-dynamic-asp"
+"ipa-as-dynamic-asp",
+"ipa-as-override-sender",
+"ipa-as-override-receiver",
+"ipa-as-override-receiver"
 };
 }

@@ -165,6 +168,27 @@
}
 }

+/* test "traffic-mode override" behavior */
+testcase TC_tmt_override() runs on IPA_CT {
+   f_init_ipa();
+
+   /* bring up the 'sender' side (single ASP in AS) */
+   f_connect_ipa(4);
+   /* activate the first 'receiver' side ASP */
+   f_connect_ipa(5);
+   f_sleep(1.0);
+
+   /* verify traffic is routed from sender to [sole] receiver */
+   f_test_traffic(4, 5);
+
+   /* activate the second 'receiver' side ASP */
+   f_connect_ipa(6);
+   f_sleep(1.0);
+
+   /* verify traffic is routed from sender to new receiver */
+   f_test_traffic(4, 6);
+}
+
 private altstep as_count_rx(integer idx, template (present) octetstring exp, 
inout integer counter)
 runs on IPA_CT {
[] IPA[idx].receive(t_ASP_MTP3_TRANSFERind(?, ?, ?, ?, exp)) {
@@ -214,11 +238,11 @@
setverdict(pass);
 }

-
 control {
execute( TC_unknown_client_nodynamic() );
execute( TC_known_client_nodynamic() );
execute( TC_unknown_client_dynamic() );
+   execute (TC_tmt_override() );
execute( TC_tmt_loadshare() );
 }

diff --git a/stp/osmo-stp.cfg b/stp/osmo-stp.cfg
index 26ab7f6..50c80d3 100644
--- a/stp/osmo-stp.cfg
+++ b/stp/osmo-stp.cfg
@@ -85,7 +85,27 @@
   point-code override dpc 32
   asp ipa-asp-loadshare-receiver0
   asp ipa-asp-loadshare-receiver1
- !Used by STP_Tests.ttcn:
+! OVERRIDE:
+ asp ipa-asp-override-sender 20004 5000 ipa
+  local-ip 127.0.0.1
+  remote-ip 127.0.0.1
+ as ipa-as-override-sender ipa
+  routing-key 0 6
+  point-code override dpc 33
+  asp ipa-asp-override-sender
+ asp ipa-asp-override-receiver0 20005 5000 ipa
+  local-ip 127.0.0.1
+  remote-ip 127.0.0.1
+ asp ipa-asp-override-receiver1 20006 5000 ipa
+  local-ip 127.0.0.1
+  remote-ip 127.0.0.1
+ as ipa-as-override-receiver ipa
+  traffic-mode override
+  routing-key 0 8
+  point-code override dpc 34
+  asp ipa-asp-override-receiver0
+  asp ipa-asp-override-receiver1
+! DYNAMIC AS:
  as ipa-as-dynamic-asp ipa
   routing-key 0 5
   point-code override dpc 23
@@ -97,6 +117,7 @@
   update route 42 16777215 linkset as-receiver
   update route 55 16777215 linkset as-client
   update route 31 16777215 linkset ipa-as-loadshare-receiver
+  update route 33 16777215 linkset ipa-as-override-receiver
   update route 5  16777215 linkset ipa-as-dynamic-asp
 !
 !SERVERS:

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

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


Change in osmo-ttcn3-hacks[master]: stp: Introduce traffic mode type tests with unknwon dynamic ASPs

2019-11-13 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16045 )

Change subject: stp: Introduce traffic mode type tests with unknwon dynamic ASPs
..

stp: Introduce traffic mode type tests with unknwon dynamic ASPs

Change-Id: Ib142b021bb6d268831479723ad629be9ed378f81
---
M stp/STP_Tests_IPA.ttcn
1 file changed, 33 insertions(+), 11 deletions(-)

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



diff --git a/stp/STP_Tests_IPA.ttcn b/stp/STP_Tests_IPA.ttcn
index beb2aa9..48652b8 100644
--- a/stp/STP_Tests_IPA.ttcn
+++ b/stp/STP_Tests_IPA.ttcn
@@ -168,27 +168,37 @@
}
 }

-/* test "traffic-mode override" behavior */
-testcase TC_tmt_override() runs on IPA_CT {
+private function f_tc_tmt_override(boolean unknwon_dynamic_asp)
+runs on IPA_CT {
f_init_ipa();

/* bring up the 'sender' side (single ASP in AS) */
-   f_connect_ipa(4);
+   f_connect_ipa(4, unknwon_dynamic_asp);
/* activate the first 'receiver' side ASP */
-   f_connect_ipa(5);
+   f_connect_ipa(5, unknwon_dynamic_asp);
f_sleep(1.0);

/* verify traffic is routed from sender to [sole] receiver */
f_test_traffic(4, 5);

/* activate the second 'receiver' side ASP */
-   f_connect_ipa(6);
+   f_connect_ipa(6, unknwon_dynamic_asp);
f_sleep(1.0);

/* verify traffic is routed from sender to new receiver */
f_test_traffic(4, 6);
 }

+/* test "traffic-mode override" behavior */
+testcase TC_tmt_override() runs on IPA_CT {
+   f_tc_tmt_override(false);
+}
+
+/* test "traffic-mode override" behavior, with "accept-asp-connections 
dynamic-permitted" and clients from unknown ASPs */
+testcase TC_unknown_client_dynamic_tmt_override() runs on IPA_CT {
+   f_tc_tmt_override(true);
+}
+
 private altstep as_count_rx(integer idx, template (present) octetstring exp, 
inout integer counter)
 runs on IPA_CT {
[] IPA[idx].receive(t_ASP_MTP3_TRANSFERind(?, ?, ?, ?, exp)) {
@@ -196,16 +206,16 @@
}
 }
 
-/* test "traffic-mode load-share" behavior */
-testcase TC_tmt_loadshare() runs on IPA_CT {
+private function f_tc_tmt_loadshare(boolean unknwon_dynamic_asp)
+runs on IPA_CT {
var integer i;

f_init_ipa();

/* bring up the 'sender' side (single ASP in AS) */
-   f_connect_ipa(0);
+   f_connect_ipa(0, unknwon_dynamic_asp);
/* activate the first 'receiver' side ASP */
-   f_connect_ipa(1);
+   f_connect_ipa(1, unknwon_dynamic_asp);
f_sleep(1.0);

/* verify traffic is routed from sender to [sole] receiver */
@@ -214,7 +224,7 @@
}

/* activate the second 'receiver' side ASP */
-   f_connect_ipa(2);
+   f_connect_ipa(2, unknwon_dynamic_asp);
f_sleep(1.0);

/* verify traffic is routed from sender to new receiver */
@@ -238,12 +248,24 @@
setverdict(pass);
 }

+/* test "traffic-mode load-share" behavior */
+testcase TC_tmt_loadshare() runs on IPA_CT {
+   f_tc_tmt_loadshare(false);
+}
+
+/* test "traffic-mode override" behavior, with "accept-asp-connections 
dynamic-permitted" and clients from unknown ASPs */
+testcase TC_unknown_client_dynamic_tmt_loadshare() runs on IPA_CT {
+   f_tc_tmt_override(true);
+}
+
 control {
execute( TC_unknown_client_nodynamic() );
execute( TC_known_client_nodynamic() );
execute( TC_unknown_client_dynamic() );
-   execute (TC_tmt_override() );
+   execute( TC_tmt_override() );
+   execute( TC_unknown_client_dynamic_tmt_override() );
execute( TC_tmt_loadshare() );
+   execute( TC_unknown_client_dynamic_tmt_loadshare() );
 }



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

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


Change in osmo-ttcn3-hacks[master]: stp: Introduce TC_tmt_override

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

Change subject: stp: Introduce TC_tmt_override
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Id99ec3eaa431512114817d2a2af77013762ab2b9
Gerrit-Change-Number: 16043
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 13 Nov 2019 16:38:06 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: stp: Refactor STP_Tests_IPA tests and introduce new TC_tmt_loadshare

2019-11-13 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16042 )

Change subject: stp: Refactor STP_Tests_IPA tests and introduce new 
TC_tmt_loadshare
..

stp: Refactor STP_Tests_IPA tests and introduce new TC_tmt_loadshare

Infrastructure in STP_Tests_IPA changed to be more similar to what is
done in STP_Tests_M3UA, which already contain more advanced tests.

Array of AS names mp_ipa_as_names is added in order to let TTCN3 port
which AS is configured in STP for each src port.

Change-Id: Iae213c58598cc0207503fd10f09d2d57aab941fe
---
M stp/STP_Tests.ttcn
M stp/STP_Tests_IPA.ttcn
M stp/osmo-stp.cfg
3 files changed, 136 insertions(+), 15 deletions(-)

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



diff --git a/stp/STP_Tests.ttcn b/stp/STP_Tests.ttcn
index 82bc03b..032a900 100644
--- a/stp/STP_Tests.ttcn
+++ b/stp/STP_Tests.ttcn
@@ -156,6 +156,7 @@
f_init_m3ua();
f_init_ipa();

+   f_connect_ipa(3);
f_M3UA_asp_up_act(0, omit, omit); // TODO: rctx

/* send a well-formed, encoded SCCP message via M3UA */
@@ -169,7 +170,7 @@
f_M3UA_send(0, ts_M3UA_DATA(rctx_sender, tx_pd), 1);

/* expect to receive it via IPA */
-   f_IPA_exp(0, sccp_enc);
+   f_IPA_exp(3, sccp_enc);

f_clear_m3ua();
 }
@@ -181,12 +182,13 @@
var OCT4 pc_receiver := int2oct(23, 4);

f_init_common();
-   f_vty_config2(VTY, {"cs7 instance 0", "as mahlzeit ipa"},
+   f_vty_config2(VTY, {"cs7 instance 0", "as ipa-as-dynamic-asp ipa"},
  "point-code override patch-sccp disabled");

f_init_m3ua();
f_init_ipa();

+   f_connect_ipa(3);
f_M3UA_asp_up_act(0, omit, omit); // TODO: rctx

/* send a well-formed, encoded SCCP message via IPA */
@@ -195,7 +197,7 @@
var SCCP_PAR_Address calling := valueof(ts_SccpAddr_GT('5678'H));
var PDU_SCCP sccp := valueof(ts_SCCP_UDT(called, calling, data));
var octetstring sccp_enc := enc_PDU_SCCP(sccp);
-   f_IPA_send(0, sccp_enc);
+   f_IPA_send(3, sccp_enc);

/* expect to receive it via M3UA */
var template (present) M3UA_Protocol_Data rx_pd;
@@ -212,12 +214,13 @@
var OCT4 pc_receiver := int2oct(23, 4);

f_init_common();
-   f_vty_config2(VTY, {"cs7 instance 0", "as mahlzeit ipa"},
+   f_vty_config2(VTY, {"cs7 instance 0", "as ipa-as-dynamic-asp ipa"},
"point-code override patch-sccp both");

f_init_m3ua();
f_init_ipa();

+   f_connect_ipa(3);
f_M3UA_asp_up_act(0, omit, omit); // TODO: rctx

/* send a well-formed, encoded SCCP message via IPA */
@@ -225,7 +228,7 @@
var SCCP_PAR_Address called := valueof(ts_SccpAddr_GT('1234'H));
var SCCP_PAR_Address calling := valueof(ts_SccpAddr_GT('5678'H));
var PDU_SCCP sccp := valueof(ts_SCCP_UDT(called, calling, data));
-   f_IPA_send(0, enc_PDU_SCCP(sccp));
+   f_IPA_send(3, enc_PDU_SCCP(sccp));

/* patch point codes into addresses */
called := valueof(ts_SccpAddr_PC_GT(oct2int(pc_receiver), '83'O, 
"mtp3_itu", '1234'H));
diff --git a/stp/STP_Tests_IPA.ttcn b/stp/STP_Tests_IPA.ttcn
index 0a36921..f7273dc 100644
--- a/stp/STP_Tests_IPA.ttcn
+++ b/stp/STP_Tests_IPA.ttcn
@@ -33,11 +33,18 @@

 import from STP_Tests_Common all;

-private const integer NR_IPA := 1;
+private const integer NR_IPA := 4;
+
+type record of charstring AspNameArray;

 modulepar {
integer mp_stp_ipa_port := 5000;
integer mp_local_ipa_port := 2;
+   AspNameArray mp_ipa_as_names := {"ipa-as-loadshare-sender",
+"ipa-as-loadshare-receiver",
+"ipa-as-loadshare-receiver",
+"ipa-as-dynamic-asp"
+};
 }

 type component IPA_CT extends Test_CT {
@@ -45,6 +52,7 @@
 * having to re-invent IPA CCM handling here */
port MTP3asp_PT IPA[NR_IPA];
var IPA_Emulation_CT vc_IPA[NR_IPA];
+   var IPA_CCM_Parameters g_ccm_pars[NR_IPA];
 }

 friend function f_IPA_send(integer idx, octetstring data) runs on IPA_CT {
@@ -53,7 +61,6 @@
 }

 friend function f_IPA_exp(integer idx, template (present) octetstring data) 
runs on IPA_CT {
-   var M3UA_RecvFrom rx;
alt {
[] IPA[idx].receive(t_ASP_MTP3_TRANSFERind(?, ?, ?, ?, data)) {
setverdict(pass);
@@ -65,6 +72,23 @@
}
 }

+private function f_rnd_ipa_len() runs on IPA_CT return integer {
+   var integer rnd_len := f_rnd_int(100);
+   /* We need at least 1 byte of data, othewise osmocom IPA stack will 
discard and close the socket */
+   if (rnd_len == 0) {
+   rnd_len := 1;
+   }
+   return rnd_len;
+}
+
+/* Test if traffic is routed from idx_tx to idx_rx */

Change in osmo-ttcn3-hacks[master]: stp: Move logic to create unknwon dynamic ASP to f_connect_ipa()

2019-11-13 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16044 )

Change subject: stp: Move logic to create unknwon dynamic ASP to f_connect_ipa()
..

stp: Move logic to create unknwon dynamic ASP to f_connect_ipa()

This type of scenario is used in several tests and will be used in more
tests in the future, so let's move there for easiness.

Change-Id: Ic65ff2ff9dc3cc82ae3fefcf3caf406279cd6b97
---
M stp/STP_Tests_IPA.ttcn
1 file changed, 11 insertions(+), 11 deletions(-)

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



diff --git a/stp/STP_Tests_IPA.ttcn b/stp/STP_Tests_IPA.ttcn
index 946a950..beb2aa9 100644
--- a/stp/STP_Tests_IPA.ttcn
+++ b/stp/STP_Tests_IPA.ttcn
@@ -106,9 +106,15 @@
}
 }

-friend function f_connect_ipa(integer idx) runs on IPA_CT {
+friend function f_connect_ipa(integer idx, boolean use_unknown_asp_port := 
false) runs on IPA_CT {
+   var integer port_offset := 0;
+   if (use_unknown_asp_port) {
+   /* Add 100 to the port since we know that port is not 
configured in any
+ ASP only up to NR_IPA are configured. */
+   port_offset := 100;
+   }
vc_IPA[idx].start(IPA_Emulation.main_client(mp_stp_ip, mp_stp_ipa_port, 
mp_local_ip,
-   mp_local_ipa_port+idx, g_ccm_pars[idx]));
+   mp_local_ipa_port + idx + port_offset, 
g_ccm_pars[idx]));
 }


@@ -118,10 +124,7 @@
f_vty_config2(VTY, {"cs7 instance 0", "listen ipa 5000"},
  "accept-asp-connections pre-configured");
f_init_ipa();
-   /* Add 100 to the port since we know that port is not configured in any
- ASP only up to NR_IPA are configured. */
-   vc_IPA[0].start(IPA_Emulation.main_client(mp_stp_ip, mp_stp_ipa_port, 
mp_local_ip,
-   mp_local_ipa_port+100, g_ccm_pars[0]));
+   f_connect_ipa(0, true);
f_sleep(1.0);
if (IPA[0].checkstate("Connected")) {
setverdict(fail, "Expected IPA port to be disconnected");
@@ -139,7 +142,7 @@
f_vty_config2(VTY, {"cs7 instance 0", "listen ipa 5000"},
  "accept-asp-connections pre-configured");
f_init_ipa();
-   f_connect_ipa(0);
+   f_connect_ipa(0, false);
f_sleep(1.0);
if (not IPA[0].checkstate("Connected")) {
setverdict(fail, "Expected IPA port to be connected");
@@ -156,10 +159,7 @@
 testcase TC_unknown_client_dynamic() runs on IPA_CT {
f_init_common();
f_init_ipa();
-   /* Add 100 to the port since we know that port is not configured in any
- ASP only up to NR_IPA are configured. */
-   vc_IPA[0].start(IPA_Emulation.main_client(mp_stp_ip, mp_stp_ipa_port, 
mp_local_ip,
-   mp_local_ipa_port+100, g_ccm_pars[0]));
+   f_connect_ipa(0, true);
f_sleep(1.0);
if (not IPA[0].checkstate("Connected")) {
setverdict(fail, "Expected IPA port to be connected");

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

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


Change in osmo-ttcn3-hacks[master]: stp: Refactor STP_Tests_IPA tests and introduce new TC_tmt_loadshare

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

Change subject: stp: Refactor STP_Tests_IPA tests and introduce new 
TC_tmt_loadshare
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iae213c58598cc0207503fd10f09d2d57aab941fe
Gerrit-Change-Number: 16042
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 13 Nov 2019 16:38:03 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in docker-playground[master]: Update ttcn3-*/jenkins.sh to log stdout+stderr of process to log file

2019-11-13 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/16064 )

Change subject: Update ttcn3-*/jenkins.sh to log stdout+stderr of process to 
log file
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16064
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I3d9f6de638dbc07391a32c6a0cbd469dc5adf2b5
Gerrit-Change-Number: 16064
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 13 Nov 2019 16:37:29 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in docker-playground[master]: Update osmo-*/Dockerfile to log stdout+stderr of process to log file

2019-11-13 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/16063 )

Change subject: Update osmo-*/Dockerfile to log stdout+stderr of process to log 
file
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16063
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I9493ff73ef27c7c6d32b00cf827704b3f9cbf86a
Gerrit-Change-Number: 16063
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 13 Nov 2019 16:37:23 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: HACK: make IPA_Emulation work as IPA client to OsmoSTP

2019-11-13 Thread laforge
laforge has abandoned this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15821 )

Change subject: HACK: make IPA_Emulation work as IPA client to OsmoSTP
..


Abandoned

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I7def6090ff95bc868cfc238d56bdb204707108a0
Gerrit-Change-Number: 15821
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Assignee: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-MessageType: abandon


Change in osmo-ccid-firmware[master]: Makefile: Add 'make mrproper' for removing all bin/elf/etc output files

2019-11-13 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16057 )

Change subject: Makefile: Add 'make mrproper' for removing all bin/elf/etc 
output files
..


Patch Set 2: Verified+1


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

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I01e4b3f0224977fd38ed126f37f33ac9324f5abc
Gerrit-Change-Number: 16057
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 13 Nov 2019 16:33:55 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ccid-firmware[master]: sysmoOCTSIM: Proper Makefile targets

2019-11-13 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16056 )

Change subject: sysmoOCTSIM: Proper Makefile targets
..

sysmoOCTSIM: Proper Makefile targets

It's really bad practsie to generate different output files from one
target, which breaks dependency generation and the like.  Let's have
separate Makefile targets for each output file we generate, all
depending on the .elf file.

Change-Id: Ie83722a9b61cfcd9865950ab4c088f59a15427ba
---
M sysmoOCTSIM/gcc/Makefile
1 file changed, 18 insertions(+), 7 deletions(-)

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



diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile
index c587fdd..595fd62 100644
--- a/sysmoOCTSIM/gcc/Makefile
+++ b/sysmoOCTSIM/gcc/Makefile
@@ -153,7 +153,13 @@
 vpath %.S ../

 # All Target
-all: $(SUB_DIRS) $(OUTPUT_FILE_PATH) sysmoOCTSIM.elf sysmoOCTSIM.bin
+all: $(SUB_DIRS) elf bin ihex eep lss
+
+elf: $(OUTPUT_FILE_NAME).elf sysmoOCTSIM.elf
+bin: $(OUTPUT_FILE_NAME).bin sysmoOCTSIM.bin
+ihex: $(OUTPUT_FILE_NAME).ihex
+eep: $(OUTPUT_FILE_NAME).eep
+lss: $(OUTPUT_FILE_NAME).lss

 # Linker target

@@ -167,13 +173,18 @@
 -L"../gcc/gcc"
@echo Finished building target: $@

-   $(OBJCOPY) -O binary "$(OUTPUT_FILE_NAME).elf" "$(OUTPUT_FILE_NAME).bin"
-   $(OBJCOPY) -O ihex -R .eeprom -R .fuse -R .lock -R .signature  \
-   "$(OUTPUT_FILE_NAME).elf" "$(OUTPUT_FILE_NAME).hex"
+%.bin: %.elf
+   $(OBJCOPY) -O binary $< $@
+
+%.ihex: %.elf
+   $(OBJCOPY) -O ihex -R .eeprom -R .fuse -R .lock -R .signature $< $@
+
+%.eep: %.elf
$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom=alloc,load 
--change-section-lma \
-   .eeprom=0 --no-change-warnings -O binary 
"$(OUTPUT_FILE_NAME).elf" \
-   "$(OUTPUT_FILE_NAME).eep" || exit 0
-   $(OBJDUMP) -h -S "$(OUTPUT_FILE_NAME).elf" > "$(OUTPUT_FILE_NAME).lss"
+   .eeprom=0 --no-change-warnings -O binary $< $@ || exit 0
+
+%.lss: %.elf
+   $(OBJDUMP) -h -S $< > $@
$(SIZE) "$(OUTPUT_FILE_NAME).elf"

 sysmoOCTSIM.elf: $(OUTPUT_FILE_PATH)

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

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: Ie83722a9b61cfcd9865950ab4c088f59a15427ba
Gerrit-Change-Number: 16056
Gerrit-PatchSet: 3
Gerrit-Owner: laforge 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in osmo-ccid-firmware[master]: Makefile: Add 'make mrproper' for removing all bin/elf/etc output files

2019-11-13 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16057 )

Change subject: Makefile: Add 'make mrproper' for removing all bin/elf/etc 
output files
..

Makefile: Add 'make mrproper' for removing all bin/elf/etc output files

Change-Id: I01e4b3f0224977fd38ed126f37f33ac9324f5abc
---
M sysmoOCTSIM/gcc/Makefile
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved; Verified
  Hoernchen: Looks good to me, but someone else must approve



diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile
index d98277a..c587fdd 100644
--- a/sysmoOCTSIM/gcc/Makefile
+++ b/sysmoOCTSIM/gcc/Makefile
@@ -223,3 +223,6 @@
rm -f $(OUTPUT_FILE_NAME).a $(OUTPUT_FILE_NAME).hex 
$(OUTPUT_FILE_NAME).bin \
 $(OUTPUT_FILE_NAME).lss $(OUTPUT_FILE_NAME).eep 
$(OUTPUT_FILE_NAME).map \
 $(OUTPUT_FILE_NAME).srec
+
+mrproper: clean
+   rm -f *.o *.d *.a *.elf *.bin *.ihex *.eep *.lss *.map *.srec

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

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I01e4b3f0224977fd38ed126f37f33ac9324f5abc
Gerrit-Change-Number: 16057
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in osmo-ccid-firmware[master]: Makefile: Add 'make mrproper' for removing all bin/elf/etc output files

2019-11-13 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16057 )

Change subject: Makefile: Add 'make mrproper' for removing all bin/elf/etc 
output files
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I01e4b3f0224977fd38ed126f37f33ac9324f5abc
Gerrit-Change-Number: 16057
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 13 Nov 2019 16:33:41 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ccid-firmware[master]: sysmoOCTSIM: Proper Makefile targets

2019-11-13 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16056 )

Change subject: sysmoOCTSIM: Proper Makefile targets
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: Ie83722a9b61cfcd9865950ab4c088f59a15427ba
Gerrit-Change-Number: 16056
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 13 Nov 2019 16:33:39 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ccid-firmware[master]: ccid_device: Fix memory leaks in ccid_handle_out() error paths

2019-11-13 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16035 )

Change subject: ccid_device: Fix memory leaks in ccid_handle_out() error paths
..

ccid_device: Fix memory leaks in ccid_handle_out() error paths

Change-Id: I7c5e916992a7b55ca1ab006759c1f5c62b759d57
---
M ccid_common/ccid_device.c
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/ccid_common/ccid_device.c b/ccid_common/ccid_device.c
index 049b1cf..8183b16 100644
--- a/ccid_common/ccid_device.c
+++ b/ccid_common/ccid_device.c
@@ -644,6 +644,7 @@

if (len < sizeof(*ch)) {
/* FIXME */
+   msgb_free(msg);
return -1;
}

@@ -652,6 +653,7 @@
if (!cs) {
LOGPCI(ci, LOGL_ERROR, "Invalid bSlot %u\n", ch->bSlot);
resp = gen_err_resp(ch->bMessageType, ch->bSlot, 
CCID_ICC_STATUS_NO_ICC, ch->bSeq, 5);
+   msgb_free(msg);
return ccid_send(ci, resp);
}

@@ -661,6 +663,7 @@
/* FIXME: ABORT logic as per section 5.3.1 of CCID Spec v1.1 */
resp = gen_err_resp(ch->bMessageType, ch->bSlot, 
get_icc_status(cs), ch->bSeq,
CCID_ERR_CMD_SLOT_BUSY);
+   msgb_free(msg);
return ccid_send(ci, resp);
}


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

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I7c5e916992a7b55ca1ab006759c1f5c62b759d57
Gerrit-Change-Number: 16035
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in osmo-ccid-firmware[master]: sysmoOCTSIM: Proper Makefile targets

2019-11-13 Thread laforge
Hello Jenkins Builder, Hoernchen,

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

https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16056

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

Change subject: sysmoOCTSIM: Proper Makefile targets
..

sysmoOCTSIM: Proper Makefile targets

It's really bad practsie to generate different output files from one
target, which breaks dependency generation and the like.  Let's have
separate Makefile targets for each output file we generate, all
depending on the .elf file.

Change-Id: Ie83722a9b61cfcd9865950ab4c088f59a15427ba
---
M sysmoOCTSIM/gcc/Makefile
1 file changed, 18 insertions(+), 7 deletions(-)


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

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: Ie83722a9b61cfcd9865950ab4c088f59a15427ba
Gerrit-Change-Number: 16056
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset


Change in osmo-ccid-firmware[master]: sysmoOCTSIM: Create symlinks of last-built .bin and .elf

2019-11-13 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16039 )

Change subject: sysmoOCTSIM: Create symlinks of last-built .bin and .elf
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I6046069dd74e8a6f9461d3089259bbd90425c1c4
Gerrit-Change-Number: 16039
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 13 Nov 2019 16:27:08 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ccid-firmware[master]: main: Add missing #include to osmocom/timer.h

2019-11-13 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16036 )

Change subject: main: Add missing #include to osmocom/timer.h
..

main: Add missing #include to osmocom/timer.h

Change-Id: I9a062fbe9e0f25e45e9321048d8cbdecd4c49076
---
M sysmoOCTSIM/main.c
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c
index 6e2d6ac..15e2004 100644
--- a/sysmoOCTSIM/main.c
+++ b/sysmoOCTSIM/main.c
@@ -24,6 +24,7 @@
 #include 
 
 #include 
+#include 

 #include 
 #include 

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

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I9a062fbe9e0f25e45e9321048d8cbdecd4c49076
Gerrit-Change-Number: 16036
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in osmo-ccid-firmware[master]: sysmoOCTSIM: Create symlinks of last-built .bin and .elf

2019-11-13 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16039 )

Change subject: sysmoOCTSIM: Create symlinks of last-built .bin and .elf
..

sysmoOCTSIM: Create symlinks of last-built .bin and .elf

Change-Id: I6046069dd74e8a6f9461d3089259bbd90425c1c4
---
M sysmoOCTSIM/gcc/Makefile
1 file changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile
index 3d89b25..d98277a 100644
--- a/sysmoOCTSIM/gcc/Makefile
+++ b/sysmoOCTSIM/gcc/Makefile
@@ -153,7 +153,7 @@
 vpath %.S ../

 # All Target
-all: $(SUB_DIRS) $(OUTPUT_FILE_PATH)
+all: $(SUB_DIRS) $(OUTPUT_FILE_PATH) sysmoOCTSIM.elf sysmoOCTSIM.bin

 # Linker target

@@ -176,6 +176,11 @@
$(OBJDUMP) -h -S "$(OUTPUT_FILE_NAME).elf" > "$(OUTPUT_FILE_NAME).lss"
$(SIZE) "$(OUTPUT_FILE_NAME).elf"

+sysmoOCTSIM.elf: $(OUTPUT_FILE_PATH)
+   ln -sf $(OUTPUT_FILE_NAME).elf $@
+
+sysmoOCTSIM.bin: $(OUTPUT_FILE_PATH)
+   ln -sf $(OUTPUT_FILE_NAME).bin $@

 # Compiler targets


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

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I6046069dd74e8a6f9461d3089259bbd90425c1c4
Gerrit-Change-Number: 16039
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in osmo-ccid-firmware[master]: Add 'check_ccid_config.py' to test for USB VID/PID in libccid_Info.plist

2019-11-13 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16050 )

Change subject: Add 'check_ccid_config.py' to test for USB VID/PID in 
libccid_Info.plist
..

Add 'check_ccid_config.py' to test for USB VID/PID in libccid_Info.plist

Change-Id: I0399f03400b49d814825ca156ddb4824ec76ce0a
---
A sysmoOCTSIM/check_libccid_config.py
1 file changed, 60 insertions(+), 0 deletions(-)

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



diff --git a/sysmoOCTSIM/check_libccid_config.py 
b/sysmoOCTSIM/check_libccid_config.py
new file mode 100755
index 000..93cd202
--- /dev/null
+++ b/sysmoOCTSIM/check_libccid_config.py
@@ -0,0 +1,60 @@
+#!/usr/bin/python3
+
+# This script checks your libccid configuration file if it contains a matching 
entry
+# for the sysmoOCTSIM reader.  If not, it will generate a modified config file
+
+import plistlib, sys
+
+INFILE="/etc/libccid_Info.plist"
+OUTFILE="/tmp/libccid_Info.plist"
+
+VENDOR_ID=0x1d50
+PRODUCT_ID=0x6141
+NAME='sysmocom sysmoOCTSIM'
+
+def gen_reader_dictlist(prod_id, vend_id, names):
+readers = []
+for i in range(0,len(prod_id)):
+reader = {'vendor_id': vend_id[i], 'product_id': prod_id[i], 'name': 
names[i]}
+readers.append(reader)
+return readers
+
+def find_reader(readers, vend_id, prod_id):
+for r in readers:
+if int(r['vendor_id'], 16) == vend_id and int(r['product_id'], 16) == 
prod_id:
+return r
+return None
+
+def plist_add_reader(pl, vend_id, prod_id, name):
+pl['ifdVendorID'].append(hex(vend_id))
+pl['ifdProductID'].append(hex(prod_id))
+pl['ifdFriendlyName'].append(name)
+
+
+if len(sys.argv) > 1:
+INFILE = sys.argv[1]
+if len(sys.argv) > 2:
+OUTFILE = sys.argv[2]
+
+# read the property list
+print("Reading libccid config file at '%s'" % (INFILE))
+with open(INFILE, 'rb') as fp:
+pl = plistlib.load(fp)
+
+# consistency check
+if len(pl['ifdProductID']) != len(pl['ifdVendorID']) or 
len(pl['ifdProductID']) != len(pl['ifdFriendlyName']):
+print("input file is corrupt", file=sys.stderr)
+sys.exit(2)
+
+# convert into a better sorted form (one list of dicts; each dict one reader)
+readers = gen_reader_dictlist(pl['ifdProductID'], pl['ifdVendorID'], 
pl['ifdFriendlyName'])
+
+if find_reader(readers, VENDOR_ID, PRODUCT_ID):
+print("Matching reader already in libccid_Info.plist; no action required", 
file=sys.stderr)
+else:
+print("Reader not found in config file, it needs to be updated...")
+plist_add_reader(pl, VENDOR_ID, PRODUCT_ID, NAME)
+with open(OUTFILE, 'wb') as fp:
+plistlib.dump(pl, fp)
+print("Generated new config file stored as '%s'" % (OUTFILE))
+print("\tWARNING: The generated file doesn't preserve comments!")

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

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I0399f03400b49d814825ca156ddb4824ec76ce0a
Gerrit-Change-Number: 16050
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in osmo-ccid-firmware[master]: Avoid endless loop while printing debug uart ringbuffer

2019-11-13 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16055 )

Change subject: Avoid endless loop while printing debug uart ringbuffer
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I84bf6f47c785cfecec4764f7e86958103cf24f8a
Gerrit-Change-Number: 16055
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 13 Nov 2019 16:27:17 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ccid-firmware[master]: Avoid endless loop while printing debug uart ringbuffer

2019-11-13 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16055 )

Change subject: Avoid endless loop while printing debug uart ringbuffer
..

Avoid endless loop while printing debug uart ringbuffer

Change-Id: I84bf6f47c785cfecec4764f7e86958103cf24f8a
---
M sysmoOCTSIM/hal/src/hal_usart_async_rings.c
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/sysmoOCTSIM/hal/src/hal_usart_async_rings.c 
b/sysmoOCTSIM/hal/src/hal_usart_async_rings.c
index 38bdca4..704c6ab 100644
--- a/sysmoOCTSIM/hal/src/hal_usart_async_rings.c
+++ b/sysmoOCTSIM/hal/src/hal_usart_async_rings.c
@@ -321,7 +321,11 @@
ASSERT(descr && buf && length);

for (uint16_t i = 0; i < length; i++) {
-   while (ringbuffer_num(>tx) > descr->tx.size); // WARNING 
blocking until there is space in the buffer
+   /* HACK: disabling this to avoid getting stuck indefinitely.  
In theory, this while loop below
+* would exit at some point as the UART is supposedly 
transmitting data.  However, in some
+* situations it is not transmitting, and hence the condition 
becomes never true, waiting here
+* indefinitely.  We will now simply ovewrite old log data if 
it isn't sent fast enough */
+   //while (ringbuffer_num(>tx) > descr->tx.size); // 
WARNING blocking until there is space in the buffer
ringbuffer_put(>tx, buf[i]);
}
descr->stat = USART_ASYNC_RINGS_STATUS_BUSY;

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

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I84bf6f47c785cfecec4764f7e86958103cf24f8a
Gerrit-Change-Number: 16055
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in osmo-ccid-firmware[master]: Add 'check_ccid_config.py' to test for USB VID/PID in libccid_Info.plist

2019-11-13 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16050 )

Change subject: Add 'check_ccid_config.py' to test for USB VID/PID in 
libccid_Info.plist
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I0399f03400b49d814825ca156ddb4824ec76ce0a
Gerrit-Change-Number: 16050
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 13 Nov 2019 16:27:11 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ccid-firmware[master]: ccid_device: Fix memory leaks in ccid_handle_out() error paths

2019-11-13 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16035 )

Change subject: ccid_device: Fix memory leaks in ccid_handle_out() error paths
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I7c5e916992a7b55ca1ab006759c1f5c62b759d57
Gerrit-Change-Number: 16035
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 13 Nov 2019 16:27:03 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in docker-playground[master]: Update osmo-*/Dockerfile to log stdout+stderr of process to log file

2019-11-13 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/docker-playground/+/16063 )


Change subject: Update osmo-*/Dockerfile to log stdout+stderr of process to log 
file
..

Update osmo-*/Dockerfile to log stdout+stderr of process to log file

This way we get VTY parsing failures as well as backtraces upon process
crash.

Related: OS#4212
Change-Id: I9493ff73ef27c7c6d32b00cf827704b3f9cbf86a
---
M osmo-bsc-latest/Dockerfile
M osmo-bsc-master/Dockerfile
M osmo-bts-latest/Dockerfile
M osmo-bts-master/Dockerfile
M osmo-ggsn-latest/Dockerfile
M osmo-ggsn-latest/osmo-ggsn.cfg
M osmo-ggsn-master/Dockerfile
M osmo-ggsn-master/osmo-ggsn.cfg
M osmo-hlr-latest/Dockerfile
M osmo-hlr-master/Dockerfile
M osmo-hnbgw-latest/Dockerfile
M osmo-hnbgw-master/Dockerfile
M osmo-mgw-latest/Dockerfile
M osmo-mgw-latest/osmo-mgw.cfg
M osmo-mgw-master/Dockerfile
M osmo-msc-latest/Dockerfile
M osmo-msc-master/Dockerfile
M osmo-nitb-latest/Dockerfile
M osmo-nitb-master/Dockerfile
M osmo-remsim-latest/Dockerfile
M osmo-remsim-master/Dockerfile
M osmo-sgsn-latest/Dockerfile
M osmo-sgsn-master/Dockerfile
M osmo-sip-latest/Dockerfile
M osmo-sip-master/Dockerfile
M osmo-stp-latest/Dockerfile
M osmo-stp-latest/osmo-stp.cfg
M osmo-stp-master/Dockerfile
M osmo-stp-master/osmo-stp.cfg
29 files changed, 34 insertions(+), 133 deletions(-)



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

diff --git a/osmo-bsc-latest/Dockerfile b/osmo-bsc-latest/Dockerfile
index 1682dea..5206a08 100644
--- a/osmo-bsc-latest/Dockerfile
+++ b/osmo-bsc-latest/Dockerfile
@@ -29,6 +29,6 @@
 COPY   osmo-bsc.cfg /data/osmo-bsc.cfg

 WORKDIR/data
-CMD["/usr/bin/osmo-bsc", "-c", "/data/osmo-bsc.cfg"]
+CMD["/bin/sh", "-c", "/usr/bin/osmo-bsc -c /data/osmo-bsc.cfg 
>/data/osmo-bsc.log 2>&1"]

 EXPOSE 3003 3002 4242
diff --git a/osmo-bsc-master/Dockerfile b/osmo-bsc-master/Dockerfile
index 3c3f90a..75afbb7 100644
--- a/osmo-bsc-master/Dockerfile
+++ b/osmo-bsc-master/Dockerfile
@@ -44,6 +44,6 @@
 COPY   osmo-bsc.cfg /data/osmo-bsc.cfg

 WORKDIR/data
-CMD["/usr/local/bin/osmo-bsc"]
+CMD["/bin/sh", "-c", "/usr/local/bin/osmo-bsc -c /data/osmo-bsc.cfg 
>/data/osmo-bsc.log 2>&1"]

 #EXPOSE
diff --git a/osmo-bts-latest/Dockerfile b/osmo-bts-latest/Dockerfile
index 05dcb24..05c27fd 100644
--- a/osmo-bts-latest/Dockerfile
+++ b/osmo-bts-latest/Dockerfile
@@ -33,6 +33,6 @@

 WORKDIR/data
# send GSMTAP data to .230 which is the ttcn3-sysinfo test
-CMD["/usr/bin/osmo-bts-virtual", "-i", "172.18.0.230"]
+CMD["/bin/sh", "-c", "/usr/bin/osmo-bts-virtual -c /data/osmo-bts.cfg -i 
172.18.0.230 >>/data/osmo-bts-virtual.log 2>&1"]

-#EXPOSE
+#EXPOSE
diff --git a/osmo-bts-master/Dockerfile b/osmo-bts-master/Dockerfile
index a7f1145..b73f2ac 100644
--- a/osmo-bts-master/Dockerfile
+++ b/osmo-bts-master/Dockerfile
@@ -46,6 +46,6 @@
 
 WORKDIR/data
# send GSMTAP data to .230 which is the ttcn3-sysinfo test
-CMD["/usr/local/bin/osmo-bts-virtual", "-i", "172.18.0.230"]
+CMD["/bin/sh", "-c", "/usr/local/bin/osmo-bts-virtual -c 
/data/osmo-bts.cfg -i 172.18.0.230 >>/data/osmo-bts-virtual.log 2>&1"]

-#EXPOSE
+#EXPOSE
diff --git a/osmo-ggsn-latest/Dockerfile b/osmo-ggsn-latest/Dockerfile
index c1ff3dc..5259d51 100644
--- a/osmo-ggsn-latest/Dockerfile
+++ b/osmo-ggsn-latest/Dockerfile
@@ -27,6 +27,6 @@
 COPY   osmo-ggsn.cfg /data/osmo-ggsn.cfg

 WORKDIR/data
-CMD["/usr/bin/osmo-ggsn"]
+CMD["/bin/sh", "-c", "/usr/bin/osmo-ggsn -c /data/osmo-ggsn.cfg 
>/data/osmo-ggsn.log 2>&1"]

 EXPOSE 3386/udp 2123/udp 2152/udp 4257/tcp 4260/tcp
diff --git a/osmo-ggsn-latest/osmo-ggsn.cfg b/osmo-ggsn-latest/osmo-ggsn.cfg
index 5337ac8..59a1c9c 100644
--- a/osmo-ggsn-latest/osmo-ggsn.cfg
+++ b/osmo-ggsn-latest/osmo-ggsn.cfg
@@ -2,38 +2,11 @@
 ! OpenGGSN (0.94.1-adac) configuration saved from vty
 !!
 !
-log file /data/openggsn.log
- logging filter all 1
- logging color 0
- logging print category 1
- logging timestamp 1
- logging level ip info
- logging level tun info
- logging level ggsn info
- logging level sgsn notice
- logging level icmp6 debug
- logging level lglobal notice
- logging level llapd notice
- logging level linp notice
- logging level lmux notice
- logging level lmi notice
- logging level lmib notice
- logging level lsms notice
- logging level lctrl notice
- logging level lgtp info
- logging level lstats notice
- logging level lgsup notice
- logging level loap notice
- logging level lss7 notice
- logging level lsccp notice
- logging level lsua notice
- logging level lm3ua notice
- logging level lmgcp notice
 log stderr
  logging filter all 1
  logging color 1
- logging print category 0
- logging timestamp 0
+ logging print category 1
+ logging timestamp 1
  logging level ip info
  logging level tun info
  logging level ggsn info
diff --git a/osmo-ggsn-master/Dockerfile 

Change in osmo-ccid-firmware[master]: Avoid endless loop while printing debug uart ringbuffer

2019-11-13 Thread Hoernchen
Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16055 )

Change subject: Avoid endless loop while printing debug uart ringbuffer
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I84bf6f47c785cfecec4764f7e86958103cf24f8a
Gerrit-Change-Number: 16055
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Wed, 13 Nov 2019 16:09:56 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ccid-firmware[master]: main: Add missing #include to osmocom/timer.h

2019-11-13 Thread Hoernchen
Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16036 )

Change subject: main: Add missing #include to osmocom/timer.h
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I9a062fbe9e0f25e45e9321048d8cbdecd4c49076
Gerrit-Change-Number: 16036
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Wed, 13 Nov 2019 16:10:12 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ccid-firmware[master]: Makefile: Add 'make mrproper' for removing all bin/elf/etc output files

2019-11-13 Thread Hoernchen
Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16057 )

Change subject: Makefile: Add 'make mrproper' for removing all bin/elf/etc 
output files
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I01e4b3f0224977fd38ed126f37f33ac9324f5abc
Gerrit-Change-Number: 16057
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Wed, 13 Nov 2019 16:08:58 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ccid-firmware[master]: ccid_device: Fix memory leaks in ccid_handle_out() error paths

2019-11-13 Thread Hoernchen
Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16035 )

Change subject: ccid_device: Fix memory leaks in ccid_handle_out() error paths
..


Patch Set 2: Code-Review+1


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

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I7c5e916992a7b55ca1ab006759c1f5c62b759d57
Gerrit-Change-Number: 16035
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Wed, 13 Nov 2019 16:12:43 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ccid-firmware[master]: Add 'check_ccid_config.py' to test for USB VID/PID in libccid_Info.plist

2019-11-13 Thread Hoernchen
Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16050 )

Change subject: Add 'check_ccid_config.py' to test for USB VID/PID in 
libccid_Info.plist
..


Patch Set 2: Code-Review+1


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

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I0399f03400b49d814825ca156ddb4824ec76ce0a
Gerrit-Change-Number: 16050
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Wed, 13 Nov 2019 16:13:08 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ccid-firmware[master]: sysmoOCTSIM: Create symlinks of last-built .bin and .elf

2019-11-13 Thread Hoernchen
Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16039 )

Change subject: sysmoOCTSIM: Create symlinks of last-built .bin and .elf
..


Patch Set 2: Code-Review+1


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

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I6046069dd74e8a6f9461d3089259bbd90425c1c4
Gerrit-Change-Number: 16039
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Wed, 13 Nov 2019 16:11:39 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in docker-playground[master]: Update ttcn3-*/jenkins.sh to log stdout+stderr of process to log file

2019-11-13 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/docker-playground/+/16064 )


Change subject: Update ttcn3-*/jenkins.sh to log stdout+stderr of process to 
log file
..

Update ttcn3-*/jenkins.sh to log stdout+stderr of process to log file

This way we get VTY parsing failures as well as backtraces upon process
crash.

Related: OS#4212
Change-Id: I3d9f6de638dbc07391a32c6a0cbd469dc5adf2b5
---
M ttcn3-bsc-test/jenkins-sccplite.sh
M ttcn3-bsc-test/jenkins.sh
M ttcn3-bsc-test/osmo-bsc.cfg
M ttcn3-bsc-test/osmo-stp.cfg
M ttcn3-bsc-test/sccplite/osmo-bsc.cfg
M ttcn3-bscnat-test/jenkins.sh
M ttcn3-bscnat-test/osmo-bsc-nat.cfg
M ttcn3-bts-test/jenkins.sh
M ttcn3-bts-test/oml/osmo-bts.cfg
M ttcn3-bts-test/osmo-bsc.cfg
M ttcn3-bts-test/osmo-bts.cfg
M ttcn3-bts-test/virtphy/osmo-bts.cfg
M ttcn3-ggsn-test/osmo-ggsn.cfg
M ttcn3-hlr-test/jenkins.sh
M ttcn3-hlr-test/osmo-hlr.cfg
M ttcn3-mgw-test/osmo-mgw.cfg
M ttcn3-msc-test/jenkins.sh
M ttcn3-msc-test/osmo-msc.cfg
M ttcn3-msc-test/osmo-stp.cfg
M ttcn3-pcu-test/jenkins-sns.sh
M ttcn3-pcu-test/jenkins.sh
M ttcn3-pcu-test/osmo-pcu.cfg
M ttcn3-pcu-test/sns/osmo-pcu.cfg
M ttcn3-remsim-test/jenkins.sh
M ttcn3-sgsn-test/jenkins.sh
M ttcn3-sgsn-test/osmo-sgsn.cfg
M ttcn3-sgsn-test/osmo-stp.cfg
M ttcn3-sip-test/jenkins.sh
M ttcn3-sip-test/osmo-sip-connector.cfg
M ttcn3-stp-test/osmo-stp.cfg
30 files changed, 50 insertions(+), 138 deletions(-)



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

diff --git a/ttcn3-bsc-test/jenkins-sccplite.sh 
b/ttcn3-bsc-test/jenkins-sccplite.sh
index 0a2ff8b..ae62dc5 100755
--- a/ttcn3-bsc-test/jenkins-sccplite.sh
+++ b/ttcn3-bsc-test/jenkins-sccplite.sh
@@ -33,9 +33,7 @@
--network $NET_NAME --ip 172.18.12.10$i \
--name ${BUILD_TAG}-bts$i -d \
$REPO_USER/osmo-bts-$IMAGE_SUFFIX \
-   /usr/local/bin/respawn.sh \
-   osmo-bts-omldummy \
-   172.18.12.20 $((i + 1234)) 1
+   /bin/sh -c "/usr/local/bin/respawn.sh osmo-bts-omldummy 
172.18.2.20 $((i + 1234)) 1 >>/data/osmo-bts-omldummy-${i}.log 2>&1"
 done

 echo Starting container with BSC testsuite
diff --git a/ttcn3-bsc-test/jenkins.sh b/ttcn3-bsc-test/jenkins.sh
index af5c965..3455dc1 100755
--- a/ttcn3-bsc-test/jenkins.sh
+++ b/ttcn3-bsc-test/jenkins.sh
@@ -41,8 +41,7 @@
--network $NET_NAME --ip 172.18.2.10$i \
--name ${BUILD_TAG}-bts$i -d \
$REPO_USER/osmo-bts-$IMAGE_SUFFIX \
-   /usr/local/bin/respawn.sh \
-   osmo-bts-omldummy 172.18.2.20 $((i + 1234)) 1
+   /bin/sh -c "/usr/local/bin/respawn.sh osmo-bts-omldummy 
172.18.2.20 $((i + 1234)) 1 >>/data/osmo-bts-omldummy-${i}.log 2>&1"
 done

 echo Starting container with BSC testsuite
diff --git a/ttcn3-bsc-test/osmo-bsc.cfg b/ttcn3-bsc-test/osmo-bsc.cfg
index beee66b..4f8fdc2 100644
--- a/ttcn3-bsc-test/osmo-bsc.cfg
+++ b/ttcn3-bsc-test/osmo-bsc.cfg
@@ -7,9 +7,9 @@
  logging level set-all debug
  logging filter all 1
 !
-log file /data/osmo-bsc.log
+log stderr
  logging filter all 1
- logging color 0
+ logging color 1
  logging print category 1
  logging timestamp 1
  logging print extended-timestamp 1
diff --git a/ttcn3-bsc-test/osmo-stp.cfg b/ttcn3-bsc-test/osmo-stp.cfg
index cc734d4..9102114 100644
--- a/ttcn3-bsc-test/osmo-stp.cfg
+++ b/ttcn3-bsc-test/osmo-stp.cfg
@@ -6,9 +6,9 @@
  logging level set-all debug
  logging filter all 1
 !
-log file /data/osmo-stp.log
+log stderr
  logging filter all 1
- logging color 0
+ logging color 1
  logging print category 1
  logging timestamp 1
  logging print extended-timestamp 1
diff --git a/ttcn3-bsc-test/sccplite/osmo-bsc.cfg 
b/ttcn3-bsc-test/sccplite/osmo-bsc.cfg
index 326a5c0..3519d3e 100644
--- a/ttcn3-bsc-test/sccplite/osmo-bsc.cfg
+++ b/ttcn3-bsc-test/sccplite/osmo-bsc.cfg
@@ -7,7 +7,7 @@
  logging level set-all debug
  logging filter all 1
 !
-log file /data/osmo-bsc.log
+log stderr
  logging filter all 1
  logging color 1
  logging print category 1
diff --git a/ttcn3-bscnat-test/jenkins.sh b/ttcn3-bscnat-test/jenkins.sh
index 61ea89b..d52e79a 100755
--- a/ttcn3-bscnat-test/jenkins.sh
+++ b/ttcn3-bscnat-test/jenkins.sh
@@ -23,7 +23,8 @@
--network $NET_NAME --ip 172.18.15.20 \
-v $VOL_BASE_DIR/bscnat:/data \
--name ${BUILD_TAG}-bscnat -d \
-   $REPO_USER/osmo-nitb-$IMAGE_SUFFIX osmo-bsc_nat -c 
/data/osmo-bsc-nat.cfg
+   $REPO_USER/osmo-nitb-$IMAGE_SUFFIX \
+   /bin/sh -c "osmo-bsc_nat -c /data/osmo-bsc-nat.cfg 
>/data/osmo-bsc-nat.log 2>&1"

 echo Starting container with BSCNAT testsuite
 docker run --rm \
diff --git a/ttcn3-bscnat-test/osmo-bsc-nat.cfg 
b/ttcn3-bscnat-test/osmo-bsc-nat.cfg
index 

Change in osmo-ccid-firmware[master]: sysmoOCTSIM: Proper Makefile targets

2019-11-13 Thread Hoernchen
Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16056 )

Change subject: sysmoOCTSIM: Proper Makefile targets
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: Ie83722a9b61cfcd9865950ab4c088f59a15427ba
Gerrit-Change-Number: 16056
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Wed, 13 Nov 2019 16:08:26 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: msc: overhaul voice call testing

2019-11-13 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938 )

Change subject: msc: overhaul voice call testing
..


Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938/2/library/BSSMAP_Templates.ttcn
File library/BSSMAP_Templates.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938/2/library/BSSMAP_Templates.ttcn@a410
PS2, Line 410: template (value) BSSMAP_IE_AoIP_TransportLayerAddress 
ts_BSSMAP_IE_AoIP_TLA(BSSMAP_FIELD_IPAddress addr,
 :  
uint16_t udp_port,
 :  
integer len) := {
> this looks odd. […]
curious, maybe it's a typo of sorts, i'll check...

Now I know, we are lacking a tr_* variant of this and were somehow using the 
ts_* one for receiving an Assignment Request. I never noticed the ts_ name and 
assumed that the tr_ needs fixing. Adding a tr_.



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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I8b82476f55a98f7a94d5c4f1cd80eac427b2d20f
Gerrit-Change-Number: 15938
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Comment-Date: Wed, 13 Nov 2019 16:03:22 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


Change in libosmocore[master]: utils.h: add OSMO_NAME_C_IMPL() macro

2019-11-13 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/15957 )

Change subject: utils.h: add OSMO_NAME_C_IMPL() macro
..


Patch Set 7:

(1 comment)

https://gerrit.osmocom.org/c/libosmocore/+/15957/7/include/osmocom/core/utils.h
File include/osmocom/core/utils.h:

https://gerrit.osmocom.org/c/libosmocore/+/15957/7/include/osmocom/core/utils.h@313
PS7, Line 313:  _str = (char*)talloc_named_const(CTX, _len, __func__); \
> Why not implementing talloc_realloz_size() with realloc() in pseudotalloc?
because pseudotalloc doesn't know the size of the allocated buffer.



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322
Gerrit-Change-Number: 15957
Gerrit-PatchSet: 7
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Wed, 13 Nov 2019 15:47:01 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: neels 
Gerrit-MessageType: comment


Change in libosmocore[master]: utils.h: add OSMO_NAME_C_IMPL() macro

2019-11-13 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/15957 )

Change subject: utils.h: add OSMO_NAME_C_IMPL() macro
..


Patch Set 7:

(1 comment)

https://gerrit.osmocom.org/c/libosmocore/+/15957/7/include/osmocom/core/utils.h
File include/osmocom/core/utils.h:

https://gerrit.osmocom.org/c/libosmocore/+/15957/7/include/osmocom/core/utils.h@313
PS7, Line 313:  _str = (char*)talloc_named_const(CTX, _len, __func__); \
> because pseudotalloc doesn't know the size of the allocated buffer.
hmm, now that I think of it, realloc() would work.
But this is much simpler, particularly because we don't need to preserve the 
data in the buffer.
A realloc would require the OS to keep the data intact, so free and new alloc 
is actually my favorite now anyway.



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322
Gerrit-Change-Number: 15957
Gerrit-PatchSet: 7
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Wed, 13 Nov 2019 15:49:46 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: neels 
Gerrit-MessageType: comment


Change in libosmocore[master]: osmo_sockaddr_str: fix 32bit addr mixup of host/network byte order

2019-11-13 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/16030 )

Change subject: osmo_sockaddr_str: fix 32bit addr mixup of host/network byte 
order
..


Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/c/libosmocore/+/16030/2/src/sockaddr_str.c
File src/sockaddr_str.c:

https://gerrit.osmocom.org/c/libosmocore/+/16030/2/src/sockaddr_str.c@409
PS2, Line 409: /*! Convert osmo_sockaddr_str address string to IPv4 address 
data in host-byte-order.
> The API (osmo_sockaddr_str_to_32n) was already defined correctly, since it 
> states it converted from  […]
no, that is not an option. osmo_sockaddr_str_to_32n() is already being used in 
programs. Regardless of what the API doc said and what I was thinking when 
using that function, if we modify the effect of this function, then we break 
those other programs. They are using host-byte-order and they need 
host-byte-order, and are calling osmo_sockaddr_str_{to,from}_32n() to obtain 
that. They should move to *_32h() whenever ready, we cannot change the behavior 
of this function without renaming.

osmo_sockaddr_str_to_32() already does network byte order correctly.
There we can just fix the API doc, because it remains ABI compatible.

Actually almost no-one anywhere needs host byte order, except our MNCC socket 
it seems.
I wish I had never added _32n()... but now that it's there, I followed through 
with the _32h() version.
(should be just deprecate without replacement instead?)



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3cf150cc0cc06dd36039fbde091bc71b01697322
Gerrit-Change-Number: 16030
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 13 Nov 2019 15:45:50 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: stp: Refactor STP_Tests_IPA tests and introduce new TC_tmt_loadshare

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

Change subject: stp: Refactor STP_Tests_IPA tests and introduce new 
TC_tmt_loadshare
..


Patch Set 1:

> Patch Set 1: Code-Review+1
>
> you removed "mahlzeit". outrageous!

Sorry for that, I decided changing it to have more descriptive names, otherwise 
it's becoming too messy :)


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iae213c58598cc0207503fd10f09d2d57aab941fe
Gerrit-Change-Number: 16042
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 13 Nov 2019 12:30:57 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bts[master]: Unify common and bts-trx power control loop VTY command

2019-11-13 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/16058 )


Change subject: Unify common and bts-trx power control loop VTY command
..

Unify common and bts-trx power control loop VTY command

osmotrx specific commands are marked as deprecated and their
implementation changed to set the common code variables. osmo-bts-trx
specific power control loop code is also changed to use the common
variables.

Related: OS#1851
Change-Id: I8fb310b2aee7780982bd9394bc5e758dfd66be25
---
M doc/examples/trx/osmo-bts-trx-calypso.cfg
M include/osmo-bts/phy_link.h
M src/osmo-bts-trx/loops.c
M src/osmo-bts-trx/main.c
M src/osmo-bts-trx/trx_vty.c
5 files changed, 17 insertions(+), 22 deletions(-)



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

diff --git a/doc/examples/trx/osmo-bts-trx-calypso.cfg 
b/doc/examples/trx/osmo-bts-trx-calypso.cfg
index 6b52fd2..d8cddbd 100644
--- a/doc/examples/trx/osmo-bts-trx-calypso.cfg
+++ b/doc/examples/trx/osmo-bts-trx-calypso.cfg
@@ -26,7 +26,6 @@
  osmotrx ip local 127.0.0.1
  osmotrx ip remote 127.0.0.1
  osmotrx timing-advance-loop
- osmotrx ms-power-loop -65
  osmotrx legacy-setbsic
 bts 0
  oml remote-ip 127.0.0.1
@@ -36,3 +35,4 @@
  band 900
  trx 0
   phy 0 instance 0
+  uplink-power-target -65
diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h
index 316a1ba..b2e7c0e 100644
--- a/include/osmo-bts/phy_link.h
+++ b/include/osmo-bts/phy_link.h
@@ -45,8 +45,6 @@
uint16_t base_port_remote;
struct osmo_fd trx_ofd_clk;
bool trx_ta_loop;
-   bool trx_ms_power_loop;
-   int8_t trx_target_rssi;
uint32_t clock_advance;
uint32_t rts_advance;
bool use_legacy_setbsic;
diff --git a/src/osmo-bts-trx/loops.c b/src/osmo-bts-trx/loops.c
index b2b163a..70e566d 100644
--- a/src/osmo-bts-trx/loops.c
+++ b/src/osmo-bts-trx/loops.c
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 

@@ -147,7 +148,6 @@
 static void ms_power_clock(struct gsm_lchan *lchan, struct l1sched_chan_state 
*chan_state)
 {
struct gsm_bts_trx *trx = lchan->ts->trx;
-   struct phy_instance *pinst = trx_phy_instance(trx);
int rssi;
int i;

@@ -188,9 +188,9 @@
/* change RSSI */
LOGPLCHAN(lchan, DLOOP, LOGL_DEBUG, "Lowest RSSI: %d Target RSSI: %d 
Current "
"MS power: %d (%d dBm)\n", rssi,
-   pinst->phy_link->u.osmotrx.trx_target_rssi, 
lchan->ms_power_ctrl.current,
+   trx->bts->ul_power_target, lchan->ms_power_ctrl.current,
ms_pwr_dbm(trx->bts->band, lchan->ms_power_ctrl.current));
-   ms_power_diff(lchan, pinst->phy_link->u.osmotrx.trx_target_rssi - rssi);
+   ms_power_diff(lchan, trx->bts->ul_power_target - rssi);
 }


@@ -247,7 +247,7 @@
struct phy_instance *pinst = trx_phy_instance(l1t->trx);

/* if MS power control loop is enabled, handle it */
-   if (pinst->phy_link->u.osmotrx.trx_ms_power_loop)
+   if (trx_ms_pwr_ctrl_is_osmo(l1t->trx))
ms_power_val(lchan, chan_state, rssi);

/* if TA loop is enabled, handle it */
@@ -261,12 +261,11 @@
 {
struct gsm_lchan *lchan = >trx->ts[L1SAP_CHAN2TS(chan_nr)]
.lchan[l1sap_chan2ss(chan_nr)];
-   struct phy_instance *pinst = trx_phy_instance(l1t->trx);

if (lchan->ms_power_ctrl.fixed)
return;

-   if (pinst->phy_link->u.osmotrx.trx_ms_power_loop)
+   if (trx_ms_pwr_ctrl_is_osmo(l1t->trx))
ms_power_clock(lchan, chan_state);

/* count the number of SACCH clocks */
diff --git a/src/osmo-bts-trx/main.c b/src/osmo-bts-trx/main.c
index cf40ea3..b5841b0 100644
--- a/src/osmo-bts-trx/main.c
+++ b/src/osmo-bts-trx/main.c
@@ -124,6 +124,8 @@

 int bts_model_trx_init(struct gsm_bts_trx *trx)
 {
+   /* Enable software based algo for MS Power Control Loop: */
+   trx->ms_power_control = true;
return 0;
 }

@@ -136,8 +138,6 @@
plink->u.osmotrx.clock_advance = 20;
plink->u.osmotrx.rts_advance = 5;
plink->u.osmotrx.trx_ta_loop = true;
-   plink->u.osmotrx.trx_ms_power_loop = false;
-   plink->u.osmotrx.trx_target_rssi = -10;
/* attempt use newest TRXD version by default: */
plink->u.osmotrx.trxd_hdr_ver_max = TRX_DATA_FORMAT_VER;
 }
diff --git a/src/osmo-bts-trx/trx_vty.c b/src/osmo-bts-trx/trx_vty.c
index 86f5712..5c6aea3 100644
--- a/src/osmo-bts-trx/trx_vty.c
+++ b/src/osmo-bts-trx/trx_vty.c
@@ -160,26 +160,28 @@
return CMD_SUCCESS;
 }

-DEFUN(cfg_phy_ms_power_loop, cfg_phy_ms_power_loop_cmd,
+DEFUN_DEPRECATED(cfg_phy_ms_power_loop, cfg_phy_ms_power_loop_cmd,
"osmotrx ms-power-loop <-127-127>", 

Change in osmo-bts[master]: rsl: Remove unneeded duplicate reset on some lchan fields

2019-11-13 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/16061 )


Change subject: rsl: Remove unneeded duplicate reset on some lchan fields
..

rsl: Remove unneeded duplicate reset on some lchan fields

Both ms_power and ms_power_ctrl are reset to 0 again further below.

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



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

diff --git a/src/common/rsl.c b/src/common/rsl.c
index 9a4afb3..f88d2d7 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -997,9 +997,6 @@
 {
/* These values don't apply to PDCH, just clear them. Particularly the 
encryption must be
 * cleared, or we would enable encryption on PDCH with parameters 
remaining from the TCH. */
-   lchan->ms_power = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0);
-   lchan->ms_power_ctrl.current = lchan->ms_power;
-   lchan->ms_power_ctrl.fixed = false;
lchan->rsl_cmode = 0;
lchan->tch_mode = 0;
memset(>encr, 0, sizeof(lchan->encr));

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

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


Change in osmo-bts[master]: Change gsm_bts_trx field to bool and rename it

2019-11-13 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/16059 )


Change subject: Change gsm_bts_trx field to bool and rename it
..

Change gsm_bts_trx field to bool and rename it

Thies field is used to store and retrieve whether MS power needs to be
calculated and updated by osmo-bts software or autonomously by lower
layers. Previous name was not clear
and may have been understood as indicating whether MS Power Control loop
is done or not in general, and the responsible for that is located under
lchan's ms_power_ctrl.fixed.

Related: OS#1851
Change-Id: Ic690ab69866a7377f1597e24aa7b0214831c1cbe
---
M include/osmo-bts/bts.h
M include/osmo-bts/gsm_data_shared.h
M src/common/bts.c
M src/common/vty.c
M src/osmo-bts-trx/main.c
M src/osmo-bts-trx/trx_vty.c
M tests/power/power_test.c
7 files changed, 10 insertions(+), 10 deletions(-)



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

diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h
index 5c719f9..63412f9 100644
--- a/include/osmo-bts/bts.h
+++ b/include/osmo-bts/bts.h
@@ -49,7 +49,7 @@
 uint8_t num_agch(struct gsm_bts_trx *trx, const char * arg);
 void bts_update_status(enum bts_global_status which, int on);

-int trx_ms_pwr_ctrl_is_osmo(struct gsm_bts_trx *trx);
+bool trx_ms_pwr_ctrl_is_osmo(struct gsm_bts_trx *trx);

 struct gsm_time *get_time(struct gsm_bts *bts);

diff --git a/include/osmo-bts/gsm_data_shared.h 
b/include/osmo-bts/gsm_data_shared.h
index 1445ed2..8678ea5 100644
--- a/include/osmo-bts/gsm_data_shared.h
+++ b/include/osmo-bts/gsm_data_shared.h
@@ -417,7 +417,7 @@


struct trx_power_params power_params;
-   int ms_power_control;
+   bool ms_pwr_ctl_soft; /* is power control loop done by osmocom 
software? */

struct {
void *l1h;
diff --git a/src/common/bts.c b/src/common/bts.c
index 60e27cc..3809eb3 100644
--- a/src/common/bts.c
+++ b/src/common/bts.c
@@ -778,9 +778,9 @@
return sup > 0;
 }

-int trx_ms_pwr_ctrl_is_osmo(struct gsm_bts_trx *trx)
+bool trx_ms_pwr_ctrl_is_osmo(struct gsm_bts_trx *trx)
 {
-   return trx->ms_power_control == 1;
+   return trx->ms_pwr_ctl_soft;
 }

 struct gsm_time *get_time(struct gsm_bts *bts)
diff --git a/src/common/vty.c b/src/common/vty.c
index e775d99..6ae82d1 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -332,7 +332,7 @@
vty_out(vty, "  power-ramp step-interval %d%s",
tpp->ramp.step_interval_sec, VTY_NEWLINE);
vty_out(vty, "  ms-power-control %s%s",
-   trx->ms_power_control == 0 ? "dsp" : "osmo",
+   trx->ms_pwr_ctl_soft == 0 ? "dsp" : "osmo",
VTY_NEWLINE);
vty_out(vty, "  phy %u instance %u%s", pinst->phy_link->num,
pinst->num, VTY_NEWLINE);
@@ -790,7 +790,7 @@
 {
struct gsm_bts_trx *trx = vty->index;

-   trx->ms_power_control = argv[0][0] == 'd' ? 0 : 1;
+   trx->ms_pwr_ctl_soft = !strcmp(argv[0], "osmo");
return CMD_SUCCESS;
 }

diff --git a/src/osmo-bts-trx/main.c b/src/osmo-bts-trx/main.c
index b5841b0..e962e9a 100644
--- a/src/osmo-bts-trx/main.c
+++ b/src/osmo-bts-trx/main.c
@@ -125,7 +125,7 @@
 int bts_model_trx_init(struct gsm_bts_trx *trx)
 {
/* Enable software based algo for MS Power Control Loop: */
-   trx->ms_power_control = true;
+   trx->ms_pwr_ctl_soft = true;
return 0;
 }

diff --git a/src/osmo-bts-trx/trx_vty.c b/src/osmo-bts-trx/trx_vty.c
index 5c6aea3..b34114c 100644
--- a/src/osmo-bts-trx/trx_vty.c
+++ b/src/osmo-bts-trx/trx_vty.c
@@ -169,7 +169,7 @@

vty_bts->ul_power_target = atoi(argv[0]);
/* Remark: workaround after deprecation only works for 1st TRX */
-   vty_bts->c0->ms_power_control = true;
+   vty_bts->c0->ms_pwr_ctl_soft = true;

return CMD_SUCCESS;
 }
@@ -181,7 +181,7 @@
vty_out (vty, "'no osmotrx ms-power-loop' is deprecated, use 
'ms-power-control dsp' instead%s", VTY_NEWLINE);

/* Remark: workaround after deprecation only works for 1st TRX */
-   vty_bts->c0->ms_power_control = false;
+   vty_bts->c0->ms_pwr_ctl_soft = false;

return CMD_SUCCESS;
 }
diff --git a/tests/power/power_test.c b/tests/power/power_test.c
index a46a430..8df6d69 100644
--- a/tests/power/power_test.c
+++ b/tests/power/power_test.c
@@ -48,7 +48,7 @@
ts.trx = 
trx.bts = 
bts.band = GSM_BAND_1800;
-   trx.ms_power_control = 1;
+   trx.ms_pwr_ctl_soft = true;
bts.ul_power_target = -75;

lchan->state = LCHAN_S_NONE;

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ic690ab69866a7377f1597e24aa7b0214831c1cbe

Change in osmo-bts[master]: Change gsm_lchan field fixed to bool

2019-11-13 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/16060 )


Change subject: Change gsm_lchan field fixed to bool
..

Change gsm_lchan field fixed to bool

Change-Id: I715ef151b67a21e325c574585a257e71b4b0ce2a
---
M include/osmo-bts/gsm_data_shared.h
M src/common/rsl.c
M tests/power/power_test.c
3 files changed, 11 insertions(+), 11 deletions(-)



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

diff --git a/include/osmo-bts/gsm_data_shared.h 
b/include/osmo-bts/gsm_data_shared.h
index 8678ea5..5061310 100644
--- a/include/osmo-bts/gsm_data_shared.h
+++ b/include/osmo-bts/gsm_data_shared.h
@@ -323,7 +323,7 @@
/* power handling */
struct {
uint8_t current;
-   uint8_t fixed;
+   bool fixed;
} ms_power_ctrl;

struct msgb *pending_rel_ind_msg;
diff --git a/src/common/rsl.c b/src/common/rsl.c
index d8ce016..9a4afb3 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -999,7 +999,7 @@
 * cleared, or we would enable encryption on PDCH with parameters 
remaining from the TCH. */
lchan->ms_power = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0);
lchan->ms_power_ctrl.current = lchan->ms_power;
-   lchan->ms_power_ctrl.fixed = 0;
+   lchan->ms_power_ctrl.fixed = false;
lchan->rsl_cmode = 0;
lchan->tch_mode = 0;
memset(>encr, 0, sizeof(lchan->encr));
@@ -1104,7 +1104,7 @@
/* Initialize channel defaults */
lchan->ms_power = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0);
lchan->ms_power_ctrl.current = lchan->ms_power;
-   lchan->ms_power_ctrl.fixed = 0;
+   lchan->ms_power_ctrl.fixed = false;
 
rsl_tlv_parse(, msgb_l3(msg), msgb_l3len(msg));

@@ -1156,7 +1156,7 @@
if (TLVP_PRES_LEN(, RSL_IE_MS_POWER, 1)) {
lchan->ms_power = *TLVP_VAL(, RSL_IE_MS_POWER);
lchan->ms_power_ctrl.current = lchan->ms_power;
-   lchan->ms_power_ctrl.fixed = 0;
+   lchan->ms_power_ctrl.fixed = false;
}
/* 9.3.24 Timing Advance */
if (TLVP_PRES_LEN(, RSL_IE_TIMING_ADVANCE, 1))
@@ -1165,12 +1165,12 @@
/* 9.3.32 BS Power Parameters */
/* 9.3.31 MS Power Parameters */
if (TLVP_PRESENT(, RSL_IE_MS_POWER_PARAM))
-   lchan->ms_power_ctrl.fixed = 0;
+   lchan->ms_power_ctrl.fixed = false;
else {
/* Spec explicitly states BTS should only perform
* autonomous MS power control loop in BTS if 'MS Power
* Parameters' IE is present! */
-   lchan->ms_power_ctrl.fixed = 1;
+   lchan->ms_power_ctrl.fixed = true;
}
/* 9.3.16 Physical Context */

@@ -1642,16 +1642,16 @@

/* 9.3.31 MS Power Parameters (O) */
if (TLVP_PRESENT(, RSL_IE_MS_POWER_PARAM))
-   lchan->ms_power_ctrl.fixed = 0;
+   lchan->ms_power_ctrl.fixed = false;
else {
/* Spec explicitly states BTS should only perform
* autonomous MS power control loop in BTS if 'MS Power
* Parameters' IE is present! */
-   lchan->ms_power_ctrl.fixed = 1;
+   lchan->ms_power_ctrl.fixed = true;
}

/* Only set current to lchan->ms_power if actual value of current
-  in dBm > value in dBm from lchan->ms_power, or if fixed=1. */
+  in dBm > value in dBm from lchan->ms_power, or if fixed. */
if (lchan->ms_power_ctrl.fixed) {
lchan->ms_power_ctrl.current = lchan->ms_power;
} else {
diff --git a/tests/power/power_test.c b/tests/power/power_test.c
index 8df6d69..dbae8fa 100644
--- a/tests/power/power_test.c
+++ b/tests/power/power_test.c
@@ -68,11 +68,11 @@
apply_power_test(lchan, -100, 1, 0);

/* Fix it and jump down */
-   lchan->ms_power_ctrl.fixed = 1;
+   lchan->ms_power_ctrl.fixed = true;
apply_power_test(lchan, -60, 0, 0);

/* And leave it again */
-   lchan->ms_power_ctrl.fixed = 0;
+   lchan->ms_power_ctrl.fixed = false;
apply_power_test(lchan, -40, 1, 15);
 }


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

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


Change in osmo-bts[master]: Move and rename gsm_lchan.ms_power field

2019-11-13 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/16062 )


Change subject: Move and rename gsm_lchan.ms_power field
..

Move and rename gsm_lchan.ms_power field

Make it clear that it contains the maximum MS power level (TS 05.05) and
not the one to be used. The one aimed at is in ms_power_ctrl.current.
Since it's used in related code, move it inside the ms_power_ctrl struct
too.

Related: OS#1851
Change-Id: Ib264ec7dac87355cef6415461ed74bd8e9c8ca52
---
M include/osmo-bts/gsm_data_shared.h
M src/common/power_control.c
M src/common/rsl.c
M src/common/vty.c
M src/osmo-bts-trx/loops.c
M src/osmo-bts-virtual/l1_if.c
6 files changed, 18 insertions(+), 19 deletions(-)



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

diff --git a/include/osmo-bts/gsm_data_shared.h 
b/include/osmo-bts/gsm_data_shared.h
index 5061310..8a52fe9 100644
--- a/include/osmo-bts/gsm_data_shared.h
+++ b/include/osmo-bts/gsm_data_shared.h
@@ -199,9 +199,6 @@
/* State */
enum gsm_lchan_state state;
const char *broken_reason;
-   /* Power levels for MS and BTS */
-   uint8_t bs_power;
-   uint8_t ms_power;
/* Encryption information */
struct {
uint8_t alg_id;
@@ -323,8 +320,11 @@
/* power handling */
struct {
uint8_t current;
+   uint8_t max;
bool fixed;
} ms_power_ctrl;
+   /* Power levels for BTS */
+   uint8_t bs_power;

struct msgb *pending_rel_ind_msg;

diff --git a/src/common/power_control.c b/src/common/power_control.c
index f467cd5..38a7fb7 100644
--- a/src/common/power_control.c
+++ b/src/common/power_control.c
@@ -83,8 +83,8 @@
/* Don't ask for smaller ms power level than the one set
 * by BSC upon RSL CHAN ACT
 */
-   if (new_pwr < lchan->ms_power)
-   new_pwr = lchan->ms_power;
+   if (new_pwr < lchan->ms_power_ctrl.max)
+   new_pwr = lchan->ms_power_ctrl.max;

if (lchan->ms_power_ctrl.current != new_pwr) {
lchan->ms_power_ctrl.current = new_pwr;
diff --git a/src/common/rsl.c b/src/common/rsl.c
index f88d2d7..86be47c 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1002,7 +1002,6 @@
memset(>encr, 0, sizeof(lchan->encr));
memset(>ho, 0, sizeof(lchan->ho));
lchan->bs_power = 0;
-   lchan->ms_power = 0;
memset(>ms_power_ctrl, 0, sizeof(lchan->ms_power_ctrl));
lchan->rqd_ta = 0;
copy_sacch_si_to_lchan(lchan);
@@ -1099,8 +1098,8 @@
  gsm_lchans_name(lchan->state));

/* Initialize channel defaults */
-   lchan->ms_power = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0);
-   lchan->ms_power_ctrl.current = lchan->ms_power;
+   lchan->ms_power_ctrl.max = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0);
+   lchan->ms_power_ctrl.current = lchan->ms_power_ctrl.max;
lchan->ms_power_ctrl.fixed = false;

rsl_tlv_parse(, msgb_l3(msg), msgb_l3len(msg));
@@ -1151,8 +1150,8 @@
lchan->bs_power = *TLVP_VAL(, RSL_IE_BS_POWER);
/* 9.3.13 MS Power */
if (TLVP_PRES_LEN(, RSL_IE_MS_POWER, 1)) {
-   lchan->ms_power = *TLVP_VAL(, RSL_IE_MS_POWER);
-   lchan->ms_power_ctrl.current = lchan->ms_power;
+   lchan->ms_power_ctrl.max = *TLVP_VAL(, RSL_IE_MS_POWER);
+   lchan->ms_power_ctrl.current = lchan->ms_power_ctrl.max;
lchan->ms_power_ctrl.fixed = false;
}
/* 9.3.24 Timing Advance */
@@ -1633,7 +1632,7 @@
return rsl_tx_error_report(msg->trx, RSL_ERR_MAND_IE_ERROR, 
>chan_nr, NULL, msg);

pwr = *TLVP_VAL(, RSL_IE_MS_POWER) & 0x1F;
-   lchan->ms_power = pwr;
+   lchan->ms_power_ctrl.max = pwr;

LOGPLCHAN(lchan, DRSL, LOGL_INFO, "Rx MS POWER CONTROL %" PRIu8 "\n", 
pwr);

@@ -1650,17 +1649,17 @@
/* Only set current to lchan->ms_power if actual value of current
   in dBm > value in dBm from lchan->ms_power, or if fixed. */
if (lchan->ms_power_ctrl.fixed) {
-   lchan->ms_power_ctrl.current = lchan->ms_power;
+   lchan->ms_power_ctrl.current = lchan->ms_power_ctrl.max;
} else {
-   max_pwr = ms_pwr_dbm(bts->band, lchan->ms_power);
+   max_pwr = ms_pwr_dbm(bts->band, lchan->ms_power_ctrl.max);
curr_pwr = ms_pwr_dbm(bts->band, lchan->ms_power_ctrl.current);
if (max_pwr < 0 || curr_pwr < 0) {
LOGPLCHAN(lchan, DRSL, LOGL_ERROR,
  "Unable to calculate power levels to dBm: %" 
PRIu8 " -> %d, %" PRIu8 " -> %d\n",
- lchan->ms_power, max_pwr,
+ lchan->ms_power_ctrl.max, max_pwr,