Build failure of network:osmocom:nightly/simtrace2 in xUbuntu_20.04/x86_64

2020-11-17 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/simtrace2/xUbuntu_20.04/x86_64

Package network:osmocom:nightly/simtrace2 failed to build in 
xUbuntu_20.04/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly simtrace2

Last lines of build log:
[  198s] [COMPILING libboard/qmod/source/wwan_perst.c]
[  198s] [COMPILING libboard/qmod/source/card_pres.c]
[  198s] [COMPILING libboard/qmod/source/wwan_led.c]
[  199s] [COMPILING libboard/qmod/source/i2c.c]
[  199s] [COMPILING libboard/qmod/source/board_qmod.c]
[  199s] [COMPILING apps/dfu/main.c]
[  199s] [COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu.c]
[  199s] [COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu_desc.c]
[  199s] [COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu_driver.c]
[  200s] Memory region Used Size  Region Size  %age Used
[  200s]  rom:   16588 B16 KB101.25%
[  200s]  ram:   11672 B48 KB 
23.75/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: 
bin/qmod-dfu-flash.elf section `.text' will not fit in region `rom'
[  200s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: region 
`rom' overflowed by 204 bytes
[  200s] collect2: error: ld returned 1 exit status
[  200s] %
[  200s] make[2]: *** [Makefile:234: flash] Error 1
[  200s] make[2]: Leaving directory '/usr/src/packages/BUILD/firmware'
[  200s] make[1]: *** [Makefile:13: fw-qmod-dfu] Error 2
[  200s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  200s] dh_auto_build: error: make -j1 returned exit code 2
[  200s] make: *** [debian/rules:16: build] Error 25
[  200s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[  200s] ### VM INTERACTION START ###
[  203s] [  191.105536] sysrq: Power Off
[  203s] [  191.111555] reboot: Power down
[  203s] ### VM INTERACTION END ###
[  203s] 
[  203s] lamb62 failed "build simtrace2_0.7.0.69.aadd.dsc" at Wed Nov 18 
01:48:14 UTC 2020.
[  203s] 

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


Build failure of network:osmocom:nightly/simtrace2 in xUbuntu_20.10/x86_64

2020-11-17 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/simtrace2/xUbuntu_20.10/x86_64

Package network:osmocom:nightly/simtrace2 failed to build in 
xUbuntu_20.10/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly simtrace2

Last lines of build log:
[  162s] [COMPILING apps/dfu/main.c]
[  162s] [COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu.c]
[  162s] [COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu_desc.c]
[  162s] [COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu_driver.c]
[  162s] Memory region Used Size  Region Size  %age Used
[  162s]  rom:   16580 B16 KB101.20%
[  162s]  ram:   11672 B48 KB 
23.75/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: warning: 
changing start of section .stack by 4 bytes
[  162s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: 
warning: changing start of section .stack by 4 bytes
[  162s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: 
bin/qmod-dfu-flash.elf section `.text' will not fit in region `rom'
[  162s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: 
warning: changing start of section .stack by 4 bytes
[  162s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: 
warning: changing start of section .stack by 4 bytes
[  162s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: 
warning: changing start of section .stack by 4 bytes
[  162s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: region 
`rom' overflowed by 196 bytes
[  162s] collect2: error: ld returned 1 exit status
[  162s] %
[  162s] make[2]: *** [Makefile:234: flash] Error 1
[  162s] make[2]: Leaving directory '/usr/src/packages/BUILD/firmware'
[  162s] make[1]: *** [Makefile:13: fw-qmod-dfu] Error 2
[  162s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  162s] dh_auto_build: error: make -j1 returned exit code 2
[  162s] make: *** [debian/rules:16: build] Error 25
[  162s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[  162s] ### VM INTERACTION START ###
[  166s] [  152.742997] sysrq: Power Off
[  166s] [  152.748945] reboot: Power down
[  166s] ### VM INTERACTION END ###
[  166s] 
[  166s] lamb02 failed "build simtrace2_0.7.0.69.aadd.dsc" at Wed Nov 18 
01:46:30 UTC 2020.
[  166s] 

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


Change in osmo-bsc[master]: hodec 2: favor moving dyn TS

2020-11-17 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21204 )

Change subject: hodec 2: favor moving dyn TS
..


Patch Set 4:

(1 comment)

https://gerrit.osmocom.org/c/osmo-bsc/+/21204/4//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/c/osmo-bsc/+/21204/4//COMMIT_MSG@23
PS4, Line 23: Among lchans on dynamic timeslots that could be moved, this code 
favors moving
: later lchans; mainly because it makes for a simpler condition in 
the code.
> I'm not completely against it, but I'm not sure this is a really good 
> reason... […]
sorry but you clearly are missing the point here :)

The question in this condition is not whether a dyn TS is moved or not, the 
question is *which one* do you pick. So if there are a choice of N dyn TS with 
identical ratings, it does not matter which one you pick to be handed over, all 
of those with the same avg_db are identically qualified candidates.

I have no strong argument to pick the last one, equally you have no strong 
argument for picking the first one.

The decision to move an lchan of that type is taken elsewhere, and there is a 
real gain doing so, and that decision is made orthogonally to finding an lchan 
matching that decision here.



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ic221b8d2687cdec0bf94410c84a4da43853f0900
Gerrit-Change-Number: 21204
Gerrit-PatchSet: 4
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 23:26:06 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-bsc[master]: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

2020-11-17 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21084 )

Change subject: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS
..


Patch Set 7: Code-Review+1

(4 comments)

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/7/src/osmo-bsc/abis_rsl.c
File src/osmo-bsc/abis_rsl.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/7/src/osmo-bsc/abis_rsl.c@462
PS7, Line 462: static void put_rsl_ie_osmo_rep_acch_cap(struct gsm_lchan *lchan,
(function name reads like it always puts an RSL IE in a msgb, but it first 
decides on whether that should happen, maybe acch_cap_config() or something?)


https://gerrit.osmocom.org/c/osmo-bsc/+/21084/7/src/osmo-bsc/abis_rsl.c@468
PS7, Line 468: if (!lchan->conn)
 :  return;
 :
 :  bts = conn_get_bts(lchan->conn);
 :  OSMO_ASSERT(bts);
instead of all this, just say

 bts = lchan->ts->trx->bts;

read conn_get_bts() for the reason; also no need to assert presence of the BTS, 
an lchan is guaranteed to always have a bts backpointer


https://gerrit.osmocom.org/c/osmo-bsc/+/21084/7/src/osmo-bsc/abis_rsl.c@495
PS7, Line 495:   (uint8_t *) & cap);
(unusual spaces)


https://gerrit.osmocom.org/c/osmo-bsc/+/21084/7/src/osmo-bsc/gsm_08_08.c
File src/osmo-bsc/gsm_08_08.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/21084/7/src/osmo-bsc/gsm_08_08.c@609
PS7, Line 609:  memset(>cm3, 0, sizeof(conn->cm3));
(could just do  'conn->cm3 = {};')



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I39ae439d05562b35b2e47774dc92f8789fea1a57
Gerrit-Change-Number: 21084
Gerrit-PatchSet: 7
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 23:07:48 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: bts: add repeated acch mode flags + vty config

2020-11-17 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21164 )

Change subject: bts: add repeated acch mode flags + vty config
..


Patch Set 4:

(4 comments)

https://gerrit.osmocom.org/c/osmo-bsc/+/21164/3//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/c/osmo-bsc/+/21164/3//COMMIT_MSG@10
PS3, Line 10: a one byte flag is sent
this patch does not send anything, all i can see is an unused vty config 
option. please hint at the patch where this has functional effects


https://gerrit.osmocom.org/c/osmo-bsc/+/21164/3/include/osmocom/bsc/bts.h
File include/osmocom/bsc/bts.h:

https://gerrit.osmocom.org/c/osmo-bsc/+/21164/3/include/osmocom/bsc/bts.h@485
PS3, Line 485:  struct abis_rsl_osmo_rep_acch_cap repeated_acch_capability_bts;
(this is a member of struct gsm_bts, redundant to also name the member *_bts)


https://gerrit.osmocom.org/c/osmo-bsc/+/21164/3/src/osmo-bsc/bsc_vty.c
File src/osmo-bsc/bsc_vty.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/21164/3/src/osmo-bsc/bsc_vty.c@2646
PS3, Line 2646: vty_out(vty, "%% repeated ACCH not supported by 
this BTS%s",
would be good to add the BTS number: during program startup, you'd read a lone 
"this BTS" and wouldn't know which one. Same below.


https://gerrit.osmocom.org/c/osmo-bsc/+/21164/3/src/osmo-bsc/bsc_vty.c@2651
PS3, Line 2651: if (argv[0][0] == 'c') {
i also did it like this some years back and got the code review that i should 
rather use a strcmp() -- doing that ever since.



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I083eaa2c30478912426e9c24a506f0b88836e190
Gerrit-Change-Number: 21164
Gerrit-PatchSet: 4
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: neels 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 22:28:59 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bsc[master]: bts: add repeated acch mode flags + vty config

2020-11-17 Thread dexter
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-bsc/+/21164

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

Change subject: bts: add repeated acch mode flags + vty config
..

bts: add repeated acch mode flags + vty config

To be able to control the FACCH/SACCH repetition behavior inside the
BTS a one byte flag is sent to the BTS together with the
RSL_IE_OSMO_REP_ACCH_CAP IE.

Related: SYS#5114, OS#4796, OS#4794, OS#4795
Depends: libosmocore I326e66dae25acfab0b3fddc7278b39a8cbf7d385
Change-Id: I083eaa2c30478912426e9c24a506f0b88836e190
---
M include/osmocom/bsc/bts.h
M src/osmo-bsc/bsc_vty.c
2 files changed, 125 insertions(+), 0 deletions(-)


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I083eaa2c30478912426e9c24a506f0b88836e190
Gerrit-Change-Number: 21164
Gerrit-PatchSet: 4
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-MessageType: newpatchset


Change in osmo-pcu[master]: Implement downgrade to DL MCS1-4 when USF for GPRS_only MS

2020-11-17 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/21179 )

Change subject: Implement downgrade to DL MCS1-4 when USF for GPRS_only MS
..


Patch Set 3: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/c/osmo-pcu/+/21179/3/src/gprs_rlcmac_sched.cpp
File src/gprs_rlcmac_sched.cpp:

https://gerrit.osmocom.org/c/osmo-pcu/+/21179/3/src/gprs_rlcmac_sched.cpp@317
PS3, Line 317: downgrde
typo



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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I9af23e175435fe9ae7b0e4119ad52fcd4707b9ca
Gerrit-Change-Number: 21179
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Comment-Date: Tue, 17 Nov 2020 22:14:26 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-pcu[master]: Support multiplexing of GPRS and EGPRS TBFs in one PDCH

2020-11-17 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/21178 )

Change subject: Support multiplexing of GPRS and EGPRS TBFs in one PDCH
..


Patch Set 3: Code-Review+1


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ib4991c864eda6864533363443f76ae5d999532ae
Gerrit-Change-Number: 21178
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Comment-Date: Tue, 17 Nov 2020 22:10:46 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

2020-11-17 Thread dexter
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-bsc/+/21084

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

Change subject: abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS
..

abis_rsl: parse cm3 and indicate ACCH repetition cap to BTS

In order to activate FACCH/SACCH repetition on the BTS, the classmark 3
IE in the CLASSMARK CHANGE message must be parsed and depending on the
Repeated ACCH Capability bit the RSL_IE_OSMO_REP_ACCH_CAP is added to
the RSL CHAN ACT und RSL CHAN MODE MODIFY. Since
RSL_IE_OSMO_REP_ACCH_CAP is a propritary IE, it may only be added for
BTS type osmo-bts.

Change-Id: I39ae439d05562b35b2e47774dc92f8789fea1a57
Related: OS#4796 SYS#5114
---
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/abis_rsl.c
M src/osmo-bsc/gsm_08_08.c
3 files changed, 52 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/84/21084/6
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/21084
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I39ae439d05562b35b2e47774dc92f8789fea1a57
Gerrit-Change-Number: 21084
Gerrit-PatchSet: 6
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-MessageType: newpatchset


Change in osmo-ccid-firmware[master]: asf4 uart: properly handle uart errors

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

Change subject: asf4 uart: properly handle uart errors
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/21117
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: Ia0efef03829b68d2b4f25899bb933b14fb9e0bd1
Gerrit-Change-Number: 21117
Gerrit-PatchSet: 2
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 17 Nov 2020 21:54:33 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-hlr[master]: USSD: add special 'idle' handler to IUSE for testing

2020-11-17 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-hlr/+/21183 )

Change subject: USSD: add special 'idle' handler to IUSE for testing
..

USSD: add special 'idle' handler to IUSE for testing

Change-Id: I0d566a60e95ce2da951f22ad47c6155c5b6a338c
---
M doc/manuals/chapters/ussd.adoc
M src/hlr_ussd.c
M src/hlr_vty.c
M tests/test_nodes.vty
4 files changed, 24 insertions(+), 4 deletions(-)

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



diff --git a/doc/manuals/chapters/ussd.adoc b/doc/manuals/chapters/ussd.adoc
index 3ab587f..6100c93 100644
--- a/doc/manuals/chapters/ussd.adoc
+++ b/doc/manuals/chapters/ussd.adoc
@@ -67,7 +67,9 @@
 can be assigned to one or more USSD request prefixes:

 * `own-msisdn` returns subscriber's MSISDN (if assigned);
-* `own-imsi` returns subscriber's IMSI.
+* `own-imsi` returns subscriber's IMSI;
+* `test-idle` keeps the session idle until the MS terminates it, or
+  the guard timer expires (may be useful for testing).

 Additional handlers can be added on request.

diff --git a/src/hlr_ussd.c b/src/hlr_ussd.c
index 399bdbc..35b74b6 100644
--- a/src/hlr_ussd.c
+++ b/src/hlr_ussd.c
@@ -379,6 +379,19 @@
return 0;
 }

+/* This handler just keeps the session idle unless the guard timer expires. */
+static int handle_ussd_test_idle(struct ss_session *ss,
+const struct osmo_gsup_message *gsup,
+const struct ss_request *req)
+{
+   char buf[GSM0480_USSD_7BIT_STRING_LEN + 1];
+   snprintf(buf, sizeof(buf), "Keeping your session idle, it will expire "
+"at most in %u seconds.", g_hlr->ncss_guard_timeout);
+   ss->state = OSMO_GSUP_SESSION_STATE_CONTINUE;
+   ss_tx_to_ms_ussd_7bit(ss, req->invoke_id, buf);
+   return 0;
+}
+

 static const struct hlr_iuse hlr_iuses[] = {
{
@@ -389,6 +402,10 @@
.name = "own-imsi",
.handle_ussd = handle_ussd_own_imsi,
},
+   {
+   .name = "test-idle",
+   .handle_ussd = handle_ussd_test_idle,
+   },
 };

 const struct hlr_iuse *iuse_find(const char *name)
diff --git a/src/hlr_vty.c b/src/hlr_vty.c
index a054cbe..4b91aa9 100644
--- a/src/hlr_vty.c
+++ b/src/hlr_vty.c
@@ -174,10 +174,11 @@
 #define UROUTE_STR "Routing Configuration\n"
 #define PREFIX_STR "Prefix-Matching Route\n" "USSD Prefix\n"

-#define INT_CHOICE "(own-msisdn|own-imsi)"
+#define INT_CHOICE "(own-msisdn|own-imsi|test-idle)"
 #define INT_STR "Internal USSD Handler\n" \
"Respond with subscribers' own MSISDN\n" \
-   "Respond with subscribers' own IMSI\n"
+   "Respond with subscribers' own IMSI\n" \
+   "Keep the session idle (useful for testing)\n"

 #define EXT_STR "External USSD Handler\n" \
"Name of External USSD Handler (IPA CCM ID)\n"
diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty
index d9971f7..cf1707a 100644
--- a/tests/test_nodes.vty
+++ b/tests/test_nodes.vty
@@ -51,7 +51,7 @@
   database PATH
   euse NAME
   no euse NAME
-  ussd route prefix PREFIX internal (own-msisdn|own-imsi)
+  ussd route prefix PREFIX internal (own-msisdn|own-imsi|test-idle)
   ussd route prefix PREFIX external EUSE
   no ussd route prefix PREFIX
   ussd default-route external EUSE

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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I0d566a60e95ce2da951f22ad47c6155c5b6a338c
Gerrit-Change-Number: 21183
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in osmo-hlr[master]: USSD: fix handle_ussd(): do not free() unconditionally

2020-11-17 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-hlr/+/21182 )

Change subject: USSD: fix handle_ussd(): do not free() unconditionally
..

USSD: fix handle_ussd(): do not free() unconditionally

An internal handler may want to continue session, e.g. to request
more information from the MS.  Let's make the handlers responsible
for session state management, and check that state before calling
ss_session_free(), so a session can remain alive.

Before this patch ss->state was not set/used at all...

Change-Id: I49262e7fe26f29dedbf126087cfb8f3bb3c548dc
---
M src/hlr_ussd.c
1 file changed, 23 insertions(+), 16 deletions(-)

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



diff --git a/src/hlr_ussd.c b/src/hlr_ussd.c
index 25e9354..399bdbc 100644
--- a/src/hlr_ussd.c
+++ b/src/hlr_ussd.c
@@ -279,19 +279,20 @@
 }

 static int ss_tx_to_ms(struct ss_session *ss, enum osmo_gsup_message_type 
gsup_msg_type,
-   bool final, struct msgb *ss_msg)
+  struct msgb *ss_msg)

 {
-   struct osmo_gsup_message resp = {0};
+   struct osmo_gsup_message resp;
int rc;

-   resp.message_type = gsup_msg_type;
+   resp = (struct osmo_gsup_message) {
+   .message_type = gsup_msg_type,
+   .session_id = ss->session_id,
+   .session_state = ss->state,
+   };
+
OSMO_STRLCPY_ARRAY(resp.imsi, ss->imsi);
-   if (final)
-   resp.session_state = OSMO_GSUP_SESSION_STATE_END;
-   else
-   resp.session_state = OSMO_GSUP_SESSION_STATE_CONTINUE;
-   resp.session_id = ss->session_id;
+
if (ss_msg) {
resp.ss_info = msgb_data(ss_msg);
resp.ss_info_len = msgb_length(ss_msg);
@@ -311,7 +312,8 @@
LOGPSS(ss, LOGL_NOTICE, "Tx Reject(%u, 0x%02x, 0x%02x)\n", invoke_id,
problem_tag, problem_code);
OSMO_ASSERT(msg);
-   return ss_tx_to_ms(ss, OSMO_GSUP_MSGT_PROC_SS_RESULT, true, msg);
+   ss->state = OSMO_GSUP_SESSION_STATE_END;
+   return ss_tx_to_ms(ss, OSMO_GSUP_MSGT_PROC_SS_RESULT, msg);
 }
 #endif

@@ -320,15 +322,16 @@
struct msgb *msg = gsm0480_gen_return_error(invoke_id, error_code);
LOGPSS(ss, LOGL_NOTICE, "Tx ReturnError(%u, 0x%02x)\n", invoke_id, 
error_code);
OSMO_ASSERT(msg);
-   return ss_tx_to_ms(ss, OSMO_GSUP_MSGT_PROC_SS_RESULT, true, msg);
+   ss->state = OSMO_GSUP_SESSION_STATE_END;
+   return ss_tx_to_ms(ss, OSMO_GSUP_MSGT_PROC_SS_RESULT, msg);
 }

-static int ss_tx_to_ms_ussd_7bit(struct ss_session *ss, bool final, uint8_t 
invoke_id, const char *text)
+static int ss_tx_to_ms_ussd_7bit(struct ss_session *ss, uint8_t invoke_id, 
const char *text)
 {
struct msgb *msg = gsm0480_gen_ussd_resp_7bit(invoke_id, text);
LOGPSS(ss, LOGL_INFO, "Tx USSD '%s'\n", text);
OSMO_ASSERT(msg);
-   return ss_tx_to_ms(ss, OSMO_GSUP_MSGT_PROC_SS_RESULT, final, msg);
+   return ss_tx_to_ms(ss, OSMO_GSUP_MSGT_PROC_SS_RESULT, msg);
 }

 /***
@@ -344,6 +347,8 @@
char buf[GSM0480_USSD_7BIT_STRING_LEN+1];
int rc;

+   ss->state = OSMO_GSUP_SESSION_STATE_END;
+
rc = db_subscr_get_by_imsi(g_hlr->dbc, ss->imsi, );
switch (rc) {
case 0:
@@ -351,7 +356,7 @@
snprintf(buf, sizeof(buf), "You have no MSISDN!");
else
snprintf(buf, sizeof(buf), "Your extension is %s", 
subscr.msisdn);
-   ss_tx_to_ms_ussd_7bit(ss, true, req->invoke_id, buf);
+   ss_tx_to_ms_ussd_7bit(ss, req->invoke_id, buf);
break;
case -ENOENT:
ss_tx_to_ms_error(ss, req->invoke_id, 
GSM0480_ERR_CODE_UNKNOWN_SUBSCRIBER);
@@ -369,7 +374,8 @@
 {
char buf[GSM0480_USSD_7BIT_STRING_LEN+1];
snprintf(buf, sizeof(buf), "Your IMSI is %s", ss->imsi);
-   ss_tx_to_ms_ussd_7bit(ss, true, req->invoke_id, buf);
+   ss->state = OSMO_GSUP_SESSION_STATE_END;
+   ss_tx_to_ms_ussd_7bit(ss, req->invoke_id, buf);
return 0;
 }

@@ -496,8 +502,9 @@
} else {
/* Handle internally */
ss->u.iuse->handle_ussd(ss, gsup, req);
-   /* Release session immediately */
-   ss_session_free(ss);
+   /* Release session if the handler has changed its state 
to END */
+   if (ss->state == OSMO_GSUP_SESSION_STATE_END)
+   ss_session_free(ss);
}
}


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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: 

Change in osmo-hlr[master]: doc/manuals: fix s/There/The/ in 'USSD Configuration'

2020-11-17 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-hlr/+/21210 )

Change subject: doc/manuals: fix s/There/The/ in 'USSD Configuration'
..

doc/manuals: fix s/There/The/ in 'USSD Configuration'

Change-Id: Idbff93b6be5f546f18642ee330746e8734378b39
---
M doc/manuals/chapters/ussd.adoc
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/doc/manuals/chapters/ussd.adoc b/doc/manuals/chapters/ussd.adoc
index be463ac..1d962b7 100644
--- a/doc/manuals/chapters/ussd.adoc
+++ b/doc/manuals/chapters/ussd.adoc
@@ -50,7 +50,7 @@
 routed to the named EUSE.

 `ussd route prefix *#100# internal own-msisdn` installs a prefix route
-to the named internal USSD handler.  There above command will restore
+to the named internal USSD handler.  The above command will restore
 the old behavior, in which *#100# will return a text message containing
 the subscribers own phone number.  There is one other handler called
 `own-imsi` which will return the IMSI instead of the MSISDN.

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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: Idbff93b6be5f546f18642ee330746e8734378b39
Gerrit-Change-Number: 21210
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-hlr[master]: doc/manuals: re-organize description of internal USSD handlers

2020-11-17 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-hlr/+/21211 )

Change subject: doc/manuals: re-organize description of internal USSD handlers
..

doc/manuals: re-organize description of internal USSD handlers

Change-Id: Ieddde02f3f41e0eb05b7223026da4252c17c3712
---
M doc/manuals/chapters/ussd.adoc
1 file changed, 14 insertions(+), 2 deletions(-)

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



diff --git a/doc/manuals/chapters/ussd.adoc b/doc/manuals/chapters/ussd.adoc
index 1d962b7..3ab587f 100644
--- a/doc/manuals/chapters/ussd.adoc
+++ b/doc/manuals/chapters/ussd.adoc
@@ -52,13 +52,25 @@
 `ussd route prefix *#100# internal own-msisdn` installs a prefix route
 to the named internal USSD handler.  The above command will restore
 the old behavior, in which *#100# will return a text message containing
-the subscribers own phone number.  There is one other handler called
-`own-imsi` which will return the IMSI instead of the MSISDN.
+the subscribers own phone number.  More information on internal USSD
+handlers can be found in <>.

 `ussd default-route external foobar-00-00-00-00-00-00` installs a
 default route to the named EUSE.  This means that all USSD codes for
 which no more specific route exists will be routed to the named EUSE.

+[[iuse_handlers]]
+=== Built-in USSD handlers
+
+OsmoHLR has an Internal USSD Entity (IUSE) that allows to handle some
+USSD requests internally.  It features a set of simple handlers, which
+can be assigned to one or more USSD request prefixes:
+
+* `own-msisdn` returns subscriber's MSISDN (if assigned);
+* `own-imsi` returns subscriber's IMSI.
+
+Additional handlers can be added on request.
+
 === Example EUSE program

 We have provided an example EUSE developed in C language using existing

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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: Ieddde02f3f41e0eb05b7223026da4252c17c3712
Gerrit-Change-Number: 21211
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in osmo-hlr[master]: USSD: add special 'idle' handler to IUSE for testing

2020-11-17 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-hlr/+/21183 )

Change subject: USSD: add special 'idle' handler to IUSE for testing
..


Patch Set 3: Code-Review+2


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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I0d566a60e95ce2da951f22ad47c6155c5b6a338c
Gerrit-Change-Number: 21183
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 17 Nov 2020 21:54:03 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-hlr[master]: doc/manuals: re-organize description of internal USSD handlers

2020-11-17 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-hlr/+/21211 )

Change subject: doc/manuals: re-organize description of internal USSD handlers
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: Ieddde02f3f41e0eb05b7223026da4252c17c3712
Gerrit-Change-Number: 21211
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 17 Nov 2020 21:53:47 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: pcu: Set acceptable logging verbosity for ConsoleMask

2020-11-17 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21136 )

Change subject: pcu: Set acceptable logging verbosity for ConsoleMask
..

pcu: Set acceptable logging verbosity for ConsoleMask

With prior situation it's impossible to follow stdout due to the huge
amount of noise.

Change-Id: I1f49eb26af0d6144f7632320097f2c78d47f3a22
---
M pcu/PCU_Tests.default
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/pcu/PCU_Tests.default b/pcu/PCU_Tests.default
index 9944043..4d6c0a2 100644
--- a/pcu/PCU_Tests.default
+++ b/pcu/PCU_Tests.default
@@ -4,8 +4,9 @@

 [LOGGING]
 #*.FileMask := LOG_ALL
-ConsoleMask := ERROR | WARNING | TESTCASE | TIMEROP_START | DEBUG_ENCDEC | USER
-"ClckGen-0".ConsoleMask := ERROR | USER
+ConsoleMask := ERROR | WARNING | TESTCASE | TIMEROP_START | USER
+PCUIF.ConsoleMask := ERROR | TESTCASE | TIMEROP_START | USER
+"ClckGen-0".ConsoleMask := ERROR

 [MODULE_PARAMETERS]
 SGSN_Components.mp_gb_cfg := {

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21136
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: I1f49eb26af0d6144f7632320097f2c78d47f3a22
Gerrit-Change-Number: 21136
Gerrit-PatchSet: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-ttcn3-hacks[master]: pcu: Implement ACKing EGPRS Dl TBF blocks

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

Change subject: pcu: Implement ACKing EGPRS Dl TBF blocks
..


Patch Set 5: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21127
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: I9f1b621a8365e69d2e1a33d59cb8c7a59639ad94
Gerrit-Change-Number: 21127
Gerrit-PatchSet: 5
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 17 Nov 2020 21:48:31 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-pcu[master]: Support multiplexing of GPRS and EGPRS TBFs in one PDCH

2020-11-17 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/21178 )

Change subject: Support multiplexing of GPRS and EGPRS TBFs in one PDCH
..


Patch Set 3: Code-Review+1


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ib4991c864eda6864533363443f76ae5d999532ae
Gerrit-Change-Number: 21178
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 17 Nov 2020 21:47:35 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-pcu[master]: Implement downgrade to DL MCS1-4 when USF for GPRS_only MS

2020-11-17 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/21179 )

Change subject: Implement downgrade to DL MCS1-4 when USF for GPRS_only MS
..


Patch Set 3: Code-Review+1


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I9af23e175435fe9ae7b0e4119ad52fcd4707b9ca
Gerrit-Change-Number: 21179
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 17 Nov 2020 21:47:23 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: fix TCH/H allocation: use half occupied dyn TS instead of switching m...

2020-11-17 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21203 )

Change subject: fix TCH/H allocation: use half occupied dyn TS instead of 
switching more dyn TS
..


Patch Set 3: Code-Review+2


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I5a8d943f31774af00664d037550be14e767d312a
Gerrit-Change-Number: 21203
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 21:43:57 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: gbproxy: Remove NUM_BVC_PER_NSE constant and constant-sized array

2020-11-17 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21220 )

Change subject: gbproxy: Remove NUM_BVC_PER_NSE constant and constant-sized 
array
..

gbproxy: Remove NUM_BVC_PER_NSE constant and constant-sized array

Let's use a 'record of' with indefinite length in order to be able to
dynamically adjust the number of BSSGP_BVC_CT references based on how
many BVCs we have configured.

Change-Id: Id4aa20ff0b553cb8a1f5a67faa1e7b237fb254b8
---
M gbproxy/GBProxy_Tests.ttcn
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index 874679d..e6c07d7 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -187,13 +187,13 @@
}
 };

-const integer NUM_BVC_PER_NSE := 3;
 type record GbInstance {
NS_CT vc_NS,
BSSGP_CT vc_BSSGP,
-   BSSGP_BVC_CT vc_BSSGP_BVC[NUM_BVC_PER_NSE],
+   BSSGP_BVC_CTs vc_BSSGP_BVC,
BssgpConfig cfg
 };
+type record of BSSGP_BVC_CT BSSGP_BVC_CTs

 const integer NUM_PCU := 3;
 type record of GbInstance GbInstances;

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21220
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: Id4aa20ff0b553cb8a1f5a67faa1e7b237fb254b8
Gerrit-Change-Number: 21220
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-ttcn3-hacks[master]: gbproxy: Wait longer for BVC unblocking at start-up

2020-11-17 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21223 )

Change subject: gbproxy: Wait longer for BVC unblocking at start-up
..

gbproxy: Wait longer for BVC unblocking at start-up

When using NS_Provider_FR, the FR links need some more seconds to come
up than the NS_Provider_IP.

Change-Id: Idf80cf6119b67393fe5cbc0c93f5715daddcae0a
---
M gbproxy/GBProxy_Tests.ttcn
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index 242b7e9..e690f34 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -367,7 +367,7 @@
}

/* wait until all BVC are unblocked on both sides */
-   timer T := 5.0;
+   timer T := 15.0;
T.start;
alt {
[] SGSN_MGMT.receive(BssgpStatusIndication:{*, ?, BVC_S_UNBLOCKED}) -> 
value bsi {

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21223
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: Idf80cf6119b67393fe5cbc0c93f5715daddcae0a
Gerrit-Change-Number: 21223
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-MessageType: merged


Change in osmo-ttcn3-hacks[master]: gbproxy: Allow dynamic connect/disconnect of ConnHdlr at runtime

2020-11-17 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21222 )

Change subject: gbproxy: Allow dynamic connect/disconnect of ConnHdlr at runtime
..

gbproxy: Allow dynamic connect/disconnect of ConnHdlr at runtime

We want to move a virtual subscriber between BVC with one NSE,
but also to other NSE/PCU at runtime.  The number of BVC and NSE
may be large in a given test config, and we really don't need
hundreds of test ports per component;  Instead, reconnect the
test ports to whichever BVC we want at runtime.

Change-Id: I56b088b582f2d070547ee24f2d7a175d84fb5861
---
M gbproxy/GBProxy_Tests.ttcn
1 file changed, 50 insertions(+), 23 deletions(-)

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



diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index 7dd2c17..242b7e9 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -219,12 +219,19 @@
 };

 type component BSSGP_ConnHdlr {
+   /* array of per-BVC ports on the PCU side */
port BSSGP_PT PCU[NUM_PCU];
port BSSGP_PT PCU_SIG[NUM_PCU];
port BSSGP_PROC_PT PCU_PROC[NUM_PCU];
+   /* component reference to the component to which we're currently 
connected */
+   var BSSGP_BVC_CT pcu_ct[NUM_PCU];
+
+   /* array of per-BVC ports on the SGSN side */
port BSSGP_PT SGSN[NUM_SGSN];
port BSSGP_PT SGSN_SIG[NUM_SGSN];
port BSSGP_PROC_PT SGSN_PROC[NUM_SGSN];
+   /* component reference to the component to which we're currently 
connected */
+   var BSSGP_BVC_CT sgsn_ct[NUM_PCU];

var BSSGP_ConnHdlrPars g_pars;
timer g_Tguard;
@@ -252,6 +259,7 @@
OCT4 tlli_old optional,
RoutingAreaIdentificationV ra optional,
GbInstances pcu,
+   GbInstances sgsn,
float t_guard
 };

@@ -428,29 +436,50 @@
tlli_old := omit,
ra := omit,
pcu := g_pcu,
+   sgsn := g_sgsn,
t_guard := t_guard
};

vc_conn := BSSGP_ConnHdlr.create(id);
-   // PDU side
-   connect(vc_conn:PCU[0], pcu[0].vc_BSSGP_BVC[0]:BSSGP_SP);
-   connect(vc_conn:PCU_SIG[0], pcu[0].vc_BSSGP_BVC[0]:BSSGP_SP_SIG);
-   connect(vc_conn:PCU_PROC[0], pcu[0].vc_BSSGP_BVC[0]:BSSGP_PROC);
-   connect(vc_conn:PCU[1], pcu[1].vc_BSSGP_BVC[0]:BSSGP_SP);
-   connect(vc_conn:PCU_SIG[1], pcu[1].vc_BSSGP_BVC[0]:BSSGP_SP_SIG);
-   connect(vc_conn:PCU_PROC[1], pcu[1].vc_BSSGP_BVC[0]:BSSGP_PROC);
-   connect(vc_conn:PCU[2], pcu[2].vc_BSSGP_BVC[0]:BSSGP_SP);
-   connect(vc_conn:PCU_SIG[2], pcu[2].vc_BSSGP_BVC[0]:BSSGP_SP_SIG);
-   connect(vc_conn:PCU_PROC[2], pcu[2].vc_BSSGP_BVC[0]:BSSGP_PROC);
-   // SGSN side
-   connect(vc_conn:SGSN[0], sgsn[0].vc_BSSGP_BVC[0]:BSSGP_SP);
-   connect(vc_conn:SGSN_SIG[0], sgsn[0].vc_BSSGP_BVC[0]:BSSGP_SP_SIG);
-   connect(vc_conn:SGSN_PROC[0], sgsn[0].vc_BSSGP_BVC[0]:BSSGP_PROC);

vc_conn.start(f_handler_init(fn, id, pars));
return vc_conn;
 }

+/* Connect the PCU-side per-BVC ports (PCU/PCU_SIG/PCU_PROC) array slot 
'port_idx' to specified per-BVC component */
+private function f_connect_to_pcu_bvc(integer port_idx, BSSGP_BVC_CT bvc_ct) 
runs on BSSGP_ConnHdlr {
+   if (PCU[port_idx].checkstate("Connected")) {
+   /* unregister + disconnect from old BVC */
+   f_client_unregister(g_pars.imsi, PCU_PROC[port_idx]);
+   disconnect(self:PCU[port_idx], pcu_ct[port_idx]:BSSGP_SP);
+   disconnect(self:PCU_SIG[port_idx], 
pcu_ct[port_idx]:BSSGP_SP_SIG);
+   disconnect(self:PCU_PROC[port_idx], 
pcu_ct[port_idx]:BSSGP_PROC);
+   }
+   /* connect to new BVC and register us */
+   connect(self:PCU[port_idx], bvc_ct:BSSGP_SP);
+   connect(self:PCU_SIG[port_idx], bvc_ct:BSSGP_SP_SIG);
+   connect(self:PCU_PROC[port_idx], bvc_ct:BSSGP_PROC);
+   f_client_register(g_pars.imsi, g_pars.tlli, PCU_PROC[port_idx]);
+   pcu_ct[port_idx] := bvc_ct;
+}
+
+/* Connect the SGSN-side per-BVC ports (SGSN/SGSN_SIG/SGSN_PROC) array slot 
'port_idx' to specified per-BVC component */
+private function f_connect_to_sgsn_bvc(integer port_idx, BSSGP_BVC_CT bvc_ct) 
runs on BSSGP_ConnHdlr {
+   if (SGSN[port_idx].checkstate("Connected")) {
+   /* unregister + disconnect from old BVC */
+   f_client_unregister(g_pars.imsi, SGSN_PROC[port_idx]);
+   disconnect(self:SGSN[port_idx], sgsn_ct[port_idx]:BSSGP_SP);
+   disconnect(self:SGSN_SIG[port_idx], 
sgsn_ct[port_idx]:BSSGP_SP_SIG);
+   disconnect(self:SGSN_PROC[port_idx], 
sgsn_ct[port_idx]:BSSGP_PROC);
+   }
+   /* connect to new BVC and register us */
+   connect(self:SGSN[port_idx], bvc_ct:BSSGP_SP);
+   connect(self:SGSN_SIG[port_idx], bvc_ct:BSSGP_SP_SIG);
+   

Change in osmo-ttcn3-hacks[master]: gbproxy: call f_client_register() only on connected ports

2020-11-17 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21221 )

Change subject: gbproxy: call f_client_register() only on connected ports
..

gbproxy: call f_client_register() only on connected ports

Change-Id: I845d566172918e1948db0579fa846e0972e532c3
---
M gbproxy/GBProxy_Tests.ttcn
1 file changed, 6 insertions(+), 2 deletions(-)

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



diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index e6c07d7..7dd2c17 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -469,10 +469,14 @@

/* register for our IMSI + TLLI */
for (i := 0; i < sizeof(SGSN_PROC); i := i+1) {
-   f_client_register(g_pars.imsi, g_pars.tlli, SGSN_PROC[i]);
+   if (SGSN_PROC[i].checkstate("Connected")) {
+   f_client_register(g_pars.imsi, g_pars.tlli, 
SGSN_PROC[i]);
+   }
}
for (i := 0; i < sizeof(PCU_PROC); i := i+1) {
-   f_client_register(g_pars.imsi, g_pars.tlli, PCU_PROC[i]);
+   if (PCU_PROC[i].checkstate("Connected")) {
+   f_client_register(g_pars.imsi, g_pars.tlli, 
PCU_PROC[i]);
+   }
}

g_Tguard.start(pars.t_guard);

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21221
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: I845d566172918e1948db0579fa846e0972e532c3
Gerrit-Change-Number: 21221
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-MessageType: merged


Change in osmo-ttcn3-hacks[master]: gbproxy: Wait longer for BVC unblocking at start-up

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

Change subject: gbproxy: Wait longer for BVC unblocking at start-up
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21223
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: Idf80cf6119b67393fe5cbc0c93f5715daddcae0a
Gerrit-Change-Number: 21223
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 19:15:30 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: gbproxy: Remove array of three cell IDs

2020-11-17 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21219 )

Change subject: gbproxy: Remove array of three cell IDs
..

gbproxy: Remove array of three cell IDs

The hard-coded array of three cell identifiers in the ConnHdlr
configuration doesn't really reflect situations with a different
number of PCUs than three, and a different count of BVCs than one
per NSE.

Let's pass the entire PCU configuration as parameter into every
ConnHdlr.  This way, the ConnHdlr can learn whatever cell identities
there mgiht be in whatever number of BVCs of each NSE.

Change-Id: I0bb22be612b8aa256c9ee115ee44ea849c4225e1
---
M gbproxy/GBProxy_Tests.ttcn
1 file changed, 14 insertions(+), 11 deletions(-)

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



diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index cec3124..874679d 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -251,7 +251,7 @@
OCT4 tlli,
OCT4 tlli_old optional,
RoutingAreaIdentificationV ra optional,
-   BssgpCellIds bssgp_cell_id,
+   GbInstances pcu,
float t_guard
 };

@@ -427,7 +427,7 @@
tlli := f_gprs_tlli_random(),
tlli_old := omit,
ra := omit,
-   bssgp_cell_id := { pcu[0].cfg.bvc[0].cell_id, 
pcu[1].cfg.bvc[0].cell_id, pcu[2].cfg.bvc[0].cell_id },
+   pcu := g_pcu,
t_guard := t_guard
};

@@ -572,15 +572,16 @@
 }

 friend function f_bssgp_suspend(integer ran_idx := 0) runs on BSSGP_ConnHdlr 
return OCT1 {
+   var BssgpBvcConfig bvcc := g_pars.pcu[ran_idx].cfg.bvc[0];
timer T := 5.0;
var PDU_BSSGP rx_pdu;
-   PCU_SIG[ran_idx].send(ts_BSSGP_SUSPEND(g_pars.tlli, 
g_pars.bssgp_cell_id[ran_idx].ra_id));
+   PCU_SIG[ran_idx].send(ts_BSSGP_SUSPEND(g_pars.tlli, 
bvcc.cell_id.ra_id));
T.start;
alt {
-   [] PCU_SIG[ran_idx].receive(tr_BSSGP_SUSPEND_ACK(g_pars.tlli, 
g_pars.bssgp_cell_id[ran_idx].ra_id, ?)) -> value rx_pdu {
+   [] PCU_SIG[ran_idx].receive(tr_BSSGP_SUSPEND_ACK(g_pars.tlli, 
bvcc.cell_id.ra_id, ?)) -> value rx_pdu {
return 
rx_pdu.pDU_BSSGP_SUSPEND_ACK.suspend_Reference_Number.suspend_Reference_Number_value;
}
-   [] PCU_SIG[ran_idx].receive(tr_BSSGP_SUSPEND_NACK(g_pars.tlli, 
g_pars.bssgp_cell_id[ran_idx].ra_id, ?)) -> value rx_pdu {
+   [] PCU_SIG[ran_idx].receive(tr_BSSGP_SUSPEND_NACK(g_pars.tlli, 
bvcc.cell_id.ra_id, ?)) -> value rx_pdu {
setverdict(fail, "SUSPEND-NACK in response to SUSPEND for TLLI 
", g_pars.tlli);
mtc.stop;
}
@@ -593,13 +594,13 @@
 }

 friend function f_bssgp_resume(OCT1 susp_ref, integer ran_idx := 0) runs on 
BSSGP_ConnHdlr {
+   var BssgpBvcConfig bvcc := g_pars.pcu[ran_idx].cfg.bvc[0];
timer T := 5.0;
-   PCU_SIG[ran_idx].send(ts_BSSGP_RESUME(g_pars.tlli, 
g_pars.bssgp_cell_id[ran_idx].ra_id, susp_ref));
+   PCU_SIG[ran_idx].send(ts_BSSGP_RESUME(g_pars.tlli, bvcc.cell_id.ra_id, 
susp_ref));
T.start;
alt {
-   [] PCU_SIG[ran_idx].receive(tr_BSSGP_RESUME_ACK(g_pars.tlli, 
g_pars.bssgp_cell_id[ran_idx].ra_id));
-   [] PCU_SIG[ran_idx].receive(tr_BSSGP_RESUME_NACK(g_pars.tlli, 
g_pars.bssgp_cell_id[ran_idx].ra_id,
-?)) {
+   [] PCU_SIG[ran_idx].receive(tr_BSSGP_RESUME_ACK(g_pars.tlli, 
bvcc.cell_id.ra_id));
+   [] PCU_SIG[ran_idx].receive(tr_BSSGP_RESUME_NACK(g_pars.tlli, 
bvcc.cell_id.ra_id, ?)) {
setverdict(fail, "RESUME-NACK in response to RESUME for TLLI ", 
g_pars.tlli);
mtc.stop;
}
@@ -613,13 +614,15 @@

 /* send uplink-unitdata of a variety of different sizes; expect it to show up 
on SGSN */
 private function f_TC_ul_unitdata(charstring id) runs on BSSGP_ConnHdlr {
+   var integer ran_idx := 0;
+   var BssgpBvcConfig bvcc := g_pars.pcu[ran_idx].cfg.bvc[0];
var integer i;

for (i := 0; i < 1024; i := i+1) {
var octetstring payload := f_rnd_octstring(i);
-   var template (value) PDU_BSSGP pdu_tx := 
ts_BSSGP_UL_UD(g_pars.tlli, g_pars.bssgp_cell_id[0], payload);
+   var template (value) PDU_BSSGP pdu_tx := 
ts_BSSGP_UL_UD(g_pars.tlli, bvcc.cell_id, payload);
/* we cannot use pdu_tx as there are some subtle differences in 
the length field :/ */
-   var template (present) PDU_BSSGP pdu_rx := 
tr_BSSGP_UL_UD(g_pars.tlli, g_pars.bssgp_cell_id[0], payload);
+   var template (present) PDU_BSSGP pdu_rx := 
tr_BSSGP_UL_UD(g_pars.tlli, bvcc.cell_id, payload);

f_pcu2sgsn(pdu_tx, pdu_rx);
}

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

Change in osmo-ttcn3-hacks[master]: gbproxy: call f_client_register() only on connected ports

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

Change subject: gbproxy: call f_client_register() only on connected ports
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21221
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: I845d566172918e1948db0579fa846e0972e532c3
Gerrit-Change-Number: 21221
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 19:15:13 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: gbproxy: Allow dynamic connect/disconnect of ConnHdlr at runtime

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

Change subject: gbproxy: Allow dynamic connect/disconnect of ConnHdlr at runtime
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21222
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: I56b088b582f2d070547ee24f2d7a175d84fb5861
Gerrit-Change-Number: 21222
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 19:15:20 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: gbproxy: Remove NUM_BVC_PER_NSE constant and constant-sized array

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

Change subject: gbproxy: Remove NUM_BVC_PER_NSE constant and constant-sized 
array
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21220
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: Id4aa20ff0b553cb8a1f5a67faa1e7b237fb254b8
Gerrit-Change-Number: 21220
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 19:15:08 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: gbproxy: Remove array of three cell IDs

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

Change subject: gbproxy: Remove array of three cell IDs
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21219
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: I0bb22be612b8aa256c9ee115ee44ea849c4225e1
Gerrit-Change-Number: 21219
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 19:15:03 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: gbproxy: Wait longer for BVC unblocking at start-up

2020-11-17 Thread laforge
Hello Jenkins Builder,

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

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

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

Change subject: gbproxy: Wait longer for BVC unblocking at start-up
..

gbproxy: Wait longer for BVC unblocking at start-up

When using NS_Provider_FR, the FR links need some more seconds to come
up than the NS_Provider_IP.

Change-Id: Idf80cf6119b67393fe5cbc0c93f5715daddcae0a
---
M gbproxy/GBProxy_Tests.ttcn
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/23/21223/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21223
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: Idf80cf6119b67393fe5cbc0c93f5715daddcae0a
Gerrit-Change-Number: 21223
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-MessageType: newpatchset


Change in osmo-ttcn3-hacks[master]: gbproxy: Allow dynamic connect/disconnect of ConnHdlr at runtime

2020-11-17 Thread laforge
Hello Jenkins Builder,

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

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

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

Change subject: gbproxy: Allow dynamic connect/disconnect of ConnHdlr at runtime
..

gbproxy: Allow dynamic connect/disconnect of ConnHdlr at runtime

We want to move a virtual subscriber between BVC with one NSE,
but also to other NSE/PCU at runtime.  The number of BVC and NSE
may be large in a given test config, and we really don't need
hundreds of test ports per component;  Instead, reconnect the
test ports to whichever BVC we want at runtime.

Change-Id: I56b088b582f2d070547ee24f2d7a175d84fb5861
---
M gbproxy/GBProxy_Tests.ttcn
1 file changed, 50 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/22/21222/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21222
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: I56b088b582f2d070547ee24f2d7a175d84fb5861
Gerrit-Change-Number: 21222
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-MessageType: newpatchset


Change in osmo-ttcn3-hacks[master]: gbproxy: call f_client_register() only on connected ports

2020-11-17 Thread laforge
Hello Jenkins Builder,

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

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

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

Change subject: gbproxy: call f_client_register() only on connected ports
..

gbproxy: call f_client_register() only on connected ports

Change-Id: I845d566172918e1948db0579fa846e0972e532c3
---
M gbproxy/GBProxy_Tests.ttcn
1 file changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/21/21221/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21221
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: I845d566172918e1948db0579fa846e0972e532c3
Gerrit-Change-Number: 21221
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-MessageType: newpatchset


Change in osmo-ttcn3-hacks[master]: gbproxy: Fix SGSN side initialization for more than one SGSN

2020-11-17 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21218 )

Change subject: gbproxy: Fix SGSN side initialization for more than one SGSN
..

gbproxy: Fix SGSN side initialization for more than one SGSN

Change-Id: I4c64bf02a805a959626f6915d9dd72aa7622b24a
---
M gbproxy/GBProxy_Tests.ttcn
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index bd56510..cec3124 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -351,7 +351,7 @@

f_init_vty();
for (i := 0; i < lengthof(mp_nsconfig_sgsn); i := i+1) {
-   f_init_gb_sgsn(g_sgsn[0], "GbProxy_Test", 0);
+   f_init_gb_sgsn(g_sgsn[i], "GbProxy_Test", i);
}
f_sleep(4.0);
for (i := 0; i < lengthof(mp_nsconfig_pcu); i := i+1) {

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21218
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: I4c64bf02a805a959626f6915d9dd72aa7622b24a
Gerrit-Change-Number: 21218
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-ttcn3-hacks[master]: gbproxy: Include support for NS over Frame Relay

2020-11-17 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21213 )

Change subject: gbproxy: Include support for NS over Frame Relay
..

gbproxy: Include support for NS over Frame Relay

Change-Id: I5ba84b9eebf7c330f7ff55f5e99c6fd5972c7123
---
M gbproxy/gen_links.sh
M gbproxy/regen_makefile.sh
2 files changed, 8 insertions(+), 2 deletions(-)

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



diff --git a/gbproxy/gen_links.sh b/gbproxy/gen_links.sh
index 46898f4..a614191 100755
--- a/gbproxy/gen_links.sh
+++ b/gbproxy/gen_links.sh
@@ -77,9 +77,14 @@
 FILES="SCCP_Emulation.ttcn  SCCP_EncDec.cc  SCCP_Mapping.ttcnpp  
SCCP_Types.ttcn  SCCPasp_Types.ttcn"
 gen_links $DIR $FILES

+DIR=$BASEDIR/titan.TestPorts.AF_PACKET/src
+FILES="AF_PACKET_PT.cc AF_PACKET_PT.hh AF_PACKET_PortType.ttcn 
AF_PACKET_PortTypes.ttcn "
+FILES+="FrameRelay_Types.ttcn FrameRelay_CodecPort.ttcn 
FrameRelay_Emulation.ttcn Q931_Types.ttcn Q933_Types.ttcn "
+gen_links $DIR $FILES
+
 DIR=../library
 FILES="Misc_Helpers.ttcn General_Types.ttcn GSM_Types.ttcn GSM_RR_Types.ttcn 
Osmocom_Types.ttcn RLCMAC_Templates.ttcn RLCMAC_Types.ttcn 
RLCMAC_CSN1_Templates.ttcn RLCMAC_CSN1_Types.ttcn RLCMAC_EncDec.cc "
-FILES+="NS_Provider_IPL4.ttcn NS_Emulation.ttcnpp NS_CodecPort.ttcn 
NS_CodecPort_CtrlFunct.ttcn NS_CodecPort_CtrlFunctDef.cc "
+FILES+="NS_Provider_IPL4.ttcn NS_Provider_FR.ttcn NS_Emulation.ttcnpp 
NS_CodecPort.ttcn NS_CodecPort_CtrlFunct.ttcn NS_CodecPort_CtrlFunctDef.cc "
 FILES+="BSSGP_Emulation.ttcnpp Osmocom_Gb_Types.ttcn "
 FILES+="PCUIF_Types.ttcn "
 FILES+="Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn 
Osmocom_CTRL_Adapter.ttcn "
diff --git a/gbproxy/regen_makefile.sh b/gbproxy/regen_makefile.sh
index fbbd1b3..34bd3f4 100755
--- a/gbproxy/regen_makefile.sh
+++ b/gbproxy/regen_makefile.sh
@@ -1,8 +1,9 @@
 #!/bin/sh

 FILES="*.ttcn *.ttcnpp BSSGP_EncDec.cc LLC_EncDec.cc IPL4asp_PT.cc 
IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc 
NS_CodecPort_CtrlFunctDef.cc RLCMAC_EncDec.cc Native_FunctionDefs.cc 
TELNETasp_PT.cc IPA_CodecPort_CtrlFunctDef.cc GTPU_EncDec.cc GTPC_EncDec.cc 
GTP_CodecPort_CtrlFunctDef.cc SCCP_EncDec.cc  SCTPasp_PT.cc "
+FILES+="AF_PACKET_PT.cc AF_PACKET_PT.hh "

-export CPPFLAGS_TTCN3="-DIPA_EMULATION_GSUP -DIPA_EMULATION_CTRL 
-DUSE_MTP3_DISTRIBUTOR -DBSSGP_EM_L3"
+export CPPFLAGS_TTCN3="-DIPA_EMULATION_GSUP -DIPA_EMULATION_CTRL 
-DUSE_MTP3_DISTRIBUTOR -DBSSGP_EM_L3 -DNS_EMULATION_FR"

 ../regen-makefile.sh GBProxy_Tests.ttcn $FILES
 

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21213
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: I5ba84b9eebf7c330f7ff55f5e99c6fd5972c7123
Gerrit-Change-Number: 21213
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-ttcn3-hacks[master]: NS_Emulation: Fail if an unsupported NS provider is chosen

2020-11-17 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21212 )

Change subject: NS_Emulation: Fail if an unsupported NS provider is chosen
..

NS_Emulation: Fail if an unsupported NS provider is chosen

This took me quite some time: Tried to use NS_PROVIDER_FR, but the
code was compiled without support for it.  It just failed silently
without printing any error or ever sending any message on the FR link.

Change-Id: I96475127a2079830b3456a8e288adf4c6c908887
---
M library/NS_Emulation.ttcnpp
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/library/NS_Emulation.ttcnpp b/library/NS_Emulation.ttcnpp
index 19de9d3..2e03880 100644
--- a/library/NS_Emulation.ttcnpp
+++ b/library/NS_Emulation.ttcnpp
@@ -382,6 +382,8 @@
connect(self:NSCP, vc_NSP_FR:NSE);
vc_NSP_FR.start(NS_Provider_FR.main(g_nsvc_config, 
g_config, id));
 #endif
+   } else {
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, 
"Unsupported NS provider");
}

f_change_state(NSVC_S_DEAD_BLOCKED);

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21212
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: I96475127a2079830b3456a8e288adf4c6c908887
Gerrit-Change-Number: 21212
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-ttcn3-hacks[master]: gbproxy: Include support for NS over Frame Relay

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

Change subject: gbproxy: Include support for NS over Frame Relay
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21213
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: I5ba84b9eebf7c330f7ff55f5e99c6fd5972c7123
Gerrit-Change-Number: 21213
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 19:11:05 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: NS_Emulation: Fail if an unsupported NS provider is chosen

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

Change subject: NS_Emulation: Fail if an unsupported NS provider is chosen
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21212
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: I96475127a2079830b3456a8e288adf4c6c908887
Gerrit-Change-Number: 21212
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 19:10:57 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: gbproxy: Wait longer for BVC unblocking at start-up

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

Change subject: gbproxy: Wait longer for BVC unblocking at start-up
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21223/1//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21223/1//COMMIT_MSG@10
PS1, Line 10: up than he NS_Provider_IP.
he?



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21223
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: Idf80cf6119b67393fe5cbc0c93f5715daddcae0a
Gerrit-Change-Number: 21223
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 18:54:38 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: gbproxy: Allow dynamic connec/disconnect of ConnHdlr at runtime

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

Change subject: gbproxy: Allow dynamic connec/disconnect of ConnHdlr at runtime
..


Patch Set 1:

(2 comments)

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21222/1//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21222/1//COMMIT_MSG@7
PS1, Line 7: gbproxy: Allow dynamic connec/disconnect of ConnHdlr at runtime
typo: connect


https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21222/1//COMMIT_MSG@9
PS1, Line 9: We want to move a virtual subscriber between BVC wihi one NSE,
wihi? wihi!



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21222
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: I56b088b582f2d070547ee24f2d7a175d84fb5861
Gerrit-Change-Number: 21222
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 18:53:53 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: gbproxy: fall f_client_register() only on connected ports

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

Change subject: gbproxy: fall f_client_register() only on connected ports
..


Patch Set 1:

typo: call


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21221
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: I845d566172918e1948db0579fa846e0972e532c3
Gerrit-Change-Number: 21221
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 18:52:38 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: gbproxy: fall f_client_register() only on connected ports

2020-11-17 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21221 )


Change subject: gbproxy: fall f_client_register() only on connected ports
..

gbproxy: fall f_client_register() only on connected ports

Change-Id: I845d566172918e1948db0579fa846e0972e532c3
---
M gbproxy/GBProxy_Tests.ttcn
1 file changed, 6 insertions(+), 2 deletions(-)



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

diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index e6c07d7..7dd2c17 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -469,10 +469,14 @@

/* register for our IMSI + TLLI */
for (i := 0; i < sizeof(SGSN_PROC); i := i+1) {
-   f_client_register(g_pars.imsi, g_pars.tlli, SGSN_PROC[i]);
+   if (SGSN_PROC[i].checkstate("Connected")) {
+   f_client_register(g_pars.imsi, g_pars.tlli, 
SGSN_PROC[i]);
+   }
}
for (i := 0; i < sizeof(PCU_PROC); i := i+1) {
-   f_client_register(g_pars.imsi, g_pars.tlli, PCU_PROC[i]);
+   if (PCU_PROC[i].checkstate("Connected")) {
+   f_client_register(g_pars.imsi, g_pars.tlli, 
PCU_PROC[i]);
+   }
}

g_Tguard.start(pars.t_guard);

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21221
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: I845d566172918e1948db0579fa846e0972e532c3
Gerrit-Change-Number: 21221
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in osmo-ttcn3-hacks[master]: gbproxy: Wait longer for BVC unblocking at start-up

2020-11-17 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21223 )


Change subject: gbproxy: Wait longer for BVC unblocking at start-up
..

gbproxy: Wait longer for BVC unblocking at start-up

When using NS_Provider_FR, the FR links need some more seconds to come
up than he NS_Provider_IP.

Change-Id: Idf80cf6119b67393fe5cbc0c93f5715daddcae0a
---
M gbproxy/GBProxy_Tests.ttcn
1 file changed, 1 insertion(+), 1 deletion(-)



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

diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index 242b7e9..e690f34 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -367,7 +367,7 @@
}

/* wait until all BVC are unblocked on both sides */
-   timer T := 5.0;
+   timer T := 15.0;
T.start;
alt {
[] SGSN_MGMT.receive(BssgpStatusIndication:{*, ?, BVC_S_UNBLOCKED}) -> 
value bsi {

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21223
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: Idf80cf6119b67393fe5cbc0c93f5715daddcae0a
Gerrit-Change-Number: 21223
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in osmo-ttcn3-hacks[master]: gbproxy: Allow dynamic connec/disconnect of ConnHdlr at runtime

2020-11-17 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21222 )


Change subject: gbproxy: Allow dynamic connec/disconnect of ConnHdlr at runtime
..

gbproxy: Allow dynamic connec/disconnect of ConnHdlr at runtime

We want to move a virtual subscriber between BVC wihi one NSE,
but also to other NSE/PCU at runtime.  The number of BVC and NSE
may be large in a given test config, and we really don't need
hundreds of test ports per component;  Instead, reconnect the
test ports to whichever BVC we want at runtime.

Change-Id: I56b088b582f2d070547ee24f2d7a175d84fb5861
---
M gbproxy/GBProxy_Tests.ttcn
1 file changed, 50 insertions(+), 23 deletions(-)



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

diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index 7dd2c17..242b7e9 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -219,12 +219,19 @@
 };

 type component BSSGP_ConnHdlr {
+   /* array of per-BVC ports on the PCU side */
port BSSGP_PT PCU[NUM_PCU];
port BSSGP_PT PCU_SIG[NUM_PCU];
port BSSGP_PROC_PT PCU_PROC[NUM_PCU];
+   /* component reference to the component to which we're currently 
connected */
+   var BSSGP_BVC_CT pcu_ct[NUM_PCU];
+
+   /* array of per-BVC ports on the SGSN side */
port BSSGP_PT SGSN[NUM_SGSN];
port BSSGP_PT SGSN_SIG[NUM_SGSN];
port BSSGP_PROC_PT SGSN_PROC[NUM_SGSN];
+   /* component reference to the component to which we're currently 
connected */
+   var BSSGP_BVC_CT sgsn_ct[NUM_PCU];

var BSSGP_ConnHdlrPars g_pars;
timer g_Tguard;
@@ -252,6 +259,7 @@
OCT4 tlli_old optional,
RoutingAreaIdentificationV ra optional,
GbInstances pcu,
+   GbInstances sgsn,
float t_guard
 };

@@ -428,29 +436,50 @@
tlli_old := omit,
ra := omit,
pcu := g_pcu,
+   sgsn := g_sgsn,
t_guard := t_guard
};

vc_conn := BSSGP_ConnHdlr.create(id);
-   // PDU side
-   connect(vc_conn:PCU[0], pcu[0].vc_BSSGP_BVC[0]:BSSGP_SP);
-   connect(vc_conn:PCU_SIG[0], pcu[0].vc_BSSGP_BVC[0]:BSSGP_SP_SIG);
-   connect(vc_conn:PCU_PROC[0], pcu[0].vc_BSSGP_BVC[0]:BSSGP_PROC);
-   connect(vc_conn:PCU[1], pcu[1].vc_BSSGP_BVC[0]:BSSGP_SP);
-   connect(vc_conn:PCU_SIG[1], pcu[1].vc_BSSGP_BVC[0]:BSSGP_SP_SIG);
-   connect(vc_conn:PCU_PROC[1], pcu[1].vc_BSSGP_BVC[0]:BSSGP_PROC);
-   connect(vc_conn:PCU[2], pcu[2].vc_BSSGP_BVC[0]:BSSGP_SP);
-   connect(vc_conn:PCU_SIG[2], pcu[2].vc_BSSGP_BVC[0]:BSSGP_SP_SIG);
-   connect(vc_conn:PCU_PROC[2], pcu[2].vc_BSSGP_BVC[0]:BSSGP_PROC);
-   // SGSN side
-   connect(vc_conn:SGSN[0], sgsn[0].vc_BSSGP_BVC[0]:BSSGP_SP);
-   connect(vc_conn:SGSN_SIG[0], sgsn[0].vc_BSSGP_BVC[0]:BSSGP_SP_SIG);
-   connect(vc_conn:SGSN_PROC[0], sgsn[0].vc_BSSGP_BVC[0]:BSSGP_PROC);

vc_conn.start(f_handler_init(fn, id, pars));
return vc_conn;
 }

+/* Connect the PCU-side per-BVC ports (PCU/PCU_SIG/PCU_PROC) array slot 
'port_idx' to specified per-BVC component */
+private function f_connect_to_pcu_bvc(integer port_idx, BSSGP_BVC_CT bvc_ct) 
runs on BSSGP_ConnHdlr {
+   if (PCU[port_idx].checkstate("Connected")) {
+   /* unregister + disconnect from old BVC */
+   f_client_unregister(g_pars.imsi, PCU_PROC[port_idx]);
+   disconnect(self:PCU[port_idx], pcu_ct[port_idx]:BSSGP_SP);
+   disconnect(self:PCU_SIG[port_idx], 
pcu_ct[port_idx]:BSSGP_SP_SIG);
+   disconnect(self:PCU_PROC[port_idx], 
pcu_ct[port_idx]:BSSGP_PROC);
+   }
+   /* connect to new BVC and register us */
+   connect(self:PCU[port_idx], bvc_ct:BSSGP_SP);
+   connect(self:PCU_SIG[port_idx], bvc_ct:BSSGP_SP_SIG);
+   connect(self:PCU_PROC[port_idx], bvc_ct:BSSGP_PROC);
+   f_client_register(g_pars.imsi, g_pars.tlli, PCU_PROC[port_idx]);
+   pcu_ct[port_idx] := bvc_ct;
+}
+
+/* Connect the SGSN-side per-BVC ports (SGSN/SGSN_SIG/SGSN_PROC) array slot 
'port_idx' to specified per-BVC component */
+private function f_connect_to_sgsn_bvc(integer port_idx, BSSGP_BVC_CT bvc_ct) 
runs on BSSGP_ConnHdlr {
+   if (SGSN[port_idx].checkstate("Connected")) {
+   /* unregister + disconnect from old BVC */
+   f_client_unregister(g_pars.imsi, SGSN_PROC[port_idx]);
+   disconnect(self:SGSN[port_idx], sgsn_ct[port_idx]:BSSGP_SP);
+   disconnect(self:SGSN_SIG[port_idx], 
sgsn_ct[port_idx]:BSSGP_SP_SIG);
+   disconnect(self:SGSN_PROC[port_idx], 
sgsn_ct[port_idx]:BSSGP_PROC);
+   }
+   /* connect to new BVC and register us */
+   connect(self:SGSN[port_idx], bvc_ct:BSSGP_SP);
+   connect(self:SGSN_SIG[port_idx], bvc_ct:BSSGP_SP_SIG);
+   

Change in osmo-ttcn3-hacks[master]: gbproxy: Remove array of three cell IDs

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

Change subject: gbproxy: Remove array of three cell IDs
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21219
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: I0bb22be612b8aa256c9ee115ee44ea849c4225e1
Gerrit-Change-Number: 21219
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 18:02:19 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: gbproxy: Remove NUM_BVC_PER_NSE constant and constant-sized array

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

Change subject: gbproxy: Remove NUM_BVC_PER_NSE constant and constant-sized 
array
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21220
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: Id4aa20ff0b553cb8a1f5a67faa1e7b237fb254b8
Gerrit-Change-Number: 21220
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 18:01:34 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: gbproxy: Fix SGSN side initialization for more than one SGSN

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

Change subject: gbproxy: Fix SGSN side initialization for more than one SGSN
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21218
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: I4c64bf02a805a959626f6915d9dd72aa7622b24a
Gerrit-Change-Number: 21218
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 18:01:05 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-gsm-tester[master]: Modems: Introduce Android UEs

2020-11-17 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21217 )

Change subject: Modems: Introduce Android UEs
..


Patch Set 1: Code-Review-1

(30 comments)

https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21217/1//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21217/1//COMMIT_MSG@9
PS1, Line 9: To expand the test capacities we would like to introduce
I'm really lacking here some description on the setup to understand how the 
android phones are used, how are they hooked to OGT.


https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21217/1/src/osmo_gsm_tester/core/process.py
File src/osmo_gsm_tester/core/process.py:

https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21217/1/src/osmo_gsm_tester/core/process.py@391
PS1, Line 391: self.remote_port = remote_port
Please add the port param as a different patch prior to the android one (this 
patch).


https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21217/1/src/osmo_gsm_tester/core/process.py@400
PS1, Line 400: self.remote_user = 'root'
All of this needs to get out from here. In the end is simply setting the 
remote_user to root which can be passed as an argument...


https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21217/1/src/osmo_gsm_tester/core/process.py@419
PS1, Line 419: if is_ue_cmd:
this is not really UE/android specific, please introduce the port feature 
generically.


https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21217/1/src/osmo_gsm_tester/core/process.py@464
PS1, Line 464: run_dir = run_dir.new_dir(name)
This is a separate patch.


https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21217/1/src/osmo_gsm_tester/core/process.py@476
PS1, Line 476: run_dir = run_dir.new_dir(name)
This too, in the same patch as line 464.


https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21217/1/src/osmo_gsm_tester/core/process.py@480
PS1, Line 480:
Different patch.


https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21217/1/src/osmo_gsm_tester/core/remote.py
File src/osmo_gsm_tester/core/remote.py:

https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21217/1/src/osmo_gsm_tester/core/remote.py@31
PS1, Line 31: def __init__(self, run_dir, remote_user = 'root', remote_host 
= 'localhost', remote_cwd=None, remote_port=None):
This all goes into the generic "add port" patch.


https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21217/1/src/osmo_gsm_tester/obj/enb_srs.py
File src/osmo_gsm_tester/obj/enb_srs.py:

https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21217/1/src/osmo_gsm_tester/obj/enb_srs.py@117
PS1, Line 117: MainLoop.sleep(3)
What's this?


https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21217/1/src/osmo_gsm_tester/obj/iperf3.py
File src/osmo_gsm_tester/obj/iperf3.py:

https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21217/1/src/osmo_gsm_tester/obj/iperf3.py@269
PS1, Line 269: if self._run_node.is_local() and ue.ue_serial:
This most probably needs to go into a subclass of RemoteProcess or Process or 
alike.


https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21217/1/src/osmo_gsm_tester/obj/iperf3.py@291
PS1, Line 291:   None, 
self._run_node.ssh_port())
This goes into the "add port patch".


https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21217/1/src/osmo_gsm_tester/obj/ms_android.py
File src/osmo_gsm_tester/obj/ms_android.py:

https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21217/1/src/osmo_gsm_tester/obj/ms_android.py@1
PS1, Line 1: # Author: Nils Fürste 
Please add a Copyright header with license.


https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21217/1/src/osmo_gsm_tester/obj/ms_android.py@38
PS1, Line 38: class AndroidUE(MS, srslte_common):
Please split all the methods in this class according to their scope. I know 
it's not done perfectly in lots of places but let's do it here since there's 
lots of code. Use the following categories, see obj/bts.py as an example:

##
# PROTECTED
##


# PUBLIC - INTERNAL API


###
# PUBLIC (test API included)
###

You can get an idea of what is what by looking at other ms classes and which 
methods are used by tests, or by other classes inside obj/ or core/.


https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21217/1/src/osmo_gsm_tester/obj/ms_android.py@75
PS1, Line 75:
Drop space


https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21217/1/src/osmo_gsm_tester/obj/ms_android.py@80
PS1, Line 80: if self.enable_pcap:
use this boolean when calling this method, not here. Or at least use early 
return.

if not self.enable_pcap:
return


https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21217/1/src/osmo_gsm_tester/obj/ms_android.py@85
PS1, Line 85: diag_parser_proc.launch()
tis launch needs to go after the if/else. Actually you don't need to scp 
back if you are running locally... so you can drop the if and the 

Change in osmo-ttcn3-hacks[master]: gbproxy: Remove array of three cell IDs

2020-11-17 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21219 )


Change subject: gbproxy: Remove array of three cell IDs
..

gbproxy: Remove array of three cell IDs

The hard-coded array of three cell identifiers in the ConnHdlr
configuration doesn't really reflect situations with a different
number of PCUs than three, and a different count of BVCs than one
per NSE.

Let's pass the entire PCU configuration as parameter into every
ConnHdlr.  This way, the ConnHdlr can learn whatever cell identities
there mgiht be in whatever number of BVCs of each NSE.

Change-Id: I0bb22be612b8aa256c9ee115ee44ea849c4225e1
---
M gbproxy/GBProxy_Tests.ttcn
1 file changed, 14 insertions(+), 11 deletions(-)



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

diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index cec3124..874679d 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -251,7 +251,7 @@
OCT4 tlli,
OCT4 tlli_old optional,
RoutingAreaIdentificationV ra optional,
-   BssgpCellIds bssgp_cell_id,
+   GbInstances pcu,
float t_guard
 };

@@ -427,7 +427,7 @@
tlli := f_gprs_tlli_random(),
tlli_old := omit,
ra := omit,
-   bssgp_cell_id := { pcu[0].cfg.bvc[0].cell_id, 
pcu[1].cfg.bvc[0].cell_id, pcu[2].cfg.bvc[0].cell_id },
+   pcu := g_pcu,
t_guard := t_guard
};

@@ -572,15 +572,16 @@
 }

 friend function f_bssgp_suspend(integer ran_idx := 0) runs on BSSGP_ConnHdlr 
return OCT1 {
+   var BssgpBvcConfig bvcc := g_pars.pcu[ran_idx].cfg.bvc[0];
timer T := 5.0;
var PDU_BSSGP rx_pdu;
-   PCU_SIG[ran_idx].send(ts_BSSGP_SUSPEND(g_pars.tlli, 
g_pars.bssgp_cell_id[ran_idx].ra_id));
+   PCU_SIG[ran_idx].send(ts_BSSGP_SUSPEND(g_pars.tlli, 
bvcc.cell_id.ra_id));
T.start;
alt {
-   [] PCU_SIG[ran_idx].receive(tr_BSSGP_SUSPEND_ACK(g_pars.tlli, 
g_pars.bssgp_cell_id[ran_idx].ra_id, ?)) -> value rx_pdu {
+   [] PCU_SIG[ran_idx].receive(tr_BSSGP_SUSPEND_ACK(g_pars.tlli, 
bvcc.cell_id.ra_id, ?)) -> value rx_pdu {
return 
rx_pdu.pDU_BSSGP_SUSPEND_ACK.suspend_Reference_Number.suspend_Reference_Number_value;
}
-   [] PCU_SIG[ran_idx].receive(tr_BSSGP_SUSPEND_NACK(g_pars.tlli, 
g_pars.bssgp_cell_id[ran_idx].ra_id, ?)) -> value rx_pdu {
+   [] PCU_SIG[ran_idx].receive(tr_BSSGP_SUSPEND_NACK(g_pars.tlli, 
bvcc.cell_id.ra_id, ?)) -> value rx_pdu {
setverdict(fail, "SUSPEND-NACK in response to SUSPEND for TLLI 
", g_pars.tlli);
mtc.stop;
}
@@ -593,13 +594,13 @@
 }
 
 friend function f_bssgp_resume(OCT1 susp_ref, integer ran_idx := 0) runs on 
BSSGP_ConnHdlr {
+   var BssgpBvcConfig bvcc := g_pars.pcu[ran_idx].cfg.bvc[0];
timer T := 5.0;
-   PCU_SIG[ran_idx].send(ts_BSSGP_RESUME(g_pars.tlli, 
g_pars.bssgp_cell_id[ran_idx].ra_id, susp_ref));
+   PCU_SIG[ran_idx].send(ts_BSSGP_RESUME(g_pars.tlli, bvcc.cell_id.ra_id, 
susp_ref));
T.start;
alt {
-   [] PCU_SIG[ran_idx].receive(tr_BSSGP_RESUME_ACK(g_pars.tlli, 
g_pars.bssgp_cell_id[ran_idx].ra_id));
-   [] PCU_SIG[ran_idx].receive(tr_BSSGP_RESUME_NACK(g_pars.tlli, 
g_pars.bssgp_cell_id[ran_idx].ra_id,
-?)) {
+   [] PCU_SIG[ran_idx].receive(tr_BSSGP_RESUME_ACK(g_pars.tlli, 
bvcc.cell_id.ra_id));
+   [] PCU_SIG[ran_idx].receive(tr_BSSGP_RESUME_NACK(g_pars.tlli, 
bvcc.cell_id.ra_id, ?)) {
setverdict(fail, "RESUME-NACK in response to RESUME for TLLI ", 
g_pars.tlli);
mtc.stop;
}
@@ -613,13 +614,15 @@

 /* send uplink-unitdata of a variety of different sizes; expect it to show up 
on SGSN */
 private function f_TC_ul_unitdata(charstring id) runs on BSSGP_ConnHdlr {
+   var integer ran_idx := 0;
+   var BssgpBvcConfig bvcc := g_pars.pcu[ran_idx].cfg.bvc[0];
var integer i;

for (i := 0; i < 1024; i := i+1) {
var octetstring payload := f_rnd_octstring(i);
-   var template (value) PDU_BSSGP pdu_tx := 
ts_BSSGP_UL_UD(g_pars.tlli, g_pars.bssgp_cell_id[0], payload);
+   var template (value) PDU_BSSGP pdu_tx := 
ts_BSSGP_UL_UD(g_pars.tlli, bvcc.cell_id, payload);
/* we cannot use pdu_tx as there are some subtle differences in 
the length field :/ */
-   var template (present) PDU_BSSGP pdu_rx := 
tr_BSSGP_UL_UD(g_pars.tlli, g_pars.bssgp_cell_id[0], payload);
+   var template (present) PDU_BSSGP pdu_rx := 
tr_BSSGP_UL_UD(g_pars.tlli, bvcc.cell_id, payload);

f_pcu2sgsn(pdu_tx, pdu_rx);
}

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

Change in osmo-ttcn3-hacks[master]: gbproxy: Remove NUM_BVC_PER_NSE constant and constant-sized array

2020-11-17 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21220 )


Change subject: gbproxy: Remove NUM_BVC_PER_NSE constant and constant-sized 
array
..

gbproxy: Remove NUM_BVC_PER_NSE constant and constant-sized array

Let's use a 'record of' with indefinite length in order to be able to
dynamically adjust the number of BSSGP_BVC_CT references based on how
many BVCs we have configured.

Change-Id: Id4aa20ff0b553cb8a1f5a67faa1e7b237fb254b8
---
M gbproxy/GBProxy_Tests.ttcn
1 file changed, 2 insertions(+), 2 deletions(-)



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

diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index 874679d..e6c07d7 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -187,13 +187,13 @@
}
 };

-const integer NUM_BVC_PER_NSE := 3;
 type record GbInstance {
NS_CT vc_NS,
BSSGP_CT vc_BSSGP,
-   BSSGP_BVC_CT vc_BSSGP_BVC[NUM_BVC_PER_NSE],
+   BSSGP_BVC_CTs vc_BSSGP_BVC,
BssgpConfig cfg
 };
+type record of BSSGP_BVC_CT BSSGP_BVC_CTs

 const integer NUM_PCU := 3;
 type record of GbInstance GbInstances;

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21220
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: Id4aa20ff0b553cb8a1f5a67faa1e7b237fb254b8
Gerrit-Change-Number: 21220
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in osmo-ttcn3-hacks[master]: gbproxy: Fix SGSN side initialization for more than one SGSN

2020-11-17 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21218 )


Change subject: gbproxy: Fix SGSN side initialization for more than one SGSN
..

gbproxy: Fix SGSN side initialization for more than one SGSN

Change-Id: I4c64bf02a805a959626f6915d9dd72aa7622b24a
---
M gbproxy/GBProxy_Tests.ttcn
1 file changed, 1 insertion(+), 1 deletion(-)



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

diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index bd56510..cec3124 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -351,7 +351,7 @@

f_init_vty();
for (i := 0; i < lengthof(mp_nsconfig_sgsn); i := i+1) {
-   f_init_gb_sgsn(g_sgsn[0], "GbProxy_Test", 0);
+   f_init_gb_sgsn(g_sgsn[i], "GbProxy_Test", i);
}
f_sleep(4.0);
for (i := 0; i < lengthof(mp_nsconfig_pcu); i := i+1) {

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21218
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: I4c64bf02a805a959626f6915d9dd72aa7622b24a
Gerrit-Change-Number: 21218
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in osmo-gsm-tester[master]: enb_srs: add QAM64 support for UL

2020-11-17 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21216 )

Change subject: enb_srs: add QAM64 support for UL
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: I6ac2c9989a761e91b93d76c2507f55f0140b202d
Gerrit-Change-Number: 21216
Gerrit-PatchSet: 2
Gerrit-Owner: srs_andre 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 17:16:37 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-gsm-tester[master]: mod-enb-{ncells, nprb}: define parameter for 2 cells

2020-11-17 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21215 )

Change subject: mod-enb-{ncells,nprb}: define parameter for 2 cells
..


Patch Set 1: Code-Review-1

AFAIU you cannot do that, it will mess (or even fail) when you use that in 
suites requesting only 1 ENB. You need to add new scenario files (use "2enb" 
instead of "enb" in the name), or if it makes sense, add it to suite.conf so it 
is always applied when the suite is run.


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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: I626aa0a52071c497a292589a0a2b1d8d6aed917f
Gerrit-Change-Number: 21215
Gerrit-PatchSet: 1
Gerrit-Owner: srs_andre 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 17:15:30 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-gsm-tester[master]: cell_modifiers: refactor HO cell configs

2020-11-17 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21214 )

Change subject: cell_modifiers: refactor HO cell configs
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: Icc1fe5c1711ecbed2f1b8b1e6a0b51c2d28ec651
Gerrit-Change-Number: 21214
Gerrit-PatchSet: 1
Gerrit-Owner: srs_andre 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 17:13:18 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: gbproxy: Include support for NS over Frame Relay

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

Change subject: gbproxy: Include support for NS over Frame Relay
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21213
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: I5ba84b9eebf7c330f7ff55f5e99c6fd5972c7123
Gerrit-Change-Number: 21213
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 17:11:50 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: NS_Emulation: Fail if an unsupported NS provider is chosen

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

Change subject: NS_Emulation: Fail if an unsupported NS provider is chosen
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21212
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: I96475127a2079830b3456a8e288adf4c6c908887
Gerrit-Change-Number: 21212
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 17:11:17 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: hodec 2: favor moving dyn TS

2020-11-17 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21204 )

Change subject: hodec 2: favor moving dyn TS
..


Patch Set 4:

(1 comment)

https://gerrit.osmocom.org/c/osmo-bsc/+/21204/4//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/c/osmo-bsc/+/21204/4//COMMIT_MSG@23
PS4, Line 23: Among lchans on dynamic timeslots that could be moved, this code 
favors moving
: later lchans; mainly because it makes for a simpler condition in 
the code.
> here
I'm not completely against it, but I'm not sure this is a really good reason...

So if I understand correctly, from time to time you end up moving calls from a 
dyn ts to another in the same TRX (with no real gain doing so?) simply because 
the code is easier? I'm not sure this convinces me...



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ic221b8d2687cdec0bf94410c84a4da43853f0900
Gerrit-Change-Number: 21204
Gerrit-PatchSet: 4
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 17:10:47 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels 
Gerrit-MessageType: comment


Change in osmo-gsm-tester[master]: Modems: Introduce Android UEs

2020-11-17 Thread srs_andre
Hello Nils,

I'd like you to do a code review. Please visit

https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21217

to review the following change.


Change subject: Modems: Introduce Android UEs
..

Modems: Introduce Android UEs

To expand the test capacities we would like to introduce
Android UEs as a new modem. Currently the following tests
are supported:
- Ping
- iPerf3 DL/UL
- RRC Mobile MT Ping

Change-Id: Iab37a0de59d6643d21bced34ddca06ff40fa62df
---
M src/osmo_gsm_tester/core/process.py
M src/osmo_gsm_tester/core/remote.py
M src/osmo_gsm_tester/core/schema.py
M src/osmo_gsm_tester/obj/enb_srs.py
M src/osmo_gsm_tester/obj/iperf3.py
M src/osmo_gsm_tester/obj/ms.py
A src/osmo_gsm_tester/obj/ms_android.py
M src/osmo_gsm_tester/obj/run_node.py
M sysmocom/default-suites.conf
A sysmocom/scenarios/androidue@.conf
M sysmocom/suites/4g/iperf3_dl.py
M sysmocom/suites/4g/iperf3_ul.py
A utils/bin/osmo-gsm-tester_androidue_conn_chk.sh
A utils/bin/osmo-gsm-tester_androidue_diag_parser.sh
14 files changed, 607 insertions(+), 12 deletions(-)



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

diff --git a/src/osmo_gsm_tester/core/process.py 
b/src/osmo_gsm_tester/core/process.py
index eaf8de7..5840881 100644
--- a/src/osmo_gsm_tester/core/process.py
+++ b/src/osmo_gsm_tester/core/process.py
@@ -381,12 +381,24 @@

 class RemoteProcess(Process):

-def __init__(self, name, run_dir, remote_user, remote_host, remote_cwd, 
popen_args, remote_env={}, **popen_kwargs):
+def __init__(self, name, run_dir, remote_user, remote_host, remote_cwd, 
popen_args,
+ remote_env={}, remote_port=None, **popen_kwargs):
 super().__init__(name, run_dir, popen_args, **popen_kwargs)
 self.remote_user = remote_user
 self.remote_host = remote_host
 self.remote_cwd = remote_cwd
 self.remote_env = remote_env
+self.remote_port = remote_port
+
+# check if the command should be executed on an Android UE
+is_ue_cmd = False
+android_cmds = ['iperf3-cli', 'ping', 'set-airplane-mode', 'set-apn', 
'get-ip',
+'rx-monitor', 'tx-monitor', 'diag-monitor', 
'kill-diag-monitor', 'clear-diag_logs']
+if self.remote_port:
+for cmd in android_cmds:
+if cmd in name:
+self.remote_user = 'root'
+is_ue_cmd = True

 # hacky: instead of just prepending ssh, i.e. piping stdout and stderr
 # over the ssh link, we should probably run on the remote side,
@@ -402,6 +414,12 @@
'%s %s %s' % (cd,
  ' '.join(['%s=%r'%(k,v) for k,v in 
self.remote_env.items()]),
  ' '.join(self.popen_args))]
+
+# add arguments to directly connect to the Android UE
+if is_ue_cmd:
+self.popen_args.insert(1, '-p')  # add ssh parameters
+self.popen_args.insert(2, str(self.remote_port))
+
 self.dbg(self.popen_args, dir=self.run_dir, conf=self.popen_kwargs, 
remote_env=self.remote_env)

 def RunError(self, msg_prefix):
@@ -443,14 +461,21 @@
 super().__init__(name, run_dir, remote_user, remote_host, remote_cwd, 
args, **popen_kwargs)

 def run_local_sync(run_dir, name, popen_args):
-run_dir =run_dir.new_dir(name)
+run_dir = run_dir.new_dir(name)
 proc = Process(name, run_dir, popen_args)
 proc.launch_sync()
 return proc

+def run_local(run_dir, name, popen_args):
+run_dir = run_dir.new_dir(name)
+proc = Process(name, run_dir, popen_args)
+proc.launch()
+return proc
+
 def run_local_netns_sync(run_dir, name, netns, popen_args):
-run_dir =run_dir.new_dir(name)
+run_dir = run_dir.new_dir(name)
 proc = NetNSProcess(name, run_dir, netns, popen_args)
 proc.launch_sync()
 return proc
+
 # vim: expandtab tabstop=4 shiftwidth=4
diff --git a/src/osmo_gsm_tester/core/remote.py 
b/src/osmo_gsm_tester/core/remote.py
index 8deb25d..ef77c2cd 100644
--- a/src/osmo_gsm_tester/core/remote.py
+++ b/src/osmo_gsm_tester/core/remote.py
@@ -28,13 +28,14 @@

 WRAPPER_SCRIPT = 'ssh_sigkiller.sh'

-def __init__(self, run_dir, remote_user = 'root', remote_host = 
'localhost', remote_cwd=None):
+def __init__(self, run_dir, remote_user = 'root', remote_host = 
'localhost', remote_cwd=None, remote_port=None):
 super().__init__(log.C_RUN, 'host-' + remote_user + '@' + remote_host)
 self.run_dir = util.Dir(run_dir.new_dir(self.name()))
 self.remote_user = remote_user
 self.remote_host = remote_host
 self.remote_cwd = remote_cwd
 self.remote_env = {}
+self.remote_port = remote_port

 def user(self):
 return self.remote_user
@@ -51,9 +52,13 @@
 def get_remote_env(self):
 return self.remote_env

+def 

Change in osmo-gsm-tester[master]: enb_srs: add QAM64 support for UL

2020-11-17 Thread srs_andre
srs_andre has uploaded a new patch set (#2). ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21216 )

Change subject: enb_srs: add QAM64 support for UL
..

enb_srs: add QAM64 support for UL

* add new UE feature
* add new table for maximum rates
* enable SIB option for QAM64

Change-Id: I6ac2c9989a761e91b93d76c2507f55f0140b202d
---
M src/osmo_gsm_tester/core/schema.py
M src/osmo_gsm_tester/obj/enb_srs.py
M src/osmo_gsm_tester/templates/srsenb_sib.conf.tmpl
3 files changed, 17 insertions(+), 10 deletions(-)


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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: I6ac2c9989a761e91b93d76c2507f55f0140b202d
Gerrit-Change-Number: 21216
Gerrit-PatchSet: 2
Gerrit-Owner: srs_andre 
Gerrit-MessageType: newpatchset


Change in osmo-ttcn3-hacks[master]: bts: TC_sacch_chan_act_ho_sync: expect SACCH with MS Power IE

2020-11-17 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21076 )

Change subject: bts: TC_sacch_chan_act_ho_sync: expect SACCH with MS Power IE
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21076
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: I2e1c0ecc9de65a019aaa9f08bb051bf051156172
Gerrit-Change-Number: 21076
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 16:47:22 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-gsm-tester[master]: enb: add QAM64 support for UL

2020-11-17 Thread srs_andre
srs_andre has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21216 )


Change subject: enb: add QAM64 support for UL
..

enb: add QAM64 support for UL

* add new UE feature
* enable in srsue.conf.templ
* add new table for maximum rates
* add config scenario to enable SIB option for QAM64

Change-Id: I6ac2c9989a761e91b93d76c2507f55f0140b202d
---
M src/osmo_gsm_tester/core/schema.py
M src/osmo_gsm_tester/obj/enb_srs.py
M src/osmo_gsm_tester/templates/srsenb_sib.conf.tmpl
M src/osmo_gsm_tester/templates/srsue.conf.tmpl
A sysmocom/scenarios/cfg-enb-enable-ul-qam64.conf
5 files changed, 25 insertions(+), 12 deletions(-)



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

diff --git a/src/osmo_gsm_tester/core/schema.py 
b/src/osmo_gsm_tester/core/schema.py
index 9d26b0f..d56d6ec 100644
--- a/src/osmo_gsm_tester/core/schema.py
+++ b/src/osmo_gsm_tester/core/schema.py
@@ -111,7 +111,7 @@
 raise ValueError('Unknown Cipher value: %r' % val)

 def modem_feature(val):
-if val in ('sms', 'gprs', 'voice', 'ussd', 'sim', '2g', '3g', '4g', 
'dl_qam256'):
+if val in ('sms', 'gprs', 'voice', 'ussd', 'sim', '2g', '3g', '4g', 
'dl_qam256', 'ul_qam64'):
 return True
 raise ValueError('Unknown Modem Feature: %r' % val)

diff --git a/src/osmo_gsm_tester/obj/enb_srs.py 
b/src/osmo_gsm_tester/obj/enb_srs.py
index 8319ba4..7fde719 100644
--- a/src/osmo_gsm_tester/obj/enb_srs.py
+++ b/src/osmo_gsm_tester/obj/enb_srs.py
@@ -31,6 +31,7 @@
 def on_register_schemas():
 config_schema = {
 'enable_pcap': schema.BOOL_STR,
+'enable_ul_qam64': schema.BOOL_STR,
 'log_all_level': schema.STR,
 }
 schema.register_config_schema('enb', config_schema)
@@ -191,6 +192,7 @@
 self.enable_pcap = util.str2bool(values['enb'].get('enable_pcap', 
'false'))
 config.overlay(values, dict(enb={'enable_pcap': self.enable_pcap}))

+config.overlay(values, dict(enb={'enable_ul_qam64': 
util.str2bool(values['enb'].get('enable_ul_qam64', 'false'))}))
 config.overlay(values, dict(enb={'enable_dl_awgn': 
util.str2bool(values['enb'].get('enable_dl_awgn', 'false'))}))
 config.overlay(values, dict(enb={'rf_dev_sync': 
values['enb'].get('rf_dev_sync', None)}))

@@ -269,8 +271,6 @@
 return rfemu_obj

 def ue_max_rate(self, downlink=True, num_carriers=1):
-
-
 # The max rate for a single UE per PRB configuration in TM1 with MCS 28
 if 'dl_qam256' in self.ue.features():
 max_phy_rate_tm1_dl = {6: 5.9e6,
@@ -286,12 +286,21 @@
50: 36e6,
75: 55e6,
100: 75e6}
-max_phy_rate_tm1_ul = { 6 : 1.7e6,
-   15 : 4.7e6,
-   25 : 10e6,
-   50 : 23e6,
-   75 : 34e6,
-   100 : 51e6 }
+
+if 'ul_qam64' in self.ue.features():
+max_phy_rate_tm1_ul = { 6 : 2.7e6,
+15 : 6.5e6,
+25 : 14e6,
+50 : 32e6,
+75 : 34e6,
+100 : 70e6 }
+else:
+max_phy_rate_tm1_ul = { 6 : 1.7e6,
+15 : 4.7e6,
+25 : 10e6,
+50 : 23e6,
+75 : 34e6,
+100 : 51e6 }

 if downlink:
 max_rate = max_phy_rate_tm1_dl[self.num_prb()]
diff --git a/src/osmo_gsm_tester/templates/srsenb_sib.conf.tmpl 
b/src/osmo_gsm_tester/templates/srsenb_sib.conf.tmpl
index 6d178c6..c738480 100644
--- a/src/osmo_gsm_tester/templates/srsenb_sib.conf.tmpl
+++ b/src/osmo_gsm_tester/templates/srsenb_sib.conf.tmpl
@@ -66,7 +66,7 @@
 n_sb = 1;
 hopping_mode = "inter-subframe";
 pusch_hopping_offset = 2;
-enable_64_qam = false; // 64QAM PUSCH is not currently enabled
+enable_64_qam = ${enb.enable_ul_qam64};
 ul_rs =
 {
 cyclic_shift = 0;
diff --git a/src/osmo_gsm_tester/templates/srsue.conf.tmpl 
b/src/osmo_gsm_tester/templates/srsue.conf.tmpl
index 31642cd..120b938 100644
--- a/src/osmo_gsm_tester/templates/srsue.conf.tmpl
+++ b/src/osmo_gsm_tester/templates/srsue.conf.tmpl
@@ -150,10 +150,11 @@
 % if int(ue.num_carriers) > 1:
 ue_category   = 7
 release   = 10
-% elif "dl_qam256" in ue.features:
-ue_category   = 7
+% elif "dl_qam256" in ue.features or "ul_qam64" in ue.features:
+ue_category   = 8
 release   = 13
 ue_category_dl= 14
+ue_category_ul= 5
 % else:
 #ue_category   = 4
 

Change in osmo-bsc[master]: handover test 30: play through filling up all lchans

2020-11-17 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21205 )

Change subject: handover test 30: play through filling up all lchans
..


Patch Set 4: Code-Review+2

fast tracking the handover_test.c changes, they are a remote corner of the code 
base not ever used in production


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I938ef9ebf77a4e72fc525f4f764daf34f17167ef
Gerrit-Change-Number: 21205
Gerrit-PatchSet: 4
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 16:45:38 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-gsm-tester[master]: cell_modifiers: refactor HO cell configs

2020-11-17 Thread srs_andre
srs_andre has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21214 )


Change subject: cell_modifiers: refactor HO cell configs
..

cell_modifiers: refactor HO cell configs

* rename intrafreq vs intraenb
* add missing mandatory params

Change-Id: Icc1fe5c1711ecbed2f1b8b1e6a0b51c2d28ec651
---
D sysmocom/scenarios/mod-enb-cells-inter-freq-ho.conf
R sysmocom/scenarios/mod-enb-cells-intraenb-intrafreq-ho.conf
2 files changed, 5 insertions(+), 32 deletions(-)



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

diff --git a/sysmocom/scenarios/mod-enb-cells-inter-freq-ho.conf 
b/sysmocom/scenarios/mod-enb-cells-inter-freq-ho.conf
deleted file mode 100644
index 75765c2..000
--- a/sysmocom/scenarios/mod-enb-cells-inter-freq-ho.conf
+++ /dev/null
@@ -1,31 +0,0 @@
-# HO config for intra-frequency HO between two cells (same EARFCN) on 
different RF ports (srsENB)
-modifiers:
-  enb:
-  - id: 0x19B
-enable_measurements: true
-cell_list:
-- cell_id: 0x01
-  pci: 0x01
-  dl_earfcn: 2850
-  root_seq_idx: 204
-  rf_port: 0
-  scell_list: []
-  ncell_list:
-  - enb_id: 0x19C
-cell_id: 0x02
-pci: 0x02
-dl_earfcn: 2850
-  - id: 0x19C
-enable_measurements: true
-cell_list:
-- cell_id: 0x02
-  pci: 0x02
-  dl_earfcn: 2850
-  root_seq_idx: 205
-  rf_port: 0
-  scell_list: []
-  ncell_list:
-  - enb_id: 0x19B
-cell_id: 0x01
-pci: 0x01
-dl_earfcn: 2850
diff --git a/sysmocom/scenarios/mod-enb-cells-intra-freq-ho.conf 
b/sysmocom/scenarios/mod-enb-cells-intraenb-intrafreq-ho.conf
similarity index 69%
rename from sysmocom/scenarios/mod-enb-cells-intra-freq-ho.conf
rename to sysmocom/scenarios/mod-enb-cells-intraenb-intrafreq-ho.conf
index 0dc337c..8b6f569 100644
--- a/sysmocom/scenarios/mod-enb-cells-intra-freq-ho.conf
+++ b/sysmocom/scenarios/mod-enb-cells-intraenb-intrafreq-ho.conf
@@ -1,9 +1,11 @@
-# HO config for intra-frequency HO between two cells (same EARFCN) on 
different RF ports (srsENB)
+# Cell config for Intra eNB HO, two cells on same frequencey (same EARFCN) on 
different RF ports (srsENB)
 modifiers:
   enb:
   - cell_list:
 - cell_id: 0x01
   pci: 0x01
+  tac: 0x0007
+  root_seq_idx: 204
   dl_earfcn: 2850
   rf_port: 0
   scell_list: []
@@ -14,6 +16,8 @@
 dl_earfcn: 2850
 - cell_id: 0x02
   pci: 0x02
+  tac: 0x0007
+  root_seq_idx: 207
   dl_earfcn: 2850
   rf_port: 1
   scell_list: []

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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: Icc1fe5c1711ecbed2f1b8b1e6a0b51c2d28ec651
Gerrit-Change-Number: 21214
Gerrit-PatchSet: 1
Gerrit-Owner: srs_andre 
Gerrit-MessageType: newchange


Change in osmo-gsm-tester[master]: mod-enb-{ncells, nprb}: define parameter for 2 cells

2020-11-17 Thread srs_andre
srs_andre has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21215 )


Change subject: mod-enb-{ncells,nprb}: define parameter for 2 cells
..

mod-enb-{ncells,nprb}: define parameter for 2 cells

for inter eNB HO we use the same bandwidth and number
of cells for both eNBs

Change-Id: I626aa0a52071c497a292589a0a2b1d8d6aed917f
---
M sysmocom/scenarios/mod-enb-ncells@.conf
M sysmocom/scenarios/mod-enb-nprb@.conf
2 files changed, 2 insertions(+), 0 deletions(-)



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

diff --git a/sysmocom/scenarios/mod-enb-ncells@.conf 
b/sysmocom/scenarios/mod-enb-ncells@.conf
index b57b94a..a07ca6f 100644
--- a/sysmocom/scenarios/mod-enb-ncells@.conf
+++ b/sysmocom/scenarios/mod-enb-ncells@.conf
@@ -1,3 +1,4 @@
 modifiers:
   enb:
   - num_cells: ${param1}
+  - num_cells: ${param1}
diff --git a/sysmocom/scenarios/mod-enb-nprb@.conf 
b/sysmocom/scenarios/mod-enb-nprb@.conf
index f17347c..7fbbe26 100644
--- a/sysmocom/scenarios/mod-enb-nprb@.conf
+++ b/sysmocom/scenarios/mod-enb-nprb@.conf
@@ -1,3 +1,4 @@
 modifiers:
   enb:
   - num_prb: ${param1}
+  - num_prb: ${param1}

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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: I626aa0a52071c497a292589a0a2b1d8d6aed917f
Gerrit-Change-Number: 21215
Gerrit-PatchSet: 1
Gerrit-Owner: srs_andre 
Gerrit-MessageType: newchange


Change in osmo-ttcn3-hacks[master]: NS_Emulation: Fail if an unsupported NS provider is chosen

2020-11-17 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21212 )


Change subject: NS_Emulation: Fail if an unsupported NS provider is chosen
..

NS_Emulation: Fail if an unsupported NS provider is chosen

This took me quite some time: Tried to use NS_PROVIDER_FR, but the
code was compiled without support for it.  It just failed silently
without printing any error or ever sending any message on the FR link.

Change-Id: I96475127a2079830b3456a8e288adf4c6c908887
---
M library/NS_Emulation.ttcnpp
1 file changed, 2 insertions(+), 0 deletions(-)



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

diff --git a/library/NS_Emulation.ttcnpp b/library/NS_Emulation.ttcnpp
index 19de9d3..2e03880 100644
--- a/library/NS_Emulation.ttcnpp
+++ b/library/NS_Emulation.ttcnpp
@@ -382,6 +382,8 @@
connect(self:NSCP, vc_NSP_FR:NSE);
vc_NSP_FR.start(NS_Provider_FR.main(g_nsvc_config, 
g_config, id));
 #endif
+   } else {
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, 
"Unsupported NS provider");
}

f_change_state(NSVC_S_DEAD_BLOCKED);

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21212
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: I96475127a2079830b3456a8e288adf4c6c908887
Gerrit-Change-Number: 21212
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in osmo-ttcn3-hacks[master]: gbproxy: Include support for NS over Frame Relay

2020-11-17 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21213 )


Change subject: gbproxy: Include support for NS over Frame Relay
..

gbproxy: Include support for NS over Frame Relay

Change-Id: I5ba84b9eebf7c330f7ff55f5e99c6fd5972c7123
---
M gbproxy/gen_links.sh
M gbproxy/regen_makefile.sh
2 files changed, 8 insertions(+), 2 deletions(-)



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

diff --git a/gbproxy/gen_links.sh b/gbproxy/gen_links.sh
index 46898f4..a614191 100755
--- a/gbproxy/gen_links.sh
+++ b/gbproxy/gen_links.sh
@@ -77,9 +77,14 @@
 FILES="SCCP_Emulation.ttcn  SCCP_EncDec.cc  SCCP_Mapping.ttcnpp  
SCCP_Types.ttcn  SCCPasp_Types.ttcn"
 gen_links $DIR $FILES

+DIR=$BASEDIR/titan.TestPorts.AF_PACKET/src
+FILES="AF_PACKET_PT.cc AF_PACKET_PT.hh AF_PACKET_PortType.ttcn 
AF_PACKET_PortTypes.ttcn "
+FILES+="FrameRelay_Types.ttcn FrameRelay_CodecPort.ttcn 
FrameRelay_Emulation.ttcn Q931_Types.ttcn Q933_Types.ttcn "
+gen_links $DIR $FILES
+
 DIR=../library
 FILES="Misc_Helpers.ttcn General_Types.ttcn GSM_Types.ttcn GSM_RR_Types.ttcn 
Osmocom_Types.ttcn RLCMAC_Templates.ttcn RLCMAC_Types.ttcn 
RLCMAC_CSN1_Templates.ttcn RLCMAC_CSN1_Types.ttcn RLCMAC_EncDec.cc "
-FILES+="NS_Provider_IPL4.ttcn NS_Emulation.ttcnpp NS_CodecPort.ttcn 
NS_CodecPort_CtrlFunct.ttcn NS_CodecPort_CtrlFunctDef.cc "
+FILES+="NS_Provider_IPL4.ttcn NS_Provider_FR.ttcn NS_Emulation.ttcnpp 
NS_CodecPort.ttcn NS_CodecPort_CtrlFunct.ttcn NS_CodecPort_CtrlFunctDef.cc "
 FILES+="BSSGP_Emulation.ttcnpp Osmocom_Gb_Types.ttcn "
 FILES+="PCUIF_Types.ttcn "
 FILES+="Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn 
Osmocom_CTRL_Adapter.ttcn "
diff --git a/gbproxy/regen_makefile.sh b/gbproxy/regen_makefile.sh
index fbbd1b3..34bd3f4 100755
--- a/gbproxy/regen_makefile.sh
+++ b/gbproxy/regen_makefile.sh
@@ -1,8 +1,9 @@
 #!/bin/sh

 FILES="*.ttcn *.ttcnpp BSSGP_EncDec.cc LLC_EncDec.cc IPL4asp_PT.cc 
IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc 
NS_CodecPort_CtrlFunctDef.cc RLCMAC_EncDec.cc Native_FunctionDefs.cc 
TELNETasp_PT.cc IPA_CodecPort_CtrlFunctDef.cc GTPU_EncDec.cc GTPC_EncDec.cc 
GTP_CodecPort_CtrlFunctDef.cc SCCP_EncDec.cc  SCTPasp_PT.cc "
+FILES+="AF_PACKET_PT.cc AF_PACKET_PT.hh "

-export CPPFLAGS_TTCN3="-DIPA_EMULATION_GSUP -DIPA_EMULATION_CTRL 
-DUSE_MTP3_DISTRIBUTOR -DBSSGP_EM_L3"
+export CPPFLAGS_TTCN3="-DIPA_EMULATION_GSUP -DIPA_EMULATION_CTRL 
-DUSE_MTP3_DISTRIBUTOR -DBSSGP_EM_L3 -DNS_EMULATION_FR"

 ../regen-makefile.sh GBProxy_Tests.ttcn $FILES


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21213
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: I5ba84b9eebf7c330f7ff55f5e99c6fd5972c7123
Gerrit-Change-Number: 21213
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in osmo-bsc[master]: hodec 2: favor moving dyn TS

2020-11-17 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21204 )

Change subject: hodec 2: favor moving dyn TS
..


Patch Set 4:

(2 comments)

https://gerrit.osmocom.org/c/osmo-bsc/+/21204/4//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/c/osmo-bsc/+/21204/4//COMMIT_MSG@23
PS4, Line 23: Among lchans on dynamic timeslots that could be moved, this code 
favors moving
: later lchans; mainly because it makes for a simpler condition in 
the code.
here


https://gerrit.osmocom.org/c/osmo-bsc/+/21204/4/src/osmo-bsc/handover_decision_2.c
File src/osmo-bsc/handover_decision_2.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/21204/4/src/osmo-bsc/handover_decision_2.c@1576
PS4, Line 1576: best_cand = [i];
> I don't know the details here, but maybe you also need to check that the 
> current TS is not a dynamic […]
the commit log has the rationale for why that isn't needed.

Initially I also thought it would be in fact better to favor moving later dyn 
TS, for configurations where a static PDCH follows a set of dyn TS. I didn't 
write that in the commit log because
a) I'm not completely sure having consecutive PDCH is improving GPRS service.
b) handover_test 30 shows that it doesn't necessarily help defragmenting PDCH.
c) of course the argument only makes sense for configs where PDCH follow dyn 
TS, up to the user.

So the only remaining argument is that having less terms in the if condition is 
less code.
It is definitely in no way harmful to pick a later dyn TS over an earlier one.



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ic221b8d2687cdec0bf94410c84a4da43853f0900
Gerrit-Change-Number: 21204
Gerrit-PatchSet: 4
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 16:39:29 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-bsc[master]: fix TCH/H allocation: use half occupied dyn TS instead of switching m...

2020-11-17 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21203 )

Change subject: fix TCH/H allocation: use half occupied dyn TS instead of 
switching more dyn TS
..


Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/c/osmo-bsc/+/21203/3/src/osmo-bsc/lchan_select.c
File src/osmo-bsc/lchan_select.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/21203/3/src/osmo-bsc/lchan_select.c@119
PS3, Line 119:  for (allow_pchan_switch = 0; allow_pchan_switch <= 
(try_pchan_switch ? 1 : 0); allow_pchan_switch++) {
> it would probably be clearer to use usual "i=0; i < n" loop notation here: […]
the "2 : 1" would be no less confusing in my opinion... i guess not worth 
submitting another patch set for?



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I5a8d943f31774af00664d037550be14e767d312a
Gerrit-Change-Number: 21203
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 16:32:50 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-bsc[master]: handover_test: change 'meas-rep' params to bts-trx-ts-ss nr

2020-11-17 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21199 )

Change subject: handover_test: change 'meas-rep' params to bts-trx-ts-ss nr
..

handover_test: change 'meas-rep' params to bts-trx-ts-ss nr

So far the 'meas-rep' expects the index of the MS in order of appearance, to
send a measurement report for that MS. That may seem like a simplification for
human readability, but in fact, it is confusing for a human to keep track which
MS has which index, and to which timeslot it has been handovered. When reading
the tests, it is much easier to read exactly which timeslot the measurement
report is being sent to; which MS came first is inherently not as interesting
as which lchans are currently occupied.

Change-Id: I7ab2ef604196cfe96112dfefb9aa930368bf4812
---
M tests/handover/handover_test.c
1 file changed, 122 insertions(+), 98 deletions(-)

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



diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index 5655bda..ea78fbf 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -724,8 +724,9 @@
"create-n-bts", "7",
"create-ms", "0", "TCH/F", "AMR",
"expect-ts-use", "0", "0", "*", "TCH/F", "-", "-", "-", "-", "-", "-",
-   "meas-rep", "0", "30","0",
-   "6","0","20","1","21","2","18","3","20","4","23","5","19",
+   "meas-rep", "0","0","1","0",
+   "30","0",
+   "6", "0","20", "1","21", "2","18", "3","20", "4","23", "5","19",
"expect-no-chan",
NULL
 };
@@ -739,8 +740,9 @@
"create-n-bts", "7",
"create-ms", "0", "TCH/F", "AMR",
"expect-ts-use", "0", "0", "*", "TCH/F", "-", "-", "-", "-", "-", "-",
-   "meas-rep", "0", "10","0",
-   "6","0","20","1","21","2","18","3","20","4","23","5","19",
+   "meas-rep", "0","0","1","0",
+   "10","0",
+   "6", "0","20", "1","21", "2","18", "3","20", "4","23", "5","19",
"expect-chan", "5", "1",
"ack-chan",
"expect-ho", "0", "1",
@@ -768,10 +770,10 @@
"expect-ts-use", "0", "0", "*", "-", "-", "-", "-", "TCH/H-", "-", "-",
"as-enable", "0", "0",
"ho-enable", "0", "0",
-   "meas-rep", "0", "0","0", "1","0","30",
+   "meas-rep", "0","0","5","0", "0","0", "1","0","30",
"expect-no-chan",
"as-enable", "0", "1",
-   "meas-rep", "0", "0","0", "1","0","30",
+   "meas-rep", "0","0","5","0", "0","0", "1","0","30",
"expect-chan", "0", "1",
"ack-chan",
"expect-ho", "0", "5",
@@ -779,10 +781,10 @@
"expect-ts-use", "0", "0", "*", "TCH/F", "-", "-", "-", "-", "-", "-",
"ho-enable", "0", "1",
"ho-enable", "1", "0",
-   "meas-rep", "0", "0","0", "1","0","30",
+   "meas-rep", "0","0","1","0", "0","0", "1","0","30",
"expect-no-chan",
"ho-enable", "1", "1",
-   "meas-rep", "0", "0","0", "1","0","30",
+   "meas-rep", "0","0","1","0", "0","0", "1","0","30",
"expect-chan", "1", "1",
"ack-chan",
"expect-ho", "0", "1",
@@ -803,14 +805,14 @@
"create-n-bts", "2",
"create-ms", "0", "TCH/F", "AMR",
"expect-ts-use", "0", "0", "*", "TCH/F", "-", "-", "-", "-", "-", "-",
-   "meas-rep", "0", "20","0", "1","0","30",
+   "meas-rep", "0","0","1","0", "20","0", "1","0","30",
"expect-chan", "1", "1",
"ack-chan",
"expect-ho", "0", "1",
"ho-failed",
"expect-ts-use", "0", "0", "*", "TCH/F", "-", "-", "-", "-", "-", "-",
"expect-ts-use", "1", "0", "*", "-", "-", "-", "-", "-", "-", "-",
-   "meas-rep", "0", "20","0", "1","0","30",
+   "meas-rep", "0","0","1","0", "20","0", "1","0","30",
"expect-no-chan",
NULL
 };
@@ -827,10 +829,10 @@
"set-min-free", "1", "TCH/H", "4",
"create-ms", "0", "TCH/H", "HR",
"expect-ts-use", "0", "0", "*", "-", "-", "-", "-", "TCH/H-", "-", "-",
-   "meas-rep", "0", "20","0", "1","0","30",
+   "meas-rep", "0","0","5","0", "20","0", "1","0","30",
"expect-no-chan",
"set-min-free", "1", "TCH/H", "3",
-   "meas-rep", "0", "20","0", "1","0","30",
+   "meas-rep", "0","0","5","0", "20","0", "1","0","30",
"expect-chan", "1", "5",
"ack-chan",
"expect-ho", "0", "5",
@@ -852,10 +854,10 @@
"set-min-free", "1", "TCH/F", "4",
"create-ms", "0", "TCH/F", "FR",
"expect-ts-use", "0", "0", "*", "TCH/F", "-", "-", "-", "-", "-", "-",
-   "meas-rep", "0", "20","0", "1","0","30",
+   "meas-rep", "0","0","1","0", "20","0", "1","0","30",
"expect-no-chan",
"set-min-free", "1", "TCH/F", "3",
-   "meas-rep", "0", "20","0", "1","0","30",
+   "meas-rep", "0","0","1","0", "20","0", 

Change in osmo-bsc[master]: handover_test: add test 31: TCH/H: re-use dyn TS

2020-11-17 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21202 )

Change subject: handover_test: add test 31: TCH/H: re-use dyn TS
..

handover_test: add test 31: TCH/H: re-use dyn TS

Show undesired behavior of opening up another TCH/H timeslot even though
another TCH/H timeslot still has room for a second lchan. This is particularly
bad for dynamic timeslots, reducing PDCH as well as TCH/F resources.

Change-Id: If222835af92d832b848824e5466bdcaf9af8a614
---
M tests/handover/handover_test.c
M tests/testsuite.at
2 files changed, 19 insertions(+), 0 deletions(-)

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



diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index 46f7cb8..d2d3229 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -1694,6 +1694,18 @@
NULL
 };

+static char *test_case_31[] = {
+   "2",
+
+   "Congestion check: re-use half used TCH/H to avoid switching more dyn 
TS to TCH/H\n"
+   ,
+   "create-bts", "1", "c+s4", "TCH/F", "TCH/F", "TCH/F", "dyn", "dyn", 
"dyn", "PDCH",
+   "set-ts-use", "0", "0",  "*", "-", "-", "-", "PDCH", "TCH/H-", "PDCH", 
"PDCH",
+   "create-ms", "0", "TCH/H", "AMR",
+   /* bad: should re-use existing dyn TS instead of switching another one 
*/
+   "expect-ts-use", "0", "0",  "*", "-", "-", "-", "TCH/H-", "TCH/H-", 
"PDCH", "PDCH",
+   NULL
+};

 static char **test_cases[] =  {
test_case_0,
@@ -1727,6 +1739,7 @@
test_case_28,
test_case_29,
test_case_30,
+   test_case_31,
 };

 static const struct log_info_cat log_categories[] = {
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 787f33d..bd6f56f 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -236,3 +236,9 @@
 cat $abs_srcdir/handover/handover_test.ok > expout
 AT_CHECK([$abs_top_builddir/tests/handover/handover_test 30], [], [expout], 
[ignore])
 AT_CLEANUP
+
+AT_SETUP([handover test 31])
+AT_KEYWORDS([handover])
+cat $abs_srcdir/handover/handover_test.ok > expout
+AT_CHECK([$abs_top_builddir/tests/handover/handover_test 31], [], [expout], 
[ignore])
+AT_CLEANUP

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: If222835af92d832b848824e5466bdcaf9af8a614
Gerrit-Change-Number: 21202
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-bsc[master]: handover_test: drop secondary array of lchans

2020-11-17 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21200 )

Change subject: handover_test: drop secondary array of lchans
..

handover_test: drop secondary array of lchans

Change-Id: I7c80a16324d764969f279a5e1d6f55b0dbe9c17b
---
M tests/handover/handover_test.c
1 file changed, 11 insertions(+), 31 deletions(-)

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



diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index ea78fbf..d442d99 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -1770,8 +1770,6 @@
 int main(int argc, char **argv)
 {
char **test_case;
-   struct gsm_lchan *lchan[256];
-   int lchan_num = 0;
int i;
int algorithm;
int test_case_i;
@@ -1913,19 +1911,21 @@
test_case += 3;
} else
if (!strcmp(*test_case, "create-ms")) {
-   fprintf(stderr, "- Creating mobile #%d at BTS %s on "
-   "%s with %s codec\n", lchan_num, test_case[1],
-   test_case[2], test_case[3]);
-   lchan[lchan_num] = 
create_lchan(bts_by_num_str(test_case[1]),
-   !strcmp(test_case[2], "TCH/F"), test_case[3]);
-   if (!lchan[lchan_num]) {
+   const char *bts_nr_str = test_case[1];
+   const char *tch_type = test_case[2];
+   const char *codec = test_case[3];
+   struct gsm_lchan *lchan;
+   fprintf(stderr, "- Creating mobile at BTS %s on "
+   "%s with %s codec\n", bts_nr_str, tch_type, 
codec);
+   lchan = create_lchan(bts_by_num_str(bts_nr_str),
+   !strcmp(tch_type, "TCH/F"), codec);
+   if (!lchan) {
printf("Failed to create lchan!\n");
return EXIT_FAILURE;
}
fprintf(stderr, " * New MS is at BTS %d TS %d\n",
-   lchan[lchan_num]->ts->trx->bts->nr,
-   lchan[lchan_num]->ts->nr);
-   lchan_num++;
+   lchan->ts->trx->bts->nr,
+   lchan->ts->nr);
test_case += 4;
} else
if (!strcmp(*test_case, "set-ta")) {
@@ -2086,19 +2086,6 @@
test_case += 1;
got_chan_req = 0;
got_ho_req = 0;
-   /* switch lchan */
-   for (i = 0; i < lchan_num; i++) {
-   if (lchan[i] == ho_req_lchan) {
-   fprintf(stderr, " * MS %d changes from "
-   "BTS=%d TS=%d to BTS=%d "
-   "TS=%d\n", i,
-   lchan[i]->ts->trx->bts->nr,
-   lchan[i]->ts->nr,
-  chan_req_lchan->ts->trx->bts->nr,
-   chan_req_lchan->ts->nr);
-   lchan[i] = chan_req_lchan;
-   }
-   }
send_ho_complete(chan_req_lchan, true);
} else
if (!strcmp(*test_case, "ho-failed")) {
@@ -2181,13 +2168,6 @@
}
}

-   for (i = 0; i < lchan_num; i++) {
-   struct gsm_subscriber_connection *conn = lchan[i]->conn;
-   lchan[i]->conn = NULL;
-   conn->lchan = NULL;
-   osmo_fsm_inst_term(conn->fi, OSMO_FSM_TERM_REGULAR, NULL);
-   }
-
fprintf(stderr, "\n");

printf("Test OK\n");

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I7c80a16324d764969f279a5e1d6f55b0dbe9c17b
Gerrit-Change-Number: 21200
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-bsc[master]: handover test: add test 30: de-congest TCH/F by moving to dyn TS TCH/H

2020-11-17 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21201 )

Change subject: handover test: add test 30: de-congest TCH/F by moving to dyn 
TS TCH/H
..

handover test: add test 30: de-congest TCH/F by moving to dyn TS TCH/H

In the test, show the undesired behavior of moving non-dynamic timeslots first,
because they are the first to be considered in the congestion resolution loop.
The behavior will be fixed in Ic221b8d2687cdec0bf94410c84a4da43853f0900.

Change-Id: I09ab9f2f79fa434c7279cb4d09899f69b047aa55
---
M tests/handover/handover_test.c
M tests/testsuite.at
2 files changed, 46 insertions(+), 0 deletions(-)

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



diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index d442d99..46f7cb8 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -1655,6 +1655,45 @@
NULL
 };

+static char *test_case_30[] = {
+   "2",
+
+   "Congestion check: Balancing congestion by handover TCH/F -> TCH/H\n\n"
+   "With dynamic timeslots.\n"
+   "As soon as only one TCH/F is left, there should be HO to a dyn TS.\n"
+   ,
+   "create-bts", "1", "c+s4", "TCH/F", "TCH/F", "TCH/F", "dyn", "dyn", 
"dyn", "PDCH",
+   "set-min-free", "0", "TCH/F", "2",
+   "set-min-free", "0", "TCH/H", "0",
+   "as-enable", "0", "1",
+   "set-ts-use", "0", "0", "*", "TCH/F", "TCH/F", "TCH/F", "TCH/F", 
"PDCH", "PDCH", "PDCH",
+   "meas-rep", "0","0","1","0", "40","0", "1", "0","30",
+   "meas-rep", "0","0","2","0", "40","0", "1", "0","30",
+   "meas-rep", "0","0","3","0", "40","0", "1", "0","30",
+   "meas-rep", "0","0","4","0", "40","0", "1", "0","30",
+   "congestion-check",
+   "expect-no-chan",
+   "create-ms", "0", "TCH/F", "AMR",
+   "meas-rep", "0","0","5","0", "40","0", "1", "0","30",
+   "expect-ts-use", "0", "0", "*", "TCH/F", "TCH/F", "TCH/F", "TCH/F", 
"TCH/F", "PDCH", "PDCH",
+   "congestion-check",
+   "expect-chan", "0", "6",
+   "ack-chan",
+   /* Not so good: rather than moving static TCH/F, we should favor 
freeing dyn TS, for more PDCH */
+   "expect-ho", "0", "1",
+   "ho-complete",
+   "expect-ts-use", "0", "0", "*", "-", "TCH/F", "TCH/F", "TCH/F", 
"TCH/F", "TCH/H-", "PDCH",
+   "congestion-check",
+   "expect-chan", "0", "6",
+   "ack-chan",
+   "expect-ho", "0", "2",
+   "ho-complete",
+   "expect-ts-use", "0", "0", "*", "-", "-", "TCH/F", "TCH/F", "TCH/F", 
"TCH/HH", "PDCH",
+   "congestion-check",
+   "expect-no-chan",
+   NULL
+};
+

 static char **test_cases[] =  {
test_case_0,
@@ -1687,6 +1726,7 @@
test_case_27,
test_case_28,
test_case_29,
+   test_case_30,
 };

 static const struct log_info_cat log_categories[] = {
diff --git a/tests/testsuite.at b/tests/testsuite.at
index a0d85ce..787f33d 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -230,3 +230,9 @@
 cat $abs_srcdir/handover/handover_test.ok > expout
 AT_CHECK([$abs_top_builddir/tests/handover/handover_test 29], [], [expout], 
[ignore])
 AT_CLEANUP
+
+AT_SETUP([handover test 30])
+AT_KEYWORDS([handover])
+cat $abs_srcdir/handover/handover_test.ok > expout
+AT_CHECK([$abs_top_builddir/tests/handover/handover_test 30], [], [expout], 
[ignore])
+AT_CLEANUP

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I09ab9f2f79fa434c7279cb4d09899f69b047aa55
Gerrit-Change-Number: 21201
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-bsc[master]: handover_test prep: rename 'create-bts' to 'create-n-bts'

2020-11-17 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21193 )

Change subject: handover_test prep: rename 'create-bts' to 'create-n-bts'
..

handover_test prep: rename 'create-bts' to 'create-n-bts'

I will add a command to create a single BTS with arbitrary timeslot
configurations.

To limit amount of editing of the current tests, keep the current 'create-bts'
command, which creates N identically configured BTS, but rename it to
'create-n-bts'.

Thus allow the upcoming single-BTS command to take the name 'create-bts'.

Change-Id: I4853771cf23b509b7f278d04c57883332ede786d
---
M tests/handover/handover_test.c
1 file changed, 31 insertions(+), 31 deletions(-)

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



diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index fefeb0c..3ceaf31 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -508,7 +508,7 @@
"There are many neighbor cells, but only the current cell is the best\n"
"cell, so no handover is performed\n",

-   "create-bts", "7",
+   "create-n-bts", "7",
"create-ms", "0", "TCH/F", "AMR",
"meas-rep", "0", "30","0",
"6","0","20","1","21","2","18","3","20","4","23","5","19",
@@ -522,7 +522,7 @@
"Handover to best better cell\n\n"
"The best neighbor cell is selected\n",

-   "create-bts", "7",
+   "create-n-bts", "7",
"create-ms", "0", "TCH/F", "AMR",
"meas-rep", "0", "10","0",
"6","0","20","1","21","2","18","3","20","4","23","5","19",
@@ -545,7 +545,7 @@
"in the current cell, but disabling in the neighbor cell, handover\n"
"will not be performed, until it is enabled in the neighbor cell 
too.\n",

-   "create-bts", "2",
+   "create-n-bts", "2",
"afs-rxlev-improve", "0", "5",
"create-ms", "0", "TCH/H", "AMR",
"as-enable", "0", "0",
@@ -579,7 +579,7 @@
"Even though the cell is still better, handover will not be performed\n"
"due to penalty timer after handover failure\n",

-   "create-bts", "2",
+   "create-n-bts", "2",
"create-ms", "0", "TCH/F", "AMR",
"meas-rep", "0", "20","0", "1","0","30",
"expect-chan", "1", "1",
@@ -599,7 +599,7 @@
"at TCH/H slots. As the congestion is removed, the handover takes\n"
"place.\n",

-   "create-bts", "2",
+   "create-n-bts", "2",
"set-min-free", "1", "TCH/H", "4",
"create-ms", "0", "TCH/H", "HR",
"meas-rep", "0", "20","0", "1","0","30",
@@ -621,7 +621,7 @@
"at TCH/F slots. As the congestion is removed, the handover takes\n"
"place.\n",

-   "create-bts", "2",
+   "create-n-bts", "2",
"set-min-free", "1", "TCH/F", "4",
"create-ms", "0", "TCH/F", "FR",
"meas-rep", "0", "20","0", "1","0","30",
@@ -643,7 +643,7 @@
"at TCH/F slots. As the congestion is removed, the handover takes\n"
"place.\n",

-   "create-bts", "2",
+   "create-n-bts", "2",
"set-min-free", "1", "TCH/F", "4",
"create-ms", "0", "TCH/F", "EFR",
"meas-rep", "0", "20","0", "1","0","30",
@@ -664,7 +664,7 @@
"The MS is using AMR V3 codec, the better cell is congested at TCH/F\n"
"slots. The handover is performed to non-congested TCH/H slots.\n",

-   "create-bts", "2",
+   "create-n-bts", "2",
"set-min-free", "1", "TCH/F", "4",
"create-ms", "0", "TCH/F", "AMR",
"meas-rep", "0", "20","0", "1","0","30",
@@ -681,7 +681,7 @@
"No handover to a cell with no slots available\n\n"
"If no slot is available, no handover is performed\n",

-   "create-bts", "2",
+   "create-n-bts", "2",
"create-ms", "0", "TCH/F", "AMR",
"create-ms", "1", "TCH/F", "AMR",
"create-ms", "1", "TCH/F", "AMR",
@@ -703,7 +703,7 @@
"There are tree mobiles that want to handover, but only two can do\n"
"it at a time, because the maximum number is limited to two.\n",

-   "create-bts", "2",
+   "create-n-bts", "2",
"set-max-ho", "1", "2",
"create-ms", "0", "TCH/F", "AMR",
"create-ms", "0", "TCH/F", "AMR",
@@ -724,7 +724,7 @@
"If neighbor cell is better, handover is only performed if the\n"
"amount of improvement is greater or equal hyteresis\n",

-   "create-bts", "2",
+   "create-n-bts", "2",
"create-ms", "0", "TCH/F", "AMR",
"meas-rep", "0", "27","0", "1","0","30",
"expect-no-chan",
@@ -748,7 +748,7 @@
"is below minimum RX level, even if the better neighbor cell (minimum\n"
"RX level reached) does not meet the hysteresis.\n",

-   "create-bts", "2",
+   "create-n-bts", "2",
"create-ms", "0", "TCH/F", "AMR",

Change in osmo-bsc[master]: handover_test: allow arbitrary timeslot config and multiple TRX

2020-11-17 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21195 )

Change subject: handover_test: allow arbitrary timeslot config and multiple TRX
..

handover_test: allow arbitrary timeslot config and multiple TRX

Adjust 'create-bts' command so that it allows multiple TRX and arbitrary
timeslot configurations. It is now possible to write tests for dynamic
timeslots and multiple TRX.

Change-Id: Ic645cea671aa4798804666b8886f11bab5351e11
---
M tests/handover/handover_test.c
1 file changed, 42 insertions(+), 7 deletions(-)

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



diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index b469f03..2aa48b7 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -176,7 +176,14 @@

 enum gsm_phys_chan_config pchan_from_str(const char *str)
 {
-   enum gsm_phys_chan_config pchan = gsm_pchan_parse(str);
+   enum gsm_phys_chan_config pchan;
+   if (!strcmp(str, "dyn"))
+   return GSM_PCHAN_TCH_F_TCH_H_PDCH;
+   if (!strcmp(str, "c+s4"))
+   return GSM_PCHAN_CCCH_SDCCH4;
+   if (!strcmp(str, "-"))
+   return GSM_PCHAN_NONE;
+   pchan = gsm_pchan_parse(str);
if (pchan < 0) {
fprintf(stderr, "Invalid timeslot pchan type: %s\n", str);
exit(1);
@@ -185,7 +192,7 @@
 }

 const char * const bts_default_ts[] = {
-   "CCCH+SDCCH4", "TCH/F", "TCH/F", "TCH/F", "TCH/F", "TCH/H", "TCH/H", 
"NONE",
+   "c+s4", "TCH/F", "TCH/F", "TCH/F", "TCH/F", "TCH/H", "TCH/H", "-",
 };

 static struct gsm_bts *create_bts(int num_trx, const char * const *ts_args)
@@ -197,6 +204,13 @@
int trx_i;
struct gsm_bts_trx *trx;

+   fprintf(stderr, "- Creating BTS %d, %d TRX\n", bsc_gsmnet->num_bts, 
num_trx);
+   for (trx_i = 0; trx_i < num_trx; trx_i++) {
+   for (i = 0; i < 8; i++)
+   fprintf(stderr, "\t%s", ts_args[8*trx_i + i]);
+   fprintf(stderr, "\n");
+   }
+
bts = bsc_bts_alloc_register(bsc_gsmnet, GSM_BTS_TYPE_UNKNOWN, 0x3f);
if (!bts) {
printf("No resource for bts1\n");
@@ -235,10 +249,20 @@
trx->ts[i].mo.nm_state.administrative = 
NM_STATE_UNLOCKED;
}

-   for (i = 0; i < ARRAY_SIZE(bts->c0->ts); i++) {
+   for (i = 0; i < ARRAY_SIZE(trx->ts); i++) {
/* make sure ts->lchans[] get initialized */
-   osmo_fsm_inst_dispatch(bts->c0->ts[i].fi, 
TS_EV_RSL_READY, 0);
-   osmo_fsm_inst_dispatch(bts->c0->ts[i].fi, 
TS_EV_OML_READY, 0);
+   osmo_fsm_inst_dispatch(trx->ts[i].fi, TS_EV_RSL_READY, 
0);
+   osmo_fsm_inst_dispatch(trx->ts[i].fi, TS_EV_OML_READY, 
0);
+
+   /* Unused dyn TS start out as used for PDCH */
+   switch (trx->ts[i].pchan_on_init) {
+   case GSM_PCHAN_TCH_F_TCH_H_PDCH:
+   case GSM_PCHAN_TCH_F_PDCH:
+   trx->ts[i].pchan_is = GSM_PCHAN_PDCH;
+   break;
+   default:
+   break;
+   }
}
}

@@ -1530,12 +1554,23 @@
while (*test_case) {
if (!strcmp(*test_case, "create-n-bts")) {
int n = atoi(test_case[1]);
-   fprintf(stderr, "- Creating %d BTS (one TRX each, "
-   "TS(1-4) are TCH/F, TS(5-6) are TCH/H)\n", n);
for (i = 0; i < n; i++)
create_bts(1, bts_default_ts);
test_case += 2;
} else
+   if (!strcmp(*test_case, "create-bts")) {
+   /* new BTS with one TRX:
+* "create-bts", "1", "CCCH+SDCCH4", "TCH/F", "TCH/F", 
"TCH/F", "TCH/F", "TCH/H", "TCH/H", "PDCH",
+*
+* new BTS with two TRX:
+* "create-bts", "2", "CCCH+SDCCH4", "TCH/F", "TCH/F", 
"TCH/F", "TCH/F", "TCH/H", "TCH/H", "PDCH",
+*"SDCCH8", "TCH/F", "TCH/F", 
"TCH/F", "TCH/F", "TCH/H", "TCH/H", "PDCH",
+*/
+   int num_trx = atoi(test_case[1]);
+   const char * const * ts_cfg = (void*)_case[2];
+   create_bts(num_trx, ts_cfg);
+   test_case += 2 + 8 * num_trx;
+   } else
if (!strcmp(*test_case, "as-enable")) {
fprintf(stderr, "- Set assignment enable state at "
"BTS %s to 

Change in osmo-bsc[master]: handover test: add 'expect-ts-use' to clarify tests

2020-11-17 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21197 )

Change subject: handover test: add 'expect-ts-use' to clarify tests
..

handover test: add 'expect-ts-use' to clarify tests

In handover tests, it can be hard to follow which lchans are currently
occupied. The expect-ts-use command is like an assertion for a specific
distribution of used lchans, and helps understanding test intentions.

Change-Id: I6f4b573de7faace2d6bfe4f58b568e69c74dd07d
---
M tests/handover/handover_test.c
1 file changed, 187 insertions(+), 0 deletions(-)

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



diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index 6a24fde..0abe41d 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -273,6 +273,74 @@
return bts;
 }

+const char *ts_use_str(struct gsm_bts_trx_ts *ts)
+{
+   switch (ts->pchan_is) {
+   case GSM_PCHAN_CCCH_SDCCH4:
+   return "c+s4";
+
+   case GSM_PCHAN_NONE:
+   return "-";
+
+   case GSM_PCHAN_TCH_F:
+   if (lchan_state_is(>lchan[0], LCHAN_ST_ESTABLISHED))
+   return "TCH/F";
+   else
+   return "-";
+
+   case GSM_PCHAN_TCH_H:
+   if (lchan_state_is(>lchan[0], LCHAN_ST_ESTABLISHED)
+   && lchan_state_is(>lchan[1], LCHAN_ST_ESTABLISHED))
+   return "TCH/HH";
+   if (lchan_state_is(>lchan[0], LCHAN_ST_ESTABLISHED))
+   return "TCH/H-";
+   if (lchan_state_is(>lchan[1], LCHAN_ST_ESTABLISHED))
+   return "TCH/-H";
+   return "-";
+
+   default:
+   return gsm_pchan_name(ts->pchan_is);
+   }
+}
+
+bool expect_ts_use(int bts_nr, int trx_nr, const char * const *ts_use)
+{
+   struct gsm_bts *bts;
+   struct gsm_bts_trx *trx;
+   int i;
+   int mismatching_ts = -1;
+   bts = gsm_bts_num(bsc_gsmnet, bts_nr);
+   OSMO_ASSERT(bts);
+   trx = gsm_bts_trx_num(bts, trx_nr);
+   OSMO_ASSERT(trx);
+
+   fprintf(stderr, "Expect TS use:");
+   for (i = 0; i < 8; i++)
+   fprintf(stderr, "\t%s", ts_use[i]);
+   fprintf(stderr, "\n");
+   fprintf(stderr, "   Got TS use:");
+
+   for (i = 0; i < 8; i++) {
+   struct gsm_bts_trx_ts *ts = >ts[i];
+   const char *use = ts_use_str(ts);
+
+   fprintf(stderr, "\t%s", use);
+
+   if (!strcmp(ts_use[i], "*"))
+   continue;
+   if (strcmp(ts_use[i], use) && mismatching_ts < 0)
+   mismatching_ts = i;
+   }
+   fprintf(stderr, "\n");
+
+   if (mismatching_ts >= 0) {
+   fprintf(stderr, "Test failed: mismatching TS use in bts %d trx 
%d ts %d\n",
+  bts_nr, trx_nr, mismatching_ts);
+   return false;
+   }
+   return true;
+}
+
 void create_conn(struct gsm_lchan *lchan)
 {
static unsigned int next_imsi = 0;
@@ -567,6 +635,7 @@

"create-n-bts", "7",
"create-ms", "0", "TCH/F", "AMR",
+   "expect-ts-use", "0", "0", "*", "TCH/F", "-", "-", "-", "-", "-", "-",
"meas-rep", "0", "30","0",
"6","0","20","1","21","2","18","3","20","4","23","5","19",
"expect-no-chan",
@@ -581,12 +650,15 @@

"create-n-bts", "7",
"create-ms", "0", "TCH/F", "AMR",
+   "expect-ts-use", "0", "0", "*", "TCH/F", "-", "-", "-", "-", "-", "-",
"meas-rep", "0", "10","0",
"6","0","20","1","21","2","18","3","20","4","23","5","19",
"expect-chan", "5", "1",
"ack-chan",
"expect-ho", "0", "1",
"ho-complete",
+   "expect-ts-use", "0", "0", "*", "-", "-", "-", "-", "-", "-", "-",
+   "expect-ts-use", "5", "0", "*", "TCH/F", "-", "-", "-", "-", "-", "-",
NULL
 };

@@ -605,6 +677,7 @@
"create-n-bts", "2",
"afs-rxlev-improve", "0", "5",
"create-ms", "0", "TCH/H", "AMR",
+   "expect-ts-use", "0", "0", "*", "-", "-", "-", "-", "TCH/H-", "-", "-",
"as-enable", "0", "0",
"ho-enable", "0", "0",
"meas-rep", "0", "0","0", "1","0","30",
@@ -615,6 +688,7 @@
"ack-chan",
"expect-ho", "0", "5",
"ho-complete",
+   "expect-ts-use", "0", "0", "*", "TCH/F", "-", "-", "-", "-", "-", "-",
"ho-enable", "0", "1",
"ho-enable", "1", "0",
"meas-rep", "0", "0","0", "1","0","30",
@@ -625,6 +699,8 @@
"ack-chan",
"expect-ho", "0", "1",
"ho-complete",
+   "expect-ts-use", "0", "0", "*", "-", "-", "-", "-", "-", "-", "-",
+   "expect-ts-use", "1", "0", "*", "TCH/F", "-", 

Change in osmo-bsc[master]: handover test: fix dyn ts: set pchan_is on act / rel

2020-11-17 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21196 )

Change subject: handover test: fix dyn ts: set pchan_is on act / rel
..

handover test: fix dyn ts: set pchan_is on act / rel

Before this, handover_test channel activation and release on dynamic timeslots
failed to reflect the correct pchan type that osmo-bsc uses.

Change-Id: I3284b4565ad2c3b124442f4373243da1518206ce
---
M tests/handover/handover_test.c
1 file changed, 33 insertions(+), 0 deletions(-)

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



diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index 2aa48b7..6a24fde 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -318,6 +318,14 @@
/* serious hack into osmo_fsm */
lchan->fi->state = LCHAN_ST_ESTABLISHED;
lchan->ts->fi->state = TS_ST_IN_USE;
+
+   if (lchan->ts->pchan_on_init == GSM_PCHAN_TCH_F_TCH_H_PDCH)
+   lchan->ts->pchan_is = full_rate ? GSM_PCHAN_TCH_F : 
GSM_PCHAN_TCH_H;
+   if (lchan->ts->pchan_on_init == GSM_PCHAN_TCH_F_PDCH) {
+   OSMO_ASSERT(full_rate);
+   lchan->ts->pchan_is = GSM_PCHAN_TCH_F;
+   }
+
LOG_LCHAN(lchan, LOGL_DEBUG, "activated by handover_test.c\n");

create_conn(lchan);
@@ -491,6 +499,7 @@
struct e1inp_sign_link *sign_link = msg->dst;
int rc;
struct gsm_lchan *lchan = rsl_lchan_lookup(sign_link->trx, dh->chan_nr, 
);
+   struct gsm_lchan *other_lchan;

if (rc) {
printf("rsl_lchan_lookup() failed\n");
@@ -507,6 +516,30 @@
rc = parse_chan_rel(lchan, dh->data);
if (rc == 0)
send_chan_act_ack(chan_req_lchan, 0);
+
+   /* send dyn TS back to PDCH if unused */
+   switch (chan_req_lchan->ts->pchan_on_init) {
+   case GSM_PCHAN_TCH_F_TCH_H_PDCH:
+   case GSM_PCHAN_TCH_F_PDCH:
+   switch (chan_req_lchan->ts->pchan_is) {
+   case GSM_PCHAN_TCH_H:
+   other_lchan = _req_lchan->ts->lchan[
+   (chan_req_lchan == 
_req_lchan->ts->lchan[0])?
+   1 : 0];
+   if (lchan_state_is(other_lchan, 
LCHAN_ST_ESTABLISHED))
+   break;
+   /* else fall thru */
+   case GSM_PCHAN_TCH_F:
+   chan_req_lchan->ts->pchan_is = GSM_PCHAN_PDCH;
+   break;
+   default:
+   break;
+   }
+   break;
+   default:
+   break;
+   }
+
break;
case RSL_MT_DATA_REQ:
rc = parse_ho_command(lchan, msg->l3h, msgb_l3len(msg));

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I3284b4565ad2c3b124442f4373243da1518206ce
Gerrit-Change-Number: 21196
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-bsc[master]: handover_test: add 'set-ts-use'

2020-11-17 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21198 )

Change subject: handover_test: add 'set-ts-use'
..

handover_test: add 'set-ts-use'

When a test wants to use N lchans, so far it has to issue N 'create-ms'
commands. Many lchan distributions cannot be easily obtained by this, because
'crate-ms' always takes the first free lchan. To shorten test setup and easily
allow arbitrary lchan distributions, this command sets specific lchans to
specific usage states in one line.

Change-Id: I6e90679bf22609fb72e53e3d11748a4070a38159
---
M tests/handover/handover_test.c
1 file changed, 118 insertions(+), 10 deletions(-)

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



diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index 0abe41d..5655bda 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -372,20 +372,12 @@
osmo_fsm_inst_dispatch(conn->fi, GSCON_EV_A_CONN_CFM, NULL);
 }

-/* create lchan */
-struct gsm_lchan *create_lchan(struct gsm_bts *bts, int full_rate, char *codec)
+struct gsm_lchan *lchan_act(struct gsm_lchan *lchan, int full_rate, const char 
*codec)
 {
-   struct gsm_lchan *lchan;
-
-   lchan = lchan_select_by_type(bts, (full_rate) ? GSM_LCHAN_TCH_F : 
GSM_LCHAN_TCH_H);
-   if (!lchan) {
-   printf("No resource for lchan\n");
-   exit(EXIT_FAILURE);
-   }
-
/* serious hack into osmo_fsm */
lchan->fi->state = LCHAN_ST_ESTABLISHED;
lchan->ts->fi->state = TS_ST_IN_USE;
+   lchan->type = full_rate ? GSM_LCHAN_TCH_F : GSM_LCHAN_TCH_H;

if (lchan->ts->pchan_on_init == GSM_PCHAN_TCH_F_TCH_H_PDCH)
lchan->ts->pchan_is = full_rate ? GSM_PCHAN_TCH_F : 
GSM_PCHAN_TCH_H;
@@ -425,6 +417,102 @@
return lchan;
 }

+struct gsm_lchan *create_lchan(struct gsm_bts *bts, int full_rate, const char 
*codec)
+{
+   struct gsm_lchan *lchan;
+
+   lchan = lchan_select_by_type(bts, (full_rate) ? GSM_LCHAN_TCH_F : 
GSM_LCHAN_TCH_H);
+   if (!lchan) {
+   printf("No resource for lchan\n");
+   exit(EXIT_FAILURE);
+   }
+
+   return lchan_act(lchan, full_rate, codec);
+}
+
+static void lchan_clear(struct gsm_lchan *lchan)
+{
+   lchan_release(lchan, true, false, 0);
+}
+
+static void ts_clear(struct gsm_bts_trx_ts *ts)
+{
+   struct gsm_lchan *lchan;
+   ts_for_each_lchan(lchan, ts) {
+   if (lchan_state_is(lchan, LCHAN_ST_UNUSED))
+   continue;
+   lchan_clear(lchan);
+   }
+}
+
+bool set_ts_use(int bts_nr, int trx_nr, const char * const *ts_use)
+{
+   struct gsm_bts *bts;
+   struct gsm_bts_trx *trx;
+   int i;
+   bts = gsm_bts_num(bsc_gsmnet, bts_nr);
+   OSMO_ASSERT(bts);
+   trx = gsm_bts_trx_num(bts, trx_nr);
+   OSMO_ASSERT(trx);
+
+   fprintf(stderr, "Setting TS use:");
+   for (i = 0; i < 8; i++)
+   fprintf(stderr, "\t%s", ts_use[i]);
+   fprintf(stderr, "\n");
+
+   for (i = 0; i < 8; i++) {
+   struct gsm_bts_trx_ts *ts = >ts[i];
+   const char *want_use = ts_use[i];
+   const char *is_use = ts_use_str(ts);
+
+   if (!strcmp(want_use, "*"))
+   continue;
+
+   /* If it is already as desired, don't change anything */
+   if (!strcmp(want_use, is_use))
+   continue;
+
+   if (!strcmp(want_use, "TCH/F")) {
+   if (!ts_is_capable_of_pchan(ts, GSM_PCHAN_TCH_F)) {
+   printf("Error: bts %d trx %d ts %d cannot be 
used as TCH/F\n",
+  bts_nr, trx_nr, i);
+   return false;
+   }
+   ts_clear(ts);
+
+   lchan_act(>lchan[0], true, "AMR");
+   } else if (!strcmp(want_use, "TCH/H-")
+  || !strcmp(want_use, "TCH/HH")
+  || !strcmp(want_use, "TCH/-H")) {
+   bool act[2];
+   int j;
+
+   if (!ts_is_capable_of_pchan(ts, GSM_PCHAN_TCH_H)) {
+   printf("Error: bts %d trx %d ts %d cannot be 
used as TCH/H\n",
+  bts_nr, trx_nr, i);
+   return false;
+   }
+
+   if (ts->pchan_is != GSM_PCHAN_TCH_H)
+   ts_clear(ts);
+
+   act[0] = want_use[4] == 'H';
+   act[1] = want_use[5] == 'H';
+
+   for (j = 0; j < 2; j++) {
+   if (lchan_state_is(>lchan[j], 
LCHAN_ST_UNUSED)) {
+  

Change in osmo-bsc[master]: handover_test cosmetic: eliminate bts array and bts_num from main()

2020-11-17 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21194 )

Change subject: handover_test cosmetic: eliminate bts array and bts_num from 
main()
..

handover_test cosmetic: eliminate bts array and bts_num from main()

This "global" array shadows the bsc_gsmnet state and is not needed. Look up the
BTS in bsc_gsmnet like all of osmo-bsc does.

Change-Id: Ieb27403b97124771e4d28b9c69bf7c36288f396d
---
M tests/handover/handover_test.c
1 file changed, 17 insertions(+), 13 deletions(-)

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



diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index 3ceaf31..b469f03 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -1443,11 +1443,16 @@
.num_cat = ARRAY_SIZE(log_categories),
 };

+struct gsm_bts *bts_by_num_str(const char *num_str)
+{
+   struct gsm_bts *bts = gsm_bts_num(bsc_gsmnet, atoi(num_str));
+   OSMO_ASSERT(bts);
+   return bts;
+}
+
 int main(int argc, char **argv)
 {
char **test_case;
-   struct gsm_bts *bts[256];
-   int bts_num = 0;
struct gsm_lchan *lchan[256];
int lchan_num = 0;
int i;
@@ -1528,32 +1533,31 @@
fprintf(stderr, "- Creating %d BTS (one TRX each, "
"TS(1-4) are TCH/F, TS(5-6) are TCH/H)\n", n);
for (i = 0; i < n; i++)
-   bts[bts_num + i] = create_bts(1, 
bts_default_ts);
-   bts_num += n;
+   create_bts(1, bts_default_ts);
test_case += 2;
} else
if (!strcmp(*test_case, "as-enable")) {
fprintf(stderr, "- Set assignment enable state at "
"BTS %s to %s\n", test_case[1], test_case[2]);
-   ho_set_hodec2_as_active(bts[atoi(test_case[1])]->ho, 
atoi(test_case[2]));
+   
ho_set_hodec2_as_active(bts_by_num_str(test_case[1])->ho, atoi(test_case[2]));
test_case += 3;
} else
if (!strcmp(*test_case, "ho-enable")) {
fprintf(stderr, "- Set handover enable state at "
"BTS %s to %s\n", test_case[1], test_case[2]);
-   ho_set_ho_active(bts[atoi(test_case[1])]->ho, 
atoi(test_case[2]));
+   ho_set_ho_active(bts_by_num_str(test_case[1])->ho, 
atoi(test_case[2]));
test_case += 3;
} else
if (!strcmp(*test_case, "afs-rxlev-improve")) {
fprintf(stderr, "- Set afs RX level improvement at "
"BTS %s to %s\n", test_case[1], test_case[2]);
-   
ho_set_hodec2_afs_bias_rxlev(bts[atoi(test_case[1])]->ho, atoi(test_case[2]));
+   
ho_set_hodec2_afs_bias_rxlev(bts_by_num_str(test_case[1])->ho, 
atoi(test_case[2]));
test_case += 3;
} else
if (!strcmp(*test_case, "afs-rxqual-improve")) {
fprintf(stderr, "- Set afs RX quality improvement at "
"BTS %s to %s\n", test_case[1], test_case[2]);
-   
ho_set_hodec2_afs_bias_rxqual(bts[atoi(test_case[1])]->ho, atoi(test_case[2]));
+   
ho_set_hodec2_afs_bias_rxqual(bts_by_num_str(test_case[1])->ho, 
atoi(test_case[2]));
test_case += 3;
} else
if (!strcmp(*test_case, "set-min-free")) {
@@ -1561,30 +1565,30 @@
"slots at BTS %s to %s\n", test_case[2],
test_case[1], test_case[3]);
if (!strcmp(test_case[2], "TCH/F"))
-   
ho_set_hodec2_tchf_min_slots(bts[atoi(test_case[1])]->ho, atoi(test_case[3]));
+   
ho_set_hodec2_tchf_min_slots(bts_by_num_str(test_case[1])->ho, 
atoi(test_case[3]));
else
-   
ho_set_hodec2_tchh_min_slots(bts[atoi(test_case[1])]->ho, atoi(test_case[3]));
+   
ho_set_hodec2_tchh_min_slots(bts_by_num_str(test_case[1])->ho, 
atoi(test_case[3]));
test_case += 4;
} else
if (!strcmp(*test_case, "set-max-ho")) {
fprintf(stderr, "- Setting maximum parallel handovers "
"at BTS %s to %s\n", test_case[1],
test_case[2]);
-   ho_set_hodec2_ho_max( bts[atoi(test_case[1])]->ho, 
atoi(test_case[2]));
+   ho_set_hodec2_ho_max( 

Change in osmo-bsc[master]: handover_test prep: allow arbitrary timeslots in create_bts() code

2020-11-17 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21191 )

Change subject: handover_test prep: allow arbitrary timeslots in create_bts() 
code
..

handover_test prep: allow arbitrary timeslots in create_bts() code

Allow passing timeslot config to create_bts().

Preparation for Ic645cea671aa4798804666b8886f11bab5351e11 to allow arbitrary
timeslot configurations in the tests.

Change-Id: I3ae898be4a503060c6bf30ae89115a75461ffc27
---
M tests/handover/handover_test.c
1 file changed, 32 insertions(+), 13 deletions(-)

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



diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index cc53386..19a8798 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -174,12 +174,27 @@
abis_rsl_rcvmsg(msg);
 }

-static struct gsm_bts *create_bts()
+enum gsm_phys_chan_config pchan_from_str(const char *str)
+{
+   enum gsm_phys_chan_config pchan = gsm_pchan_parse(str);
+   if (pchan < 0) {
+   fprintf(stderr, "Invalid timeslot pchan type: %s\n", str);
+   exit(1);
+   }
+   return pchan;
+}
+
+const char * const bts_default_ts[] = {
+   "CCCH+SDCCH4", "TCH/F", "TCH/F", "TCH/F", "TCH/F", "TCH/H", "TCH/H", 
"NONE",
+};
+
+static struct gsm_bts *create_bts(const char * const *ts_args)
 {
static int arfcn = 870;
struct gsm_bts *bts;
struct e1inp_sign_link *rsl_link;
int i;
+   struct gsm_bts_trx *trx;

bts = bsc_bts_alloc_register(bsc_gsmnet, GSM_BTS_TYPE_UNKNOWN, 0x3f);
if (!bts) {
@@ -198,19 +213,23 @@
rsl_link->trx = bts->c0;
bts->c0->rsl_link = rsl_link;

-   bts->c0->mo.nm_state.operational = NM_OPSTATE_ENABLED;
-   bts->c0->mo.nm_state.availability = NM_AVSTATE_OK;
-   bts->c0->mo.nm_state.administrative = NM_STATE_UNLOCKED;
-   bts->c0->bb_transc.mo.nm_state.operational = NM_OPSTATE_ENABLED;
-   bts->c0->bb_transc.mo.nm_state.availability = NM_AVSTATE_OK;
-   bts->c0->bb_transc.mo.nm_state.administrative = NM_STATE_UNLOCKED;
+   trx = gsm_bts_trx_num(bts, 0);
+
+   trx->mo.nm_state.operational = NM_OPSTATE_ENABLED;
+   trx->mo.nm_state.availability = NM_AVSTATE_OK;
+   trx->mo.nm_state.administrative = NM_STATE_UNLOCKED;
+   trx->bb_transc.mo.nm_state.operational = NM_OPSTATE_ENABLED;
+   trx->bb_transc.mo.nm_state.availability = NM_AVSTATE_OK;
+   trx->bb_transc.mo.nm_state.administrative = NM_STATE_UNLOCKED;

/* 4 full rate and 4 half rate channels */
-   for (i = 1; i <= 6; i++) {
-   bts->c0->ts[i].pchan_from_config = (i < 5) ? GSM_PCHAN_TCH_F : 
GSM_PCHAN_TCH_H;
-   bts->c0->ts[i].mo.nm_state.operational = NM_OPSTATE_ENABLED;
-   bts->c0->ts[i].mo.nm_state.availability = NM_AVSTATE_OK;
-   bts->c0->ts[i].mo.nm_state.administrative = NM_STATE_UNLOCKED;
+   for (i = 0; i < 8; i++) {
+   trx->ts[i].pchan_from_config = pchan_from_str(ts_args[i]);
+   if (trx->ts[i].pchan_from_config == GSM_PCHAN_NONE)
+   continue;
+   trx->ts[i].mo.nm_state.operational = NM_OPSTATE_ENABLED;
+   trx->ts[i].mo.nm_state.availability = NM_AVSTATE_OK;
+   trx->ts[i].mo.nm_state.administrative = NM_STATE_UNLOCKED;
}

for (i = 0; i < ARRAY_SIZE(bts->c0->ts); i++) {
@@ -1505,7 +1524,7 @@
fprintf(stderr, "- Creating %d BTS (one TRX each, "
"TS(1-4) are TCH/F, TS(5-6) are TCH/H)\n", n);
for (i = 0; i < n; i++)
-   bts[bts_num + i] = create_bts();
+   bts[bts_num + i] = create_bts(bts_default_ts);
bts_num += n;
test_case += 2;
} else

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I3ae898be4a503060c6bf30ae89115a75461ffc27
Gerrit-Change-Number: 21191
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-bsc[master]: handover_test prep: allow configuring several trx in create_bts()

2020-11-17 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21192 )

Change subject: handover_test prep: allow configuring several trx in 
create_bts()
..

handover_test prep: allow configuring several trx in create_bts()

Preparation for Ic645cea671aa4798804666b8886f11bab5351e11 to allow arbitrary
timeslot configurations in the tests.

Change-Id: Ie0d0c85552ba24802392423b60cfa3919e87563f
---
M tests/handover/handover_test.c
1 file changed, 26 insertions(+), 22 deletions(-)

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



diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index 19a8798..fefeb0c 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -188,12 +188,13 @@
"CCCH+SDCCH4", "TCH/F", "TCH/F", "TCH/F", "TCH/F", "TCH/H", "TCH/H", 
"NONE",
 };

-static struct gsm_bts *create_bts(const char * const *ts_args)
+static struct gsm_bts *create_bts(int num_trx, const char * const *ts_args)
 {
static int arfcn = 870;
struct gsm_bts *bts;
struct e1inp_sign_link *rsl_link;
int i;
+   int trx_i;
struct gsm_bts_trx *trx;

bts = bsc_bts_alloc_register(bsc_gsmnet, GSM_BTS_TYPE_UNKNOWN, 0x3f);
@@ -213,29 +214,32 @@
rsl_link->trx = bts->c0;
bts->c0->rsl_link = rsl_link;

-   trx = gsm_bts_trx_num(bts, 0);
+   for (trx_i = 0; trx_i < num_trx; trx_i++) {
+   while (!(trx = gsm_bts_trx_num(bts, trx_i)))
+   gsm_bts_trx_alloc(bts);

-   trx->mo.nm_state.operational = NM_OPSTATE_ENABLED;
-   trx->mo.nm_state.availability = NM_AVSTATE_OK;
-   trx->mo.nm_state.administrative = NM_STATE_UNLOCKED;
-   trx->bb_transc.mo.nm_state.operational = NM_OPSTATE_ENABLED;
-   trx->bb_transc.mo.nm_state.availability = NM_AVSTATE_OK;
-   trx->bb_transc.mo.nm_state.administrative = NM_STATE_UNLOCKED;
+   trx->mo.nm_state.operational = NM_OPSTATE_ENABLED;
+   trx->mo.nm_state.availability = NM_AVSTATE_OK;
+   trx->mo.nm_state.administrative = NM_STATE_UNLOCKED;
+   trx->bb_transc.mo.nm_state.operational = NM_OPSTATE_ENABLED;
+   trx->bb_transc.mo.nm_state.availability = NM_AVSTATE_OK;
+   trx->bb_transc.mo.nm_state.administrative = NM_STATE_UNLOCKED;

-   /* 4 full rate and 4 half rate channels */
-   for (i = 0; i < 8; i++) {
-   trx->ts[i].pchan_from_config = pchan_from_str(ts_args[i]);
-   if (trx->ts[i].pchan_from_config == GSM_PCHAN_NONE)
-   continue;
-   trx->ts[i].mo.nm_state.operational = NM_OPSTATE_ENABLED;
-   trx->ts[i].mo.nm_state.availability = NM_AVSTATE_OK;
-   trx->ts[i].mo.nm_state.administrative = NM_STATE_UNLOCKED;
-   }
+   /* 4 full rate and 4 half rate channels */
+   for (i = 0; i < 8; i++) {
+   trx->ts[i].pchan_from_config = 
pchan_from_str(ts_args[trx_i * 8 + i]);
+   if (trx->ts[i].pchan_from_config == GSM_PCHAN_NONE)
+   continue;
+   trx->ts[i].mo.nm_state.operational = NM_OPSTATE_ENABLED;
+   trx->ts[i].mo.nm_state.availability = NM_AVSTATE_OK;
+   trx->ts[i].mo.nm_state.administrative = 
NM_STATE_UNLOCKED;
+   }

-   for (i = 0; i < ARRAY_SIZE(bts->c0->ts); i++) {
-   /* make sure ts->lchans[] get initialized */
-   osmo_fsm_inst_dispatch(bts->c0->ts[i].fi, TS_EV_RSL_READY, 0);
-   osmo_fsm_inst_dispatch(bts->c0->ts[i].fi, TS_EV_OML_READY, 0);
+   for (i = 0; i < ARRAY_SIZE(bts->c0->ts); i++) {
+   /* make sure ts->lchans[] get initialized */
+   osmo_fsm_inst_dispatch(bts->c0->ts[i].fi, 
TS_EV_RSL_READY, 0);
+   osmo_fsm_inst_dispatch(bts->c0->ts[i].fi, 
TS_EV_OML_READY, 0);
+   }
}

for (i = 0; i < bsc_gsmnet->num_bts; i++) {
@@ -1524,7 +1528,7 @@
fprintf(stderr, "- Creating %d BTS (one TRX each, "
"TS(1-4) are TCH/F, TS(5-6) are TCH/H)\n", n);
for (i = 0; i < n; i++)
-   bts[bts_num + i] = create_bts(bts_default_ts);
+   bts[bts_num + i] = create_bts(1, 
bts_default_ts);
bts_num += n;
test_case += 2;
} else

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ie0d0c85552ba24802392423b60cfa3919e87563f
Gerrit-Change-Number: 

Change in osmo-bsc[master]: handover test: add test 30: de-congest TCH/F by moving to dyn TS TCH/H

2020-11-17 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21201 )

Change subject: handover test: add test 30: de-congest TCH/F by moving to dyn 
TS TCH/H
..


Patch Set 2: Code-Review+2

fast tracking the handover_test.c changes, they are a remote corner of the code 
base not ever used in production


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I09ab9f2f79fa434c7279cb4d09899f69b047aa55
Gerrit-Change-Number: 21201
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 16:27:02 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: handover_test: add test 31: TCH/H: re-use dyn TS

2020-11-17 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21202 )

Change subject: handover_test: add test 31: TCH/H: re-use dyn TS
..


Patch Set 3: Code-Review+2

fast tracking the handover_test.c changes, they are a remote corner of the code 
base not ever used in production


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: If222835af92d832b848824e5466bdcaf9af8a614
Gerrit-Change-Number: 21202
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 16:26:53 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: handover test: add test 30: de-congest TCH/F by moving to dyn TS TCH/H

2020-11-17 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21201 )

Change subject: handover test: add test 30: de-congest TCH/F by moving to dyn 
TS TCH/H
..


Patch Set 2:

fast tracking the handover_test.c changes, they are a remote corner of the code 
base not ever used in production


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I09ab9f2f79fa434c7279cb4d09899f69b047aa55
Gerrit-Change-Number: 21201
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 16:26:42 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bsc[master]: handover_test: drop secondary array of lchans

2020-11-17 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21200 )

Change subject: handover_test: drop secondary array of lchans
..


Patch Set 2: Code-Review+2

fast tracking the handover_test.c changes, they are a remote corner of the code 
base not ever used in production


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I7c80a16324d764969f279a5e1d6f55b0dbe9c17b
Gerrit-Change-Number: 21200
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 16:26:33 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: handover_test: change 'meas-rep' params to bts-trx-ts-ss nr

2020-11-17 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21199 )

Change subject: handover_test: change 'meas-rep' params to bts-trx-ts-ss nr
..


Patch Set 2: Code-Review+2

fast tracking the handover_test.c changes, they are a remote corner of the code 
base not ever used in production


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I7ab2ef604196cfe96112dfefb9aa930368bf4812
Gerrit-Change-Number: 21199
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 16:26:24 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: handover test: add 'expect-ts-use' to clarify tests

2020-11-17 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21197 )

Change subject: handover test: add 'expect-ts-use' to clarify tests
..


Patch Set 2: Code-Review+2

combine


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I6f4b573de7faace2d6bfe4f58b568e69c74dd07d
Gerrit-Change-Number: 21197
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 16:24:44 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: handover_test: allow arbitrary timeslot config and multiple TRX

2020-11-17 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21195 )

Change subject: handover_test: allow arbitrary timeslot config and multiple TRX
..


Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/c/osmo-bsc/+/21195/2/tests/handover/handover_test.c
File tests/handover/handover_test.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/21195/2/tests/handover/handover_test.c@180
PS2, Line 180:  if (!strcmp(str, "dyn"))
> osmodyn?
hmm... maybe dyn-fh and dyn-f? it's just an optional shortcut anyway.

(the main idea to have shortcuts at all is to allow listing timeslot configs 
and later expect-ts-use with tabs so that each timeslot perfectly lines up with 
those above, so i'd need names <= 7 chars.
That was paired with the idea of moving these test scripts from the current 
string arrays out to actual text files, which i think would be rather nicer but 
i also think might not be worth the effort so postponing that... so right now, 
when each and every arg also needs quotes and a comma like '"xxx",' the whole 
idea of tabs is moot ... all of this is just cosmetic bikeshed bla bla of 
course)



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ic645cea671aa4798804666b8886f11bab5351e11
Gerrit-Change-Number: 21195
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 16:24:04 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-bsc[master]: speed up py tests: add --fast-shutdown option to osmo-bsc

2020-11-17 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21206 )

Change subject: speed up py tests: add --fast-shutdown option to osmo-bsc
..


Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/c/osmo-bsc/+/21206/2/src/osmo-bsc/osmo_bsc_main.c
File src/osmo-bsc/osmo_bsc_main.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/21206/2/src/osmo-bsc/osmo_bsc_main.c@701
PS2, Line 701:  sleep(3);
> Why is this sleep added here in first place? Looks like a hack to me. […]
a discussion on IRC reveals:

"it just ensures that the write queues on Abis are drained"
" makes sure that the OML shutdown messages are actually sent out to the BTS"  
" particularly important for E1 BTSs which (at least in the case of Siemens 
BS-11) continue to transmit if the BSC shuts down unclean"

and a better solution than the sleep() would be to continue the select loop 
until all write queues are empty: after the shutdown signal is emitted, set a 
global bool that exits the loop when all queued messages were dispatched.



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I506349c532b13751f674e4b9a132219d823f19e1
Gerrit-Change-Number: 21206
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 16:06:47 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: bts: TC_sacch_chan_act_ho_sync: expect SACCH with MS Power IE

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

Change subject: bts: TC_sacch_chan_act_ho_sync: expect SACCH with MS Power IE
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21076
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: I2e1c0ecc9de65a019aaa9f08bb051bf051156172
Gerrit-Change-Number: 21076
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 16:13:59 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: bts: TC_sacch_chan_act_ho_sync: expect SACCH with MS Power IE

2020-11-17 Thread neels
Hello Jenkins Builder,

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

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

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

Change subject: bts: TC_sacch_chan_act_ho_sync: expect SACCH with MS Power IE
..

bts: TC_sacch_chan_act_ho_sync: expect SACCH with MS Power IE

According to 3GPP TS 48.058 4.1.4, SACCH may be transmitted also for only MS
Power present, and no Access Delay.

Change-Id: I2e1c0ecc9de65a019aaa9f08bb051bf051156172
---
M bts/BTS_Tests.ttcn
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/76/21076/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21076
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: I2e1c0ecc9de65a019aaa9f08bb051bf051156172
Gerrit-Change-Number: 21076
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-MessageType: newpatchset


Change in osmo-bts[master]: log: rsl_rx_chan_activ: show chan type as human readable string

2020-11-17 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/21077 )

Change subject: log: rsl_rx_chan_activ: show chan type as human readable string
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/c/osmo-bts/+/21077/1/src/common/rsl.c
File src/common/rsl.c:

https://gerrit.osmocom.org/c/osmo-bts/+/21077/1/src/common/rsl.c@1265
PS1, Line 1265:   type, get_value_string(rsl_act_type_names, 
type),
> Does it make sense to drop the type=0x%02x ? Or isn't the string enough? It 
> should print the value a […]
i was aiming to not annoy people that might be accustomed to the type numbers 
in the logs... but for me, the string would suffice indeed.

(like i am currently super annoyed by some firefox UI changes that make perfect 
sense to some developer but are just messing up my muscle memory N times a day)



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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I3acf6c18309d3b4093dbc295be622363cb6dbcdc
Gerrit-Change-Number: 21077
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 16:09:55 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-pcu[master]: Support multiplexing of GPRS and EGPRS TBFs in one PDCH

2020-11-17 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/21178 )

Change subject: Support multiplexing of GPRS and EGPRS TBFs in one PDCH
..


Patch Set 3:

This change is ready for review.


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ib4991c864eda6864533363443f76ae5d999532ae
Gerrit-Change-Number: 21178
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 17 Nov 2020 15:42:32 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-pcu[master]: Implement downgrade to DL MCS1-4 when USF for GPRS_only MS

2020-11-17 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/21179 )

Change subject: Implement downgrade to DL MCS1-4 when USF for GPRS_only MS
..


Patch Set 3:

This change is ready for review.


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I9af23e175435fe9ae7b0e4119ad52fcd4707b9ca
Gerrit-Change-Number: 21179
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 17 Nov 2020 15:42:35 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


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

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

Change subject: pcu: Introduce test TC_multiplex_dl_gprs_egprs
..


Patch Set 2:

This change is ready for review.


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21177
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: I1b6b1042f25888407f48865de220c8af7451a7f0
Gerrit-Change-Number: 21177
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 17 Nov 2020 15:13:14 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: pcu: Implement ACKing EGPRS Dl TBF blocks

2020-11-17 Thread pespin
Hello Jenkins Builder, laforge, fixeria,

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

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

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

Change subject: pcu: Implement ACKing EGPRS Dl TBF blocks
..

pcu: Implement ACKing EGPRS Dl TBF blocks

Change-Id: I9f1b621a8365e69d2e1a33d59cb8c7a59639ad94
---
M library/RLCMAC_Templates.ttcn
M pcu/GPRS_Components.ttcn
M pcu/PCU_Tests.ttcn
3 files changed, 118 insertions(+), 38 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/27/21127/5
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21127
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: I9f1b621a8365e69d2e1a33d59cb8c7a59639ad94
Gerrit-Change-Number: 21127
Gerrit-PatchSet: 5
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: newpatchset


Change in osmo-pcu[master]: decoding: Fix implicit ACK due to BeginOfWindow=1 on rx EGPRS PKT DL ...

2020-11-17 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/21122 )

Change subject: decoding: Fix implicit ACK due to BeginOfWindow=1 on rx EGPRS 
PKT DL ACK/NACK
..


Patch Set 3:

Abandoning, I understood incorrectly the specs and I mixed up V(Q) and V(A) 
here.


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ic71326fc956491bb7e5e50896a6ba8f5354c20ec
Gerrit-Change-Number: 21122
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 17 Nov 2020 14:56:57 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-pcu[master]: decoding: Fix implicit ACK due to BeginOfWindow=1 on rx EGPRS PKT DL ...

2020-11-17 Thread pespin
pespin has abandoned this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/21122 )

Change subject: decoding: Fix implicit ACK due to BeginOfWindow=1 on rx EGPRS 
PKT DL ACK/NACK
..


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ic71326fc956491bb7e5e50896a6ba8f5354c20ec
Gerrit-Change-Number: 21122
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: abandon


Change in osmo-pcu[master]: sched: Fix sending GSMTAP DL data blocks with unset USF

2020-11-17 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/21174 )

Change subject: sched: Fix sending GSMTAP DL data blocks with unset USF
..

sched: Fix sending GSMTAP DL data blocks with unset USF

Change-Id: Ib5ceb83a85b517ee9bf2c59cf27fe818373abe60
---
M src/gprs_rlcmac_sched.cpp
1 file changed, 7 insertions(+), 3 deletions(-)

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



diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp
index 40b2f91..706fbb5 100644
--- a/src/gprs_rlcmac_sched.cpp
+++ b/src/gprs_rlcmac_sched.cpp
@@ -388,6 +388,7 @@
uint8_t usf = 0x7;
struct msgb *msg = NULL;
uint32_t poll_fn, sba_fn;
+   enum pcu_gsmtap_category gsmtap_cat;

if (trx >= 8 || ts >= 8)
return -EINVAL;
@@ -426,19 +427,19 @@
/* Prio 1: select control message */
msg = sched_select_ctrl_msg(trx, ts, fn, block_nr, pdch, ul_ass_tbf,
dl_ass_tbf, ul_ack_tbf);
-   tap_n_acc(msg, bts, trx, ts, fn, PCU_GSMTAP_C_DL_CTRL);
+   gsmtap_cat = PCU_GSMTAP_C_DL_CTRL;

/* Prio 2: select data message for downlink */
if (!msg) {
msg = sched_select_downlink(bts, trx, ts, fn, block_nr, pdch);
-   tap_n_acc(msg, bts, trx, ts, fn, PCU_GSMTAP_C_DL_DATA_GPRS);
+   gsmtap_cat = PCU_GSMTAP_C_DL_DATA_GPRS;
}

/* Prio 3: send dummy contol message */
if (!msg) {
/* increase counter */
msg = sched_dummy();
-   tap_n_acc(msg, bts, trx, ts, fn, PCU_GSMTAP_C_DL_DUMMY);
+   gsmtap_cat = PCU_GSMTAP_C_DL_DUMMY;
}

if (!msg)
@@ -453,6 +454,9 @@
/* Used to measure the leak rate, count all blocks */
gprs_bssgp_update_frames_sent();

+   /* Send to GSMTAP */
+   tap_n_acc(msg, bts, trx, ts, fn, gsmtap_cat);
+
/* send PDTCH/PACCH to L1 */
pcu_l1if_tx_pdtch(msg, trx, ts, bts->trx[trx].arfcn, fn, block_nr);


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ib5ceb83a85b517ee9bf2c59cf27fe818373abe60
Gerrit-Change-Number: 21174
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-pcu[master]: sched: Use correct GMSTAP category for EGPRS DL data blocks

2020-11-17 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/21175 )

Change subject: sched: Use correct GMSTAP category for EGPRS DL data blocks
..

sched: Use correct GMSTAP category for EGPRS DL data blocks

Change-Id: I3bd8b6a2328e13543b7d4c4a945e86f14ff35bda
---
M src/gprs_rlcmac_sched.cpp
1 file changed, 7 insertions(+), 5 deletions(-)

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



diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp
index 706fbb5..97806d9 100644
--- a/src/gprs_rlcmac_sched.cpp
+++ b/src/gprs_rlcmac_sched.cpp
@@ -273,7 +273,7 @@

 static struct msgb *sched_select_downlink(struct gprs_rlcmac_bts *bts,
uint8_t trx, uint8_t ts, uint32_t fn,
-   uint8_t block_nr, struct gprs_rlcmac_pdch *pdch)
+   uint8_t block_nr, struct gprs_rlcmac_pdch *pdch, bool 
*is_egprs)
 {
struct msgb *msg = NULL;
struct gprs_rlcmac_dl_tbf *tbf, *prio_tbf = NULL;
@@ -324,6 +324,7 @@
pdch->next_dl_tfi = (prio_tfi + 1) & 31;
/* generate DL data block */
msg = prio_tbf->create_dl_acked_block(fn, ts);
+   *is_egprs = prio_tbf->ms()->mode() != GPRS;
}

return msg;
@@ -362,9 +363,9 @@
  msg->len);
break;
case PCU_GSMTAP_C_DL_DATA_GPRS:
+   case PCU_GSMTAP_C_DL_DATA_EGPRS:
bts->bts->do_rate_ctr_inc(CTR_RLC_SENT);
-   /* FIXME: distinguish between GPRS and EGPRS */
-   bts->bts->send_gsmtap(PCU_GSMTAP_C_DL_DATA_GPRS, false, trx, 
ts, GSMTAP_CHANNEL_PDTCH, fn, msg->data,
+   bts->bts->send_gsmtap(cat, false, trx, ts, 
GSMTAP_CHANNEL_PDTCH, fn, msg->data,
  msg->len);
break;
case PCU_GSMTAP_C_DL_DUMMY:
@@ -389,6 +390,7 @@
struct msgb *msg = NULL;
uint32_t poll_fn, sba_fn;
enum pcu_gsmtap_category gsmtap_cat;
+   bool is_egprs = false;

if (trx >= 8 || ts >= 8)
return -EINVAL;
@@ -431,8 +433,8 @@

/* Prio 2: select data message for downlink */
if (!msg) {
-   msg = sched_select_downlink(bts, trx, ts, fn, block_nr, pdch);
-   gsmtap_cat = PCU_GSMTAP_C_DL_DATA_GPRS;
+   msg = sched_select_downlink(bts, trx, ts, fn, block_nr, pdch, 
_egprs);
+   gsmtap_cat = is_egprs ? PCU_GSMTAP_C_DL_DATA_EGPRS : 
PCU_GSMTAP_C_DL_DATA_GPRS;
}

/* Prio 3: send dummy contol message */

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I3bd8b6a2328e13543b7d4c4a945e86f14ff35bda
Gerrit-Change-Number: 21175
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


  1   2   >